Deterministic Turing Machines

Slides:



Advertisements
Similar presentations
NFAε - NFA - DFA equivalence
Advertisements

Computing functions with Turing machines
Part VI NP-Hardness. Lecture 23 Whats NP? Hard Problems.
6/3/2014 A Universal Machine A universal Turing machine is designed to simulate the computations of an arbitrary Turing machine M. R(M)w Universal machine.
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.
Turing Machines.
CS2303-THEORY OF COMPUTATION
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
Lecture 16 Deterministic Turing Machine (DTM) Finite Control tape head.
Variants of Turing machines
Turing Machines New capabilities: –infinite tape –can read OR write to tape –read/write head can move left and right q0q0 input tape.
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Fall 2004COMP 3351 Turing Machines. Fall 2004COMP 3352 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Courtesy Costas Busch - RPI1 Turing Machines. Courtesy Costas Busch - RPI2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Turing Machines.
CS5371 Theory of Computation Lecture 10: Computability Theory I (Turing Machine)
Computability and Complexity 3-1 Turing Machine Computability and Complexity Andrei Bulatov.
Costas Busch - RPI1 Turing Machines. Costas Busch - RPI2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Finite State Machines Data Structures and Algorithms for Information Processing 1.
Prof. Busch - LSU1 Turing Machines. Prof. Busch - LSU2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
1 Turing Machines. 2 A Turing Machine Tape Read-Write head Control Unit.
Turing Machines A more powerful computation model than a PDA ?
Lecture 2UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 2.
Ding-Zhu Du Office: ECSS 3-611, M 3:15-4:30 Lecture: ECSS 2.311, MW 12:30-1:45.
CSE202: Introduction to Formal Languages and Automata Theory Chapter 9 The Turing Machine These class notes are based on material from our textbook, An.
 Computability Theory Turing Machines Professor MSc. Ivan A. Escobar
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI CSCI 230 Models of Computation - Turing Machines Dale Roberts, Lecturer.
Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.
Costas Busch - LSU1 Turing’s Thesis. Costas Busch - LSU2 Turing’s thesis (1930): Any computation carried out by mechanical means can be performed by a.
CS 3240: Languages and Computation
CSCI 2670 Introduction to Theory of Computing October 7, 2004.
Turing Machines Lecture 26 Naveen Z Quazilbash. Overview Introduction Turing Machine Notation Turing Machine Formal Notation Transition Function Instantaneous.
1 IDT Open Seminar ALAN TURING AND HIS LEGACY 100 Years Turing celebration Gordana Dodig Crnkovic, Computer Science and Network Department Mälardalen University.
1 Turing Machines - Chap 8 Turing Machines Recursive and Recursively Enumerable Languages.
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
1 Introduction to Turing Machines
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 12 Mälardalen University 2007.
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Turing Machines. The next level of Machine… PDAs improved on FSAs by adding memory. We make the memory more flexible to do more complicated tasks.
Turing Machines CS 130 Theory of Computation HMU Textbook: Chap 8.
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
CSCI 2670 Introduction to Theory of Computing September 29, 2005.
Turing’s Thesis Costas Busch - LSU.
NFAε - NFA - DFA equivalence
Theory of Computation Pushdown Automata pda Lecture #10.
Lexical analysis Finite Automata
Part VI NP-Hardness.
Lecture2 Regular Language
Busch Complexity Lectures: Turing Machines
Deterministic Turing Machines
COSC 3340: Introduction to Theory of Computation
Turing Machines.
Pumping Lemma Revisited
Push-down Automata Section 3.3 Wed, Oct 27, 2004.
Pushdown Automata PDAs
PUSHDOWN AUTOMATA. PUSHDOWN AUTOMATA Hierarchy of languages Regular Languages  Finite State Machines, Regular Expression Context Free Languages 
COSC 3340: Introduction to Theory of Computation
Turing Machines 2nd 2017 Lecture 9.
Turing Machines Acceptors; Enumerators
Chapter 9 TURING MACHINES.
COSC 3340: Introduction to Theory of Computation
Turing Machines (TM) Deterministic Turing Machine (DTM)
4b Lexical analysis Finite Automata
COSC 3340: Introduction to Theory of Computation
Formal Definitions for Turing Machines
CS6382 Theory of Computation
Turing Machines Everything is an Integer
Presentation transcript:

Deterministic Turing Machines

Unique accept state. Also no arrows are coming out. Constituents Infinite tape Head Transition diagram … … q1 q0 qf Unique accept state. Also no arrows are coming out.

Formal definition A Deterministic Turing Machine (DTM) is a sextuple (Q, Σ, Γ, δ, q0, qf) where: Q is a finite set of states Σ is the input alphabet Γ is the tape alphabet, Σ ⊆ Γ There is a special blank symbol □ in Γ q0 is the start state qf is the final state δ: Q x Γ → Q x Γ x {L,R,S}, where L stands for Left, R stands for Right and S stands for Stay.

Formal definition (cont.) δ(q , a) = (q’ , b, L) means: “if you are in state q and the head in the tape points to symbol a then move to state q’, replace symbol a with symbol b in the tape and move the head one position to the left” Illustration: … … … … a b head head q‘ q‘ a→b,L … a→b,L … … q … q

Determinism Determinism means that I have no choices! The transition function δ sends pair (q, a) to at most one triple (q’, b, x) (in other words there is at most one arrow from state q reading symbol a –maybe there are no such arrows). No ε-moves are allowed (I must read something in the tape in order to change state).

Machine’s special status Start: Be at initial state , the tape contains only the input and the head points to the first (leftmost symbol of the input) Accept: Reach the accept state. The machine stops the computation and accepts (notice that part of the input might be unread). Reject: Be in a state q (other than the accept state), read symbol a and find no outgoing arrows under symbol a. Loop for ever: Enter a subset of states which repeat for ever (different than the “reject case”)

Machine’s special status Start: … … a b a a b head q1 a→b,R q0 …

Machine’s special status Accept: … … b b a a b head … qf

Machine’s special status Reject: … … b b a a b head q’ … a→b,R q …

Machine’s special status Loop: … … b b a a b head … q b→b,S

Recursive Languages A language is recursive (or decidable, or computable) if there is a Turing Machine which: Accepts for every string in the language Rejects for every string not in the language

Example Find a DTM that computes the language L = {anbn : n ≥ 0}. High level program: Repeat Erase an a. Pass along the rest of as. Erase a b Pass along the rest of bs. Go to the beginning of the input. Until either the whole input is erased (accept) or you find unmatched as or bs (reject).

Example Find a DTM that computes the language L = {anbn : n ≥ 0}. Answer: a → a , R x → x , R x → x , R b → b , R a → x , R b → x , R q0 q1 q2 □ → □ , R □ → □ , L □ → □ , R qf q3 a → a , L b → b , L x → x , L

Testing Test the machine for several possible inputs to see if it works as it should. Test inputs: ε (it should accept) aaabbb (it should accept) aaabb (it should reject) aabbb (it should reject) aabba (it should reject) (See file dtm_example.pptx).