IV. Turing Machine. Yuxi Fu. BASICS, Shanghai Jiao Tong University

Similar documents
Computability Theory. CS215, Lecture 6,

Turing Machines (TM) Deterministic Turing Machine (DTM) Nondeterministic Turing Machine (NDTM)

Lecture notes on Turing machines

Introduction to Turing Machines

CSCC63 Worksheet Turing Machines

CSE 105 THEORY OF COMPUTATION

Part I: Definitions and Properties

Turing Machines. The Language Hierarchy. Context-Free Languages. Regular Languages. Courtesy Costas Busch - RPI 1

Chapter 3: The Church-Turing Thesis

Turing machines and computable functions

Lecture 14: Recursive Languages

Q = Set of states, IE661: Scheduling Theory (Fall 2003) Primer to Complexity Theory Satyaki Ghosh Dastidar

Algorithmic probability, Part 1 of n. A presentation to the Maths Study Group at London South Bank University 09/09/2015

Automata Theory CS S-12 Turing Machine Modifications

Decidability: Church-Turing Thesis

(a) Definition of TMs. First Problem of URMs

HIS LEGACY. 100 Years Turing celebration. Gordana Dodig Crnkovic, IDT Open Seminar. Computer Science and Network Department Mälardalen University

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

Recap DFA,NFA, DTM. Slides by Prof. Debasis Mitra, FIT.

Most General computer?

CS5371 Theory of Computation. Lecture 10: Computability Theory I (Turing Machine)

Turing Machines. Our most powerful model of a computer is the Turing Machine. This is an FA with an infinite tape for storage.

The Church-Turing Thesis

Fundamentals of Computer Science

CSE355 SUMMER 2018 LECTURES TURING MACHINES AND (UN)DECIDABILITY

Models. Models of Computation, Turing Machines, and the Limits of Turing Computation. Effective Calculability. Motivation for Models of Computation

Before We Start. Turing Machines. Languages. Now our picture looks like. Theory Hall of Fame. The Turing Machine. Any questions? The $64,000 Question

CS5371 Theory of Computation. Lecture 10: Computability Theory I (Turing Machine)

XI. Computational Complexity

Turing machine recap. Universal Turing Machines and Undecidability. Alphabet size doesn t matter. Robustness of TM

Homework. Turing Machines. Announcements. Plan for today. Now our picture looks like. Languages

Busch Complexity Lectures: Turing Machines. Prof. Busch - LSU 1

Theory of Computation

CS4026 Formal Models of Computation

Turing Machines. Lecture 8

Equivalence of TMs and Multitape TMs. Theorem 3.13 and Corollary 3.15 By: Joseph Lauman

Turing machines Finite automaton no storage Pushdown automaton storage is a stack What if we give the automaton a more flexible storage?

Introduction to Turing Machines. Reading: Chapters 8 & 9

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

2.6 Variations on Turing Machines

Theory of Computer Science

The Power of One-State Turing Machines

Turing Machine variants

ECS 120 Lesson 15 Turing Machines, Pt. 1

CSCI3390-Assignment 2 Solutions

Turing Machines A Turing Machine is a 7-tuple, (Q, Σ, Γ, δ, q0, qaccept, qreject), where Q, Σ, Γ are all finite

Busch Complexity Lectures: Turing s Thesis. Costas Busch - LSU 1

Theory of Computation Lecture Notes. Problems and Algorithms. Class Information

The Turing Machine. Computability. The Church-Turing Thesis (1936) Theory Hall of Fame. Theory Hall of Fame. Undecidability

COMPARATIVE ANALYSIS ON TURING MACHINE AND QUANTUM TURING MACHINE

Turing Machine Variants

Turing Machines and the Church-Turing Thesis

CSCE 551: Chin-Tser Huang. University of South Carolina

SE 3310b Theoretical Foundations of Software Engineering. Turing Machines. Aleksander Essex

1 Unrestricted Computation

Lecture 1: Course Overview and Turing machine complexity

Universal Turing Machine. Lecture 20

CS21 Decidability and Tractability

CS 525 Proof of Theorems 3.13 and 3.15

