CSCI 2670 Introduction to Theory of Computing

Slides:



Advertisements
Similar presentations
Turing Machines Memory = an infinitely long tape Persistent storage A read/write tape head that can move around the tape Initially, the tape contains only.
Advertisements

Variants of Turing machines
Foundations of (Theoretical) Computer Science Chapter 3 Lecture Notes (Section 3.2: Variants of Turing Machines) David Martin With.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Variants.
CS605 – The Mathematics and Theory of Computer Science Turing Machines.
More Turing Machines Sipser 3.2 (pages ). CS 311 Fall Multitape Turing Machines Formally, we need only change the transition function to.
1 Introduction to Computability Theory Lecture11: Variants of Turing Machines Prof. Amos Israeli.
More Turing Machines Sipser 3.2 (pages ).
CS5371 Theory of Computation Lecture 11: Computability Theory II (TM Variants, Church-Turing Thesis)
Lecture 5 Turing Machines
Theory of Computing Lecture 20 MAS 714 Hartmut Klauck.
Prof. Busch - LSU1 Turing Machines. Prof. Busch - LSU2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen Department of Computer Science University of Texas-Pan American.
חישוביות וסיבוכיות Computability and Complexity Lecture 7 TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A AAAA.
CSCI 2670 Introduction to Theory of Computing September 28, 2005.
Computability Construct TMs. Decidability. Preview: next class: diagonalization and Halting theorem.
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 3 The Church-Turing Thesis Contents Turing Machines definitions, examples,
CSCI 2670 Introduction to Theory of Computing October 12, 2005.
CSCI 2670 Introduction to Theory of Computing October 7, 2004.
1 Turing Machines and Equivalent Models Section 13.1 Turing Machines.
CSCI 3130: Formal languages and automata theory Tutorial 7 Chin.
The Church-Turing Thesis
Lecture 7: Turning Machines 虞台文 大同大學資工所 智慧型多媒體研究室.
CSCI 2670 Introduction to Theory of Computing September 29, 2005.
MA/CSSE 474 Theory of Computation Decision Problems, Continued DFSMs.
CSCI 2670 Introduction to Theory of Computing November 15, 2005.
Turing’s Thesis Costas Busch - LSU.
Recursively Enumerable Languages
CSCI 2670 Introduction to Theory of Computing
CSCI 2670 Introduction to Theory of Computing
Busch Complexity Lectures: Turing Machines
CSCI 2670 Introduction to Theory of Computing
CSCI 2670 Introduction to Theory of Computing
Reductions Costas Busch - LSU.
CS21 Decidability and Tractability
Variants of Turing machines
(Universal Turing Machine)
CSE 105 theory of computation
CSCI 2670 Introduction to Theory of Computing
CSE 105 theory of computation
CSCI 2670 Introduction to Theory of Computing
CSCI 2670 Introduction to Theory of Computing
Turing Machines Acceptors; Enumerators
Intro to Theory of Computation
COSC 3340: Introduction to Theory of Computation
Decidability and Enumerability
فصل سوم The Church-Turing Thesis
Intro to Theory of Computation
CSCI 2670 Introduction to Theory of Computing
Decidable Languages Costas Busch - LSU.
CSCI 2670 Introduction to Theory of Computing
CSCI 2670 Introduction to Theory of Computing
Turing acceptable languages and Enumerators
CS21 Decidability and Tractability
CS21 Decidability and Tractability
CSCI 2670 Introduction to Theory of Computing
Variations of the Turing Machine
Recall last lecture and Nondeterministic TMs
Decidability and Tractability
CSCI 2670 Introduction to Theory of Computing
CSCI 2670 Introduction to Theory of Computing
CSE 105 theory of computation
CSCI 2670 Introduction to Theory of Computing
CSCI 2670 Introduction to Theory of Computing
Variants of Turing machines
CSCI 2670 Introduction to Theory of Computing
Intro to Theory of Computation
CSE 105 theory of computation
Presentation transcript:

CSCI 2670 Introduction to Theory of Computing October 13, 2004

Agenda Yesterday Today Variants of Turing machines Allow “stay put” state Multiple tapes Nondeterministic Today Prove equivalence of deterministic and nondeterministic Turing machines Enumerators October 13, 2004

Announcements Quiz tomorrow Reminder: tutorial sessions are back High-level description of TM Trace through a TM’s 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

Nondeterministic Turing machines Same as standard Turing machines, but may have one of several choices at any point δ : Q × Г → P(Q × Г × {L,R}) October 13, 2004

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

Try new decision paths until the string is accepted Proof idea M 0 1 0 1 ~ ~ ~ ~ a a # 0 1 ~ ~ ~ 1 1 2 1 3 ~ ~ ~ Input tape never changes Computation tape Decision path Try new decision paths until the string is accepted October 13, 2004

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

Example Nondeterministic TM that accepts {ww | w  {a,b}*} Use 2 tapes Copy input to tape 2 Position heads at beginning of tapes Move both heads right simultaneously October 13, 2004

Nondeterministic solution Nondeterministically choose the midpoint Mark this point on tape 2 and return tape 2’s 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

Nondeterministic TM (a,~) → {a,a},{R,R} {b,~} → {b,b},{R,R} (~,~) → (L,L) qaccept (a,a) → (a,x),(S,Res) (b,b) → (b,x),(S,Res) qreject (a,~) → {a,a},{R,R} {b,~} → {b,b},{R,R} (a,x) → {a,a},{R,R} {b,x} → {b,b},{R,R} (a,a) → (L,L) (b,b) → (L,L) (a,a) → (R,R) (b,b) → (R,R) (~,x) → (S,S) (a,b), (b,a), (a,x), (b,x), (~,a), (~,b) → (Res,Res) October 13, 2004

… Tree representation Move right Compare Right Compare Accept Reset October 13, 2004

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

How should it search the tree? Breadth first search Search all possibilities involving k steps before searching any possibilities involving (k+1) steps What’s 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

When does it halt? When it reaches an accept state or Return accept October 13, 2004

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

What about strings not in the language? Won’t halt That’s okay October 13, 2004

Equivalence of approaches Corollary: A language is Turing-recognizable if and only if some nondeterministic Turing machine recognizes it. October 13, 2004

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