2160704 Theory of Computation Unit6 Computable Functions Prof
2160704 Theory of Computation Unit-6 Computable Functions Prof. Dixita B. Kagathara dixita. kagathara@darshan. ac. in Theory of Computation (2160704) 1 Darshan Institute of Engineering & Technology
Topics to be covered • • • Initial functions Composition Primitive Recursion Operation Primitive Recursive Functions Bounded Quantifications Bounded Minimalization Unbounded Minimalization μ – Recursive Functions Gödel Number of a sequence of Natural Numbers Gödel Numbering of strings Recursive languages and Recursively enumerable languages Halting problem Unit – 6 : Computable Functions Theory of Computation (2160704) 2 Darshan Institute of Engineering & Technology
Initial functions § Unit – 6 : Computable Functions Theory of Computation (2160704) 3 Darshan Institute of Engineering & Technology
Composition § Unit – 6 : Computable Functions Theory of Computation (2160704) 4 Darshan Institute of Engineering & Technology
Primitive Recursion Operation § Unit – 6 : Computable Functions Theory of Computation (2160704) 5 Darshan Institute of Engineering & Technology
Primitive Recursive Functions § Unit – 6 : Computable Functions Theory of Computation (2160704) 6 Darshan Institute of Engineering & Technology
Show that the function f(x, y) = x + y is primitive recursive § Unit – 6 : Computable Functions Theory of Computation (2160704) 7 Darshan Institute of Engineering & Technology
Show that the function f(x, y) = x + y is primitive recursive § Unit – 6 : Computable Functions Theory of Computation (2160704) 8 Darshan Institute of Engineering & Technology
Bounded Quantifications § Unit – 6 : Computable Functions Theory of Computation (2160704) 9 Darshan Institute of Engineering & Technology
Bounded Minimalization § Unit – 6 : Computable Functions Theory of Computation (2160704) 10 Darshan Institute of Engineering & Technology
Unbounded Minimalization § Unit – 6 : Computable Functions Theory of Computation (2160704) 11 Darshan Institute of Engineering & Technology
μ – Recursive Functions § Unit – 6 : Computable Functions Theory of Computation (2160704) 12 Darshan Institute of Engineering & Technology
Gödel Number of a sequence of Natural Numbers § Unit – 6 : Computable Functions Theory of Computation (2160704) 13 Darshan Institute of Engineering & Technology
Gödel Numbering of strings § Unit – 6 : Computable Functions Theory of Computation (2160704) 14 Darshan Institute of Engineering & Technology
Recursive languages and Recursively enumerable languages § Unit – 6 : Computable Functions Theory of Computation (2160704) 15 Darshan Institute of Engineering & Technology
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. Unit – 6 : Computable Functions Theory of Computation (2160704) 16 Darshan Institute of Engineering & Technology
Halting Problem Step 1: • Let us assume that the halting problem of a Turing machine is solvable. There exists a machine H 1 (say). H 1 takes two inputs: 1. A string describing M. 2. An input ω for machine M. • H 1 generate an output “halt” if H 1 determines that M stops on input ω; otherwise H outputs “loop”. Working of the machine H 1 is shown below. M W Unit – 6 : Computable Functions Theory of Computation (2160704) Halt H 1 17 Loop Darshan Institute of Engineering & Technology
Halting Problem Step 2: • Let us revise the machine H 1 as H 2 to take M as both inputs and H 2 should be able to determine if M will halt on M as its input. M Halt H 2 Unit – 6 : Computable Functions Theory of Computation (2160704) 18 Loop Darshan Institute of Engineering & Technology
Halting Problem Step 3: • Let us construct a new Turing machine H 3 that takes output of H 2 as input and does the following : 1. If the output of H 2 is “loop” than H 3. 2. If the output of H 2 is “halt” than H 3 will loop forever. M H 2 Halt Machine H 3 loops forever Loop Machine H 3 halts • H 3 will do the opposite of the output of H 2. Unit – 6 : Computable Functions Theory of Computation (2160704) 19 Darshan Institute of Engineering & Technology
Halting Problem Step 4: • Let us give H 3 itself as inputs to H 3 • If H 3 is given as input then H 3 would loop. • If H 3 loops forever on H 3 as input H 3 would halts. • In either case, the result is wrong. Hence, H 3 does not exist. If H 3 does not exist than H 2 does not exist. If H 2 does not exist than H 1 does not exist. Unit – 6 : Computable Functions Theory of Computation (2160704) 20 Darshan Institute of Engineering & Technology
End of Unit-6 Theory of Computation (2160704) Unit – 6 : Computable Functions Darshan Institute of Engineering & Technology
- Slides: 21