Computability and Complexity 3-1 Turing Machine Computability and Complexity Andrei Bulatov.

Slides:



Advertisements
Similar presentations
Part VI NP-Hardness. Lecture 23 Whats NP? Hard Problems.
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.
CS 345: Chapter 9 Algorithmic Universality and Its Robustness
Lecture 16 Deterministic Turing Machine (DTM) Finite Control tape head.
Variants of Turing machines
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.
Computability and Complexity 4-1 Existence of Undecidable Problems Computability and Complexity Andrei Bulatov.
Computability and Complexity 14-1 Computability and Complexity Andrei Bulatov Cook’s Theorem.
1 Introduction to Computability Theory Lecture11: Variants of Turing Machines Prof. Amos Israeli.
CS5371 Theory of Computation Lecture 11: Computability Theory II (TM Variants, Church-Turing Thesis)
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.
CS5371 Theory of Computation Lecture 10: Computability Theory I (Turing Machine)
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 ? ?
Chapter 9 Turing Machine (TMs).
1 Turing Machines. 2 A Turing Machine Tape Read-Write head Control Unit.
AUTOMATA THEORY VIII.
Turing Machines A more powerful computation model than a PDA ?
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen Department of Computer Science University of Texas-Pan American.
 Computability Theory Turing Machines Professor MSc. Ivan A. Escobar
