Turing s Thesis. Fall Costas Busch - RPI!1

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

Variations of the Turing Machine

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

Chapter 3: The Church-Turing Thesis

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

Part I: Definitions and Properties

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

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

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

Computability Theory. CS215, Lecture 6,

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

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

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

Turing s original paper (1936)

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

Turing Machine Variants. Sipser pages

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

Asymptotic notation : big-o and small-o

CSCC63 Worksheet Turing Machines

Homework Assignment 6 Answers

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

Turing Machines Part II

The Church-Turing Thesis

Variants of Turing Machine (intro)

CSE 2001: Introduction to Theory of Computation Fall Suprakash Datta

Chapter 7 Turing Machines

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

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

CSE 105 THEORY OF COMPUTATION

CSCI3390-Assignment 2 Solutions

Homework 5 Solution CSCI 2670 October 6, c) New text q 1 1##1 xq 3 ##1 x#q 5 #1 q reject. Old text. ~q 3 ##1 ~#q 5 #1

V Honors Theory of Computation

1 Showing Recognizability

Lecture 14: Recursive Languages

Notes for Comp 497 (Comp 454) Week 12 4/19/05. Today we look at some variations on machines we have already seen. Chapter 21

CSE 2001: Introduction to Theory of Computation Fall Suprakash Datta

Turing Machines Part II

More About Turing Machines. Programming Tricks Restrictions Extensions Closure Properties

CS4026 Formal Models of Computation

CS 525 Proof of Theorems 3.13 and 3.15

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

Turing Machines Extensions

Turing Machines Part II

Turing Machines and Time Complexity

CS 301. Lecture 18 Decidable languages. Stephen Checkoway. April 2, 2018

Foundations of

Chapter 8. Turing Machine (TMs)

Theory of Computation (IX) Yijia Chen Fudan University

CS21 Decidability and Tractability

TURING MAHINES

where Q is a finite set of states

CSE 105 THEORY OF COMPUTATION

CSE355 SUMMER 2018 LECTURES TURING MACHINES AND (UN)DECIDABILITY

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

Chomsky Normal Form and TURING MACHINES. TUESDAY Feb 4

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

Review of Complexity Theory

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

Computability Theory

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

Turing Machines Part III

MTAT Introduction to Theoretical Computer Science

Decidability: Church-Turing Thesis

NFA and regex. the Boolean algebra of languages. regular expressions. Informatics 1 School of Informatics, University of Edinburgh

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

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

Announcements. Problem Set 6 due next Monday, February 25, at 12:50PM. Midterm graded, will be returned at end of lecture.

Computability and Complexity

Theory of Computation - Module 4

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

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

Equivalent Variations of Turing Machines

Turing Machines and the Church-Turing Thesis

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

Lecture 24: Randomized Complexity, Course Summary

Decidability (intro.)

2.6 Variations on Turing Machines

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

Non-emptiness Testing for TMs

1 Deterministic Turing Machines

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

Complexity Theory Part I

CS 410/610, MTH 410/610 Theoretical Foundations of Computing

Turing Machine Variants

Lecture 4 Nondeterministic Finite Accepters

Computer Sciences Department

Two Way Deterministic Finite Automata

Advanced topic: Space complexity

Chapter 5. Finite Automata

Computation Histories

Chapter 1 Welcome Aboard

Theory of Computation. Theory of Computation

Most General computer?

Exam Computability and Complexity

Lecture 12: Mapping Reductions

Automata Theory CS S-12 Turing Machine Modifications

Lecture 1: Course Overview and Turing machine complexity

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

Introduction to Turing Machines

A Note on Turing Machine Design

Transcription:

Turing s Thesis Costas Busch - RPI!1

Turing s thesis (1930): Any computation carried out by mechanical means can be performed by a Turing Machine Costas Busch - RPI!2

Algorithm: An algorithm for a problem is a Turing Machine which solves the problem The algorithm describes the steps of the mechanical means This is easily translated to computation steps of a Turing machine Costas Busch - RPI!3

When we say: There exists an algorithm We mean: There exists a Turing Machine that executes the algorithm Costas Busch - RPI!4

