Busch Complexity Lectures: Turing Machines

Slides:



Advertisements
Similar presentations
ALAK ROY. Assistant Professor Dept. of CSE NIT Agartala
Advertisements

Fall 2006Costas Busch - RPI1 Turing Machines. Fall 2006Costas Busch - RPI2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
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.
Turing Machines.
Deterministic Turing Machines
Introduction to Computability Theory
Lecture 16 Deterministic Turing Machine (DTM) Finite Control tape head.
Variants of Turing machines
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 ? ?
Lecture 5 Turing Machines
Courtesy Costas Busch - RPI1 Turing Machines. Courtesy Costas Busch - RPI2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Turing Machines.
Fall 2006Costas Busch - RPI1 Pushdown Automata PDAs.
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 ? ?
Costas Busch - LSU1 Non-Deterministic Finite Automata.
Prof. Busch - LSU1 Pushdown Automata PDAs. Prof. Busch - LSU2 Pushdown Automaton -- PDA Input String Stack States.
Prof. Busch - LSU1 Turing Machines. Prof. Busch - LSU2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Prof. Busch - LSU1 Reductions. Prof. Busch - LSU2 Problem is reduced to problem If we can solve problem then we can solve problem.
Fall 2005Costas Busch - RPI1 Pushdown Automata PDAs.
1 Turing Machines. 2 A Turing Machine Tape Read-Write head Control Unit.
CSCI 2670 Introduction to Theory of Computing September 28, 2005.
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.
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 ? ?
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.
Costas Busch - LSU1 Deterministic Finite Automata And Regular Languages.
Turing’s Thesis Costas Busch - LSU.
Deterministic Turing Machines
COSC 3340: Introduction to Theory of Computation
Busch Complexity Lectures: Reductions
Reductions Costas Busch - LSU.
Turing Machines.
CS21 Decidability and Tractability
Pushdown Automata PDAs
Pushdown Automata PDAs
Pushdown Automata PDAs
COSC 3340: Introduction to Theory of Computation
Turing Machines 2nd 2017 Lecture 9.
Turing Machines Acceptors; Enumerators
Modeling Computation:
Chapter 9 TURING MACHINES.
Deterministic Finite Automata And Regular Languages Prof. Busch - LSU.
Non-Deterministic Finite Automata
Non-Deterministic Finite Automata
Decidable Languages Costas Busch - LSU.
Theory of computing, part 4
Turing acceptable languages and Enumerators
CS21 Decidability and Tractability
COSC 3340: Introduction to Theory of Computation
Decidability and Tractability
… NPDAs continued.
Variants of Turing machines
Formal Definitions for Turing Machines
Hopcroft, Motawi, Ullman, Chap 8
Intro to Theory of Computation
Presentation transcript:

Busch Complexity Lectures: Turing Machines Prof. Busch - LSU

The Language Hierarchy ? ? Context-Free Languages Regular Languages Prof. Busch - LSU

Context-Free Languages Languages accepted by Turing Machines Context-Free Languages Regular Languages Prof. Busch - LSU

A Turing Machine Tape ...... ...... Read-Write head Control Unit Prof. Busch - LSU

The Tape No boundaries -- infinite length ...... ...... Read-Write head The head moves Left or Right Prof. Busch - LSU

The head at each transition (time step): 1. Reads a symbol ...... ...... Read-Write head The head at each transition (time step): 1. Reads a symbol 2. Writes a symbol 3. Moves Left or Right Prof. Busch - LSU

Example: Time 0 ...... ...... Time 1 ...... ...... 1. Reads 2. Writes 3. Moves Left Prof. Busch - LSU

Time 1 ...... ...... Time 2 ...... ...... 1. Reads 2. Writes 3. Moves Right Prof. Busch - LSU

The Input String Input string Blank symbol ...... ...... head Head starts at the leftmost position of the input string Prof. Busch - LSU

States & Transitions Write Read Move Left Move Right Prof. Busch - LSU

Example: Time 1 ...... ...... current state Prof. Busch - LSU

Time 1 ...... ...... Time 2 ...... ...... Prof. Busch - LSU

