Variants of Turing Machines - PowerPoint PPT Presentation

1 / 23
About This Presentation
Title:

Variants of Turing Machines

Description:

Move the location of the current symbol one space left or right for each 'tape. ... If not, then continue in the same manner. Nondeterminism ... – PowerPoint PPT presentation

Number of Views:414
Avg rating:3.0/5.0
Slides: 24
Provided by: robbko
Category:

less

Transcript and Presenter's Notes

Title: Variants of Turing Machines


1
Variants of Turing Machines
  • Lecture 26
  • Section 3.2
  • Mon, Oct 22, 2007

2
Increasing the Power of a Turing Machine
  • It is hard to believe that something as simple as
    a Turing machine could be powerful enough for
    complicated problems.

3
Increasing the Power of a Turing Machine
  • We can imagine a number of improvements.
  • Multiple tapes
  • Two-way infinite tape
  • Two-dimensional tape
  • Addressable memory
  • Nondeterminism
  • etc.

4
Multiple Tapes
  • Would a Turing machine with k tapes, k gt 1, be
    more powerful than a standard Turing machine?
  • Each tape could be processed independently of the
    others.

5
Multiple Tapes
  • In other words, each transition would read each
    tape, write to each tape, and move left or right
    independently on each tape.

6
Multiple Tapes
  • Theorem Any language that is accepted by a
    multitape Turing machine is also accepted by a
    standard Turing machine.

7
Multiple Tapes
  • Sketch of the proof
  • On a single tape, we could write the contents of
    all k tapes.
  • If tape i contains xi1xi2xi3, for each i, then
    write
  • x11x21xk1x12x22xk2...
  • on the single tape.

8
Multiple Tapes
  • To show the current location on each tape, put a
    special mark on one of that tapes symbols
  • x11x21xk1x12x22xk2...
  • Now the Turing machine scans the tape, locating
    the current symbol on each tape.

9
Multiple Tapes
  • It then makes the appropriate transition.
  • Write a symbol over each of the current symbols.
  • Move the location of the current symbol one space
    left or right for each tape.
  • Of course, the devil is in the details.

10
Two-way Infinite Tape
  • We can use a two-tape machine to simiulate the
    two-way infinite tape.
  • The right half of the two-way tape is stored on
    tape 1.
  • The left half is stored on tape 2.
  • Transitions are modified to handle the transition
    from tape 1 to tape 2.

11
Two-way Infinite Tape
  • Theorem Any language accepted by a two-way
    infinite tape is also accepted by a standard
    Turing machine.

12
Other Variants
  • Metatheorem Any language accepted by a Turing
    machine with any variant that anyone has ever
    thought of is also accepted by a standard Turing
    machine.

13
Nondeterminism
  • A nondeterministic Turing machine is defined like
    a standard Turing machine except for the
    transition function.
  • ? Q? ? ? ? ?(Q ? ? ? L, R)
  • where Q? Q qacc, qrej.

14
Nondeterminism
  • That is, ?(q, a) may result in any of a number of
    actions.
  • If any sequence of transitions leads to the
    accept state, then the input is accepted.
  • If all sequences of transitions lead to the
    reject state or to looping, then the input is not
    accepted.

15
Nondeterminism
  • Theorem Any language accepted by a
    nondeterministic Turing machine is also accepted
    by a standard Turing machine.

16
Nondeterminism
  • Proof
  • We may use a three-tape machine to simulate a
    nondeterministic Turing machine.
  • Tape 1 preserves a copy of the original input.
  • Tape 2 contains a working copy of the input.
  • Tape 3 keeps track of the current state in the
    nondeterministic machine.

17
Nondeterminism
  • Start with the input w on Tape 1 and with Tapes 2
    and 3 empty.
  • Copy w from Tape 1 to Tape 2.
  • For Tape 3, imagine the transitions starting from
    the start state as forming a tree.
  • Each state has child states.

18
Nondeterminism
  • Let b be the largest number of children of any
    node.
  • Number the children of each state using the
    numbers 1, 2, , b (as many as needed).

19
Nondeterminism
  • Now each finite string of numbers from 1, 2, ,
    b represents a particular path through the
    nondeterministic Turing machine, or else
    represents no path at all.
  • Beginning by writing the empty string on Tape 3,
    representing no moves at all.

20
Nondeterminism
  • If that leads to acceptance, then quit.
  • If not, then replace ? with its lexicographical
    successor.
  • For that string, follow the sequence of
    transitions that it describes.

21
Nondeterminism
  • If that sequence leads to acceptance, then quit
    and accept.
  • If not, then continue in the same manner.

22
Nondeterminism
  • If w is accepted by the nondeterministic Turing
    machine, then some sequence of transitions leads
    to the accept state.
  • Eventually that sequence will be written on Tape
    3 and tried.

23
Nondeterminism
  • On the other hand, if no sequence of transitions
    leads to the accept state, then the deterministic
    Turing machine will loop.
Write a Comment
User Comments (0)
About PowerShow.com