1 Lecture 13 Turing machine model of computation –Sequential access memory (tape) –Limited data types and instructions –Formal Definition –Equivalence.

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
CS 345: Chapter 9 Algorithmic Universality and Its Robustness
THE CHURCH-TURING T H E S I S “ TURING MACHINES” Pages COMPUTABILITY THEORY.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Variants.
Simulating a modern computer by a Turing machine and vice versa CS 6800 Instructor: Dr. Elise de Doncker By Shweta Gowda Saikiran Ponnam.
1 Introduction to Computability Theory Lecture11: Variants of Turing Machines Prof. Amos Israeli.
1 Lecture 4: Formal Definition of Solvability Analysis of decision problems –Two types of inputs:yes inputs and no inputs –Language recognition problem.
1 Module 15 FSA’s –Defining FSA’s –Computing with FSA’s Defining L(M) –Defining language class LFSA –Comparing LFSA to set of solvable languages (REC)
Lecture 9 Recursive and r.e. language classes
1 Module 9 Recursive and r.e. language classes –representing solvable and half-solvable problems Proofs of closure properties –for the set of recursive.
1 Lecture 13 FSA’s –Defining FSA’s –Computing with FSA’s Defining L(M) –Defining language class LFSA.
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.
1 Lecture 16 FSA’s –Defining FSA’s –Computing with FSA’s Defining L(M) –Defining language class LFSA –Comparing LFSA to set of solvable languages (REC)
Lecture 5 Turing Machines
1 Lecture 12 Computations –Formal Definition –Important Terms Computational Models –Formal Definition –Sequential access memory (tape) –Graphical representation.
1 Lecture 16 FSA’s –Defining FSA’s –Computing with FSA’s Defining L(M) –Defining language class LFSA –Comparing LFSA to set of solvable languages (REC)
1 Lecture 13 Turing machine model of computation –Sequential access memory (tape) –Limited data types and instructions –Graphical representation –Formal.
CS5371 Theory of Computation Lecture 10: Computability Theory I (Turing Machine)
Computability and Complexity 3-1 Turing Machine Computability and Complexity Andrei Bulatov.
1 Module 4: Formal Definition of Solvability Analysis of decision problems –Two types of inputs:yes inputs and no inputs –Language recognition problem.
Prof. Busch - LSU1 Turing Machines. Prof. Busch - LSU2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Theory of Computation. Computation Computation is a general term for any type of information processing that can be represented as an algorithm precisely.
AUTOMATA THEORY VIII.
More Theory of Computing
Turing Machines A more powerful computation model than a PDA ?
COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University.
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.
Theory of Computing Lecture 15 MAS 714 Hartmut Klauck.
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
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI CSCI 230 Models of Computation - Turing Machines Dale Roberts, Lecturer.
THE CHURCH-TURING T H E S I S “ TURING MACHINES” Part 1 – Pages COMPUTABILITY THEORY.
Computer Science 101 Theory of Computing. Computer Science is... The study of algorithms, with respect to –their formal properties –their linguistic realizations.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
1 FSA’s –Defining FSA’s –Computing with FSA’s Defining L(M) –Defining language class LFSA –Comparing LFSA to set of solvable languages (REC)
 2005 SDU Lecture13 Reducibility — A methodology for proving un- decidability.
Strings Basic data type in computational biology A string is an ordered succession of characters or symbols from a finite set called an alphabet Sequence.
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich
Turing Machines Lecture 26 Naveen Z Quazilbash. Overview Introduction Turing Machine Notation Turing Machine Formal Notation Transition Function Instantaneous.
Fundamentals of Informatics Lecture 12 The Halting Problem Bas Luttik.
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.
Interactive computability Episode 13 0 Hard-play machines (HPMs) Easy-play machines (EPMs) Definition of interactive computability The interactive version.
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,
 2004 SDU 1 Algorithm Informally speaking, an algorithm is a collection of simple instructions for carrying out a task. Example:  Elementary arithmetic.
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 ? ?
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
8. Introduction to Turing Machines
Busch Complexity Lectures: Turing Machines
Pumping Lemma Revisited
Numerical Representation of Strings
Turing Machines 2nd 2017 Lecture 9.
Turing Machines Acceptors; Enumerators
Chapter 9 TURING MACHINES.
8. Introduction to Turing Machines
Formal Definitions for Turing Machines
Presentation transcript:

1 Lecture 13 Turing machine model of computation –Sequential access memory (tape) –Limited data types and instructions –Formal Definition –Equivalence to C++

2 Overview So far, we have worked with C ++ as our computational model Historically, much of the material we have just covered is usually presented with the Turing machine model of computation –We now define this computational model –Note, it is as powerful (general) as C ++

3 Language Recognition Problems We define Turing machines with language recognition problems as our focus –Decision problems are general –Decision problems can be formulated as languages with language recognition problems

4 Components of Computational Models Memory Data Types Operations Formal Definition

5 Memory Random Access Memory Model –We have been assuming a random access memory computational model for C ++ –Time to access next memory location is independent of previously accessed memory location Sequential Access Memory Model –Memory is stored on a 1-way infinite tape broken up into cells –Tape head scans currently accessed cell –Tape head begins computation at leftmost cell

