bu cs 332 theory of computation
play

BU CS 332 Theory of Computation Lecture 15: Reading: Undecidable - PowerPoint PPT Presentation

BU CS 332 Theory of Computation Lecture 15: Reading: Undecidable and Unrecognizable Languages Sipser Ch 4.2, 5.1 Reductions Mark Bun March 23, 2020 How can we compare sizes of infinite sets? Definition: Two sets have the same size if


  1. BU CS 332 – Theory of Computation Lecture 15: Reading: • Undecidable and Unrecognizable Languages Sipser Ch 4.2, 5.1 • Reductions Mark Bun March 23, 2020

  2. How can we compare sizes of infinite sets? Definition: Two sets have the same size if there is a correspondence (bijection) between them A set is countable if • it is a finite set, or • it has the same size as , the set of natural numbers 3/23/2020 CS332 ‐ Theory of Computation 2

  3. A general theorem about set sizes Theorem: Let be a set. Then the power set does not have the same size as . Proof: Assume for the sake of contradiction that there is a correspondence Goal: Use diagonalization to construct a set that cannot be the output for any 3/23/2020 CS332 ‐ Theory of Computation 3

  4. Undecidable Languages 3/23/2020 CS332 ‐ Theory of Computation 4

  5. Problems in language theory 𝐄𝐆𝐁 𝐃𝐆𝐇 𝐔𝐍 decidable decidable ? 𝐄𝐆𝐁 𝐃𝐆𝐇 𝐔𝐍 ? decidable decidable 𝐃𝐆𝐇 𝐄𝐆𝐁 𝐔𝐍 ? ? decidable 3/23/2020 CS332 ‐ Theory of Computation 5

  6. Undecidability These natural computational questions about computational models are undecidable I.e., computers cannot solve these problems no matter how much time they are given 3/23/2020 CS332 ‐ Theory of Computation 6

  7. An existential proof Theorem: There exists an undecidable language over Proof: ∗ is the A simplifying assumption: Every string in encoding of some Turing machine ∗ Set of all Turing machines: ∗ Set of all languages over : all subsets of = There are more languages than there are TM deciders! 3/23/2020 CS332 ‐ Theory of Computation 7

  8. An existential proof Theorem: There exists an unrecognizable language over Proof: ∗ is the A simplifying assumption: Every string in encoding of some Turing machine ∗ Set of all Turing machines: ∗ Set of all languages over : all subsets of = There are more languages than there are TM recognizers! 3/23/2020 CS332 ‐ Theory of Computation 8

  9. An explicit undecidable language TM 𝑁 𝑁 � 𝑁 � 𝑁 � 𝑁 � … 3/23/2020 CS332 ‐ Theory of Computation 9

  10. An explicit undecidable language TM 𝑁 𝑁� 𝑁 � � ? 𝑁� 𝑁 � � ? 𝑁� 𝑁 � � ? 𝑁� 𝑁 � � ? 𝐸� 𝐸 � ? 𝑁 � … Y N Y Y 𝑁 � N N Y Y 𝑁 � Y Y Y N 𝑁 � N N Y N … 𝐸 Suppose decides 3/23/2020 CS332 ‐ Theory of Computation 10

  11. An explicit undecidable language Theorem: is undecidable Proof: Suppose for contradiction, that decides Corollary: �� is undecidable 3/23/2020 CS332 ‐ Theory of Computation 11

  12. A more useful undecidable language �� Theorem: �� is undecidable But first: �� is Turing ‐ recognizable The following “universal TM” recognizes �� On input : 1. Simulate running on input 2. If accepts, accept. If rejects, reject. 3/23/2020 CS332 ‐ Theory of Computation 12

  13. More on the Universal TM "It is possible to invent a single machine which can be used to compute any computable sequence. If this machine U is supplied with a tape on the beginning of which is written the S.D ["standard description"] of some computing machine M , then U will compute the same sequence as M .” ‐ Turing, “On Computable Numbers…” 1936 • Foreshadowed general ‐ purpose programmable computers • No need for specialized hardware: Virtual machines as software Harvard architecture: von Neumann architecture: Separate instruction and data pathways Programs can be treated as data 3/23/2020 CS332 ‐ Theory of Computation 13

  14. A more useful undecidable language �� Theorem: �� is undecidable Proof: Assume for the sake of contradiction that TM decides �� : Idea: Show that can be used to decide the (undecidable) language �� ‐‐ a contradiction. 3/23/2020 CS332 ‐ Theory of Computation 14

  15. A more useful undecidable language �� Suppose decides �� Consider the following TM . On input where is a TM: 1. Run on input 2. If accepts, accept. If rejects, reject. Claim: decides �� …but this language is undecidable 3/23/2020 CS332 ‐ Theory of Computation 15

  16. Unrecognizable Languages Theorem: A language is decidable if and only if and are both Turing ‐ recognizable. Proof: 3/23/2020 CS332 ‐ Theory of Computation 16

  17. Classes of Languages recognizable decidable context free regular 3/23/2020 CS332 ‐ Theory of Computation 17

  18. Reductions 3/23/2020 CS332 ‐ Theory of Computation 18

  19. A more useful undecidable language �� Theorem: �� is undecidable Proof: Assume for the sake of contradiction that TM decides �� : Idea: Show that can be used to decide the (undecidable) language �� ‐‐ a contradiction. “A reduction from �� to �� ” 3/23/2020 CS332 ‐ Theory of Computation 19

  20. Scientists vs. Engineers A computer scientist and an engineer are stranded on a desert island. They find two palm trees with one coconut on each. The engineer climbs a tree, picks a coconut and eats. The computer scientist climbs the second tree, picks a coconut, climbs down, climbs up the first tree and places it there, declaring success. “Now we’ve reduced the problem to one we’ve already solved.” 3/23/2020 CS332 ‐ Theory of Computation 20

  21. Reductions A reduction from problem to problem is an algorithm for problem which uses an algorithm for problem as a subroutine If such a reduction exists, we say “ reduces to ” 3/23/2020 CS332 ‐ Theory of Computation 21

  22. Two uses of reductions Positive uses: If reduces to and is decidable, then is also decidable ��� � � � � � � Theorem: ��� is decidable Proof: The following TM decides ��� On input � , where � are DFAs: � � 1. Construct a DFA that recognizes the symmetric difference � � 2. Run the decider for ��� on and return its output 3/23/2020 CS332 ‐ Theory of Computation 22

  23. Two uses of reductions Negative uses: If reduces to and is undecidable, then is also undecidable 𝐵 �� � 𝑁 , 𝑥 𝑁 is a TM that accepts input 𝑥� Suppose 𝐼 decides 𝐵 �� Consider the following TM 𝐸 . On input 𝑁 where 𝑁 is a TM: Run 𝐼 on input 𝑁 , 𝑁 1. If 𝐼 accepts, accept. If 𝐼 rejects, reject. 2. Claim: 𝐸 decides 𝑇𝐵 �� � 𝑁 𝑁 is a TM that accepts on input 𝑁 � 3/23/2020 CS332 ‐ Theory of Computation 23

  24. Two uses of reductions Negative uses: If reduces to and is undecidable, then is also undecidable Proof template: 1. Suppose to the contrary that is decidable 2. Using as a subroutine, construct an algorithm deciding 3. But is undecidable. Contradiction! 3/23/2020 CS332 ‐ Theory of Computation 24

  25. Halting Problem �� Theorem: �� is undecidable Proof: Suppose for contradiction that there exists a decider for �� . We construct a decider for �� as follows: On input : 1. Run on input 2. If rejects, reject 3. If accepts, simulate on 4. If accepts, accept. Otherwise, reject This is a reduction from �� to �� 3/23/2020 CS332 ‐ Theory of Computation 25

  26. Empty language testing for TMs �� Theorem: �� is undecidable Proof: Suppose for contradiction that there exists a decider for �� . We construct a decider for �� as follows: On input : 1. Run on input ??? This is a reduction from �� to �� 3/23/2020 CS332 ‐ Theory of Computation 26

  27. Empty language testing for TMs �� Theorem: �� is undecidable Proof: Suppose for contradiction that there exists a decider for �� . We construct a decider for �� as follows: On input : 1. Construct a TM as follows: 2. Run on input 3. If , accept. Otherwise, reject This is a reduction from �� to �� 3/23/2020 CS332 ‐ Theory of Computation 27

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend