turing variations

Upload: nomore891

Post on 04-Mar-2016

226 views

Category:

Documents


0 download

DESCRIPTION

Variations on Turing completeness

TRANSCRIPT

  • Turings Thesis

    Costas Busch - RPI

  • Turings thesis (1930):Any computation carried outby mechanical meanscan be performed by a Turing Machine

    Costas Busch - RPI

  • Algorithm:An algorithm for a problem is a Turing Machine which solves the problem The algorithm describes the steps of the mechanical meansThis is easily translated to computation stepsof a Turing machine

    Costas Busch - RPI

  • When we say:There exists an algorithmWe mean:There exists a Turing Machinethat executes the algorithm

    Costas Busch - RPI

  • Variationsof theTuring Machine

    Costas Busch - RPI

  • Read-Write HeadControl UnitDeterministicThe Standard ModelInfinite Tape(Left or Right)

    Costas Busch - RPI

  • Variations of the Standard Model Stay-Option Semi-Infinite Tape Off-Line Multitape Multidimensional NondeterministicTuring machines with:Different Turing Machine Classes

    Costas Busch - RPI

  • We will prove:each new class has the same power with Standard Turing MachineSame Power of two machine classes:both classes accept the same set of languages(accept Turing-Recognizable Languages)

    Costas Busch - RPI

  • Same Power of two classes means:for any machine of first class there is a machine of second class such that: and vice-versa

    Costas Busch - RPI

  • A technique to prove same power.Simulation:Simulate the machine of one classwith a machine of the other classFirst Class Original Machine Second ClassSimulation Machinesimulates

    Costas Busch - RPI

  • Configurations in the Original Machinehave corresponding configurations in the Simulation MachineOriginal Machine:Simulation Machine:

    Costas Busch - RPI

  • the Simulation Machineand the Original Machineaccept the same stringsOriginal Machine:Simulation Machine:Accepting Configuration

    Costas Busch - RPI

  • Turing Machines with Stay-OptionThe head can stay in the same positionLeft, Right, StayL,R,S: possible head moves

    Costas Busch - RPI

  • Example:Time 1Time 2

    Costas Busch - RPI

  • Stay-Option machineshave the same power with Standard Turing machinesTheorem:Proof:1. Stay-Option Machines simulate Standard Turing machines 2.Standard Turing machines simulate Stay-Option machines

    Costas Busch - RPI

  • 1. Stay-Option Machines simulate Standard Turing machines Trivial: any standard Turing machine is also a Stay-Option machine

    Costas Busch - RPI

  • 2.Standard Turing machines simulate Stay-Option machinesWe need to simulate the stay head option with two head moves, one left and one right

    Costas Busch - RPI

  • Stay-Option MachineSimulation in Standard MachineFor every possible tape symbol

    Costas Busch - RPI

  • Stay-Option MachineSimulation in Standard MachineSimilar for Right movesFor other transitions nothing changes

    Costas Busch - RPI

  • example of simulationStay-Option Machine:12Simulation in Standard Machine:123END OF PROOF

    Costas Busch - RPI

  • Multiple Track Tapetrack 1track 2One symbolOne headA useful trick to perform morecomplicated simulationsOne Tape

    Costas Busch - RPI

  • track 1track 2track 1track 2

    Costas Busch - RPI

  • Semi-Infinite Tape......... When the head moves left from the border, it returns to the same positionThe head extends infinitely only to the right Initial position is the leftmost cell

    Costas Busch - RPI

  • Semi-Infinite machineshave the same power with Standard Turing machinesTheorem:Proof:2. Semi-Infinite Machines simulate Standard Turing machines 1.Standard Turing machines simulate Semi-Infinite machines

    Costas Busch - RPI

  • 1. Standard Turing machines simulate Semi-Infinite machines:a. insert special symbol at left of input string b. Add a self-loop to every state (except states with no outgoing transitions)Standard Turing Machine

    Costas Busch - RPI

  • 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

  • Standard machine.........Semi-Infinite tape machine with two tracks..................reference pointRight partLeft part

    Costas Busch - RPI

  • Left partRight partStandard machineSemi-Infinite tape machine

    Costas Busch - RPI

  • Standard machineSemi-Infinite tape machineLeft partRight partFor all tape symbols

    Costas Busch - RPI

  • Standard machine...........................Semi-Infinite tape machineRight partLeft partTime 1

    Costas Busch - RPI

  • Time 2Right partLeft partStandard machine...........................Semi-Infinite tape machine

    Costas Busch - RPI

  • Semi-Infinite tape machineLeft partAt the border:Right part

    Costas Busch - RPI

  • .........Semi-Infinite tape machineRight partLeft part.........Right partLeft partTime 1Time 2END OF PROOF

    Costas Busch - RPI

  • The Off-Line MachineControl UnitInput FileTaperead-only (once)read-writeInput string Appears on input file only(state machine)Input string

    Costas Busch - RPI

  • Off-Line machineshave the same power with Standard Turing machinesTheorem:Proof:1. Off-Line machines simulate Standard Turing machines 2.Standard Turing machines simulate Off-Line machines

    Costas Busch - RPI

  • 1. Off-line machines simulate Standard Turing MachinesOff-line machine:1. Copy input file to tape

    2. Continue computation as in Standard Turing machine

    Costas Busch - RPI

  • 1. Copy input file to tapeInput FileTapeStandard machineOff-line machine

    Costas Busch - RPI

  • 2. Do computations as in Turing machineInput FileTapeStandard machineOff-line machine

    Costas Busch - RPI

  • 2. Standard Turing machines simulate Off-Line machines:Use a Standard machine with a four-track tape to keep track ofthe Off-line input file and tape contents

    Costas Busch - RPI

  • Input FileTapeOff-line MachineStandard Machine -- Four track tape Input Filehead positionTapehead position

    Costas Busch - RPI

  • Input Filehead positionTapehead positionRepeat for each state transition: Return to reference point Find current input file symbol Find current tape symbol Make transitionReference point(uses special symbol # )END OF PROOF

    Costas Busch - RPI

  • Multi-tape Turing MachinesControl unitTape 1Tape 2Input stringInput string appears on Tape 1(state machine)

    Costas Busch - RPI

  • Time 1Time 2Tape 1Tape 2Tape 1Tape 2

    Costas Busch - RPI

  • Multi-tape machineshave the same power with Standard Turing machinesTheorem:Proof:1. Multi-tape machines simulate Standard Turing machines 2.Standard Turing machines simulate Multi-tape machines

    Costas Busch - RPI

  • 1. Multi-tape machines simulate Standard Turing Machines:Trivial: Use just one tape

    Costas Busch - RPI

  • 2. Standard Turing machines simulate Multi-tape machines: Uses a multi-track tape to simulate the multiple tapes A tape of the Multi-tape machine corresponds to a pair of tracksStandard machine:

    Costas Busch - RPI

  • Multi-tape MachineTape 1Tape 2Standard machine with four track tapeTape 1head positionTape 2head position

    Costas Busch - RPI

  • Repeat for each state transition:Return to reference pointFind current symbol in Tape 1Find current symbol in Tape 2Make transitionTape 1head positionTape 2head positionReference pointEND OF PROOF

    Costas Busch - RPI

  • ( steps)Standard Turing machine:Go back and forth times 2-tape machine:1. Copy to tape 2 2. Compare on tape 1 and tape 2to match the as with the bs( steps)timetimeSame power doesnt imply same speed:

    Costas Busch - RPI

  • Multidimensional Turing Machines2-dimensional tapeHEADPosition: +2, -1MOVES: L,R,U,DU: up D: down

    Costas Busch - RPI

  • Multidimensional machineshave the same power with Standard Turing machinesTheorem:Proof:1. Multidimensional machines simulate Standard Turing machines 2.Standard Turing machines simulate Multi-Dimensional machines

    Costas Busch - RPI

  • 1. Multidimensional machines simulate Standard Turing machinesTrivial: Use one dimension

    Costas Busch - RPI

  • 2. Standard Turing machines simulate Multidimensional machinesStandard machine: Use a two track tape Store symbols in track 1 Store coordinates in track 2

    Costas Busch - RPI

  • symbolscoordinates2-dimensional machineStandard Machine

    Costas Busch - RPI

  • Repeat for each transition followedin the 2-dimensional machine: Update current symbol Compute coordinates of next position Go to new positionStandard machine:END OF PROOF

    Costas Busch - RPI

  • Nondeterministic Turing MachinesAllows Non Deterministic ChoicesChoice 1Choice 2

    Costas Busch - RPI

  • Time 0Time 1Choice 1Choice 2

    Costas Busch - RPI

  • Input string is accepted if there is a computation:Initial configurationFinal ConfigurationAny accept stateThere is a computation:

    Costas Busch - RPI

  • Nondeterministic machineshave the same power with Standard Turing machinesTheorem:Proof:1. Nondeterministic machines simulate Standard Turing machines 2.Standard Turing machines simulate Nondeterministic machines

    Costas Busch - RPI

  • 1. Nondeterministic Machines simulate Standard (deterministic) Turing MachinesTrivial: every deterministic machine is also nondeterministic

    Costas Busch - RPI

  • 2. Standard (deterministic) Turing machines simulate Nondeterministic machines: Stores all possible computations of the non-deterministic machine on the 2-dimensional tapeDeterministic machine: Uses a 2-dimensional tape (which is equivalent to 1-dimensional tape)

    Costas Busch - RPI

  • All possible computation pathsInitial stateStep 1Step 2Step iStep i+1acceptrejectinfinitepath

    Costas Busch - RPI

  • The Deterministic Turing machinesimulates all possible computation paths:in a breadth-first search fashionsimultaneouslystep-by-step

    Costas Busch - RPI

  • Time 0NonDeterministic machineDeterministic machinecurrentconfiguration

    Costas Busch - RPI

  • Computation 1Choice 1Choice 2Computation 2NonDeterministic machineDeterministic machineTime 1

    Costas Busch - RPI

  • 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 END OF PROOFDeterministic Turing machineUntil either the input string is accepted or rejected in all configurations

    Costas Busch - RPI

  • The simulation takes in the worst case exponential time compared to the shortest accepting path length of the nondeterministic machineRemark:

    Costas Busch - RPI