Friday Jan 25, 2008 * Formalizing reductions * Post's Correspondence Problem FORMALIZING REDUCTIONS In our proofs of undecidability, we have used a notion of reduction. Reducing problem A to B means showing how to solve an instance of A using an algorithm for B. There are two most common notions of reductions. (1) Many-one reductions. One is what is called many-one reduction (mapping reduction according to Sipser). In this reduction, we solve a given instance of A by applying the algorithm of B to at most one instance of B. Formally, A is many-one reducible to B or A <=m B, if there exists a computable function f: A -> B that reduces yes-instances of A to yes-instances of B. That is, w is in A iff f(w) is in B. What is a "computable function"? f: Sigma^* -> Sigma^* is Turing-computable if there exists a Turing machine that takes a string w and halts with f(w) on its tape. (2) Turing reductions: In a Turing reduction from A to B, we are given an algorithm (oracle) for B and we solve the given instance of A by invoking the algorithm for B any number of times. A is Turing-reducible to B if there is a Turing machine that has access to an oracle for B and accepts w iff w is in A. We have thus far used the notion of many-one reductions. Theorem: If A <=m B and B is decidable, then A is decidable. Proof: The TM for A uses the TM for f to compute f(w) passes that to the TM for B and accepts of B accepts, rejects otherwise. End Proof Corollary: If A <= m B and A is undecidable, then B is undecidable. Theorem: If A <=m B and B is Turing-recognizable, then A is Turing-recognizable. Proof: The TM for A uses the TM for f to compute f(w) passes that to the TM for B and accepts of B accepts. End Proof Corollary: If A <= m B and A is not Turing-recognizable, then B is not Turing-recognizable. Note that not all reductions use <= m. In the proof of the undecidability of ALL_CFG, what reduction did we do. We showed that if X is a decider for ALL_CFG then we can construct a decider Y for A_TM with the following property. Y accepts iff X rejects the PDA that accepts all strings except the accepting computation history. So, in effect, we mapped an instance of A_TM to an instance (PDA) of COMP(ALL_CFG). Our reduction was therefore: A_TM <=m COMP(ALL_CFG) So we have COMP(ALL_CFG) is undecidable. Since decidability is closed under complementation, we have that ALL_CFG is decidable. POST CORRESPONDENCE PROBLEM A combinatorial problem that we will prove is undecidable. An instance of PCP is a collection of domino. t_1, t_2, ..., t_n --- --- --- b_1 b_2 b_n The goal is to determine whether there exists a sequence i_1, i_2, ..., i_k such that t_{i_1}t_{i_2}...t_{i_k} = b_{i_1}b_{i_2}...b_{i_k}. Consider the instance. ab b aba aa ---- -- --- -- abab a b a Is there a match? ab|ab|aba|b|b|aa|aa abab|abab|b|a|a|a|a Note that there is no bound on how often a domino can be used. Suppose we placed such a bound. Is the problem decidable? Theorem: PCP is undecidable. Proof: Reduction from A_TM. In particular, we will construct a PCP instance such that the instance will have a match iff M accepts w. In the match, the top and bottom will correspond to the accepting computation history of M on w. We will consider a modified problem in which we require a particular domino to be the first domino. Wlog, we assume that M does not try to move left beyond the left-end of the tape. We can always alter M to prevent this behavior by, for example, putting a special mark on the first tape cell. 1. Put [#/#q_0w_1w_2...w_n#] as the first domino [t_1/b_1]. So the goal of the matching process is to get C_1 into the top slot. We want C_2 into the bottom slot. So we introduce the following dominos capturing the transitions. 2. For every a, b in Gamma, and q, r in Q, if d(q, a) = (r, b, R), then include [qa/br]. 3. For every a, b in Gamma, and q, r in Q, if d(q, a) = (r, b, L), then include [cqa/rcb]. 4. For every a in Gamma, include [a/a]. Note that to get C_1 into the top slot, the match has to introduce C_2 into the bottom slot. Why can it not simply copy C_1 to both top and bottom? (Because there is no [q/q] domino.) If the tape head goes to the write, then we need to allow a blank cell to be added. Note that [u/u] is already included in part 4. 5. Include [#/#] and [#/u#]. Once we have an accepting configuration in the bottom, we need to have the top of the match catch up. 6. Include [aq_accept/q_accept] and [q_accepta/q_accept] for all a in Gamma. The following is for the last #. 7. Include [q_accept##/#]. Example: Suppose w = 0110, and we have d(q_0,0) = (q_2, 1, R), d(q_2, 1) = (q_5, 0, R), d(q_5, 1) = (q_1, 1, L), and d(q_1, 0) = (q_a, 0, R). The computation history is as follows. #q_00110#1q_2110#10q_510#1q_1010#10q_a10# The match is given by: #|q_00|1|1|0|#|1|q_21|1|0|#|1|0q_51|0|#|1|q_10|1|0|#|1|0|q_a1|0|#|... #q_00110#|1q_2|1|1|0|#|1|0q_5|1|0|#|1|q_101|0|#|1|0q_a|1|0|#|1|0|q_a|0|#| How do we remove the requirement that the first domino be the specific one? By adding special characters in such a way that any match has to start with that domino. (Similar to the 4-domino example we worked with.) If P' is {[t_1/b_1], [t_2/b_2], ..., [t_n/b_n]}, replace by P. {[*t_1/*b_1*], [*t_2/b_2*], [*t_3/b_3*], ...[*t_n/b_n*], [*&/&]} End Proof Historical notes: Emil Post introduced this problem in 1946. First combinatorial problem that was shown to be undecidable. Undecidable even if the number of dominos <= 7. Decidable if the number of dominos = 2.