PCP, Rice's Theorem




CS154

Chris Pollett

May 1, 2013

Outline

Post Correspondence Problem

Undecidability of PCP.

Theorem (Post 1946). PCP is undecidable.

Proof. We show via computation histories that if `PCP` is decidable so is `A_{TM}`, thus giving a contradiction. Given an input `langle M, w rangle` for `A_{TM}` we will construct an instance of `PCP` which will have a match iff `M` accepts `w`. Further, the string of the match which be an accepting computation history of `M` on `w`. To simplify our problem we will consider the following modifications to `A_{TM}` and `PCP`:

  1. We assume `M` on input `w` never tries to move left off the tape.
  2. If `w = epsilon`, we use the string `square` in place of `w` in the construction.
  3. We modify `PCP` to require that a match starts with the first domino.

More Undecidability of PCP

Call the instance of `PCP` that we are building `P`.

1. Put `[#| #q_0 w_1 ldots w_n #]` as the first domino of the `PCP` instance. Playing this domino first will force the string to look like an initial configuration of `M` on `w`.

Next we add dominos to handle the part of the configuration where that the TM might change.

2. For every `a, b` in the tape alphabet, and every states `q, r` of `M` where `q ne q_{mbox{reject}}`, if `delta(q, a) = (r, b, R)`, we put `[qa | br]` into `P`.

3. For every `a, b, c` in the tape alphabet and every states `q, r` in `M` where `q ne q_{mbox{reject}}`, if `delta(q, a) = (r, b, L)`, we put `[cqa | rcb]` into `P`.

Next we add dominos to copy the unchanged parts of configurations and to copy the end of configuration markers

4. For every `a` in the tape alphabet, we put `[a | a]` into `P`.

5. Put `[#|#]` and `[#|square #]` into `P`. (The second is to simulate the case where the size of a configuration grows).

Lastly, we add dominos so that once we get to an accept state, we have a sequence of configurations with an ever smaller number of squares so we can catch up the top row with the bottom row:

6. For every tape symbol `a` we have dominos `[aq_{mbox{accept}} | q_{mbox{accept}} ]` and `[q_{mbox{accept}}a | q_{mbox{accept}} ]` and to complete the match we have `[q_{mbox{accept}}## |#]`

Examples of these Dominos

Eliminating the First Domino Condition

End of the PCP reduction

Homework Problems (Sec1 - Prob 1,3), (Sec 3 - Prob 1,4)

Problem 2 is in the book.

Problem 1. Explicitly write down a function `f:{0,1,2,3,4} -> P({0,1,2,3,4})` of your choice but not the identity function. Then write down the complement of the diagonal for your function.

Answer. By not the identity function, I meant not the function `f(i) = {i}`, so let's consider the following `f` instead:

`f(0) = {0,1}`,
`f(1) = {0,1,4}`,
`f(2) = {1,2,3}`,
`f(3)={0,1,2,3,4}`,
`f(4) ={}`.

Viewing elements of the power set as sequences, this gives the following five sequences:

(1, 1, 0, 0, 0),
(1, 1, 0, 0, 1),
(0, 1, 1, 1, 0),
(1, 1, 1, 1, 1),
(0, 0, 0, 0, 0)

where the diagonal has been bolded. Hence, a complement of the diagonal would be the sequence: (0,0,0,0,1) which corresponds to the set `{4}`.

Problem 3. Define `\mbox{Sub-HALT}_{TM} = { langle M, w rangle | \mbox{M is a TM and there is a substring v of w on which M will halt}}`. Give a many-one reduction of `\mbox{HALT}_{TM}` to `\mbox{Sub-HALT}_{TM}`.

Answer. We want a Turing computable function:

`f: langle M, w rangle mapsto langle M', w' rangle`

such that `langle M, w rangle in \mbox{HALT}_{TM}` iff `langle M', w' rangle in \mbox{Sub-HALT}_{TM}`. First, we can build a machine `f` that on inputs not of the form `langle M, w rangle` is just the identity function (a Turing computable thing to check)-- since the input is not of the correct form, it won't be in either language. Suppose now our machine for `f` has checked the input and it is s in the correct format. Certainly, if langle `M, w rangle in \mbox{HALT}_{TM}` then `langle M, w rangle in \mbox{Sub-HALT}_{TM}` since `w` is a substring of `w`. But it might be the case that `M` on `w` doesn't halt, but there is a substring `v` of `w` on which `M` does halt. However, since `f` is given the string `w` as an input, it can do things like build the machine `M''` which checks whether its input is `w` and if not run forever; otherwise, accept. Let `M'` be the machine that runs `M''`. If `M''` is about to accept, it then runs `M` on input `w`. The map:

`f: langle M, w rangle mapsto langle M', w rangle`

is Turing computable and the only substring of `w` on which `M'` might halt is the string `w`. Further, it halts on `w` iff `M` halts on `w`. Thus, this `f` gives the desired reduction.

Problem 4. Show `\mbox(EQ)_(LBA) = { langle M, M' rangle | \mbox{M and M' are LBAs with the same language}}` is undecidable.

Answer. It suffices to show some undecidable problem is reducible to `\mbox(EQ)_(LBA)` to show `\mbox(EQ)_(LBA)` is undecidable. In this case, we give a reduction from `\mbox(E)_(LBA)` which we showed was undecidable in class. Let `M_2` be the LBA that halts on any input rejecting (this obviously does not need to moves it tape head off its input, so is in fact an LBA). Given an instance `langle M rangle` consider the function:

`f: langle M rangle mapsto langle M, M_2 rangle`.

This function involves tacking a fixed string onto the string `langle M rangle`, so will be Turing computable. If `langle M rangle in \mbox(E)_(LBA)` then `M`'s language is empty and so `M` will have the same language as `M_2` and hence `langle M, M_2 rangle in \mbox(EQ)_(LBA)`. On the other hand, if `langle M rangle !in \mbox(E)_(LBA)` then `M` won't have the same language as `M_2`, so `langle M, M_2 rangle !in \mbox(EQ)_(LBA)`. Therefore, the function `f` gives us the desired reduction from `\mbox(E)_(LBA)` to `\mbox(EQ)_(LBA)`.

PCP Remarks

Rice's Theorem

Rice's theorem (Transactions AMS, 1953) shows that almost any problem one could come up with connected to Turing Machines is undecidable.

Theorem. Let `P` be a language such that there exists TM descriptions `langle M rangle in P` and ` langle M' rangle !in P`. Further assume that whenever we have two machines `M_1` and `M_2` such that `L(M_1) = L(M_2)`, then we have `langle M_1 rangle in P` iff `langle M_2 rangle in P`. Then `P` is undecidable.

Proof. Suppose we had a decider `R` for `P`. We show how to use `R` to build a decider for `A_{TM}`. Let `T_{emptyset}` be a TM which always rejects, so `L(T_{emptyset}) = emptyset`. We may assume `T_{emptyset} !in P`; otherwise, we carry out our argument using `bar P`. Because `P` is not trivial there exists a TM `T` with `T in P`. Using this machine consider the following decider `S` for `A_{TM}`:
`S =` "On input `langle M, w rangle`:

  1. Use `M` and `w` to construct the following TM `M_w` :
    `M_w =` "On input `x`:
    1. Simulate `M` on `w`. If it halts and reject, reject. If it accepts, proceed to Stage 2.
    2. Simulate `T` on `x`. If it accepts, accept."
  2. Use TM `R` to determine whether `langle M_w rangle in P`. If yes, accept. If no, reject."

Example Use of Rice's Theorem

Rice's Theorem Remarks