You are on page 1of 4
Proof Suppose L, is RE, Then L=H(M) for some TM M, Since the input alphabet of M is 2={0,1}, ie. M would be on the list of TM’s we have constructed, since it includes all TM’s with input alphabet {0,1}. Thus M is M, for at least one value of i, Let w, be the i-th string, i.e., w, isin binary (and on diagonal), Question: is w, ‘in L,? (i) Ifw, is in L,, then M, accepts w,. But then, by definition of Ly w, is not in L,, because L, contains only those w, (has value 1 in the table for L,'s row) such that M, does not accept w, (has value 0 in the table - negated diagonal 1). (ii) If, isnot in L,, then M, does not accept w,, Thus by definition of L,, w, is in L,, Since w, cannot be at the same time in L, and not to be in L,, we conclude that there is a contradiction of our assumption that M exist. That is L, is not RE. 9.6 UNIVERSAL TURING MACHINE (U) AND UNIVERSAL LANGUAGE (L,) Each Turing machine appears to be specialized at solving one particular problem. We know that we can ‘program’ computers to solve many different problems-they are general-purpose programmable machines Can we also ‘program’ a Turing machine? ‘Yes! We will show that there are TM’ Pf univers TM’s, that can be programmed to solve any problem that can be solved by any a ie machine. 9.6.1 Universal Turing Machine U: > Input to U: The encoding “M” of a TM M and the encoding “ww” of a string we D*, Behavior : U halts on input “M” “w” if and only if M halts on input w (U emulates M with input w). How do we encode a Turing machine as a string? ‘We require that there are no transitions from any of the halt states of om the halt state, a given TM is total. I their input strings |, B},-, 7, B,{g,})- input alphabet “ Scanned with CamScanner Uniecidability 9.13 q, = start state q, = final state Generic Move : 1. Wecall symbols 0, 1, B by X,. XX, respectively. 0 (ie) 0=X, 1=X, B=X, 2. The directions L and R are called by synonyms D,, D, respectively. (.e,) L=D, wv R=D, 3. The generic move. 5(gy X) = @ Xp D,) is encoded by the binary string has 0! 10/10" 10’ 10" ® A ‘The binary code of Turing Machine M is :. M11 code, $1 code, 11... 11 code, 111 .. where each code, is of the form(]) 4, Any such code of M is denoted by | - Note: (i) Each decoding is unique, (because no string of the form (1) has two 1's in a row, so code is found direétly. (ii) Ifa string fails to begin and end with exactly three 1's, the string represents no TM. (iii) The pair Mand w is represented bya string of the form (2) followed by w. It is denoted as 29.6 code for where M = ({9), 4» 4%}, (0,1), (0, 1, B}, 5, 9, B, (9,)) ve moves ; : wD=0R) — a PGi de Re os : Le” 1)= (9, 0,R) © = (Gy 11) (Nov/Dec 2003) Scanned with CamScanner ) ©. is represented as Solution : 1. We call tape symbols 0, 1, B by synonyms X,, X,, X, respectively. ie, O=X, =X, B=X, 2. We give directions L and R by synonyms D,, D, respectively. L=D, R=D, Generic move 6(g,, X,) = (gy, X,, D,) is encoded by binary string Oo 10 104 10! 10° tor Sepi +. for the given moves the binary coding is as follows: (4, 1) = (q, 0, R) it is of the form 5(g,. X,) = X,, D,) (because of synonyms) vs binary code is 0" 10? 10? 10" 10 Similarly for 8(g,, 0) = (q,, 1, R) is of form 8(95» X) = Gy X,, D,) binary code = 0°10'1010710? Similarly for 6(g,, 1) = (g,,0,R) is of form 5(9,.X,) = (4X, D,) binary code is 0"10°10710'10 Similarly for 8(9,,B) = (gy, 1, L) is of form B(Gs, X4) = Gy Xp D,) binary code is 0°10°10°10710! + binary code of TM is 111 code, 11 code, 11 code, 11 code, 111 Wa Scanned with CamScanner Undecidability Lp fh + SM, 1011> is represented as _// if i] 8 111 0100100010100 11 000101010010011 00010010010100 11 00010001000100101111011 / Construction of universal turing maching t It is easiest to describe the Universal Turing Machine U as a multitape TM with tapes operation (moves) described below: (i) Tape 1-keeps the transitions 6 of M encoded in binary, that is tape symbol | M is represented by 0/, and tape symbols will be separated by single 1’s a with the string w. ' (ii) Tape 2 - keeps a binary string w (input of M) where M’s 0’s are encoded a: I’s as 100, z ‘ (iii) Tape 3 - holds the state of M, with state q, Tepresented by i 0's, Other tapes are scratch tapes. The operation of U can be summarized as follows; (i) Examine the Tape 1 to make sure that the code for M is a legitimate cod some TM. If not, U halts without accepting. Since invalid codes are assume represent the TM with no moves, and sucha TM accepts no inputs, this acti correct. (ii) Initialize Tape 2 for the input string w where the blanks of M (encoded as 1 could be replaced by U’s own blank symbol. (iii) Place 0, as the start state of M, on Tape 3, and move the head of U’s second . _ to the first simulated cell. = To simulate amove of M, U searches on its first tape for a transition 0'10/10410 is the state on tape 3, and (is the tape symbol of M that begins a pe 2 scanned by U. This'transition 0/10/10" 10'10" is the or nake. U should; ne contents of tape 3 to 0" (next state). To do So, U first erase m tape 3 to blanks, and the copies 0* from tape 1 to tape 3. Yon tape 2 by O'; that is, change the tape symbol of M. If mo is needed (i.¢., #/), use the scratch tape and shift con the onaninn Scanned with CamScanner

You might also like