Theory of Computation Automata Theory Dr. Ayman Srour.

Slides:



Advertisements
Similar presentations
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.
Advertisements

Introduction to Computability Theory
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.
Simulating a modern computer by a Turing machine and vice versa CS 6800 Instructor: Dr. Elise de Doncker By Shweta Gowda Saikiran Ponnam.
Prof. Busch - LSU1 Decidable Languages. Prof. Busch - LSU2 Recall that: A language is Turing-Acceptable if there is a Turing machine that accepts Also.
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.
Computation Theory Introduction to Turing Machine.
CHAPTER 4 Decidability Contents Decidable Languages
CS5371 Theory of Computation Lecture 10: Computability Theory I (Turing Machine)
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 ? ?
1 Introduction to Computability Theory Lecture11: The Halting Problem Prof. Amos Israeli.
AUTOMATA THEORY VIII.
Turing Machines A more powerful computation model than a PDA ?
Complexity and Computability Theory I Lecture #13 Instructor: Rina Zviel-Girshin Lea Epstein Yael Moses.
Turing Machines Chapter Plan Turing Machines(TMs) – Alan Turing Church-Turing Thesis – Definitions Computation Configuration Recognizable vs. Decidable.
CSCI 2670 Introduction to Theory of Computing September 28, 2005.
 Computability Theory Turing Machines Professor MSc. Ivan A. Escobar
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.
The Church-Turing Thesis Chapter 3 Giorgi Japaridze Theory of Computability.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 3 The Church-Turing Thesis Contents Turing Machines definitions, examples,
1 Turing’s Thesis. 2 Turing’s thesis: Any computation carried out by mechanical means can be performed by a Turing Machine (1930)
TM Design Macro Language D and SD MA/CSSE 474 Theory of Computation.
Donghyun (David) Kim Department of Mathematics and Computer Science North Carolina Central University 1 Chapter 3 Church-Turing Thesis Some slides are.
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich
Formal Models 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.
CS 3240: Languages and Computation
CSCI 2670 Introduction to Theory of Computing October 7, 2004.
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 ? ?
CSCI 2670 Introduction to Theory of Computing September 29, 2005.
Universal Turing Machine
Theory of Computational Complexity TA : Junichi Teruyama Iwama lab. D3
Theory of Computation Automata Theory Dr. Ayman Srour.
Modeling Arithmetic, Computation, and Languages Mathematical Structures for Computer Science Chapter 8 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesTuring.
CSE202: Introduction to Formal Languages and Automata Theory
Complexity and Computability Theory I
COSC 3340: Introduction to Theory of Computation
Turing Machines.
CS21 Decidability and Tractability
Pumping Lemma Revisited
COSC 3340: Introduction to Theory of Computation
Turing Machines 2nd 2017 Lecture 9.
CSE 105 theory of computation
Turing Machines Acceptors; Enumerators
Chapter 9 TURING MACHINES.
Chapter 3: The CHURCH-Turing thesis
فصل سوم The Church-Turing Thesis
CSE 105 theory of computation
Decidable Languages Costas Busch - LSU.
MA/CSSE 474 Theory of Computation
COSC 3340: Introduction to Theory of Computation
CSE 105 theory of computation
CSE 105 theory of computation
CSE 105 theory of computation
CSE 105 theory of computation
Presentation transcript:

Theory of Computation Automata Theory Dr. Ayman Srour

TOPIC 5 Turing Machine OUTLINE 5.1 Introduction 5.2 Formal Definition Of A Turing Machine 5.3 Configurations 5.4 Examples Of Turing Machines

5.1 Introduction We turn now to a much more powerful model, first proposed by Alan Turing in 1936, called the Turing machine. Similar to a finite automaton but with an unlimited and unrestricted memory, a Turing machine is a much more accurate model of a general purpose computer. A Turing machine can do everything that a real computer can do. The Turing machine model uses an infinite tape as its unlimited memory. It has a tape head that can read and write symbols and move around on the tape.

5.1 Introduction Initially the tape contains only the input string and is blank everywhere else. If the machine needs to store information, it may write this information on the tape. To read the information that it has written, the machine can move its head back over it. The machine continues computing until it decides to produce an output. The outputs accept and reject are obtained by entering designated accepting and rejecting states. If it doesn't enter an accepting or a rejecting state, it will go on forever, never halting.

