The Timpson Lyceum seal

The Timpson Lyceum · Computation Theory

Lecture 17 (Computation Theory) Reducibility and Undecidable Problems

Overview

This lecture introduces reducibility, the central technique for proving that problems about Turing machines are undecidable. We begin by reviewing the proof that the acceptance problem ATMA_{TM} is undecidable, then prove that a language is decidable exactly when both it and its complement are recognizable — which lets us exhibit our first non-recognizable language, ATM‾\overline{A_{TM}}. The heart of the lecture is the reduction method: if we can convert the acceptance problem into another problem BB, then BB must be undecidable too, because a solver for BB would solve the impossible ATMA_{TM}. We apply this to the halting, emptiness, and regularity problems, and finally prove Rice's theorem, which shows that every non-trivial property of a Turing machine's language is undecidable.

Key Concepts

The acceptance problem. ATM={⟨M,w⟩∣M is a Turing machine that accepts w}A_{TM} = \{\langle M, w\rangle \mid M \text{ is a Turing machine that accepts } w\}. This language is undecidable: no Turing machine can, for every ⟨M,w⟩\langle M, w\rangle, halt and correctly say whether MM accepts ww. The proof assumes a decider HH for ATMA_{TM} exists, builds a machine DD that does the opposite of HH on its own input, and derives the contradiction that DD accepts ⟨D⟩\langle D\rangle if and only if it does not.

Decidable vs. recognizable.

Decidability theorem. A language AA is decidable if and only if both AA and its complement A‾\overline{A} are recognizable. (⇒\Rightarrow) A decider for AA already recognizes AA, and flipping its accept/reject behaviour recognizes A‾\overline{A}. (⇐\Leftarrow) Given recognizers M1M_1 for AA and M2M_2 for A‾\overline{A}, run them in parallel (alternating one step each) on input ww; since ww lies in exactly one of AA, A‾\overline{A}, one machine must eventually halt — accept if M1M_1 accepts, reject if M2M_2 accepts.

Co-recognizable. A language is co-recognizable if its complement is recognizable. ATM‾\overline{A_{TM}} is not even recognizable: if it were, then ATMA_{TM} (which is recognizable) and ATM‾\overline{A_{TM}} would both be recognizable, making ATMA_{TM} decidable — a contradiction. A language is decidable exactly where recognizable and co-recognizable overlap.

Reducibility. A reduction from problem AA to problem BB is a conversion such that any solution to BB yields a solution to AA, written A≤BA \le B. Logically, "AA reduces to BB" means (solution to BB) ⇒\Rightarrow (solution to AA); the contrapositive is (AA unsolvable) ⇒\Rightarrow (BB unsolvable). So to prove BB undecidable, reduce a known-undecidable problem (usually ATMA_{TM}) to BB. Example: finding a rectangle's area reduces to finding its length and width — knowing length and width gives the area (but not conversely).

Problems proved undecidable by reduction.

Rice's theorem. Let PP be any non-trivial property of a Turing machine's language — formally, a set of machine descriptions such that (i) two machines with the same language are both in PP or both out (it is a property of the language, not the machine), (ii) at least one machine is in PP, and (iii) at least one is out. Then PP is undecidable. Informally: anything interesting you might want to know about the language a Turing machine recognizes is undecidable. Note properties of the machine itself (e.g. "has 28 states") are not language properties and are not covered.

Worked Example

Proof of Rice's theorem (reduction from ATMA_{TM}). Let PP be non-trivial, with some machine T∈PT \in P. Let T∅T_\varnothing be a machine with L(T∅)=∅L(T_\varnothing) = \varnothing; without loss of generality assume T∅∉PT_\varnothing \notin P (otherwise work with P‾\overline{P}, since PP is decidable iff P‾\overline{P} is). Assume for contradiction RR decides PP. Build SS deciding ATMA_{TM}: on input ⟨M,w⟩\langle M, w\rangle, construct

M1 on input x:run M on w; reject if M rejects,otherwise run x on T and accept if T accepts.\begin{aligned} M_1 \text{ on input } x:\quad & \text{run } M \text{ on } w;\ \text{reject if } M \text{ rejects},\\ & \text{otherwise run } x \text{ on } T \text{ and accept if } T \text{ accepts}. \end{aligned}

Tracing the language of M1M_1 against the property PP:

M accepts w  ⟺  L(M1)=L(T)  ⟺  ⟨M1⟩∈P,M does not accept w  ⟺  L(M1)=∅=L(T∅)  ⟺  ⟨M1⟩∉P.\begin{aligned} M \text{ accepts } w \;&\Longleftrightarrow\; L(M_1) = L(T) \;\Longleftrightarrow\; \langle M_1\rangle \in P,\\ M \text{ does not accept } w \;&\Longleftrightarrow\; L(M_1) = \varnothing = L(T_\varnothing) \;\Longleftrightarrow\; \langle M_1\rangle \notin P. \end{aligned}

So SS runs RR on ⟨M1⟩\langle M_1\rangle: accept if RR accepts (then MM accepts ww), reject if RR rejects. This decides ATMA_{TM} — a contradiction. Hence no such RR exists and PP is undecidable. ■\blacksquare

A second reduction (equality problem, reducing to emptiness). The equality problem EQTM={⟨M1,M2⟩∣L(M1)=L(M2)}EQ_{TM} = \{\langle M_1, M_2\rangle \mid L(M_1) = L(M_2)\} is undecidable. Assume RR decides it and build SS deciding emptiness: on input ⟨M⟩\langle M\rangle, let M∅M_\varnothing be a machine with L(M∅)=∅L(M_\varnothing) = \varnothing, and observe

L(M)=L(M∅)  ⟺  L(M)=∅.\begin{aligned} L(M) = L(M_\varnothing) \;&\Longleftrightarrow\; L(M) = \varnothing. \end{aligned}

Run RR on ⟨M,M∅⟩\langle M, M_\varnothing\rangle and copy its answer; this decides emptiness, which is impossible. Hence EQTMEQ_{TM} is undecidable.

Summary