computability and complexity
play

Computability and Complexity Lecture 6 Reductions via Computation - PowerPoint PPT Presentation

Computability and Complexity Lecture 6 Reductions via Computation Histories Undecidability of Emptiness of Linear Bounded Automata Undecidability of Post Correspondence Problem given by Jiri Srba Lecture 6 Computability and Complexity 1/15


  1. Computability and Complexity Lecture 6 Reductions via Computation Histories Undecidability of Emptiness of Linear Bounded Automata Undecidability of Post Correspondence Problem given by Jiri Srba Lecture 6 Computability and Complexity 1/15

  2. Reduction via Computation Histories Recall Reduction from A to B A language A is reducible to language B iff a decider for B can be used to algorithmically construct a decider for problem A . If A is reducible to B and A is undecidable, then B is undecidable. Definition (Accepting/Rejecting Computation History) Let M be a TM. A computation history of M on input w is a sequence of configurations C 1 , C 2 , . . . , C ℓ such that: C 1 = q 0 w is the initial configuration, C i yields C i +1 for all 1 ≤ i < ℓ , and C ℓ is a halting configuration (in either accept or reject state). If C ℓ is accepting, then the history is called accepting. If C ℓ is rejecting, then the history is called rejecting. M accepts w iff M on w has an accepting computation history. Lecture 6 Computability and Complexity 2/15

  3. Linear Bounded Automaton and the Emptiness Problem Definition Linear bounded automaton (LBA) is a restricted Turing machine M such that when M runs on any input string w , its head always stays within the first | w | cells. Theorem The language A LBA is decidable. Emptiness Problem: ”Given an LBA B , is L ( B ) = ∅ ?” def = {� B � | B is an LBA such that L ( B ) = ∅ } E LBA Theorem The language E LBA is undecidable. Proof: By reduction from A TM to E LBA via computation histories. Lecture 6 Computability and Complexity 3/15

  4. Proof (Reduction for A TM to E LBA ) 1 Assume that we have a decider R for E LBA . 2 Using R , we construct a decider S for A TM : S = ” On input � M , w � : 1. From M and w build an LBA B such that L ( B ) � = ∅ if and only if M accepts w 2. Run R (decider for E LBA ) on � B � . 3. If R accepted then S rejects. If R rejected then S accepts. ” 3 We know that S cannot exist, and hence R cannot exist either. 4 Conclusion: E LBA is undecidable. TO DO (The Tricky Part) From M and w construct an LBA B s.t. L ( B ) � = ∅ iff M accepts w . Lecture 6 Computability and Complexity 4/15

  5. Proof (Construction of LBA B from M and w ) Idea: We construct B such that it accepts exactly all strings of the form # C 1 # C 2 # C 3 # . . . # C ℓ # where C 1 , C 2 , C 3 , . . . , C ℓ is an accepting computation history of M on w . Now clearly L ( B ) � = ∅ if and only if M accepts w . Lecture 6 Computability and Complexity 5/15

  6. Proof (Construction of LBA B from M and w ) B = ” On input x : 1. If x is not of the form # C 1 # C 2 # . . . # C ℓ # for some strings C 1 , . . . , C ℓ then B rejects. 2. Verify whether # C 1 # C 2 # . . . # C ℓ # satisfies the following three conditions: a) C 1 = q 0 w b) C ℓ is an accept configuration c) C i yields C i +1 for all i (zigzag between them) 3. If all three conditions are true, then S accepts, else S rejects. ” Notice The constructed machine B is LBA. We actually never run B , it is merely the input for R (the decider for E LBA ) in order to achieve a contradiction. Lecture 6 Computability and Complexity 6/15

  7. More Undecidable Problem from Language Theory Problem: ”Given a CFG G , is L ( G ) = Σ ∗ ?” = {� G � | G is a CFG such that L ( G ) = Σ ∗ } def ALL CFG Theorem The language ALL CFG is undecidable. Proof: very interesting technique based on computation histories (optional reading in the book). def = {� G 1 , G 2 � | G 1 and G 2 are CFGs s.t. L ( G 1 ) = L ( G 2 ) } EQ CFG Theorem The language EQ CFG is undecidable. Proof: By reduction from ALL CFG . Next tutorial. Lecture 6 Computability and Complexity 7/15

  8. Post Correspondence Problem (Emil Post, 1946) Instance of the Post Correspondence Problem (PCP): A PCP instance over Σ is a finite collection P of dominos � t 1 � t 2 � t k P = { � � , · · · , � } , b 1 b 2 b k where for all i , 1 ≤ i ≤ k , t i , b i ∈ Σ ∗ . Match: Assume a given PCP instance P . A match is a nonempty sequence i 1 , i 2 , . . . , i ℓ of numbers from { 1 , 2 , . . . , k } (repeating is allowed) such that t i 1 t i 2 . . . t i ℓ = b i 1 b i 2 . . . b i ℓ . Lecture 6 Computability and Complexity 8/15

  9. Post Correspondence Problem (PCP) Question: Does a given PCP instance P have a match? Language formulation: PCP def = {� P � | P is a PCP instance and it has a match } Theorem The language PCP is undecidable. Proof: By reduction via computation histories from A TM . Lecture 6 Computability and Complexity 9/15

  10. Proof Structure (Undecidability of PCP) The reduction will work in two steps: 1 We reduce A TM to MPCP . 2 We reduce MPCP to PCP . MPCP (Modified PCP): MPCP def = {� P � | P is a PCP instance and it has a match which starts with index 1 } In reduction from A TM we will without loss of generality assume that on input � M , w � of A TM the machine M never attempts to move its head off the left-hand end of the tape. Lecture 6 Computability and Complexity 10/15

  11. Proof (Reduction from A TM to MPCP ) For input � M , w � of A TM construct a MPCP instance P such that M accepts w iff P has a match starting with domino 1. # � � 1 Add a start (first) domino . # q 0 w # � qa � 2 If δ ( q , a ) = ( r , b , R ) add the domino . br � cqa � 3 If δ ( q , a ) = ( r , b , L ) add the domino for all c ∈ Γ. rcb � a � 4 Add the domino for all a ∈ Γ. a � # � # � � 5 Add the dominos and . # ⊔ # � aq accept � q accept a � � 6 Add the dominos for all a ∈ Γ. and q accept q accept � q accept ## � 7 Finally add the domino . # Lecture 6 Computability and Complexity 11/15

  12. Proof (Reduction from MPCP to PCP ) Conclusion MPCP is undecidable. Now we want to reduce MPCP to PCP : Given an instance P of MPCP we build an instance P ′ of PCP s.t. P has a match starting with domino 1 iff P ′ has a match. Let w = a 1 a 2 . . . a n be a string. We use the notation ∗ w def = ∗ a 1 ∗ a 2 ∗ . . . ∗ a n , w ∗ def = a 1 ∗ a 2 ∗ . . . ∗ a n ∗ , and ∗ w ∗ def = ∗ a 1 ∗ a 2 ∗ . . . ∗ a n ∗ . Lecture 6 Computability and Complexity 12/15

  13. Proof (Reduction from MPCP to PCP ) Given an instance P of MPCP we build an instance P ′ of PCP s.t. P has a match starting with domino 1 iff P ′ has a match. Construction of P ′ from P (here ∗ and ⋄ are fresh symbols): � t 1 � ∗ t 1 � � to P ′ . For the first domino in P we add ∗ b 1 ∗ b 1 � t i � ∗ t i � � For all dominos in P we add the dominos to P ′ . b i b i ∗ � ∗⋄ � We add the domino to P ′ . ⋄ It is easy to see that if in P (where i 1 = 1) t i 1 t i 2 . . . t i ℓ = b i 1 b i 2 . . . b t ℓ then in P ′ ∗ t i 1 ∗ t i 2 ∗ . . . ∗ t i ℓ ∗ ⋄ = ∗ b i 1 ∗ b i 2 ∗ . . . ∗ b t ℓ ∗ ⋄ and vice verse. Lecture 6 Computability and Complexity 13/15

  14. Conclusion Conclusion PCP is undecidable. Facts: Undecidability of PCP can be further used to show that e.g. the following problems are undecidable too: ”Is a given CGF ambiguous?” ”Given CFGs G 1 and G 2 is L ( G 1 ) ∩ L ( G 2 ) = ∅ ?” And many more ... Lecture 6 Computability and Complexity 14/15

  15. Exam Questions Undecidability of emptiness for LBA. PCP and MPCP definitions and examples. Undecidability proofs of MPCP and PCP (two reductions). Lecture 6 Computability and Complexity 15/15

Recommend


More recommend