You are on page 1of 16

Non-Deterministic Algorithms*

JACQUES COHEN
Physics Department, Brande~s Unwers~ty, Waltham, Massachusetts 02154

Prnmtive commands representing the concepts of choice, failure, and success are used to
describe non-deterministic algorithms for solving a variety of problems. First, the role of
the primitives is explained in a manner appealing to the reader's intuition. Then, a
solution to the classmal 8-queens problem is presented as a non-deterministic program,
and its implementation is described. Two examples follow, showing the usefulness of the
primitwes m computer-reded problem solving: the first is a simple question-answering
program, the other is a parser for a context-sensitive language. Finally, a brief survey of
current and related work is presented whmh includes: additmnal desLrable prumtives,
implementation, correctness, efficiency, and theoretical implicatmns
Keywords and Phrases: backtracking, language constructs, implementation, interpreters,
problem solving, efficiency.
CR Categories: 3.64, 4.13, 4.22, 5.23

INTRODUCTION those which contain special commands,


obeyed by choosing one parameter among
A common connotation for the word deter-
several.
ministic is the absence of choice. In a de-
In some cases, non-deterministic algo-
terministic event one knows precisely what
rithms have equivalent deterministic, and
will happen under each set of antecedent
often more efficient, counterparts. Never-
circumstances. In contrast, the term non-
theless, non-deterministic algorithms are
deterministic is used to denote an event
often more succinctly and clearly described,
whose outcome depends on the choices
and can always be simulated on a deter-
made by its participants.
ministic machine such as a digital com-
T h e term non-deterministic was first
puter. T he translation of a non-determin-
used in computer science in connection
istic algorithm into the program which sim-
with automata theory (see, for example,
ulates it can be performed automatically.
HoPc69). In that field, the term refers to a
These features parallel the advantages of
certain type of abstract machine. A non-
recursive algorithms, which can be trans-
deterministic machine has to obey a set of
lated automatically into their equivalent,
instructions which is ambiguous in the
but perhaps less succinct, non-recursive
sense that two or more instructions may be
counterparts.
applicable at some states of the execution.
Non-deterministic algorithms have also
Floyd has used the expression non-deter-
been referred to as "backtrack programs."
ministic algorithms [FLOY67] to denote
We shall see that backtrack programs are
* This work was supported by the National Science actually the result of translating non-deter-
Foundation under Grant Number MCS-74-24569-A01. ministic algorithms so that they can be run

Permission to copy without fee all or part of this material is granted provided that the copies are not made or
distributed for direct commercial advantage, the ACM copyright notice and the title of the pubhcation and its
date appear, and notice is given that copying is by permission of the Association for Computing Machinery. To
copy otherwise, or to republish, requires a fee and/or specific permission.
© 1979 ACM 0010-4892/79/0600-0079 $00.75

Computing Surveys, Vol. 11, No. 2, June 1979


80 • J. Cohen
CONTENTS The paper is directed, not to the expert,
but to the reader who would like to become
acquainted with the basic notions of non-
determinism, as presently used in computer
science.
INTRODUCTION Only an elementary knowledge of pro-
1 A N INTUITIVE E X A M P L E
2 A CLASSICAL E X A M P L E
gramming is necessary for reading the fol-
3 T R A N S L A T I O N INTO S T A N D A R D P R O G R A M S lowing two sections. A reader with a good
4 V A R I A N T S O F T H E CHOICE C O M M A N D programming background should have no
5 A FINAL E X A M P L E
6 CLOSING R E M A R K S
difficulty understanding the remaining sec-
ACKNOWLEDGMENTS tions. (The example in Section 5 may be
REFERENCES skipped on a first reading.) The references
in Section 6, although not exhaustive,
should provide directions for further read-
ing.

1. AN INTUITIVE EXAMPLE

The following event, which actually took


place during the exhibition of an avant-
garde movie, illustrates particularly well
A
T the non-deterministic situations which in-
terest us. The spectators have gathered in
in a computer. The word "backtracking" a hall to watch "a non-deterministic
was first used in this context by Walker movie." The projection starts, and the film
[WALK60] in 1960. progresses until, say, the hero and the vil-
The first reported simulation of non-de- lain are about to duel. At this point, which
terministic algorithms was done by Golomb we call a choice point, the show is inter-
and Baumert in 1965 [GoLo65]. They pro- rupted by an announcement requesting
posed a useful technique for searching for those in the audience favoring the villain's
specific configuration vectors in multidi- victory to move to a nearby projection hall.
mensional spaces. Two years later Floyd Once people have chosen to stay or to
[FLoY67] proposed a number of language move, projections are resumed in both
features which would enable programmers halls. Following a choice point each re-
to achieve succinctness and clarity in de- sumed projection is called an episode. It is
scribing combinatorial algorithms. easy to imagine that similar interruptions
More recently, the underlying concepts could take place at different points at the
behind non-deterministic algorithms have various projections, part of the audience
become important in fields as varied as always being directed to other halls accord-
artificial intelligence and complexity the- ing to their preference. The process could
ory. continue indefinitely, limited only by the
Although numerous papers have been number of spectators and halls.
published on the various facets of non- Obviously a movie of the above kind has
determinism, there has been no tutorial several plots, each of which can be repre-
presentation summarizing the work done in sented graphically by a path from the root
this area. This paper attempts to fill this to a leaf of a tree (see Figure 1). This tree
gap, while emphasizing the aspects of non- will be referred to as a tree of choices. A
determinism related to language constructs, node (other than the root) corresponds to
implementation, and problem solving. Ref- a choice point, a branch corresponds to an
erence will also be made to the importance episode, and a leaf corresponds to " T H E
of non-determinism in classifying algo- E N D " being flashed on the screen. Notice
rithms according to their efficiency. that the tree is not necessarily binary since

C o m p u t i n g S u r v e y s , V o l 11, N o 2, J u n e 1979
Non-Deterministic Algorithms 81
i start
time

0 - cho2ce point

FIGURE 1.

