< previous page page_12 next page >
Page 12
accepted
by the machine, and those strings that cause it to output ‘no’ are said to be
rejected
. In this
way,
A
* is partitioned into two subsets: the ‘yes’ subset we call the
language accepted by the machine,
and the ‘no’ subset we call the
language rejected by the machine
. A machine that operates in this way
is called an
acceptor
.
Our aim is to build a mathematical model of a special class of acceptors. Before we give the formal
definition in Section 1.5 we shall motivate it by thinking about real machines and then abstracting
certain of their features to form the basis of our model.
To be concrete, let us think of two extremes of technology for building an acceptor and find out what
they have in common. In Babbage’s day the acceptor would have been constructed out of gear-wheels
rather like Babbage’s ‘analytical engine,’ the Victorian prototype of the modern computer; in our day, the
acceptor would be built from electronic components. Despite their technological differences, the two
different types of component involved, gearwheels in the former and electronic components in the latter,
have something in common: they can only do a limited number of things. A gear-wheel can only be in a
finite number of positions, whereas many basic electronic components can only be either ‘on’ or ‘off.’ We
call a specific configuration of gear-wheels or a specific configuration of on-and-off devices a
state
. For
example, a clock with only an hour-hand and a minute-hand has 12×60 states that are made visible by
the position of the hands. What all real devices have in common is that the total number of states is
finite
. How states are represented is essentially an engineering question.
After a machine has performed a calculation the gear-wheels or electronic components will be in some
state dependent on what was being calculated. We therefore need a way of resetting the machine to an
initial state; think of this as wiping the slate clean to begin a new calculation.
Every machine should do its job reliably and automatically, and so what the machine does next must be
completely determined by its current state and current input, and because the state of a machine
contains all the information about the configurations of all the machine’s components, what a machine
does next is to change state.
We can now explain how our machine will process an input string
a
1
…an
. The machine is first re-
initialised so that it is in its initial state, which we call
s
0. The first letter
a
1 of the string is input and
this, together with the fact that the machine is in state
s
0
,
completely determines the next state, say
s
1.
Next the second letter a2 of the string is input and this, together with the fact that the machine is in
state
s
1
,
completely determines the next state, say
s
2. This process continues until the last letter of the
input string has been read. At this point, the machine is now ready to pass judgement on the input
string. If the machine is in one of a designated set of special states called
terminal
states it deems the
string to have been accepted; if not, the string is
rejected
.
To make this more concrete, here is a specific example.
< previous page page_12 next page >