text
stringlengths
0
8.13M
base), we can use the same notation as in the preceeding section. Let n be the
code for the number n and (n ,n ,...,n ) the code for the d-tuple of numbers
1 2 d
(n ,n ,...,n ), then
1 2 d
f (n ,n ,...,n )=M(q (n ,n ,...,n ),
M 1 2 d 1 1 2 d
if the computation exists, otherwise the function is undefined.
It is often convenient to simplify the notation somewhat and simply write
M(n ,n ,...,n ) for M(q (n ,n ,...,n ), so that f (x) and M(x) denotes the
1 2 d 1 1 2 d M
same object.
The blank symbol confusion
There seems to some confusion in the literature as to how to treat the blank
symbol. In formal language theory, if one wants to have strings with blanks
in them, the obvious way is simply to include a special blank symbol among
the symbols. Since a string is always finite, there is no need to designate the
beginningandendofastringinanyspecialway. Inparticular,startingastring
with blanks, or ending it with blanks, makes no sense. Such blanks would be
trimmed away.
However, in Turing machine theory, the tape is potentially infinite, and the
machine needs some way to know where the right and left ends of the actually
used part of the tape is. The obvious way would be to use the blank symbol as
suchadesignator. Thisisoftenphrasedas,’... astringwrittenonanotherwise
blanktape...’. Butthen,iftheblankisinthealphabet,andthestringwrittenon
thetapecontainsblanks,themachinewillnotknowwhetherablankdesignates
the end of the actually used tape, or if it is a blank within the string (as in the
case where the blank separates the numbers n in a d-tuple input). One way
i
around this dilemma is to use two consecutive blanks, , to designate tape
⊔⊔
ends. In that case, the languages defined over the alphabet, needs to exclude
strings with two consecutive blanks, otherwise, the confusion remains. Thus,
when languages L over the alphabet Σ is mentioned, it is understood that no
words in the language contain two consecutive blanks.
Anotherwayistoincludetwodifferent’blank’symbols,forexample ,# ,
{⊔ }
one # denoting ’string blanks’ or input separators,the other designating the
’left’ and ’right’ ends of the tape. This is the convention used in the present
work. Any other’language’blanks playno rolein defining the generalmodelof
Turing machines and need only be defined in specific examples.
String processing
The model is, of course, not restricted to computing numeric functions. In
general, a Turing machine, performs string processing, taking an input string
28
w from the set of strings Γ , producing an output string w if it halts on the
i ∗ o
input. More formally, the Turing machine M defines a partial function
f :Γ Γ (2.9)
M ∗ ∗
where
f (w )=w Γ (2.10)
M i o ∗
if M halts on input w , undefined otherwise.
i
The state graph
Since the set of tape expressions is infinite, the space of instantaneous descrip-
tions,orstates,isalsoinfinite. Acomputationcanbeviewedasadirectedgraph
in this space. This graph will be denoted with G = (S ,T ) where S (state
c v e v
vertices) denotes the setofvertices correspondingto states in the computation,
and T (transition edges) denotes the set of edges corresponding to transitions,
e
i.e. computational steps. Two vertices v and v are connected by an edge if
i j
there is a corresponding instruction in the program, taking the machine from
state v to state v .
i j
Note that for a deterministic Turing machine, the state graph is simply a
path in the state space. For a computation that halts, i.e. a computation that
starts in a certain state and ends in another state, the path is non-intersecting.
This can be understood as follows. If the path intersected itself, so that the
machine returned to an ’earlier’state, then the machine wouldenter aninfinite
loop, and would not halt. Therefore, terminating computations corresponds to
linear paths.
Concluding the formal definition of a Turing machine
When defined in this way, everything looks static. Where does motion enter?
Well, the computation, i.e. the series of instantaneous descriptions must be
computed, at least once for each input d-tuple. Someone or something has to
do this, human or machine. This is where motion enters. This is obvious if one
considers doing the calculation with pen and paper.
AlsonotethatitissometimesconvenienttoworkwithTuringmachineswith
several tapes with concomitant read/write heads.
Apart from the question of actually performing the computations, this is
a formal theory of computation. There are many other models of computa-
tion. Off the formal ones, we have the (Herbrand-G¨odel) recursive functions,
Church’s λ-calculus, both contemporary with the Turing model. The RAM
(Random Access Machine) model is close to an actual computer. Then there
arelotsofsimplifiedprogramminglanguages,containingjustthebareminimum
of constructions. A survey of computational models can be found in [22].
29
2.3.3 Syntax and semantics
It is interesting in this context to digress slightly and discuss the question of
syntax vs semantics for this model. The Turing machine model reduces com-
putation to syntax. Everything written above could easily be phrased in terms
of a specification of a formal language. No meaning is conferred to the ele-
ments of the model. One does not need to understand the tape expressions or