1 Turing Machines - Chap 8 Turing Machines Recursive and Recursively Enumerable Languages.

Slides:



Advertisements
Similar presentations
Restricted Machines Presented by Muhannad Harrim.
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
CS2303-THEORY OF COMPUTATION
Lecture 16 Deterministic Turing Machine (DTM) Finite Control tape head.
1 Introduction to Computability Theory Lecture11: Variants of Turing Machines Prof. Amos Israeli.
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 ? ?
Lecture 5 Turing Machines
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)
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 ? ?
Finite State Machines Data Structures and Algorithms for Information Processing 1.
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 ?
Complexity and Computability Theory I Lecture #13 Instructor: Rina Zviel-Girshin Lea Epstein Yael Moses.
Undecidability Everything is an Integer Countable and Uncountable Sets
Turing Machines Recursive and Recursively Enumerable Languages
 Computability Theory Turing Machines Professor MSc. Ivan A. Escobar
Introduction to CS Theory Lecture 15 –Turing Machines Piotr Faliszewski
Turing Machines Chapter 17. Languages and Machines SD D Context-Free Languages Regular Languages reg exps FSMs cfgs PDAs unrestricted grammars Turing.
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.
Computer Science 101 Theory of Computing. Computer Science is... The study of algorithms, with respect to –their formal properties –their linguistic realizations.
1 Turing’s Thesis. 2 Turing’s thesis: Any computation carried out by mechanical means can be performed by a Turing Machine (1930)
 2005 SDU Lecture13 Reducibility — A methodology for proving un- decidability.
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.
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.
Overview of the theory of computation Episode 3 0 Turing machines The traditional concepts of computability, decidability and recursive enumerability.
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,
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.
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 8.4 Extensions to the Basic TM Extended TM’s to be studied: Multitape Turing machine Nondeterministic Turing machine The above extensions make no increase.
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 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.
8. Introduction to Turing Machines
Recursively Enumerable and Recursive Languages
ماشین های تورینگ، تشخیص پذیری و تصمیم پذیری زبان ها
Busch Complexity Lectures: Turing Machines
Turing Machines.
CS21 Decidability and Tractability
Pushdown Automata PDAs
Turing Machines 2nd 2017 Lecture 9.
Turing Machines Acceptors; Enumerators
Chapter 9 TURING MACHINES.
Jaya Krishna, M.Tech, Assistant Professor
Decidable Languages Costas Busch - LSU.
8. Introduction to Turing Machines
CS21 Decidability and Tractability
Decidability and Tractability
Hopcroft, Motawi, Ullman, Chap 8
Turing Machines Everything is an Integer
Presentation transcript:

1 Turing Machines - Chap 8 Turing Machines Recursive and Recursively Enumerable Languages

2 Turing-Machine Theory  The purpose of the theory of Turing machines is to prove that certain specific languages have no algorithm.  Start with a language about Turing machines themselves.  Reductions are used to prove more common questions undecidable.

3 Picture of a Turing Machine State... ABCAD Infinite tape with squares containing tape symbols chosen from a finite alphabet Action: based on the state and the tape symbol under the head: change state, rewrite the symbol and move the head one square.

4 Why Turing Machines?  Why not deal with C programs or something like that?  Answer: You can, but it is easier to prove things about TM’s, because they are so simple.  And yet they are as powerful as any computer.  More so, in fact, since they have infinite memory.

5 Turing-Machine Formalism  A TM is described by: 1.A finite set of states (Q, typically). 2.An input alphabet (Σ, typically). 3.A tape alphabet (Γ, typically; contains Σ). 4.A transition function (δ, typically). 5.A start state (q 0, in Q, typically). 6.A blank symbol (B, in Γ- Σ, typically).  All tape except for the input is blank initially. 7.A set of final states (F C Q, typically).

6 Conventions  a, b, … are input symbols.  X, Y, Z are tape symbols.  w, x, y, z are strings of input symbols.  , ,… are strings of tape symbols.

