Turing Machines Chapter 3.1 1. Plan Turing Machines(TMs) – Alan Turing Church-Turing Thesis – Definitions Computation Configuration Recognizable vs. Decidable.

Slides:



Advertisements
Similar presentations
1 Turing Machines Zeph Grunschlag. 2 Agenda Turing Machines Alan Turing Motivation Church-Turing Thesis Definitions Computation TM Configuration Recognizers.
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
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.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Variants.
Turing Machines New capabilities: –infinite tape –can read OR write to tape –read/write head can move left and right q0q0 input tape.
Complexity ©D.Moshkovitz 1 Turing Machines. Complexity ©D.Moshkovitz 2 Motivation Our main goal in this course is to analyze problems and categorize them.
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Based on Slides by Zeph Grunschlag from Columbia University www1.cs.columbia.edu/~zeph/3261/L14/L14.ppt Basic Computability Reading Material: J. Savage,
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.
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)
1 Foundations of Software Design Fall 2002 Marti Hearst Lecture 29: Computability, Turing Machines, Can Computers Think?
Computability and Complexity 3-1 Turing Machine Computability and Complexity Andrei Bulatov.
Fall 2005Costas Busch - RPI1 Recursively Enumerable and Recursive Languages.
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 ? ?
Turing Machines CS 105: Introduction to Computer Science.
Prof. Busch - LSU1 Turing Machines. Prof. Busch - LSU2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
1 Turing Machines. 2 A Turing Machine Tape Read-Write head Control Unit.
AUTOMATA THEORY VIII.
Lecture 14: Church-Turing Thesis Alonzo Church ( ) Alan Turing ( )
Turing Machines A more powerful computation model than a PDA ?
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.
 Computability Theory Turing Machines Professor MSc. Ivan A. Escobar
Introduction to CS Theory Lecture 15 –Turing Machines Piotr Faliszewski
The Halting Problem – Undecidable Languages Lecture 31 Section 4.2 Wed, Oct 31, 2007.
Halting Problem Introduction to Computing Science and Programming I.
THE CHURCH-TURING T H E S I S “ TURING MACHINES” Part 1 – Pages COMPUTABILITY THEORY.
Foundations of (Theoretical) Computer Science Chapter 3 Lecture Notes (Section 3.1: Turing Machines) David Martin With some modifications.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
1 Turing’s Thesis. 2 Turing’s thesis: Any computation carried out by mechanical means can be performed by a Turing Machine (1930)
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich
CS 3240: Languages and Computation
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. 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,
CS 461 – Oct. 28 TM applications –Recognize a language √ –Arithmetic √ –Enumerate a set –Encode a data structure or problem to solve Two kinds of TMs –Decider:
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.
Turing Machines CS 130 Theory of Computation HMU Textbook: Chap 8.
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Theory of Computation Automata Theory Dr. Ayman Srour.
CSE202: Introduction to Formal Languages and Automata Theory
Busch Complexity Lectures: Turing Machines
CS21 Decidability and Tractability
Pumping Lemma Revisited
COSC 3340: Introduction to Theory of Computation
Turing Machines 2nd 2017 Lecture 9.
Turing Machines Acceptors; Enumerators
Turing Machines (At last!).
Chapter 9 TURING MACHINES.
Chapter 3: The CHURCH-Turing thesis
فصل سوم The Church-Turing Thesis
Turing Machines (TM) Deterministic Turing Machine (DTM)
ICS 353: Design and Analysis of Algorithms
Decidable Languages Costas Busch - LSU.
ICS 353: Design and Analysis of Algorithms
CS21 Decidability and Tractability
Recall last lecture and Nondeterministic TMs
Decidability and Tractability
Presentation transcript:

Turing Machines Chapter 3.1 1

Plan Turing Machines(TMs) – Alan Turing Church-Turing Thesis – Definitions Computation Configuration Recognizable vs. Decidable – Examples – Simulator 2

Alan Turing Alan Turing was one of the founding fathers of CS. His computer model the Turing Machine(1936) was the inspiration for the electronic computer that came two decades later Was instrumental in cracking the Nazi Enigma cryptosystem in WWII Invented the “Turing Test” used in AI The Turing Award. Pre-eminent award in Theoretical CS (called the “Nobel Prize” of CS) 3

Church-Turing Thesis Thesis- Every effectively calculable function is a computable function Everything that is computable is computable by a Turing machine The thesis remains a hypothesis – Despite the fact that it cannot be formally proven the Church–Turing thesis now has near-universal acceptance. 4

Turing Machine Most powerful machine so far… – Similar to a finite automata 1.Uses infinite tape as memory 2.Can both read from and write to the tape 3.Read/write head can move left/right 4.Accept/reject take affect immediately Cannot solve all problems

