bu cs 332 theory of computation
play

BU CS 332 Theory of Computation Lecture 16: Reading: Mapping - PowerPoint PPT Presentation

BU CS 332 Theory of Computation Lecture 16: Reading: Mapping Reducibility Sipser Ch 5.3 Mark Bun March 25, 2020 Problems in language theory undecidable decidable decidable


  1. BU CS 332 – Theory of Computation Lecture 16: Reading: • Mapping Reducibility Sipser Ch 5.3 Mark Bun March 25, 2020

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

  3. 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/30/2020 CS332 ‐ Theory of Computation 3

  4. Reminder: Using reductions to prove undecidability 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/30/2020 CS332 ‐ Theory of Computation 4

  5. Equality 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 TMs � , � as follows: 2. Run on input � � 3. If accepts, accept. Otherwise, reject. This is a reduction from �� to �� 3/30/2020 CS332 ‐ Theory of Computation 5

  6. Equality 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 TMs � , � as follows: � = � = 2. Run on input � � 3. If accepts, accept. Otherwise, reject. This is a reduction from �� to �� 3/30/2020 CS332 ‐ Theory of Computation 6

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

  8. Context ‐ free 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 accepts, accept. Otherwise, reject This is a reduction from �� to �� 3/30/2020 CS332 ‐ Theory of Computation 8

  9. Context ‐ free 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: = “On input , � � � 1. If accept 2. Run TM on input 3. If accepts, accept.” 2. Run on input 3. If accepts, accept. Otherwise, reject This is a reduction from �� to �� 3/30/2020 CS332 ‐ Theory of Computation 9

  10. Mapping Reductions 3/30/2020 CS332 ‐ Theory of Computation 10

  11. 🚪🚪 Warning 🚪🚪 What’s wrong with the following “proof”? Bogus “Theorem”: �� is not Turing ‐ recognizable Bogus “Proof”: Suppose for contradiction that there exists a recognizer for �� . We construct a recognizer for �� : On input : 1. Run on input 2. If accepts, reject. Otherwise, accept. This sure looks like a reduction from �� to �� 3/30/2020 CS332 ‐ Theory of Computation 11

  12. Mapping Reductions: Motivation 1. How do we formalize the notion of a reduction? 2. How do we use reductions to show that languages are unrecognizable? 3. How do we protect ourselves from accidentally “proving” bogus theorems about recognizability? 3/30/2020 CS332 ‐ Theory of Computation 12

  13. Computable Functions Definition: ∗ is computable if there is a TM ∗ A function ∗ , halts with only which, given as input any on its tape. Example 1: Example 2: = where is a TM, is a string, and is a TM that ignores its input and simulates running on 3/30/2020 CS332 ‐ Theory of Computation 13

  14. Mapping Reductions Definition: Language is mapping reducible to language , written � ∗ such that for ∗ if there is a computable function ∗ , we have all strings 3/30/2020 CS332 ‐ Theory of Computation 14

  15. Decidability Theorem: If and is decidable, then is also � decidable ∗ be a ∗ Proof: Let be a decider for and let mapping reduction from to . Construct a decider for as follows: On input : 1. Compute 2. Run on input 3. If accepts, accept. Otherwise, reject. 3/30/2020 CS332 ‐ Theory of Computation 15

  16. Undecidability Theorem: If and is decidable, then is also � decidable Corollary: If and is undecidable, then is also � undecidable 3/30/2020 CS332 ‐ Theory of Computation 16

  17. Old Proof: Equality 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 TMs � , � as follows: � = “On input 𝑦 , � = “On input 𝑦 , Ignore 𝑦 1. Ignore 𝑦 and accept” 1. Run 𝑁 on input 𝑥 2. If 𝑁 accepts, accept. 3. Otherwise, reject.” 2. Run on input � � 3. If accepts, accept. Otherwise, reject. This is a reduction from �� to �� 3/30/2020 CS332 ‐ Theory of Computation 17

  18. New Proof: Equality Testing for TMs �� � � � � � � �� � � Theorem: �� hence �� is undecidable Proof: The following TM computes the reduction: On input : 1. Construct TMs � , � as follows: � = “On input 𝑦 , � = “On input 𝑦 , Ignore 𝑦 1. Ignore 𝑦 and accept” 1. Run 𝑁 on input 𝑥 2. If 𝑁 accepts, accept. 3. Otherwise, reject.” 2. Output � � 3/30/2020 CS332 ‐ Theory of Computation 18

  19. Mapping Reductions: Recognizability Theorem: If and is recognizable, then is also � recognizable ∗ be a ∗ Proof: Let be a recognizer for and let mapping reduction from to . Construct a recognizer for as follows: On input : 1. Compute 2. Run on input 3. If accepts, accept. Otherwise, reject. 3/30/2020 CS332 ‐ Theory of Computation 19

  20. Unrecognizability Theorem: If and is recognizable, then is also � recognizable Corollary: If and is unrecognizable, then is � also unrecognizable Corollary: If , then is unrecognizable �� � 3/30/2020 CS332 ‐ Theory of Computation 20

  21. Recognizability and 3/30/2020 CS332 ‐ Theory of Computation 21

  22. Consequences of 1. Since �� is undecidable, �� is also undecidable 2. �� implies �� � �� � �� Since �� is unrecognizable, �� is unrecognizable 3/30/2020 CS332 ‐ Theory of Computation 22

  23. itself is also unrecognizable �� � � � � � � Theorem: 𝐵 �� � � �� hence �� is unrecognizable Proof: The following TM computes the reduction: On input : 1. Construct TMs � , � as follows: � = “On input 𝑦 , � = “On input 𝑦 , Ignore 𝑦 1. Ignore 𝑦 and accept” 1. Run 𝑁 on input 𝑥 2. If 𝑁 accepts, accept. 3. Otherwise, reject.” 2. Output � � 3/30/2020 CS332 ‐ Theory of Computation 23

  24. More on Reductions and Undecidability 3/30/2020 CS332 ‐ Theory of Computation 24

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

  26. is undecidable ��� ∗ Theorem: ��� hence ��� is undecidable �� � Proof idea: “Computation history method” On input : 1. Construct a CFG such that: ∗ does not accept 2. Output 3/30/2020 CS332 ‐ Theory of Computation 26

  27. Problems in language theory 𝐔𝐍 𝐄𝐆𝐁 𝐃𝐆𝐇 undecidable decidable decidable 𝐄𝐆𝐁 𝐃𝐆𝐇 𝐔𝐍 decidable decidable undecidable 𝐄𝐆𝐁 𝐃𝐆𝐇 𝐔𝐍 undecidable undecidable decidable 3/30/2020 CS332 ‐ Theory of Computation 27

  28. Undecidable problems outside language theory Post Correspondence Problem (PCP): � Domino: �� . Top and bottom are strings. Input: Collection of dominos. Match: List of some of the input dominos (repetitions allowed) where top = bottom Problem: Does a match exist? This is undecidable 3/30/2020 CS332 ‐ Theory of Computation 28

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