Lecture 18UofH - COSC 3340 - Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 18.

Slides:



Advertisements
Similar presentations
Turing Machines (At last!). Designing Universal Computational Devices Was Not The Only Contribution from Alan Turing… Enter the year 1940: The world is.
Advertisements

1 Introduction to Computability Theory Lecture11: Variants of Turing Machines Prof. Amos Israeli.
Lecture 3UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 3.
Turing Machines New capabilities: –infinite tape –can read OR write to tape –read/write head can move left and right q0q0 input tape.
Complexity ©D.Moshkovitz 1 Turing Machines. Complexity ©D.Moshkovitz 2 Motivation Our main goal in this course is to analyze problems and categorize them.
Lecture 5 Turing Machines
October 29, 2009Introduction to Cognitive Science Lecture 14: Theory of Computation I 1 Finite Automata Example 2: Can we build a finite automaton that.

CS 490: Automata and Language Theory Daniel Firpo Spring 2003.
CS5371 Theory of Computation Lecture 10: Computability Theory I (Turing Machine)
Computability and Complexity 3-1 Turing Machine Computability and Complexity Andrei Bulatov.
Lecture 27UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 27.
Lecture 4UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 4.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
Turing Machines A more powerful computation model than a PDA ?
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen Department of Computer Science University of Texas-Pan American.
UofH - COSC Dr. Verma COSC 3340: Introduction to Theory of Computation Rakesh Verma Computer Science Department University of Houston URL:
Lecture 2UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 2.
CSE202: Introduction to Formal Languages and Automata Theory Chapter 9 The Turing Machine These class notes are based on material from our textbook, An.
CSCI 2670 Introduction to Theory of Computing September 28, 2005.
TM Design Universal TM MA/CSSE 474 Theory of Computation.
Turing Machines Chapter 17. Languages and Machines SD D Context-Free Languages Regular Languages reg exps FSMs cfgs PDAs unrestricted grammars Turing.
Turing Machines. Intro to Turing Machines A Turing Machine (TM) has finite-state control (like PDA), and an infinite read-write tape. The tape serves.
CS848: Topics in Databases: Foundations of Query Optimization Topics covered  Review of complexity.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Turing Machines.
Fundamentals of Informatics Lecture 3 Turing Machines Bas Luttik.
TM Design Macro Language D and SD MA/CSSE 474 Theory of Computation.
Lecture 11UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 11.
Lecture 9  2010 SDU Lecture9: Turing Machine.  2010 SDU 2 Historical Note Proposed by Alan Turing in 1936 in: On Computable Numbers, with an application.
Theorem: Turing decidable languages are closed under intersection.
1 Draw the machine schema for a TM which when started on a blank tape (input  ) halts with abbb on the tape in our standard input format.
1 Turing machines Chapter 4, Smith and Kimber. A Turing machine is an abstraction of a human “computer”. Consists of - control, in the form of states -
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 Section 13.1 Turing Machines A Turing machine (TM) is a simple computer that has an infinite amount of storage in the form of cells on an infinite tape.
Lecture 14UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 14.
1 Turing Machines and Equivalent Models Section 13.1 Turing Machines.
Lecture 24UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 24.
1 Turing Machines - Chap 8 Turing Machines Recursive and Recursively Enumerable Languages.
Lecture 16b Turing Machines Topics: Closure Properties of Context Free Languages Cocke-Younger-Kasimi Parsing Algorithm June 23, 2015 CSCE 355 Foundations.
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 3 The Church-Turing Thesis Contents Turing Machines definitions, examples,
Umans Complexity Theory Lectures Lecture 1b: Turing Machines & Halting Problem.
Summary of Previous Class There are languages that are not decidable –(we have not proved this yet) Why not extend Turing machines just as we did with.
Lecture 8UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 8.
Lecture 7: Turning Machines 虞台文 大同大學資工所 智慧型多媒體研究室.
CSCI 2670 Introduction to Theory of Computing September 29, 2005.
Theory of Computation Automata Theory Dr. Ayman Srour.
Universal Turing Machine
TM Macro Language MA/CSSE 474 Theory of Computation.
CSE202: Introduction to Formal Languages and Automata Theory
COSC 3340: Introduction to Theory of Computation
Busch Complexity Lectures: Turing Machines
COSC 3340: Introduction to Theory of Computation
Turing Machines Chapter 17.
COSC 3340: Introduction to Theory of Computation
COSC 3340: Introduction to Theory of Computation
COSC 3340: Introduction to Theory of Computation
COSC 3340: Introduction to Theory of Computation
Turing Machines Chapter 17.
COSC 3340: Introduction to Theory of Computation
MA/CSSE 474 Theory of Computation
COSC 3340: Introduction to Theory of Computation
COSC 3340: Introduction to Theory of Computation
COSC 3340: Introduction to Theory of Computation
COSC 3340: Introduction to Theory of Computation
COSC 3340: Introduction to Theory of Computation
COSC 3340: Introduction to Theory of Computation
COSC 3340: Introduction to Theory of Computation
COSC 3340: Introduction to Theory of Computation
COSC 3340: Introduction to Theory of Computation
Presentation transcript:

Lecture 18UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 18

UofH - COSC Dr. Verma 2 Combining Turing Machines A Turing Machine can be a component of another Turing Machine (“subroutine”) We will develop a graphical notation to build larger machines for more complex tasks easily. The scheme is hierarchical. Combination is possible since all TM’s are designed to be “non- hanging” – so the first machine can save something on the leftend of the tape. Reference: “Elements of the Theory of Computation’’ by H.R. Lewis and C.H. Papadimitriou.

