Variants of Turing Machines
Variants of Turing Machines – p.1/49
Variants of Turing Machines Variants of Turing Machines p.1/49 - - PowerPoint PPT Presentation
Variants of Turing Machines Variants of Turing Machines p.1/49 Robustness Robustness of a mathematical object (such as proof, definition, algorithm, method, etc.) is measured by its invariance to certain changes To prove that a
Variants of Turing Machines – p.1/49
Variants of Turing Machines – p.2/49
Variants of Turing Machines – p.3/49
Sketch of proof:
transition can be represented by two transitions: one that move to the left followed by one that moves to the right.
Variants of Turing Machines – p.4/49
Variants of Turing Machines – p.5/49
Variants of Turing Machines – p.6/49
Variants of Turing Machines – p.8/49
Variants of Turing Machines – p.9/49
1
a
b a
✡ ✟ ✟ ✟ ✠b a
✡ ✟ ✟ ✟ ✠1 1
✡ ✟ ✟ ✟ ✠Variants of Turing Machines – p.10/49
in the format that represents
✌ ✆✞✝✠✟ ✡☛✍ ☞:
✡ ✆ ✝ ✟ ✡ ☛ ☞✏✎ ✑ ✒✔✓✖✕✘✗ ✗ ✗ ✓✚✙ ✑ ✒✜✛ ✑ ✗ ✗ ✗ ✑ ✒✜✛ ✑(which represent the left-hand end) to the
✆ ✣✢ ✆ ☞(which represent the right-hand end) to determine the symbols under the virtual heads. Then
✡makes the second pass over the tape to update it according to the way
✌’s transition function dictates.
moves one of the virtual heads to the right of
✑it means that
✌has moved on the corresponding tape onto the unread blank portion of that tape. So,
✡shifts the tape contents from this cell until the rightmost
✑, one unit to the right, and then writes a
✛simulates as before".
Variants of Turing Machines – p.11/49
That is, if
then
TM
✡that simulates
✌Variants of Turing Machines – p.12/49
Variants of Turing Machines – p.13/49
Variants of Turing Machines – p.14/49
Variants of Turing Machines – p.15/49
Note:
backing up to explore next branch.
accepting confi guration on an other branch
Variants of Turing Machines – p.16/49
Note:
going to explore any branch at the next depth.
until it encounters an accepting confi guration
Variants of Turing Machines – p.17/49
Variants of Turing Machines – p.18/49
1 2 3 3 2 3 1 2 1 1 3
✡ ✟ ✟ ✟address tape x x
x
✡ ✟ ✟ ✟simulation tape 1
✡ ✟ ✟ ✟input tape
✠Variants of Turing Machines – p.19/49
starting at the root, going to its second child and then going to that node’s third child and then going to that node’s fi rst child
Variants of Turing Machines – p.20/49
when simulating a step in one branch in
computation
choices are available for a confi guration. In that case the address is invalid and doesn’t correspond to any node
which represents a branch of
computation from the root to the node addressed by that string, unless the address is invalid.
is the address of the root.
Variants of Turing Machines – p.21/49
and tape 2 and 3 are empty
nondeterministic computation.
determine which choice to make among those allowed by
transition function
choice is invalid, abort this branch by going to stage 4.
accepting confi guration is encountered, accept the input
and simulate the next branch of
stage 2.
Variants of Turing Machines – p.22/49
Turing-recognizable.
Variants of Turing Machines – p.23/49
Sketch of a proof:
a DTM is automatically a NTM, it follows that if L is decidable it is decidable by a NTM.
means that
that decides
runs the same algorithm as in the proof of theorem 3.16 with an addition stage: reject if all branches of nondeterminism of
Variants of Turing Machines – p.24/49
and tape 2 and 3 are empty
nondeterministic computation.
determine which choice to make among those allowed by
.
choice is invalid, abort this branch by going to stage 4.
accepting confi guration is encountered, accept the input
and simulate the next branch of
stage 2.
Variants of Turing Machines – p.25/49
To prove that
decide
Tree theorem: if every node in a tree has fi nitely many children and any
branch of the tree has fi nitely many nodes then the tree itself has fi nitely many nodes.
Proof:
,
will eventually fi nd an accepting branch and will accept
✓as well.
, all of its branches halt and reject because
where each node represents a step in
branch.
tree is fi nite, and thus
halts and rejects when the entire tree has been explored
Variants of Turing Machines – p.26/49
Note: some people use the term recursively enumerable language for
languages recognized by enumerators
Variants of Turing Machines – p.27/49
Variants of Turing Machines – p.28/49
that recognizes
for
that consider
✍ ✕✄✂ ✍ ☎ ✂ ✗ ✗ ✗ ✂the list of all possible strings in
, where
.
✁= "Ignore the input.
for
✂steps on each input
✍ ✕✞✂ ✍ ☎ ✂ ✗ ✗ ✗ ✂ ✍ ✟"
Variants of Turing Machines – p.29/49
In fact
✍will appear infi nitely many times because
✌runs from the beginning on each string for each repetition of step 1. I.e., it appears that
✌runs in parallel on all possible input strings
Variants of Turing Machines – p.30/49
= "On input
✓:
. Every time
✁.
ever appears in the output of
✁accept."
Variants of Turing Machines – p.31/49
Variants of Turing Machines – p.32/49
Variants of Turing Machines – p.33/49
Variants of Turing Machines – p.34/49
This is done by:
.
performs as follows:
✞ ✟ ✡✠ ☛ ✎ ✞ ✂Variants of Turing Machines – p.35/49
is written with the input string and the second tape is blank.
the starting cell of the input string.
right appears on the fi rst tape of the 2-tape TM. The portion to the left of the input string appears on the second tape, in reverse
Variants of Turing Machines – p.36/49
M-tape,
✂✁1 2
✄ ☎ ✆ ☎ ✁ ✟ ✟ ✟ ☎✞✝ ✡ ✟ ✟ ✟M-tape,
2 1
Variants of Turing Machines – p.37/49
left-hand end and read only at the right hand-end.
) adds a symbol to the left-hand end of the queue
) reads and removes a symbol at the right-hand end.
Variants of Turing Machines – p.38/49
Variants of Turing Machines – p.39/49
Variants of Turing Machines – p.40/49
holds the input, and the second tape of
✌holds the queue.
reads the symbol under the fi rst head and moves to the right.
,
✌writes
✟second tape.
,
✌reads the rightmost symbol on the second tape and shifts the tape one symbol leftward.
Note: Multitape TM-s are equivalent to single tape TM-s, so we can
conclude that if a language is recognized by DQA is is recognized by a TM.
Variants of Turing Machines – p.41/49
’s tape alphabet
☎ ✂, the alphabet
☎ ✞and
✡ ✌.
to denote
✌with
✌’s head over it.
has an end-of-tape marker symbol denoted
✍.
Variants of Turing Machines – p.42/49
Variants of Turing Machines – p.43/49
’s tape head moves leftwards, the updating of the queue is done by writing the new symbol
✌instead of the old
✡ ✌and moving the
✡Formally: if current confi guration is
and
✁ ✆✟✞ ✂then the next confi guration is
and is obtained by: pull v; push v; pull t; push t; pull hat(b); push c; pull a; push hat(a); pull u; push u
Variants of Turing Machines – p.44/49
’s tape head moves rightward, the updating is harder because the
✡must go to the right.
is pulled from the queue, the symbol which receives the
✡has already been pushed onto the queue.
Variants of Turing Machines – p.45/49
The solution is to hold tape symbols in the control for an extra move, before pushing them onto the queue. This gives
move the
✡rightward if necessary.
Formally: if current confi guration is
and
✁ ✆ ✞ ✂then the next confi guration is
and is obtained by: pull v; push v; pull t; hold (t); pull hat(b); push hat(t); push(c); pull u; push u;
Variants of Turing Machines – p.46/49
Example: recursive functions, normal algorithms, semi-thue
systems,
Variants of Turing Machines – p.47/49
Variants of Turing Machines – p.48/49
Variants of Turing Machines – p.49/49