TM Macro Language MA/CSSE 474 Theory of Computation.

Slides:



Advertisements
Similar presentations
Variants of Turing machines
Advertisements

THE CHURCH-TURING T H E S I S “ TURING MACHINES” Pages COMPUTABILITY THEORY.
CS 461 – Oct. 21 Begin chapter 3 We need a better (more encompassing) model of computation. Ex. { 1 n 2 n 3 n } couldn’t be accepted by PDA. –How could.
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.
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 ? ?
Turing Machines CS 105: Introduction to Computer Science.
Class 19: Undecidability in Theory and Practice David Evans cs302: Theory of Computation University of Virginia Computer.
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.
CSCI 2670 Introduction to Theory of Computing September 28, 2005.
TM Design Universal TM MA/CSSE 474 Theory of Computation.
MA/CSSE 474 Theory of Computation More Reduction Examples Non-SD Reductions.
Turing Machines – Decidability Lecture 25 Section 3.1 Fri, Oct 19, 2007.
MA/CSSE 474 Theory of Computation Decision Problems DFSMs.
Turing Machines Chapter 17. Languages and Machines SD D Context-Free Languages Regular Languages reg exps FSMs cfgs PDAs unrestricted grammars Turing.
THE CHURCH-TURING T H E S I S “ TURING MACHINES” Part 1 – Pages COMPUTABILITY THEORY.
©Brooks/Cole, 2003 Chapter 17 Theory of Computation.
Computer Science 101 Theory of Computing. Computer Science is... The study of algorithms, with respect to –their formal properties –their linguistic realizations.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
TM Design Macro Language D and SD MA/CSSE 474 Theory of Computation.
Computer Theory Michael J. Watts
Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.
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 -
CS 3240: Languages and Computation
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.
1 Turing Machines - Chap 8 Turing Machines Recursive and Recursively Enumerable Languages.
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 3 The Church-Turing Thesis Contents Turing Machines definitions, examples,
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 ? ?
1 Chapter 9 Undecidability  Turing Machines Coded as Binary Strings  Universal Turing machine  Diagonalizing over Turing Machines  Problems as Languages.
Turing Machines Sections 17.6 – The Universal Turing Machine Problem: All our machines so far are hardwired. ENIAC
CS 154 Formal Languages and Computability April 12 Class Meeting Department of Computer Science San Jose State University Spring 2016 Instructor: Ron Mak.
Chapter 9 Turing Machines What would happen if we change the stack in Pushdown Automata into some other storage device? Truing Machines, which maintains.
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.
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Theory of Computation Automata Theory Dr. Ayman Srour.
Universal Turing Machine
CS 154 Formal Languages and Computability April 7 Class Meeting Department of Computer Science San Jose State University Spring 2016 Instructor: Ron Mak.
CSE202: Introduction to Formal Languages and Automata Theory
TMs for {a2n | n  0} {a2n | n  0}
COSC 3340: Introduction to Theory of Computation
MA/CSSE 474 Decision Problems Languages, Machines, Computation
Turing Machines Chapter 17.
(Universal Turing Machine)
Computing with Turing Machines
COSC 3340: Introduction to Theory of Computation
Computing Functions with Turing Machines
Turing Machines 2nd 2017 Lecture 9.
Chapter 9 TURING MACHINES.
Chapter 3: The CHURCH-Turing thesis
Turing Machines Chapter 17.
Theory of Computation Turing Machines.
Decidability Turing Machines Coded as Binary Strings
Decidability Turing Machines Coded as Binary Strings
MA/CSSE 474 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
Variants of Turing machines
Formal Definitions for Turing Machines
Turing Machines Everything is an Integer
Presentation transcript:

TM Macro Language MA/CSSE 474 Theory of Computation

Your Questions? Previous class days' material Reading Assignments HW 14 problems Next week's exam Anything else

The Macro Language slides from yesterday They are here for reference and in case you have questions about them.

A Macro language for Turing Machines (1) Define some basic machines ● Symbol writing machines For each x  , define M x, written as just x, to be a machine that writes x. Read-write head ends up in original position. ● Head moving machines R:for each x  ,  (s, x) = (h, x,  ) L:for each x  ,  (s, x) = (h, x,  ) ● Machines that simply halt: h, which simply halts (don't care whether it accepts). n, which halts and rejects. y, which halts and accepts. You need to learn this simple language. I will use it and I expect you to use it on HW and tests.

Next we need to describe how to: ● Check the tape and branch based on what character we see, and ● Combine the basic machines to form larger ones. To do this, we need two forms: ● M 1 M 2 Checking Inputs and Combining Machines

Turing Machines Macros Cont'd Example: >M 1 a M 2 b M 3 ● Start in the start state of M 1. ● Compute until M 1 reaches a halt state. ● Examine the tape and take the appropriate transition. ● Start in the start state of the next machine, etc. ● Halt if any component reaches a halt state and has no place to go. ● If any component fails to halt, then the entire machine may fail to halt.

a M 1 M 2 becomesM 1 a, b M 2 b M 1 all elems of  M 2 becomesM 1 M 2 or M 1 M 2 Variables M 1 all elems of  M 2 becomesM 1 x   a M 2 except a and x takes on the value of the current square M 1 a, b M 2 becomesM 1 x  a, b M 2 and x takes on the value of the current square M 1 x = y M 2 if x = y then take the transition e.g., > x    Rx if the current square is not blank, go right and copy it. More macros

Blank/Non-blank Search Machines Find the first blank square to the right of the current square. Find the first blank square to the left of the current square. Find the first nonblank square to the right of the current square. Find the first nonblank square to the left of the current square RR LL RR LL

More Search Machines L a Find the first occurrence of a to the left of the current square. R a, b Find the first occurrence of a or b to the right of the current square. L a, b a M 1 Find the first occurrence of a or b to the left of the current square, b then go to M 1 if the detected character is a ; go to M 2 if the M 2 detected character is b. L x  a, b Find the first occurrence of a or b to the left of the current square and set x to the value found. L x  a, b RxFind the first occurrence of a or b to the left of the current square, set x to the value found, move one square to the right, and write x ( a or b ).

An Example Input:  w w  {1}* Output:  w 3 Example:  111 

What does this machine do?

Exercise Initial input on the tape is an integer written in binary, most significant bit first (110 represents 6). Design a TM that replaces the binary representation of n by the binary representation of n+1.