CSCI 2670 Introduction to Theory of Computing October

CSCI 2670 Introduction to Theory of Computing October 13, 2004 Agenda Yesterday Variants of Turing machines Allow stay put state Multiple tapes Nondeterministic Today Prove equivalence of deterministic and nondeterministic Turing machines Enumerators October 13, 2004

2 Announcements Quiz tomorrow High-level description of TM Trace through a TMs operation Tape notation & configuration notation High-level description of equivalences Reminder: tutorial sessions are back Office hours return to normal Tuesday 3:00 4:00 Wednesday 3:00 4:00 October 13, 2004 3

Nondeterministic Turing machines Same as standard Turing machines, but may have one of several choices at any point : Q P(Q {L,R})L,R})) October 13, 2004 4 Equivalence of machines Theorem: Every nondeterministic Turing machine has an equivalent deterministic Turing machine Proof method: construction Proof idea: Use a 3-tape Turing machine to deterministically

simulate the nondeterministic TM. First tape keeps copy of input, second tape is computation tape, third tape keeps track of choices. October 13, 2004 5 Proof idea M 0 1 0 1 ~ ~~ ~ Input tape never changes a a # 0 1 ~ ~ ~

Computation tape 1 1 2 1 3~ ~ ~ Decision path Try new decision paths until the string is accepted October 13, 2004 6 Intuition Consider the nondeterministic calculations as a tree Each node represents a configuration A node for configuration C1 has one

child for each configuration C2 such that C1 yields C2 Root of tree is configuration q1w A configuration may appear more than once in the tree October 13, 2004 7 Example Nondeterministic TM that accepts {L,R})ww | w {L,R})a,b})*}}) Use 2 tapes Copy input to tape 2 Position heads at beginning of tapes Move both heads right simultaneously October 13, 2004

8 Nondeterministic solution Nondeterministically choose the midpoint Mark this point on tape 2 and return tape 2s head to beginning Compare strings If tape head points to ~ on tape 1 and midpoint marker on tape 2 then accept Otherwise, if all possible midpoints have been tried then reject Otherwise, try a new midpoint October 13, 2004 9

Nondeterministic TM (a,~) {L,R})a,a}), {L,R})R,R}) {L,R})b,~}) {L,R})b,b}), {L,R})R,R}) (a,x) {L,R})a,a}), {L,R})R,R}) (a,~) (a,a),(R,R) {L,R})b,x}) {L,R})b,b}), (b,~)(b,b),(R,R) {L,R})R,R}) (~,~) (L,L) qaccept qreject

(a,a) (L,L) (a,a) (R,R) (b,b) (L,L) (~,~) (L,L) (b,b) (R,R) (a,a) (a,x),(S,Res) (b,b) (b,x), (S,Res) (a,b), (b,a), (a,x), (b,x), (~,a), (~,b) (Res,Res) (~,x) (S,S) October 13, 2004

10 Rig ht are mp Co t Acce pt Ac c

ep t et se Re 11 October 13, 2004 s Re Rig ht M ov

e r ig ht re pa m Co are mp Co e par Com Rig

ht Tree representation Deterministic equivalent Assume midpoint is at beginning If so accept If not Assume midpoint is after first symbol If so accept If not Assume midpoint is after second symbol If so accept If not etc. October 13, 2004

12 How should it search the tree? Breadth first search Search all possibilities involving k steps before searching any possibilities involving (k+1) steps Whats wrong with depth first search? If some sequence of choices results in no halting, we will never get to the accept state October 13, 2004

13 When does it halt? When it reaches an accept state or Return accept October 13, 2004 14 Will it halt on strings in the language? Yes if the TM accepts the input string Let b be the largest number of children of any node Can we be sure b is finite?

Let k be the minimum number of steps it takes to get to the accept state This method will take at most bk steps to get to the accept state October 13, 2004 15 What about strings not in the language? Wont halt Thats okay October 13, 2004 16

Equivalence of approaches Corollary: A language is Turingrecognizable if and only if some nondeterministic Turing machine recognizes it. October 13, 2004 17 Equivalence of approaches Corollary: A language is Turingdecidable if and only if some nondeterministic Turing machine decides it. Proof: Homework Modify proof in the book October 13, 2004

18

Recently Viewed Presentations

• HIV/AIDS, substance abuse disorders, and mental disorders interact in a complex fashion. Each acts as a potential catalyst or obstacle in the treatment of the other two--substance abuse can negatively affect adherence to HIV/AIDS treatment regimens; substance abuse disorders and...
• WRITING NON-FICTION. Example question. and how to get top marks 'Homework has no value. Some students get it done for them; some don't do it at all. Students should be relaxing in their free time.' Write an article for a...
• Link decisions to Legacies and Strategic Commitments. Create project ambassadors. Avoid surprises - frequent communication. Identify a community-supported project. Public Outreach Will Inform the Process
• Tom has been in administration since 1995 and has been in the Princeton district since 2015. He is the author of "Mark of Leadership: Strategies for Leading with Purpose, Plans, and Passion." Additionally, Tom has written articles for publications both...
• INFLUENCES ON MARX -G.W.F. HEGEL/HEGELIANISM " â€¦history is the unfolding of reality itself, the ideas or mind of the universe; what happens in history is in effect the writing of a book of which God is the ultimate author, but...
• a 9% fouling and degradation factor. bulbous bows and a standard autopilot. exhaust gas boiler/economizer. Calculation process. Whole Ship Model: complex sub-models. design process and an operational performance evaluation process. Whole Ship Model (WSM) Operation. Costs.
• Belt/Disk Sander. Safety Glasses. Relief Cuts. Kickback. Power Tool. Saber Saw. Safety. I can explain safety skills used in agricultural mechanics. One of the most important things a person involved in agricultural mechanics can learn is how to create a...
• Why is it important to use Primary Sources? They encourage deeper content exploration, active analysis, and thoughtful response. They can help people develop critical thinking skills by examining meaning, context, bias, purpose, point of view, etc.