Variants of Turing Machine (intro)

Similar documents
Asymptotic notation : big-o and small-o

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

The Church-Turing Thesis

Foundations of

Computability Theory. CS215, Lecture 6,

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

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

Part I: Definitions and Properties

Decidability (intro.)

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

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

Theory of Computation (IX) Yijia Chen Fudan University

More Turing Machines. CS154 Chris Pollett Mar 15, 2006.

Chapter 3: The Church-Turing Thesis

CS21 Decidability and Tractability

CSE 2001: Introduction to Theory of Computation Fall Suprakash Datta

Chapter 7 Turing Machines

Introduction to Languages and Computation

Computation Histories

CSCC63 Worksheet Turing Machines

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

Further discussion of Turing machines

CSE 2001: Introduction to Theory of Computation Fall Suprakash Datta

Automata Theory (2A) Young Won Lim 5/31/18

CS 525 Proof of Theorems 3.13 and 3.15

Undecidable Problems and Reducibility

UNRESTRICTED GRAMMARS

CSE 105 THEORY OF COMPUTATION

Computability and Complexity

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

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

1 Unrestricted Computation

1 Showing Recognizability

CS5371 Theory of Computation. Lecture 12: Computability III (Decidable Languages relating to DFA, NFA, and CFG)

CSE355 SUMMER 2018 LECTURES TURING MACHINES AND (UN)DECIDABILITY

Theory of Computation (IV) Yijia Chen Fudan University

ECS 120 Lesson 15 Turing Machines, Pt. 1

Intro to Theory of Computation

CS4026 Formal Models of Computation

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

Exam Computability and Complexity

V Honors Theory of Computation

Decidability. Human-aware Robotics. 2017/10/31 Chapter 4.1 in Sipser Ø Announcement:

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

Homework Assignment 6 Answers

Midterm Exam 2 CS 341: Foundations of Computer Science II Fall 2018, face-to-face day section Prof. Marvin K. Nakayama

CSCI3390-Assignment 2 Solutions

Harvard CS 121 and CSCI E-207 Lecture 10: Ambiguity, Pushdown Automata

Turing machines and linear bounded automata

An example of a decidable language that is not a CFL Implementation-level description of a TM State diagram of TM

The Turing machine model of computation

Variations of the Turing Machine

Introduction to Turing Machines

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

Turing machines and linear bounded automata

Theory of Computation

Turing s Thesis. Fall Costas Busch - RPI!1

FORMAL LANGUAGES, AUTOMATA AND COMPUTATION

CSE 211. Pushdown Automata. CSE 211 (Theory of Computation) Atif Hasan Rahman

Chapter 8. Turing Machine (TMs)

CSE 105 THEORY OF COMPUTATION

Non-emptiness Testing for TMs

Introduction to Formal Languages, Automata and Computability p.1/42

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

Decidability: Church-Turing Thesis

COMP/MATH 300 Topics for Spring 2017 June 5, Review and Regular Languages

Context-Free Languages

UNIT-VIII COMPUTABILITY THEORY

Theory of Computation

Midterm Exam 2 CS 341: Foundations of Computer Science II Fall 2016, face-to-face day section Prof. Marvin K. Nakayama

Accept or reject. Stack

Theory of Computation

Advanced topic: Space complexity

Turing machines and linear bounded automata

Computational Models - Lecture 6

Time Complexity (1) CSCI Spring Original Slides were written by Dr. Frederick W Maier. CSCI 2670 Time Complexity (1)

Turing Machine Variants

A Note on Turing Machine Design

Automata Theory CS S-12 Turing Machine Modifications

Turing Machines Part II

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

CS20a: Turing Machines (Oct 29, 2002)

Lecture 13: Turing Machine

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

Turing Machines Part III

What languages are Turing-decidable? What languages are not Turing-decidable? Is there a language that isn t even Turingrecognizable?

Fundamentals of Computer Science

Introduction to Computability

6.045J/18.400J: Automata, Computability and Complexity. Quiz 2. March 30, Please write your name in the upper corner of each page.

Turing Machines, diagonalization, the halting problem, reducibility