choices may involve more than two out- in charge of checking the desired sequence
comes. would obtain copies of himself at each
This example will illustrate our first choice point, the copies dispersing to the
problem: "Determine the plot leading to a halls where the next episodes would be
particular situation (say, one in which a shown. A copy would cease to exist in the
given character is shot, survives, and ends case of an impasse. Impasses occur when:
up eloping with the heroine)." 1) the movie ends and the sequence of
There are two approaches which could desired events has not occurred, or 2) an
be used to solve this problem, parallel and event occurs which directly contradicts the
sequential. desired sequence (say, in our example, if
In the first approach, the aid of a (poten- the character is shot and dies). T h e prob-
tially infinite) number of helpers for parallel lem is solved when a copy witnesses the
viewing is requested. Their duty is to watch specified sequence of events. We could even
for the occurrence of the particular se- ask him which projection halls he went
quence of events which interests us. If through while checking for the sequence. It
choice points take place before this occur- should be clear that for a specified sequence
rence, the helpers simply split up and dis- of events there may exist none, one, or
perse into the different halls to watch the several plots and therefore solutions to our
various sequels. Without the aid of the problem. Furthermore, if the projection
helpers, the parallel approach could only be lasts indefinitely, the number of solutions
used if we had the supernatural power to may be infinite.
obtain copies of ourselves. 1 The spectator T he solution of our problem using the
~ Incidentally, Sabine, t h e beautiful heroine of t h e
F r e n c h novelist Marcel A y m 6 h a d s u c h powers S h e In n a r r a t i n g w h a t h a p p e n s to t h e various S a b m e s ,
could obtain new copies of herself w h e n e v e r s h e de- A y m 6 h a d to face t h e p r o b l e m of describing non-
sired. In t h e novel, Sabine resorted to h e r d u p h c a t m g deterministic situations to a reader w h o sequentially
powers after falhng in love with t h e h a n d s o m e new s c a n s t h e text. Thin p r o b l e m parallels t h a t of translat-
lovers s h e h a d no trouble e n t m m g By t h e e n d of t h e ing a n o n - d e t e r m i n i s t i c a l g o r i t h m into one w h i c h is
novel t h e n u m b e r of Sablnes rose to t h e thousands! sequentially executed by a c o m p u t e r .

Computing Surveys, Vol 11, No 2, June 1979


82 • J. C o h e n

sequential approach involves: 1) an agree- describing non-deterministic situations are:


ment with the movie operator to project choice, f a i l u r e and success. The first cor-
the episodes at the times requested by the responds to a choice point, the second to an
sole spectator solving our problem, and 2) impasse, and the third to the finding of a
a (potentially infinite) list where the spec- desired sequence of events. Consider, for
tator-solver will record information about example, a non-deterministic movie having
choice points. This list is administered on one choice point with three episodes. Sup-
a first-in last-out basis, i.e., as a stack. The pose that we are interested in describing
strategy for solving the problem is as fol- this movie, and determining the plot(s) con-
lows. At each choice point the spectator sisting of the sequence of the two events: 1)
records the identity of the choice point and "hero is shot and survives," and 2) "hero
the number of its possible immediate se- elopes with the heroine." This non-deter-
quels. He then asks the operator to project ministic problem can be described by:
one of these sequels. As in the parallel start
mode, the spectator looks for the specified
sequence of events. If an impasse is c h o i c e el, e2, e3
reached, the spectator asks the operator to in which each of the episodes e~, e2, and e3
project an as yet unviewed episode corre- contains the two conditionals:
sponding to the choice point which appears
on the end of his list. If all episodes corre-
i f "'hero is shot a n d dies" t h e n f a i l u r e
sponding to a choice point have already
been shown, the spectator erases the infor-
mation about this choice point from the list i f "hero elopes wtth the heroine" t h e n s u c c e s s
and requests the projection of the next ep- else failure
isode of the preceding choice point. (The The conditionals check for the desired se-
reader familiar with algorithms for inspect- quence of events and signal a failure as soon
ing tree structures has undoubtedly noticed as the facts are found inconsistent with the
that the sequential mode corresponds to sequence.
a depth-first inspection of the tree of The above representation describes only
choices.) the problem; it does not specify whether
Let us assume that our spectator-solver the parallel or the sequential mode is to be
has a very short memory for remembering used for solving it.
plots. Most people are familiar with the In this paper we will concentrate on the
backward projection of movies• Actions ap- sequential mode of solution to non-deter-
pear to be undone: divers spring from the ministic problems, since present-day com-
water back to diving boards, people become puters are suited for that mode. {This sit-
younger, damage due to collisions is re- uation will change as parallel processors
paired, etc. If the solver of our problem has become available.)
a short memory, he could ask the operator
to run the movie backwards as soon as he
2. A CLASSICAL EXAMPLE
sees an impasse. This backward projection
is viewed until the scene corresponding to Floyd [FLOY67] illustrates the usefulness of
the most recent choice point appears on the non-deterministic algorithms with the
screen. Projection is then either resumed in classical 8-queens problem. The problem is
the forward direction with the next episode to place 8 queens on a chessboard so that
(if there is one left) or proceeds backwards there is only one queen in each row, column
to the preceding choice point. In this man- or diagonal of the board (see Figure 2).
ner, the viewer confronted with an impssse The tree of choices for this problem is
has his memory "refreshed" to the state too large to represent here, so we will first
when the choice point was first encoun- consider a scaled down version of the prob-
tered. lem in which one must place four queens
Essentially, non-deterministic algorithms on a 4 x 4 chessboard• Four ordered inte-
are used to describe problems similar to the gers from 1 to 4 suffice to indicate a config-
one just discussed. Some useful words for uration of the queens which satisfies the

Computing Surveys, Vol 11, No 2, June 1979


