=========================================================================== CSC 363 Lecture Summary for Week 5 Fall 2009 =========================================================================== Undecidable languages, cont'd: - 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 -------------------- Generic 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_x such that y_x (- B iff x (- A. - Run R on y_x and do the same." Then, S decides B because R always halts and y_x (- B iff x (- A. Since structure always the same, concentrate on "core" part: construction of y_x from x such that y_x (- B iff x (- A. Definition 5.20: A <=m B (A is "mapping reducible" to B) if there exists computable function f : \Sigma* -> \Sigma* (the "reduction") such that \-/ w (- \Sigma*, w (- A iff f(w) (- B. We've already seen definition of "computable" for functions. Note implicit assumption: both A and B are languages over the same alphabet \Sigma -- not restrictive because we can always consider union of alphabets. Example 5.26: E_TM <=m EQ_TM. Given , construct as follows: M_1 = M, M_2 = "On input x: reject." Clearly, this is computable (copy string, append constant string) -- careful: we are talking about computing *description* from *description* ; we are not claiming that it is computable to decide whether or not L(M) = {} or whether or not L(M_1) = L(M_2)! Moreover, since L(M_1) = L(M) and L(M_2) = {}, (- E_TM iff L(M) = {} iff L(M_1) = L(M_2) iff (- EQ_TM. Technically, input for E_TM is string x which may not be in the form for some TM M -- in that case, output y = garbage. This preserves the property x (- E_TM iff y (- EQ_TM. Theorem 5.22: If A <=m B and B is decidable, then A is decidable. Proof: (see textbook -- done in lecture) Theorem 5.28: If A <=m B and B is recognizable, then A is recognizable. Proof: (see textbook -- done in lecture) Corollary 5.23: If A <=m B and A is undecidable, then B is undecidable. Corollary 5.29: If A <=m B and A is unrecognizable, then B is unrecognizable. Properties: - A <=m B iff ~A <=m ~B. (Straight from definition, since statement "w (- A iff f(w) (- B" is equivalent to "w !(- A iff f(w) !(- B" and "w !(- L" = "w (- ~L" for any language L.) - If A <=m B and B <=m C, then A <=m C. (Easy exercise, based on function composition: if f,g computable, then g(f()) computable.) Examples: - A_TM <=m HALT_TM: different from "informal" reduction used to prove HALT_TM undecidable. Given , construct such that M accepts w ( (- A_TM) iff M' halts on w' ( (- HALT_TM), as follows: M' = M except replace all transitions to q_R with transition to state q_L (not in M), then add transitions from q_L to q_L for each input symbol (q_L is deliberate infinite loop) w' = w Clearly, this is computable -- again, the *description* of is computable from the *description* of , but we make no claim about the computability of deciding (- A_TM or (- HALT_TM. Moreover, if M accepts w, then M' accepts w'; if M rejects w, then M' loops on w'; if M loops on w, then M' loops on w', i.e., M accepts w iff M' halts on w', as desired.