=========================================================================== CSC 363 Lecture Summary for Week 5 Winter 2008 =========================================================================== Theorem 4.22 on pp.181-182: Language L is decidable iff both L and ~L are recognizable (recall ~L is complement of L). Proof idea: - If L decidable, then L recognizable (with decider M). Then, ~L recognizable by exchanging q_A, q_R in M. - If L and ~L recognizable, then L decidable by running recognizers for L and ~L in parallel (one step of each computation at a time) until one stops -- exactly one must accept eventually, so can always decide. (See proof in textbook for detailed version.) Theorem: A_TM is undecidable. Proof: - For contradiction, assume A_TM decidable, i.e., there is a TM S that accepts input if M accepts w, and rejects if M does not accept w (either because M rejects or loops). - Construct TM D that includes S as a "subroutine". On input , D runs S's instructions on >; if S accepts, D rejects; if S rejects, D accepts. In other words, D rejects input if M accepts input and D accepts input if M does not accept input . - What happens if we give as input to D? D should reject if D accepts input and D should accept if D does not accept input , i.e., D accepts input iff D does not accept input . - Contradiction! Hence, D cannot exist, which means S cannot exist, i.e., no TM can decide A_TM -- by the Church-Turing thesis, this means there is no general algorithm for solving this problem! ------------ Reducibility ------------ HALT_TM = { | M is a TM that halts on input w } is undecidable. Proof: For a contradiction, suppose HALT_TM has decider H, and consider: A = "On input : 1. Run H on . Reject if H rejects. Otherwise, 2. Simulate M on w. Accept if M accepts; reject if M rejects." Then, A accepts if M accepts w, and A rejects if M loops on w or if M rejects w, i.e., A decides A_TM, a contradiction. Hence, HALT_TM is undecidable. HALT_TM is recognizable (on input , simulate M on w and accept if M accepts or rejects), so this means ~HALT_TM is unrecognizable. Each of the following language is undecidable: - E_TM = { | M is a TM such that L(M) = {} }: Assume R decides E_TM, and construct S as follows: S = "On input : - Compute , the description of the following TM: Q = "On input x: - Ignore x and simulate M on w; accept if M accepts; reject if M rejects." - Run R on input and do the opposite (if R accepts, reject; if R rejects, accept)." Then S accepts iff R rejects iff L(Q) != {} iff L(Q) = \Sigma* (by construction, either Q accepts all strings or Q accepts no string) iff M accepts w. Moreover, S always halts because R always halts. Hence, S decides A_TM, a contradiction! - EQ_TM = { | M_1 and M_2 are TMs such that L(M_1) = L(M_2) }: Assume R decides EQ_TM and construct S as follows: S = "On input : - Compute , the description of the following TM: M' = "On input x: reject." - Run R on input and do the same." Then S decides E_TM, a contradiction. -------------------- Mapping Reducibility -------------------- General structure of proof of undecidability of some language B, so far: Assume R decides B. Construct S to decide A (some undecidable language): S = "On input x: - Compute y such that y (- B iff x (- A. - Run R on y and do the same." Then, S decides B because R always halts and y (- B iff x (- A. Since structure always the same, concentrate on "core" part: construction of y from x such that y (- B iff x (- A. [Lecture ended early because of bad weather... continued next week!]