Complete Problems, More Reductions




CS154

Chris Pollett

Apr. 27, 2011

Outline

Complete Problems

Complete r.e. and NP problems

Theorem.

  1. `A_{TM}` is Turing-complete for r.e.
  2. `A_{\mbox{clocked TM}} := {\langle M, w, 1^t rangle | \mbox{M is a nondeterministic machine that accepts w in at most t steps} }` is Karp-complete for NP.

Proof. For (1), we already have show that `A_{TM}` is in r.e. (the set of recursively enumerable languages). Suppose `L` in r.e. is recognized by a machine `M`. The function `w -> langle M, w rangle` is Turing computable and `w in L` iff `langle M, w rangle in A_{TM}`. Therefore, `A_{TM}` is Turing-complete. For (2), we first show `A_{\mbox{clocked TM}}` is in NP. An nondeterministic algorithm to recognize this language is as follows: On input `\langle M, w, 1^t rangle`, nondeterministically guess a string `v` of length `t^2`, then verify that `v` codes a sequence of configurations of `M` of length `t`, the first being the start configuration of `M` on `w` and such that the `i+1`st configuration follows from the `i`th. If it does, and `M` accepts `w` then accept, else reject. Now suppose `L` is in NP. Then it can be decided by some nondeterministic machine `M` in time `p(n)` for some polynomial `p`. The function `w -> langle M, w, 1^{p(|w|)} rangle` is polynomial time computable and gives a reduction from `L` to `A_{\mbox{clocked TM}}`.

Emptiness Testing for TMs

A Problem about Regular Languages

Even problems about regular languages can sometimes be hard...

Let `\mbox{REGULAR}_{TM} = { \langle M \rangle | mbox {M is a TM and L(M) is a regular language}}`.

Theorem. `\mbox{REGULAR}_{TM}` is undecidable.

Proof. Suppose `R` decides `\mbox{REGULAR}_{TM}`. Then the following machine decides `A_{TM}`:
"`S =` On input `langle M,w rangle`, where `M` is a TM and `w` is a string:

  1. Construct the following machine `M'`:
    `M' = ''` On input `x`:
    If `x` has the form `0^n1^n`, accept.
    If `x` does not have this form, run `M` on input `w` and accept if `M` accepts `w`.
     // So if `M` accepts `w`, then `M'` accepts all strings; otherwise, `M'` only accepts strings of the form `0^n1^n`.' '
  2. Run `R` on input `langle M' rangle`.
  3. If `R` accepts, accept; otherwise, if `R` rejects, reject."

In the above, the map `langle M,w rangle -> langle M' rangle` can be viewed as a reduction from `\mbox{REGULAR}_{TM}` to `A_{TM}`.

Using reducibility from languages other than `A_{TM}`