1 / 16

The Halting Problem – Undecidable Languages

The Halting Problem – Undecidable Languages. Lecture 31 Section 4.2 Wed, Oct 31, 2007. The Acceptance Problem for Turing Machines. The Acceptance Problem for Turing Machines : Given a Turing machine M and a string w , does M accept w ? The language is

afi
Download Presentation

The Halting Problem – Undecidable Languages

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The Halting Problem – Undecidable Languages Lecture 31 Section 4.2 Wed, Oct 31, 2007

  2. The Acceptance Problem for Turing Machines • The Acceptance Problem for Turing Machines: Given a Turing machine M and a string w, does M accept w? • The language is ATM = {M, w | M accepts w)}.

  3. ATM is Turing-Recognizable • Theorem: ATM is Turing-recognizable. • Proof: • Build a Turing machine U that will read a representation of M and simulate it on the input w.

  4. ATM is Turing-Recognizable • If U halts in the accept state, then accept M, w. • If U halts in the reject state, then reject M, w. • The problem is that U may run forever. • That is why U is only a recognizer, not a decider.

  5. Universal Turing Machines • A universal Turing machine is a Turing machine that can read a description of any Turing machine and simulate it. • Do universal Turing machines really exist?

  6. Universal Turing Machines • Yes. (We call them programmablecomputers.) • They read a description of a Turing machine. (We call the description a program.) • Then they simulate the Turing machine. (We say they execute the program.)

  7. Turing-Unrecognizable Languages • Theorem: There exist Turing-unrecognizable languages. • Lemma: The set of all Turing machines is a countably infinite set. • Proof of the Lemma: • Each Turing machine has a finite description: (Q, , , , q0, qacc, qrej).

  8. Turing-Unrecognizable Languages • Express each description in binary, perhaps by using ASCII. • Thus, the set of all Turing machines is represented by a set of finite binary strings. • We already know that every set of finite binary strings is countable. • (They can be arranged in lexicographical order.)

  9. Turing-Unrecognizable Languages • Lemma: The set of infinite binary strings is uncountable. • Proof of the Lemma: • We need to use a diagonalization argument, which is based on proof by contradiction.

  10. Turing-Unrecognizable Languages • Suppose the set is countable. • Then the set of all infinite binary strings can be listed w1, w2, w3, and so on. • Create a binary array that is infinite to the right and down by letting row i be the bits in wi, for i = 1, 2, 3, …

  11. Turing-Unrecognizable Languages • Define an infinite binary string w as follows. • If the ith bit in row i is 0, set the ith bit of w to 1. • If the ith bit in row i is 1, set the ith bit of w to 0.

  12. Turing-Unrecognizable Languages • Certainly, w is an infinite binary string. • But w cannot be in the list of all infinite binary strings because it disagrees with every wi in the list. • This is a contradiction. • Therefore, the set must be uncountable.

  13. Turing-Unrecognizable Languages • Proof of the Theorem: • Suppose that every language is recognizable. • Then for every language L, there is a Turing machine M that recognizes it. • That is, L(M) = L.

  14. Turing-Unrecognizable Languages • For any language L, create an infinite binary string s as follows. • Make a list of all binary strings and order it lexicographically. • For the ith word wi in the list, if wi is in L, then the ith bit of s is 1. • If wi is not in L, then the ith bit of s is 0.

  15. Turing-Unrecognizable Languages • This is a one-to-one correspondence between the set of all languages and the set of all infinite binary strings. • Thus, the set of all languages is uncountable.

  16. Turing-Unrecognizable Languages • But for every language, there is (supposedly) a Turing machine that accepts it. • That would require uncountably many Turing machines. • This is a contradiction. • Thus, there exist languages that are not Turing-recognizable.

More Related