COSC 3340: Introduction to Theory of Computation

Slides:



Advertisements
Similar presentations
1 Introduction to Computability Theory Lecture11: Variants of Turing Machines Prof. Amos Israeli.
Advertisements

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.
Theory of Computation What types of things are computable? How can we demonstrate what things are computable?
Lecture 5 Turing Machines
CS5371 Theory of Computation Lecture 10: Computability Theory I (Turing Machine)
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.
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.
CSCI 2670 Introduction to Theory of Computing September 28, 2005.
TM Design Universal TM MA/CSSE 474 Theory of Computation.
Lecture 18UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 18.
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.
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.
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.
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.
December 3, 2009Theory of Computation Lecture 21: Turing Machines III 1 Simulation of T in L Now the MIDDLE section of Q can be generated by replacing.
1 1. Design a TM which on a input w  {0, 1}*, shifts w over one position to the right. That is: (s, # w [#]) ├ * (h, # # w [#]). 2. Show the computation.
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.
Universal Turing Machine
TM Macro Language MA/CSSE 474 Theory of Computation.
Turing’s Thesis Costas Busch - LSU.
CSE202: Introduction to Formal Languages and Automata Theory
8. Introduction to Turing Machines
COSC 3340: Introduction to Theory of Computation
ماشین های تورینگ، تشخیص پذیری و تصمیم پذیری زبان ها
Busch Complexity Lectures: Turing Machines
COSC 3340: Introduction to Theory of Computation
Turing Machines Chapter 17.
(Universal Turing Machine)
COSC 3340: Introduction to Theory of Computation
Turing Machines 2nd 2017 Lecture 9.
COSC 3340: Introduction to Theory of Computation
COSC 3340: Introduction to Theory of Computation
COSC 3340: Introduction to Theory of Computation
Jaya Krishna, M.Tech, Assistant Professor
Intro to Theory of Computation
Turing Machines Chapter 17.
Turing Machines (TM) Deterministic Turing Machine (DTM)
COSC 3340: Introduction to Theory of Computation
Theory of Computation Turing Machines.
8. Introduction to Turing Machines
Decidable Languages A language L is decidable if there is a Turing machine ML such that given any word w  0*, then: Input of ML: a  b  … w Output of.
MA/CSSE 474 Theory of Computation
COSC 3340: Introduction to Theory of Computation
COSC 3340: Introduction to Theory of Computation
Recall last lecture and Nondeterministic TMs
MA/CSSE 474 Theory of Computation
CSE S. Tanimoto Turing Completeness
COSC 3340: Introduction to Theory of Computation
COSC 3340: Introduction to Theory of Computation
COSC 3340: Introduction to Theory of Computation
Theory of Computation Lecture 23: Turing Machines III
Intro to Theory of Computation
332:437 Lecture 14 Turing Machines and State Machine Sequences
COSC 3340: Introduction to Theory of Computation
COSC 3340: Introduction to Theory of Computation
Presentation transcript:

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

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 18 UofH - COSC 3340 - Dr. Verma

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 18 UofH - COSC 3340 - Dr. Verma

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 Wa = (K, , , s), where K = {q} for some arbitrarily chosen state q s = q and (q, b) = (h, a) for each b   Notation: Wa Lecture 18 UofH - COSC 3340 - Dr. Verma

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 VL = ({q}, , L, q), where L(q, a) = (h, L) for each a   VR = ({q}, , R, q), where R(q, a) = (h, R) for each a   let q be some state Notation: L and R let q be some state Lecture 18 UofH - COSC 3340 - Dr. Verma

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 18 UofH - COSC 3340 - Dr. Verma

Rules for Combining Machines If M1 and M2 are any TM Start in the initial state of M1; operate as M1 would operate until M1 would halt; then initiate M2 and operate as M2 would operate M1 M2 M1 M2 M3 a b After M1 halts either M2 or M3 would start depending on the symbol. Lecture 18 UofH - COSC 3340 - Dr. Verma

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 18 UofH - COSC 3340 - Dr. Verma

M = ({q0, q1 }, {a, b}, {a, b, □}, , q0, {}) Example: R□ Alphabet () = {a, b} M = ({q0, q1 }, {a, b}, {a, b, □}, , q0, {}) a R□ State Symbol Next state action q0 □ (q1, □, R) a (q1, a, R) b (q1, b, R) q1 halt R b L□ is very similar to R□ Lecture 18 UofH - COSC 3340 - Dr. Verma

JFLAP SIMULATION Lecture 18 UofH - COSC 3340 - Dr. Verma

JFLAP SIMULATION Lecture 18 UofH - COSC 3340 - Dr. Verma

JFLAP SIMULATION Lecture 18 UofH - COSC 3340 - Dr. Verma

JFLAP SIMULATION Lecture 18 UofH - COSC 3340 - Dr. Verma

JFLAP SIMULATION Lecture 18 UofH - COSC 3340 - Dr. Verma

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

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

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

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

Example: Machine 3 I >aL□L □ L aRa□CaLa□ I □ □ □ aRa□ LI IRL□ a □ Lecture 18 UofH - COSC 3340 - Dr. Verma

Example: Machine 3 (contd.) f(2,2) = ? □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□□□IIIII□ a□□□IIII□□ a□□IIIII□□ . □IIII□□□□□ f(n, m) = n  m is computed by the TM (Multiplication Machine) Lecture 18 UofH - COSC 3340 - Dr. Verma

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 18 UofH - COSC 3340 - Dr. Verma

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 18 UofH - COSC 3340 - Dr. Verma

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. Lecture 18 UofH - COSC 3340 - Dr. Verma