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.

Slides:



Advertisements
Similar presentations
Multi-tape Turing Machines: Informal Description
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.
Deterministic Turing Machines
Introduction to Computability Theory
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.
Turing Machines (At last!). Designing Universal Computational Devices Was Not The Only Contribution from Alan Turing… Enter the year 1940: The world is.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Variants.
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 ? ?
1 Lecture 16 FSA’s –Defining FSA’s –Computing with FSA’s Defining L(M) –Defining language class LFSA –Comparing LFSA to set of solvable languages (REC)
CS5371 Theory of Computation Lecture 10: Computability Theory I (Turing Machine)
Prof. Busch - LSU1 Turing Machines. Prof. Busch - LSU2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Chapter 9 Turing Machine (TMs).
1 Turing Machines. 2 A Turing Machine Tape Read-Write head Control Unit.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen Department of Computer Science University of Texas-Pan American.
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.
 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.
1 Which languages do the following TM’s accept over the alphabet Σ={a, b}? Recall: A TM M accepts a language L defined over an alphabet Σ if M halts on.
December 1, 2009Theory of Computation Lecture 21: Turing Machines II 1 Simulation of L n in T We will now construct a Post-Turing program Q that simulates.
THE CHURCH-TURING T H E S I S “ TURING MACHINES” Part 1 – Pages COMPUTABILITY THEORY.
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.
1 Design a PDA which accepts: L= { a n b m : n ≠ m }
TM Design Macro Language D and SD MA/CSSE 474 Theory of Computation.
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 -
1 Which languages do the following TM’s accept over the alphabet Σ={a, b}? Recall: A TM M accepts a language L defined over an alphabet Σ if M halts on.
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 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.
Lecture 16b Turing Machines Topics: Closure Properties of Context Free Languages Cocke-Younger-Kasimi Parsing Algorithm June 23, 2015 CSCE 355 Foundations.
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 3 The Church-Turing Thesis Contents Turing Machines definitions, examples,
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 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 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.
1 Assignment #5 is posted.. 2 An artist's rendition of a steam-powered Turing machine. There is a mural of this between the second and third floors in.
8. Introduction to Turing Machines
COSC 3340: Introduction to Theory of Computation
Busch Complexity Lectures: Turing Machines
Deterministic Turing Machines
COSC 3340: Introduction to Theory of Computation
Turing Machines.
COSC 3340: Introduction to Theory of Computation
Theory of Computation Lecture 22: Turing Machines III
Turing Machines 2nd 2017 Lecture 9.
Chapter 9 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.
The Off-Line Machine Input File read-only (once) Input string
MA/CSSE 474 Theory of Computation
COSC 3340: Introduction to Theory of Computation
Recall last lecture and Nondeterministic TMs
Computability Catch up last lecture. Turing machines. Variations
Theory of Computation Lecture 23: Turing Machines III
Intro to Theory of Computation
Presentation transcript:

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 of your TM on the input 010: (s, # [#]) ├ … 3. Show what your TM does on input ε: (s, # [#] ) ├ …

2 Announcements: My TM definitions are slightly different from the book- use my definitions on assignments and with the TM simulator. Assignment #4, Due at beginning of class, Fri. Nov. 18, Final exam tutorial?

3 Lecture 31: Turing Machines- Definition This lecture formally defines the Turing machine and gives more examples of how they work. With them, we will be able to prove statements regarding the limitations of modern day computers.

4 L= { w  {a, b}* : w has an even number of a’s} A TM M decides a language L if (s, # w [#]) ├ * (h, # Y [#]) for w  L and (s, # w [#]) ├ * (h, # N [#]) for w ∉ L. To decide L: Move left erasing symbols as we go and keeping track of the number of a’s modulo 2 until reaching the blank at the end and then write the answer on the tape.

5 StateSymbolNext stateHead Instr. start#evenaL arem_o# evenabrem_e# oddaarem_e# oddabrem_o# rem_e#evenaL rem_o#oddaL evena#writeyR odda#writenR writey# Y writen# N writeyYhR writenNhR

6 A Turing Machine M consists of a quadruple (K, Σ, δ, s) where K is a finite set of states, Σ is an alphabet, δ, the transition function is a function from K x Σ to (K ⋃ h) x (Σ ⋃ {L, R}) and s  K is the start state. Technical notes: in practice we allow leaving part of the function undefined and just say the TM hangs when an undefined transition is encountered. Also, # is always in Σ and h (the halt state) ∉ K.

7 Example TM M= (K, Σ, δ, s) where K= {start, evena, odda, rem_e, rem_o, writey, writen}, Σ= { #, a, b, Y, N}, δ was given previously (but not all transitions were defined), and s= start. Side note: these definitions differ slightly from second edition of text for ease in programming.

8 The format of the input to the TM simulator is as follows:... $...

9 Rules for TM Descriptions 1.The state name h is used to denote the halting state. 2.Use the symbol # to represent a blank. 3.If a line starts with // it is a comment. Comments can also be added on the same line as an instruction at the end of the line (start with //). 4.Each of the state names is an arbitrary string. The current symbol and new symbol each must be a single symbol. 6.The head instruction is either L (move the head one square left) or R (move the head one square right) or a symbol to replace the current tape square contents. 7.The $ indicates the end of the TM description.

10 start start # evena L // Erase current symbol using state to // remember even/odd evena a rem_o # evena b rem_e # odda a rem_e # odda b rem_o # // Move left off square just blanked out // to correct state rem_o # odda L rem_e # evena L Input to TM Simulator

11 // Found # at LH end of tape evena # writey R odda # writen R // Write the answer writey # writey Y writen # writen N // Position head to right of answer and halt writey Y h R writen N h R $ abaa baab

12 Step 0 : (start, #baab[#]) Step 1 : (evena, #baa[b]) Step 2 : (rem_e, #baa[#]) Step 3 : (evena, #ba[a]) Step 4 : (rem_o, #ba[#]) Step 5 : (odda, #b[a]) Step 6 : (rem_e, #b[#]) Step 7 : (evena, #[b]) Step 8 : (rem_e, #[#]) Step 9 : (evena, [#]) Step 10 : (writey, #[#]) Step 11 : (writey, #[Y]) Step 12 : (h, #Y[#]) Computation on input baab which is in L.

13 Step 0 : (start, #abaa[#]) Step 1 : (evena, #aba[a]) Step 2 : (rem_o, #aba[#]) Step 3 : (odda, #ab[a]) Step 4 : (rem_e, #ab[#]) Step 5 : (evena, #a[b]) Step 6 : (rem_e, #a[#]) Step 7 : (evena, #[a]) Step 8 : (rem_o, #[#]) Step 9 : (odda, [#]) Step 10 : (writen, #[#]) Step 11 : (writen, #[N]) Step 12 : (h, #N[#]) Computation on input abaa which is not in L.

14 A COPY TM. On input w  {a, b}*, this TM halts with w followed by # followed by a copy of w. That is: (s, # w [#]) ├ * (h, # w # w [#]). The program for this TM is available from the page which gives the TM simulator. The algorithm changes each a to A and each b to B in the first copy of w to mark that it has been copied over already.

15 // Find leftmost symbol of w not copied yet. middle # goleft L goleft a goleft L goleft b goleft L // Found either #, A, B from part being copied. goleft A next_s R goleft B next_s R goleft # next_s R // Go to # between w and copy of w //remembering symbol to copy. next_s a next_s A next_s b next_s B next_s A RtoM_a R next_s B RtoM_b R next_s # clean L // Done- clean up. start state: middle

16 // Go right to the middle RtoM_a a RtoM_a R RtoM_a b RtoM_a R RtoM_a # RtoR_a R // Go right to the right hand end RtoR_a a RtoR_a R RtoR_a b RtoR_a R RtoR_a # left1 a // Go left to blank in middle. left1 a left1 L left1 b left1 L left1 # middle # RtoM_b a RtoM_b R RtoM_b b RtoM_b R RtoM_b # RtoR_b R RtoR_b a RtoR_b R RtoR_b b RtoR_b R RtoR_b # left1 b

17 // Clean up the tape- //change A back to a and B back to b. clean A clean a clean B clean b clean a clean L clean b clean L clean # right1 R // Position head to right of copy of w. right1 a right1 R right1 b right1 R right1 # right2 R right2 a right2 R right2 b right2 R right2 # h #