Professional Documents
Culture Documents
TOC GTU Study Material Presentations Unit-6 18062021085644AM
TOC GTU Study Material Presentations Unit-6 18062021085644AM
TOC GTU Study Material Presentations Unit-6 18062021085644AM
GTU # 3160704
Unit – 6
Computable Functions
Prof. Dixita
Jay R Dhamsaniya
B Kagathara #3130006
#3160704 (PS)
(TOC) Unit
Unit
1 –6 Basic
– Computable
Probability
Functions 3
Composition
Suppose f is a partial function from , and for each with is a partial function from . The partial
function obtained from and by composition is the partial function from defined by the formula
Prof. Dixita
Jay R Dhamsaniya
B Kagathara #3130006
#3160704 (PS)
(TOC) Unit
Unit
1 –6 Basic
– Computable
Probability
Functions 4
Primitive Recursion Operation
Suppose , and and are functions of and variables, respectively. The function obtained from
and by the operation of primitive recursion is the function defined by the formulas
Prof. Dixita
Jay R Dhamsaniya
B Kagathara #3130006
#3160704 (PS)
(TOC) Unit
Unit
1 –6 Basic
– Computable
Probability
Functions 5
Primitive Recursive Functions
The set PR of primitive recursive functions is defined as follows.
1. All initial functions are elements of PR.
2. For any and , if and are elements of PR, then the function obtained from and by
composition is an element of PR.
3. For any , any function in PR, and any function in PR, the function obtained from g and h
by primitive recursion is in PR.
4. No other functions are in the set PR.
Prof. Dixita
Jay R Dhamsaniya
B Kagathara #3130006
#3160704 (PS)
(TOC) Unit
Unit
1 –6 Basic
– Computable
Probability
Functions 6
Show that the function f(x, y) = x + y is primitive recursive
We start with primitive recursive derivation for .
If is obtained from and by primitive recursion, and must be functions of one and three
variable, respectively
The equations are:
Prof. Dixita
Jay R Dhamsaniya
B Kagathara #3130006
#3160704 (PS)
(TOC) Unit
Unit
1 –6 Basic
– Computable
Probability
Functions 7
Show that the function f(x, y) = x + y is primitive recursive
Therefore, a derivation for can be obtained as follow:
(an initial function)
(an initial function)
(an initial function)
(obtained from and by composition)
(obtained from and by composition)
This way of ordering the five functions is not the only correct one.
Any ordering in which is last and and both precede would work well.
Prof. Dixita
Jay R Dhamsaniya
B Kagathara #3130006
#3160704 (PS)
(TOC) Unit
Unit
1 –6 Basic
– Computable
Probability
Functions 8
Bounded Quantifications
Let be an -place predicate. The bounded existential quantification of is the -place predicate
defined by:
= (there exists with such that is true)
The bounded universal quantification of is the -place predicate defined by:
= (for every satisfying is true)
Prof. Dixita
Jay R Dhamsaniya
B Kagathara #3130006
#3160704 (PS)
(TOC) Unit
Unit
1 –6 Basic
– Computable
Probability
Functions 9
Bounded Minimalization
For an -place predicate , the bounded minimalization of is the function defined by
An important special case is that in which is for some . In this case is written and referred to
as the bounded minimalization of
Prof. Dixita
Jay R Dhamsaniya
B Kagathara #3130006
#3160704 (PS)
(TOC) Unit
Unit
1 –6 Basic
– Computable
Probability
Functions 10
Unbounded Minimalization
If is an place predicate, the unbounded minimalization of is the partial function defined by
Prof. Dixita
Jay R Dhamsaniya
B Kagathara #3130006
#3160704 (PS)
(TOC) Unit
Unit
1 –6 Basic
– Computable
Probability
Functions 11
μ – Recursive Functions
The set of - recursive, or simply recursive, partial functions is defined as follows:
1. Every initial function is an element of .
2. Every function obtained from elements of by composition or primitive recursion is an
element of .
3. For every and every total function in , the function defined by
Prof. Dixita
Jay R Dhamsaniya
B Kagathara #3130006
#3160704 (PS)
(TOC) Unit
Unit
1 –6 Basic
– Computable
Probability
Functions 12
Gödel Number of a sequence of Natural Numbers
For any finite sequence of natural numbers, the Gödel Number of the sequence is the number
,Where is the prime.
Prof. Dixita
Jay R Dhamsaniya
B Kagathara #3130006
#3160704 (PS)
(TOC) Unit
Unit
1 –6 Basic
– Computable
Probability
Functions 13
Gödel Numbering of strings
Let be an alphabet with elements
Prof. Dixita
Jay R Dhamsaniya
B Kagathara #3130006
#3160704 (PS)
(TOC) Unit
Unit
1 –6 Basic
– Computable
Probability
Functions 14
Recursive languages and Recursively enumerable languages
A Turing machine with input alphabet accepts a language . decides if computes the
characteristic function A language is recursively enumerable if there is a that accepts , and is
recursive if there is a that decides .
Prof. Dixita
Jay R Dhamsaniya
B Kagathara #3130006
#3160704 (PS)
(TOC) Unit
Unit
1 –6 Basic
– Computable
Probability
Functions 15
Halting Problem
The halting problem of a Turing machine states:
Given a Turing machine M and an input ω to the machine M, determine if the machine M will eventually halt it
is given input ω.
Halting problem of a Turing machine is unsolvable.
Proof:
Moves of a Turing machine can be represented using a binary number. Thus, a Turing machine
can be represented using a string over ε*(0, 1).
Unsolvable of halting problem of a Turing machine can be proved through the method of
contradiction.
Prof. Dixita
Jay R Dhamsaniya
B Kagathara #3130006
#3160704 (PS)
(TOC) Unit
Unit
1 –6 Basic
– Computable
Probability
Functions 16
Halting Problem
Step 1:
Let us assume that the halting problem of a Turing machine is solvable. There exists a machine
H1 (say). H1 takes two inputs:
1. A string describing M.
2. An input ω for machine M.
H1 generate an output “halt” if H1 determines that M stops on input ω; otherwise H outputs
“loop”. Working of the machine H1 is shown below.
M Halt
H1
W Loop
Prof. Dixita
Jay R Dhamsaniya
B Kagathara #3130006
#3160704 (PS)
(TOC) Unit
Unit
1 –6 Basic
– Computable
Probability
Functions 17
Halting Problem
Step 2:
Let us revise the machine H1 as H2 to take M as both inputs and H2 should be able to
determine if M will halt on M as its input.
M
Halt
H2
Loop
Prof. Dixita
Jay R Dhamsaniya
B Kagathara #3130006
#3160704 (PS)
(TOC) Unit
Unit
1 –6 Basic
– Computable
Probability
Functions 18
Halting Problem
Step 3:
Let us construct a new Turing machine H3 that takes output of H2 as input and does the
following :
1. If the output of H2 is “loop” than H3.
2. If the output of H2 is “halt” than H3 will loop forever.
M
Halt Machine H3 loops forever
H2
Loop Machine H3 halts
Prof. Dixita
Jay R Dhamsaniya
B Kagathara #3130006
#3160704 (PS)
(TOC) Unit
Unit
1 –6 Basic
– Computable
Probability
Functions 19
Halting Problem
Step 4:
Let us give H3 itself as inputs to H3.
H3
H3
Prof. Dixita
Jay R Dhamsaniya
B Kagathara #3130006
#3160704 (PS)
(TOC) Unit
Unit
1 –6 Basic
– Computable
Probability
Functions 20
Thank You