Sei sulla pagina 1di 4

VARIANTS OF TURING MACHINES - 2/23/05

Notes by Jordan Ganoff and Niel Stuver



Multitape Turing Machines



Standard Turing Machine (STM) Multitape Turing Machine (MTTM)

MTTM STM



Steps to convert:
1. Place dots and extra tape squares separated by #
2. Let S be an STM:
a. S scans tape for all symbols at tape head positions
b. S makes a second pass to update the tape
3. If S moves onto a #, make this square blank and copy each subsequent square
over to the right one spot

MTTMs can now be used in place of STMs for homework and further proofs.

Nondeterministic Turing Machines

: Q x P( Q x x {L,R} )
input tape:
a b c
a a
a b -- --
a b c a a b represent tape heads
a b c a a b # a b -- -- # a a # a b c #
= { a, b, c } = { a, b, c, --, a, b, c, --, # }


k 1 tapes
input tape
k tapes
: Q x
k
Q x
k
x {L,R}
k


For a string to be accepted there must exist a computation path that leads the machine
into qaccept.

Standard Turing Machine (STM) Nondeterministic Turing Machines (NDTM)

NDTM STM

The NDTM can be simulated on a STM using a MTTM with 3 tapes.



Let k be the maximum number of possible transitions from any (state, alpha) pair.

Ex. If k = 3: { 1, 2, 3, 11, 12, 13, 21, 22, 23, 31, 32, 33, 111, 112, }

The numbers correspond to the branch of computation chosen. These numbers are
listed in lexicographical order. k is determined by looking at the description of the
NDTM.

Steps to convert:
1. Copy input onto the simulation tape
2. Initialize or increment the address counter
3. Simulate running the CDTM with the computation path on the simulation tape. If it
accepts, accept and halt. Otherwise, clear the simulation tape and go to step 1.

Enumerators

Starts by working on a blank tape.
Writes out strings on the tape to the printer in any order, possibly with repetitions.

The language that an enumerator describes is the set of distinct strings that that it prints
out.

Standard Turing Machine (STM) Enumerators (EN)

EN STM

Steps to convert:
1. Run the enumerator. Compare each outputted string to the string w.
2. If w ever appears in the output of the enumerator, accept.

a b b a
address/ computation tree tape
simulation tape
input tape
STM EN

Steps to convert:
1. Repeat steps 2 and 3 for i = 1, 2, 3,
2. Run M for i steps on each input s1, s2, , si
3. If any computations accept, print out the corresponding sk

Tape Configuration is a triple model:

A Turing machine is specified by a finite alphabet , a finite set of states K with a special
element s (the starting state), and a transition function : K x . It is assumed that for a Turing
Machine , K, {halt, yes, no}, and {<-, ->, -} are disjoint sets, and that contains two special
elements , representing the start and end of the tape, respectively. We require that for every q
K, if (q, ) = (p, , d) then = and d not equal to <-.
Hence, the configuration for the above Turing Machine is given as
(K U {halt, yes, no}) x x {<-, ->, -}
Example:
Consider the set
*
is the set of all finite sequences of elements . When an element of
*
is
denoted by a letter such as x, then the elements of the sequence x are denoted by x0,
x1,xn-1, where n is the length of x. The length of x is denoted by |x|.
Hence, the configuration of a Turing Machine is an ordered triple
(x, q, k)
*
x K x N
Where,
x denotes the string on the tape
q denotes the machines current state
k denotes the position of the machine on the tape
The string x is required to begin with and end with . The position k is required to satisfy 0 k
< |x|.
A computation of a Turing Machine is a sequence of configurations (xi, qi, ki), where i runs from
0 to T (allowing for the case T = infinity) that satisfies:
The machine starts in a valid starting configuration, meaning that q0 = s and k0 = 0
Each pair of consecutive configurations represents a valid transitions, i.e for 0 i < T, it
is the case that (xi, qi, ki) -> (xi+1, qi+1, ki+1)
IF T = infinity, we say that the computation does not halt.
IF T < infinity, we require that qT {halt, yes, no} and we say that the computation halts
So, the configuration of a Turing Machine is an ordered triple
(x, q, k)
*
x K x N

Potrebbero piacerti anche