Variations of the Turing Machine Costas Busch - RPI!5

The Standard Model Infinite Tape a a b a b b c a c a Read-Write Head (Left or Right) Control Unit Deterministic Costas Busch - RPI!6

Variations of the Standard Model Turing machines with: Stay-Option Semi-Infinite Tape Off-Line Multitape Multidimensional Nondeterministic Different Turing Machine Classes Costas Busch - RPI!7

Same Power of two machine classes: both classes accept the same set of languages We will prove: each new class has the same power with Standard Turing Machine (accept Turing-Recognizable Languages) Costas Busch - RPI!8

Same Power of two classes means: for any machine M 1 of first class there is a machine M 2 of second class such that: L ( M1) = L( M 2) and vice-versa Costas Busch - RPI!9

Simulation: A technique to prove same power. Simulate the machine of one class with a machine of the other class First Class Original Machine Second Class Simulation Machine M 2 M1 M1 simulates M1 Costas Busch - RPI!10

Configurations in the Original Machine have corresponding configurations in the Simulation Machine M 2 M 1 Original Machine: d d!!! 0! 1 M 1 d n Simulation Machine:! 1 d! d!!!!! 0 dn Costas Busch - RPI!11 M 2

Accepting Configuration Original Machine: d f Simulation Machine: d! f the Simulation Machine and the Original Machine accept the same strings L ( M1) = L( M 2) Costas Busch - RPI!12

Turing Machines with Stay-Option The head can stay in the same position a a b a b b c a c a Left, Right, Stay L,R,S: possible head moves Costas Busch - RPI!13

Example: Time 1 a a b a b b c a c a q 1 Time 2 b a b a b b c a c a q 2 a b, S q1 q2 Costas Busch - RPI!14

Theorem: Stay-Option machines have the same power with Standard Turing machines Proof: 1. Stay-Option Machines simulate Standard Turing machines 2. Standard Turing machines simulate Stay-Option machines Costas Busch - RPI!15

1. Stay-Option Machines simulate Standard Turing machines Trivial: any standard Turing machine is also a Stay-Option machine Costas Busch - RPI!16

2. Standard Turing machines simulate Stay-Option machines We need to simulate the stay head option with two head moves, one left and one right Costas Busch - RPI!17

Stay-Option Machine a b, S q1 q2 Simulation in Standard Machine q 1 a b, L x x, R q 2 For every possible tape symbol x Costas Busch - RPI!18

For other transitions nothing changes Stay-Option Machine a b, L q1 q2 Simulation in Standard Machine a b, L q1 q2 Similar for Right moves Costas Busch - RPI!19

example of simulation Stay-Option Machine: q a b, S 1 q2 a a b a 1 2 q 1 b a b a q 2 1 Simulation in Standard Machine: a a b a q 1 2 b a b a q 2 3 b a b a q 3 END OF PROOF Costas Busch - RPI!20

Multiple Track Tape A useful trick to perform more complicated simulations One Tape a b b a a c b d track 1 track 2 One head One symbol ( a, b) Costas Busch - RPI!21

a b b a a c b d track 1 track 2 q 1 a b c d a c b d track 1 track 2 q 2 ( b, a) ( c, d), L q1 q2 Costas Busch - RPI!22

Semi-Infinite Tape The head extends infinitely only to the right a b a c... Initial position is the leftmost cell When the head moves left from the border, it returns to the same position Costas Busch - RPI!23

Theorem: Semi-Infinite machines have the same power with Standard Turing machines Proof: 1. Standard Turing machines simulate Semi-Infinite machines 2. Semi-Infinite Machines simulate Standard Turing machines Costas Busch - RPI!24

1. Standard Turing machines simulate Semi-Infinite machines: # a b a c Standard Turing Machine a. insert special symbol # at left of input string b. Add a self-loop to every state (except states with no # #, R outgoing transitions) Costas Busch - RPI!25

2. Semi-Infinite tape machines simulate Standard Turing machines:... Standard machine... Semi-Infinite tape machine... Squeeze infinity of both directions in one direction Costas Busch - RPI!26

