Professional Documents
Culture Documents
Turing Machines 1
Turing Machines 1
2013
FOUNDATIONS OF COMPUTATION 2009
2013
LECTURE NOTES 12
ISSUED 28
23 NOVEMBER
NOVEMBER2014
2009
1.
Turing machines
control
ISSUED 23
2009
20 NOVEMBER
NOVEMBER 2013
Let (q, a) = (p, b). Then TM, when in the state q and reading the letter a, will
adopt the state p and
if b then will replace a by b;
if b {, } then will move the head in the direction b.
TM will stop only when it adopts a halting state. If TM observes ., it must
move to the right (by (a)). In this way . is never erased, and TM never falls off its
left end.
By (b) TM never writes . so this symbol is unique on the tape.
2.
Examples
The following machine erases any input and then halts:
({s, q, h}, {a, t, .}, , s, {h}),
letter
a
t
.
a
t
.
(state, letter)
(q, t)
(h, t)
(s, )
(s, a)
(s, )
(q, )
Note that some of the transitions in the table, e.g., the fourth, are not used in any
computation, but the function is defined at every element of the set (Q \ H) .
Another example, a Turing machine that does not halt on any input, but runs
from its beginning to its end, then back to the beginning and so forth.:
state
s
s
s
q
q
q
3.
letter
a
t
.
a
.
t
(state, letter)
(s, )
(q, )
(s, .)
(q, )
(s, )
(h, t)
Computations
LECTURE NOTES 12
(3) position of the head (the head it is observing the letter a between .w and
v).
We will abbreviate the notation (q, .w, a, v) to just a pair (q, .wav).
Definition.
A configuration (q, .wav) is called halting if q H.
A configuration (q1 , w1 a1 v1 ) yields a configuration q2 , w2 a2 v2 ) in one step
if the second is obtained from the thirst by one application of the transition
function.
A configuration C1 yields a configuration Cn if there is a sequence of configurations C2 , . . . , Cn1 such that Ci yields Ci+1 for all i = 1, . . . , n 1.
In what follows we assume that inputs of TM are words over an alphabet 0
\ {t, .}. The initial configuration is (s, .tw) where w 0 is an input word.
TM halts on w 0 if the initial configuration yields a halting configuration.
4.