Computation Histories




CS154

Chris Pollett

May 2, 2011

Outline

Reductions via Computation Histories

Consider the following language:
`R := { langle w, M, x rangle | \mbox{ w is the code of a sequence of configurations,}`
`mbox{ each configuration yielding the next according to}`
`mbox{ the transition table of TM M on input x.}`
`mbox{ Further, the last configuration is accepting}.}`

Formal Definition of a Computation History

Quiz

Which of the following is true?

  1. The complement of `A_{TM}` is decidable.
  2. A language which is both r.e. and co-r.e. is decidable.
  3. All languages are either r.e. or co-r.e.

Linear Bounded Automata

Strength of LBAs

A Useful Lemma about LBAs

Lemma. Let `M` be an LBA with `q` states and `g` symbols in the tape alphabet. There are exactly `qng^n` distinct configurations of M for a tape of length `n`.

Proof. A configuration consists of the state of the control of the LBA, the position of the tape head, and the contents of the tape. So there are `q` possibilities for the state, the head can be in one of at most `n` positions, each of the `n` tapes squares could have one of `g` symbols written in it (so `g^n` possibilities). All together this gives, `qng^n`.

Decidability and LBAs

Theorem. `A_{LBA}` is decidable.

Proof. The algorithm that decides `A_{LBA}` is as follows:
"`D =` On input `langle M, w rangle`, where `M` is an LBA and `w` is a string:

  1. Simulate `M` on `w` for `qng^n` steps or until it halts.
  2. If `M` has halted, accept if it accepted; and reject if it rejected. If it has not halted reject."

LBAs and Undecidability

In contrast to the last theorem above, not all problems about LBAs are decidable:

Theorem. `E_{LBA}` is undecidable.

Proof. The reduction is from `A_{TM}`. We show if `E_{LBA}` is decidable then `A_{TM}` also would be decidable. Suppose `R` is decision procedure for Let
`L={w | w mbox{ is a string of the form }C_1#C_2..#C_k
`\mbox{ giving a legal accepting computation history of M on input x}}`.
One can show that `L` can be recognized by an LBA; let's call it `B`. Further, if `L` is empty, `langle M, x rangle` is not in `A_{TM}`. So if `E_{LBA}` were decidable the following would be a decision procedure for `A_{TM}`:
`S =` " On input `langle M,w rangle`, where `M` is a TM and `w` is a string:

  1. Construct LBA `B` from `M` on `w` as described in the proof idea.
  2. Run `R` on input `langle B rangle`.
  3. If `R` rejects, accept; if `R` accepts, reject." Q.E.D.

In fact, `E_{LBA}` is Turing-complete for co-r.e. for essentially the same reasons as `E_{TM}` was.

`mbox{ALL}_{CFG}`

Theorem. `mbox{ALL}_{CFG}` is undecidable.

Proof. Assume `mbox{ALL}_{CFG}` is decidable by machine `N`, we will show how you could use this along with computation histories to decide `A_{TM}`. Recall for the `E_{LBA}` reduction we showed that an LBA can recognize the language:
`L = {w | w = C_1#C_2 ldots #C_k mbox{ is an accepting computation history }`
`mbox{of Turing Machine } M mbox{ on input } x}`.
This language is not context-free (can prove this using the Pumping lemma). The basic is we'd like to verify pairs of configurations to see one follows the next, but if we were using a PDA and tried to push the characters of `C_i` onto the stack then when we pop them off they'd be in the wrong order to do the verification. Let `u^R` denote the string consisting of the characters of `u` in reverse order. To solve our problem we redefine a computation history so it has the format `w = C_1#C_2^R#C_3 ldots #C_k`. Let `L` now mean the language before but with this definition...

More on `mbox{ALL}_{CFG}`

(Proof cont'd) of computation history, one can show there is a PDA that when given a string `w` can check:

  1. It does not start with `C_1`; or that,
  2. it does not end with an accepting configuration; or that,
  3. there is an `i` such that `C_i` does not properly yield `C_{i+1}`.

i.e., there is a PDA that can recognize the complement of `L`. We can convert this PDA to some CFG `G`. Now we can give a Turing Machine for `A_{TM}` as follows:

S="On input `langle M, x rangle` where `M` is a TM and `x` a string:

  1. Construct the CFG `G` from `M` and `x` to recognize `bar{L}`.
  2. Run `N` (our decision procedure for `ALL_{CFG}`) on `langle G rangle`
  3. If `N` rejects, accept; if `N` accepts, reject."