316
ELEMENTS
OF
MATHEMATICAL LOGIC
At first glance one may conclude that Definition
I1
is
narrower
than Definition
I.
It turns out, however, thatthis
is
not
so,
since for
any known algorithm defined in sense
I
we
may construct
an
equiva-
lent algorithm in sense
11.
This, of course,
does
not prove that
Defi-
nitions
I
and
I1
are equally strong; there can
be
no such proof, in
view of the vagueness of both definitions (for instance, both contain
the undefined
phrase
“universally understood exact instructions’’).
Still, Definition
I1
is
a
substantial stepforward, as we shall
see
be-
low.
Now let us define
equivalence
of
algorithms:
two algorithms
AI
and
Az
in some alphabet are equivalent
if
their ranges of application
coincide and
if
they process any word from their common range of
application into the same result. In other words,
if
algorithm
A1
is
applicable to a word
P,
then
A2
must also be applicable to that word,
and conversely; also, both algorithms must transform the word
P
into the same word
Q.
If,
however, oneof the algorithms
is
not ap-
plicable to a word
B,
then the other algorithm must also be in-
applicable.
At this point, Definition
I1
may be transformed into an exact
mathematical definition of
an
algorithm by
a
single step first pro-
posed
by
A.A.
Markov.
His
normal
algorithm
is
identical to that of
Definition
I1
except that the “universally understood” instructions
are
replaced bya standard, once and for
all
fixed, and exactly speci-
fied
procedure for the use of substitutions. This normal algorithm
is
specified
as
follows: To start with, the alphabet
A
is
defined and
the set of allowable substitutions
is
fixed. Then some word
P
in
A
is
selected, and the substitution formulas
are
scanned (in the order
given in the set) to find aformulawhose left-hand part occurs in
P.
If
there
is
no such formula,
the
procedure comes to
a
halt. Other-
wise the right-hand member of the first of such formulas
is
substi-
tuted for the first occurrence of its left-hand member in
P.
This
yields a new word
PI
in alphabet
A.
After this one proceeds to
the
second step,
which
differs
from the
first
one only in that
PI
now
acts as
P.
Then one goes to the third analogous step, and
so
on,
until the process comes to a halt. However, the process can
be
terminated in only
two
ways:
(1)
when it generates
a
word
P,
such
that none of the left-hand parts of the formulas of the substitution
set occurs in it; and
(2)
when the word
P,
is
generated by the last
formula of the set.
We
see
that the algorithm of Definition
I1
is
an
“almost normal”
algorithm, the only difference being that it comes to
a
halt
in only
one case (when none of the allowable substitutions
is
applicable),
whereas in the normal algorithm there
are
two
possible causes for
a “stop’
’ instruction.