1 Showing Recognizability

VI. Church-Turing Thesis

Turing s thesis: (1930) Any computation carried out by mechanical means can be performed by a Turing Machine

jflap demo Regular expressions Pumping lemma Turing Machines Sections 12.4 and 12.5 in the text

Turing Machine properties. Turing Machines. Alternate TM definitions. Alternate TM definitions. Alternate TM definitions. Alternate TM definitions

Lecture 13: Turing Machine

Turing Machines Part II

7.1 The Origin of Computer Science

CSE 200 Lecture Notes Turing machine vs. RAM machine vs. circuits

Harvard CS 121 and CSCI E-121 Lecture 14: Turing Machines and the Church Turing Thesis

The computational model and why it doesn t matter

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

Decidable Languages - relationship with other classes.

Homework Assignment 6 Answers

CAPES MI. Turing Machines and decidable problems. Laure Gonnord

The purpose here is to classify computational problems according to their complexity. For that purpose we need first to agree on a computational

The Turing machine model of computation

Computation. Some history...

The tape of M. Figure 3: Simulation of a Turing machine with doubly infinite tape

Chapter 8. Turing Machine (TMs)

Predicate Logic - Undecidability

Turing Machines. Nicholas Geis. February 5, 2015

CSE 105 THEORY OF COMPUTATION

Chomsky Normal Form and TURING MACHINES. TUESDAY Feb 4

Limits of Computability

Turing Machines (TM) The Turing machine is the ultimate model of computation.

CSCI 2200 Foundations of Computer Science Spring 2018 Quiz 3 (May 2, 2018) SOLUTIONS

MACHINE COMPUTING. the limitations

7.2 Turing Machines as Language Acceptors 7.3 Turing Machines that Compute Partial Functions

Notational conventions

Non-emptiness Testing for TMs

Variants of Turing Machine (intro)

Turing Machines. 22c:135 Theory of Computation. Tape of a Turing Machine (TM) TM versus FA, PDA

Complexity Theory Turing Machines

Theory of Computation. Theory of Computation

Computable Functions

15-251: Great Theoretical Ideas in Computer Science Fall 2016 Lecture 6 September 15, Turing & the Uncomputable

Turing Machine Variants. Sipser pages

Lecture 1: Introduction

CSE 460: Computabilty and Formal Languages Turing Machine (TM) S. Pramanik

TURING MAHINES

Transcription:

IV. Turing Machine Yuxi Fu BASICS, Shanghai Jiao Tong University

Alan Turing Alan Turing (23Jun.1912-7Jun.1954), an English student of Church, introduced a machine model for effective calculation in On Computable Numbers, with an Application to the Entsheidungsproblem, Proc. of the London Mathematical Society, 42:230-265, 1936. Turing Machine, Halting Problem, Turing Test Computability Theory, by Y. Fu IV. Turing Machine 1 / 16

Motivation What are necessary for a machine to calculate a function? and The machine should be able to interpret numbers; The machine must be able to operate and manipulate numbers according to a set of predefined instructions; The input number has to be stored in an accessible place; There should be an accessible place for the machine to store intermediate results; The output number has to be put in an accessible place. Computability Theory, by Y. Fu IV. Turing Machine 2 / 16

Turing Machine A k-tape Turing Machine M has k-tapes such that The first tape is the read-only input tape. The other k 1 tapes are the read/write work tapes. The k-th tape is also used as the output tape. Every tape comes with a read/write head. Computability Theory, by Y. Fu IV. Turing Machine 3 / 16

Turing Machine The machine is described by a tuple (Γ, Q, δ) containing A finite set Γ, called alphabet, of symbols. It contains a blank symbol, a start symbol, and the digits 0 and 1. A finite set Q of states. It contains a start state q start and a halting state q halt. A transition function δ : Q Γ k Q Γ k 1 {L, S, R} k, describing the rules of each computation step. Computability Theory, by Y. Fu IV. Turing Machine 4 / 16

Computation and Configuration Computation, configuration, initial/final configuration Computability Theory, by Y. Fu IV. Turing Machine 5 / 16

