Chapter 9 TURING MACHINES.

Slides:



Advertisements
Similar presentations
Part VI NP-Hardness. Lecture 23 Whats NP? Hard Problems.
Advertisements

Chapter 11: Models of Computation
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
Lecture 16 Deterministic Turing Machine (DTM) Finite Control tape head.
THE CHURCH-TURING T H E S I S “ TURING MACHINES” Pages COMPUTABILITY THEORY.
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 ? ?
CS 310 – Fall 2006 Pacific University CS310 Turing Machines Section 3.1 November 6, 2006.
Courtesy Costas Busch - RPI1 Turing Machines. Courtesy Costas Busch - RPI2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Turing Machines.
1 Computing Functions with Turing Machines. 2 A function Domain: Result Region: has:
Computability and Complexity 3-1 Turing Machine Computability and Complexity Andrei Bulatov.
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 ? ?
Prof. Busch - LSU1 Turing Machines. Prof. Busch - LSU2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Theory of Computation. Computation Computation is a general term for any type of information processing that can be represented as an algorithm precisely.
1 Turing Machines. 2 A Turing Machine Tape Read-Write head Control Unit.
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.
1 Turing Machines There are languages that are not context-free. What can we say about the most powerful automata and the limits of computation?. Alan.
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI CSCI 230 Models of Computation - Turing Machines Dale Roberts, Lecturer.
THE CHURCH-TURING T H E S I S “ TURING MACHINES” Part 1 – Pages COMPUTABILITY THEORY.
1 Turing’s Thesis. 2 Turing’s thesis: Any computation carried out by mechanical means can be performed by a Turing Machine (1930)
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 -
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 IDT Open Seminar ALAN TURING AND HIS LEGACY 100 Years Turing celebration Gordana Dodig Crnkovic, Computer Science and Network Department Mälardalen University.
1 Turing Machines and Equivalent Models Section 13.1 Turing Machines.
1 Turing Machines - Chap 8 Turing Machines Recursive and Recursively Enumerable Languages.
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 ? ?
CS 154 Formal Languages and Computability April 12 Class Meeting Department of Computer Science San Jose State University Spring 2016 Instructor: Ron Mak.
CS 3240 – Chapter 9.  Turing Machines  From Alan Turing, 1936  Turns out to be the LAST machine  The only machine you'll ever need  The Church-Turing.
1 Computing Functions with Turing Machines. 2 A function Domain Result Region has:
Chapter 9 Turing Machines What would happen if we change the stack in Pushdown Automata into some other storage device? Truing Machines, which maintains.
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
CS 154 Formal Languages and Computability April 7 Class Meeting Department of Computer Science San Jose State University Spring 2016 Instructor: Ron Mak.
Chapters 11 and 12 Decision Problems and Undecidability.
Modeling Arithmetic, Computation, and Languages Mathematical Structures for Computer Science Chapter 8 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesTuring.
Finite Automata.
Turing’s Thesis Costas Busch - LSU.
CSE202: Introduction to Formal Languages and Automata Theory
Theory of Computation Pushdown Automata pda Lecture #10.
Part VI NP-Hardness.
Busch Complexity Lectures: Turing Machines
Deterministic Turing Machines
Pumping Lemma Revisited
Chapter 7 PUSHDOWN AUTOMATA.
Computing Functions with Turing Machines
Theory of Computation Lecture 22: Turing Machines III
Turing Machines 2nd 2017 Lecture 9.
Turing Machines Acceptors; Enumerators
Chapter 2 FINITE AUTOMATA.
فصل سوم The Church-Turing Thesis
Turing Machines (TM) Deterministic Turing Machine (DTM)
Theory of Computation Turing Machines.
Computing Functions with Turing Machines
Theory of computing, part 4
Recall last lecture and Nondeterministic TMs
Formal Definitions for Turing Machines
CS6382 Theory of Computation
Turing Machines Everything is an Integer
Theory of Computation Lecture 23: Turing Machines III
Presentation transcript:

Chapter 9 TURING MACHINES

Learning Objectives At the conclusion of the chapter, the student will be able to: Describe the components of a standard Turing machine State whether an input string is accepted by a Turing machine Construct a Turing machine to accept a specific language Trace the operation of a Turing machine transducer given a sample input string Construct a Turing machine to compute a simple function State Turing’s thesis and discuss the circumstantial evidence supporting it

