Fall 2004COMP 3351 Turing’s Thesis
Fall 2004COMP 3352 Turing’s thesis: Any computation carried out by mechanical means can be performed by a Turing Machine (1930)
Fall 2004COMP 3353 Computer Science Law: A computation is mechanical if and only if it can be performed by a Turing Machine There is no known model of computation more powerful than Turing Machines
Fall 2004COMP 3354 Definition of Algorithm: An algorithm for function is a Turing Machine which computes
Fall 2004COMP 3355 When we say: There exists an algorithm Algorithms are Turing Machines We mean: There exists a Turing Machine that executes the algorithm
Fall 2004COMP 3356 Variations of the Turing Machine
Fall 2004COMP 3357 Read-Write Head Control Unit Deterministic The Standard Model Infinite Tape (Left or Right)
Fall 2004COMP 3358 Variations of the Standard Model Stay-Option Semi-Infinite Tape Off-Line Multitape Multidimensional Nondeterministic Turing machines with:
Fall 2004COMP 3359 We want to prove: Each Class has the same power with the Standard Model The variations form different Turing Machine Classes
Fall 2004COMP Same Power of two classes means: Both classes of Turing machines accept the same languages
Fall 2004COMP Same Power of two classes means: For any machine of first class there is a machine of second class such that: And vice-versa
Fall 2004COMP a technique to prove same powerSimulation: Simulate the machine of one class with a machine of the other class First Class Original Machine Second Class Simulation Machine
Fall 2004COMP Configurations in the Original Machine correspond to configurations in the Simulation Machine Original Machine: Simulation Machine:
Fall 2004COMP The Simulation Machine and the Original Machine accept the same language Original Machine: Simulation Machine: Final Configuration
Fall 2004COMP Turing Machines with Stay-Option The head can stay in the same position Left, Right, Stay L,R,S: moves
Fall 2004COMP Example: Time 1 Time 2
Fall 2004COMP Stay-Option Machines have the same power with Standard Turing machines Theorem:
Fall 2004COMP Proof: Part 1: Stay-Option Machines are at least as powerful as Standard machines Proof:a Standard machine is also a Stay-Option machine (that never uses the S move)
Fall 2004COMP Part 2: Standard Machines are at least as powerful as Stay-Option machines Proof:a standard machine can simulate a Stay-Option machine Proof:
Fall 2004COMP Stay-Option Machine Simulation in Standard Machine Similar for Right moves
Fall 2004COMP Stay-Option Machine Simulation in Standard Machine For every symbol
Fall 2004COMP Example Stay-Option Machine: 12 Simulation in Standard Machine: 123
Fall 2004COMP Standard Machine--Multiple Track Tape track 1 track 2 one symbol
Fall 2004COMP track 1 track 2 track 1 track 2
Fall 2004COMP Semi-Infinite Tape
Fall 2004COMP Standard Turing machines simulate Semi-infinite tape machines: Trivial
Fall 2004COMP Semi-infinite tape machines simulate Standard Turing machines: Standard machine Semi-infinite tape machine
Fall 2004COMP Standard machine Semi-infinite tape machine with two tracks reference point Right part Left part
Fall 2004COMP Left partRight part Standard machine Semi-infinite tape machine
Fall 2004COMP Standard machine Semi-infinite tape machine Left part Right part For all symbols
Fall 2004COMP Standard machine Semi-infinite tape machine Right part Left part Time 1
Fall 2004COMP Time 2 Right part Left part Standard machine Semi-infinite tape machine
Fall 2004COMP Semi-infinite tape machine Left part At the border: Right part
Fall 2004COMP Semi-infinite tape machine Right part Left part Right part Left part Time 1 Time 2
Fall 2004COMP Theorem:Semi-infinite tape machines have the same power with Standard Turing machines
Fall 2004COMP The Off-Line Machine Control Unit Input File Tape read-only read-write
Fall 2004COMP Off-line machines simulate Standard Turing Machines: Off-line machine: 1. Copy input file to tape 2. Continue computation as in Standard Turing machine
Fall 2004COMP Copy input file to tape Input File Tape Standard machine Off-line machine
Fall 2004COMP Do computations as in Turing machine Input File Tape Standard machine Off-line machine
Fall 2004COMP Standard Turing machines simulate Off-line machines: Use a Standard machine with four track tape to keep track of the Off-line input file and tape contents
Fall 2004COMP Input File Tape Off-line Machine Four track tape -- Standard Machine Input File head position Tape head position
Fall 2004COMP Input File head position Tape head position Repeat for each state transition: Return to reference point Find current input file symbol Find current tape symbol Make transition Reference point
Fall 2004COMP Off-line machines have the same power with Stansard machines Theorem:
Fall 2004COMP Multitape Turing Machines Control unit Tape 1Tape 2 Input
Fall 2004COMP Time 1 Time 2 Tape 1Tape 2
Fall 2004COMP Multitape machines simulate Standard Machines: Use just one tape
Fall 2004COMP Standard machines simulate Multitape machines: Use a multi-track tape A tape of the Multiple tape machine corresponds to a pair of tracks Standard machine:
Fall 2004COMP Multitape Machine Tape 1Tape 2 Standard machine with four track tape Tape 1 head position Tape 2 head position
Fall 2004COMP Repeat for each state transition: Return to reference point Find current symbol in Tape 1 Find current symbol in Tape 2 Make transition Tape 1 head position Tape 2 head position Reference point
Fall 2004COMP Theorem:Multi-tape machines have the same power with Standard Turing Machines
Fall 2004COMP Same power doesn’t imply same speed: Language Acceptance Time Standard machine Two-tape machine
Fall 2004COMP Standard machine: Go back and forth times Two-tape machine: Copy to tape 2 Leave on tape 1 Compare tape 1 and tape 2 ( steps)
Fall 2004COMP MultiDimensional Turing Machines Two-dimensional tape HEAD Position: +2, -1 MOVES: L,R,U,D U: up D: down
Fall 2004COMP Multidimensional machines simulate Standard machines: Use one dimension
Fall 2004COMP Standard machines simulate Multidimensional machines: Standard machine: Use a two track tape Store symbols in track 1 Store coordinates in track 2
Fall 2004COMP symbols coordinates Two-dimensional machine Standard Machine
Fall 2004COMP Repeat for each transition Update current symbol Compute coordinates of next position Go to new position Standard machine:
Fall 2004COMP MultiDimensional Machines have the same power with Standard Turing Machines Theorem:
Fall 2004COMP NonDeterministic Turing Machines Non Deterministic Choice
Fall 2004COMP Time 0 Time 1 Choice 1 Choice 2
Fall 2004COMP Input string is accepted if this a possible computation Initial configurationFinal Configuration Final state
Fall 2004COMP NonDeterministic Machines simulate Standard (deterministic) Machines: Every deterministic machine is also a nondeterministic machine
Fall 2004COMP Deterministic machines simulate NonDeterministic machines: Keeps track of all possible computations Deterministic machine:
Fall 2004COMP Non-Deterministic Choices Computation 1
Fall 2004COMP Non-Deterministic Choices Computation 2
Fall 2004COMP Keeps track of all possible computations Deterministic machine: Simulation Stores computations in a 2D tape
Fall 2004COMP Time 0 NonDeterministic machine Deterministic machine Computation 1
Fall 2004COMP Computation 1 Choice 1 Choice 2 Computation 2 NonDeterministic machine Deterministic machine Time 1
Fall 2004COMP Repeat Execute a step in each computation: If there are two or more choices in current computation: 1. Replicate configuration 2. Change the state in the replica
Fall 2004COMP Theorem: NonDeterministic Machines have the same power with Deterministic machines
Fall 2004COMP Remark: The simulation in the Deterministic machine takes time exponential time compared to the NonDeterministic machine