Transparency No. P3C1-1 Turing Machines PART III Turing Machines and Effective Computability.
Introduction to CS Theory Lecture 15 –Turing Machines Piotr Faliszewski
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI CSCI 230 Models of Computation - Turing Machines Dale Roberts, Lecturer.
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.
1 Turing Machines Reading: Chapter 8. 2 Turing Machines are… Very powerful (abstract) machines that could simulate any modern day computer (although very,
Computer Science 101 Theory of Computing. Computer Science is... The study of algorithms, with respect to –their formal properties –their linguistic realizations.
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich
Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.
Costas Busch - LSU1 Turing’s Thesis. Costas Busch - LSU2 Turing’s thesis (1930): Any computation carried out by mechanical means can be performed by a.
Computability and Complexity 2-1 Problems and Languages Computability and Complexity Andrei Bulatov.
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,
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 ? ?
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 ? ?
Modeling Arithmetic, Computation, and Languages Mathematical Structures for Computer Science Chapter 8 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesTuring.
Turing’s Thesis Costas Busch - LSU.
8. Introduction to Turing Machines
More variants of Turing Machines
Non Deterministic Automata
Busch Complexity Lectures: Turing Machines
CS21 Decidability and Tractability
Pumping Lemma Revisited
Turing Machines 2nd 2017 Lecture 9.
Turing Machines Acceptors; Enumerators
Chapter 9 TURING MACHINES.
فصل سوم The Church-Turing Thesis
Non-Deterministic Finite Automata
Theory of Computation Turing Machines.
8. Introduction to Turing Machines
CS21 Decidability and Tractability
Recall last lecture and Nondeterministic TMs
Decidability and Tractability
Variants of Turing Machines
Variants of Turing machines
Theory of Computation Lecture 23: Turing Machines III
Presentation transcript:

Computability and Complexity 3-1 Turing Machine Computability and Complexity Andrei Bulatov

Computability and Complexity 3-2 What is a computation? Alan Turing considered this question in 1936 He argued that any computation can be done using the following steps: Concentrate on one part of the problem (for example, one piece of paper, one arithmetic operation, etc.) Depending on this, and present state of the computer: - Modify this part of problem; - Move to another part of problem; - Change into a new state. Repeat this until finished.

Computability and Complexity 3-3 Implications If the computation can be described in a finite space, then there can can be only a finite number of different situations to deal with Therefore, there can be only a finite number of “states” and a finite number of “symbols”. But note that the computation might continue forever and never finish, and it might use (potentially) infinite storage space

INPUT Computability and Complexity The Turing Machine

Computability and Complexity 3-5 Turing Machine Configuration Tape contains a sequence (infinite to the right) of symbols from an alphabet  almost all of the members of this sequence (except for a finite number) are the blank symbol  At the first step it contains the input, i.e. the non-blank symbols on the tape constitutes the input Head reads one cell (one symbol on the tape) at the first step it reads the leftmost symbol on the tape Control Device is in one of the states from a finite set of states Q at the first step it is in the initial state

Computability and Complexity 3-6 Turing Machine Operation 1.At each step of operation machine is in one of the states, say q (initially state is ) 2.The machine is reading one symbol on tape, say s 3.To execute one step, the machine looks up the value of a transition function  ( q, s ), which is, say, ( q’, s’, m ) 4.The machine: changes to state q’ ; overwrites the symbol s with s’ ; moves the head along the tape according to m ( R =Right, L =Left, S =Static). 5.Execution stops when a final state is reached

Computability and Complexity 3-7 Turing Machine Definition Definition A Turing Machine is a 6-tuple where 1.Q is a finite set of states 2.  is the input alphabet not containing the blank symbol  3.  is the tape alphabet, where   and    4.  is a transition function 5. is the initial state 6.F  Q is a set of final states

Computability and Complexity 3-8 Question What do the following machines do?

Computability and Complexity 3-9 TM Example Let T be the TM : Q = {1,2,3}  = {a,b}  = { ,a,b}  = {  ( 1,a ),( 2,a,R ) ,  ( 1,b ),( 2,b,R ) ,  ( 1,  ),( 2, ,R ) ,  ( 2,a ),( 3,a,S ) ,  ( 2,b ),( 2,b,R ) ,  ( 2,  ),( 2, ,R )  } = 1 F = {3}

Computability and Complexity 3-10 TM Example Let T be the TM : Q = {a,b,c,d,e}  = {0,1}  = { ,0,1}  = {  ( a,0 ),( e,1,L ) ,  ( c,0 ),( d, ,R ) ,  ( a,1 ),( a,0,L ) ,  ( c,1 ),( b, ,R ) ,  ( a,  ),( e,1,S ) ,  ( c,  ),( e, ,S ) ,  ( b,0 ),( d,1,R ) ,  ( d,0 ),( d,0,R ) ,  ( b,1 ),( b,1,R ) ,  ( d,1 ),( b,0,R ) ,  ( b,  ),( a,1,S ) ,  ( d,  ),( a,0,S )  } = c F = {e}

Computability and Complexity 3-11 TM Diagram c e a bd  |  |S 0  |01|LS 0|  |R 1|  |R  |1|S 0|1|R 1|1|R 1|0|R 0|0|R  |0|S 1|0|L

Computability and Complexity 3-12 Configurations Configurations: To completely describe a TM in operation we need: The current state The content of the tape The position of the head This information is called the configuration (or global state) Computation: a (possibly infinite) sequence of configurations entered by a TM beginning with an initial configuration Initial configuration: for machine T and input string x consists of: The initial state, The tape starting with x, all other cells blank The head on the leftmost cell

Computability and Complexity 3-13 Acceptors and Transducers Acceptor machines: have 2 final states “Accept” ( ) “Reject” ( ) These machines can be used to solve decision problems: input x is accepted by T if T ( x ) is finite and ends in the “Accept” state. Language accepted: set of inputs accepted by T, denoted by L ( T )

Computability and Complexity 3-14 INPUT A? R?

Computability and Complexity 3-15 Transducer : T computes (partial) function f if computation T(x) halts in a final state with f(x) on the output tape

Computability and Complexity 3-16 INPUT H? OUTPU T

Computability and Complexity 3-17 Turing’s Thesis “Any function which can be computed by any well-defined procedure can be computed by a Turing Machine” (Also called Church’s Hypothesis, Sequential Computing Hypothesis)

Computability and Complexity 3-18 k -tape TM Transition function: Initial configuration : the first tape contains an input the other tapes contain only blank symbols

Computability and Complexity 3-19 Nondeterministic TM We can relax the definition of a TM to allow more than one possible transition for any pair  q, s  of state and symbol This gives a nondeterministic TM (i.e. it has a choice of actions) Nondeterministic computation: a tree of possible configurations resulting from a start configuration For machine NT and input x this is denoted NT(x)

Computability and Complexity 3-20 Nondeterministic Acceptor Computation path: is any path (finite or infinite) from the root of NT(x) Accepting computation: is a finite computation path ending in the “Accept” state Language accepted: is the set of inputs x having some accepting computation in NT(x), denoted L (NT).

Computability and Complexity 3-21 RR R R R A R Time

Computability and Complexity 3-22 Random Access Machines Another model of computation is the Random Access Machine, which has an infinite series of memory locations, where each can contain an arbitrary integer a processor which can perform basic operations, including addition, subtraction, integer division by 2, indirect addressing, conditional goto, and halt a finite program specifying a sequence of basic operations involving the contents of memory locations Theorem Given a RAM, it is possible to derive an equivalent 3-tape deterministic TM

Computability and Complexity 3-23 H? 1.READ 1 2.STORE 1 3.STORE 5 4.READ 2 5.STORE 2 6.HALF 7.STORE 3 8.ADD 3 9.SUB 2 10.JZERO LOAD 4 12.ADD 5 13.STORE 4 14.LOAD 5 15.ADD 5 16.STORE 5 17.LOAD 3 18.JZERO JUMP 5 20.LOAD 4 21.HALT

Computability and Complexity 3-24 Simulations The following machines can all be simulated by a TM with one tape and alphabet {0,1} TMs with tape infinite in both directions TMs with more than one tape TMs with 2-dimensional tape (or more!) TMs with several read/write heads on each tape Nondeterministic TMs RAM Machines

Computability and Complexity 3-25 Other Models The following people also proposed models of general computation*: Post (1936) — “Post’s normal systems” Kleene (1936) — “recursive functions” Church (1941) — “lambda calculus” Markov (1954) — “Markov’s rewriting systems” All of these have been shown to be equivalent to Turing Machines *see “Machine Models and Simulations” in the Handbook of Theoretical Computer Science, MIT Press, 1990