Example: Time 1 ...... ...... Time 2 ...... ...... Prof. Busch - LSU

Example: Time 1 ...... ...... Time 2 ...... ...... Prof. Busch - LSU

Turing Machines are deterministic Determinism Turing Machines are deterministic Not Allowed Allowed No lambda transitions allowed Prof. Busch - LSU

Partial Transition Function Example: ...... ...... Allowed: No transition for input symbol Prof. Busch - LSU

Halting The machine halts in a state if there is no transition to follow Prof. Busch - LSU

Halting Example 1: ...... ...... No transition from HALT!!! Prof. Busch - LSU

No possible transition from and symbol Halting Example 2: ...... ...... No possible transition from and symbol HALT!!! Prof. Busch - LSU

Accepting States Not Allowed Allowed Accepting states have no outgoing transitions The machine halts and accepts Prof. Busch - LSU

Acceptance If machine halts Accept Input in an accept state string in a non-accept state or If machine enters an infinite loop Reject Input string Prof. Busch - LSU

In order to accept an input string, Observation: In order to accept an input string, it is not necessary to scan all the symbols in the string Prof. Busch - LSU

Turing Machine Example Input alphabet Accepts the language: Prof. Busch - LSU

Time 0 Prof. Busch - LSU

Time 1 Prof. Busch - LSU

Time 2 Prof. Busch - LSU

Time 3 Prof. Busch - LSU

Time 4 Halt & Accept Prof. Busch - LSU

Rejection Example Time 0 Prof. Busch - LSU

No possible Transition Time 1 No possible Transition Halt & Reject Prof. Busch - LSU

A simpler machine for same language but for input alphabet Accepts the language: Prof. Busch - LSU

Not necessary to scan input Time 0 Halt & Accept Not necessary to scan input Prof. Busch - LSU

Infinite Loop Example A Turing machine for language Prof. Busch - LSU

Time 0 Prof. Busch - LSU

Time 1 Prof. Busch - LSU

Time 2 Prof. Busch - LSU

Time 2 Time 3 Infinite loop Time 4 Time 5 Prof. Busch - LSU

Because of the infinite loop: The accepting state cannot be reached The machine never halts The input string is rejected Prof. Busch - LSU

Another Turing Machine Example Turing machine for the language Prof. Busch - LSU

Basic Idea: Match a’s with b’s: Repeat: replace leftmost a with x find leftmost b and replace it with y Until there are no more a’s or b’s If there is a remaining a or b reject Prof. Busch - LSU

Time 0 Prof. Busch - LSU

Time 1 Prof. Busch - LSU

Time 2 Prof. Busch - LSU

Time 3 Prof. Busch - LSU

Time 4 Prof. Busch - LSU

Time 5 Prof. Busch - LSU

Time 6 Prof. Busch - LSU

Time 7 Prof. Busch - LSU

Time 8 Prof. Busch - LSU

Time 9 Prof. Busch - LSU

Time 10 Prof. Busch - LSU

Time 11 Prof. Busch - LSU

Time 12 Prof. Busch - LSU

Time 13 Halt & Accept Prof. Busch - LSU

machine for the language Observation: If we modify the machine for the language we can easily construct a machine for the language Prof. Busch - LSU

Formal Definitions for Turing Machines Prof. Busch - LSU

Transition Function Prof. Busch - LSU

Transition Function Prof. Busch - LSU

Turing Machine: Input Tape alphabet alphabet States Transition Accept function Accept states Initial state blank Prof. Busch - LSU

Configuration Instantaneous description: Prof. Busch - LSU

Time 4 Time 5 A Move: (yields in one mode) Prof. Busch - LSU

Time 4 Time 5 Time 6 Time 7 A computation Prof. Busch - LSU

Equivalent notation: Prof. Busch - LSU

Initial configuration: Input string Prof. Busch - LSU

The Accepted Language For any Turing Machine Initial state Accept state Prof. Busch - LSU

Recursively Enumerable If a language is accepted by a Turing machine then we say that is: Turing Recognizable Other names used: Turing Acceptable Recursively Enumerable Prof. Busch - LSU