December 8, 2009Theory of Computation Lecture 22: Turing Machines IV 1 Turing Machines Theorem 1.1: Any partial function that can be computed by a Post-

Slides:



Advertisements
Similar presentations
Computability Dr. Colin Campbell Course Element 2 (EMAT20531)
Advertisements

1 Turing Machines and Equivalent Models Section 13.2 The Church-Turing Thesis.
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.
October 13, 2009Theory of Computation Lecture 11: A Universal Program III 1 Coding Programs by Numbers Gödel numbers are usually very large, even for small.
Foundations of (Theoretical) Computer Science Chapter 3 Lecture Notes (Section 3.2: Variants of Turing Machines) David Martin With.
1 Introduction to Computability Theory Lecture11: Variants of Turing Machines Prof. Amos Israeli.
Introduction to Computability Theory
Introduction to Computability Theory
Fall 2004COMP 3351 Recursively Enumerable and Recursive Languages.
CS5371 Theory of Computation Lecture 11: Computability Theory II (TM Variants, Church-Turing Thesis)
Recursively Enumerable and Recursive Languages
1 Uncountable Sets continued Theorem: Let be an infinite countable set. The powerset of is uncountable.
October 27, 2009Theory of Computation Lecture 12: A Universal Program IV 1Universality Then we append the following instruction: [C]IF K = Lt(Z) + 1 
November 10, 2009Theory of Computation Lecture 16: Computation on Strings I 1Diagonalization Another example: Let TOT be the set of all numbers p such.
CHAPTER 4 Decidability Contents Decidable Languages
Computability and Complexity 3-1 Turing Machine Computability and Complexity Andrei Bulatov.
September 17, 2009Theory of Computation Lecture 4: Programs and Computable Functions III 1 Macros Now we want to use macros of the form: W  f(V 1, …,
CS5371 Theory of Computation Lecture 8: Automata Theory VI (PDA, PDA = CFG)
Chapter 4: A Universal Program 1. Coding programs Example : For our programs P we have variables that are arranged in a certain order: Y 1 X 1 Z 1 X 2.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen Department of Computer Science University of Texas-Pan American.
Theory of Languages and Automata
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 15-1 Mälardalen University 2012.
1 The Halting Problem and Decidability How powerful is a TM? Any program in a high level language can be simulated by a TM. Any algorithmic procedure carried.
December 1, 2009Theory of Computation Lecture 21: Turing Machines II 1 Simulation of L n in T We will now construct a Post-Turing program Q that simulates.
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,
Fundamentals of Informatics Lecture 3 Turing Machines Bas Luttik.
Theory of Computation Lecture 5: Primitive Recursive Functions I
Lecture 3: Count Programs, While Programs and Recursively Defined Functions 虞台文 大同大學資工所 智慧型多媒體研究室.
MA/CSSE 474 Theory of Computation Minimizing DFSMs.
November 12, 2009Theory of Computation Lecture 17: Calculations on Strings II 1 Numerical Representation of Strings First, we define two primitive recursive.
Recursively Enumerable and Recursive Languages
Donghyun (David) Kim Department of Mathematics and Computer Science North Carolina Central University 1 Chapter 4 Decidability Some slides are in courtesy.
Lecture 24UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 24.
December 3, 2009Theory of Computation Lecture 21: Turing Machines III 1 Simulation of T in L Now the MIDDLE section of Q can be generated by replacing.
1 Introduction to Turing Machines
Theory of Computation Automata Theory Dr. Ayman Srour.
Lecture 06: Theory of Automata:08 Finite Automata with Output.
Lecture 15: Theory of Automata:2014 Finite Automata with Output.
Chapters 11 and 12 Decision Problems and Undecidability.
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
The Church-Turing Thesis
Theory of Computation Lecture 12: A Universal Program III
Diagonalization and Reducibility
Theory of Computation Lecture 23: Turing Machines IV
Theory of Computation Lecture 14: A Universal Program V
Numerical Representation of Strings
Theory of Computation Lecture 22: Turing Machines III
Turing Machines 2nd 2017 Lecture 9.
Turing Machines Acceptors; Enumerators
Chapter 9 TURING MACHINES.
COSC 3340: Introduction to Theory of Computation
CSC 4170 Theory of Computation Nondeterminism Section 1.2.
Theory of Computation Turing Machines.
The Programming Language L
Variations of the Turing Machine
The Church-Turing Thesis
CSC 4170 Theory of Computation Nondeterminism Section 1.2.
Theory of Computation Lecture 21: Turing Machines II
Diagonalization and Reducibility
Recap lecture 19 NFA corresponding to Closure of FA, Examples, Memory required to recognize a language, Example, Distinguishing one string from another,
The Programming Language L
Variants of Turing machines
Theory of Computation Lecture 6: Primitive Recursive Functions I
Theory of Computation Lecture 22: Turing Machines II
Theory of Computation Lecture 23: Turing Machines III
Presentation transcript:

December 8, 2009Theory of Computation Lecture 22: Turing Machines IV 1 Turing Machines Theorem 1.1: Any partial function that can be computed by a Post- Turing program can be computed by a Turing machine using the same alphabet. Proof: Let P be a given Post-Turing program consisting of the instructions I 1, …, I k. Let s 0, s 1, …, s n be a list that includes all of the symbols mentioned in P. We will construct a Turing machine M that simulates P.

December 8, 2009Theory of Computation Lecture 22: Turing Machines IV 2 Turing Machines Our idea is that M will be in state q i precisely when P is about to execute instruction I i. So if I i is PRINT s k, then we place in M all of the following quadruples: q i s j s k q i+1, j = 0, 1, …, n. If I i is RIGHT, then we place in M all of the following quadruples: q i s j Rq i+1, j = 0, 1, …, n. If I i is LEFT, then we place in M all of the following quadruples: q i s j Lq i+1, j = 0, 1, …, n.

December 8, 2009Theory of Computation Lecture 22: Turing Machines IV 3 Turing Machines If I i is IF s k GOTO L, then let m be the least number such that I m is labeled L if there is an instruction of P labeled L; otherwise let m = K + 1. We place in M the quadruple qiskskqm,qiskskqm,qiskskqm,qiskskqm, as well as the following quadruples: q i s j s j q i+1, j = 0, 1, …, n; j  k. Obviously, the actions of M correspond precisely to the instructions of P, so our proof is complete.

December 8, 2009Theory of Computation Lecture 22: Turing Machines IV 4 Turing Machines Do you remember Corollary 6.4 of Chapter 5? “Every partially computable function is computed strictly by some Post-Turing program that uses only the symbols s 0 and s 1.” Given this corollary and the proof we just completed, we can derive the following: Theorem 1.2: Let f be an m-ary partially computable function on A* for a given alphabet A. Then there is a Turing machine M that computes f strictly. It is interesting to see the application of Theorem 1.2 to the case A = {1}.

December 8, 2009Theory of Computation Lecture 22: Turing Machines IV 5 Turing Machines Thus, if f(x 1, …, x m ) is any partially computable function on N, then there is a Turing machine that computes f using only the symbols B and 1. The initial configuration corresponding to inputs x 1, …, x m is B 1 [x 1 ] B … B 1 [x m ]  q 1 and the final configuration if f(x 1, …, x m )  is B 1 [f(x 1, …, x m )]  q K+1

December 8, 2009Theory of Computation Lecture 22: Turing Machines IV 6 Turing Machines Now we will take a look at Turing machines that consist of quintuples instead of quadruples. There are two kinds of quintuples: 1.q i s j s k Rq l 2.q i s j s k Lq l So you see that in either case the head prints the symbol s k, which of course can be the same as the current symbol s j. Then a quintuple of type 1 makes the head move one step to the right, while type 2 makes it move one step to the left.

December 8, 2009Theory of Computation Lecture 22: Turing Machines IV 7 Turing Machines A quintuple Turing machine is a finite set of quintuples, no two of which begin with the same pair q i s j. Theorem 1.3: Any partial function that can be computed by a Turing machine can be computed by a quintuple Turing machine using the same alphabet. Proof: Let M be a Turing machine with states q 1, …, q K and alphabet {s 1, …, s n }. We construct a quintuple Turing machine M’ to simulate M. The states of M’ are q 1, …, q 2K.

December 8, 2009Theory of Computation Lecture 22: Turing Machines IV 8 Turing Machines For each quadruple of M of the form q i s j Rq l we place in M’ the corresponding quintuple q i s j s j Rq l. Similarly, for each quadruple of M of the form q i s j Lq l we place in M’ the corresponding quintuple q i s j s j Lq l. The third type of quadruple, q i s j s k q l, is harder to simulate, because the quintuples always demand a move to either the right or the left.

December 8, 2009Theory of Computation Lecture 22: Turing Machines IV 9 Turing Machines So for each quadruple of M of the form q i s j s k q l we place in M’ the corresponding quintuple q i s j s k Rq K+l. Finally, we place in M’ all quintuples of the form q K+i s j s j Lq i, i = 1, …, K; j = 0, …, n. The extra states q K+1, …, q 2K are used to “remember” that we have gone one square too far to the right.

December 8, 2009Theory of Computation Lecture 22: Turing Machines IV 10 Turing Machines Theorem 1.4: Any partial function that can be computed by a quintuple Turing machine can be computed by a Post-Turing program using the same alphabet. This theorem, together with Theorems 1.1, 1.3, and 1.4 in this chapter, gives us the following corollary: Corollary 1.5: For a given partial function f, the following are equivalent: 1. f can be computed by a Post-Turing program, 2. f can be computed by a Turing machine, 3. f can be computed by a quintuple Turing machine.

December 8, 2009Theory of Computation Lecture 22: Turing Machines IV 11 Turing Machines Proof of Theorem 1.4: Let M be a given quintuple Turing machine with states q 1, …, q K and alphabet {s 1, …, s n }. We associate with each state q i a label A i and with each pair q i s j a label B ij. Each label A i is to be placed next to the first instruction in the following filter: [A i ]IF s 0 GOTO B i0 IF s 1 GOTO B i1 : IF s n GOTO B in

December 8, 2009Theory of Computation Lecture 22: Turing Machines IV 12 Turing Machines If M contains the quintuple q i s j s k Rq l, then we introduce the following block of instructions: [B ij ]PRINT s k RIGHT GOTO A l Similarly, for the quintuple q i s j s k L q l we introduce [B ij ]PRINT s k LEFT GOTO A l

December 8, 2009Theory of Computation Lecture 22: Turing Machines IV 13 Turing Machines Finally, if there is no quintuple in M beginning with q i s j, then we introduce the following block: [B ij ]GOTO E Now we can easily construct a Post-Turing program that simulates M simply by putting all of these blocks and filters one under the other. The order of placement only matters for the filter labeled A 1, which must begin the program. The next slide will show the entire simulation program.

December 8, 2009Theory of Computation Lecture 22: Turing Machines IV 14 Turing Machines [A 1 ]IF s 0 GOTO B 10 : IF s n GOTO B 1n [A 2 ]IF s 0 GOTO B 20 : IF s n GOTO B 2n : [A K ]IF s 0 GOTO B K0 : IF s n GOTO B Kn [B i 1 j 1 ]PRINT s k 1 RIGHT GOTO A l [B i 2 j 2 ]PRINT s k 2 :

December 8, 2009Theory of Computation Lecture 22: Turing Machines IV 15 A Universal Turing Machine Do you remember the universal program from Section 4.3? It computes the output of another program when it is given that program’s number and the input to that program. We defined  (x, z) to be the unary partial function computed by the program with number z for the input x. Now let M be a Turing machine that computes this function with alphabet {1}. Then let g(x) be any partially computable function of one variable, and let z 0 be the number of some program in the language L that computes g.

December 8, 2009Theory of Computation Lecture 22: Turing Machines IV 16 A Universal Turing Machine If we begin with the configuration B x B z 0  q 1 where x and z 0 are written in unary notation, that is, as blocks of ones, then M will compute  (x, z 0 ) = g(x). (While unary notation is not very practical, it is intuitive and avoids the consideration of different bases and converting representations between them.) Thus, M can be used to compute any partially computable function of one variable.

December 8, 2009Theory of Computation Lecture 22: Turing Machines IV 17 A Universal Turing Machine We can always find such a universal Turing machine M : The Universality Theorem tells us that there exists an L program that computes  (x, z) (and we discussed how to write it). The Universality Theorem tells us that there exists an L program that computes  (x, z) (and we discussed how to write it). Theorem 1.2 in this chapter tells us that for every L program there is a Turing machine that does the same computation (we discussed how to build it). Theorem 1.2 in this chapter tells us that for every L program there is a Turing machine that does the same computation (we discussed how to build it). Of course we could also develop a numbering scheme for Turing machines. Then we could build a universal Turing machine that simulates the computation by another Turing machine.

December 8, 2009Theory of Computation Lecture 22: Turing Machines IV 18 A Universal Turing Machine The universal Turing Machine was Turing’s original theoretical construction of a programmable computer. It provides a model of an all-purpose computer, in which data and programs are stored together in a single memory. In the year 1936, this achievement showed that such an all-purpose computer would be possible. It led to the anticipation of the modern digital computer.

December 8, 2009Theory of Computation Lecture 22: Turing Machines IV 19 Overview of Simulations L LnLnLnLn Post-Turing language Turing machine quintuple Turing machine means that we simulated computations in language A using language B, showing that the computational power of B is at least as great as that of A. AB

December 8, 2009Theory of Computation Lecture 22: Turing Machines IV 20 Overview of Simulations Our simulations show that the computational power of all five languages is identical. In other words, these languages can compute exactly the same functions. This result supports Church’s Thesis – any function that can be computed in principle can be computed by a Turing machine. THE END