
Turing machines within Turing machines! Descriptions of Turing Machines It is possible to write down any Turing machine as a sequence of zeros and ones. This sequence describes everything about the Turing machine that we mentioned earlier – Q, A and δ. We call this the description of the Turing machine. We abbreviate “the description of Turing machine M” as just “<M>#. 'niversal Turing Machines( Alan Turing proved the e*istence of a “'niversal Turing Machine# +let,s call it U). The 'niversal Turing Machine simulates other Turing machines. U takes as its input the description of any Turing machine <M> followed by any input x. We call U the “Universal Turing Machine” because it can then simulate what M would do when M runs on the input x. U(%M> x- produces e*actly the same output as M+*-. '+%M> x- = M(*- The 0alting 1roblem( when Turingception goes wrong 2emember how Turing machines can sometimes loop. Wouldn,t it be cool if we had a program which can look at our programs and see if they have infinite loops3 This is called the Halting 1roblem. HALT is the language of all Turing machines + inputs that halt. 5uppose we have a program which can do this. Let,s call it P. It turns out that P cannot e*ist. The reason for this is again devious. We set up a program Q which contains a description of P and uses that to do the e*act opposite of whatever P predicts Q does( Q is something that P analyzes incorrectly so P cannot e*ist. There is no Turing machine that can decide HALT! The Halting Problem is undecidable. Note that if we could solve the Halting Problem, mathematicians would be out of a job. 2ead Scooping the Loop Snooper! SCOOPING THE LOOP-SNOOPER A proof that the Halting Problem is unde!idable Geoffre" K$ Pullum No general pro!e ure for bug che!%s will do$ If P(s ans&er is ‘Ba 1(' 4 will su enl" stop$ No&' I won(t just assert that, I(ll pro*e it to you$ But other&ise' 4 will go ba!% to the top' I will pro*e that although you might work till you drop' an start off again' looping en lessl" ba!%' "ou cannot tell if computation will stop$ till the uni*erse dies an turns fro5en an bla!%$ +or imagine we ha*e a pro!e ure calle P An this program calle 4 woul n(t sta" on the shelf; that for spe!ifie input permits you to see I woul as% it to fore!ast its run on itself$ &hether spe!ifie source co e' with all of its faults' 3hen it rea s its o&n source co e' just what will it do7 efines a routine that e*entuall" halts$ 3hat’s the looping beha*ior of 4 run on 47 ,ou fee in your program' with suitable data' If P warns of infinite loops' 4 will quit; an P gets to work' an a little while later "et P is suppose to spea% trul" of it! (in finite compute time) corre!tl" infers An if 4(s going to quit, then P shoul sa" ‘Goo $( &hether infinite looping beha*ior o!!urs$ 3hi!h ma%es 4 start to loop1 (P denie that it woul $) If there will be no looping' then P prints out ‘Goo $( No matter ho& P might perform' 4 will s!oop it: That means work on this input will halt, as it shoul $ 4 uses P(s output to ma%e P loo% stupi $ But if it dete!ts an unstoppable loop' 3hate*er P sa"s' it cannot pre i!t 49 then P reports ‘Ba 1( — whi!h means you(re in the soup$ P is right when it’s wrong' an is false when it’s true1 3ell' the truth is that P cannot possibl" be' I(*e create a para o:' neat as can be — be!ause if you wrote it an ga*e it to me' an simpl" b" using your putati*e P$ I coul use it to set up a logi!al bin 3hen you posite P you steppe into a snare6 that woul shatter your reason an s!ramble your min $ ,our assumption has le you right into m" lair. Here(s the tri!% that I(ll use — an it’s simple to do$ So where can this argument possibl" go7 I(ll define a pro!e ure' whi!h I will call 4' I don(t ha*e to tell you6 I(m sure you must kno&$ that will use P(s pre i!tions of halting su!!ess A re u!tio9 There cannot possibl" be to stir up a terrible logi!al mess$ a pro!e ure that a!ts li%e the m"thi!al P$ +or a spe!ifie program' sa" A' one supplies' ,ou can ne*er fin general me!hani!al means the first step of this program calle 4 I de*ise for pre i!ting the a!ts of computing ma!hines6 is to fin out from P what’s the right thing to sa" it’s something that cannot be done$ So we users of the looping beha*ior of A run on A$ must fin our o&n bugs$ Our computers are losers1.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages2 Page
-
File Size-