Multi-tape Turing Machines: Informal Description

Slides:



Advertisements
Similar presentations
Restricted Machines Presented by Muhannad Harrim.
Advertisements

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.
CS2303-THEORY OF COMPUTATION
CS 345: Chapter 9 Algorithmic Universality and Its Robustness
Lecture 16 Deterministic Turing Machine (DTM) Finite Control tape head.
Variants of Turing machines
THE CHURCH-TURING T H E S I S “ TURING MACHINES” Pages COMPUTABILITY THEORY.
Comparing Sets Size without Counting 2 sets A and B have the same size if there is a function f: A  B such that: For every x  A there is one and only.
Foundations of (Theoretical) Computer Science Chapter 3 Lecture Notes (Section 3.2: Variants of Turing Machines) David Martin With.
Turing Machines (At last!). Designing Universal Computational Devices Was Not The Only Contribution from Alan Turing… Enter the year 1940: The world is.
Courtesy Costas Busch - RPI1 A Universal Turing Machine.
1 Linear Bounded Automata LBAs. 2 Linear Bounded Automata are like Turing Machines with a restriction: The working space of the tape is the space of the.
CS5371 Theory of Computation Lecture 11: Computability Theory II (TM Variants, Church-Turing Thesis)
Lecture 5 Turing Machines
CS5371 Theory of Computation Lecture 6: Automata Theory IV (Regular Expression = NFA = DFA)
Fall 2005Costas Busch - RPI1 Recursively Enumerable and Recursive Languages.
Fall 2004COMP 3351 A Universal Turing Machine. Fall 2004COMP 3352 Turing Machines are “hardwired” they execute only one program A limitation of Turing.
CS 310 – Fall 2006 Pacific University CS310 Variants of Turing Machines Section 3.2 November 8, 2006.
Chapter 9 Turing Machine (TMs).
Advanced Topics in Algorithms and Data Structures Lecture 8.2 page 1 Some tools Our circuit C will consist of T ( n ) levels. For each time step of the.
CS490 Presentation: Automata & Language Theory Thong Lam Ran Shi.
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
1 The Halting Problem and Decidability How powerful is a TM? Any program in a high level language can be simulated by a TM. Any algorithmic procedure carried.
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI CSCI 230 Models of Computation - Turing Machines Dale Roberts, Lecturer.
Regular Grammars Chapter 7. Regular Grammars A regular grammar G is a quadruple (V, , R, S), where: ● V is the rule alphabet, which contains nonterminals.
A Universal Turing Machine
1 More About Turing Machines “Programming Tricks” Restrictions Extensions Closure Properties.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 3 Mälardalen University 2010.
THE CHURCH-TURING T H E S I S “ TURING MACHINES” Part 1 – Pages COMPUTABILITY THEORY.
1 Turing Machines Reading: Chapter 8. 2 Turing Machines are… Very powerful (abstract) machines that could simulate any modern day computer (although very,
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 3 The Church-Turing Thesis Contents Turing Machines definitions, examples,
1 Linear Bounded Automata LBAs. 2 Linear Bounded Automata (LBAs) are the same as Turing Machines with one difference: The input string tape space is the.
 2005 SDU Lecture13 Reducibility — A methodology for proving un- decidability.
1 Turing Machines as Transducers. 2 Turing-computable Functions Function f with domain D is computable if There exists TM M= (Q, D, , , q 0, B, F) Such.
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 -
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.
1 Turing Machines and Equivalent Models Section 13.1 Turing Machines.
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 3 The Church-Turing Thesis Contents Turing Machines definitions, examples,
THE CONVENTIONS 2 simple rules: Rule # 1: Rule # 2: RR “move to the right until you find  “ Note: first check. Then move (think of a “while”) “Never.
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.
Turing Machines Sections 17.6 – The Universal Turing Machine Problem: All our machines so far are hardwired. ENIAC
The Church-Turing Thesis
Theory of Computation Automata Theory Dr. Ayman Srour.
Universal Turing Machine
CSCI 2670 Introduction to Theory of Computing
ماشین های تورینگ، تشخیص پذیری و تصمیم پذیری زبان ها
CS21 Decidability and Tractability
The Encoding of TM Motivation for encoding of TM
(Universal Turing Machine)
CSE 105 theory of computation
COSC 3340: Introduction to Theory of Computation
CSE 105 theory of computation
Turing Machines (At last!).
Intro to Theory of Computation
Chapter 7 Regular Grammars
Decidable Languages Costas Busch - LSU.
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.
The Off-Line Machine Input File read-only (once) Input string
CS21 Decidability and Tractability
Recall last lecture and Nondeterministic TMs
Turing Machines Complexity ©D.Moshkovitz.
Decidability and Tractability
CSE 105 theory of computation
Variants of Turing machines
Turing -Recognizable vs. -Decidable
Intro to Theory of Computation
CSE 105 theory of computation
Presentation transcript:

Multi-tape Turing Machines: Informal Description Control … a1 a2  Tape1 head1 … a1 a2  Tape2 head2 We add a finite number of tapes …

Multi-tape Turing Machines: Informal Description (II) Each tape is bounded to the left by a cell containing the symbol  Each tape has a unique header Transitions have the form (for a 2-tape Turing machine): ( (p,(x1, x2)), (q, (y1, y2)) ) Such that each xi is in  and each yi is in  or is  or . and if xi =  then yi =  or yi = 

Multi-tape Turing Machines Construct a 2-tape Turing machine that recognizes the language: L = {anbn : n = 0, 1, 2, …} Tape1: w Input: Tape2:  Tape1: 1… if w  L or Tape1: 0… if w  L Output: Hints: use the second tape as an stack Use the machines M1 and M0

Multi-tape Turing Machines vs Turing Machines  a1 a2 … ai …  b1 b2 … … bj We can simulate a 2-tape Turing machine M2 in a Turing machine M: we can represent the contents of the 2 tapes in the single tape by using special symbols We can simulate one transition from the M2 by constructing multiple transitions on M We introduce several (finite) new states into M

Using States to “Remember” Information Configuration in a 2-tape Turing Machine M2: Tape1  a b a b State: s Tape2  b b a State in the Turing machine M: “s+b+1+a+2” Which represents: M2 is in state s Cell pointed by first header in M2 contains b Cell pointed by second header in M2 contains an a

Using States to “Remember” Information (2) State in the Turing machine M: “s+b+1+a+2” (# states in M2) * | or  or | * | or  or | How many states are there in M? Yes, we need large number of states for M but it is finite!

Configuration in a 2-tape Turing Machine M2:  a b a b State in M2: s Tape2  b b a Equivalent configuration in a Turing Machine M: a b 1  2  4 3 e  State in M: s+b+1+a+2

Simulating M2 with M The alphabet  of the Turing machine M extends the alphabet 2 from the M2 by adding the separator symbols: 1, 2, 3 , 4 and e, and adding the mark symbols:  and  We introduce more states for M, one for each 5-tuple p++1+ +2 where p in an state in M2 and +1+ +2 indicates that the head of the first tape points to  and the second one to  We also need states of the form p++1++2 for control purposes

Simulating transitions in M2 with M State in M: s+b+1+a+2 a b 1  2  4 3 e  At the beginning of each iteration of M2, the head starts at e and both M and M2 are in an state s We traverse the whole tape do determine the state p++1+ +2, Thus, the transition in M2 that is applicable must have the form: ( (p,(, )), (q,(,)) ) in M2 p+ +1+ +2 q+ +1++2 in M

Simulating transitions in M2 with M (2) To apply the transformation (q,(,)), we go forwards from the first cell. If the  (or ) is  (or ) we move the marker to the right (left): 1  …  i 1  … i  If the  (or ) is a character, we first determine the correct position and then overwrite

state: s  1 a b a b 2      3 b b a 4     e a b   2  4 3 e 1 a b  1 2   4 3 e  b  a 1 2  4 3 e    a b 1 2 4 3 e a b   2  4 3 e Output: 1 state: s+b+1

Multi-tape Turing Machines vs Turing Machines (6) We conclude that 2-tape Turing machines can be simulated by Turing machines. Thus, they don’t add computational power! Using a similar construction we can show that 3-tape Turing machines can be simulated by 2-tape Turing machines (and thus, by Turing machines). Thus, k-tape Turing machines can be simulated by Turing machines

Implications If we show that a function can be computed by a k-tape Turing machine, then the function is Turing-computable In particular, if a language can be decided by a k-tape Turing machine, then the language is decidable Example: Since we constructed a 2-tape TM that decides L = {anbn : n = 0, 1, 2, …}, then L is Turing-computable.

Implications (2) Example: Show that if L1 and L2 are decidable then L1  L2 is also decidable Proof. …

Homework Prove that (ab)* is Turing-enumerable (Hint: use a 2-tape Turing machine.) Exercise 4.24 a) and b) (Hint: use a 3-tape Turing machine.) For proving that * is Turing-enumerable, we needed to construct a Turing machine that computes the successor of a word. Here are some examples of what the machine will produce (w  w’ indicates that when the machine receives w as input, it produces w’ as output) a  b  aa  ab  ba  bb  aaa