7 The Transition Function  Takes two arguments:  A state, in Q.  A tape symbol in Γ.  δ(q, Z) is either undefined or a triple of the form (p, Y, D).  p is a state.  Y is the new tape symbol.  D is a direction, L or R.

8 Actions of the PDA  If δ(q, Z) = (p, Y, D) then, in state q, scanning Z under its tape head, the TM:  Changes the state to p.  Replaces Z by Y on the tape.  Moves the head one square in direction D.  D = L: move left; D = R; move right.

9 Example: Turing Machine  This TM scans its input right, looking for a 1.  If it finds one, it changes it to a 0, goes to final state f, and halts.  If it reaches a blank, it changes it to a 1 and moves left.

10 Example: Turing Machine – (2)  States = {q (start), f (final)}.  Input symbols = {0, 1}.  Tape symbols = {0, 1, B}.  δ(q, 0) = (q, 0, R).  δ(q, 1) = (f, 0, R).  δ(q, B) = (q, 1, L).

11 Moves of TM δ (q, 0) = (q, 0, R) δ (q, 1) = (f, 0, R) δ (q, B) = (q, 1, L)... B B 0 0 B B... q

12 Moves of TM δ (q, 0) = (q, 0, R) δ (q, 1) = (f, 0, R) δ (q, B) = (q, 1, L)... B B 0 0 B B... q

13 Moves of TM δ (q, 0) = (q, 0, R) δ (q, 1) = (f, 0, R) δ (q, B) = (q, 1, L)... B B 0 0 B B... q

14 Moves of TM δ (q, 0) = (q, 0, R) δ (q, 1) = (f, 0, R) δ (q, B) = (q, 1, L)... B B B... q

15 Moves of TM δ (q, 0) = (q, 0, R) δ (q, 1) = (f, 0, R) δ (q, B) = (q, 1, L)... B B B... q

16 Moves of TM δ (q, 0) = (q, 0, R) δ (q, 1) = (f, 0, R) δ (q, B) = (q, 1, L)... B B B... f No move is possible. The TM halts and accepts.

17 Instantaneous Descriptions of a Turing Machine  Initially, a TM has a tape consisting of a string of input symbols surrounded by an infinity of blanks in both directions.  The TM is in the start state, and the head is at the leftmost input symbol.

18 TM ID’s – (2)  An ID is a string  q , where  is the tape between the leftmost and rightmost nonblanks (inclusive).  The state q is immediately to the left of the tape symbol scanned.  If q is at the right end, it is scanning B.  If q is scanning a B at the left end, then consecutive B’s at and to the right of q are part of .

19 TM ID’s – (3)  As for PDA’s we may use symbols I-- ⊦ and |--* to represent “becomes in one move” and “becomes in zero or more moves,” respectively, on ID’s.  Example: The moves of the previous TM are q00 |-- ⊦ 0q0 |-- 00q |-- 0q01 |- - ⊦ 00q1 |-- 000f

20 Formal Definition of Moves

21 Formal Definition of Moves

22 Languages of a TM  The language L(M) accepted by a TM M is: L(M) = {w | q 0 w |--* I, where I is an ID with a final state}.

23 Turing machine - Second Example:

24 diagram representing Turing machines

25 Recursively Enumerable Languages  We now see that the classes of languages defined by TM’s using final state and halting are the same.  This class of languages is called the recursively enumerable languages.  The term actually predates the Turing machine and refers to another notion of computation of functions.

26 Recursive Languages  An algorithm is a TM that is guaranteed to halt whether or not it accepts.  If L = L(M) for some TM M that is an algorithm, we say L is a recursive language.

27 Example: Recursive Languages  Every CFL is a recursive language.  Use the CYK algorithm.  Every regular language is a CFL (think of its DFA as a PDA that ignores its stack); therefore every regular language is recursive.  Almost anything you can think of is recursive.