Non-Deterministic Algorithms • 83
column + makes the word non-deterministic applica-
ble, since there is an arbitrary choice among
row 1 2 3 4 5 6 7 8
possible outcomes.
Now we are ready to describe a non-
deterministic algorithm for solving the
problem. Let the variables c o l and r o w rep-
resent a column and a row where a q u e e n
can be placed. We also assume that the test
T below can be easily performed:
T: a queen at position (row, col) does not
conflict wtth prevtously placed queens.
We will use the command:
(i, 5, 8, 6, 3, 7, 2, 4)
choice among row (-- 1 to 4,
FIGURE 2.
to indicate a node of our tree and its four
branches. A non-deterministic algorithm
problem. For example, the ordered quad- which describes the tree in Figure 3b fol-
ruple (2, 4, 1, 3) indicates that the queens lows:
are in rows 2, 4, 1, and 3, of columns 1, 2, 3 col ( - 1;
and 4 respectively. This configuration is choice among row *-- 1 to 4;
depicted in Figure 3a. Figure 3b shows part if T then place queen at (row, col)
of a tree of choices for the 4-queens prob- else failure;
lem. Note that board configurations involv- p r i n t (row);
ing fewer than 4-queens can still be repre- col ~- 2;
sented by quadruples. We use asterisks to choice among row ,--- 1 to 4;
indicate queens which are yet to be posi- if T then place queen at (row, col)
else failure;
tioned. The root of the tree of choices p r m t (row);
can then be labelled by the configuration col ,-- 3;
(,, ,, ,, ,). choice... (as above)
As the first choice, we position the first
queen on the first column. There are four col (--- 4;
resulting configurations possible, and these choice...
are defined by the quadruples: (1, *, *, *), , o .

success;
(2, *, *, *), (3, *, *, *), and (4, *, *, *). These
are (partly) shown in the tree of Figure 3b. The following points are worth noting:
For each of the above configurations there 1) The board is assumed to be initially
are four possible ways of placing the second empty. The words choice, failure,
queen in the second column. Obviously the and success were intuitively defined
configurations (1, 1, *, *) and (1, 2, *, *) in the previous section.
represent a failure--no matter what digits 2) The tree of choices is inspected from
replace the asterisks. These nodes of the the root (col -- 1) towards the leaves
tree are labelled with an F. (col = 4).
The darker line in the figure shows the 3) The non-deterministic command
path in the tree of choices which leads to a p r i n t (row) consists of internally writ-
solution of the problem. The reader is urged ing the value of row. (This value may
to verify that the sequential approach for be erased if later, during the execu-
solving this problem involves inspecting the tion, the branch containing the p r i n t
tree nodes numbered 1, 2, 3, ...9. He may command is backtracked.) Notice that
also find it useful to complete the tree the value of c o l need not be printed
shown in Figure 3b. since it always increases from 1 to 4.
Although we have consistently repre- 4) The command success is only
sented the branches coming from each node reached after the cascading c h o i c e ' s
in ascending order, this is not strictly nec- are executed. At that point the printed
essary. Actually, the order in which the values of r o w reveal the solution of
branches are considered is irrelevant. This the problem.
Computing Surveys, VoL 11, No 2, June 1979
84 • J. Cohen
(*,*,*,*)

4,2,*) ,4,1,*)

\ ,\ j 2/ 31
1 2 3 4 F
// F
\F
./II \o
F F F --

~w I ~ (2,4,1,3)
2 ,g,
3 '~'' b
4 ~
( 2, 4, 2, 3 )

FIGURE 3.

A succinct version of the above program grams by using transformation rules. The
is obtained by using a for statement to rules may be found in FLOY67 and COHE75.
successively assign the values 1, 2, . . . etc. This presentation describes informally how
to the variable col. Our original 8-queens the translation is accomplished, using the
problem can then be described as the fol- 8-queens problem as an example.
lowing non-deterministic algorithm: The translated program operates in the
for col ~ 1 to 8 do sequential mode described in the first sec-
begin tion. Upon failure it backtracks to the pre-
choice a m o n g row *-- 1 to 8; vious choice point in a manner analogous
if T then place queen at (row, col) to the backward projection of movies.
else failure; When the statement i ~-- i + 1 is found in
p r i n t (row) a program, it is executed in the backward
end; direction as i ~-- i - 1, to undo what was
success;
originally performed. Another manner of
This formulation is at least as succinct and handling assignments is to save the value
perhaps more natural than the recursive of the variable just prior to the assignment,
algorithms which solve this problem (see and to restore it to that variable during the
DIJK72 and WIRT76). backward execution.
Let us consider a sequence of non-deter-
3. TRANSLATION INTO STANDARD
ministic commands S~, $2. . . . Sn. We will
PROGRAMS
indicate by S, + the translation of S, in the
forward mode, and by S,- the translation of
Non-deterministic algorithms can be trans- S, in the backtrack mode.
lated automatically into computer pro- The translation of the sequence into a

Computing Surveys, Vol 11, No 2, June 1979