The Standard Turing Machine A standard Turing machine has unlimited storage in the form of a tape consisting of an infinite number of cells, with each cell storing one symbol The read-write head can travel in both directions, processing one symbol per move A deterministic control function causes the machine to change states and possibly overwrite the tape contents Input string is surrounded by blanks, so the input alphabet is considered a proper subset of the tape alphabet

Diagram of a Standard Turing Machine In a standard Turing machine, the tape acts as the input, output, and storage medium.

Definition of a Turing Machine A Turing Machine is defined by: A finite set of internal states Q An input alphabet Σ A tape alphabet Γ A transition function δ A special symbol  from Γ called the blank An initial state q0 A set of final states F Input to the transition function δ consists of the current state of the control unit and the current tape symbol Output of δ consists of a new state, new tape symbol, and location of the next symbol to be read (L or R) δ is a partial function, so that some (state, symbol) input combinations may be undefined

Sample Turing Machine Transition Example 9.1 presents the sample transition rule: δ(q0, a) = (q1, d, R) According to this rule, when the control unit is in state q0 and the tape symbol is a, the new state is q1, the symbol d replaces a on the tape, and the read-write head moves one cell to the right

A Sample Turing Machine Example 9.2: Consider the Turing machine Q = { q0, q1 }, Σ = { a, b }, = { a, b,  }, F = { q1 } with initial state q0 and transition function given by: δ(q0, a) = (q0, b, R) δ(q0, b) = (q0, b, R) δ(q0, ) = (q1, , L) The machine starts in q0 and, as long as it reads a’s, will replace them with b’s and continue moving to the right, but b’s will not be modified When a blank is found, the control unit switches states to q1 and moves one cell to the left The machine halts whenever it reaches a configuration for which δ is not defined (in this case, state q1)

Tracing the Operation of a Turing Machine Figure 9.3 shows several stages of the operation of the Turing Machine in Example 9.2 as it processes a tape with initial contents aa

Transition Graphs for Turing Machines In a Turing machine transition graph, each edge is labeled with three items: current tape symbol, new tape symbol, and direction of the head move Figure 9.4 shows the transition graph for the Turing Machine in Example 9.2

A Turing Machine that Never Halts It is possible for a Turing machine to never halt on certain inputs, as is the case with Example 9.3 (below) and input string ab The machine runs forever –in an infinite loop- with the read- write head moving alternately right and left, but making no modifications to the tape

The Language Accepted by a Turing Machine Turing machines can be viewed as language accepters The language accepted by a Turing machine is the set of all strings which cause the machine to halt in a final state, when started in its standard initial configuration (q0, leftmost input symbol) A string is rejected if The machine halts in a nonfinal state, or The machine never halts

Turing Machines as Transducers Turing machines provide an abstract model for digital computers, acting as a transducer that transforms input into output A Turing machine transducer implements a function that treats the original contents of the tape as its input and the final contents of the tape as its output A function is Turing-computable if it can be carried out by a Turing machine capable of processing all values in the function domain

A Sample Turing Machine Transducer Given two positive integers x and y in unary notation, separated by a single zero, the Turing machine below computes the function x + y The transducer has Q = { q0, q1, q2, q3, q4 } with initial state q0 and final state q4 The defined values of the transition function are δ(q0, 1) = (q0, 1, R) δ(q0, 0) = (q1, 1, R) δ(q1, 1) = (q1, 1, R) δ(q1, ) = (q2, , L) δ(q2, 1) = (q3, 0, L) δ(q3, 1) = (q3, 1, L) δ(q3, ) = (q4, , R) When the machine halts, the read-write head is positioned on the leftmost symbol of the unary representation of x + y

Combining Turing Machines By combining Turing Machines that perform simple tasks, complex algorithms can be implemented For example, assume the existence of a machine to compare two numbers (comparer), one to add two numbers (adder), and one to erase the input (eraser) Figure 9.8 shows the diagram of a Turing Machine that computes the function f(x, y) = x + y (if x ≥ y), 0 (if x < y)

Turing’s Thesis How powerful are Turing machines? Turing’s Thesis contends that any computation carried out by mechanical means can be performed by some Turing machine An acceptance of Turing’s Thesis leads to a definition of an algorithm: An algorithm for a function f : D  R is a Turing machine M, which given any d  D on its tape, eventually halts with the correct answer f(d)  R on its tape

Evidence Supporting Turing’s Thesis Anything that can be done on any existing digital computer can also be done by a Turing machine No one has yet been able to suggest a problem, solvable by what we intuitively consider an algorithm, for which a Turing machine program cannot be written Alternative models have been proposed for mechanical computation, but none of them is more powerful than the Turing machine model