A TM for the Palindrome Problem Q = {q s, q h, q c, q l, q t }; Γ = {,, 0, 1}; two work tapes. q s,,, q c,,, R, R, R q c, 0,, q c, 0,, R, R, S q c, 1,, q c, 1,, R, R, S q c,,, q l,,, L, S, S q l, 0,, q l,,, L, S, S q l, 1,, q l,,, L, S, S q l,,, q t,,, R, L, S q t,,, q h,, 1, S, S, S q t, 0, 1, q h, 1, 0, S, S, S q t, 1, 0, q h, 0, 0, S, S, S q t, 0, 0, q t, 0,, R, L, S q t, 1, 1, q t, 1,, R, L, S Computability Theory, by Y. Fu IV. Turing Machine 6 / 16

{0, 1,, } vs. Larger Alphabets Suppose M has k tapes with the alphabet Γ. A symbol of M is encoded by a string σ {0, 1} of length log Γ. States: A state q is turned into states q, q, σ 1 1,..., σk 1 where σ 1 1 =... = σk 1 = 1,..., q, σ1 log Γ,..., σk log Γ where σlog 1 Γ =... = σk log Γ = log Γ. A computation step of M is simulated in M by log Γ steps to read, log Γ steps to write, and log Γ steps to relocate the heads. Computability Theory, by Y. Fu IV. Turing Machine 7 / 16

One Tape vs. Many Tapes The basic idea is to interleave k tapes into one tape. The first n + 1 cells are reserved for the input. Every symbol a of M is turned into two symbols a, â in M, with â used to indicate head position. Computability Theory, by Y. Fu IV. Turing Machine 8 / 16

One Tape vs. Many Tapes The machine M copies the input bits to the first imaginary tape. The head then moves left to the (n+2)-th cell. Sweeping the tape cells from left to right. Record in the register the k symbols marked with the hat. Sweeping the tape cells from right to left to update using the transitions of M. Computability Theory, by Y. Fu IV. Turing Machine 9 / 16

One Unidirectional Tape vs. Bidirectional Tape The idea is that M makes use of the alphabet Γ Γ. Every state q of M is turned into q and q. Computability Theory, by Y. Fu IV. Turing Machine 10 / 16

Turing Machine Model is extremely robust. Computability Theory, by Y. Fu IV. Turing Machine 11 / 16

Function Definable by Turing Machine A k-ary function f : {0, 1}... {0, 1} }{{} k {0, 1} is Turing definable if there is a TM M such that whenever k binary numbers n 1,..., n k are written on the input tape, the following statements are valid: If f (n 1,..., n k ) is defined, then M terminates in a configuration with f (n 1,..., n k ) written on the output tape. If f (n 1,..., n k ) is undefined, then the execution of M is infinite. Computability Theory, by Y. Fu IV. Turing Machine 12 / 16

Lambda Definability vs. Turing Definability Theorem. All λ-definable functions are Turing definable. A. Turing, A. Computability and λ-definability. Journal of Symbolic Logic, 2:153-163, 1937. Computability Theory, by Y. Fu IV. Turing Machine 13 / 16

Lambda Definability vs. Turing Definability The theorem can be proved by designing a Turing Machine for each closed λ-term. The bound variables are treated using de Bruijn notation. The machine uses the leftmost reduction strategy. A uniform approach that transforms a closed λ-term to a Turing Machine is left as an exercise. Computability Theory, by Y. Fu IV. Turing Machine 14 / 16

Gödel was reported as saying that Turing machines offer the most convincing formalization of mechanical procedures. Turing remarked that the λ-calculus is more convenient. Church pointed out that Turing Machines have the advantage of making the identification with effectiveness in the ordinary sense evident immediately. Computability Theory, by Y. Fu IV. Turing Machine 15 / 16

Exercise. Describe an algorithm that transforms a closed λ-term to a Turing Machine. The machine should meet the specification: Whenever it starts with a closed λ-term written on its input tape, it carries out the leftmost reduction, and stops if the reduction terminates. Computability Theory, by Y. Fu IV. Turing Machine 16 / 16