Theory of Computer Science May 4, 2020 — D5. Post Correspondence Problem Theory of Computer Science D5.1 Post Correspondence Problem D5. Post Correspondence Problem Gabriele R¨ oger D5.2 (Un-)Decidability of PCP University of Basel D5.3 Further Undecidable Problems May 4, 2020 Gabriele R¨ oger (University of Basel) Theory of Computer Science May 4, 2020 1 / 32 Gabriele R¨ oger (University of Basel) Theory of Computer Science May 4, 2020 2 / 32 D5. Post Correspondence Problem Post Correspondence Problem Overview: Computability Theory Turing-Computability Computability D5.1 Post Correspondence Problem (Semi-)Decidability Undecidable Halting Problem Problems Reductions Rice’s Theorem Other Problems Gabriele R¨ oger (University of Basel) Theory of Computer Science May 4, 2020 3 / 32 Gabriele R¨ oger (University of Basel) Theory of Computer Science May 4, 2020 4 / 32
D5. Post Correspondence Problem Post Correspondence Problem D5. Post Correspondence Problem Post Correspondence Problem How to prove undecidability? More options for reduction proofs? ◮ statements on the computed function of a TM/an algorithm � all halting problems are quite similar → easiest with Rice’ theorem ◮ other problems → We want a wider selection for reduction proofs ◮ directly with the definition of undecidability → Is there some problem that is different in flavor? → usually quite complicated ◮ reduction from an undecidable problem, e.g. Post correspondence problem → (general) halting problem ( H ) (named after mathematician Emil Leon Post) → halting problem on the empty tape ( H 0 ) Gabriele R¨ oger (University of Basel) Theory of Computer Science May 4, 2020 5 / 32 Gabriele R¨ oger (University of Basel) Theory of Computer Science May 4, 2020 6 / 32 D5. Post Correspondence Problem Post Correspondence Problem D5. Post Correspondence Problem Post Correspondence Problem Post Correspondence Problem: Example Post Correspondence Problem: Definition Example (Post Correspondence Problem) Definition (Post Correspondence Problem PCP ) Given: different kinds of ”‘dominos”’ Given: Finite sequence of pairs of words 1: 2: 3: 1 10 011 ( x 1 , y 1 ) , ( x 2 , y 2 ) , . . . , ( x k , y k ), where x i , y i ∈ Σ + 101 00 11 (for an arbitrary alphabet Σ) (an infinite number of each kind) Question: Is there a sequence i 1 , i 2 , . . . , i n ∈ { 1 , . . . , k } , n ≥ 1, Question: Sequence of dominos such that with x i 1 x i 2 . . . x i n = y i 1 y i 2 . . . y i n ? upper and lower row match (= are equal) A solution of the correspondence problem is such a sequence 1 011 10 011 i 1 , . . . , i n , which we call a match. 101 11 00 11 1 3 2 3 Gabriele R¨ oger (University of Basel) Theory of Computer Science May 4, 2020 7 / 32 Gabriele R¨ oger (University of Basel) Theory of Computer Science May 4, 2020 8 / 32
D5. Post Correspondence Problem Post Correspondence Problem D5. Post Correspondence Problem Post Correspondence Problem Given-Question Form vs. Definition as Set PCP Definition as Set So far: problems defined as sets We can alternatively define PCP as follows: Now: definition in Given-Question form Definition (Post Correspondence Problem PCP ) Definition (new problem P ) Das Post Correspondence Problem PCP is the set Given: Instance I Does I have a specific property? PCP = { w | w encodes a sequence of pairs of words Question: ( x 1 , y 1 ) , ( x 2 , y 2 ) , . . . , ( x k , y k ) , for which there is a corresponds to definition sequence i 1 , i 2 , . . . , i n ∈ { 1 , . . . , k } Definition (new problem P ) such that x i 1 x i 2 . . . x i n = y i 1 y i 2 . . . y i n } . The problem P is the language P = { w | w encodes an instance I with the required property } . Gabriele R¨ oger (University of Basel) Theory of Computer Science May 4, 2020 9 / 32 Gabriele R¨ oger (University of Basel) Theory of Computer Science May 4, 2020 10 / 32 D5. Post Correspondence Problem (Un-)Decidability of PCP D5. Post Correspondence Problem (Un-)Decidability of PCP Post Correspondence Problem PCP cannot be so hard, huh? – Is it? D5.2 (Un-)Decidability of PCP 1101 0110 1 Formally: K = ((1101 , 1) , (0110 , 11) , (1 , 110)) → Shortest match has length 252! 1 11 110 10 0 100 Formally: K = ((10 , 0) , (0 , 001) , (100 , 1)) 0 001 1 → Unsolvable Gabriele R¨ oger (University of Basel) Theory of Computer Science May 4, 2020 11 / 32 Gabriele R¨ oger (University of Basel) Theory of Computer Science May 4, 2020 12 / 32
D5. Post Correspondence Problem (Un-)Decidability of PCP D5. Post Correspondence Problem (Un-)Decidability of PCP PCP : Semi-Decidability PCP : Undecidability Theorem (Semi-Decidability of PCP ) Theorem (Undecidability of PCP ) PCP is semi-decidable. PCP is undecidable. Proof. Proof via an intermediate other problem Semi-decision procedure for input w : modified PCP ( MPCP ) ◮ If w encodes a sequence ( x 1 , y 1 ) , . . . , ( x k , y k ) of pairs of words: 1 Reduce MPCP to PCP ( MPCP ≤ PCP ) Test systematically longer and longer sequences i 1 , i 2 , . . . , i n 2 Reduce halting problem to MPCP ( H ≤ MPCP ) whether they represent a match. If yes, terminate and return “yes”. → Let’s get started. . . ◮ If w does not encode such a sequence: enter an infinite loop. Proof. Due to H ≤ MPCP and MPCP ≤ PCP it holds that H ≤ PCP . If w ∈ PCP then the procedure terminates with “yes”, Since H is undecidable, also PCP must be undecidable. otherwise it does not terminate. Gabriele R¨ oger (University of Basel) Theory of Computer Science May 4, 2020 13 / 32 Gabriele R¨ oger (University of Basel) Theory of Computer Science May 4, 2020 14 / 32 D5. Post Correspondence Problem (Un-)Decidability of PCP D5. Post Correspondence Problem (Un-)Decidability of PCP MPCP : Definition Reducibility of MPCP to PCP (1) Lemma MPCP ≤ PCP . Proof. Definition (Modified Post Correspondence Problem MPCP ) Let # , $ �∈ Σ. For word w = a 1 a 2 . . . a m ∈ Σ + define Given: Sequence of word pairs as for PCP w = # a 1 # a 2 # . . . # a m # ¯ Question: Is there a match i 1 , i 2 , . . . , i n ∈ { 1 , . . . , k } w = # a 1 # a 2 # . . . # a m ` with i 1 = 1? w = a 1 # a 2 # . . . # a m # ´ For input C = (( x 1 , y 1 ) , . . . , ( x k , y k )) define f ( C ) = (( ¯ x 1 , ` y 1 ) , ( ´ x 1 , ` y 1 ) , ( ´ x 2 , ` y 2 ) , . . . , ( ´ x k , ` y k ) , ($ , #$)) . . . Gabriele R¨ oger (University of Basel) Theory of Computer Science May 4, 2020 15 / 32 Gabriele R¨ oger (University of Basel) Theory of Computer Science May 4, 2020 16 / 32
D5. Post Correspondence Problem (Un-)Decidability of PCP D5. Post Correspondence Problem (Un-)Decidability of PCP Reducibility of MPCP to PCP (2) PCP : Undecidability – Where are we? Proof (continued). Theorem (Undecidability of PCP ) f ( C ) = (( ¯ x 1 , ` y 1 ) , ( ´ x 1 , ` y 1 ) , ( ´ x 2 , ` y 2 ) , . . . , ( ´ x k , ` y k ) , ($ , #$)) PCP is undecidable. Function f is computable, and can suitably get extended to a total function. It holds that Proof via an intermediate other problem C has a solution with i 1 = 1 iff f ( C ) has a solution: modified PCP ( MPCP ) 1 Reduce MPCP to PCP ( MPCP ≤ PCP ) � Let 1 , i 2 , i 3 , . . . , i n be a solution for C . Then 1 , i 2 + 1 , . . . , i n + 1 , k + 2 is a solution for f ( C ). 2 Reduce halting problem to MPCP ( H ≤ MPCP ) If i 1 , . . . , i n is a match for f ( C ), then (due to the construction of the word pairs) there is a m ≤ n such that i 1 = 1 , i m = k + 2 and Proof. i j ∈ { 2 , . . . , k + 1 } for j ∈ { 2 , . . . , m − 1 } . Then Due to H ≤ MPCP and MPCP ≤ PCP it holds that H ≤ PCP . 1 , i 2 − 1 , . . . , i m − 1 − 1 is a solution for C . Since H is undecidable, also PCP must be undecidable. ⇒ f is a reduction from MPCP to PCP . Gabriele R¨ oger (University of Basel) Theory of Computer Science May 4, 2020 17 / 32 Gabriele R¨ oger (University of Basel) Theory of Computer Science May 4, 2020 18 / 32 D5. Post Correspondence Problem (Un-)Decidability of PCP D5. Post Correspondence Problem (Un-)Decidability of PCP Reducibility of H to MPCP (1) Reducibility of H to MPCP (2) Proof (continued). Idea: Lemma H ≤ MPCP . ◮ Sequence of words describes sequence of configurations of the TM Proof. ◮ “ x -row” follows “ y -row” x : # c 0 # c 1 # c 2 # Goal: Construct for Turing machine M = ( Q , Σ , Γ , δ, q 0 , � , E ) and word w ∈ Σ ∗ an MPCP instance C = (( x 1 , y 1 ) , . . . , ( x k , y k )) such y : # c 0 # c 1 # c 2 # c 3 # that ◮ Configurations get mostly just copied, M started on w terminates iff C ∈ MPCP . only the area around the head changes. ◮ After a terminating configuration has been reached: . . . make row equal by deleting the configuration. . . . Gabriele R¨ oger (University of Basel) Theory of Computer Science May 4, 2020 19 / 32 Gabriele R¨ oger (University of Basel) Theory of Computer Science May 4, 2020 20 / 32
Recommend
More recommend