Lecture 18UofH - COSC Dr. Verma 3 Combining Turing Machines Assumptions, for convenience: – From now on, Turing machines can either write a symbol or move head but not both in the same move. – All TMs have only one alphabet , containing the blank symbol – All machines start in this position: #w# There are two types of basic machines: – Symbol-writing – Head-moving

Lecture 18UofH - COSC Dr. Verma 4 Basic Machines: Symbol-Writing There are |  | symbol-writing machines, one for each symbol in . Each TM simply writes a specified symbol in the currently scanned tape square and halts. Formally, the TM which writes a is W a = (K, , , s), where K = {q} for some arbitrarily chosen state q s = q and  (q, b) = (h, a) for each b   Notation: W a

Lecture 18UofH - COSC Dr. Verma 5 Basic Machines: Head-Moving The head-moving machines simply move the head one square to the left or right, and then halt. Formally, the TM’s are V L = ({q}, ,  L, q), where  L (q, a) = (h, L) for each a   V R = ({q}, ,  R, q), where  R (q, a) = (h, R) for each a   let q be some state Notation: L and R

Lecture 18UofH - COSC Dr. Verma 6 Rules for Combining Machines Machines may be connected just like a Finite Automaton. If two machine are connected, then the first machine has to halt before the other machine starts.

Lecture 18UofH - COSC Dr. Verma 7 Rules for Combining Machines M1M2M1M2 M1M2M1M2 M3M3 a b If M 1 and M 2 are any TM Start in the initial state of M 1 ; operate as M 1 would operate until M 1 would halt; then initiate M 2 and operate as M 2 would operate After M 1 halts either M 2 or M 3 would start depending on the symbol.

Lecture 18UofH - COSC Dr. Verma 8 Abbreviations L/R – A TM that moves the head one cell to the left/right R □ - A TM that moves to the Right seeking □ L □ - A TM that moves to the Left seeking □ R □ - A TM that moves to the Right seeking a nonblank spot L □ - A TM that moves to the Left seeking nonblank spot

Lecture 18UofH - COSC Dr. Verma 9 Example: R □ R a b R□R□ StateSymbolNext state action q0q0 □(q 1, □, R) q0q0 a(q 1, a, R) q0q0 b(q 1, b, R) q1q1 □halt q1q1 a(q 1, a, R) q1q1 b(q 1, b, R) M = ({q 0, q 1 }, {a, b}, {a, b, □}, , q 0, {}) L □ is very similar to R □ Alphabet (  ) = {a, b}

Lecture 18UofH - COSC Dr. Verma 10 JFLAP SIMULATION

Lecture 18UofH - COSC Dr. Verma 11 JFLAP SIMULATION

Lecture 18UofH - COSC Dr. Verma 12 JFLAP SIMULATION

Lecture 18UofH - COSC Dr. Verma 13 JFLAP SIMULATION

Lecture 18UofH - COSC Dr. Verma 14 JFLAP SIMULATION

Lecture 18UofH - COSC Dr. Verma 15 Example: Machine 1 >L □ R□R□ R □(R □ ) 2  (L □ ) 2    □  □ □

Lecture 18UofH - COSC Dr. Verma 16 Example: Machine 1 (contd.) □abc□ □□bc□ □□bc□□ □□bc□a □abc□a □a□c□a □a□c□a□ □a□c□ab □abc□ab □abc□a □ab□□a □ab□□ab□ □a□c□abc □ab□□abc □abc□abc □abc□abc□ Let C be the TM, we say C transforms □w□ into □w□w□ (Copying Machine)

Lecture 18UofH - COSC Dr. Verma 17 Example: Machine 2 >L □ L□L□ R LRLR   □  □ □

Lecture 18UofH - COSC Dr. Verma 18 Example: Machine 2 (contd.) □ab□ aab□ abb□ ab□ Let SL be the TM, we say SL transforms □w□ into w□ (Shift-Left Machine)

Lecture 18UofH - COSC Dr. Verma 19 Example: Machine 3 >aL □ L Ra □ aR a □CaL a □ □ L I aR a □IR  L□ □ LILI □R  R □La□□La□ a □ I a I □

Lecture 18UofH - COSC Dr. Verma 20 Example: Machine 3 (contd.) f(n, m) = n  m is computed by the TM (Multiplication Machine) □II□II□ □II□IIa □I□□IIa □a□□IIa □a□□II□ □a□□II□II□ □a□□II□IIa □□□□II□IIa a□□□II□IIa a□□□II□II□ a□□□IIIII□ a□□□IIII□□ a□□IIIII□□. □IIII□□□□□ f(2,2) = ?

Lecture 18UofH - COSC Dr. Verma 21 Turing Machine Models Variants of TM model – Two-way infinite tape – Multiple tapes – Multiple heads on each tape – Multi-dimensional tapes, and – Combinations of the above.

Lecture 18UofH - COSC Dr. Verma 22 Are the variants more powerful than the basic model? Ans: No All "reasonable" extensions including those listed before lead to the same classes of languages or functions. Proved by showing that the basic model can simulate the extensions.

Lecture 18UofH - COSC Dr. Verma 23 Techniques for Simulations The basic TM has – expanded set of states – expanded alphabet Note: one step in extended model is usually simulated by many steps in the basic model.