Download presentation
Presentation is loading. Please wait.
1
Decidability and Undecidability
Chapter 6 Decidability and Undecidability
2
Theory of Computation: Chapter 6
Gödel Numbering By definition, every TM has a finite description, and hence can be written as a finite string over some finite alphabet. So, what is the cardinality of: {M : M is a TM}? And, what is the cardinality of: {LM : M is a TM}? But, there are uncountable many languages! 12/8/2018 Theory of Computation: Chapter 6
3
Theory of Computation: Chapter 6
Post tag system A (finite) collection of pairs (α, β) such that strings are transformed as: αλ ⇒ λβ I.e. the prefix α is removed, and the suffix β is appended. A post machine is like a PDA, but with a queue instead of a stack. β λ α α leaving causes β to enter 12/8/2018 Theory of Computation: Chapter 6
4
Universal Turing Machines
Without loss of generality, code all TM’s as binary strings over {0, 1} by taking the state symbols qᵢ → 10ⁱ1 and placing delimiters in appropriate places. Remember, every TM M has a finite description. Notation: Call that ‹M›, the code of M. Let ‹M, w› be the code of M followed by an arbitrary binary string w. Note: Not every binary string represents a TM. But those that do represent unique TM’s. Definition: Let the universal language be Lᵤ = {‹M, w› : M accepts w}. 12/8/2018 Theory of Computation: Chapter 6
5
The universal language is r.e.
Theorem: Lᵤ = {‹M, w› : w LM} is recursively enumerable (r.e.). Proof: Construct a fixed universal TM M* (an interpreter) as follows: (1) input tape copy ‹M› to (3) & w to (2) (2) simulation tape same contents as M’s tape (3) state tape remember state of M; look up next move of M. Accept/reject if M accepts/rejects, run forever otherwise. 12/8/2018 Theory of Computation: Chapter 6
6
The universal language is not recursive
Theorem: Lᵤ = {‹M, w› : w ∈ LM} is not recursive. Proof: Suppose towards a contradiction that Lᵤ is recursive. Then the diagonal language Ld = {‹M› : ‹M› ∈ LM} would be also, since ‹M› ∈ LM iff ‹M, ‹M›› ∈ Lᵤ. Hence, Σ* \ Ld would also be recursive. Consider: Question: Is ‹M'› ∈ LM'? ‹M'› ∈ LM' ⇔ ‹M'› ∉ Ld ⇔ ‹M'› ∉ LM' This technique is known as diagonalization. 12/8/2018 Theory of Computation: Chapter 6
7
Lh = {‹M, w› : M halts on w} is unsolvable
Corollary: The halting problem is not decidable – i.e. there is no algorithm. Proof: Suppose the halting problem were decidable. Show Lᵤ would be. Given a machine M and a string w, check if M halts on w before running M on w. If it doesn't halt, just reject. If it does halt, run M on input w, and output the answer. This shows Lᵤ is recursive, a contradiction. ‹M, w› no algorithm Mh NO ‹M, w› yes no Mu procedure NO yes YES 12/8/2018 Theory of Computation: Chapter 6
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.