Non-Deterministic Algorithms * 85
standard program uses a global Boolean f o r w a r d readjust the values of B and i so
variable B which indicates the mode: for- t h a t the execution proceeds in the corre-
ward, or backtrack. We have: sponding mode. A stack, M, is used for
{forward) ',(backtrack) saving the values of the controlled variable.
l *-- 1; B *-- t r u e ; l A n o t h e r stack, W, is used in the transla-
loop: c a s e i o f i tion of a non-deterministic p r i n t (t) com-
S, + ~ S,-, mand. In the forward execution the trans-
S~ + ~ S~-, lation of this c o m m a n d pushes into W the
I
I value of the variable t. In backtracking that
• I value is simply popped, i.e., erased from the
Sn+ I Sn- stack W.
I
I
Consider the non-deterministic f o r state-
end o f case;
t ~-- i + ( i f B t h e n 2 e l s e - 2 ) ; ment:
goto loop; previous: • ..;
T h e case s t a t e m e n t transfers control to the for j ~-- 1 to n do
ith s t a t e m e n t contained between the delim- b e g i n Sl, $2, .-. Sm e n d ;
iters o f and e n d . T h e variable i is an in- next: • • .;
struction counter which is advanced to the A possible translation into a standard pro-
next forward or backtrack instruction, de- gram is given by:
pending on the value of B. This value can, (forward) i ( b a c k t r a c k )
of course, be altered by some of the S, ÷ or previous: • • •; -l-
S,-. At least one of the S's is a transfer to a i *--J *-- I; ]
label outside of the loop. B *-- tru_e; I
As in the case of assignments the state- loop: c a s e i of I
ment: c h o i c e a m o n g x ~ 1 t o n is trans- ef: ifj > n thenl
lated into two parts: one for the forward goto next ! eb: i f j = 1 t h e n
execution and the other for backtracking. I goto previous
T h e s e will be represented respectively by I else i
the two procedures f c h o i c e and b c h o i c e , I 2 * m + 6,
each having two parameters: the controlled Si + ! & - ,
variable x and its upper limit n. T h e pro- $2+ l S~-,
I
cedures listed in Figure 4 assume t h a t the
I
variable x is successively assigned to the 8m+ , Sm-,
values 1, 2, • • • n. As previously stated, this
j*--j+ lJj*--j--1,
is not strictly necessary. T h e variable x repeat: i ,-- - I I
could have been successively assigned to end o f case; I
the elements of a r a n d o m p e r m u t a t i o n of i *-- i + (if B t h e n 2 else -2); goto loop;
the sequence 1, 2, • • • n. However, a glance next: . . . ;
at the tree of choices for the 4-queens prob- T h e s t a t e m e n t s labelled e f and e b control
lem (Figure 3b) shows the importance of the loop exit in the forward and backtrack
selecting the "right" permutations, i.e., directions. T h e one labelled r e p e a t simu-
those t h a t minimize searches through blind lates the action of the f o r statement, i.e., it
alleys. forces control to be transferred to the first
T h e auxiliary procedures b a c k t r a c k and s t a t e m e n t of the c a s e . Similarly, the false
p r o c e d u r e fchoice (x,n) ; i n t e g e r x,n ; b r a n c h in the conditional labelled e b (i.e.,
if x > n t h e n b a c k t r a c k else i ~-- 2*m + 6) forces the transfer of control
begin s t a c k M (x) , x * - I end ; to the s t a t e m e n t which decreases the value
p r o c e d u r e bchotce (x,n) ; i n t e g e r x , n ,
begin x e - x + l ; of the controlled variable j, and therefore
if x > n t h e n u n s t a c k M (x) starts undoing the f o r statement.
else f o r w a r d Before presenting the final version of the
end ; translation of the algorithm for solving the
p r o c e d u r e b a c k t r a c k , begin B~---false ; t*--i+1 end,
8-queens problem, we will make some re-
p r o c e d u r e f o r w a r d ; begin B ~ - t r u e ; t~--t-1 end ;
marks a b o u t the implementation of the test
FIGURE 4. T in the non-deterministic algorithm. (Re-

Computing Surveys,Vol 11,No 2, June 1979


86 • J. Cohen

call t h a t this test is needed for checking if 5 yields as a result the 8-tuple (1,5,8,6,3,7,
a queen can be placed at a given row and 2,4) which corresponds to the first solution
column of the board.) of the problem (see Figure 2).
We note t h a t the sum of the indices of If we desired all successful configurations
each element in one left-right diagonal of a it would suffice to add a line consisting of
matrix representing the chessboard is the the statements:
same. This is also true for the differences 13) B (---false; ~ (---14; g o t o loop;
of indices in a right-left diagonal. Therefore,
T h e s e s t a t e m e n t s simulate an impasse by
two unidimensional Boolean arrays b and triggering the backtrack mode and transfer-
c can be used to test for the existence of ring control to col (--- col - i in line 9.
queens in the diagonals. A third Boolean
a r r a y a is used to indicate the presence of
a queen in a row. T h e bounds of a, b, and 4. VARIANTS OF THE CHOICE COMMAND
c are respectively: 1:8, 2:16 (i.e., the range In the previous section the c h o i c e com-
of the sum of the indices of matrix ele- m a n d a p p e a r e d in a form which only al-
ments) and - 7 : 7 (i.e., the range of the dif- lowed a controlled variable x to be succes-
ferences of indices). T h e arrays are initial- sively assigned values from 1 to n. In this
ized to f a l s e . T h e presence of a queen in a section we will describe more versatile ver-
row or diagonal is indicated by setting the sions of c h o i c e . Consider the database con-
corresponding e l e m e n t of an array to t r u e . sisting of the lists:
T e s t T t h e n becomes:
(CLIMATE ECUADOR T E M P E R A T E )
(a[row] V b[row + col] V c[row - col]) (SOIL U R U G U A Y FERTILE)
According to this data structure, the place- (CLIMATE UR UGUA Y T E M P E R A T E )
m e n t of a queen in a row is represented by: (SOIL ECUADOR B A R R E N )
(CLIMATE P A R A G U A Y T E M P E R A T E )
(SOIL P A R A G U A Y FERTILE)
a[row] (-- b[row + col] (--- c[row - col] (-- (GROWS P A R A G U A Y WHEAT)
true (GROWS ECUADOR CACTUS)
Its backtracking c o u n t e r p a r t is therefore: T h e above list contains geographical infor-
a[row] (--- b[row + col] (-- c[row - col] (-- m a t i o n a b o u t Latin American countries,
false and has been used by Carbonell to illustrate
Keeping the information given in the pre- his question-answering program (see
vious paragraphs in mind, the reader should BOBR74).
have no difficulty in understanding the pro- An interesting variant of the c h o i c e com-
gram in Figure 5. It corresponds to the m a n d appears u n d e r the disguise of a
translation of our original non-determinis- search. Consider the two commands:
tic algorithm. search (CLIMATE x T E M P E R A T E )
T h e execution of the program in Figure search (SOIL x F E R T I L E )

1) m t t t a l i z e arrays a, b, c to f a l s e , stacks M a n d W to empty


i *-1 ; B (---true ; eol*-I ; ~l
(forward) I(backtrack)
2) loop: case t of i-
3) i f col > 8 t h e n g o t o success ! i f col ffi 1 t h e n stop e l s e ~ * - 14,
4) fchowe (row, 8) Ibchowe (row, 8),
I

5) i f a [row] V b [row+col] k/ c [ r o w - c o l ] I
0 t h e n backtrack ! no operatton,
7) a[row]*-b[row+col]*-c[row-col]*-true ! a[row]*-b[row+col]*-c[row-col]*-false,
8) stack W (row) ~ u n s t a c k W,
9) col(-col+l I col*-col-1,
W) t*--1 I
e
end o f case ;
11) i ~--1 + (if B t h e n 2 e l s e - 2); g o t o loop ;
12) success • p r t n t W ;
FIGURE 5.

Computing Surveys, Vol 11, No 2, June 1979


Non-Deterministic A l g o r i t h m s • 87