Comparison with Previous Models 6 Device Separate Input? Read/Write Data Structure Deterministic by default? FAYesNoneYes PDAYesLIFO StackNo TMNo 1-way infinite tape. 1 cell access per step. Yes

Formal Definition of a TM 7

Successor Program Sample Rules: 1.If read 1, write 0, go right, repeat. 2.If read 0, write 1, HALT! 3.If read “”, write 1, HALT! Using these rules on a tape containing the reverse binary representation of 47 we obtain: 8

Successor Program If read 1, write 0, go right, repeat. If read 0, write 1, HALT! If read “”, write 1, HALT!

Successor Program If read 1, write 0, go right, repeat. If read 0, write 1, HALT! If read “”, write 1, HALT!

Successor Program If read 1, write 0, go right, repeat. If read 0, write 1, HALT! If read “”, write 1, HALT!

Successor Program If read 1, write 0, go right, repeat. If read 0, write 1, HALT! If read “”, write 1, HALT!

Successor Program If read 1, write 0, go right, repeat. If read 0, write 1, HALT! If read “”, write 1, HALT!

Successor Program If read 1, write 0, go right, repeat. If read 0, write 1, HALT! If read “”, write 1, HALT!

Successor Program So the successor’s output on was which is the reverse binary representation of 48. Similarly, the successor of 127 should be 128: 15

Successor Program If read 1, write 0, go right, repeat. If read 0, write 1, HALT! If read “”, write 1, HALT!

Successor Program If read 1, write 0, go right, repeat. If read 0, write 1, HALT! If read “”, write 1, HALT!

Successor Program If read 1, write 0, go right, repeat. If read 0, write 1, HALT! If read “”, write 1, HALT!

Successor Program If read 1, write 0, go right, repeat. If read 0, write 1, HALT! If read “”, write 1, HALT!

Successor Program If read 1, write 0, go right, repeat. If read 0, write 1, HALT! If read “”, write 1, HALT!

Successor Program If read 1, write 0, go right, repeat. If read 0, write 1, HALT! If read “”, write 1, HALT!

Successor Program If read 1, write 0, go right, repeat. If read 0, write 1, HALT! If read “”, write 1, HALT!

Successor Program If read 1, write 0, go right, repeat. If read 0, write 1, HALT! If read “”, write 1, HALT!

Successor Program If read 1, write 0, go right, repeat. If read 0, write 1, HALT! If read “”, write 1, HALT!

Drawing the machine Draw the machine – Description 1.If read 1, write 0, go right, repeat. 2.If read 0, write 1, HALT! 3.If read “”, write 1, HALT! 25

TM Dynamic Picture A string w is accepted by M if after being put on the tape then letting M run, M eventually enters the accept state. Therefore, w is an element of L(M) - the language accepted by M. We can formalize this notion as follows: 26

TM Formal Definition Dynamic Picture Suppose TM’s configuration at time t is given by uapxv where p is the current state, ua is what’s to the left of the head, x is what’s being read, and v is what’s to the right of the head. If  p,x  = (q,y,R) then write: uapxv  uayqv With resulting configuration uaypv at time t+1. If,  p,x  = (q,y,L) instead, then write: uapxv  uqayv There are also two special cases: – head is forging new ground –pad with the blank symbol  – head is stuck at left end –by def. head stays put NOTE: “  ” is read as “yields” 27

TM outcomes Three possibilities occur on a given input w : 1.The TM M eventually enters q acc and therefore halts and accepts. (w  L(M) ) 2.The TM M eventually enters q rej or crashes somewhere. M rejects w. (w  L(M) ) 3.Neither occurs! I.e., M never halts its computation and is caught up in an infinite loop, never reaching q acc or q rej. In this case w is neither accepted nor rejected. However, any string not explicitly accepted is considered to be outside the accepted language. (w  L(M) ) 28

Recognizable vs. Decidable Recognizable- The TM recognizes the language but doesn’t necessarily reach an accept or reject state (could loop FOREVER  ) Decidable- is recognizable and guaranteed to reach an accept or reject state (without the possibility for an infinite loop ) 29

Bit-shifting example 30

31

3.7 Diagram 32

Fall 2010 Exam 2 Question ) (25 pts) Give the full, formal description of a Turing Machine that accepts the following language: L = { w#w R | where w consists of only 0s and 1s and has length at least 1. } The input alphabet will be {0, 1, #}. The tape alphabet will include 0, 1, #, B, and any other symbols you choose to include in it. Give a simple intuitive description of what each state in the machine represents. And draw the diagram for this machine.

34

35

36

Simulator Accepts 4 or 5 tuples – (Start,input,NewState, output,Direction) – (Start,input,NewState,Di rection OR output) One tape tril/tm/ tril/tm/ 37

END 38