Book 1993
Book 1993
Book 1993
Editor
David Gries
Advisory Board
F.L. Bauer
S.D. Brookes
C.E. Leiserson
F.B. Schneider
M. Sipser
Texts and Monographs in Computer Science
Suad Alagic
Object-Oriented Database Programming
1989. XV, 320 pages, 84 illus.
Suad Alagic
Relational Database Technology
1986. XI, 259 pages, 114 iIIus.
S. Thomas Alexander
Adaptive Signal Processing: Theory and Applications
1986. IX, 179 pages, 42 illus.
Kaare Christian
A Guide to Modula-2
1986. XIX, 436 pages, 46 illus.
Edsger W. Dijkstra
Selected Writings on Computing: A Personal Perspective
1982. XVII, 362 pages, 13 illus.
String-Rewriting
Systems
Ronald V. Book
Friedrich Otto
Springer-Verlag
New York Berlin Heidelberg London Paris
Tokyo Hong Kong Barcelona Budapest
Ronald V. Book Friedrich Otto
Department of Mathematics Fachbereich Mathematikllnformatik
University of California Gesamthochschule Kassel
Santa Barbara, CA 93106 Postfach 10 13 80
USA 3500 Kassel
Germany
Series Editor:
David Gries
Department of Computer Science
Cornell University
Upson Hall
Ithaca, NY 14853
USA
987654321
Preface
The subject of this book is string-rewriting systems. It is generally accepted
that string-rewriting was first introduced by Axel Thue in the early part of
this century. In the 1960's and early 1970's, it received renewed attention
due to interest in formal language theory. In the 1980's and 1990's, it has
received more interest since it can be viewed as a special case of term-
rewriting, a subject that has become important in the study of automated
deduction. Today, string-rewriting is studied by researchers in theoretical
computer science and also by researchers interested in the foundations of
artificial intelligence. A sketch of the way that the subject has developed
is contained in Chapter 0, and the reader is advised to begin with that
chapter.
Both authors have been active in the field and have lectured on the
subject in several universities. Lecture notes have been produced and dis-
tributed. This monograph is a result of revising and rewriting those notes.
It represents an attempt by the authors to present the concepts that the
authors consider to be most fundamental and to gather together the most
useful results in such a way that they can be understood and used in studies
relating to more general rewriting, to automated deduction, and to algo-
rithmic problems of algebraic structures.
This monograph is written for independent study by researchers in the-
oretical computer science or in the foundations of artificial intelligence.
While it has not been written as a textbook, it can be used that way for
a lecture course at the advanced undergraduate/beginning graduate level
(USA interpretation), or as a supplement to a course in rewriting theory
or foundations of artificial intelligence. The authors feel that it is easier for
some students to learn about the concepts (e.g., the word problem, conflu-
ence) in the context of string-rewriting before they meet the same ideas in
the study of term-rewriting. As prerequisites, mastery of the material in
a good course covering automata, formal languages, and computability is
sufficient; an alternative prerequisite might be a course in logic, particularly
computational logic.
The authors' gratitude goes to many. The first author was introduced
to the subject by Maurice Nivat. Jiirgen Avenhaus and Klaus Madlener
greatly influenced the second author's interest in algorithmic problems in
algebra and in rewriting. Much encouragement was given by Deepak Ka-
pur, Robert F. McNaughton, and Paliath Narendran. Over the years the
vi Preface
authors also benefited from many valuable discussions with Giinter Bauer,
Volker Diekert, Matthias Jantzen, Colm O'Dlinlaing, Geraud Senizergues,
and Craig Squier.
Both authors have worked with Celia Wrathall on problems in this area,
and she demanded that we finish this work. It is likely that without her
constant attention and encouragement, the first author would have given
up the whole idea of completing this manuscript.
Leslie Wilson typed some of the lecture notes upon which this monograph
is based, and Frau R. Kohl at Kaiserslautern and Frau E. Djawadi at Kassel
typed several preliminary versions of various chapters of this monograph.
The production of this monograph would not have been completed with-
out the extraordinary efforts of Shilo Brooks. Both of the authors are grate-
ful for her assistance.
Over the period of the first author's work in this area and on this book,
his research was supported in part by grants from the Computer Research
Division of the National Science Foundation. The second author also wants
to express his gratitude to the Deutsche Forschungsgemeinschaft (DFG)
for a grant that gave him the opportunity to spend the 1982/83 academic
year as a postdoctoral researcher at the Department of Mathematics of
the University of California, Santa Barbara. It was there and then that he
met the first author, who introduced him to the field of string-rewriting
systems.
0 Introduction 1
0.1 Historical Development ....... 1
0.2 An Outline of Recent Developments 3
0.3 Contents of the Monograph ..... 6
1 Preliminaries 9
1.1 Abstract Reduction Systems . ........ 9
1.2 Reduction Modulo an Equivalence Relation 15
1.3 Strings, Languages and Automata 22
1.4 Some Turing Machine Constructions 27
1.5 Bibliographic Remarks . ....... 34
2 String-Rewriting Systems 35
2.1 Rewriting Systems for Strings . 35
2.2 Computing Normal Forms . . . 41
2.3 Testing for Local Confluence 50
2.4 The Knuth-Bendix Completion Procedure 52
2.5 Some Undecidable Properties 57
2.6 Bibliographic Remarks . . . . . . . 63
3 Length as the Basis for Reduction 65
3.1 Basic Properties ....... 65
3.2 Testing for Confluence . . . . 68
3.3 Confluence on a Single Class 70
3.4 Equiv.alent Systems . . . . . . 71
3.5 Church-Rosser Congruences. 77
3.6 Other Systems Based on Length 80
3.7 Bibliographic Remarks . . . . . . 88
5 Length-Reducing Non-Monadic
String-Rewriting Systems 113
5.1 Presenting Recursively Enumerable Languages 113
5.2 Some Undecidability Results . . . . . . . . 119
5.3 Some Questions on Congruential Languages 128
5.4 Bibliographic Remarks . . . . . . . . . . . . 130
References 175
Index 184
o
Introduction
0.1 Historical Development
In the early part of the twentieth century, Axel Thue [Thu14) discussed
the following problem: Suppose one has a set of objects and a set of trans-
formations (''rules'') that when applied to these objects yield objects in
the same set. Given two objects x and y in the set, can x be transformed
into y, or is there perhaps a third object z such that both x and y can be
transformed into z?
This problem came to be known as the ''word problem." Thue established
some preliminary results about strings of symbols (that is, elements of a free
monoid), and he suggested that one might be able to extend this approach
to more structured combinatorial objects such as graphs or trees. Indeed,
if Thue were doing this work today, he might have considered a set of data
structures of some particular type as an appropriate set of objects.
Thue wanted to develop a "calculus" to decide the word problem, that
is, a set of procedures or algorithms that could be applied to the given
objects to obtain the correct answer to the question. In modern terminology,
he wanted a general algorithm to solve the word problem in a variety of
different settings.
At approximately the same time, Dehn [Dehll] was working on what
became the underpinnings of combinatorial group theory and he introduced
the word problem for finitely presented groups. It is reasonable to consider
these problems' as part of what was to become "Hilbert's Program."
Apparently Thue's work was ignored for many years, but it did come
to the surface in the 1930's when logicians attempted to provide formal
definitions of notions such as "algorithm" and "effective procedure" (see
[Dav58]). This 'was quite natural since Thue wanted to know whether the
word problem was decidable. It is well known that there can be no calculus
to solve the word problem in its most general form, and that in a number
of specific domains such as finitely presented groups and monoids the word
problem is undecidable.
In the mid-1950's and in the 1960's, the notion of a semi-Thue system
was studied in mathematical linguistics and in formal language theory since
it was very useful in mathematical models for phrase-structure grammars.
These grammars were exhaustively studied in the context of the problem of
machine translation of natural languages. At the same time that increases
in the size of computer memories and in the speed of machine computations
2 O. Introduction
ity") and the inherent computational difficulty of the word problem is not
necessarily true. This is shown by results of Madlener and Otto [MaOt85j
and Bauer and Otto [BaOt84j who showed that there are string-rewriting
systems with the following two properties: (i) the word problems are de-
cidable by means of fast algorithmsj (ii) the derivational complexity is as
great as any given recursive function.
Independent of the development outlined above, Gilman [Gil79] consid-
ered a procedure that, from a finite string-rewriting system, attempts to
construct an equivalent string-rewriting system that is "noetherian" and
confluent, that is, a string-rewriting system such that every congruence
class has a unique "irreducible" string. This procedure appears to be a mod-
ification of the "completion procedure" developed by Knuth and Bendix
[KnBe70j in the setting of term-rewriting systems (however, it appears
that Gilman was unaware of the work of Knuth and Bendix). Later Ka-
pur and Narendran [KaNa85b] showed how the Knuth-Bendix completion
procedure could be adapted to the setting of string-rewriting systems (but
it appears that they in turn were not aware of Gilman's work). As part of
their study, Kapur and Narendran introduced the notion of "reduced" or
"normalized" string-rewriting system, a notion that was independently con-
sidered by Avenhaus and Madlener [AvMa83j in a special context. These
were important steps in the study of string-rewriting systems where reduc-
tion is not based on length but on a more general ordering.
Since a string-rewriting system presents a monoid, there have been a
number of studies investigating questions such as whether a monoid so
presented is in fact a group or whether it is a free monoid or .... In partic-
ular, decision procedures for such questions are of great interest. Related
to this theme is the study of algebraic characterizations of monoids and/or
groups by syntactic characterizations of presentations. There are a num-
ber of intel'esting contributions to this area, such as Otto [Ott85, Ott86bj,
Narendran and Otto [NaOt88a), Gilman [Gil84j, Avenhaus, Madlener, and
Otto [AM086j, Cochet [Coc76j, and Autebert, Boasson, and Senizergues
[ABS87j.
The question of which Thue congruences (the congruences on free monoids
induced by Thue systems) and which monoids admit finite, noetherian, and
confluent string-rewriting systems received much attention. It is known that
there exist finitely generated Thue congruences that cannot be generated
by such systems even though there do exist such systems over a differ-
ent alphabet (set of generators) that do present the same monoid. Thus,
there are finite string-rewriting systems with decidable word problems that
have no "equivalent systems" (that is, systems generating the same Thue
congruence over the original alphabet) that are finite, noetherian, and con-
fluent. Such results were obtained by Kapur and Narendran [KaNa85aj
and by Jantzen [Jan81, Jan85jj in fact, such systems arise in the study of
string-rewriting systems presenting abelian groups [Die86j. More recently, a
surprising result was obtained by Squier [Squ87bj. By establishing the fact
0.2. An Outline of Recent Developments 5
that each monoid that can be presented by some finite, noetherian, and
confluent string-rewriting system satisfies a certain homological finiteness
condition, and by exhibiting examples of finitely presented monoids that
have decidable word problems but do not satisfy this condition, Squier
proved that there exist finitely presented monoids with decidable word
problems that cannot be presented by string-rewriting systems that are
finite, noetherian, and confluent.
In some of these studies, it has been extremely useful to consider sys-
tems that are confluent only on specific congruence classes; examples of
this can be seen in Dehn's work on the word problem and on "small can-
cellation theory." Otto [Ott87] and Otto and Zhang [OtZh91] investigated
such systems and their congruences with emphasis on decision procedures
for certain combinatorial properties. Recently, specialized completion pro-
cedures for such systems have been considered.
One of the properties which appears to be related to that of confluence
of string-rewriting systems is that of "preperfect" systems. This property
arises not only in string-rewriting systems but more generally in term-
rewriting systems, where it corresponds to the notion of "confluence modulo
an equivalence relation" as studied by Jouannaud and Kirchner [JoKi86].
In contrast to the fact that confluence for string-rewriting systems (where
reduction is based on length) is decidable in polynomial time, Narendran
and McNaughton [NaMc84] showed that it is undecidable whether a given
string-rewriting system is preperfect.
While the context of most of the work in string-rewriting has been a
finitely generated free monoid, some very interesting work has been done
when rewriting is carried out in a free partially commutative monoid and a
free partially commutative group (that is, in structures where some but not
all pairs of generators commute). The original motivation for this work was
purely combinatorial [CaFo69], essentially being part of the study of combi-
natorics on words. However, it was shown later that this notion can be used
in modelling certain aspects of parallel computation [Maz77]. It is trivial to
note that the word problem for a finitely generated free monoid is decidable
in linear time. It is known that this property is shared by finitely generated
free partially commutative monoids [BoLi87]. Since a finitely generated free
group can be presented by a finite confluent string-rewriting system where
reduction is based on length, its word problem is again decidable in lin-
ear time. Consider a finitely generated free partially-commutative group;
each such group has a presentation by a finite preperfect string-rewriting
system. Wrathall [Wra88] has shown that once again the word problem is
decidable in linear time. Currently, there is much interest in rewriting in
free partially commutative monoids and groups.
6 O. Introduction
for n > o.
n n-1
(b) -t = - t 0 ---+
(f)
n
~ = ~ 0
n-1
+--+ for n > o.
(g) + =
+--+ Un>o A and~ =
n
Un~O ~.
10 1. Preliminaries
X
/~I Zl
~I Z
Lemma 1.1.10 Let (B, --+) be a reduction system. If --+ is noetherian, then
for every x E B, [xl has a normal form.
01.1.13
x y x y
I
.j .j x'
~y'
~x I
The Church-Rosser property modulo ~ states that the relation == can be
reduced to the equivalence relation ~ by using the reduction relation -.
In fact, under a slight restriction on the reduction relation - the above
two notions coincide.
Lemma 1.2.2 Let S = (B, -) be a reduction system and let ~ be an
equivalence relation on B. Suppose that for every x E B there exists a
normal form y such that x ~ y. Let == = (+-+ U ~) *. Then - is confluent
modulo ~ if and only if the following condition holds: (*) for every x, y E B
and every irreducible u and v, if x == y and x ~ u and y ~ v, then u ~ v.
16 1. Preliminaries
=
Proof. The reader should note that is an equivalence relation since it is
the reflexive, transitive closure of the relation +-t U ~ which is symmetric
(but is not necessarily an equivalence relation). The proof that condition (*)
holds if -4 is confluent modulo ~ follows immediately from the definitions.
For the proof in the other direction, it suffices to notice that if x y, x ~ =
x', and y ~ y', then there exist normal forms u and v such that x' ~ u
and y' ~ v. Hence, from (*) we can conclude that u ~ v. . D1.2.2
Notice that the requirement about normal forms in Lemma 1.2.2 is sat-
isfied if -4 is noetherian.
In certain applications we want to be able to test a system for the prop-
erty of being confluent modulo some specific equivalence relation. This is
a very difficult, if not impossible, task to perform if one attempts to ap-
proach the problem on a global basis. Thus, we introduce a property similar
to "local confluence."
Condition a Condition f3
B, if x -4 y and x
a: for every x, y, z E -4 z, then there exist u, v such
that y ~ u, z ~ v, and u ~ v;
f3: for, every x, y, z E B, if x ~ y and x -4 z, then there exist u, v such
that y ~ u, z ~ v, and u ~ v.
We will prove the following result:
Lemma 1.2.4 Let S = (B, -4) be a reduction system and let ~ be an equiv-
alence relation on B. Suppose that -4 is noetherian. Then -4 is confluent
modulo ~ if and only if it is locally confluent modulo ~.
To prove Lemma 1.2.4 we define a relation::::} on B2 = B x B based on
the reduction -4. Define the following:
(a) (x, y) ::::}a (x', y') if x -4 x' and y = y';
(b) (X,y)::::}b (x',y') if x -4 x' and x -4 y';
1.2. Reduction Modulo an Equivalence Relation 17
,
Case 1:· x ~
Y Y'
I
xl
Xl (13)
1
1 1P(x" x,)
holds
u ~
P(u, v)
holds
v
j
x' ~ U ~ v
x,
-, u, v E IRR(~)
1.2. Reduction Modulo an Equivalence Relation 19
Diagrams continued
P(XloX,)
u
l'
::::: v
~.'j.
:::::
x' :::::
!*
ill
P(w, z)
:::::
!*
Z ::::: y'
x, w, -z, -YI
-I
E IRR(-)
Xl
I (fj) t
/~
a Yl
j ;I"{
~ *t ~yI
1 1
X' U ::::: v w :::::
P(x"x,) 1* P(u,v)
P(t, t) 1* P(w, z) 1r<y"y'f-
x' ::::: it ::::: v ::::: ill ::::: Z ::::: y'
-I
x, it, v, ill, Z, y' E IRR(-)
01.2.4
There is one additional technical tool that is most easily discussed in the
abstract setting. Instead of dealing with an equivalence relation :::::, we wish
to restrict attention to a symmetric relation, say H ' such that ::::: is the
transitive, reflexive closure of H . This will be useful in Section 3.6 when
we consider the congruence relation on the free monoid that is generated
by a given relation that is finite but symmetric.
We will prove the following result.
Condition "/
only if properties a and "/ are satisfied, where property (,,/) is defined as
follows:
"/: for all w, x, y, if w H x and w - y, then there exist u, v such that
x-u,* y-v,* andu~v.
If x ~ y, then define 6(x, y) as the least k such that x f-!1 y, where f-!1
denotes k applications of H.
To prove Lemma 1.2.5 we define a relation I--t on B2 based on the reduc-
tion '* on B2 and the equivalence relation ~. Define the following:
(x,y) I--t (x',y') if either (i) (x,y) '*
(x',y') or (li) x ~ y ~ x' ~ y' and
6(x,y) > 6(x',y').
Since the range of 6 is included in the set of natural numbers, it is easy
to see that there can be no infinite chain of applications of the relation
I--t which are based only on part (ii) of the definition. Thus, we see that if
,
Case 1: x =
u
/ (n)
y\
v
j ;I ~
x' w z y'
1 1 I-
~
P(u,u) I- P(w,z)
P(v,v)
x' ~ w ~ z ~ fj'
Case 2:
j
x
!
u
"
C'Y)
H
1
v ~
Y\
IY'
P(v,y)
1
x' w ~ z
I·
x' ~ w ~ Z ~ fj'
01.2.5
22 1. Preliminaries
8(q, e) = {q},
8(q, wa) = UpE 6(q,w)8(p, a).
8(q, e) = q,
8(q,wa) = 8(8(q,w),a).
that the class of regular languages is closed under various operations like
intersection and complementation. Also they allow one to solve various
decision problems efficiently for this class of languages.
Theorem 1.3.4 Each of the following problems is decidable:
Instance: A deterministic or nondeterministic finite-state acceptor V
(a) The membership problem: for a string x, is x a member of
L(V) ?
(b) The emptiness problem: is L(V) empty?
(c) The finiteness problem: is L(V) finite?
The membership problem is decidable in linear time (linear in Ix!), the
emptiness problem is decidable in quadratic time (quadratic in the size of
V, that is, the length of the string of symbols that specifies V), and the
finiteness problem is decidable in cubic time (cubic in the size of V).
Another class of languages that will be needed is the class of context-
free languages. Usually context-free languages are specified by "context-free
grammars," that is, a generating device, but they can also be characterized
through "pushdown automata," that is, an accepting device. Here we will
only be interested in the latter; therefore, we only restate this characteri-
zation.
Definition 1.3.5
(a) A pushdown automaton (pda) A is specified by a 7-tuple A =
(Q,E,r,8, qo,#,F), where
Q is a finite set of states,
E is a finite alphabet, the input alphabet,
r is a finite alphabet, the stack alphabet,
8: Q x (E U {e}) x r _ 2Qxr * is the transition /unction, where
8( q, a, b) is a finite set for each q E Q, a E E U {e }, and b E r,
qo E Q is the initial state,
# E r is the bottom marker of A 's stack, and
F s:;; Q is the set of final (or accepting) states.
The symbol # cannot be generated by A, that is, if q E Q, a E Eu {e},
bE r, and (p,z) E 8(q,a,b), then Izl# = 0 or z E {#}(r - {#})*
and b= #.
(b) A configuration of A is a triple (q,u,v), where q E Q, u E E*,
and v E ({#}(r - {#}) .. ) U {e}. The pda A induces a single-step
computation relation I-A on the set of configurations.
1.3. Strings, Languages and Automata 25
The reflexive and transitive closure f--* A of this relation is called the
computation relation induced by A. If (q, u, v) f--* A (p, x, y), then
(p,x,y) is a successor configuration of (q,u,v).
(c) A string w E E* is accepted by A if there exist a final state p E F and
a string z E r* such that the final configuration (p, e, z) is a suc-
cessor of the initial configuration (qO, w, #), that is, (qo, w, #) f--* A
(p,e,z). The language L(A) := {w E E* I w is accepted by A} is
called the language accepted by A.
The pushdown automaton is obtained from the nondeterministic finite
state acceptor by adding a stack (or pushdown store) as a storage device.
Definition 1.3.6 A language L ~ E* is context-free if there exists a pda
A = (Q, E, r, 8, qo, #, F) that accepts exactly the language L.
The languages L1 := {anb n I n ~ O} and L2 := {ww R I wE {a,b,c}*}
are typical examples of context-free languages, while L3 := {anbncn n ~ I
O} is not context-free.
Definition 1.3.7 A pda A = (Q, E,r,8,qo,#,F) is deterministic if the
following two conditions are satisfied:
(i)VqEQ VaEEU{e} VbEr: 18(q,a,b)1 s:; 1, and
(ii) Vq E Q Va E E Vb E r: if8(q,e,b) =I: 0, then 8(q, a, b) = 0.
Thus, if A isa deterministic pushdown automaton (dpda), then the in-
duced single-step computation relation f--* A is a partial function.
Definition 1.3.8 A language L ~ E* is deterministic context-free if
there exists a dpda A = (Q,E,r,8,qo,#,F) that accepts exactly the lan-
guage L.
The languages L1 := {anbn I n ~ O} and L 4 := {wdw R I wE {a,b,c}*}
are typical examples of deterministic context-free languages, while L2 :=
{ww R I wE {a,b,c}OO} is context-free but is not deterministic context-free.
To capture the notions of recursive and recursively enumerable languages
(that is, languages for which the membership problem is effectively decid-
able and languages that can be effectively enumerated) we consider a more
general type of automaton, the Turing machine. Finite state acceptors and
pushdown automata are restricted versions of Turing machines.
Definition 1.3.9
(a) A Turing machine (TM) M is given through a 5-tuple M =
(Q,E,8, qO,qa), where
26 1. Preliminaries
Definition 1.3.10
(a) A language L ~ E* is recursive if there exists a T M that recognizes
this language.
(b) A language L ~ E* is recursively enumerable if there exists a T M
that accepts L.
1.4. Some Turing Machine Constructions 27
the leftmost cell containing a head marker 1\. To simulate a single step of
M, N sweeps right, visiting each of the cells containing a head marker 1\
and recording the symbols scanned by M in its finite control. After having
seen all head markers N "knows" the step M will perform next. Now N
makes a pass left until it reaches the leftmost head marker 1\. As N passes
each head marker, it updates the tape symbol of M that is scanned by
the corresponding tape head, or it moves the head marker one symbol left
or right to simulate the move of M. Finally, N changes the state of M
recorded in its finite control to complete the simulation of one step of M.
If the new state of M is the halting state of M, then N also enters its
halting state.
Formally, the single-tape Turing machine N is obtained from M by
choosing the tape alphabet r := ~b U (~b x {>, 1\, <})k and a suffi-
ciently large set of states Q(N) and by defining the transition function
8(N) accordingly. We will not go into the technical details. D1.4.2
Next consider the notion of "immortal" configurations of Turing ma-
chines.
Definition 1.4.3 Let M = (Q,~,8,qO,qa) be a (single-tape) Turing ma-
chine. A configuration uqv (u, v E ~b' q E (Q - {qa})) is called im-
mortal if there does not exist a halting configuration ulqavl such that
*
uqv I--MUI qa VI, that is, if the Turing machine M starting from the config-
uration uqv will not halt.
If the language L(M) is a proper subset of ~*, then there exist initial
coniigurations· qow that are immortal, since qow is immortal if and only
if w ¢ L(M). However, even if L(M) is all of ~*, that is, if M halts on
all inputs, there may exist immortal configurations for M, which of course
cannot be initial. This means that in general we must distinguish between
the following two variants of the halting problem for Turing machines.
Definition 1.4.4
(a) The (special) halting problem for M = (Q,~,8,qo,qa) is the
following:
Instance: A string w E ~* •
Question: Does M halt on input w, that is, is the initial config-
uration qow mortal?
30 1. Preliminaries
Start:
b ... b
b w b b b
b ... b
11 b ... b
t
Loop:
w w
b ... b w
b b b b
b ... b 1 .. 1 b ... b
End:
b ... w b ... b
u
b b b u b
b .. .t 1 ... 1 b .. b ... b
Tracks 1, 3 and 4 are erased, and only the contents of track 2, which is
a string from Eb, is left on the tape. Then N enters its halting state qr,P.
If all these steps of N are designed carefully, then N has the following
properties:
(i) N accepts the language L U (Ei - E*), that is, L(N) n E* = L(M).
32 1. Preliminaries
The first two statements express the fact that on ~*, M and N have
the same input-output behavior. Statement (iii) implies that the general
halting problem for N reduces to the special halting problem for M. In
particular, it shows that N has an immortal configuration if and only if
it has an immortal initial configuration. We summarize the result of the
above consideration as follows.
Theorem 1.4.5 Given a Turing machine M = (Q,~,6,qo,qa), a Turing
machine N can be constructed such that M and N have the same input-
output behavior on ~*, and the general halting problem for N is equivalent
to its special halting problem.
This completes our consideration of the general Turing machine model. In
the remainder of this section we will deal with certain restricted variants
of the Turing machine. First we will state the definition of the linearly
bounded automaton (LBA), which is a nondeterministic Turing machine
satisfying a strict space bound. Then we will discuss a technicality regarding
pushdown automata.
Definition 1.4.6 A linearly bounded automaton (LBA) is a single-
tape Turing machine M = (Q,~, 6, qo, qa) satisfying the following condi-
tions:
(a) The input alphabet ~ includes two special symbols $ and £, called
left and right endmarkers, respectively.
(b) M cannot print another symbol over $ or £. Further, whenever M
sees the symbol $ (£) on its tape, then it cannot move its tape head
to the left {right}.
(c) M is nondeterministic, that is, the transition function 6 associates
with each pair (q,a) E (Q - {qa}) x ~b a finite set of pairs from
Q x (~b U {R,L}).
Because of its nondeterminism M may have several possible moves that
it can make from some configuration. The computation relation f-* M of M
can easily be adopted to this situation.
Definition 1.4.7 Let M = (Q,~,6,qO,qa) be an LBA.
(a) The language L(M) accepted by M is defined to be L(M) .-
{w E (~ - {$, £})* I qo$w£ f-* M uqav for some u, v E ~n.
1.4. Some Turing Machine Constructions 33
inputs of the form w$ with w E ~*. Then the test "Is the input empty?" is
realized by the test "Is the actual input only the symbol $?" , which is easily
incorporated into the transition function of a pushdown automaton. With
this adjustment, our proof shows that the language L·{$} is (deterministic)
context-free. However, as it turns out we can even avoid this end marker.
Definition 1.4.9 Let L11 L2 ~ ~* be two languages. The quotient of L1
with respect to L 2, denoted by L1/ L 2, is the language
Proof. Let S = (Xb Yl), (X2' Y2), . .. , (xn' Yn) be a sequence of ordered
pairs of strings over ~. Let 0,1, A, B, C be five different symbols that
are not in ~. Let Rs be the string-rewriting system on the alphabet ~ U
{O, 1, A, B, C} with the following set Rl U R2 of rules where Rl =
{(A, xiAOi1), (xiAOi1, x i CCOi 1) I 1 ~ i ~ n} and R2 = {(B, YiBOi1),
(YiBOi1, YiCCOi1) 11 ~ i ~ n}.
Consider the two strings (of length one) A and B. Suppose that A ~ B.
Then it is clear that the only way this can happen is if there exist strings
u,v such that u E ~* and v E {0,1}* where by using rules in R l , A ~
40 2. String-Rewriting Systems
uAv +-+ uCCv, and by using rules in R2, B ~ uBv +-+ uCCv. By factoring
v it is clear that there must exist a sequence i l , i2, ... ,ik E {I, ... , n} such
that v = Oi" I ... Oil 1. This means that uCCOi" I ... Oil I +-+ uAv ~ A so
that u = Xil ... Xi". Since B ~ uBv +-+ uCCv by using the rules in R2,
we conclude that Xil ... Xi" = Yil ... Yi". Hence, il, i2, ... ,ik is a solution
to the Correspondence Problem for S.
In a similar way we see that if ib i 2, ... , ik is a solution to the Cor-
respondence Problem for S, then there exist u, v E E* and w E {O, l}*
such that A ~ uAw +-+ uCCw and B ~ vBw +-+ vCCw, where
w = Ii" I ..• Oil 1. This means that u = Xil ..• Xi" and v = Yi l ••• Yi". Since
ib i 2, ... ,ik is a solution to the Correspondence Problem for S, this means
that Xil •.. Xi" = Yil ... Yi" so that u = v. Thus, A ~ uAw +-+ uCCw =
vCCw +-+ vBw ~ B so that A ~ B.
Hence, we see that A ~ B if and only if there is a solution to the
Correspondence Problem for S. IT the problem (as given in the statement
of the theorem) were decidable, then the Correspondence Problem would
be decidable, contradicting the result of Post. 02.1.4
The proof of Theorem 2.1.4 yields two additional results. Notice that the
strings A and B have a common descendant with respect to Rl U R2 if
and only if there is a solution to the Correspondence Problem for S. When
reversing the direction of the rewrite rules (that is, (u, v) becomes (v, u) ),
then the resulting rewriting system is such that the strings A and B have
a common ancestor if and only if there is a solution to the Correspondence
Problem for S.
Corollary 2.1.5 Each of the following problems is undecidable:
Instance: A finite rewriting system R and two strings Zl, Z2 on the
alphabet of R;
Question 1: Do Zl and Z2 have a common ancestor?
Question 2: Do Zl and Z2 have a common descendant?
Hence, 'we see that the uniform word problem, common ancestor problem,
and common descendant problem are undecidable for finite string-rewriting
systems.
In fact, a stronger result can be obtained. Using the fact that the halting
problem for Turing machines is undecidable, one can show that there is a
specific finite string-rewriting system with the property that the word prob-
lem, the common descendant problem, and the common ancestor problem
are undecidable (see Section 2.5).
Later in this chapter it will be shown that other simply stated questions
are also undecidable for finite string-rewriting systems.
2.2. Computing Normal Forms 41
The length ordering and the weight ordering are obviously well-founded.
Since there are only finitely many strings of any given length or weight, the
length-lexicographical ordering and the weight-lexicographical ordering are
well-orderings. However, if n > 1 (that is, E contains more than one letter),
then the lexicographical ordering >lex is not well-founded since we have the
following. infinite descending chain:
Proof. Let R' be any subset of R with the properties that dom(R') =
dom(R) and for each u E dom(R) there exists exactly one v E range(R)
with (u, v) E R'. To be precise, construct R' by choosing the lexicographi-
cally smallest v' with (u,v') E R. Then IRR(R') = IRR(R) and for every
x E ~* there is a unique irreducible x such that x ~ R' x. The choice of R'
does not depend on w and so we will assume that R' has been determined
by preprocessing. Let t = max{lul, Ivll (u, v) E R'}; recall that R (hence,
2.2. Computing Normal Forms 45
(i) READ. M attempts to read a new symbol from Store 2, popping that
symbol from Store 2 and pushing that symbol onto the top of Store
1. If M is able to read such a symbol, then it performs the SEARCH
operation. If M is not able to read such a symbol, then M halts.
(ii) SEARCH. M reads the top t symbols from Store 1 and determines
whether there exists a string u stored on the top lui squares of Store 1
such that there exists v, (u, v) E R'. If at least one such u exists, then
M chooses the longest such u, remembers (u, v), and performs the
REWRITE operation; in this case, we say that SEARCH "succeeds."
Otherwise, we say that SEARCH "fails;" in this case, M restores the
top t symbols of Store 1 and performs the READ operation.
(iii) REWRITE. Having remembered the rewrite rule (u, v), M pops the
string u from the top of Store 1 and pushes the string v onto the top
Ivl squares of Store 2 so that the leftmost symbol of v is on the top
of Store 2. Then M performs the READ operation.
and that is equivalent to R. For the first stage of this construction, we need
the following lemma.
Lemma 2.2.11 Let> be an admissible well-ordering on E*, and let R be
a string-rewriting system on E that is compatible with>. For each w E E*,
let 'Ii! denote some irreducible descendant of w. Then the string-rewriting
system Ro := {t' --+ f I (.t' --+ 1') E R} is equivalent to R, is compatible with
>, and range(Ro) ~ IRR(Ro). In addition, if R is confluent, then so is
Ro.
begin R1 +- R;
reduce the right-hand sides of the rules of R1 by the
algorithm REDUCE;
(Comment: By Lemma 2.2.11 the resulting system R1 is
equivalent to R, it is compatible with >, and range(R1) ~
IRR(R 1).)
while 3(l1,r1), (.t'2,r2) E R 13x, y E E*: 12 = xl1Y and
(xy =J e or 1'2 > 1'1) do
begin R1 +- R1 - {l2 --+ r2};
48 2. String-Rewriting Systems
• the complexity of the ordering >, that is, given two strings x, Y E r;*,
how hard is it to verify whether x > Y holds,
• the order in which the rules (£}, Tl), (£2, T2) E Rl are chosen in the
while-loop, and
Proof. Assume that RI and R2 are equivalent, but that they are not
identical, and let (i, r) E (RI - R 2) U (R2 - RI). From all the rules in the
symmetric difference of RI and R2 let the rule (i,r) be chosen in such a
way that Iii is minimum. We assume that (i,r) E Rl, the other case being
symmetric. Then r E IRR(RI), since Rl is normalized, and so w > r for
all w E ,[r]R1 , W ::I r, since RI is confluent and compatible with >. The
systems RI and R2 are equivalent. Thus [r]Rl = [r]R2' and since R2 is
also confluent and compatible with >, this means that W ~R2 r for all
W E [r]R 1 • In particular, i ~R2 r. Since (i,r) fj. R 2 , we see that either
Proof. 1£ Procedure 2.4.1 terminates on input (R, », then R* has all the
required properties according to Theorem 2.4.2.
Conversely, let us assume that there exists a finite confluent string-re-
writing system R' on ~ such that
• Rand R' are equivalent, and
• f > r for each rule (f,r) E R'.
Let R* = Ui>O Rt, be the string-rewriting system on ~ that Procedure 2.4.1
enumerates on input (R, ». Then R and R* are equivalent, R* is confluent,
and f > r for each rule (f, r) E R*.
Let (f,r) E R'. Then f ~R* r. By the remark preceding Theorem
2.2.14, we may assume without loss of generality that R' is reduced. Then
r E IRR(R'), and since R' is based on >, this means that u > r for each
u E [rlR, u =f r. Thus, we have f ~R. r. Hence, there exists a finite subset
T C; R* such that f ~T r for all (f, r) E R'. Since R* = Ui;?:O Rt" this
2.4. The Knuth-Bendix Completion Procedure 55
means that there is an index i ~ 0 such that l ~ Ro r for all (l, r) E R', and
so -+R' ~ ~Ro· Using R' each word u E E* can be reduced to the minimal
element in its class (with respect to », and hence, using R; each word u
can be reduced to the minimal element in its class. Thus, R; is confluent,
and therefore Procedure 2.4.1 terminates on input (R, ». 0 2.4.4
Examples 2.4.5
R·,
{(b, ac), (eb, an, since b +- aab -+ ac, and eb +- abb -+ ai
{a 2 -+ e, b2 -+ e, ab -+ C, ac -+ b,eb -+ a}i
0, since all critical pairs of Rl resolve:
Thus, R* = R1•
(b) Let E = {a, a, b, b}, and let
Ro = {aa - e, aa - e, bb - e, bb - e, ba - ab,
ba - ab, ab - ba, ab - ba}j
CPo = {(a, bab), (a, bab)}, since a +-- bba - bab and
a +-- boo - babj
Proof. For Wl,W2 E 0*, if Wl ~S(A) W2, then IWlip + IWllp1 ::; IW21p +
IW2IPl. Since Ihbnulqlvlbmhlp + Ihbnulqlvlbmhlpl = 0, we see that during
the reduction sequence in (b) only rules of the form (1) to (8) are applied.
Since these rules simulate the effect of the transition function 6, the above
two statements are equivalent. 0 2.5.2
Also from the definition of SeA) the following lemma can be derived
easily.
Lemma 2.5.3 Let W E 0*. Then W ~ S(A) P if and only if one of the
following three conditions is satisfied:
(i) W = p, or
Proof. Obviously, conditions (i) to (iii) are sufficient. On the other hand,
if W ~ S(A) p, and W =f p, then w is of the form w = huqvh for some strings
u, v E Eb and q E QU{Pl}.1f q =f Pl, then huqvh describes the configuration
uqv of A. In order to reduce w = huqvh to p, the rule qa --T PI must be
used, that is, there exist Ul, Vl E Eb such that huqvh ~S(A) hUlqavIh.
Since UlqaVI is a final configuration of A, we see that A reaches a final
configuration when it is started in configuration uqv. 0 2.5.3
(b) W ~S(A) p.
Proof. We must verify that (b) implies (a). So let W E 0* such that
W ~S(A) p. From the form of the rules of S(A), we conclude that either
W = P or that W = huqvh for some u, vEE;; and q E Q U {pd. If W = p,
or if W = huqvh for some u, vEE;; and q E {qa,PI}, then obviously
W ~S(A) p. Therefore, let W = huqvh for some u, VEE;; and q E Q - {qa},
and let W = huqvh = Wo f-+S(A) WI f-+S(A) W2 f-+S(A) ..• f-+S(A) Wk = P
be a shortest transformation from W to p. Since hPI h - P is the only rule
of S(A) containing an occurrence of the symbol p, we have Wk-l = hplh.
Let i be the smallest index such that Wi contains an occurrence of Pl.
Then Wi = hUiPIVih and Wi-l = hUiqavih for some Ui, Vi E E;;. Obviously,
Wi-l ~S(A) p. Thus, it remains to show that W ~S(A) Wi-I'
The system S( A) has been constructed from the Turing machine A, the
final state of which is qa' Thus, whenever A enters this state, it halts.
Therefore, qa - PI is the only rule of S(A) that contains an occurrence of
qa on its left-hand side. According to the choice of i the symbol PI does
not occur in Wo, Wb W2,·.·, Wi-I, and so Wi-2 -S(A) Wi-I.
Let j be the largest index such that W ~S(A) Wj +-S(A) Wj+l -S(A)
Wj+2 ~S(A) 'l.Qi-l. If no such index exists, then W ~S(A) Wi-I, and we
are done. So assume that j E {a, 1, ... ,i - 3}. The string Wj+! has the
form Wj+! = hUj+lqrVj+!h for some Uj+l, Vj+l E E;; and qr E Q - {qa},
that is, Wj+l encodes the configuration Uj+!qrVj+! of A. Hence, Wj and
Wj+2 both describe the unique successor configuration of Uj+!qrVj+!, and
therefore, Wj = Wj+2. Deleting the steps Wj +-S(A) Wj+l -S(A) Wj+2 = Wj
we obtain a shorter transformation from W to p, thus contradicting our
choice of W f-+S(A) WI f-+S(A) ... f-+S(A) Wk = p. Hence, this sequence is
actually a reduction sequence, that is, W ~ S(A) p. D 2.5.4
Thus Corollary 2.5.4 can be restated as follows.
Corollary 2.5.8 Let W E E*. Then hqowh ~S(A) P if and only if W E
L(A).
60 2. String-Rewriting Systems
Proof. Let R = {ani -+ ami I i = 1,2, ... ,k}. Without loss of generality
°
we may assume that ni > mi ;::: for i = 1,2, ... ,k. Let m:= min{mi I
i = 1,2, ... , k}. Then [an]R = {an} for all n E {O, 1, ... , m - I}. Further,
let t := gcd(nl - ml, ... , nk - mk). Then, for all integers l and r such that
l ;::: r ;::: 0, the following claim holds.
Claim. at ~R aT if and only if l =r or [l, r ;::: m and t divides (l- r)].
Proof. It is easily seen that this condition is necessary for at ~ R aT to
hold. To prove that it is also sufficient it is enough to observe that there
exist integers jl,'" ,jk E Z such that Ei=l, ... ,k ji(ni - mi) = t. 0 Claim.
Since m and t can easily be obtained from R, the above condition is
decidable. Therefore, the word problem for R is decidable. 02.5.10
What is the least cardinality of an alphabet E such that a finite string-
rewriting system R with an undecidable word problem exists on E? To
answer this question we make use of the following construction.
Let E = {aI, a2,"" an} be a finite alphabet of cardinality n ;::: 2, and
let r = {Sl, S2} be an alphabet of cardinality 2. We define an encoding cp :
E* -+ r* through ai 1-+ SlS~SlS~n+l-i for all i = 1,2, ... , n. Then Icp(ai) I =
2n + 3 for all i, and for i, j E {I, 2, ... , n}, if cp(ai) = uv and cp(aj) = vw
for some v ¥- e, then u = e = w, and therefore i = j. This means that
there are no non-trivial overlaps between the strings cp( al), ... , cp( an). For
a string-rewriting system R on E, let Rep denote the following system on
r: Rep := {cp(l) -+ cp(r) I (l-+ r) E R}. Now it is straightforward to check
the following.
Lemma'2.5.11 For all strings u, v E E*,u ~R V if and only if
cp(u) ~R<p cp(v).
Theorem 2.5.9 thus implies the following result.
Theorem 2.5.12 Let E be an alphabet of cardinality at least two. Then
there exists a finite string-rewriting system R on E such that the word
problem for R is undecidable.
We conclude our collection of undecidable problems for string-rewriting
systems with the following three decision problems.
Noetherian System:
Instance: A finite string-rewriting system R on E.
2.5. Some Undecidable Properties 61
Question: Is R noetherian?
Local Confluence:
Instance: A finite string-rewriting system R on~.
Question: Is R confluent?
Theorem 2.5.13 The problem "Noetherian system" is undecidable in gen-
eral.
Proof. (At this point the reader may wish to review Definitions 1.4.1
and 1.4.3). Let M = (Q,~,6,qO,qa) be a Turing machine on ~. We may
assume that M has an immortal configuration, that is, a configuration
from which it cannot reach a final configuration, if and only if it has an
immortal initial configuration. Now M is being simulated by a finite string-
rewriting system. Let ~ = {so, S1, ... , sn}, where So is the blank symbol,
let ~' = {so, s~, ... ,s~} be an alphabet in 1-t~ 1 correspondence with ~
such that ~ n ~' = 0, and let h, hi, q be three additional symbols. We define
a string-rewriting system R on the alphabet n := ~ U ~' U Q U {h, hi, q} as
follows:
(a) rules to simulate the Turing machine M:
---
qiSp -4 q;s£ if 6(qi'Sp) = (q;,s£),
qih q;s£h if 6(qi'SO) = (q;, Sf),
qiSp I
spqj if 6(% sp) = (qj, R),
qih soqjh if 6(% so) = (qj,R),
--
I
s~qiSp -4 qjS£Sp if 6(qi'Sp) = (q;,L) }
s£qih q;s£h if 6(qi,SO) = (qj,L) for f = 0, 1, ... ,n,
h'qiSp
h'qih
- hi q;sosp
h'qjsoh
if
if
6(qi'Sp) =
6(% so) =
} for f = 0, 1, ... , n,
62 2. String-Rewriting Systems
generality that the initial state qo does not occur on the right-hand side of
any transition, that is, after executing the first step in any computation M
never gets back to state qo. As before let n = E U E' U Q U {h, h', q}, and let
R be defined as in the proof of Theorem 2.5.13. Then the left-hand sides of
the rules of R do not overlap. Finally, for w E E*, let Rw := RU {h' qowh -+
q}. Then Rw is effectively constructible from w. Rw has a single critical
pair only, which results from overlapping the rule h' qowh -+ q with the
appropriate rule of R. This critical pair resolves if and only if M halts
on input w. Thus, Rw is locally confluent if and only if w E L(M), and
hence, the problem "Local confluence" is undecidable. Since L(M) is non-
recursive M does not halt on all inputs. Therefore, Rw is not noetherian
for any w E E*.
If Rw is confluent, then it is locally confluent, and so w E L(M). On
the other hand, if w E L(M), then Rw is locally confluent. Since Rw is
not noetherian, Theorem 1.1.13 does not apply. However, from the form
of the rules of Rw we can conclude nevertheless that Rw is confluent. The
reason is that the only non-trivial situation of the form Ul +-RUI V -+ RUI U2
involves an application of the rule h' qowh -+ q. If v = hi qowh, then Ul = q
is irreducible, and U2 ~ RUI q. Since each word can be factored as detailed in
the proof of Theorem 2.5.13, it suffices to look at strings that have a single
syllable only. Thus, the problem "confluence" is undecidable. D2.5.14
(2) RT is confluent, and for every rule (u, v) E ST, u and v have a
common descendant mod --+ RT •
confluence
of
RT
Y2_________ RT
.~Y3
1fT satisfies one (and therefore both) of the statements of Theorem 3.1.2
then the subsystem RT is equivalent to T, that is, we can simply delete the
length-preserving rules from T in this situation. Because of this fact, we
restrict our attention for the rest of this section to finite string-rewriting
systems T that only contain length-reducing rules, that is, we identify T
with its subsystem R T • We will show that if T is a finite string-rewriting
system that is length-reducing and confluent, then there is a linear-time
algorithm to solve the word problem for T. To accomplish this we turn to
Theorem 2.2.9 and its proof.
Let T be a finite length-reducing string-rewriting system on ~. Let x E
~* be taken arbitrarily. If x is not irreducible, then there is some sequence
of descendants x = xo, Xl, ... ,xn , where for each i, 1 $ i $ n, Xi-l -tT Xi,
and Xn is irreducible. Since T contains length-reducing rules only, in any
such sequence of applications of reduction steps, each application decreases
the length of the actual string by at least one. Hence, it is the case that
n $ Ix!- .
We are especially interested in the case of leftmost reduction as im-
plemented in the algorithm REDUCE described in the proof of Theorem
2.2.9. The fact that any chain of reduction steps applied to a string X
has length at most Ixi implies that there can be at most Ixl steps where
SEARCH finds the left-hand side u of a rule (u,v) on store 1, pops u
from store 1, and pushes v onto the top of store 2. Each occurrence of
SEARCH takes at most tl steps to search for u and, if successful, at most
t2 steps to push v onto store 2. Here h := max{lul I u E dom(T)} and
t2 := max{lvll v E range(T)}. Since T is length-reducing, we have t2 < tll
so that 2· tl steps are sufficient. An occurrence of READ takes unit time.
Thus, at most Ixl + t21xl $ tl 'Ixl iterations of the READ-SEARCH-cycle
68 3. Length as the Basis for Reduction
take place, where SEARCH is at most Ixl times successful, and unsuccessful
in all other iterations. Hence, even a naive implementation will only have
running time at most tl 'Ixl' tl + Ixl· t2 = (t~ + t2) 'Ixl on input x.
This argument shows that for any finite length-reducing string-rewriting
system T there is a constant k such that the algorithm REDUCE takes at
most k 'Ixl steps on any input x. The reader should keep in mind that this
analysis is based on the notion of length as the basis for reduction.
We will use this fact several times and so we state it formally.
Lemma 3.1.3 Let T be a finite length-reducing string-rewriting system on
alphabet E. There is a linear-time algorithm that on input x E E* will
compute an irreducible string x such that x ~T x.
Now we can prove the result stated above regarding a linear-time algo-
rithm t@ solve the word problem for a finite string-rewriting system that is
length-reducing and confluent.
Theorem 3.1.4 Let T be a finite length-reducing string-rewriting system.
1fT is confluent, then there is a linear-time algorithm for the word problem
forT.
Proof. The argument is essentially that given in Section 2.2 that results
in Theorem 2.2.9. Given x and y, use REDUCE to compute the unique
irreducible strings x and y such that x ~ x and y ~ Yi by Lemma 3.1.3
only O(lxyl) steps are needed. Compare x and y to determine whether x
and yare equali this can be done in O(lxyl) steps. Since x ~ y if and
only if x = y, only O(lxyl) steps are needed to determine whether x ~ y.
D3.1.4
Let T be a finite string-rewriting system that cont,ains length-reducing as
well as length-preserving rules. Theorems 3.1.2 and 3.1.4 show that there is
a linear-time algorithm for the word problem for T, if the subsystem RT is
confluent, and if, for every length-preserving rule (u, v) E T, u and v have
a common descendant mod - RT'
input (T, » if and only if there exists a finite confluent system T' that
is equivalent to T, and that is compatible with >. However, we did not
discuss the question of whether, given T and >, it is decidable that such a
system T' exists.
Here we will prove that in general this problem is undecidable. In fact,
we will present an undecidability result which will imply the undecidability
of the above problem as well as many additional undecidability results for
finite string-rewriting systems. Before establishing these results we develop
a decidability result for some restricted string-rewriting systems.
Definition 3.4.1 A string-rewriting system T is special if (u, v) E T
implies v = e. A special system T is homogenous of degree k, k > 1
an integer, if (u, e) E T implies lui = k, and is homogenous if it is
homogenous of degree k for some k.
Theorem 3.4.2 Let T be a string-rewriting system that is homogeneous.
There is a length-reducing and confluent string-rewriting system that is
equivalent to T if and only if T itself is confluent.
(ii) U ~R v, and h is an embedding from R into R,.,v, that is, for all
x,y E E*, x ~R Y if and only if h(x) ~Ru,,, h(y).
e is not applied during this derivation. Since x E E*, this means that
there exist an index q E {O, 1 ... ,p - 1} and strings Wl. Zl E r* such
that Xq = WIZI +--+Rl wlcudzl = X q+1. WI +--+R * 1 W, U +--+R
* 1 v, and
Zl ~Rl z. Since u,v E E*, Claim 1 induces u ~R v, thus contradicting
our assumption U;C-+R v. Hence, each derivation of minimum length of y
from x in Ru,v only contains applications of rules of R I • 0 Claim 2.
03.4.6
Lemma 3.4.6 is the technical tool needed to establish a "meta-theorem"
regarding undecidable properties of finite string-rewriting systems.
Theorem 3.4.7 Let P be a property that finite string-rewriting systems
mayor may not have, such that P satisfies the following three conditions:
(1) If RI and R2 are finite string-rewriting systems that are equivalent,
then peRl) implies P(R2 ).
(2) Each trivial string-rewriting-system R has property P.
(3) Each finite string-rewriting system R with property P has a decidable
word problem.
Then the following problem is undecidable in general:
Instance: A finite string-rewriting system R.
Question: Does R have property P if
Proof. Let S = {(u,v) I u, v E E*, lui ~ lvi, and u '" v}, and let
R = {(u, v) E S I lui > Ivl}. If R is confluent and if Rand S are equivalent,
then '" is obviously a Church-Rosser congruence, since it is easily seen that
'" = ~ s holds.
78 3. Length as the Basis for Reduction
Proof. Our proof depends on the well-known fact that there is a finitely
presented group with an undecidable word problem. We will show that for
every finitely presented group G, one can effectively construct from a finite
presentation of G a finite system T such that the word problem for G is
effectively reducible to the question of minimality with respect to ~T'
The construction of T from a finite presentation of G is just the standard
construction of a string-rewriting system T to present G as a quotient
monoid. Let G be given through the group-presentation (r; L), that is,
r is a finite alphabet, r is another alphabet disjoint from r but in one-
to-one correspondence with r, and L ~ (r U I') * . We take ~ = r U rand
T = {(w, e) I w E L}U{(aa, e), (aa, e) I a E n. Then G is isomorphic to the
factor monoid ~* !-+T. Let -1 : ~* -+ ~* denote a function that associates
80 3. Length as the Basis for Reduction
Proof. Combining Lemma 3.6.2 and the argument given above, it is easy
to see that the word problem for a finite almost-confluent system T can
be reduced to the word problem for irreducible strings of the same length
82 3. Length as the Basis for Reduction
where only length-preserving rules are used, that is, the word problem for
strings in IRR(RT) using the relation ~. This reduction is carried out
by applying the algorithm REDUCE and so can be performed in linear
time and, hence, linear space. Using the correspondence between string-
rewriting systems having only length-preserving rules and LBA's described
in the Appendix to this section, it is clear that this problem can be solved
by a nondeterministic LBA, and, hence, is solvable in polynomial space.
Notice that any string-rewriting system that has only length-preserving
rules is almost-confluent. As described in the Appendix, for any LBA there
is a string-rewriting system with only length-preserving rules such that
the membership problem for the LBA can be reduced in a trivial way
that preserves the space complexity to the word problem for the string-
rewriting system. Since there is an LBA with a membership problem that
is PSPACE-complete, the word problem for the corresponding string-
rewriting system is PSPACE-complete. D3.6.3
While the word problem for an almost-confluent system is not guaran-
teed to be tractable, it is decidable; there are cases where it is very easily
decidable and we will describe one of these. Thus, there is the question
of whether the property of being almost-confluent is decidable. We will
show that this property is decidable for finite string-rewriting systems and
provide an upper bound for the complexity of this problem.
To determine whether a noetherian reduction system is confluent, it is
sufficient to determine if it is locally confluent; we showed this in Theorem
1.1.13. To determine whether a finite string-rewriting system is confluent
(Corollary 2.3.2), we used this result as well as the fact that it was sufficient
to consider only the finite number of critical pairs obtained by consider-
ing "overlaps" of left-hand sides of pairs of rewriting rules. To determine
whether a noetherian reduction system is confluent modulo an equivalence
relation, it is sufficient to determine if it is locally confluent modulo that
relation; we showed this in Lemma 1.2.4. Applying this notion to a string-
rewriting system T, we see that there are two conditions which must be
considered:
(a) for every x, y, z E ~*, if X -+RT Y and x -+RT z, then there exist u, v
such that y ~RT u, Z ~RT v, and u ~ v;
(13) for every x,y, z E ~*, if x ~ y and x -+RT z, then there exist U,v
such that y ~RT u, Z ~RT v, and u ~ v.
length, and, if so, check whether they are congruent by using only the
length-preserving rules (that is, the rules generating the congruence f-=1).
Just as in the proof of Theorem 2.3.1, the number of critical pairs to be
checked in order to test that condition (ex) is satisfied is 0(11 T 11 3 ) and
the set of critical pairs can be constructed in time 0(11 T 11 4). Given a crit-
ical pair (x, y) the algorithm REDUCE will produce leftmost irreducible
descendants x,1i in time 0(11 T 112) and determining whether Ixl = 11i1 can
be done trivally. If Ixl = 11i1, then determining whether x f-=1 1i can be done
nondeterministically in linear space. Thus, testing whether condition (a)
holds can be done in space that is (at worst) polynomial in II T II.
Testing condition ({3) is another matter. Consider the hypothesis of the
condition: for every x,y, Z E E*, if x f-=1 y and x -RT z. This means that
for every x E E*, one must consider every y, z E E* such that x f-=1 y and
x - RT z; while for each such x there are only finitely many y and z to be
considered, there are infinitely many choices for x. Thus, there is no hope
of obtaining a direct test for condition ((3).
This situation takes us to Lemma 1.2.5 where instead of an equivalence
relation one considers a finite symmetric relation, say ~, that generates an
equivalence relation, say ~. Lemma 1.2.5 asserts that if - 0 ~ is noethe-
rian, then to prove local confluence it is sufficient to establish property (a)
and property ('Y) which is defined as follows:
('"'() for all w,x,y, if W ~ x and W - y, then there exist u,v such that
x -* U, Y -* v, and U =
"-' v.
Once again we have the notion of a critical pair. But now the context
is such that one rule is length-preserving, say lUll = lVII, and one rule
is length-reducing, say IU21 > IV21. First, the set of critical pairs must
be generated. Then for each critical pair (x, y), the leftmost irreducible
descendants x, y must be generated and it must be determined whether
x f-!1 y. Just as in the argument concerning condition (a), it is clear that
this procedure allows one to determine whether condition ("I) holds using
space that is (at most) polynomial in II T II.
The reader should notice that in testing either condition (a) or condition
("I), the entire process can be carried out in polynomial time except for the
problem of determining whether two strings are congruent by using only
the length-preserving rules, that is, whether x f-!1 y.
From the preceding argument we have the following result.
Theorem 3.6.4 There is an algorithm to solve the following problem
which uses polynomial work space:
Instance: A finite string-rewriting system T.
Question: Is T almost-confluent?
As an example of almost-confluent systems, we consider rewriting in a
"free partially commutative monoid." Recently several problems of concur-
rency control in data-base systems and in parallel computation have been
modeled by considering properties of strings and the algebra of string-re-
writing. In this framework, the "alphabet" represents a set of functions,
and concatenation of symbols over the alphabet resulting in strings repre-
sents the composition of the functions represented by the symbols. In this
context partial commutativity plays an interesting role. This has provided
motivation for the more abstract study of words in partially commutative
monoids, particularly in free partially commutative monoids.
Definition 3.6.5 Let E be a finite alphabet. Let e be a binary relation
on E that is irreflexive and symmetric. Let =e be the congruence relation
on E* determined by defining xaby =e xbay for every x, y E E* and every
(a, b) E e. It will be useful to write U = v( mod e) when U =e v, and we say
that 'It and V are congruent ( mod e)." The free partially commutative
monoid generated by E with respect to the relation e is defined to be
the quotient of E* by =e. Usually its elements, which are the congruence
classes mod =e, are called traces.
A free partially commutative monoid may be viewed as the monoid
MT specified by a string-rewriting system Te: given E and e, let Te =
{(ab, ba) I (a, b) E e}; then the free partially commutative monoid gener-
ated by E with respect to e is precisely MTe.
3.6. Other Systems Based on Length 85
It is clear that the word problem for a free partially commutative monoid
is decidable. What we describe here is a linear-time algorithm for that
problem.
Theorem 3.6.6 Let E be a finite alphabet and let e be a binary relation
on E that is irreflexive and symmetric. There is a linear-time algorithm to
solve the following problem:
Instance: x and y in E* .
Question: Are x and y congruent (mod e)?
Sketch of the Proof. For every w E E* and every a E E, let Iwl a denote
the number of occurrences of a in w. For a subset A ~ E and every w E E*,
let ITa (w) denote the string obtained by erasing from w all occurrences of
every symbol' not in A; ITa (w) is the projection of w on A *. It is not
difficult to show that for every two strings x, y E E*, x =e Y if and only if
both (i) for every a E E, Ixl a = Iyla, and (ii) for each pair (a, b) of symbols
not in e, IT{a,b}(X) = IT{a,b} (y). (Notice that (i) is subsumed by (ii) if pairs
of the form (a, a) are allowed.) It is clear that both of these conditions can
be tested in time 0(11 E 112 (Ixl + lyD). Thus, for given E and e, the time
is O(lxyD, that is, it is linear in the lengths of x and y. D3.6.6
Consider rewriting in a free partially commutative monoid. We will re-
strict attention to the case where a string-rewriting system T on alphabet
E has only rewriting rules that are length-reducing. If e is a binary relation
on E that is irreflexive and symmetric, then we consider the combined sys-
tem TUTe. While one might consider various properties for such a system
to have, we consider only the property that T U Te is almost-confluent,
which in this case is better referred to as "T is confluent modulo e."
From Theorem 3.6.3 we see that the word problem for a length-reducing
string-rewriting system that is confluent modulo e is solvable in polynomial
space. But the fact that the word problem for a free partially commutative
monoid is solvable in linear time (Theorem 3.6.6) allows us to show that
the complexity.of the word problem in this case is much lower.
Theorem 3.6.7 Let E be a finite alphabet and let e be a binary relation on
E that is irreflexive and symmetric. If T is a finite length-reducing string-
rewriting system on E that is confluent modulo e, then there is a linear
time algorithm to solve the following problem:
Instance: x and y in E* .
It is clear that the word problem for finite preperfect systems is decidable
since it is sufficient to consider only strings whose length is at most that
3.6. Other Systems Based on Length 87
of the longer of the given strings. Since there are only finitely many strings
of each length, the result follows trivally. In addition, this argument shows
that the word problem for a finite preperfect system is decidable nonde-
terministically using linear space. Hence, following the same argument as
that used to prove Theorem 3.6.3, we see that the word problem for finite
preperfect systems is PSPACE-complete.
While the word problem for a preperfect system is decidable, it is un-
decidable whether a finite string-rewriting system is preperfect. In fact,
preperfectness remains undecidable even if the length-preserving rules are
restricted to be induced by an irreHexive and symmetric binary relation
e on the alphabet, that is, if only systems of the form T = RT UTe are
considered, where RT contains length-reducing rules only.
Proof. We do not define the LBA A(T) in detail; rather we describe its
behavior informally. On input u E E* the LBA A(T) repeatedly performs
the following action:
(1) Either enter the accepting state qa or go to (2).
(2) Move the tape head to the right scanning the current tape inscrip-
tion. If the left-hand side i or the right-hand side r of a rule of T
is discovered, then either replace this string by the other side of the
corresponding rule of T and go to (3), or continue to move the tape
head to the right. This is repeated until either some string is being
replaced or the symbol £ is encountered, in which case step (3) is
performed.
(3) Move the tape head back to the left until the symbol $ is found, and
then go to (1).
88 3. Length as the Basis for Reduction
From this description it is easily seen that on input u E E*, A(T) com-
putes a sequence u = Wo +-+T WI +-+T ... +-+T W n . Thus, if qo$u£ ~
A(T) qa$v£, then u ~T v. On the other hand, if u ~T v, then there is
a sequence of moves that A(T) can make such that qo$u£ is transformed
into qa$v£. This completes the proof of Lemma 3.6.10. 03.6.10
Conversely, each LBA A can be simulated by a string-rewriting system
containing only length-preserving rules.
Lemma 3.6.11 Let A = (Q,E,8,qo,qa) be an LBA. Then there exists a
string-rewriting system T(A) containing only length-preserving rules such
that, for all configurations uqv and UI ql VI of A, the following two state-
ments are equivalent:
Monadic String-Rewriting
Systems
Certain restrictions on the form of the rules of string-rewriting systems have
yielded some extremely interesting results. Any finitely presented group can
be presented by a finite special string-rewriting system (with no restriction
to the notion of reduction). But special systems have a few undesirable lim-
itations. Thus we turn to the study of "monadic" string-rewriting systems
which extend the power of special string-rewriting systems in useful ways.
ALGORITHM:
Input: A nondeterministic finite state acceptor A = (Q,~,8,qo,F) and
a finjte monadic string-rewriting system T on ~;
begin
(1) z - 1;
(2) while z :::; I~I . IQI2 do
(3) begin for all qi,qj E Q and all r E ~ U {e} do
(4) if qj E UlED(r) 8(qi,l!) then
(5) begin if r = e then
(6) for all a E ~ and all qk E Q do
(7) begin if qk E 8(qj, a) and qk ~ 8(qi' a) then
(8) 8(qi' a) - 8(qi' a) U {qk};
(9) if qj E F and qi ~ F then F - F U {qi}
end
4.1. Basic Properties 93
(10)
(11)
end
end.
Since T is a finite string-rewriting system, the set D(r) is finite for each
r E ~ U {e}. Hence, the test in line (4) can be performed in time bounded
above by a polynomial in lEI, IQI, and II T II. All the other statements
can be performed in time bounded above by a polynomial in lEI and IQI.
Thus, from A and T we obtain a non-deterministic finite state acceptor B
for LlT(R) in polynomial time. 04.1.2
Proof. First we prove a weaker result: for every Z E E*, V'T{z) is context-
free. The proof of this fact is similar to that of Theorem 2.2.9. Consider
a pushdown automaton that operates nondeterministically. Each compu-
tation may use .any of three procedures, READ, SEARCH, and DECIDE.
Initally, a READ operation is attempted.
READ: Attempt to read an input symbol and push it onto the pushdown
store. If the input tape is empty, then go to DECIDE; otherwise,
nondeterministically decide to go to SEARCH or continue to READ.
SEARCH: Pop from the pushdown store any string U that occurs as the
left-hand side of a rule (u, a) or (u, e) in T; if no such U exists, halt.
If U is popped and there is just one rule in T with U as its left-hand
side, then push the right-hand side onto the pushdown store. If U is
popped and there are more than one rule in T with U on the left-hand
side, then nondeterministically choose one such rule (u, v) and push v
96 4. Monadic String-Rewriting Systems
set R the deterministic context-free language [R]T? Recall that the class of
all deterministic context-free languages does not form a Boolean algebra.
Berstel has suggested that these questions really depend on a characteriza-
tion of the class of regular sets that can be the sets of irreducible strings of
a finite string-rewriting system. Consider a finite string-rewriting system T
on alphabet E. Notice that if y E E* is reducible, then for every x, z E E*,
the string xyz is reducible; hence, the set of reducible strings is an ideal of
E* and so the set IRR(T) of irreducible strings forms a co-ideal. Further,
if w is in IRR(T), then so is every factor of w, that is, every string y such
that for some x, z E E*, w = xyz. Can one characterize the sets of the
form I RR(T) in some way related to the structure of the monoid E* or in
some way related to the usual specifications of the class of regular sets?
Let T be a finite string-rewriting system that is confluent but not mona-
dic. Is it the case that the conclusions of Theorems 4.2.4 and 4.2.7 still
hold? The answer is "no" as seen by the following example.
Consider T = {(abc, ab), (bbc, cb)}, where E = {a, b, c}. It is easy to see
that T is confluent. The string abb is irreducible, and [abb]Tn{ a} *{b} *{c} * =
{ab 2n +1cn I n ~ O} which is not context-free. Since {a}*{b}*{c}* is a
regular set, this means that [abb]T is not context-free.
Thus, for a suitable sentence, the decision procedure allows one to deter-
mine whether with this interpretation of the nonlogical symbols, the specific
monoid MT satisfies the sentence (that is, is a model for the sentence); this
means that a very specific restriction of the satisfiability problem for such
sentences is decidable. But the interest in this decision procedure is not
one of determining the satisfiability of certain sentences but rather that it
allows one to determine whether the monoid MT has certain properties.
This follows from the fact that in many cases, this interpretation of the
sentence represents an interesting property of MT such as commutativity.
We proceed to describe the class of sentences and the decision procedure.
Then we consider applications.
Let ~ be a finite alphabet.
(i) Variables. Let VE and Vu be two disjoint countable sets of symbols
such that (VE U Vu) n ~ = 0. The symbols of VE are existential
variables, while those of Vu are universal variables.
(ii) Terms. A constant term is a string in ~*. A universal term is a
nonempty string in (~U VU )*. An existential term is a nonempty
string in (~ U VE )*.
(iii) Atomic formulas. H x and y are constant terms, then x == y is
a constant atomic formula. H x and y are two existential terms
or one existential term and one constant term, then x == y is an
existential atomic formula. H x and y are two universal terms or
one universal term and one constant term, then x == y is a universal
atomic formula. H x is an existential term and y is a universal term,
then x == y and y == x are mixed atomic formulas.
(iv) Formul8!!l. An atomic formula is a formula. H FI and F2 are formu-
las such that no existential variable occurs in both FI and F 2 , then
(FI 1\ F2) is a formula. H FI and F2 are formulas such that no uni-
versal variable occurs in both FI and F 2 , then (FI V F 2 ) is a formula.
A formul/l- is linear if no variable occurs twice in that formula.
(v) Sentences. If F is a formula with existential variables VI, •.• , Vq and
universal variables UI, ... , up, then
and
3VaV2 ... 3vqVUl VU2 ... VUpF
are sentences. Let SEN(~) be the set of all sentences over the alpha-
bet ~ and let LINSEN(~) be the set of all sentences over ~ that
contain only linear formulas.
100 4. Monadic String-Rewriting Systems
Further, from T and regular expressions for RI and R 2, one can construct
regular expressions for I RI and I R2'
Consider the atomic formula tl == t2' There are four cases.
Case 1. IT this formula is universal, then one can ignore existential quanti-
fiers, so the sentence is "lUI •.. 'VUq(tl == t2)' This sentence is true under the
interpretation for == if and only if every string in [RIJ is congruent to every
string in [R2J. Since T is confluent, every string is congruent to exactly one
irreducible string. Thus, every string in [RIJ is congruent to every string in
[R2J if and only if both IRI and IR2 are singleton sets and also IRI = IR2.
Case 2. IT this formula is existential, then one can ignore universal quan-
tifiers, so the sentence is 3VI .. . 3Vp(tl == t2)' This sentence is true under
the interpretation for == if and only if there exists a string in [RIJ that
is congruent to some string in [R2J. Since T is confluent, every string is
congruent to exactly one irreducible string. Thus, there exists a string in
[RIJ that is congruent to some string in [R2J if and only if I RI n I R2 =1= 0.
Case 3. IT this formula is constant, then it follows from Cases 1 and 2 that
the sentence is true if and only if IRI = IR2'
Case 4. IT this formula is mixed, then one of tl, h is universal and the
other is existential, say tl is universal. There are two subcases depending
on whether the quantifiers are in the order 'Vq3P or the order 3p'Vq.
Subcase' 4.1. IT the sentence is
then the sentence is true under the interpretation for == if and only if every
string in [RIJ is congruent to some string in [R2J if and only if I Rl ~ I R 2.
Subcase 4.2. IT the sentence is
then the sentence is true under the interpretation for == if and only if there
is some string in [R2J that is congruent to every string in [RIJ.
4.3. A Decision Procedure 103
Clearly, the Left Ideal Problem and the Two-Sided Ideal Problem can be
solved in a similar manner. Now consider Green's relations.
In a monoid M, Green's relations are defined as follows:
(a) xRy if and only if {xz I Z E M} = {yz I Z EM};
(b) xLy if and only if {zx I Z E M} = {zy I Z EM};
(c) xIy if and only if {ZIXZ21 ZI,Z2 EM} = {ZIYZ21 ZI,Z2 EM};
(d) xDy if and only if xRy or xLy;
(e) xHy if and only if xRy and xLy.
Consider the monoid MT' Green's relations are decidable in polynomial
space for MT, as shown by the following remarks. Let VI and V2 be universal
variables and let V3 and V4 be existential variables; all variables have domain
E*. Consider any x, y in E*.
(a) xRy holds in MT if and only if both the sentence 'v'VI3v3(XVl == YV3)
and the sentence 'v'V23v4(YV2 == XV4) are true for T;
(b) xLy holds in MT if and only if both the sentence 'v'VI3v3(VIX == V3Y)
and the sentence 'v'V23v4(V2Y == V4X) are true for T;
(c) that xDy and xHy are decidable follows from (a) and (b);
(d) xIy holds in MT if and only if both the sentence
Yk&bin(k)# -+ &
Here, for i = 1, ... , k, bin{i) stands for the binary representation of the
integer i. It is easily seen that T(S) is finite, monadic, and confluent, since
there are no non-trivial critical pairs at all for T(S).
Consider the following decision problem for T(S):
Instance: Two strings Xl, YI E {a, b} * .
Proof. Let il,i2, .. ' ,in E {2, ... ,k} such that XlXil" . Xi" = YlYil" 'Yi".
We choose u = XlXh ... Xi" and v = bin{in )# ... bin{i l )#. Then we obtain
the following reductions:
u$v = XlXil ... Xi" $bin{in )# ... bin{il)# ~T(S) Xl$ and
Proof. If Xl, Yl E {a, b} * , then Xl $ and Yl & are irreducible, that is, we can
choose u, v E IRR{T{S)) such that u$v ~T(S) Xl$ and u&v ~T(S) Yl&.
If Xl = Yl, then obviously M PC P{ {(Xl, yd} U S) holds. So let us as-
sume that Xl oF Yl. Then at least one of the above sequences of re-
ductions is non-empty, and therefore they both are non-empty. Hence,
v = bin{i n )# ... bin{i l )#Vl for some il, ... , in E {2, ... , k} and VI ¢
{bin(2), ... , bin{k)} . {#} . E*, and u = UlXil ... Xi" = U2Yil ... Yi" :
U$V = UlXil ... Xi" $bin{in )# ... bin{il)#Vl ~T(S) Ul $Vl ~T(S) Xl $ and
u&v = U2Yil ... Yi,,&bin{in )# ... bin{il)#vl ~T(S) U2&Vl ~T(S) Yl&.
Since v is irreducible, and since occurrences of the symbols $ and &
are neither generated nor deleted, we can conclude that VI = e, that is,
Ul$Vl = Ul$ = :1:1$, while U2&Vl = U2& = Yl&. Hence, XlXil'" Xi" = U =
YlYil "'Yi", and thus MPCP{{(Xl,Yl)}US) holds. 04.5.3
The choice of S together with Lemmas 4.5.2 and 4.5.3 give the result.
Theorem 4.5.4 The following problem is undecidable for the finite mona-
dic and confluent string-rewriting system T (S) :
6: (Q - {qa}) X ~b -- QX ~b X {L,R}.
In addition, we assume that qo =I- qa, which implies that no initial config-
uration of M is halting, and in order to simplify the discussion, we assume
that the states of M are numbered: Q = {qO,ql,q2, ... ,qn} for some n ~ 1,
and qn is the accepting state.
The construction will now proceed as follows. First the Turing machine
M is simulated by a two-stack machine MI. Essentially, a two-stack
machine is a two-tape Turing machine that uses its tapes only as stacks.
Then a string-rewriting system 8 1 is presented that simulates the stepwise
behavior of the machine MI. However, most of the rules of 81 are length-
preserving. So in the next step additional symbols called dummy symbols
are introduced, and a string-rewriting system 8 2 is constructed from 8 1 by
adding an occurrence of one of these dummy symbols to the right-hand
side of each rule of 8 1 . In fact, the dummy symbols will be used in such
a way that the right-hand side of each rule of 8 2 uniquely determines the
corresponding left-hand side. Obviously, 8 2 will contain length-increasing
rules only. Finally, the desired system T := T(M) is obtained from 8 2 by
turning each rule of 8 2 around and by adding some extra length-reducing
rules to resolve all critical pairs.
Now we describe this construction in detail. Let M = (Q,~, 6, qo, qn) be
the Turing machine accepting the language L, where Q = {qo, ql> ... , qn}
and let ~b = ~ U {b} be its tape alphabet. From M we obtain a two-stack
machine MIas follows. The two pushdown stacks will be called prefix
and suffix, respectively. It is convenient to think of prefix as a ''push-
left" stack and of suffix as a "push-right" stack, so we can picture Ml as
follows:
We introduce two new symbols $ and £, and take II := ~b U {$, £}. The
symbol $ will serve as the bottom marker of the stack prefix, while £
will serve as the bottom marker of suffix. The set of states of Ml is
Ql:= QpUQs, where Qp = {po, ... ,Pn} and Qs = {so, ... ,sn} are
disjoint copies of Q. Thus, to each state qi of M there correspond two
states Pi and Si of MI. As initial state of Ml we choose the state so. Thus,
it remains to define the transition function 61 of MI. Before doing so let
us describe the correspondence between the configurations of M and MI.
5.1. Presenting Recursively Enumerable Languages 115
I
following table describes the transition function J.L of M I ;
I
next state : Sj ,
Lemma 5.1.3 For all x E E*, the following two statements are equivalent:
(1) M halts on input x;
(2) $sox£ ~81 W for some wE HALTING1 •
Most of the rules of 8 1 are length-preserving. Now 8 1 will be simulated by
a string-rewriting system 8 2 that contains length-increasing rules only. To
this end we introduce some additional symbols called dummy symbols:
D := {(api) , (sia) I a E II, 0 ~ i ~ n - I} U HA), (B)}. The system 8 2
is obtained from 8 1 by adding an occurrence of a dummy symbol to each
right-hand side. In addition, 8 2 contains some rules to handle the situation
that a dummy symbol is immediately to the left of a state symbol from Qp
or immediately to the right of a state symbol from Q8. Here is a listing of
--
82 :
api (api)CSj
1.
Sia (Sia)CSj
} if 6(qi' a) = (qj, c, R)j
2.
api
Sia -- pjc(api)
pjC(Sia)
} if 6(qi' a) = (q;,c,L)j
3. $Pi
Si£ -- $($pi)CSj
(Si£)CSj£
} if 6(qi' b) = (q;, c, R)j
4. $Pi
Si£ -- $PjC($Pi)
PjC(Si£)£
} if 6(qi' b) = (q;, c, L)j
5.
(d)pi
si(d) -- Pi (d) (A),
(B)(d)Si'
and
are from CONFIG 2 , too, and a(w) = a(wo) ~81 a(wd ~81 ~81
a(wm ). Here u ~81 v stands for 71, -81 v or u = v, that is, zero or one
step is performed. Conversely, if u E CONFIG I such that u = Uo -81
Ul -81 ... - 81 um, then there are wo, . .. ,wm E CONFIG2 such that
a(wi) = Ui(O :$ i :$ m), and Wo ~82 WI ~82 ••• ~82 wm . Hence, there is
a correspondence between the reduction sequences of 8 1 and those of 8 2 .
This yields the following.
Lemma 5.1.4 For all x E ~*, the following two statements are equivalent:
(1) M halts on input x.
Let R denote the set HALTING 2 • Then R is a regular subset of r*, and
by Corollary 5.1.5 and (d) we see that, for x E E*, M halts on input x
if and only if $sox£ E ~hM)(R) if and only if $sox£ E [R]T(M). Since
L is the language accepted by the Turing machine M, this shows that
~hM)(R) n {$so}· E* . {£} = {$so}· L· {£} = [R]T(M) n {$so}· E*· {£}
holds. This completes the proof of Theorem 5.1.1.
From Theorem 5.1.1 we immediately obtain the following representation
theorem for recursively enumerable languages.
Corollary 5.1.6 Let L ~ E* be recursively enumerable. Then there exist
a finite, length-reducing and confluent string-rewriting system T on some
alphabet r properly containing E and two regular sets Rl, R2 ~ r* such that
IIE(~T(Rl) n R2) = IIE([R l ]T n R 2) = L, where lIE denotes the projection
from r* onto E*.
As an applitation of Theorem 5.1.1 we will prove in the next section that,
for finite, length-reducing and confluent string-rewriting systems that are
non-monadic, the decision problem for linear sentences (see Section 4.3) is
undecidable in general.
since M moves its head to the left end of its tape inscription before it halts,
we see that R = {$Pn}· {~U D}*. {£} can be taken.
Finally, let ~ := r U {#}, where # is a new symbol, and let S denote
the string-rewriting system.
S:= Tu {a£# -+ £# I a E~} U {$so£# -+ $Pn}.
It is easy to check that there are no overlaps between the rules of T and
the additional rules in S. Thus, S is a finite, length-reducing and confluent
system. This system has the following properties.
Lemma 5.2.3 Let w E ~* .
(a) $sow£# ~8 $Pn.
(b) There exists a string Z E ~* such that $Pnz ~8 $sow£ if and only if
wEL.
Proof.
(a) This is immediate from the rules in S - T.
Proof. Let E be a finite alphabet, and let S = (x}, VI), (X2' Y2), . .. , (Xn' Yn)
be a nonempty finite sequence of ordered pairs of nonempty strings over E.
We construct a finite length-reducing string-rewriting system T(S) on the
126 5. Length-Reducing Non-Monadic String-Rewriting Systems
fori~1,2,
$ bin{i) MMM - L bin{i) R$
$ bin{i) ### - L bin{i) R$o
1. } ... ,n
L bin{i) R$OXi - $0
$0#- §
Claim 2. For all ill i2, ... , im E {I, 2, ... , n}, £y(ill i 2, ... , i m) ~T(S) §.
Assume that S has a solution, that is, there exists a nonempty sequence
il,i2, ... ,im E {1,2, ... ,n} such that XiiXi2 ••• Xim = YiiYi2 ••• Yim. Then
X(ill i2, ... , i m) = y(il, i2, ... , i m), and hence, $x(i ll i 2,· .. , i m) ~T(S)
§ ~T(S) £Y(ill i 2 ,···, i m), that is, $ and £ have a commOn right-multi-
plier mod T(S).
Conversely, assume that $ and £ have a common right-multiplier, say
z E r*, mod T(S), that is, $z ~T(S) £z. We shall prove that from this
assumption we can conclude that the instance S of the Correspondence
Problem has a solution. To prove this we need the following two claims.
Claim 3. Let u, v E r* be irreducible with lui a 2: Ivl a for all a E
{$, $0, L, R}. If $u ~T(S) v, then there exists a nonempty sequence ill i 2 ,
... ,ik E {I, 2, ... , n} such that u = x(i ll i2, ... , ik)U2 for some U2 E r*.
Proof. Since Ivl$ ~ lul$ < I$ul$, we see that the number of occurrences
of the symbol $ is reduced in the reduction $u ~T(S) v. Hence, we can
conclude from the form of the rules of T(S) that u can be factored as u =
bin(ik)MMM ... bin(i2)MMM bin(il)###ul for a nonempty sequence
i l ,i2, ... ,ik E {1,2, ... ,n} and some string Ul E r*. Thus, $u ~T(S)
L bin(ik)R ... L bin(i2)R L bin(it}R$oul =: w. Now, Iwl$o = lul$o + 1 >
Ivl$o,lwIL > lulL 2: IvIL, and IwlR > lulR 2: IvIR, and w ~T(S) v, since
T(S) is confluent, and v is irreducible. Since Ul is also irreducible as a suffix
of u, we see from the form of the rules of T( S) that Ul = Xii Xi2 ••• Xi" #U2
for some U2 E r*, that is, u = x( ill i2, ... , ik )U2. 0 Claim 3.
Analogously, the following symmetric result is obtainable.
Claim 4. Let u, v E r* be irreducible with lul a 2: Ivl a for all a E
{£, £o,l,r}. If £u ~T(S) v, then there exists a non-empty sequence i ll i2,
... , ik E {I, 2, ... , n} such that u = y(i ll i2, . .. , ik)U2 for some U2 E r*.
Based on these observations we can nOw complete the proof of Lemma
5.2.11. Assume that $z ~T(S) £z for some z E r*. Without loss of gen-
erality we may assume that z is irreducible. Since T(S) is confluent, there
exists an irreducible string v E r* such that $z ~T(S) v and £z ~T(S) v.
Since in the reduction £z ~T(S) v only rules from group (2) are applica-
ble, and since the symbols a E {$, $0, L, R} do not occur in these rules,
we can conclude that Ivl a ~ I£zla = Izla for all a E {$, $0, L, R}. Hence,
by Claim 3 there exist a non-empty sequence it, i2, ... , ik E {I, 2, ... , n}
and a string U2 E r* such that z = x(it, i2, ... , ik)U2. Analogously, Ivl a ~
Izla for all a E. {£,£o,l,r}, and so by Claim 4 there exist a non-empty
sequence jt,h, ... ,jp E {1,2, ... ,n} and a string U3 E r* such that
z = y(h,h, ... ,jp)U3. Hence, x(i ll i 2, ... , ik)U2 = Z = y(jllh, ... ,jp)U3,
which implies that k = p, il = jl, ... , ik = jk, and Xii Xi2 ••• Xi" = Yii Yi2
.•• Yi". Thus, the instance S of the Correspondence Problem has a solution.
We have thus shown that S has a solution if and only if there exists
a string z E r* satisfying $z ~T(S) £z. Hence, the given construction
128 5. Length-Reducing Non-Monadic String-Rewriting Systems
(1) In a public key system the one-way functions are unbreakable, the
public directory is secure, and each user has access to every encryption
function but only his own decryption function.
(2) In a two-party protocol, only the two users who wish to communicate
are involved in the transmission process.
(3) The protocol is uniform in the sense that the same format is used for
every pair of users.
(4) An eavesdropper who wishes to discover the plaintext message -
called a "saboteur" - is a legitimate user who can initiate an ex-
change with any other user and can be a receiver for any other user.
What is emphasized here are the definitions of the model and the results
that can be obtained by understanding the previous material in this book.
We begin with formal definitions of protocols.
Consider a finite set A of symbols. We assume a finite set of users. Thus,
we can assume that for some integer m > 0, every user has a name that
is a string of length m in A*. For any w E A*, if Iwl > m, then write
w = head(w)tail(w) where Itail(w)I = m. Consider the following functions,
each of which has A * as its domain and its co-domain:
(a) for each user X, the encryption function Ex and the decryption func-
tion Dx;
(b) for each user X, the name-appending function ix, where for every
wE A*, ix(w) = wX (we use X for the name of X), and the name-
matching function dx, where for every w E A * ,
d w _ {head(W) if tail(w) = X
x( )- undefined otherwise;
What relations exist between the functions in r*? These are given by
sets of rewriting rules that specify the semantics to be applied to r*. The
following is a list of potential cancellation rules:
(a) for every user X, Dx composed with Ex is 1;
(b) for every user X, Ex composed with Dx is 1;
(c) for every user X, dx composed with ix is 1;
(d) for every user X, d composed with ix is 1.
Since we are viewing r* as the free monoid generated by r, we can
take any subset of the set of cancellation rules and view this as a string-
rewriting system T on r. This method of attack will be used throughout
this section, and the following theorem (whose proof follows immediately
from the technique used to prove Theorem 2.3.1) provides the fundamental
tool.
Theorem 6.1.1 Every subset of the set of cancellation rules forms a string-
rewriting system that is confluent.
To define protocols, we consider two syntactic types, "name-stamp" and
"cascade" .
Definition 6.1.2 A two-party cascade protocol P is specified by a
finite sequence of strings over the alphabet {Zb Z2, Z3, Z4}:
aiE {Zb Z2, Z3, Z5, Z6, Z7, ZS, zg}*, 1::S: i ::s: t,
~
/3jE {Zb Z2, Z4, Z5, Z6, Z7, Zs, zg}*, 1::S: j ::s: t',
134 6. Algebraic Protocols
where t' =t or t' = t -1. For each pair X, Y of distinct users, let ai(X, Y)
and (3j(X, Y) denote the strings ai, ~j under the substitution
Zl := Ex
Z2 := Ey
Z3 := Dx
Z4 := Dy
Z5 := ix
Z6 := iy
Z7 := dx
Zs := dy
Zg := d
This process is uniform in the sense that <li(A, B) and /3j(A, B) for any
ai and /3
~
While it follows immediately from the definitions that Z has the ability
to apply the functions in case (a), the other two cases need explanation.
Case (b). Since Z is a user, he can initiate an exchange with a user B
claiming himself to be A. If Z wishes to apply ,8j(A, B) to the string II,
then at the appropriate time during the exchange Z simply sends II to B
as the (2j-l)st message. User B sees this message as a string in ~*, and
if B follows the protocol, then B replies by sending ,8j(A, B)(II). Thus, Z
obtains the string in ~ * that is the result of applying ,8j (A, B) to II.
138 6. Algebraic Protocols
Case (c). HZ wishes to apply ai(A, B) to the string IT, then Z observes
all exchanges to determine whether A ever initiates an exchange with B. H
so, Z obtains the (i-l)st reply from B to A and sends IT to A while claiming
to be Bj if Z does this quickly, then A has no reason not to believe that
IT is the reply message from B that complies with the protocol, and so A
replies. Now A's reply message is ai(A, B) (IT) so that Z obtains the string
in b. * that is the result of applying ai (A, B) to II.
Thus, Z has the opportunity to transform Ni(X, Y)(M) by applying any
of the functions in rz U {,Bj(A, B) I A, B E {X, Y, Z}, A =1= B, and j ~
I} U {ai(A,B) IA,BE{X,Y,Z}, A=I=B, andi~2}.
The definition of security should not depend on the choice of users or
on the plaintext message. This factor plays a role in our choice of defini-
tion which applies to both cascade and name-stamp protocols and to both
symmetric and nonsymmetric protocols.
X, Y, Z playa role. But in fact the form of the cancellation rules making
up T (Definition 6.1.4) is such that it is sufficient to restrict attention to
{EA,DA,iA,dA I A E {X, Y, Z}} U {d}. This helps in the following result.
Theorem 6.2.2 Consider the following problem:
User Z can compute any function in lIz = {EA' iA, dA I A E {X, Y, Z}} U
{Dz,d} U {ai(A,B) I A,B E {X, Y,Z}, A oF B, i ~ 2} U {,B;(A, B) I
A, BE {X, Y, Z}, A oF B, i ~ I}. Notice that
By the above discussion, P is insecure if and only if there exist k > 0 and
"( E IIz* such that ,,(Nk(X, Y) ~ 1. Thus, P is insecure if and only ifthere
exists W E IIZ{Nl(X, Y), ... ,NHtl(X, Y)} such that W ~ 1, and this
happens if and onlyiflIZ{Nl (X, Y), ... ,Nt+tl(X, Y)} and {I} have a com-
mon descendant. There is a nondeterministic finite-state acceptor specify-
ing IIZ{N1(X, Y), ... ,
NHtt{X, Y)} that has
Notice that checking the two conditions in Theorem 6.2.6 is quite simple.
Thus, we have the following result.
(i) Let (131)' be such that for every two user names A, B, (f3d(A, B) =
(E B )niBiAdAdB(DB )n+1. Let PI = {ai, ~j 11 ~ i ~ n + 1, 2 ~ j ~
~
n + I} U {(f3 l )').
~
(ii) For each k E {2, ... , n}, let (13 k )' be such that for every two user
names A, B, (f3k),(A, B) = (EB)n+1-kiBiA(EB)n+2-kiBiAd Ad B
(D B )n+2-k. Let Pk = {ai, ~j I 1 ~ i ~ n + 1, 1 ~ j ~ n +1
~
with j -# k} U {(f3d}.
~
(iii) Let (f3 n+1)' be such that for every two user names A, B, (f3n+1),(A,B)
= EBiBiAdAdBDB. Let Pn+1 = {ai, ~j I 1 ~ i ~ n + 1, 1 ~ j ~
~
n} U {(f3 n +1)').
Consider Pl. It is straightforward to show that PI is a valid name-stamp
protocol, either as a symmetric or a nonsymmetric name-stamp protocol.
Further, we claim that PI is secure. To prove this, let HI = rzU{f3j(A, B) I
j = 2, ... ,n+ 1, A -# B, A E {X, Y,Z}, BE {X, Y}}U {f3' l(A, B) I A-#
B, A E {X, Y, Z}, B E {X, Y}}. Then it suffices to show (by induction
on 1,1) that for all , E (Hd*, .et(fO!l(X, Y)) n J -# 0 or there exists w E
r*, k 2:: 1, C E {X, Y} such that 'O!l(X, Y) = w(EC)kiyix.
Similarly, for each k, 2 ~ k ~ n, Pk is a valid two-party name-stamp
protocol and Pk is secure. The security of Pk is shown by letting Hk =
rz U {f3j(A,B) I j -# k, j E {1, ... ,n+ I}, A -# B, A E {X,Y,Z}, BE
{X,Y}}U{(f3k),(A,B) I A -# B, A E {X,Y,Z}, BE {X,Y}} and
showing that for all, E HZ, .et(fO!l(X, Y)) n J -# 0 or there exist w E r*
and U E {ix, iz}*, with 'O!l(X, Y)) = w(Ey )n+2-kiyu.
Finally, it is clear that Pn + l is a valid two-party name-stamp protocol,
either as 'a symmetric or a nonsymmetric name-stamp protocol. Further-
more, Pn + l is secure. To show that Pn +1 is secure, it suffices to prove that
for all, E H n+1, E y E .et(fO!l(X, Y)) where Hn+1 = r z U {f3j(A, B) j = I
1, ... ,n, A -# B, A E {X, Y,Z}, B E {X, Y}} U {(f3n+1),(A,B) I A -#
B, A E {X, Y, Z}, BE {X, Y}}.
We will use the protocols Po, PI. . .. ,Pn+1 to show that there is no "sim-
ple" characterization of name-stamp protocols that are secure.
Proof. Let u,v E E*. Then cp(u) 0 cp(v) = [ulR 0 [vlR = [uvlR = cp(uv),
and cp(e) = [elR' that is, cp is a monoid-homomorphism from E* onto MR'
7.1. Finite Monoid-Presentations 149
Further, for x, y E E*, c,o(x) = c,o(y) if and only if [xjR = [yjR if and only if
x ~R y. 07.1.5
The following lemma characterizes the situation that a monoid-presen-
tation (E; R) presents a given monoid M.
Lemma 7.1.6 Let (E; R) be a monoid-presentation, and let M be a mo-
noid. If there exists a homomorphism 'II from the free monoid E* onto
M satisfyingw(u) = w(v) if and only ifu ~R v, then (E;R) is a
presentation of M, that is, M ~ MR'
'II
E* • M
~j/
Claim. X is an isomorphism.
Proof. X([ujR)OX([vjR) = w(u)ow(v) = w(uv) = X([uvjR) = X([ujRO[vjR),
and x([ejR) = w(e) = 1M, where 1M denotes the identity of M. Hence,
X is a monoid-homomorphism from MR into M. Since X([wjR) = w(w),
and since'll is onto, X is an onto-mapping. Finally assume that X([ujR) =
X([vjR)' Then w(u) = X([ujR) = X([vjR) = w(v) implying u ~R v by
hypothesis. Thus, [ujR = [vjR' that is, X is also one-to-one. Hence, X is an
isomorphism from MR onto M, that is, MR ~ M. 07.1.6
Using Lemma 7.1.6 we can prove the following result which establishes
the fact that monoid-presentations of the form (E; R) are powerful enough
to present each and every monoid.
Theorem 7.1.7 Each monoid M has a presentation of the form (E; R).
and let R:= {(aiaj,ak(i,j») I i,j E I}, where e is chosen for ak(i,j) in case
mk(i,j) = 1M. Then R is an encoding of the multiplication table of M.
Claim. (:E; R) is a monoid-presentation of M.
Proof. We must verify that MR ~ M. In order to do so we define a
homomorphism W: E* -+ M as follows: w(e) := 1M, W(ai) := mi (i E
I), W(wai) := w(w)omi(w E E*, i E I). Since M = {mi liE I}U{IM}, W
is onto. By Lemma 7.1.6 it remains to show that, for all u,v E E*, w(u) =
w(v) if and only if u ~R v. Let i,j E I. Then w(aiaj) = mi 0 mj =
mk(i,j) = w(ak(i,j»), and so W(l) = w(r) for all (l, r) E R. Thus, for all
u,V E E*, if u ~R v, then w(u) = w(v).
For all i, j E I there is an element ak(i,j) E E U {e} such that aiaj +---+ R
ak(i,j). Hence, each congruence class [WJR contains at least one element from
E U {e}. Let u, v E E* such that w(u) = w(v). Then there are elements
a,b E Eu {e} satisfying a ~R u and b ~R v. Hence, w(a) = w(u) =
w(v) = W(b). Since W is one-to-one on E U {e}, this yields a = b, that is,
u ~R v. Thus, (E;R) is a presentation of M. 07.1.7
A monoid M has many different presentations. The following lemma is
useful to compare presentations to each other.
Lemma 7.1.8 Let (E l ; Rd and (E2; R 2) be two monoid-presentations,
and let cp : El -+ E2 be a mapping. Then cp induces a monoid-homomor-
phism tj; : Ei -+ MR2' which is defined by tj;(w) := [cp(W)JR2. The in-
duced mapping cp : [WJRl ~ tj;(w) (w E En
is a monoid-homomorphism
from MRI into MR2 if and only if cp(l) ~R2 cp(r) holds for all rules
(l,r) E R l .
Proof. Let (El; Rd, (E2; R2), and cp : El -+ E2 be as above. The mapping
cp can be extended to Ei as follows: cp(e) := e, cp(wa) := cp(w)cp(a) for all
wE Ei, a EEl. Let CP2 : E2 -+ MR2 be the canonical projection defined by
CP2(X) := [XJR2. Then tj;:= CP2 ocp : Ei -+ MR2 is a monoid-homomorphism
satisfying tj;(w) = cp2(cp(W)) = [CP(W)JR2 for all w E Ei.
Define 'CP([WJRl) := tj;(w) for each w E Ei. If cp(f) ~R2 cp(r) holds
for each rule (l,r) E R 1, then u ~Rl v implies cp(u) ~R2 cp(v) for all
u, v E Ei. Thus, cp is a well-defined mapping from MRI into MR2. Further,
cp([eJRl) = tj;(e) = [cp(e)JR2 = [eJR2' and CP([UJRl)Ocp{[VJRJ = tj;(u)otj;(v) =
[CP{U)JR2 0 [cp(V)JR 2 = [cp{u)CP{V)JR2 = [cp(UV)JR2 = tj;{uv) = cp([UVJRJ =
CP([UJRl 0 [VJRJ, and hence, cp is a monoid-homomorphism from MRI into
MR2. Conversely, if cp is a monoid-homomorphism from MRI into MR2'
then u ~Rl v implies cp{u) ~R2 cp(v). In particular, for (f,r) E Rl,
this yields cp{l) ~R2 cp{r). 07.1.8
7.1. Finite Monoid-Presentations 151
Examples 7.1.9
(a) Let (EI;RI ) = (a, b; ab), and (E 2;R2) = (x;x 3).
(i) Define a mapping CPI : EI - t E; by taking CPI(a) := x and
CPI(b) := x. Then (PI(ab) = [X 2]R2 =f [e]R2 = <PI (e). Hence,
CPI does not induce a homomorphism from MRl (= C(a, b)) into
MR2'
(ii) Define a mapping CP2 : EI - t E; by taking cp2(a) := x and
CP2(b) := x 2 . Then <p2(ab) = [X 3]R2 = [e]R2 = <p2(e). Hence, CP2
induces a monoid-homomorphism <P2 from MRl (= C(a, b)) into
M R2 ·
(b) Let (EI;RI) = (a,b;a 3,b2,ab = ba), and (E 2;R2) = (b,c; (cb)3,b2,bcb
= c). Define a mapping cP : Ei - t E; through a f--+ cb and b f--+ b.
Then ~(a3) = (cb)3 -R2 e = cp(e), cp(b2) = b2 -R2 e = cp(e),
and cp(ab) = cb2 ~R2 bcb. = cp(ba). Hence, cP induces a monoid-
homomorphism <p: [W]Rl - t [CP(W)]R2 from MRl into MR2'
Define a mapping W : E; - t Ej through b f--+ band c f--+ abo Then
w«cb)3) = ab2ab2ab2 ~Rl e = w(e), w(b2) = b2 - Rl e = w(e),
and w(bcb) = bab2 ~Rl ab = w(c). Hence, W induces a monoid-
homomorphism q, : [X]R2 - t [W(X)]Rl from MR2 into MR l ·
Since W0 cp(a) = w(cb) = ab2 - Rl a and W0 cp(b) = w(b) = b, and
since cP 0 w(b) = cp(b) = band cP 0 w(c) = cp(ab) = cb2 -R2 c, we
conclude that the homomorphisms <p and q, are inverse to each other.
Hence, MRl ~ MR2l that is, (E I ; Rd and (E2; R 2) are two finite
presentations of the same monoid.
If (E I ; RI) apd (E 2; R2) are two presentations of the same monoid, there
exists an isomorphism q, : MRl - t MR2' If EI is a finite alphabet, then
this isomorphism can be described by a linearly bounded function f : Ei - t
E;.
Lemma 7.1.10 Let (E I ; Rd and (E 2; R 2) be two presentations such that
MRl ~ MR 2· If IEII < 00, then there exist a constant c E N+ and a
mapping f: Ei - t Ei satisfying the following two conditions:
(i) If(w)1 ::; c· Iwl for all wE Ej, and
(ii) f induces an isomorphism from MRl onto MR2' that is, the mapping
[W]Rl -t [f(w)]R2 is an isomorphism from MRl onto MR2'
~* III
LJI- MRl
onto ~
152 7. Algebraic Properties
Proof.
(a) This is an immediate consequence of the proof of the proceeding
lemma.
(b) Let (~; R) be a finitely generated presentation of a finitely presented
monoid M such that IRI = 00, and let (r; S) be a finite presentation
of M. By Lemma 7.1.10 there exist a constant c E N+ and mappings
f: ~* -- r* and g: r* -- ~* satisfying the following conditions:
Proof.
(i) (E 2 ; R2 ) is obtained by an elementary Tietze transformation of type
1, that is, El = E 2, and R2 = Rl U {(u,v)}, where u ~Rl v. For
all x,y E Ei, X ~Rl y if and only if x ~R2 y, and so Rl and R2
are equivalent systems. In particular, this implies MRl ~ MR2.
(ii) (E 2 ; R 2 ) is obtained by an elementary Tietze transformation of type
2, that is, El = E 2, and R2 = Rl - {(f,r)} for some (f,r) E Rl such
that f ~R2 r. Hence, (El;Rl ) is obtained by an elementary Tietze
transformation of type 1 from (E 2 ; R 2 ), and thus, by (i), MRl ~
MR2·
(b) := {b ~ b E El
cP u if b = a.
(b) = {b ~f b E E2
CPa U If b = a.
(vi) cb2 +---t c using the relation (b2 , e); hence, we can delete the relation
(c,c~), that is, we obtain (E 2 ;R2 ) = (b,c; (cb)3, b2 , c= bcb).
156 7. Algebraic Properties
Proof. Without loss of generality we may assume that the sets I:;l and
I:;2 of generators are disjoint. Since (I:;l; R 1 ) and (I:;2; R 2 ) define the same
monoid, we have MRI ~ MR2' Thus, for each a E I:;1! there exists a string
U a E I:;2 such that a and U a describe the same element of this monoid.
Also, for each b E I:;2, there exists a string Vb E I:;i such that b and Vb
describe the same element. Using these strings the presentation (I:;l; R 1 ) is
transformed by a finite sequence of elementary Tietze transformations as
follows:
(a) (I:;l; Rd -+ (I:;l U I:;2; Rl U {(b, Vb) I b E I:;2}) by 1I:;21 elementary
Tietze transformations of type 3.
(b) Let Ro = Rl U {(b, Vb) I b E I:;2}, and let 9 denote the isomorphism
from MR2 onto MRI that is induced by mapping b onto Vb for all
bE I:;2 (see Lemma 7.1.10). Then, for all (f,r) E R2 , g(f) ~Rl g(r)
implying f ~Ro r. Thus, (I:;l U I:;2; Ro) -+ (I:;l U I:;2; Ro U R2) by
IR21 elementary Tietze transformations of type 1.
(c) Since, for each a E I:;l, a, U a , and g(ua ) all define the same element
of the monoid MRo we have a ~Rl g(ua ) ~Ro Ua . Thus, we
obtain (I:;l U I:;2; Ro U R 2) -+ (I:;l U I:;2; Rl U R2 U {(b, Vb) I b E
I:;2} U ((a,u a ) I a E I:;t}) by II:; 1 I elementary Tietze transformations
of type 1. Let I:;3 := I:;l U I:;2 and R3 := Rl U R2 U {(b, Vb) I b E
I:;2} U {(a, U a ) I a E I:;t}. Then (I:;l; R 1 ) has been transformed into
(I:;3; R 3 ) by a finite sequence of elementary Tietze transformations.
(d) In an analogous manner (I:;2; R2) can be transformed into (I:;3; R 3),
so by the above remark (I:;3; R 3 ) can be transformed into (I:;2; R 2 ) by
a finite sequence of elementary Tietze transformations.
D7.2.4
7.3. Some Undecidability Results 157
Theorem 7.2.4 remains valid also for infinite presentations once we allow
Tietze transformations that are not necessarily elementary.
The above construction does not yield an effective process for transform-
ing two finite presentations of the same monoid into each other, since the
strings ua(a E :Ed and vb(b E :E2), that are essential to these transforma-
tions, are not known in general. In particular, it does not give a solution
to the isomorphism problem.
Definition 7.2.5 The isomorphism problem for finite monoid-presen-
tations is the following decision problem:
Instance: Two finite monoid-presentations (:Eli R l ) and (:E2i R2)'
Question: Do these two presentations describe the same monoid, that
is, does MRl ~ MR2 hold?
On the other hand, it can be seen easily that if a presentation (:E2i R 2 )
is obtained from a finite presentation (:Eli R l ) by a single application of
an elementary Tietze transformation, then a solution to the word problem
for (:Eli R l ) also induces a solution to the word problem for (:E2i R2), and
vice versa. Hence, from Theorem 7.2.4 we can immediately conclude the
following result.
Corollary 7.2.6 Let (:Eli Rd and (:E2i R 2 ) be two finite presentations of
the same monoid. Then the word problem for (:Eli R l ) is decidable if and
only if the word problem for (:E2i R 2 ) is decidable.
Thus, the decidability of the word problem is an invariant of finite pre-
sentations. Hence, we can speak of the decidability or undecidability of the
word problem for a finitely presented monoid M.
(c) P3(M) if and only if M is commutative, that is, for all ml, m2 E
M, '!J.Ie have mi 0 m2 = m2 0 ml, where 0 denotes the operation of
M;
(d) P4 (M) if and only if Mis cancellative, that is, for all ml, m2, m3 E
M, mi 0 m2 = mi 0 m3 implies m2 = m3, and mi 0 m3 = m2 0 m3
implies mi = m2;
(e) P5 (M) if and only if M is a free monoid, that is, M s:! ~* for some
finite alphabet ~;
(f) P6 (M) if and only if M is a group, that is, for all m E M, there is
an element m' E M such that mom' = 1M, where 1M denotes the
identity of M;
(g) P7 (M) if and only if M does not contain a non-trivial idempo-
tent, that is, there is no m E M satisfying m :f:. 1M and mom = m;
7.3. Some Undecidability Results 159
The reverse implication also holds, that is, two finitely presented monoids
Ml and M2 have decidable word problems if and only if their free product
Ml * M2 has a decidable word problem. Finally we are prepared to prove
Markov's result.
Proof of Theorem 7.3.7 Let P be a Markov property. Then there are
two finitely presented monoids Ml and M2 such that
(1) Ml does not have property P, and Ml is not isomorphic to a sub-
monoid of any finitely presented monoid having property P, and
(2) M2 does have property P.
and the word problem for MR has been reduced effectively to the problem
of deciding property P. D7.3.7
Lemma 7.4.2 For all u,v E E*, U ~R V if and only ifcp(u) = cp(v).
Proof. Since cp(w) ~ R W for all w E E*, U ~ R v if and only if
cp(u) ~R cp(v). But cp(u), cp(v) E Eo, and Eo freely generates MR imply-
ing that cp(u) ~R cp(v) if and only if cp(u) = cp(v). D7.4.2
Let R be a finite string-rewriting system on E such that the monoid
MR described by the presentation (E; R) is free. Then there is a subset Eo
of E such that the monoid MR is freely generated by Eo, that is, (Eo; 0)
is another presentation of MR. Hence, by Theorem 7.2.4 there exists a
finite sequence of elementary Tietze transformations that transforms the
presentation (E; R) into the presentation (Eo; 0). In general this finite se-
quence of Tietze transformations cannot be determined effectively, since
the decision problem free monoid is undecidable. In the following we will
derive a condition for string-rewriting systems such that, whenever R is a
string-rewriting system satisfying this condition, then one can effectively
construct a finite sequence of Tietze transformations transforming (E; R)
into (Eo; 0), if MR is a free monoid.
For what follows let R be a fixed finite string-rewriting system on E,
and let M be the monoid given through the presentation (E; R). First
we perform a kind of normalization of the given presentation (E; R) by
eliminating some of the letters from E that are superfluous.
Take E1 := {a EEl a ~R e}, let E2 := E - E1, and let II2 denote the
projection from E* onto E:i, that is, II2 is the homomorphism defined by
Finally, let R1 := {(.e b r1) I 3(.e, r) E R such that .e1 = II 2(.e), r1 = II2(r),
n.
and II2(.e) "# II2(r
Lemma 7.4.3 The presentation (E 2 ; R 1) defines the monoid M, that is,
MR~M.
(i) Va E ~g : a ~ R3 e,
(ii) Rg n {(w,w) I w E ~n = 0,
(iii) Rg n (~g x = 0,
~g)
When this loop is left, the presentation of M at this point is (I:Oi R') for
some R' ~ I:(j x I:(j. Since M is freely generated by I: o, this means that
R' ~ {(w,w) I w E I:(j}, that is, DECIDE-FM accepts.
On the other hand, if DECIDE-FM accepts, then the presentation
(I:3iR3) is transformed by DECIDE-FM into a presentation of the form
(I:Oi R') for some subset I:o of I:3 and some string-rewriting system R' ~
{(w,w) I w E I:(j}. During this transformation DECIDE-FM only ap-
plies Tietze transformations to presentations of M starting with (I:3; R3)'
Hence, (I: o; R') is a presentation of M showing that M is the free monoid
generated by I:o• D7.4.8
Let RV-uniform-word-problem denote the following restricted ver-
sion of the uniform word problem:
Instance: A finite presentation (I:; R), and a string u E I:*.
Proof. If conditions (i) and (ii) are satisfied, then the monoid MR is
obviously a group. Thus, it remains to prove the converse implication. So
assume that MR is a group.
Let a E ~. Since MR is a group, there exists a string w E ~* such that
aw = Vk --R Vk-I --R'" --R VI --R e. Since VI --R e, we have
(vl,e) E R or (e,vd E R implying VI E ~i. For each i ~ 1, Vi+l --R Vi
means that Vi+1 = xuy and Vi = xvy for some strings x, y, U, V E ~* with
(u,v) E R or (v,u) E R. If Vi E ~:, we have V E ~:, which in turn gives
U E E:+1' Hence, if Vi E ~:, then Vi+1 E ~:+l' By induction this implies
that aw = Vk E ~k' that is, a E ~k' But ~l ~ ~2 ~ ... ~ ~n = Uj~l~j ~
~, and so we actually have a E ~n' Thus, condition (i) is satisfied.
In addition, we must show that condition (ii) also holds. To do so, we
prove by induction on i, that for each i ~ 1 and each a E ~i' aUa ~R e
holds. Let a EEl. Then Ua = VU, where u, V E ~* are strings such that
(uav,e) E R or (e,uav) E R. This gives uav ~R e, which in turn implies
aUa = avu ~R e, since MR is a group. If a E ~i+l - ~i' then Ua =
vxu, where u, V E E* and x = u ai'" ... Uai2 Uail with ail' ai2' ... , ai", E Ei
such that (uav, ail ai2 ... ai",) E R or (ail ai2 ... ai", , uav) E R. Hence,
uavx --Rail ai2 ... ai", x = ail ai2 ... aim ua;", ... Uai2 Uail -*-R e by the
induction hypothesis. This implies that aU a = avxu ~ R e, since MR is
a group. D7.5.1
Since the set. En and the strings U a for a E ~n can be determined effec-
tively, Lemma 7.5.1 induces the following result.
Theorem 7.5.2 The group problem is effectively reducible to the prob-
lem RV-uniform-word-problem.
Given a finite presentation (E; R), the set ~n can be determined in poly-
nomial time. Thus, the complexity of this reduction depends on the lengths
of the strings ua(a E ~n)' As it turns out these strings may have expo-
nential length. We close this consideration with an example of a monoid
presentation defining a group.
Examples 7.5.3 Let ~ = {a,b 1,b2, ... ,bm+1} for some m ~ 1, and let
R = {(b1a,e),(abl,e)} U {(b~,bi+1) I i = 1,2, ... ,m}. Then we have
~l = {a,bd, ~2 = {a,bl,b2}'''''~m+1 = {a,b1,b2, ... ,bm+d = ~.
Further, we get Ua = b1 , Ubl = a, Ub 2 = a 2, ... , Ub",+l = a 2"'. Obvi-
ously, the monoid MR presented by (~; R) is a group. But IUbi I = 2i - 1
for i = 1,2, ... , m + 1, that is, the candidate Ub",+l for the inverse of the
letter bm+1 is of exponential length. D7.5.3
170 7. Algebraic Properties
So far we have seen that both the problems free monoid and group are
effectively reducible to the problem RV-uniform-word-problem. How-
ever, all these problems are undecidable in general.
Now assume that C is a class of finite presentations such that there exists
an algorithm A(C) satisfying
{I
A(C)((~;R),u) = o If~ u ~R e,
u.p.--t R e,
for all presentations (~; R) from C and all strings u E ~*, that is, A(C)
solves the problem RV-uniform-word-problem when restricted to C.
Then Theorem 7.4.9 and Theorem 7.5.2 yield the following result.
Theorem 7.5.4 Let C be a class of finite presentations as described above.
Then the problems free monoid and group are decidable, when they are
restricted to presentations from C.
Lemma 7.4.8 shows that in order to decide whether or not the monoid
MR given through the presentation (~; R) from C is a free monoid, we must
determine the set ~l = {a E ~ I a ~R e}. This is the only point, where
algorithm A(C) is applied. Similarly, given a presentation (~; R) from C,
we can effectively determine the subset ~n of ~, and for each letter a E ~,
we can compute a candidate U a for the right-inverse of a modulo R. Now
algorithm A(C) is only used to check whether or not the string U a actually
is a right-inverse of a modulo R, that is, whether or not aUa ~ R e holds.
As an application let us consider the class Cc of all presentations of the
form (~; R), where R is a finite noetherian and confluent string-rewriting
system on ~. Obviously, the problem RV-uniform-word-problem is de-
cidable for this class. Hence, we can conclude the following from Theorem
7.5.4.
Corollary 7.5.5 The problems free monoid and group are decidable,
when they are restricted to presentations involving finite, noetherian and
confluent string-rewriting systems.
and monoids, and various decidability and undecidability results have been
derived during the 1940's and 1950's. Here we mention Markov's undecid-
ability result [Mar51 , Mos52], presented as Theorem 7.3.7. As a general
reference for combinatorial semigroup theory, we would like to point the
interested reader to Lallement's book [Lal79]. Adjan [Adj66] is another
very interesting, though very technical, treatment of many combinatorial
aspects of semigroup and group theory. Concerning the very active field of
combinatorial group theory, we point to the two standard monographs in
this field: [MKS76, LySc77]. In the following we will restrict our attention
to the developments since the late 1970s regarding the problem of deciding
algebraic properties of monoids (and groups) that are given through certain
classes of finite string-rewriting systems.
For groups the word problem reduces to the conjugacy problem, that is,
if the conjugacy problem for a group 9 is decidable, then so is the word
problem for g. For monoids in general, the situation is different. First of
all, we have various different notio~ of conjugacy in monoids.
Let (~; R) be a monoid-presentation. Two strings u, v E ~* are called
cyclically equal (u ~ R v) if there exist strings x, y E ~* such that u +-+:R
xy and v +-+:R yx. Cyclic equality is a reflexive and symmetric relation that
need not be transitive. The strings u, v E ~* are called left-conjugate
(u ......Ii v), if there exists a string w E ~* such that uw +-+:R wv, and they are
conjugate if u ...... Ii v and v ......Ii u. Left-conjugacy is reflexive and transitive,
but in general not symmetric. Thus, these notions, which coincide in case
the monoid M presented by (~; R) is a free monoid or a group, are in
general different. In fact, the problem of cyclic equality, the left-conjugacy
problem and the word problem are algorithmically independent for finitely
presented monoids [Osi73].
We have seen that the word problem for a monoid M is decidable, when-
ever M has a presentation by some finite, noetherian, and 1::onfluent string-
rewriting system. What can we say in this situation about the variants of
the conjugacy problem introduced above? In [Ott84b] it is shown that cyclic
equality and conjugacy coincide for monoids that are presented by finite
special and confluent string-rewriting systems. In addition, it is shown that
these problems are decidable in this setting. Recently, these results have
been extended by Zhang [Zha91] who proves that for all monoids that
are presented by special string-rewriting systems the various notions of
conjugacy coincide, and that the conjugacy problem for such a monoid is
decidable if and only if the conjugacy problem for the group of units of
this monoid is decidable. On the other hand, for monoids that are pre-
sented by finite, noetherian and confluent string-rewriting systems, the
conjugacy problem is undecidable in general [NaOt86]. The uniform version
of the conjugacy problem for finite, length-reducing and confluent string-
rewriting systems is NP-complete [NOW84], while for a fixed finite, length-
reducing and confluent string-rewriting system this problem can be solved
nondeterministically in linear time [NaOt85]. Contrasting this result it is
172 7. Algebraic Properties
The solution to the problem group presented here (Theorem 7.5.2) is from
[Ott86b]. On the other hand it has been shown recently that this problem
remains undecidable when it is restricted to presentations involving finite
special string-rewriting systems [N0091]. This is very interesting since the
original proof of Markov's undecidability result, which is essentially the
one presented here, rests on the construction described in Lemma 3.4.6,
and this construction does not preserve the property of being a finite spe-
cial system. In fact, it can be shown that all Markov properties remain
undecidable when they are restricted to monoids presented by finite spe-
cial string-rewriting systems [Zha94].
Finally, the problems of deciding whether the monoid given through a
finite presentation (~j R) contains a non-trivial idempotent or whether it
contains a non-trivial element of finite order have been shown to be de-
cidable when the systems R considered are finite, monadic and confluent
[Ott85]. Later these results have been extended to all finite, length-reducing
and confluent systems R, and it has been shown that they are in fact
tractable in this setting [NaOt88a].
All the results mentioned so far can be seen as partial answers to the
following general question: What is the algorithmic power of a particular
class of finite string-rewriting systems? Since finite string-rewriting systems
are a way to present monoids and groups, it is natural to ask for an alge-
braic characterization for those monoids (or groups) that can be presented
through the systems of a particular class. This problem can be described
through the following general question: What is the descriptive power of a
particular class of finite string-rewriting systems? Concerning this problem
there have been many investigations. Most results obtained are however
about groups.
Cochet [Coc76] has shown that a group G has a presentation (~, R),
where R is a finite, special and confluent system, if and only if the group G
is the free product of finitely many (finite or infinite) cyclic groups. Squier
[Squ87a] has investigated the class of monoids that can be presented by
this class of string-rewriting systems. He proved that the group of units of
a monoid that has a presentation of this form has itself a presentation of
this form. However, an algebraic characterization for this class of monoids
has not yet been obtained.
On the other hand, it has been shown that a group G has a presentation
(~j R), where R is a finite, monadic and confluent string-rewriting system
on ~ such that each letter from ~ has an inverse of length one, or the
left-hand side of each rule of R has length 2, if and only if G is a plain
group, that is, G is the free product of a free group of finite rank and
finitely many finite groups [AvMa83, AM086]. These groups have been re-
ceiving attention since Haring-Smith [Har83] charactized them in terms of
language-theoretical properties of finite presentations. It has been conjec-
tured that by finite, monadic and confluent string-rewriting systems only
plain groups can be presented [Gil84], but this conjecture is still open.
174 7. Algebraic Properties
However, it has been shown that with finite, length-reducing and con-
fluent systems, only a proper subclass of the context-free groups can
be presented [Die87, MaOt88a, MaOt88bj. Here the group G presented by
(1:; R) is called context-free if the congruence class [ejR is a context-free
language. Analogously, the class of regular groups can be considered. It
is known that a group is regular if and only if it is a finite group [Ani71j,
and the context-free groups have received much attention [AnSe75j. Finally,
Muller and Schupp [MuSc83j succeeded in giving an algebraic character-
ization for the clsss of context-free groups. They showed that a finitely
generated group is context-free if and only if it is virtually free, a result
which was completed through a technical result of Dunwoody [Dun85j.
On the other, Autebert, Boasson and Senizergues [ABS87j proved that a
group is context-free if and only if it has a presentation through some finite
monadic string-rewriting system R that is e-confiuent, that is, confluent
on the congruence class [ejR.
Finally, Squier [Squ87bj established that there are finitely presented
monoids and groups with decidable word problems that cannot be pre-
sented by any finite, noetherian and confluent string-rewriting systems by
showing that each monoid that admits such a presentation must satisfy
the homological finiteness condition FPa. In fact, all these monoids must
already satisfy the condition FPoo [Kob90j.
A detailed account of the results on the descriptive power of various
classes of finite string-rewriting systems can be found in [MaOt89j. Further,
algorithmic properties of finite string-rewriting systems that are special or
monadic and that are only confluent on certain congruence classes have
been investigated in several papers (see, for example, [MaOt91, OtZh91]).
However, we must refer the reader to the references for these results since
discussing these topics here would surely exceed the space available.
References
[Adj66) S.L Adjan, Defining Relations and Algorithmic Problems
for Groups and Semigroups, Proc. Steklov Institute Math-
ematics 85, American Mathematical Society, Providence,
Rl,1966.
[Ani71) A.V. Anissimov, Group languages, Cybernetics 7 (1971),
594-601.
[AnSe75) A.V. Anissimov and F.D. Seifert, Zur algebraischen
Charakteristik der durch kontext-freie Sprachen definierten
Gruppen, Elektronische Informationsverarbeitung und Ky-
bernetik 11 (1975),695-702.
[ABS87) J.-M. Autebert, L. Boasson, and G. Senizergues, Groups
and NTS languages, J. Computer System Sciences 35
(1987), 243-267.
[AvMa83) J. Avenhaus and K. Madlener, On groups defined by
monadic Thue systems, in Algebra, Combinatorics and
Logic in Computer Science, Proc. Colloquium Mathemat-
ical Society, Janos Bolyai 42, Hungary (1983), 63-71.
[AM086) J. Avenhaus, K. Madlener, and F. Otto, Groups presented
by finite two-monadic Church-Rosser Thue systems, Trans-
actions American Mathematical Society 297 (1986), 427-
443.
[Bau81) 'G. Bauer, Zur Darstellung von Monoiden durch konfiuente
Regelsysteme, Doctoral Dissertation, Universitat Kaisers-
lautern, Kaiserslautern, Germany, 1981.
[BaOt84) ,G. Bauer and F. Otto, Finite complete rewriting systems
and the complexity of the word problem, Acta Informatica
21 (1984), 521-540.
[Ber77) J. Berstel, Congruences plus que parfaites et langages alge-
briques, Seminaire d'Informatique Theorique, Institute de
Programmation (1976-77), 123-147.
[Ber79) J. Berstel, 1'ransductions and Context-free Languages,
Teubner Studienbticher, Stuttgart, Germany, 1979.
[BlLo83) W. Bledsoe and D. Loveland (eds.) , Automated Theorem
Proving: After 25 Years, Contemporary Mathematics Vol.
29, American Mathematical Society, Providence, Rl, 1983.
176 References
cancellativity, 124
canonical string-rewriting system, DECIDE-FM, 165
42 decision problem
k-characterization of security, 145 cancellativity, 172
Church-Rosser congruence, 77 common ancestor 10, 57
Church-Rosser property, 11 uniform version, 37, 40
common ancestor problem, 10,57 common descendant, 10, 57,
uniform version, 37 93
common descendant problem, 10, uniform version, 37, 40
57,93 confluence, 61
uniform version, 37 conjugacy, 170
common left-multiplier, 125 Correspondence Problem, 39
common right-multiplier, 125 cyclic equality, 124
compatibility, 43 extended word problem, 93
completion procedure, 52 finite-state acceptors
confluence, 11, 72 emptiness, 24
on a cpngruence class, 70 finiteness, 24
local, 11 membership, 24
confluence modulo, 15 for linear sentences, 101, 119
local, 16 free monoid, 162
congruence general halting problem, 30
Index 185
Melvin Fitting
Flrst'()rder logic and Automated Theorem Proving
1990. XIV, 242 pages, 26 iIIus.
Nissim Francez
Fairness
1986. XIII, 295 pages, 147 iIIus.
David Gries
The Sclenc~ of Programming
1981. XV, 366 pages
Micha Hofri
Probabilistic Analysis of Algorithms
1987. XV, 240 pages, 14 iIIus.
(continued)
Dexter C. Kozen
The Design and Analysis of Algorithms
1992. X, 320 pages, 72 iIIus.
E.V. Krishnamurthy
Error-Free Polynomial Matrix Computations
1985. XV, 154 pages
David Luckham
Programming with Specifications: An Introduction to ANNA, A Language for
Specifying Ada Programs
1990. XVI, 418 pages, 20 iIIus
Helmut A. Partsch
Specification and Transformation of Programs
1990. XIII, 493 pages, 44 iIIus.
(continued)
Alan T. Sherman
VLSI Placement and Routing: The PI Project
1989. XII, 189 pages, 47 iIIus.
Niklaus Wirth
Programming In Modula-2, 4th Edition
1988. II, 182 pages
Study Edition
Edward Cohen
Programming In the 1990s: An Introduction to the Calculation of Programs
1990. >N, 265 pages