Decidability, UTMs, and Diagonalization




CS154

Chris Pollett

Apr. 20, 2011

Outline

Decidability and Encodings

More Decidability

Universal Turing Machines -- Take 1

Universal Turing Machines -- Take 2

Sizes of Sets

Diagonalization

Example Use of the Diagonalization Theorem

Corollary. A countable set `A` is not the same size as its `P(A)`.

Proof. Let `f:A -> P(A)` be a supposed bijection. Since `A` is countable, we have some function `a(k)` to list out its elements `a(0), a(1), a(2), ldots`. An element `X={a(2), a(5), ldots} in P(A)` can be view as an binary sequence `(0, 0, 1, 0, 0, 1, ldots)` where we have a `1` if `a(i)` is in `X` and a 0 otherwise. So `f` satisfies the Diagonalization theorem. A complement of the diagonal for `f` will still be in `P(A)` but not mapped to by `f`.

Non-Recursively Enumerable Languages

Another corollary to the Diagonalization Theorem is the following (recall Turing Recognizable, recursively enumerable, and computably enumerable all mean the same thing):

Corollary. Some languages are not recursive enumerable.

Proof. The set of infinite sequences over `{0,1}` is uncountable, as we just indicated in the last proof there is a bijection between this set and `P(NN)`. On the other hand, each encoding `langle M rangle` of a Turing Machine is a finite string over a finite alphabet. The set of finite strings over an alphabet is countable: a map from the natural numbers first maps to strings of length `0` in lex order, then strings of length `1`, etc.

`A_{TM}` is not Recursive

Theorem. The language `A_{TM}={ langle M,w rangle | mbox{M is a TM and M accepts w}}` is not recursive.

Proof. Suppose `A` is a decider for `A_{TM}`. Fix `M_i` and consider `w's` of the form `langle M_j rangle` for some other TM, `M_j`. Then listing out encodings of TM's in lex order `langle M_0 rangle, langle M_1 rangle, ldots` we can create an infinite binary sequence where we have a `1` in the `j`th slot if `langle M_j rangle` causes `M_i` to halt and a `0` otherwise. If `A` is a decider for `A_{TM}` then we can consider a variant on the complement of the diagonal of the map
`f: langle M_i rangle |-> (A(langle M_i,langle M_0 rangle), A(langle M_i, langle M_1 rangle rangle), ldots)`.
In particular, we can let `D` be the machine:
`D=`"On input `langle M rangle`, where `M` is a TM:

Since `A` is supposed to be a decision procedure for `A_{TM}`, `A` halts on all inputs. Now consider `D(langle D rangle)`. Machine `D` halts if and only if `A` on input `langle D, langle D rangle rangle` rejects. But `A` on input `langle D, langle D rangle rangle` rejects means that `D` did not halt on input `langle D rangle`. This is contradictory. A similar argument can be made about if `D` does not halt `langle D rangle`. Since assuming the existence of `A` leads to a contradiction, hence `A` must not exist. Q.E.D.

Another way to look at this is if you give an `A` which purports to be a decider for `A_{TM}` then we can give a specific input, `langle D, langle D rangle rangle`, which is calculated based on `A` on which `A` fails.