This preview shows pages 1–13. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: 1 More About Turing Machines Programming Tricks Restrictions Extensions Closure Properties 2 Overview At first, the TM doesnt look very powerful. Can it really do anything a computer can? Well discuss programming tricks to convince you that it can simulate a real computer. 3 Overview (2) We need to study restrictions on the basic TM model (e.g., tapes infinite in only one direction). Assuming a restricted form makes it easier to talk about simulating arbitrary TMs. Thats essential to exhibit a language that is not recursively enumerable. 4 Overview (3) We also need to study generalizations of the basic model. Needed to argue there is no more powerful model of what it means to compute. Example : A nondeterministic TM with 50 sixdimensional tapes is no more powerful than the basic model. 5 Programming Trick : Multiple Tracks Think of tape symbols as vectors with k components. Each component chosen from a finite alphabet. Makes the tape appear to have k tracks. Let input symbols be blank in all but one track. 6 Picture of Multiple Tracks q X Y Z Represents one symbol [X,Y,Z] B B Represents input symbol 0 B B B Represents the blank 7 Programming Trick : Marking A common use for an extra track is to mark certain positions. Almost all cells hold B (blank) in this track, but several hold special symbols (marks) that allow the TM to find particular places on the tape. 8 Marking q X Y B Z B W Marked Y Unmarked W and Z 9 Programming Trick : Caching in the State The state can also be a vector. First component is the control state. Other components hold data from a finite alphabet. 10 Example : Using These Tricks This TM doesnt do anything terribly useful; it copies its input w infinitely. Control states: q: Mark your position and remember the input symbol seen. p: Run right, remembering the symbol and looking for a blank. Deposit symbol. r: Run left, looking for the mark. 11 Example (2) States have the form [x, Y], where x is q, p, or r and Y is 0, 1, or B. Only p uses 0 and 1. Tape symbols have the form [U, V]. U is either X (the mark) or B. V is 0, 1 (the input symbols) or B. [B, B] is the TM blank; [B, 0] and [B, 1] are the inputs. 12 The Transition Function Convention : a and b each stand for either 0 or 1. ([q,B], [B,a]) = ([p,a], [X,a], R)....
View
Full
Document
This note was uploaded on 03/30/2012 for the course CS 154 taught by Professor Motwani,r during the Spring '08 term at Stanford.
 Spring '08
 Motwani,R

Click to edit the document details