* Self-reproducibility * Recursion Theorem * Applications of the Recursion Theorem SELF-REFERENCE AND SELF-REPRODUCIBILITY Lemma: There is a computable function q: Sigma^* -> Sigma^*, where, for any string w, q(w) is the description of a Turing machine P_w that prints out w and halts. Proof: On input w, construct the following machine P_w: on input x, print w, halt; and return . End Proof SELF = TM that ignores its input and prints out a copy of its own description. SELF = A = P_ B = "On input , where M is a portion of a TM: 1. Compute q(). 2. Combine the result with to make a complete TM description. 3. Print this description and halt." RECURSION THEOREM Theorem: Let T be a Turing machine that computes a function: Sigma^* x Sigma^* -> Sigma^*. There is a Turing machine R that computes a function r: Sigma^* -> Sigma^*, where for every w: r(w) = T(, w) Proof: We construct R in three parts, A, B and T. A is the TM P_{} described by q(). So the outcome of A is on the tape. Then B applies q() to obtain . Then, B combines A, B, and T into a single machine -- it has a description of all three into a single machine and passes to T. End Proof The recursion theorem can be viewed as a fixed point theorem. One way to think about it is that R is a fixed point for T. The recursion theorem allows us to construct TM Ms that access their own description and compute with them. How? Suppose the computation is given by T. Then the recursion theorem shows how to construct R that on input w, computes T(, w). Thus, R is the desired TM. APPLICATIONS Theorem: A_TM is undecidable. Proof: Suppose A_TM is decidable, and let M be the associated decider. Construct the following TM S. On input w: 1. Get description of self . 2. Call M(,w). 3. If M accepts, reject; else accept. Consider S on any input w. S accepts w iff M says that M does not accept w. A contradiction. End Proof MIN_TM = {: M is the TM with smallest description whose language is L(M)} Theorem: MIN_TM is not Turing-recognizable. Proof: Suppose there is an enumerator for MIN_TM. Then, consider the following machine C. On input w: 1. Get self description . 2. Call the enumerator E and find the first TM D that has size larger than . 3. Simulate D on w. L(C) = L(D), yet < , a contradiction to D's membership in MIN_TM. End Proof