Ho84 PDF
Ho84 PDF
by John E. Hopcroft
n 1 900 David Hilbert, the preeminent himself, who was a pioneer in the devel on the length of the tape or, con seq uent
86
© 1984 SCIENTIFIC AMERICAN, INC
specifies the next state of the mach ine. The entire instr uction can be abbrevi printing head one frame to the left, the
As with the specification of the symbol ated by l isting the three values of the instr uction is abbreviated (l,S2,L).
in the first part of the instr uction, the variable s-the tape symbol, the machine The best way to understand how a Tu
de signation of a state may require the state and the motion of the printing ring machine works is to try to b u ild
machine to change its state or to remain head-in a fixed order. For example, if a one. In this context b u i l d ing a T ur ing
in its c urrent one. The third part of the given pair of initial conditions are to machine means to construct a table of
instr uction specifies whether the print make the machine leave the symboll on instructions that spec ify the action of
ing head is to scan one frame to the left the scanned tape frame, cause the ma the T uring machine for every possi ble
or to the right along the tape. chine to ass ume state S2 and move the pair made up of one state and one tape
TA STATE S2
--c=J-
�
010 11 0 1 1 1 1 all 1111010101 101010Il o'l l 10! III 11010 \0 \
SYMBOL READ ON TAPE SYMBOL READ ON TAPE
STATE STATE
0 1 0 1
S2
s� 1,S3,R 1,S2,R
.:.cJ--- 1,S3,R 1,S2,R
S S
t HALT HALT
t HALT HALT
) J- ( ) J- ( )
� =:J-
3 4
STATE S2 STA
--c=J-
1010 010 1 1 1 0 1 1 J III 010101 101010 all 111 1 1 \ 1 1\0 0101
SYMBOL READ ON TAPE SYMBOL READ ON TAPE
STATE STATE
0 1 0 1
Su-- O,S"R O,S2,R
u--
S
O,S"R O,S2,R
S2 S2
S
�J- HALT HALT
S
� HALT HALT
) () ) J- ()
ADDITION OF 2 AND 3 is accomplished by a Turing machine in right to join the right string. The number of initial conditions available
four steps. Each number to be added is represented on a tape in unary in the table of instructions must be large enough to meet all the con
notation: as a string of 1's bounded by O's at both ends. The machine tingencies that might arise on the tape; that number can be increased
can register the content of one tape frame at a time (colored frames) by increasing the number of internal states, or configurations, that are
by shuttling to the left or to the right across the tape in a series of dis built into the Turing machine. For every possible combination of tape
crete moves. The goal of the machine is to generate a string of five symbol and machine state the table of instructions must either halt the
consecutive I's and halt. The table of instructions, shown in the low machine or specify three variables. First, it must give the symbol that
er part of each machine in the diagram, is a fixed set of moves for all is to be left in the frame of the tape currently being registered; sec
possible initial conditions and gives a procedure for adding any two ond, it must specify the state the machine is to assume before it regis
numbers. Following the instructions, the machine removes the 0 sep ters another tape frame, and third, it must indicate whether the ma
arating two strings of l's and shifts the left string one frame to the chine is to move acrosS the tape one frame to the left or to the right.
87
© 1984 SCIENTIFIC AMERICAN, INC
symbol. In practice the construction of are to be pr inted on the tape, they can be done properly, the 0 no longer separates
the table also means granting eno ugh repre sented by a string of M 1 's, fol the two strings, and the single string that
possible states to the machine for it to do lowed on the r ight by a 0, followed in results has length M + N. It is not possi
the task at hand. turn on the right by a string of N I's. ble for the T uring machine to shift the
Ass ume the T ur ing machine is in its ini string of I's all at once; for example,
The Adding Machine tial state S I and its printing head is scan the pr inting head can advance only one
ning the leftmost I in the string of Ml's. frame at a time. One way to get the re
Consider how one might go about de To constr uct a Turing machine that sult is to create a series of instructions
signing a T uring machine that adds two adds, what one wants is to generate a for a Tur ing machine with three states.
numbers and halts. It is c ustomary, al table of instr uctions that will ca use the In the first state the pr inting head scans
though by no means essential, to allow Tur ing machine eventually to print a the tape from left to right, one frame at
only two symbols to be pr inted on the string of M + N 1 's and then halt. a time, until it reaches the leftmost 1. It
tape , say 0 and 1. Any given num ber N One simple way to accomplish the changes the I to a 0, enters the second
can then be represented on the tape by a task is to shift the leftmost string of M state and continues moving to the right.
str ing of N 1 'so If two numbers M and N I' s one frame to the right. If the shift is In the second state, when the head finds
a I in the c urrent frame , it takes no ac
tion-it does not change either the tape
ST RINGS OF LENGTH 1: symbol or the machine state-except to
move one more frame to the r ight. In
1
A B C z 1 9 0 + I ? '"
this way the head scans past the M I
! 1 1 2 3
1
26 27
1
28
! 1 1 1 1 1 1
36 37 38 39 40 41 42 50
1 I' s remaining in the first string. When a
-
�
f, f2 M ultipl ication is m uch easier to do if
2 3 4 5 6
3>1 one first develops a ro utine for copying
a string of 1 ' s imme d iately to the right of
f, IT] 3 2 7 2
some g iven point. It is always possible
2 2 2
to copy N I's with an N-state machine;
1:
f, @] 9 2
the states can effectively count the 1 ' s in
the string. S ince the n u m ber of states
IT]
3 3
f, 9 2 6 6
must not grow indefinitely large, howev
er, it is desirable to find a way to copy
f, f,
f, 8
[I] 2 4
the string witho ut co unting its elements.
One way is to send a marker across the
1 1 f, 2 4
IT] string from left to right; the marker is a 0
that s uccessively takes the place of each
2 2 2
f, 7 8 9
@:: 1 in the string. For each advance of the
marker from one frame to the next the
3 3 3
;: F 2 4 2 5 2 5
printing head is instr ucted to scan past
the right end of the string, skip over a 0
that indicates spacing and then change
the next 0 it finds to a 1. I f the print
SET OF MATHEMATICAL FUNCTIONS of the positive whole numbers that take integer ing head shuttles back and forth once
values is a noncountable set; that is, there are too many such functions for them to be paired for each advance of the marker, a new
one for one with the infinite set of whole numbers. Suppose, on the contrary, all the functions string of N I's is written immediately
could be named according to their subscripts and then listed in a fixed order. The value of the
to the right of the first string [see illustra
function corresponding to each integer could then be given as an infinite row of digits. Since a
function is determined by its infinite row of digits, consider a function constructed by chang
tion on opposite page].
ing the first digit in the first row, the second digit in the second row and so on. The row of dig With a little practice one q u ickly
its that define the constructed function (color) must differ from any row of digits in the orig learns how to build T ur ing machines
inal list by at least one digit. Hence the supposition that all the functions could be listed leads that can run simple computational rou
to the contradiction that a new function not in the original list can always be constructed. tines and how to combine those ma-
88
© 1984 SCIENTIFIC AMERICAN, INC
A� 7
7 15 23
� tt. �
BR AK
101011111110100
I
1 0
1 0
1 1 I I
100
1 0
1 1
1 10110
I
1 0
1 0
1 1 I I I
1 1
1 0
10101 1 rilllolol
1 0 I I
1 1 11
100 1 101
1 0 I
1 001
1 1 I !
REGI5TE R N REGI5TERP N P N P N P
B 8 16 24
�
1001111 1 0
1 0
I
1 1010101
N
I I
P
1 101tll101
100 I
tt.
1 10100
N
1 1 I I
P
100
1 1110110;111
I
N
1 0toh
1 0
1 1
I I
P
10101 1 1111101
1 11100 I
N
I I
� P
1 9 17 25
tfi
101011110
1 0
I
1 1010101
N
I I
P
100 �
1 0111101110100
I
N
1 1 I I
P
100
1 1
I
tto
1 1110111110101
1 0
N
I I
P
100 1 110
1 1 1 1�111101
1 0 I
N
I
tt.
I
2 10 18 26
I
�
1010101110101010101
N
I I
P
100
1 1
1 1
1 110
I
�
1 110
1 0
N
1 0
1 1 I I
P
100
1 1
I
tot
1 0110111110lQJ
N
I I
P
100
1 1
1 110
1 0ill111
I
1 1
1 0
N
� I I
3 11 19 27
100
1 0
1 1
1 10100
I
1 0�
1 0
N
1 1 I I
P
100
1 1
1 0
1 10110
I
1 0tto
1 0
N
1 1 I I
P
100
1 11 1I
�
1 1011110
N
1 0
1 1 I I
P
1 00111
1 1
1 1
100 1 101
1 1I
�
N
I I
4 12 20 28
100
1 0
1 111100100
I
1 0
N
�
1 1 I I
P
100
1 1 10
1 1101100
I
1 0
N
1 1� I I
P
1010111
I
1 0
1 01110
N
1 0�
1 1
I I
P
1 00 1 1 1101111110
1 1 I
�
1 1
N
I I
5 13 21 29
100
1 101
1 1
1 100010101 � [910110
1 110
1 10100
1 1 tt 100
1 1
1 110
1 1011100
1 1 tt �
1010 1 1110
1 1
1 1
1 1
1 101
�
I I I I I I I I I I I I
N P N P N P N P
6 14 22 30
100
1 0
1 111101100
I
1 0
N
1 1tot I I
P
100
1 1
1 0
1 1
1 0
I
1 1100101
N
I I
� P
100
1 1
1 1110101110101
I
N
I I
�
P
d
I0 illIII11011111110I
I
N
I I
5, 1,5" L Copy 1 at rig ht e n d of reg ist e rP . 5,14, 23 1,5" R Right s h i ft across 1 's in reg isterP. 13, 21, 2 2
5, 0,5" L Left shift across break . 6,16, 26 1,5" L Left sh ift across reg ist e r P. 15, 24, 25
COPYING TURING MACHINE is a component of more elaborate a second string with the same number of l's to the right of the 0 that
devices. Given any string of l's marked on a tape, the machine writes marks the end of the first string. Here the machine copies three l's.
89
© 1984 SCIENTIFIC AMERICAN, INC
chines in order to carry out more com Turing machine that copies a string of out any useful or even sensible task.
plex calculations. For example, a poly l's and in the machine that multiplies. M any of them get caught in infinite
nomial expression can be evaluated loops and shuttle back and forth on a
by combining the ro utines for add ing, The Universal Turing Machine tape indefinitely witho ut halting. From
copying and m ultiplying. Even more among the machines that do perform
versatile are short, elementary rou If one is inclined to try b u i l d ing, say, reasonable tasks, one m ust choose a
tines for symbol. manipulation, such as the Turing machine that multiplies, one combination of machines that work to
" M ove the pr inting head to the right soon begins to appreciate the d ifficul gether efficiently. The initial impression
until it enco unters a 0" and "M ove the ties that must be faced in the design of can be that the simplest tasks are fiend
marker in the leftmost string of l's one a useful computer program. M ost small ishly d ifficult and that realistic computa
frame to the right. " Variations of these T uring machines, namely the ones with tion is hopeless. S uch difficulties can be
short routines are exploited both in the only a few possible state s, do not carry fr ustrating, but they are merely techni-
�
101 134 139
M1 J1ih [1[0[1[1[1[0[0[0[0[
BREAK
;
'------..J I I I '------..J I I I '------..J I I I
�
[0 1 1[0[1[1[1[0[0[0[0[0[0[0[0[ [ 0[0 1 0[1[1[1[0[1[1[1[0[0[0[0[
'------..J
M
I
N
I I
P
;
'------..J
M
I
N
I I
P
[ O [l[OOl[l[l[ O[l[l[l[l[l[l[O[
'------..J
M
I
N
I I
P
.
103 186
t¥c
[0[0 1 0[1[1[1[0[0[0[0[0[0[0[0[
'------..J
M
I
N
I I
P
' �o� M
11011111110111 1 1 1101010101 1 01110}01111111011111111111110
'------..J I
N
I I
P
l
�
'------..J
M
I
N
I I
P
104 137 187
; ;
[0[0[10 1[1[1[0[0[0[0[0[0[0[0[ [0[1 10[1[1[1[0[1[1[1[0[0[0[0[ [01 1[0[1[1[1[0[1[1[1[1[1[1[0[ �
;
�! I I '------..J I I I '------..J I I I
M N P M N P M N P
105 138
- :
'------..J
M
rtit
[0[0[1[01 1[1[0[0[0[0[0[0[0[0[ 1011I00 1[1[1[0[1[1[1[0[0[0[0[ 9 1[1[0[1[1[1[0[1[1[1[1[1[1[0[
I
N
I I
P
'------..J
M
I
N
I I
P
1 '------..J
M
I
N
I I
MULTIPLICATION can be done with a Turing machine by embed defined for the machine that copies a string of I's (see illustratioll
ding in it another Turing machine that can copy a string of I's. In the 011 page 89). In the last cycle the product of 2 and 3 is displayed
example the machine requires 88 cycles to find the product of 2 and as a string of six l's in the section of the tape called the P register,
3; the breaks in the numbering are machine cycles that jump to states immediately after the 0 that separates it from the two multipliers.
91
© 1984 SCIENTIFIC AMERICAN, INC
of instr uctions; that table m ust be fi
ONE SYMBOL
nite in length because both the machine
2 3 9 7T
states and the alphabet of tape symbols
TWO SYMBOLS are finite in number.
FIVE SYMBOLS
EIGHT
"
3ttt4 (=3tt[3tt(3tt3)l=3tt[3tt3 l=3tt33
.'
3 } 3
3 3 LEVELS
scription of Turing machine M and at
the right is the seq uence of symbols X
that wo uld be enc o untered by M as it
..
'3 } 33
'.
3
LEVELS
} 3
33 LEVELS)
scanned its own tape. The universal ma
chine is then constr ucted so that its
printing head sh uttles back and forth be
= 33
tween the left and right sections of the
tape. Through an elaborate system of
markers the universal machine keeps
track of the encoded state of M that is
58 SYMBOLS
being consulted. Turing proved that the
1#MORE#THAN#THE#LARGEST# NUMBER #EXPRESSI BLE #WITH#58#SYMBOLS
effect of the universal machine on the
seq uence of symbols X is exactly what
RICHARD PARADOX, named after the French mathematician Jules Richard, arises if one the effect of M wo uld be on the same
supposes the positive integers can be ordered, or listed, according to the number of symbols seq uence of tape symbols.
needed to specify them. Isolated integers of remarkable size can be designated with the help of The s uccessful sim ulation of Tur ing
special symbols such as the arrow notation introduced by Donald E. Knuth of Stanford Univer machine M by the universal Turing ma
sity. Nevertheless, according to its own description, the number allegedly specified above with
chine depends only on the fact that M
58 symbols is larger than any number that can be specified with 58 symbols, which is a para
dox. A similar paradox arises if one tries to find a given Turing machine in a list of Turing ma is a machine that can be described ex
chines arranged according to the length of the string of symbols needed to encode each machine. haustively by a finite number of sym
bols. In principle, however, every digital
computer can be described in the same
cal; with a few well-chosen routines the part owes its existence to Turing's con way. The comp uter has a large but fi
power of the Turing machine for solving ceptual machines, is now probably the nite n umber of internal states, and its
problems increases explosively, and one most convincing demonstration of those response to inp ut data is entirely de
is struck not by the weakness of the ma machines' computational power. In the termined by the finite set of statements
chine but by its potential. As Turing was co urse of his work Turing pointed out that make up its programming. Hence a
able to show, it is possible to combine that any Turing machine M can be en complete description of any digital com
simple Turing machines into a machine coded on a tape as a seq uence of O's p u ter can be encoded on a tape as a se
that can carry out any task that can be and 1 'So The fundamental reason the en q uence of O's and 1 's, and any inp ut data
. explicitly described. coding can be done is that every Turing can be encoded on the tape to the right
The electronic comp uter, which in machine is uniquely defined by its table of the description of the computer. By
alternately cons ulting the description of
the comp uter and the string of inp ut
data on the tape, the universal Turing
MAXIMUM NUMBER
NUMBER OF STATES
OF PRINTED 1's
LOWER LIMIT FOR VALUE OF a machine can sim ulate the action of the
computer on the inp ut data step by step.
3 a(3) 6
Given eno ugh memory to serve as a
4 a(4) 12 tape for symbol manip ulation, any real
computer can play the role of the uni
5 a(5) 17 versal Turing machine. For example,
if a home microcomp uter were pro
6 a(6) 35
grammed to function as a universal Tu
7 a(7) 22,961 ring machine, and if a description of a
large, "mainframe" comp uter were en
8 a(8) 392 � 7.9 X 10 43
coded on its inp ut data, the microcom
9 a(9) 392 + 1 puter would sim ulate the action of the
large comp uter on any string of data
92
© 1984 SCIENTIFIC AMERICAN, INC
�
TOTA L NUMBER SYMBOL READ ON TAPE
OF STATES STATE
1 000100
1 10100
PRINT M 1's 0 1
ON BLANK TAPE 11
10Mo
S, 1 ,S " R
1 0010100
1 1 1 01 S, 1 ,S 3,R
1 0111�
1 001010101
.
10111111·1 .. �
M SM 1,SM+1,L
1 00
t
:
�
M -1
�
0
1 111
101 1 1... 1 10
SET UP
COPY ROUTINE SM+1 0,_,_ 1,SM+1,L
1
:�
t
M
I�
M+1
COpy
011 ..[[@]
I. COpy ROUTINE
t
�
t
.
: M
M+9
MULTIPLY MULTIPLICATION
MxM ROUTINE
M+1 6
M+19
SM+19+1 ? ?
M+19+ Z .
HALT HALT
PROOF THAT cr(N) IS NONCOMPUTABLE begins with an esti combined to form a machine that has M + 16 states. Three addition
M2 1's
mate of the number of states needed to generate a string of al states delete the two leftmost strings of I's, leaving a string ofM2
on a tape initially filled with O's. The Turing machines for copying I's. It is assumed there is a Z-state machine that, given any string of
and multiplying, shown in the illustrations on pages 89 and 91, are N 1's, will generate a string of cr(N) 1's (type alld tables ill color).
94
© 1984 SCIENTIFIC AMERICAN, INC
the intuitive concept of comp utability.
F i rst notice t h at a is u n ifo r m l y i n creas i n g ; that is, if X> Y, ,,(X» a(Y) . No m atter how many 1 's are
I t is probably worth mentioning, how
pri nted by an N-state Tu r i n g mach i n e that halts, an ( N + 1 )-state Tu r i n g mach i n e can always be
ever, that it is pointless to ask for a rigor
constructed that will add o n e 1 to t h e stri n g of 1 's and t h e n halt.
o u s mathematical proof that a formal
definition s uch as Turing ' s fully cap
tures some orig inally intuitive notion.
or falsity of any mathematical state H e nce, because " is u n ifo r m l y i ncreas i ng,
ment, no matter how complex. If s uch a(M' - 1 ) > a(M' - [M - 1 J') = a(M + 19 + Z) � a rM') .
S i nce , ,(M' - 1 ) > a(M'), however, a can not be u n iform l y i ncreas i ng,
a method could be found, mathemati
and so t h e s u pposition that t h e re is a Z-state Tu r i n g mach i n e that
cal conj ectures s uch as P ierre de Fer
computes a(M') leads to a contrad iction.
mat's "last theorem," which had resisted
proof or disproof for centuries, wo uld
immediately be disposed of. An affirma FINAL STEPS IN PROOF that cr(N) is noncomputable derive a contradiction from the as
tive answer to Hilbert's bold challenge sumption there is some Z-state Turing machine that, given a string of M2 I's, computes cr(M2).
would reduce all mathematics to me
chanical comp utation.
Two major developments in logic in unj ustified. In 1 9 3 1 he proved that any zo Church of Princeton University.
the early decade s of this century threw consistent system of formal logic pow Church and two of his students, S tephen
m uch of Hilbert's program into disar erful enough to formulate statements in C . Kleene and J. Barkley Rosser, de
ray. In 1 90 1 Bertrand R ussell discov the theory of n umbers must include true veloped a consistent formal language
ered an irrefutable paradox in the ele statements that cannot be proved. Be called the lambda calculus; it is useful
mentary theory of sets, a theory that was cause consistent axiomatic systems s uch for reasoning abo ut mathematical func
essential to Frege' s program of reduc as the one devised by R ussell and White tions, such as the s q uare root, the loga
ing mathematics to logic. Russell com head cannot encompass all the true r ithm and any more complicated func
m unicated his discovery to Frege j ust statements in the s ubject matter they tions that might be defined. (Lam bda,
as the second volume of Frege's last seek to formalize, s uch systems are said the Greek letter corresponding to the
major work, Grundgesetze der Arithmetic to be incomplete. Roman letter L, was chosen by Church
( "The F undamental Laws of Arithme to s uggest that his formal system is a
tic"), was about to be p ublished. Frege The Logic of Computability language . ) The modern language for
ended the volume with a disp irited note : computer programming called Lisp (for
"A scientist can hardly meet with any Godel's work effectively p u t an end list proce s s ing) is modeled on the lamb
thing more undesirable than to have the to H ilbert's program. There can be no da calc ulus. Kleene showed that large
foundation g ive way j ust as the work is method for deciding whether some arbi classes of mathematical functions, in
finished. I was p u t in this position by a trary statement in mathematics is true or cluding all the functions employed by
letter from M r . Bertrand R ussell when false. I f there were, the method would Godel in his proof, could be expressed
the work was nearly thro ugh the press." constitute a proof of all the true state in the lambda calcu l u s .
In spite of the flaws Frege was unable ments, and Godel had demonstrated T h e n e x t m a j o r s t e p in t h i s l i n e of
to r emove from his work, Russell and that within a consistent axiomatic sys thu ught was taken by Church. He ar
Alfred N orth Whitehead were later able tem s uch a proof is impossible. The at gued that if a mathematical function can
to salvage Frege' s program and circum tention of logicians shifted from the be computed at all-meaning that it can
vent the p aradox in set theory. concept of truth to the concept of prova be evaluated for every n umber in its do
A second major discovery in logic was bility. In this context there remained a main o f definition-then the function
m ade by Kurt Godel of the Institute for s imple analogue to Hilbert's q uestion can be defined in the lambda calculus.
Advanced S tudy in Princeton, N . J . Im that had not been settled: Does a sin Church's work showed that if there were
plicit in H ilbert's program was the as gle method exist whereby all the prov s uch a thing as a mathematical function
s umption that there must exist some able statements in mathematics can be expressible in the lambda calcu l u s that
method for distinguishing true state proved from a set of logical axioms? is not comp utable, there would be no
ments from false ones in formal log The preeminent. investigator of the method for determining whether or not
ic; the problem was to find the m e thod. logic of provability in the years immedi a given mathematical statement is prov
Godel showed that the ass umption is ately following Godel's proof was Alon- able, let alone tr ue. The final s urviving
9S
© 1984 SCIENTIFIC AMERICAN, INC
hypothesis in Hilbert's program would erations on a blank tape, or in other played a dominant role in computer sci
be d isproved . In April, 1 9 3 6, Church words a tape on which a 0 is marked in ence since the early 1 960 's. In 1 96 5 J uris
p u b lished a logical formula that is not every frame. Imagine for the moment Hartmanis and R ichard E . S tearns, then
computable in his system. that all the T ur ing machines that never at the General Electric Research Labo
Turing, working independently of halt are excluded from this set. Among ratories in Schenectady, N . Y . , showe d
Church, had also grasped the technical the remainder of the Turing machines, t h a t t h e Turing machine can h e l p to e s
connection between Hilbert's problem pick the machine or the group o f ma tablish tight bounds on t h e complexity
and the idea of a computable function. chines that print the largest number of of computations. S ubsequent investiga
In attacking the problem, however, he l ' s in succession on the blank tape be tors began to classify problems accord
proceeded in a far more d irect and con fore they halt. That number of 1 ' s , for ing to the way in which the r unning time,
crete manner than Church. What was each value of N. is the value of Rado's or equivalently the number o f computa
needed was a simple b u t precise model function; it is us ually d e s ignated u ( N ) . tional steps, varies with the s ize of the
of the process of computation, and Tu T h e detailed p r o o f t h a t u ( N ) is n o t problem. For example, s uppose some
ring's machines were designed to meet computable proceed s by assuming it can number of points N are interconnected
that need . Once their properties were be computed and then deriving a con by l ines to form a graph of vertexes and
specified, however, Turing made a bril tradiction. The argument is straightfor lines. The problem is to color the vertex
liant connection between the idea of a ward, but the technical details are rather e s in such a way that no two vertexes
computable function and the r e s ults of intricate; they can be found in the illus connected by a l ine have the same color.
mathematical work done some 5 0 years trations on the preced ing two pages. S uppose furthermore the fastest method
earlier by the German mathematician One might think the constr uction d e known for solving the problem requires
Georg Cantor. Cantor had argued that fective because it a s s u m e s t h e N-state a time that varies as some p ower of N.
although there is no largest whole num Turing machines that d o not halt can be say N2. The problem is then said to be in
ber, any infinite set of objects that can sorted o u t in advance. The objection is the class of problems that can be solved
be counted, or paired with the positive a serious one. Consider, therefore, how in polynomial time, designated P. The
whole numbers, is a set of the same size one m ight attempt to compute u ( N) by class P has increased in importance as
as the set of whole numbers. S ince any brute force. List all the N-state T ur ing many computer scientists have come to
Tur ing machine can be expressed as a machines in some numerical order, sim regard all problems that are not in P as
character string of finite length, all pos ulate each one on a universal T ur ing intractable.
sible T ur ing machines and with them all machine and select the machine or the
computable functions can be listed in group of machines that print the most Modern Complexity Theory
numerical or alphabetical order; hence l ' s. Although this method o f compu
they can be paired one for one with the tation seems to avoid the objection, N ote that a problem is assigne d to
whole numbers [see upper illustration on the d ifficulty with T uring machines that class P only if no instance of the prob
page 88].There is, of course, no fixed d o not halt reappears in an intractable lem requires more than polynomial time
upper limit to the size of a T ur ing ma form. Some of the N- state machines that to solve . In other words, the method of
chine, and so there is no limit to the do not halt can be eliminate d by sim solution for the problem is d e terminis
number of possible T ur ing machines . ple algorithms, b u t there are other ma tic, in the sense that it g uarantees a solu
Nevertheless, Cantor' s analysis shows chines for which no s uch decision can be tion in a time less than some fixed power
that the set of all possible computable made. I f one cannot d e termine that a of the s ize of the problem, N. A nonde
functions is the same size as the set of all partic ular machine does not halt, the terministic Turing machine can also be
whole numbers; both sets are called machine cannot be eliminated from define d : it is allowed to solve a problem
co untable sets. the list of N-state machines and the sim by guessing the answer and then veri
Cantor had also shown there are infi ulation must contin ue. Since the ma fying the guess. For example, to deter
nite sets that are not co untable; they are chine may actually never halt, there is m ine whether an integer is composite,
larger than the set of whole numbers in no g uarantee the computation of u(N) the nondeterministic machine g uesses a
the sense that they cannot be paired one can be carried thro ugh to completion. d ivisor, d ivides and, if the d ivision is
for one with the whole numbers. One Although the early impact o f the Tu exact, verifies that the number is com
example of s uch a noncountable set is r ing machine was in logic, it has also posite. The deterministic machine, on
the set of all the functions of the positive
whole numbers that take on integer val
ues. A careful analysis shows there must
be more such functions than there are TWO PROBLEMS ARE EQUIVALENT if the solution to one problem immediately gives the
whole numbers. The implication is that solution to the other. Here the problem of determining the conditions under which a complex
not all functions are computable: there Boolean formula, or logical proposition, is true has been mapped, or transformed, into another
are not eno ugh comp uter programs to problem, that of coloring the vertexes of a graph with three colors in such a way that no two ver
comp ute every possible function. texes connected by a line are the same color. The truth or falsity of any Boolean formula de
pends on the truth or falsity of the atomic, or simple, propositions that make it up and on the
ways the truth values are combined by the connectives "or," "and" and "not." For every possi
The Halting Problem ble Boolean formula a simple graph of lines and vertexes can be constructed, which can be col
ored with three colors if and only if truth values can be given to the atomic propositions in such
Which functions are noncomputable?
a way that the complex formula is true. For example, consider the complex formula P or Q, which
Unfort unately the proofs by Church is made up of the atomic proposition P and the atomic proposition Q. The formula P or Q is true
and by Turing d o not read ily yield only if proposition P is true, proposition Q is true or both propositions are true. These condi
examples of noncomputable functions . tions are reflected in the coloring of the graph at the upper left (a), in which green represents
In the past 20 years, however, comput true and blue represents false. The coloring can be completed in such a way that the rightmost
er scientists have exploited T uring ma vertex is green (true) only if either one or both of the labeled vertexes are colored green (b-e).
chines to construct several s uch func Similarly, the complex formula P alld Q is true only if the atomic propositions P and Q are both
tions. One of the early examples of a true, and that state of affairs can be. reflected in a graph in which the vertex representing P and
96
© 1984 SCIENTIFIC AMERICAN, INC
OR AND
NOT
b 9
(P OR QJ AND (NOT - RJ
97
© 1984 SCIENTIFIC AMERICAN, INC
the other hand, m ust search systemati of s uch complete problems have been
cally for a d ivisor. d iscovere d , both for the class P and
SUPER
The time needed for s.olving a prob with respect to the classes of intrac
lem with a nondeterministic machine is table problems for which the n umber of
meas ured by the length of the shortest steps required for a sol ution on a Tur ing
computation, and so the nondetermin machine grows exponentially with the
FRENCH
istic machine would seem to have an size of the problem. A d irect assault on
enormous advantage over the determin the P-NP problem, however, still seems
istic one. Ord inary experience s uggests premat ure . Some of the d iffic ulty can be
it is e as ier to verify a sol ution than it is to appreciated from recent developments
NEW SUPER LEAR N I N G
B R E A K T H R O U G H S T E A C H YO U find it in the first place. N evertheless, no in the theory of computation.
F R E N C H I N 30 DAY S ! one has been able to prove that the prob
N e w s u p e r l e a r n i n g b re a k t h ro u g h s O r i g i lems solvable in polynomial time with Relative Computability
n a l l y d i s c overed b e h i n d t h e I ro n c u r t a i n l e t a nondeterministic machine-the class
y o u l e a r n a fore i g n l a n g u ag e fIve t o ten of problems designated NP-are intrin The idea that a f unction is computa
tim es faster than was ever before p o ss i b l e
sically any more d ifficult than the prob ble by a T uring machine can be extend
T h e y I n c l u d e r i g ht-brai n/left- b r a i n l e a r n -
I n g tech n i q u es s u pe r m e m o r y deve l - lems in the class P. Whether or not the e d by making computability depend on
opment s u b l i m i n a l s u g ge s t i o n class P is distinct from the class NP, strings of symbols the machine may en
hypnotic m u s i c deep re l a x a t i o n . A n d which is called the P- NP problem, has co unter on its tape. If a string found on
t h e y " ve l a u n c h e d a l a n g u ag e - l e a r n i n g
become one of the major open q ues the tape belongs to a previously speci
revo l u t l o n l
Mental S k i l l s Used By East G e r m a n s tions in mathematics. fied set of strings A, the T uring machine
& R u s s i a n s i n L a n g u ages a n d Sports Important progress on the P- NP prob can be instr ucted to advance to a spe
T h e s e s a m e m e n t a l - s k i l l mast e r i n g t e c h lem was made in 1 9 70 by Stephen A. cial state that contin ues to comp ute the
n i q u e s h ave b e e n u s e d to ac h i eve " m i ra c l e "
Cook of the University o f Toronto. function in q uestion. If the string does
res u l t s I n l a n g u a g e s a n d O l y m p I c s p o r t s .
N ow t h e s e s u p e r l a n g u ag e - l e a r n i n g
Cook was inve stigating the problem of not belong to the set A, the machine de
m e t h o d s a re ava i l a b l e for t h e first tIme In determining the conditions under which l ivers the dec ision that the function is
America. SUP ERL I N GU A ' · FRE N C H a complex logical proposition is true. not computable. The function is said to
2 , 0 0 0 - a c o m p l e t e c o u rse o n a u d i o For example, the complex proposition be computable relative to the set A. If
cassettes g i ve s y o u f l u e n c y i n F re n c h w i t h
a r i c h 2 , 500-word voca b u l a r y i n 30 D A Y S
formed when two simple propositions the set A were made up of all the strings
or less l are linked by the word "or" is true if encoding Tur ing machines that eventu
IN C a l l t o l l - free
1 -800-228-1 080 E x t 1 05 for FRE E
SUP ERL I NGU A ' · FRE NCH C A SSETT E .
. either one of the simple propositions is
true or if both are true. In general it is
q uite d ifficult to determine the range of
ally halt when they are given a blank
tape as inp ut, Rado's function a- ( N )
w o u l d be computable relative to A_
Or w r i t e u s . Supe r l i n g u a Dept. 1 0 5
truth conditions for simple propositions In 1 9 7 4 Theodore P. Baker of Cor
P.O. B o x " ' M ' ; C o l t s Neck, N.J. 07722.
that satisfy a complex proposition, or in nell University, J ohn G ill of Stanford
other words make the complex proposi University and Robert M. Solovay of
tion true. Cook was able to show that the Berkeley asked whether the nonequiva
Animal Lovers problem, which is called the satisfiabili lence of class P and class NP could be
Natu ral H i storians ty problem, is as d ifficult as any other proved for relative computations. In the
and all you who take pride i n problem in class NP. There is an effi co urse of this work they made a startling
cient algorithm for solving the satisfia d iscovery. They could spec ify two sets,
you r i ntel lectual cu riosity . . .
bil ity problem only if there is an effi A and B, for which the relations between
:Q1
;'
cient algor ithm for solving every other class P and class NP are contradictory .
. . NOW-' /
. . . ..-;;
problem in the class NP. Any problem In other words, for comp utations rela
.
· "
tors grasped the significance of Cook's that for any formal system there are rel
:_ : Encyclopedia
' result. In 1 9 7 1 R ichard M . Karp of the ative computations for which one can
-the most i m p o rtant contri bution to the University of California at Berkeley be assume e ither that P and NP are e q uiva
adve ntu re story of a n imal exploration s i nce gan to ask what other natural problems lent or that they are not, without detri
Bulto n , Brehm and Lyd e k k e r - might play the same role as the satisfia ment to the consistency of the system.
bility problem with respect to the class Other inve stigators have since found
available f o r the fi rst t i m e i n stu rdy soft NP. Karp d iscovered that many impor that many other problems can be rela
binding at savings of 50 % . I nc l udes tant problems in operations research, in tivized in such a way that e ither of two
• 7 . 200 pages • Many more thousands of c l u d ing the problem of coloring a graph possible outcomes is true .
• 13 magnificen t volumes
black and w h ite drawings with three colors, are also as difficult as This perplexing state of affairs is ob
and plates
any problem that can be assigned to the viously unsatisfactory as it stands. No
· 8 . 000 color i l l u strations Over 220 contributors
ciass NP; that is, they are NP-complete. problem that has been relativized in two
•
98
© 1984 SCIENTIFIC AMERICAN, INC