ECS 120 Lesson 16 – Turing Machines, Pt. 2
Oliver Kreylos
Friday, May 4th, 2001
In the last lesson, we looked at Turing Machines, their differences to finite
state machines and pushdown automata, and their formal definition. Today
we will concentrate on the computation of Turing Machines.
First, let us
recollect the informal notion of how a Turing Machine processes an input
word:
1. Before a Turing Machine starts computation, the input word
w
=
w
1
w
2
. . . w
n
∈
Σ
*
will be written into the leftmost
n
cells of the work
tape.
All other tape cells will be filled with the special blank sym
bol
∈
Γ. The read/write head will be located over the leftmost tape
cell, and the state control will be in the start state
q
0
.
2. In each step of computation, the machine will read the character
a
∈
Γ
located underneath the read/write head and transition from its current
state
q
1
∈
Q
guided by the transition function
δ
: If
δ
(
q
1
, a
) = (
q
2
, b, D
),
then the machine will transition to state
q
2
∈
Q
, will replace the char
acter in the tape cell underneath the read/write head by the tape char
acter
b
∈
Γ, and will move the read/write head one cell to the left
if
D
= L or one cell to the right if
D
= R.
If the read/write head
is currently located over the leftmost tape cell, and
D
= L, then the
read/write head will remain in its current position.
3. To finish the computation, the machine must enter either the accept
state
q
accept
∈
Q
or the reject state
q
reject
∈
Q
.
In the former case,
the machine accepts the input word; in the latter case, it rejects.
If
the machine never enters either the accept state or the reject state,
computation will continue forever and the machine will never halt.
1
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
1
Formal Definition of Turing Machine Com
putation
To formalize our understanding of how a Turing Machine computes, we have
to find a way of describing its current configuration. In the study of PDAs, we
encountered
instantaneous descriptions
, which exactly describe the status of
computation of a PDA. We will use the same mechanism for Turing Machines
as well. To specify a Turing Machine’s configuration, we have to know:
•
The current state it is in,
•
The current contents of the work tape, and
•
the current position of the read/write head.
As for PDAs, we will encode the work tape’s contents as a string over Γ.
Since all the tape cells to the right of the rightmost position the read/write
head ever was in are filled with blank symbols, we will not explicitly include
those into the tape string.
To encode the read/write head’s position, we
will split the tape string into two parts
u, v
∈
Γ
*
; the first,
u
, containing all
characters from tape cells to the left of the read/write head’s current position,
and the second,
v
, containing the characters underneath the tape head and
to the right.
Together with the machine’s current state, an instantaneous
description (ID) for a Turing Machine is a triple (
u, q, v
)
∈
Γ
*
×
Q
×
Γ
*
,
where the current state is
q
, the current tape content is
uv
*
(
u
followed
by
v
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '07
 Filkov
 Turing Machines, read/write head

Click to edit the document details