Extensions of TM and The Church-Turing Thesis
Extensions of TM and The Church-Turing Thesis
Extensions of TM
1. multiple tapes
2. two-way infinite tape
3. random access
4. nondeterminism
1
Multitape Turing Machine
3-tape TM
a b a a a a
b a b b b b
a a a a
h q1 h q1
q2 q2
2
Multitape Turing Machines
Proof:
• We shall prove that any k-tape TM M1 can be simulated
by a standard Turing machine M2.
• M2 uses the new symbol # as a delimiter to separate the
contents of the different tapes.
# a b a # b a b # a a #
# a b a # b a b # a a #
3
Suppose M1 has σ1 · · · σn on its first tape initially.
1. M2 puts its tape into the following format:
• • •
# σ1 σ2 · · · σn# ⊔ # ⊔ · · · #
4
Example of Multitape TM
1) a b a a 3) a b a a
a b a a
2) a b a a 4) a b a a a b a a
a a a b a a
a b
5
Two-way infinite tape
-5 -4 -3 -2 -1 0 1 2 3 4
a b b
2-tape machine
Two-way infinite tape 4
0 1 2 3
a b b
-5 -4 -3 -2 -1 0 1 2 3 4
a b b a b b -1 -2 -3 -4
b b a
6
Random Access TMs
7
A random access TM can easily simulate a standard TM: Use
a register to keep track of the head position, another register
to store the state. Each state has a corresponding sequence of
instructions. In each step: load the tape cell, branch according
to the current state, then update the state register, and either
update the cell or the head position register according to the
transition function.
8
Nondeterministic TM
M = (K, Σ, ∆, s, H)
9
Nondeterministic TM
10
Nondeterministic TM
11
Nondeterministic TM
Proof
TM D has 3 tapes (proved to be equivalent to 1-tape TM).
• Tape 1 always contains the input string and is never altered.
• Tape 2 contains a copy of N ’s tape content while it takes
a branch of its nondeterministic computation.
• Tape 3 keeps track of D’s location in the tree.
Data representation of Tape 3
• Let b be the largest number of possible computation choices
at any configuration given by N ’s transition function (max-
imum is |K| × |Σ ∪ {→, ←}|). That is, b is the maximum
number of children any node in N ’s nondeterministic com-
putation tree can have.
• Assign an address to every node in the tree level by level.
The address is a string over Σb = {1, 2, ..., b}. The address
of the root node is e, the address of the root’s first child is
1, that of the root’s second child is 2, etc. For example, if
a node has address 231, then it means we arrive at it by
starting at the root, going to its 2nd child, going to that
node’s 3rd child, and finally going to that node’s 1st child.
• Some addresses are invalid, i.e., do not correspond to any
node in tree. Such an address has some symbol in the
12
address string that does not correspond to a real choice
because a configuration has fewer than b choices.
• Tape 3 contains a string over Σb (i.e. an address, which
may or may not be valid).
• If the address in Tape 3 is valid, D starts simulating the
branch of N ’s computation from the root to the node hav-
ing that address.
Description of D:
1. Initially Tape 1 contains the input w, and Tape 2 and 3 are
empty.
2. Copy Tape 1 to Tape 2. (Tape 3 contains empty string
which is the address of the root of N ’s computation tree).
3. Use Tape 2 to simulate N with input w along the branch
of computation indicated by the address in Tape 3. Be-
fore each step of N , consult the next symbol on Tape 3
to determine which choice to make. If no more symbols
remain on Tape 3, or if this nondeterministic choice is in-
valid, or if a rejecting configuration is encountered, go to 4.
If an accepting configuration is encountered, halt (accept
the input).
4. Replace the string on Tape 3 with the lexicographically
next string. Simulate the next branch of N ’s computation
by going to 2.
13
Note that if one of N ’s non-deterministic computations on w
halts at y, then D will also halt at y on w. If all of N ’s non-
deterministic computations on w halt at n, then D will also halt
at n. If all of N ’s non-deterministic computations loop, then
D will also loop. That is, D decides/semi-decides the same
language as N .
14
The Church-Turing Thesis
15