... Standard machine a b c d e... reference point Semi-Infinite tape machine with two tracks Right part Left part # # d e c b a... Costas Busch - RPI!27

Standard machine q 1 q 2 Semi-Infinite tape machine Left part Right part L q 1 L q 2 R q 1 R q 2 Costas Busch - RPI!28

Standard machine a g, R q1 q2 Semi-Infinite tape machine Right part R q 1 ( a, x) ( g, x), R R q 2 Left part L q 1 ( x, a) ( x, g), L For all tape symbols x L q 2 Costas Busch - RPI!29

Time 1 Standard machine... a b c d e... q 1 Right part Left part Semi-Infinite tape machine # d e # c b a... L q 1 Costas Busch - RPI!30

Time 2... Standard machine g b c d e... q 2 Right part Left part Semi-Infinite tape machine # d e # c b g... L q 2 Costas Busch - RPI!31

At the border: Semi-Infinite tape machine Right part R q 1 (#,#) (#,#), R L q 1 Left part L q 1 (#,#) (#,#), R R q 1 Costas Busch - RPI!32

Right part Left part Semi-Infinite tape machine # # L q 1 c Time 1 d e b g... Right part Left part # # d e c R q 1 Time 2 b g... END OF PROOF Costas Busch - RPI!33

The Off-Line Machine Input File a b c Input string read-only (once) Input string Appears on Control Unit input file only (state machine) Tape g read-write d e Costas Busch - RPI!34

Theorem: Off-Line machines have the same power with Standard Turing machines Proof: 1. Off-Line machines simulate Standard Turing machines 2. Standard Turing machines simulate Off-Line machines Costas Busch - RPI!35

1. Off-line machines simulate Standard Turing Machines Off-line machine: 1. Copy input file to tape! 2. Continue computation as in Standard Turing machine Costas Busch - RPI!36

Standard machine a b c Off-line machine Input File a b c Tape a b c 1. Copy input file to tape Costas Busch - RPI!37

Standard machine a b c q 1 Off-line machine Input File a b c Tape a b c q 1 2. Do computations as in Turing machine Costas Busch - RPI!38

2. Standard Turing machines simulate Off-Line machines: Use a Standard machine with a four-track tape to keep track of the Off-line input file and tape contents Costas Busch - RPI!39

Input File a b c d Off-line Machine Tape e f g Standard Machine -- Four track tape # # a b c d 0 0 1 0 e f g 0 1 0 Input File head position Tape head position Costas Busch - RPI!40

Reference point (uses special symbol # ) # # # # a b c d 0 0 1 0 e f g 0 1 0 Input File head position Tape head position Repeat for each state transition: 1. Return to reference point 2. Find current input file symbol 3. Find current tape symbol 4. Make transition END OF PROOF Costas Busch - RPI!41

Multi-tape Turing Machines Control unit (state machine) Tape 1 Tape 2 a b c e f g Input string Input string appears on Tape 1 Costas Busch - RPI!42

Tape 1 Time 1 Tape 2 a b c e f g q1 q 1 Tape 1 Time 2 Tape 2 a g c e d g q2 q2 ( b, f ) ( g, d), L, R q1 q2 Costas Busch - RPI!43

Theorem: Multi-tape machines have the same power with Standard Turing machines Proof: 1. Multi-tape machines simulate Standard Turing machines 2. Standard Turing machines simulate Multi-tape machines Costas Busch - RPI!44

1. Multi-tape machines simulate Standard Turing Machines: Trivial: Use just one tape Costas Busch - RPI!45

2. Standard Turing machines simulate Multi-tape machines: Standard machine: Uses a multi-track tape to simulate the multiple tapes A tape of the Multi-tape machine corresponds to a pair of tracks Costas Busch - RPI!46

Multi-tape Machine Tape 1 Tape 2 a b c e f g h Standard machine with four track tape a b c 0 1 0 e f g 0 0 1 h 0 Tape 1 head position Tape 2 head position Costas Busch - RPI!47

Reference point # # # # a b c 0 1 0 e f g 0 0 1 h 0 Tape 1 head position Tape 2 head position Repeat for each state transition: 1. Return to reference point 2. Find current symbol in Tape 1 3. Find current symbol in Tape 2 4. Make transition END OF PROOF Costas Busch - RPI!48

Same power doesn t n imply b n same speed: L = { a Standard Turing machine: Go back and forth O( n 2 ) times to match the a s with the b s 2-tape machine: n 1. Copy b to tape 2 O(n) n a } time 2. Compare on tape 1 n and b tape 2 O( n 2 ) time ( O(n) steps) ( O(n) steps) Costas Busch - RPI!49

Multidimensional Turing Machines 2-dimensional tape y c a b x MOVES: L,R,U,D U: up D: down HEAD Position: +2, -1 Costas Busch - RPI!50

Theorem: Multidimensional machines have the same power with Standard Turing machines Proof: 1. Multidimensional machines simulate Standard Turing machines 2. Standard Turing machines simulate Multi-Dimensional machines Costas Busch - RPI!51

1. Multidimensional machines simulate Standard Turing machines Trivial: Use one dimension Costas Busch - RPI!52

2. Standard Turing machines simulate Multidimensional machines Standard machine: Use a two track tape Store symbols in track 1 Store coordinates in track 2 Costas Busch - RPI!53

2-dimensional machine y c a b x a b 1 # 1 # 2 # 1 q 1 Standard Machine c # 1 q 1 symbols coordinates Costas Busch - RPI!54

Standard machine: Repeat for each transition followed in the 2-dimensional machine: 1. Update current symbol 2. Compute coordinates of next position 3. Go to new position END OF PROOF Costas Busch - RPI!55

Nondeterministic Turing Machines a b, L q 2 Choice 1 q 1 a c, R q 3 Choice 2 Allows Non Deterministic Choices Costas Busch - RPI!56

Time 0 a b c q 1 a b, L q 2 Time 1 Choice 1 b b c q 2 q 1 a c, R q 3 Choice 2 c b c q 3 Costas Busch - RPI!57

Input string w there is a computation: q0w! x q f y is accepted if Initial configuration Final Configuration Any accept state There is a computation: Costas Busch - RPI!58

Theorem: Nondeterministic machines have the same power with Standard Turing machines Proof: 1. Nondeterministic machines simulate Standard Turing machines 2. Standard Turing machines simulate Nondeterministic machines Costas Busch - RPI!59

1. Nondeterministic Machines simulate Standard (deterministic) Turing Machines Trivial: every deterministic machine is also nondeterministic Costas Busch - RPI!60

2. Standard (deterministic) Turing machines simulate Nondeterministic machines: Deterministic machine: Uses a 2-dimensional tape (which is equivalent to 1-dimensional tape) Stores all possible computations of the non-deterministic machine on the 2-dimensional tape Costas Busch - RPI!61

All possible computation paths Initial state Step 1 Step 2 reject accept infinite path Step i Step i+1 Costas Busch - RPI!62

The Deterministic Turing machine simulates all possible computation paths: simultaneously step-by-step in a breadth-first search fashion Costas Busch - RPI!63

NonDeterministic machine a b, q 1 a c, L R q 2 q 3 Time 0 a b c q 1 Deterministic machine # # # # # # # a b c # # q 1 # # # # # # current configuration Costas Busch - RPI!64

a b, q 1 a c, L R NonDeterministic machine Time 1 q 2 q 3 q 2 # # # # # # # b b c q # # 2 # # c b c # q 3 # b b c c b c q 3 Computation 1 Costas Busch - RPI!65 Deterministic machine Choice 1 Choice 2 # Computation 2

Deterministic Turing machine Repeat For each configuration in current step of non-deterministic machine, if there are two or more choices: 1. Replicate configuration 2. Change the state in the replicas Until either the input string is accepted or rejected in all configurations END OF PROOF Costas Busch - RPI!66

Remark: The simulation takes in the worst case exponential time compared to the shortest accepting path length of the nondeterministic machine Costas Busch - RPI!67