These commands request binding the vari- c h o i c e is re-entered in the backtrack mode,
able x to a country in the database such it proceeds from where it had left off; how-
that both searches are satisfied. In other ever, care must be taken to fncst undo the
words, these commands correspond to de- tasks performed during the latest activa-
termining a country (or countries) with tion. The example below illustrates the po-
temperate climate and fertile soil. A non- tentially intricate control structure which
deterministic situation arises because there results from using the o r c h o i c e command.
is a choice for binding x when satisfying the Consider the following program in which
first search. If the sequential approach is the S,'s are basic commands:
used, x is initially bound to E C U A D O R . $1;
When the second search is attempted a orchoice Se $3 $4;
failure occurs since that country has a bar- $5;
ren soil.
Backtracking takes place, the first search Let us, as before, denote by S, + the execu-
is resumed and x is now bound to URU- tion of S, in the forward mode and S,- the
G U A Y . This binding is satisfied by the corresponding execution in the backtrack
second search. Had we wished to check if mode. Assume that sometime during the
the database contained other countries execution S, + leads to a backtrack mode;
which satisfied the two search commands, we will indicate this occurrence by the no-
we could, as in the case of the 8-queens, tation S~. The following sequences of S,'s
simulate a failure immediately after having show some of the possible flows of control
bound x to U R U G U A Y . This would enable while the above program is executed:
us to find P A R A G UA Y as another suitable S~(T $1- . . . (continues backtracking)
binding for x. $1+ S2+T$2~ S~+ S~+ . . . (contmues forward)
We will now informally describe a mini- $1+ $2÷ S~ $5- $2- $3÷ Ss+ " " (continues for-
language containing several features of lan- ward)
guages proposed for solving problems in 81 + 82+~ 82- S3+~ 83- S4 + 855 S5- $4- S l - . , ,
artificial intelligence [BoBR74]. Programs (continues backtracking)
written in this language may contain se- The translation of the search and or-
quences of search commands as illustrated c h o i c e commands into their deterministic
above. In addition, these sequences can be counterparts can be made in a manner sim-
grouped into procedures which may or may ilar to that described in Section 3. T h e
not have formal parameters and local vari- command search is really a variant of
ables. Calls of procedures are accomplished c h o i c e and is translated into calls of pro-
by a variant of choice, referred to as or- cedures fsearch and bsearch which parallel
choice. Its parameter is a list of searches fchoice and bchoice (see Figure 4). The
or procedures being called. Finally, we will translation of o r c h o i c e is slightly more
allow the o r c h o i c e command to appear complex: it involves simulating non-deter-
within the body of procedures. Recursive ministic subroutines. This is done by first
procedures are, of course, permitted. checking if a subroutine is to be executed
Both the commands search and or- in the forward or in the backtrack mode. If
c h o i c e embody properties of choice points. it is to be executed in the backtrack mode,
In the case of search, the set of possible control is transferred to "undo" the last
values consists of the lists contained in the statement of the subroutine; otherwise,
database which could be successfully control is transferred to the first statement
matched. The command o r c h o i c e greatly for normal forward execution. Details are
increases the power of the language, or- found in FLOY67.
c h o i c e , like search, successively tries a We are now ready to present a program
number of paths until it finds one leading which answers questions about crops grow-
to a successful situation. In this case, the ing in the countries described by the data-
paths represent the execution of the com- base given at the beginning of this section.
mands which are given as o r c h o i c e param- Consider, for example, the question:
eters. The o r c h o i c e command operates as W h a t grows in Uruguay? Notice that the
a backtrackable coroutine. Every time or- database does not explicitly contain the

Computing Surveys, Vol II, No. 2, June 1979


88 • J. Cohen
answer to this question. However, the an- E C U A D O R F E R T I L E ) is not contained in
swer can be inferred by using the following the database, the backtracking mode is trig-
inference rule: Whenever the crop of a gered: the binding of country2 to ECUA-
country is not present in the database, pro- DOR is undone, the forward mode is re-
vide as an answer the crop of some other sumed and country2 is bound to URU-
country which has the same soil and cli- GUAY. The search for {SOIL U R U G U A Y
mate conditions. This rule can he imple- F E R T I L E ) would then be satisfied. How-
mented by the two procedures listed below ever, a search for ( G R O W S U R U G U A Y
(the variables in the lists appearing as pa- crop) fails and backtracking again occurs.
rameters are represented by small case The reader can easily check that when
identifiers; capital letters are used in the country2 is bound to P A R A G U A Y , the
atoms of the lists to indicate actual (quoted) searches in the procedure infer are all sat-
strings): isfied and crop becomes bound to W H E A T .
proc grows (country); Upon returning to the procedure grows,
begin local crop; crop is still bound to W H E A T and the
c o m m e n t first check ~f the answer is write statement then produces the desired
available m the database. If not, call output:
the procedure infer; (URUGUAY CAN GROW WHEAT)
orehoice search (GROWS country
crop) Note that an efficient implementation of
infer (country crop); the procedure infer would reorder the suc-
wr~te (country CAN GROW crop) cessive searches that appear in its body.
end of grows; Such reordering could help to trigger a fail-
p r o c infer (country crop); ure sooner and therefore bypass unfruitful
begin local country2, soil, climate; searches.
c o m m e n t this procedure incorporates
the inference rule: if two countries 5. A FINAL EXAMPLE
have identical climate and soil con-
ditions, they can grow the same crops; This example illustrates the use of the
search (CLIMATE country climate); minilanguage of the last section in writing
search (SOIL country soil); parsers for context-sensitive languages
search (CLIMATE country2 climate); [HoPc69]. Only rudimentary knowledge of
search (SOIL country2 soil); language theory is required for understand-
search (GROWS country2 crop) ing this example since this parsing problem
e n d of mfer; can be formulated in terms of graph trans-
Upon a call of grows (URUGUAY), the formations.
parameter country is bound to URU- Consider the rewriting rules:
GUAY. The o r c h o i c e in the procedure Rule No.
grows is then executed: First the search 1 S---) aSBc
(GROWS UR UGUA Y crop) is performed, 2 S--* abc
3 cB---)Bc
but it fails since the database contains no 4 bB--) bb
reference to crops in Uruguay. The next
statement of the o r c h o i c e command is ex- Starting with the letter S and using the
ecuted, namely: infer ( U R U G U A Y crop) second rule, we obtain the string abc and
This execution triggers the command: no further rules are applicable to transform
search (CLIMATE URUGUAY climate) the latter string. If, however, we start with
an S but use the first rule instead, we obtain
The variable climate is bound to TEM- the string aSBc. Further replacements of S
P E R A T E . The next search in infer is: by Rule 1 yield the string
search (SOIL URUGUAY soil) h a . . . a S B c B c . . . Bc,
which binds soil to F E R T I L E . The com- in which the number of a's preceding the S
mand: equals the number of Bc's which follow it.
search (CLIMATE country2 TEMPERATE) A further replacement of S by Rule 2 yields
binds country2 to ECUADOR. Since (SOIL a a ... aabcBc Bc ... Bc.

C o m p u t i n g Surveys, Vol 11, No 2, J u n e 1979


Non-Deterministic Algorithms • 89
Successive applications of the third rule linking nodes 3, 4, 5. A replacement of this
allows us to move all B's towards the center subgraph by one labelled c B now takes
of the string and all c's towards the right. place. The process continues until the orig-
We obtain inal graph is replaced by an arc labelled S
aa . . . aab B B . . . B cc . . . cc. going from L E F T to R I G H T .
While performing the graph transforma-
Finally, application of the last rule enables tions, several non-deterministic situations
us to rewrite the above string into may arise. They are due to the fact that
aa . . . aa bb . . . bb cc . . . cc. several rhs of rules may be applicable and
No rules are now applicable and the above each one of them may have to be tried.
strings contain the same number of a's, b's In order to write a parser for the given
and c's. Using language theory terminology, language we will introduce two new com-
we say that the given rewriting rules gen- mands to our minilanguage: The command
erate the language anbnc n with n ~> 1. It is a d d (L), adds the list (L) to the database.
not difficult to show that the given rewrit- Its counterpart, the command delete (L),
ing rules generate only the strings of this deletes the list L. It follows that the back-
language. The problem of parsing consists tracking counterpart of a d d is delete and
of showing how a given string could have vice versa.
been rewritten from S using the rules. A specific parser for the language gener-
A graphical solution of the problem for ated by the given rules is presented in Fig-
the string a a b b c c is shown in Figure 6. The ure 7. Each of the rules is translated into a
elements of this string are initially used as procedure. Only those corresponding to
labels of arcs of a directed graph from the Rules 1 and 3 are presented in Figure 7,
node L E F T to the node R I G H T (solid lines since the others can be easily constructed
in the figure). A traversal of this graph from by the reader.
left to right, consulting the rewriting rules, The concatenation of elements of the
reveals that the subgraph labelled bb cor- vocabulary is expressed using the auxiliary
responds to the right-hand-side (rhs) of the variables p,. The presence in the database
fourth rule. We indicate that the lhs b B of lists of the type:
could have been used to obtain the sub- (p~ A P2)
string bb by deleting the arcs labelled b and (P2 B P3)
adding the new arcs b (from node 2 to 3) (p~ C p4)
and B (from 3 to 4). The added arcs are indicates that A is concatenated with B
indicated by the dashed lines in Figure 6. which in turn is concatenated with C.
The reader can easily verify that a new The identifiers A , B, C, B I G B , B I G S are
traversal of the transformed graph shows used to denote a, b, c, B, and S. The pro-
that the lhs of B c corresponds to a subgraph cedure expressing Rule 1 states that if the

a a b b C C

LEFT % 1 k 2 t 3--4~_~
% , , /I¢, % I
% % % j --
.J , ~ I /
I
\ % b t iI, "B~ ¢
/ l
! I ,,
~. ~ \ / I /
%' ~' "~" I #
~% % c I I
%. '% .,,
% -~ j /

%. f
,%. S //

F I G U R E 6.

Computing Surveys, Vol. II, N o 2, June 1979


90 • J. Cohen
b e g i n p r o c rule1;
begin local pl, p2, p3, p4, p5;
delete (pl A p2);
delete (p2 BIGS p3);
delete (p3 BIGB p4);
delete (p4 C p5);
add (t91BIGS p5);
write (FOUND BIGS FROM pl TO p5)
end of rule1;
p r o c rule3;
begin local pl, p2, p3,
delete (pl BIGB p2),
delete (p2 C p3);
add (pl Cp2);
add (p2 BIGB p3),
write (FOUND C A N D BIGB F R O M p l TO p3)
e n d of rule3;
c o m m e n t procedures for rules 2 and 4 are simdar to the above and are not presented here;
• ;

proc parse;
begin
orchoice rulel rule2 rule3 rule4,
orchoice terminate parse;
e n d of parse;
proc terminate;
begin
search ( L E F T BIGS RIGHT);
success
end of terminate;
main: . . .
end
FIGURE 7.

sequence a, S, B, c is found in the database, 6. CLOSING REMARKS


then that sequence should be deleted and
replaced by an S. Notice that the left and In the preceding sections we have covered
some of the now classical concepts regard-
right neighbors of a S B c become the neigh-
bors of S. ing non-deterministic algorithms. Our ob-
The procedure p a r s e is the heart of the jective in this section is to make a brief
program. It first tries to apply any of the survey of the more recent work done in this
rules. If it succeeds, it checks for termina- area. The references should help the inter-
tion by calling the procedure terminate. ested reader to obtain additional informa-
This procedure assumes that the string to tion
be parsed is "placed" between the delim-
iters L E F T and R I G H T . If t e r m i n a t e fails, A d d i t i o n a l Desirable P r i m i t i v e s
a recursive call of p a r s e is needed to keep The primitives described in the previous
applying rules which will eventually lead to sections allow only a depth-first inspection
a successful parse. 2 The parsing of the of the tree of choices. A greater flexibility
string aabbcc is accomplished by calling for this inspection can be achieved by
the procedure parse, after initializing the adopting the primitives suggested in
database to contain the lists: ( L E F T A 1), McDE74 and MONT77. For example, a pro-
(1 A 2), (2 B 3), (3 B 4), (4 C 5), (5 C posed variant of choice, called attempt,
RIGHT). enables the user to provide an ordering of
2 Recursion is frequently used in parsing algorithms. its parameters so that the search for a suc-
The reader familiar with recursive descent parsers will cessful configuration will, it is hoped, be
notice similarities between that type of parser and the faster. The primitive sleep, similar but of a
one presented in Figure 7. Note, however, that a
recursive descent parser is "top-down," whereas the less drastic effect than failure, also triggers
one in Figure 7 is "bottom-up" backtracking. However, upon encountering

Computing Surveys, Vol 11, No 2, June 1979


Non-Deterministic Algorithms • 91
its matching primitive resume, control is could be saved (perhaps using secondary
transferred back to the statement following storage) every time a choice point is en-
sleep. These two primitives allow a greater countered. Upon failure, the computer is
flexibility in inspecting the tree of choices: reset to its previous state just before the
Assume, for example, that a choice com- choice, and its next parameter is consid-
mand involves many parameters (possibly ered. Whether this latter technique should
generated while the program is being exe- be used instead of the one in Section 3
cuted}. Since many branches of the tree depends, of course, on the amount of stor-
will now have to be examined, it may be age needed to save the state of the com-
worthwhile to postpone the examination by puter and the speed with which this infor-
issuing the sleep command. This causes mation can be transferred to secondary
other parts of the tree to be inspected and storage. Reference SMIT73 discusses the ad-
more information collected about the vantages and inconveniences of the two
branches which were "put to sleep." Some approaches.
of these branches may then be pruned using Another aspect of implementation worth
the primitive kill. The original choice node mentioning is optimizing the programs
may then look more appealing for exami- which simulate non-deterministic algo-
nation, since it contains fewer branches. rithms. As seen in the geography example
This examination can now be triggered by of Section 4, this optimization involves al-
resume. The use of these primitives for tering the order in which searches are per-
solving the 8-queens problem is described formed. In artificial intelligence applica-
in MONT77. tions, this reordering may be crucial for the
practical solution of a problem [MooR75].
Implementation Optimization also includes the use of hash
tables to speed up the execution of set
There are several papers in the literature operations.
describing the implementation of non-de-
terministic algorithms written on a variety
of languages. Floyd's paper [FLoY67] de- Program Correctness
scribes how to transform ("by hand") a
flowchart containing non-deterministic It is known that certain recursive algo-
primitives into a standard one. Johansen in rithms are more easily proved to be cor-
JOHA67 shows how an ALGOLcompiler has rect than their non-recursive counterparts
been modified to accept non-deterministic [MANN76]. The same may hold true for
programs. The preprocessor described in certain non-deterministic algorithms
COHE74 transforms extended FORTRAN [DERo77]. Techniques presently used in
programs which use non-deterministic program correctness have also been used to
primitives into standard FORTRAN.Embed- eliminate searches through blind alleys
dings of non-determinism in LisP, ECL, from programs simulating non-determinis-
BCPL and a SNOBOL-like language have tic algorithms [SINT76]. In certain cases it
been proposed in SMIT73, PREN72, SELF75, is even possible to avoid all blind alleys, or
and GRIS77. in other words, to eliminate backtracking.
Bitner and Reingold [BITN75] show ex- A classical example of this situation arises
amples of the use of macros in implement- in connection with non-deterministic finite-
ing non-deterministic algorithms. Refer- state-automata, a class of abstract ma-
ence BOBR73 is valuable when implement- chines capable of recognizing certain types
ing the non-deterministic primitives de- of strings [HoPc69, MANN76]. A theorem in
scribed in the beginning of this section. language theory [HoPc69] states that it is
It should be noted that a standard pro- always possible to find a deterministic-fi-
gram simulating a non-deterministic algo- nite-state automaton equivalent to a non-
rithm could operate in a manner different deterministic one. Of course, this is not
from the one presented in Section 3. For always feasible when dealing with more
example, the entire state of the computer general types of automata.

Computing Surveys, Vol 11, No 2, June 1979


92 • J. Cohen
Efficiency a n d Complexity ing the paths in the tree of choices, the time
for the sequential approach could be linear
The difficulties and frustrations involved in
as well. Notice too that the parallel ap-
estimating the efficiency of non-determin-
proach may require an exponential number
istic algorithms have been aptly expressed
of helpers.
by Knuth [KNuT75]: Some related important theoretical re-
Sometimes a backtrack program will run to sults have been obtained in the area of
completion in less than a second. The au- complexity of algorithms [AHo76]. They
thor once waited all night for output from
state the existence of very hard non-deter-
such a program, only to discover that the
answers would not be forthcoming for ministic problems which can only be solved
about 106 centuries. A "slight increase" in in exponential time when using the sequen-
one of the parameters of a backtrack rou- tial approach. This means that, for a certain
tine might slow down the total running class of problems, the "wisdom" necessary
time by a factor of a thousand; conversely to avoid exponential time complexity is be-
a "minor improvement" to the algorithm lieved to be unattainable. These problems
might cause a hundred fold improvement are said to belong to the class NP, which
in speed; and a sophisticated "major im- stands for "non-deterministic polynomial."
provement" might actually make the pro- The term "polynomial" indicates that the
gram ten times slower. These great discrep- time needed to follow a path from the root
ancies in execution time are characteristic
of backtrack programs, yet it is usually not to a leaf of the tree is expressible as a
obvious what will happen until the algo- polynomial function of ~. (Our movie ex-
rithm has been coded and run on a ma- ample belongs to this class since the corre-
chine. sponding time is linear.)
In spite of these discouraging prognostics, Several algorithms for solving problems
however, Knuth proposes a semi-empirical in graph theory or in operations research,
method for estimating the efficiency of and for proving theorems in propositional
backtrack programs, which, by the evidence calculus belong to the N P category. Recent
provided, works well in a variety of cases. results in complexity theory show that
It consists of evaluating a formula whose there is a remarkable subclass of N P called
coefficients are determined by the use of NP-complete. These are problems which
Monte Carlo techniques, more precisely, by are reducible to each other in the following
performing random walks in the tree of sense: if at some time in the future one of
choices. them is found to have an efficient method
To conclude, let us briefly reconsider a of solution, that method can be modified to
hypothetical version of the non-determin- apply to all the others. The first proof that
istic movie problem of Section 1. Assume a problem belonged to the NP-complete
that every episode lasts for a time A, and class was given by Cook in COOK71. He
that each choice point always results in a established a correspondence between cer-
fixed number of episodes, say m. This im- tain non-deterministic algorithms and theo-
plies that the tree of choices is m-ary and rems in propositional calculus for which
that the "length" of each branch is A. We proofs appear to require exponential time. 3
also assume that the tree is full, i.e., each According to this correspondence, non-de-
path from the root to a leaf has length f A . terminism can be viewed as checking a
It follows that the time for solving the given proof of a theorem (i.e., following one
corresponding movie problem using the path of the tree of choices and checking for
parallel approach is ¢'/~. However, a se- success or failure). Determinism, on the
quential approach could, in the worst case, other hand, corresponds to finding the
take time r a t a since the desired plot might proof of a theorem {i.e., exhaustively
be the last one to be examined. Thus the searching all branches of the tree}. The
parallel approach for solving the problem 3 This important classification of algorithms parallels
takes linear time, whereas the sequential A. Turing's classification of solvable and unsolvable
problems. He proved the unsolvability of several prob-
approach takes exponential time. It is also lems by reducing them to a known unsolvable problem
true that if we are wise (or lucky) in choos- called the halting problem.

Computing Surveys, Vol. 11, No 2, June 1979


Non-Deterministic Algorithms • 93
reader is referred to LEwI78 for a pedagogic ministic Fortran," Comput. J. 17, 1 (Feb.
1974), 44-51.
presentation of several NP-complete prob- Cons75 COHEN, J. "Interpretation of non-deter-
lems and important open questions in com- ministic algorithms in higher-level lan-
plexity theory. guages," Inf. Process. Lett. 3, 4 (March
1975), 104-109.
Although it may be impossible to avoid Coos71 COOK, S. A. "The complexity of theorem-
the exponential time complexity of simulat- provmg procedures," in Proc. Thwd An-
ing certain non-deterministic algorithms, a nual ACM Syrup. Theory of Computmg,
1971, ACM, New York, 151-178.
careful ordering of the branches of the tree DERo77 DEROEVEN, W, P. "On backtracking and
of choices may greatly reduce the time greatest fixed points," in Automata, lan-
guages and programming, Lecture Notes
needed for solving a problem. This may be in Computer Science, Vol. 52, Springer-
accomplished by combined efforts in two Verlag, New York, 1977, 412-429.
directions. The firstis people-oriented and DIJK72 DIJKSTRA, E W. "Notes on structured
programming," in Structured program-
consists of providing problem solvers with mmg, O. J. Dahl (Ed.), Academic Press,
"adequate" sets of primitives, allowing New York, 1972, 1-72.
them to program the best ordering for in- FLOY67 FLOYD, R. W. "Nondetermlnistic algo-
rithms," J. ACM 14, 4 (Oct. 1967), 636-
specting the tree. The second is machine- 644
oriented and uses sophisticated optimiza- GOLO65 GOLOMB, S. W., AND BAUMERT, L. D.
tion techniques designed to avoid, if possi- "Backtrack programming," J. ACM 12, 4
(Oct. 1965), 516-524.
ble, fruitless searches, or at least to make GRIS77 GRISWOLD, R. E., AND HANSON, D. R.
them as efficient as possible. Continued "Language facilities for programmable
backtracking," in Proc. Syrup. Arttfic~al
research in these directionsm a y be the only Intelhgence and Programming Lan-
hope to surmount the difficultiesinvolved guages Published in SIGPLAN Not 12,
in solving currently intractable combinato- 8 (Aug 1977), 94-99.
rial problems. HoPc69 HOPCROFT, J E., AND ULLMAN, J. D. For-
mal languages and their relation to au-
tomata, Addison-Wesley Publ. Co., Read-
lng, Mass., 1969.
ACKNOWLEDGMENTS JOHA67 JOHANSEN, P. "Non-deterministic pro-
gramming," B I T 7 (1967), 289-304
Robert Stachel implemented the mlnflanguage de- KNUT75 KNUTH, D. E. "Estimating the efficiency
scribed in Section 2 and tested all the programs pre- of backtrack programs," Math. Comput.
sented in this paper Joel Katcoff read the manuscript 29, 129 (Jan 1975), 121-136.
several times and made numerous suggestions which LEWI78 LEWIS, H R., AND PAPADIMITRIOU, C. H.
"The efficiency of algorithms," Sc~. Am
improved its readability. Gretchen Brown provided (Jan. 1978), 96-109.
valuable help in preparing the final version of the MANN76 MANNA, Z. Mathematical theory of com-
manuscript. The comments and advice gwen by the putatton, McGraw-Hill, New York, 1976.
referees are gratefully acknowledged. McDE74 McDERMOTT, D. V., A N D SUSSMAN, G. J.
The Connwer reference manual, AI
In particular, the author was fortunate to have had Memo 259, M I T Project MAC, Cam-
Robert Sedgewick as one of the referees. His construc- bridge, Mass., J a n 1974.
tive and detailed comments were a source of encour- MONT77 MONTANGERO, C , PACINI, G , AND TUR-
agement for improving the paper. INI, F "Two-level control structure for
nondetermlnlstie programming," Com-
mun ACM 20, 10 (Oct. 1977), 725-730.
REFERENCES MOOR75 MOORE, R. C. Reasoning from incomplete
knowledge m a procedural deductton
AHO76 AHO, A. V., HOPCROFT, J. E., AND ULL- system, AI-TR-347, M I T Artificial Intel-
MAN, J. D. The design and analys~s of ligence Lab., Cambridge, Mass., Dec.
computer algorithms, Addison-Wesley 1975
Publ Co., Reading, Mass., 1976. PREN72 PRENNER, C , SPITZEN, J., AND WEG-
BITN75 BITNER, J. R., AND REINGOLD, E. M. BREIT, B. "An implementation of back-
"Backtrack programming techniques," tracking for programming languages," in
Commun. ACM 18, 11 (Nov 1975), 651- Proc 27th National ACM Conf., 1972,
656. ACM, New York, 763-771
BOER73 BOBROW, D. G , AND WEGBREIT, B. "A SELF75 SELF, J A. "Embedding nondetermin-
model and stack implementation of mul- lsm," Softw. Praet Exper. 5 (1975), 221-
tiple environments," Commun ACM 16, 227.
10 (Oct. 1973), 591-603. SINT76 SINTZOFF, M. "Eliminating blind alleys
BOBR74 BOBROW, D G., AND RAPHAEL, B "New from backtrack programs," Thwd Int.
programming languages for artificial in- Colloquium on Automata, Languages
telligence research," Comput. Surv. 6, 3 and Programming, Lecture Notes m
(Sept 1974), 155-174 Computer Science, Springer-Verlag, 1976,
COHE74 COHEN, J , AND CARTON, E "Non-deter- New York

Computing Surveys, Vol. 11, No 2, June 1979


94 • J. Cohen

SMIT73 SMITH, D. C., AND ENEA, H. J. "Back- Symp. Apphed Mathematws, Vol X,
tracking in MLISP2," in Proc Thtrd Int. American Mathematical Society, Provi-
Conf. Arttfictal Intelligence, 1973, 671- dence, R.I, 1960
685. WIRT76 WIRTH, N. Algorithms + data structures
WALK60 WALKER, R. J. "An enumerative tech- = programs, Prentme-Hall, Inc., Engle-
nique for a class of combinatorial prob- wood Cliffs, N.J., 1976. See also, Commun.
lems," m Combmatortal analysts; Proc. A C M 14, 4 (1971), 221-227.

RECEIVED NOVEMBER 11, 1977,FINAL REVISION ACCEPTED OCTOBER 15, 1978

Computing Surveys, Vol 11, No. 2, June 1979

You might also like