Lecture 12: Mapping Reductions

6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, Class 8 Nancy Lynch

THEORY OF COMPUTATION (AUBER) EXAM CRIB SHEET

Turing Machines Extensions

Turing Machine Extensions, and Enumerators

COMP-330 Theory of Computation. Fall Prof. Claude Crépeau. Lec. 16 : Turing Machines

Nondeterminism. September 7, Nondeterminism

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

Equivalent Variations of Turing Machines

Problems, and How Computer Scientists Solve Them Manas Thakur

Transcription:

CHAPTER 3 The Church-Turing Thesis Contents Turing Machines definitions, examples, Turing-recognizable and Turing-decidable languages Variants of Turing Machine Multi-tape Turing machines, non-deterministic Turing Machines, Enumerators, equivalence with other models The definition of Algorithm Hilbert s problems, terminology for describing Turing machines Theory of Computation, Feodor F. Dragan, Kent State University 1 Variants of Turing Machine (intro) There are alternative definitions of Turing machines, including versions with multiple tapes or with non-determinism. They are called variants of the Turing machine model. The original model and all its reasonable variants have the same power - they recognize the same class of languages. In this section we describe some of these variants and the proofs of equivalence in power. Simplest equivalent generalized model In basic definition, the head can move to the left or right after each step: it cannot stay put. If we allow the head to stay put. The transition function would then have the form δ : Q Γ Q Γ { L, R, S}. Does this mae the model more powerful? Might this feature allow Turing machines to recognize additional languages? Of course not. We can replace each stay put transition with two transitions, one that moves to the right and the second bac to the left. Theory of Computation, Feodor F. Dragan, Kent State University 2 1