5.1 Introduction  Finite automata VS. Turing machines. The following list summarizes the differences between finite automata and Turing machines: 1.A Turing machine can both write on the tape and read from it. 2.The read-write head can move both to the left and to the right. 3.The tape is infinite. 4.The special states for rejecting and accepting take effect immediately.

5.1 Introduction  Example Let's introduce a Turing machine M1 for testing membership in the language We want M1 to accept if its input is a member of B and to reject otherwise. Imagine that the impute string contains millions of characters. Your goal is to determine whether the input is a member of B-that is, whether the input comprises two identical strings separated by a # symbol.

5.1 Introduction  Example The input is too long for you to remember it all, but you are allowed to move back and forth over the input and make marks on it. The obvious strategy is to zig-zag to the corresponding places on the two sides of the # and determine whether they match. Place marks on the tape to keep track of which places correspond.

5.1 Introduction  Example Al, = "On input string w: 1.Zig-zag across the tape to corresponding positions on either side of the # symbol to check whether these positions contain the same symbol. If they do not, or if no # is found, reject. Cross off symbols as they are checked to keep track of which symbols correspond. 2. When all symbols to the left of the # have been crossed off, check for any remaining symbols to the right of the #. If any symbols remain, reject; otherwise, accept."

5.1 Introduction  Example The following figure contains several snapshots of Ml 's tape while it is computing in stages 2 and 3 when started on input #

5.2 Formal Definition Of A Turing Machine

 Definition “ Call a language Turing-recognizable if some Turing machine recognizes it.” The collection of strings that M accepts is the language of M, or the language recognized by M, denoted L(M). When we start a Turing machine on an input, three outcomes are possible. The machine may accept, reject, or loop. By loop we mean that the machine simply does not halt. Looping may entail any simple or complex behavior that never leads to a halting state.

5.2 Formal Definition Of A Turing Machine A Turing machine M can fail to accept an input by entering the q reject state and rejecting, or by looping. Sometimes distinguishing a machine that is looping from one that is merely taking a long time is difficult. For this reason we prefer Turing machines that halt on all inputs; such machines never loop. These machines are called deciders because they always make a decision to accept or reject. A decider that recognizes some language also is said to decide that language.  Definition “Call a language Turing-decidable or simply decidable if some Turing machine decides it.”

5.3 Configurations A configuration of a Turing machine is the setting of its tape, head, and state. If the tape contents are a 1,..., a m, ⊔,..., the head is located on the kth square, and the state is q, then write a 1... a k−1 qa k... a m to represent the configuration as a word. Note that Q is treated as an alphabet. The infinite stretch of ⊔ ’s to the right of the head position is omitted from configuration. However, at least one symbol must appear after the state symbol. Thus a configuration is a word in.

5.3 Configurations  Example The configuration is abq 1 abc The configuration is aq 2 bbbc.

5.3 Configurations The action of a TM can be viewed as rewriting of the configuration. configuration C1 yields C2 if the Turing machine can go from C 1 to C 2 in a single step.

5.3 Configurations Special Configurations: An accepting configuration (A rejecting configuration) is one in which the state is q accept (q reject ). Both accepting configuration and rejecting configuration are halting configurations.

5.4 Examples Of Turing Machines Here we describe a Turing machine (TM) M 2 that decides A ={0^2 n | n>= 0}, the language consisting of all strings of Os whose length is a power of 2 M2 = "On input string w: 1. Sweep left to right across the tape, crossing off every other If in stage I the tape contained a single 0, accept. 3. If in stage 1 the tape contained more than a single 0 and the number of Os was odd, reject. 4. Return the head to the left-hand end of the tape. 5. Go to stage l."

5.4 Examples Of Turing Machines Now we give the formal description

5.4 Examples of Turing Machines State diagram for Turing machine M2

5.4 Examples of Turing Machines Next we give a sample run of this machine on input The starting configuration is q The sequence of configurations the machine enters appears as follows; read down the columns and left to right.

5.4 Examples Of Turing Machines

5.4d Examples Of Turing Machines