6 Illustration Tape Head Time to access a particular cell is dependent on current tape head location...

7 Data Types C ++ has many data types –integers –reals –characters –allows definition of new data types Turing machine –just characters –Alphabet will typically be just {a,b} or {0,1} We also have an implicitly defined blank character B

8 Illustration... B baabBB Tape Head The first cell will always be a blank. Then the input will appear. Then an infinite series of blanks

9 Operations C ++ has a complex operation set –some operations change memory –other operations control flow of execution Turing machine operation set –Memory operations read a character write a character tape head movement –simple control flow switch statements goto statements

10 Illustration... B baabBB Tape Head 1 switch(current tape cell) { case a: write b; move tapehead left 1 cell; goto 7; case b: write a; move tapehead right 1 cell; goto 4; case B: write B; keep tapehead stationary; return YES; } 2 switch(current tape cell) {...

11 Sample Program 1 switch(current tape cell) { case a: write a; move tapehead right 1 cell; goto 2; case b: write b; move tapehead right 1 cell; goto 2; case B: write B; move tapehead right 1 cell; goto 2; } 2 switch(current tape cell) { case a: write a; move tapehead right 1 cell; goto 3; case b: write b; move tapehead right 1 cell; goto 3; case B: write B; keep tapehead stationary; return YES; } 3 switch(current tape cell) { case a: write a; move tapehead right 1 cell; goto 2; case b: write b; move tapehead right 1 cell; goto 2; case B: write B; keep tapehead stationary; return NO; }

12 Church-Turing Thesis The Turing machine computational model is a general model of computation What this means –Turing machines are as general as any other model of computation including C ++ –Any language/problem that can be solved by a C ++ program can be solved by a Turing machine

13 Example 1 switch(current tape cell) { case B: write B; move tapehead right 1 cell; goto 2; } 2 switch(current tape cell) { case a: write a; move tapehead right 1 cell; goto 3; case b: write b; move tapehead right 1 cell; goto 3; case B: write B; keep tapehead stationary; return YES; } 3 switch(current tape cell) { case a: write a; move tapehead right 1 cell; goto 2; case b: write b; move tapehead right 1 cell; goto 2; case B: write B; keep tapehead stationary; return NO; } Run this program on input aabbaa

14 Computation 1 switch(current tape cell) { case B: write B; right; goto 2; } 2 switch(current tape cell) { case a: write a; Right; goto 3; case b: write b; right; goto 3; case B: write B; stay; return YES; } 3 switch(current tape cell) { case a: write a; right; goto 2; case b: write b; right; goto 2; case B: write B; stay; return NO; } Input: aabbaa Line 1, tape=Baabbaa Line 2, tape=Baabbaa Line 3, tape=Baabbaa Line 2, tape=Baabbaa Line 3, tape=Baabbaa Line 2, tape=Baabbaa Line 3, tape=Baabbaa Line 2, tape=BaabbaaB Output yes

15 Configurations What is the functional definition of a configuration? What needs to be recorded in configurations for this new programming language? –Current instruction –Tape contents –Tape head location Line 1, tape=Baabbaa Line 2, tape=Baabbaa Line 3, tape=Baabbaa Line 2, tape=Baabbaa Line 3, tape=Baabbaa Line 2, tape=Baabbaa Line 3, tape=Baabbaa Line 2, tape=BaabbaaB Output yes

16 Formal Definition Turing machine M = (Q, , , q 0,  ) –Q: set of states Example Q = {1,2,3} –  : input alphabet Example  = {a,b} –  : tape alphabet Example  = {a,b,B} –q 0 : initial state Example q 0 = 1 1 switch(current tape cell) { case B: write B; right; goto 2; } 2 switch(current tape cell) { case a: write a; Right; goto 3; case b: write b; right; goto 3; case B: write B; stay; return YES; } 3 switch(current tape cell) { case a: write a; right; goto 2; case b: write b; right; goto 2; case B: write B; stay; return NO; }

17 Formal Definition continued  : transition function –Example  St. Inp NS Upd Move 1 B 2 B R 2 a 3 a R 2 b 3 b R 2 B yes B S 3 a 2 a R 3 b 2 b R 3 B no B S 1 switch(current tape cell) { case B: write B; right; goto 2; } 2 switch(current tape cell) { case a: write a; Right; goto 3; case b: write b; right; goto 3; case B: write B; stay; return YES; } 3 switch(current tape cell) { case a: write a; right; goto 2; case b: write b; right; goto 2; case B: write B; stay; return NO; }

18 Defining 4 types of inputs Y(M) or L(M): the set of strings TM M returns yes on N(M): the set of strings TM M returns no on C(M): the set of strings TM M crashes on –may run off end of tape in some TM models –may stop in a state without explicitly saying yes or no I(M): the set of strings TM M infinite loops on

19 Solvable, half-solvable, and unsolvable problems A TM M half-solves language recognition problem L if and only if Y(M) = L A TM M solves language recognition problem L if and only if M half-solves L and N(M) = L C The set of problems solvable problems defined by Turing machines is identical to the set of solvable problems defined by C++ programs. Likewise for half-solvable problems