text
stringlengths
0
8.13M
read off output from the terminal description. Some convention is needed for
howto startthe computationandwhatshouldbe considereda properterminal
state.
A note on terminology
What I have denoted by the term internal configuration is often denoted by
the term state in the literature on classical Turing machines. My terminology
insteadfollowsthatof[16], whousesthe terminternal configuration. Itis more
appropriate in the present context where we subsequently want to consider
quantum Turing machines. There, we want to reserve the word state to denote
thequantumstatemadeupoftheinternalconfigurationofthemachinetogether
with the tape expression. This is what I (again following Davis) denote by
instantaneous description. Thus, we define the state of a Turing machine to be
synonymoustotheinstantaneousdescription. Itseemsreasonableinthepresent
context to let the quantum physics usage of the word state to take precedence.
To summarize, the term state is equivalent to the term instantaneous de-
scription. When the set Q is refereed to, I use the terms (internal) configura-
tionandmachine stateassynonyms. Sothe qualifiersinternalandmachine are
equivalent.
Furthermore, to have some connection with intuition, we can think of the
tape as the memory, the contents of which is the tape expression. Then it
makessenseto think ofthe setofinternalconfigurationsasthe processor.9 The
scanned tape symbol can likewise be marked by a cursor.
Representing numeric input and output data
Suppose we want to compute numerical functions f : Nd N. The simplest
choiceis to use the a one symbolalphabet with S =1 anda unary representa-
1
tion of numbers. Since we need to distinguish the number 0 from a blank, we
let0berepresentedby1,1by11,2by111etc. Setsofnumbersarerepresented
as unary numbers separated by the separator #. So a pair (3,5) is represented
bythe tape expression1111#111111. The generalizationto n-tuples isobvious.
The following notation is convenient.
Let n = 11...1. Then the d-tuple (n ,n ,...,n ) is represented by the tape
1 2 d
n+1
expression |{z}
(n ,n ,...,n )=n #n #...#n . (2.7)
1 2 d 1 2 d
9Itisactuallyafinitestatemachine.
26
In order to start the computation according to the definition; an initial
instantaneous description must be given. We set
α =q (n ,n ,...,n ). (2.8)
1 1 1 2 d
The numeric result ofthe computation shouldbe readoff fromthe terminal
configuration. Theonlyavailablewaytodothisistoremovethesingleq ,upon
i
which we get a tape expression, which must be interpreted as a number. A
simple interpretation is to count the number of occurrences of 1, neglecting #.
Another choice, more restrictive, is to demand that the terminal state consists
of a single consecutive stretch of 1’s on an otherwise blank tape.
The question of which terminal states should count as yielding acceptable
output is really a question of how to code output data, but it affects the way
programs for the machine are written. A choice often made is to demand that
the machine should halt scanning the leftmost symbol on an otherwise blank
tape. Then one has to add instructions to clean up the tape after the compu-
tation proper is finished and then move left to the leftmost symbol. Whether
this is worthwhile is a matter of taste. Formally, this choice of output coding
corresponds to a terminal state of the form α =q n.
p h
This means that there is no instruction having the first two tokens q 1 .
h
Thus q is the halting state (or one of the halting states). I will call this a
h
standard terminal configuration.10
Let us finally connect these, admittedly a bit heavy-handed notations, to
functions by explicit identifying computations and functions.
We associate a function f : Nd N with a Turing machine M in the
M
following way.
Foreachd-tuple(n ,n ,...,n )wesettheinitialstateα =q (n ,n ,...,n ).
1 2 d 1 1 1 2 d
(a) If there exists a computation α ,α ,...,α such that
1 2 p
M q (n ,n ,...,n ) =q n
1 1 2 d h
(cid:0) (cid:1)
then
f (n ,n ,...,n )=n
M 1 2 d
(b) If no computation exists then f (n ,n ,...,n ) is undefined.
M 1 2 d
More efficient numeric input/output conventions
The unary description of numeric data is highly inefficient. It takes an expo-
nential amount of tape space to represent a number as compared to a binary
representation. Using n bits, which can be written on n tape cells, numbers
ranging from 0 to 2n 1 can be represented, giving a logarithmic decrease of
spacerequirements. Itisconvenienttouseanalphabet 0,1,# withanexplicit
{ }
10Forpracticalprogrammingpurposes,onecannotethatthreesituationscanbeenvisioned;
(1)thecomputationdoesnotterminate(halt)andnooutputdataresults,(2)thecomputation
terminatesinastandardconfigurationand(3)thecomputationterminatesinanon-standard
configuration. Itseemsthatallowingthislastcasetodefineoutputdata,thoughnotwrongin
principle,isabitriskyinpracticeasonehaslesscontrolovertheworkingsofthecomputation.
27
blank symbol ’#’ used to separate the numbers and write numbers in binary
notation.
Leavingtheactualencodingofnumbersopen,(unary,binaryorinanyother