1 / 23

Undecidable Languages (Chapter 4.2)

Undecidable Languages (Chapter 4.2). H éctor Muñoz-Avila. Undecidable Languages. We are going to make 2 proofs: An existence proof: We show that a language L must exist that cannot be decided/recognized with Turing machines without actually showing L A constructive proof

greta
Download Presentation

Undecidable Languages (Chapter 4.2)

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. Undecidable Languages(Chapter 4.2) Héctor Muñoz-Avila

  2. Undecidable Languages • We are going to make 2 proofs: • An existence proof: • We show that a language L must exist that cannot be decided/recognized with Turing machines without actually showing L • A constructive proof • We show that the halting is not decidable

  3. Irrational number exist • Greek mathematicians • Deadly controversial • 6th century BC • Turing machines • Formal model of computation • Decidable languages and enumerability results • There are many more Real numbers than there are natural numbers • There are as many rational numbers as there are natural numbers • controversial • Late 1800’s • Cantor • Turing machines capture any algorithm • Some problems cannot be solved by computers • Gödel incompleteness theorem • Gödel numberings • 1930’s The Existence Proof: History

  4. The Existence Proof

  5. Comparing Sets • Two sets A and B have the same size if:

  6. Comparing Sets • Two sets A and B have the same size if: • There is a function f: A B that is bijective

  7. Comparing Sets • Two sets A and B have the same size if: • There is a function f: A B that is bijective

  8. Countable Sets • The set of all Natural numbers: • N = {1, 2, …} • Set A is countable if it has the same size as N • Example: The set of all integers have the same size as N. The function f is bijective: • f(n) = -((n-1)/2) (if n is odd) • f(n) = (n/2) (if n is even)

  9. Countable Sets • The set of all Natural numbers: • N = {1, 2, …} • It is easier to think of countable sets as those that can be enumerated with an enumerated Turing machine Program enumerateAllIntegers() n  1 while (true) { if odd(n) then print(-((n-1)/2)) else print(n/2) n  n + 1 } Program enumerateAllNaturals() n  1 while (true) { print(n) n  n + 1 }

  10. The set of All Rational Numbers is Countable • Q = {p/q | p, q  N}  {0} • Perhaps easier than finding a function f: N  Q that is bijective is to think of a Turing machine that enumerates Q • See blackboard for a description of the procedure • Same as described in Example 4.15

  11. The Real Numbers • R= “the set of all real numbers” • We can show that R has the same size as (-/2,/2) by using: • f(x) = tan(x) • In general: R has the same size as (a,b) for any two real numbers with a < b • You studied this in Calc I

  12. The Real Numbers are Not Countable • Proof: see blackboard • Same as Theorem 4.17

  13. There Exists a Non-decidable l Language Three steps (Corollary 4.18): (1) M = “set of all binary encodings of Turing machines” is countable (2) L = “set of all binary sequences of languages” is not countable (3) Hence, there exists a language l, <l>L such that no Turing machine can decide it

  14. Step 1: M is Countable • It is easy to construct a procedure that enumerates (choose one): • All Turing machines • All C++ programs • All Java programs • See blackboard for procedure • Homework for Monday asks you to reconstruct this procedure • Actual mathematical proof uses Godel numberings (not in the book)

  15. Step 2: L is not countable • Assume  = {0,1} (the proof works with any finite alphabet) • Consider * listed in Lexicographical Order • We define the characteristic sequence <L> for a language L • We define: • L = {<L>| L is a language in } • See blackboard for preliminaries • Homework for Monday asks you to finish the proof

  16. Step 3 • Because: • M = “set of all Turing machines” is countable • L = “set of all languages” is not countable • We can now proof that there exists a language l in L such that no Turing machine can decide it

  17. Does the following program halts? Source: http://faculty.orangecoastcollege.edu/sgilbert/CS170S09/u05/E.html

  18. Does the following program halts? Source: http://snap.nlc.dcccd.edu/learn/fuller3/chap10/chap10.html

  19. A Concrete Undecidable Language • The halting problem is not decidable • Formally, the following set is not decidable: • HALT = {<M,w> | M is a Turing machine, w  *, M halts on input w} Kleene Gödel Church Barkley Rosser Turing

  20. Note • Modern program editors detect instances of infinite loops • Does this contradict the statement that HALT is undecidable? Editor says: “Warning potential infinite loop here”

  21. A Paradox “In Sevilla, Spain lives Pepe a barber who…”

  22. Actual Proof • First: example of a situation where a write a program M and pass as parameter the binary encoding of <M> • i.e., call M(<M>) • Proof by contradiction: • Assume that HALT is decidable: • HALT = {<M,w> | M is a Turing machine, w  *, M halts on input w} • Let H be a decider for HALT • Rest of the proof in the blackboard: (Theorem 4.11)

More Related