Multi-tape Turing Machine A multi-tape TM is lie an ordinary TM with several tapes. Each tape has its own head for reading and writing. Initially the input appears on tape 1, and others are blan. The transition function is changed to allow for reading, writing, and moving the heads on all tapes simultaneously. Formally, δ : Q Γ Q Γ { L, R}, where is the number of tapes. The expression δ q, a,..., a ) ( r, b,..., b, L, R,..., ) means that, if the machine is in state q and heads 1 through are reading symbols a 1 trough a, the machine goes to state r, writes symbols b1 through, and moves each head to the left or right as specified. b control ( 1 = 1 L 0 1 0 0 a a b b b a b a Multi-tape TMs appear to be more powerful than ordinary TMs, but we will show that they are equivalent in power. Theory of Computation, Feodor F. Dragan, Kent State University 3 Multi-tape TMs vs. ordinary TMs Theorem: Every multi-tape Turing machine has an equivalent single tape Turing Machine. We show how to convert a multi-tape TM M to an equivalent single tape TM S. The ey idea is to show how to simulate M with S. Let M has tapes. Then S simulates the effect of tapes by storing their information on its single tape. It uses new symbol # as a delimiter to separate the contents of the different tapes. S must also eep trac of the locations of the heads. It does so by writing a tape symbol with a dot above it to mar the place where the head on that tape would be. Thin of these as virtual tapes and heads. M 0 1 a a b b a 3 1... S # 0 1 # # a a b b a # As before, the dotted tape symbols are simply new symbols that have been added to the tape alphabet. Theory of Computation, Feodor F. Dragan, Kent State University 4 2

Multi-tape TMs vs. ordinary TMs (cont.) S= On input : w = w... 1w2 wn 1. First S puts its tape into the format that represents all tapes of M. The formatted tape contains... # w w... 2 w # # #... # 1 n 2. To simulate a single move, S scans its tape from the first #, which mars the left-hand end, to the (+1)st #, which mars the right-hand end, in order to determine the symbols under the virtual heads. Then S maes a second pass to update the tapes according to the way that M s transition function dictates. 3. If at any point S moves one of the virtual heads to the right onto a #, this action signifies that M has moved the corresponding head onto the previously unread blan portion of that tape. So S writes a blan symbol on this tape cell and shifts the tape contents, from this sell until the rightmost #, one unit to the right. Then it continues the simulation as before. Corollary: A language is Turing-recognizable if and only if some multi-tape Turing machine recognizes it. Theory of Computation, Feodor F. Dragan, Kent State University 5 Non-deterministic Turing Machine A non-deterministic TM is defined in the expected way: at any point of computation the machine may proceed according to several possibilities. The transition function for a non-deterministic TM has the form δ : Q Γ Ρ( Q Γ { L, R}). The computation of a non-deterministic TM N is a tree whose branches correspond to different possibilities for the machine. Each node of the tree is a configuration of N. The root is the start configuration. If some branch of the computation leads to the accept state, the machine accepts the input. We will show that non-determinism does not affect the power of the Turing machine model. Theorem: Every non-deterministic Turing machine has an equivalent deterministic Turing Machine. We show that we can simulate any non-deterministic TM N with a deterministic TM D. The idea: D will try all possible branches of N s non-deterministic computation. The TM D searches the tree for an accepting configuration. If D ever finds an accepting configuration, it accepts. Otherwise, D s simulation will not terminate. Theory of Computation, Feodor F. Dragan, Kent State University 6 3

Non-deterministic TMs vs. ordinary TMs The simulating deterministic TM D has three tapes. By previous theorem this arrangement is equivalent to having a single tape. Tape 1 always contains the input string and is never altered. Tape 2 maintains a copy of N s tape on some branch of its non-deterministic computation. Tape 3 eeps trac of D s location in N s non-deterministic computation tree. D 0 1 0 0 x x # 0 1 x 1 2 3 2 3 3 1 Input tape Simulation tape Address tape. Every node in the tree can have at most b children, where b is the size of the largest set of possible choices given by N s transition function. Tape 3 contains a string over Σ = { 1,2,..., b b }*. Each symbol in the string tells us which choice to mae next when simulating a step in one branch in N s non-deterministic computation. This gives the address of a node in the tree. Sometimes a symbol may not correspond to any choice if too few choices are available for a configuration. In this case we say that the address is invalid, it does not correspond to any node. The empty string is the address of the root of the tree. Theory of Computation, Feodor F. Dragan, Kent State University 7 Non-deterministic TMs vs. ordinary TMs (cont.) D= On input w: 1. Initially tape 1 contains the input w, and tapes 2 and 3 are empty. 2. Copy tape 1 to tape 2. 3. Use tape 2 to simulate N with input w on the branch of its nondeterministic computation. Before each step of N consult the next symbol on tape 3 to determine which choice to mae among those allowed by N s transition function. If no more symbols remain on tape 3 or if this nondeterministic choice is invalid, abort this branch by going to stage 4. Also go to stage 4 if a rejecting configuration is encountered. If an accepting configuration is encountered, accept the input. 4. Replace the string on tape 3 with the lexicographically next string. Simulate the next branch of N s computation by going to stage 2. Corollary 1: A language is Turing-recognizable if and only if some nondeterministic Turing machine recognizes it. In a similar way one can show the following. Corollary 2: A language is Turing-decidable if and only if some non-deterministic Turing machine decides it. Theory of Computation, Feodor F. Dragan, Kent State University 8 4

Equivalence with other models We have presented several variants of the Turing Machines and have proved them to be equivalent in power. Many other models of general purpose computation have been proposed in literature. Some of these models are very much lie Turing machines, while others are quite different (e.g. λ -calculus). All share the essential feature of Turing machines, namely, unrestricted access to unlimited memory, distinguishing them from weaer models such us finite automata and pushdown automata. All models with that feature turn out to be equivalent in power, so long as they satisfy certain reasonable requirements (e.g., the ability to perform only a finite amount of wor in a single step). More variants of Turing machine -PDA, a PDA with stacs. write-once Turing machines. Turing machines with doubly infinite tape. Turing machines with left reset δ : Q Γ Q Γ { R, RESET}. Turing machines with stay put instead of left δ : Q Γ Q Γ { R, S}. If you missed a HW, try to give a complete answer to one of the problems 3.9, 3.11 3.14. Only one and complete answer will be accepted. Then you will get 10 points extra credit. Theory of Computation, Feodor F. Dragan, Kent State University 9 5