<<

A Completeness Theorem for Kleene

Algebras and the Algebra of Regular

Events

Dexter Kozen

Department of Computer Science

Cornell University

Ithaca New York

kozencsco rn ell ed u

Abstract

Wegive a nitary axiomatization of the algebra of regular events

involving only equations and equational implications Unlike Salo

maas axiomatizations the axiomatization given here is sound for all

interpretations over Kleene algebras

Intro duction

Kleene algebras are algebraic structures with op erators and

satisfying certain axioms They arise in various guises in a number of

tings relational algebra semantics and logics of programs

automata and theory and the design and analysis

of algorithms

An imp ortant example of a is Reg the family of regular

sets over a nite alphab et The equational theory of this structure has

b een called the algebraofregular events This theory was rst studied by

Infor and Comput May A preliminary version of this pap er

app eared as

Kleene who p osed axiomatization as an op en problem Salomaa

gavetwo complete axiomatizations of the algebra of regular events in

but these axiomatizations dep ended on rules of inference that are not sound

in general under nonstandard interpretations Redkoproved in that

no nite set of equational axioms could characterize the algebra of regular

events The algebra of regular events and its axiomatization is the sub ject

of the extensive monograph of Conway The bulk of Conways treatment

is innitary In wegave a complete innitary equational deductive

system for the algebra of regular events that is sound over all continuous

Kleene algebras A completeness theorem for relational algebras with

a prop er sub class of Kleene algebras was given byNgandTarski but

their axiomatization relies on the presence of a converse op erator Schematic

equational axiomatizations for the algebra of regular events necessarily rep

resenting innitely many equations havebeengiven by Krob and Blo om

There is some disagreement regarding the denition of Kleene algebras

The literature contains several inequivalent denitions In this pap er

weintro duce yet another a Kleene algebra is any mo del of the equations and

equational implications given in x

By general considerations of equational logic the axioms of Kleene al

gebra listed in x along with the usual axioms for equalityinstantiation

and rules for the intro duction and elimination of implications constitute a

complete deductive system for the universal Horn theory of Kleene algebras

the set of univ ersally quantied equational implications

n n

true in all Kleene algebras

The main result of this pap er is that this deductive system is complete

for the algebra of regular events In other words two regular expressions

and over denote the same regular set in Reg if and only if the equation

is a logical consequence of the axioms Equivalently Reg is the free

Kleene algebra on free generators

This gives a more satisfactory solution to Kleenes question than Salo

maas solution since the axiomatization is sound over an entire arrayof

imp ortant nonstandard interpretations arising in computer science The re

sult is proved by enco ding the classical combinatorial constructions of the

theory of nite automata eg state minimization algebraically

There is an extensive literature on the algebra of regular events

and much of the development of this pap er is a recapitulation of previous

work For example the construction of a transition representing

a nite automaton equivalent to a given is essentially

implicit in the work of Kleene and app ears in Conways monograph

the algebraic approach to the elimination of transitions app ears in the

workofKuich and Salomaa and Sakarovitch and the results on

the of Kleene algebras under the formation of matrices essentially

go backtoConways monograph and the thesis of Backhouse We

extend this program byshowing how to enco de algebraically two fundamental

constructions in the theory of nite automata

determinization of an automaton via the construction and

state minimization via equivalence mo dulo a MyhillNero de equivalence

relation

We then use the uniqueness of the minimal deterministic nite automaton

to obtain completeness

Conway states a similar theorem without pro of in the latter part of his

b o ok Theorem p Krob based on work of Boa and

Archangelsky have recently indep endently obtained similar results based

on dierenttechniques

Examples of Kleene Algebras

Kleene algebras ab ound in computer science Wehave already mentioned

the regular sets Reg

In the area of relational algebra the family of binary relations on a set

with the op erations of for relational comp osition

R S fx z jy x y R y z S g

for the empty relation for the identity relation for and reexive tran

sitive closure for constitute a Kleene algebra

In semantics and logics of programs Kleene algebras are used to mo del

programs in Dynamic Logic and Dynamic Algebra

In the design and analysis of algorithms n n Bo olean matrices and ma

trices over the socalled min algebra are used to derive ecient algorithms

for reachability and shortest paths in directed graphs A Kleene alge

bra in which gives the vector sum of two p olygons and gives the convex

hull of the of two p olygons has b een used to solve a cycle problem in

graphs These Kleene algebras app ear in in the guise of closed

which are similar to the Salgebras of Conway also called

Kleene semirings Closed semirings and Salgebras are dened in terms

P

of an innitary summation op erator whose sole purp ose it seems is to

dene These structures are all closely related the precise relationship is

drawn in

Salomaas Axiomatizations

Before one can fully appreciate the axiomatization of x it is imp ortantto

understand Salomaas axiomatizations and their limitations Let R

denote the interpretation of regular expressions over in the Kleene algebra

Reg in which

R a fag a

This is called the standard interpretation

Salomaa presented two axiomatizations F and F for the algebra of

regular events and proved their completeness Aanderaa indep endently

presented a system similar to Salomaas F Backhouse gave an algebraic

version of F These systems are equational except for one rule of inference

in each case that is sound under the standard interpretation R butnot

sound in general over other interpretations

To describ e the system F letussay a regular expression p ossesses the

empty wordproperty EWP if the regular set it denotes under R contains

the null string The EWP can b e characterized syntactically a regular

expression has the EWP if either

for some

is a sum of regular expressions at least one of which has the EWP

or

is a pro duct of regular expressions b oth of whichhavetheEWP

The system F contains the rule

do es not havetheEWP

The rule is sound under the standard interpretation R butthe

proviso do es not have the EWP is not algebraic in the sense that it

is not preserved under substititution Consequently is not valid under

nonstandard interpretations For example if and are the single

letters a b and c resp ectively then holds but it do es not hold after the

substitution

a b c

Another waytosaythisisthatmust not b e interpreted as a universal

Horn formula Salomaas system F is somewhat dierent from F but suers

from a similar drawback

In contrast the axioms for Kleene algebra given in x b elow are all equa

tions or equational implications in which the symb ols are regarded as uni

versally quantied so substitution is allowed

Axioms for Kleene Algebra

A Kleene algebra is an

K K

satisfying the following equations and equational implications

a b c a bc

a b b a

a a

a a a

abc abc

a a

a a

ab c ab ac

a bc ac bc

a

a

aa a

a a a

b ax x a b x

b xa x ba x

where refers to the natural partial order on K

a b a b b

Instead of and wemight take the equivalent axioms

ax x a x x

xa x xa x

Axioms say that K is an idemp otent commutative

Axioms say that K is a monoid Axioms saythat

K is an idemp otent

The remaining axioms deal with They say essentially that

b ehaves like the op erator of formal language theory or the

reexiv e transitive closure op erator of relational algebra Using and the

distributivity axiom we see that

b aa b a b

thus the left hand side of the implication is satised when a b is sub

stituted for xmoreover says that a b is the least elementof K for

which this is true In short a b is the least prexp oint of the monotone map

x b ax

Axioms are studied by Pratt who attributes and to

Schroder and Dedekind The equivalence of and and by symmetry

of and are proved in

No attempt has b een made to reduce the axioms ab ove to a minimal set

and no claim is made as to their indep endence

All the structures mentioned in x in particular Reg are Kleene alge

bras

Elementary consequences

In this section we derive some basic consequences of the Kleene algebra ax

ioms These prop erties are quite elementary and have b een observed b efore

by many dierent authors We do not claim any of them as original results

but include them merely for the sake of completeness We refer the reader

to for a comprehensiveintro duction

It is straightforward to verify that the relation is a partial order and is

monotone with resp ect to all the Kleene algebra op erators in the sense that

if a bthenac bc ca cb a c b cand a b With resp ect to

K is an upp er semilattice with join given by andminimum element

Basic prop erties of suchas

a

a a

a a a

a a

are also easily derived See for formal pro ofs

Lemma In any Kleene algebra a is the unique element satisfying

and It is also the unique element satisfying and

Proof By a satises the inequality

ax x

when substituted for x By it is the least suchelement Thus a is

unique

The second assertion is proved by a symmetric argumentinvolving

and

Prop osition In any Kleene algebra the inequalities and can be

strengthenedtoequations

aa a

a a a

Proof The inequalityaa a is given by Toshow

a aa

it suces by and to show that

a aa aa

But this is immediate from and the monotonicityof and

The pro of of a a a is symmetric

The following result was observed by Pratt

Prop osition Under the assumptions the implications and

areequivalent Under the assumptions and the implications

and areequivalent

Proof Weprove the rst statement the second is symmetric First

assume and the premise of By assumption ax x therefore

x ax x By a x xDischarging the hyp othesis we obtain the

implication

Now assume and the premise of By assumption b ax x

thus b x and ax x By a x xandby monotonicity a b a x

therefore a b x Discharging the hyp othesis we obtain the implication

The following prop osition is a key to ol in the completeness pro of of x

Prop osition In al l Kleene algebras

ax xb a x xb

Proof Supp ose rst that ax xbThen

axb xbb

by monotonicityand

x xbb xb

by and distributivity therefore by monotonicity

x axb x xbb

xb

By

a x xb

By a symmetric argument using and

xb ax xb a x

The prop osition follows from these two implications

Corollary In al l Kleene algebras

cd c cdc

Proof Substitute c for x cd for aand dc for b in Prop osition

Corollary Let p be an invertible element of a Kleene algebra with inverse

p Then

p a p p ap

Proof Wehave

a p pp a p

pp ap

by Corollary The result follows bymultiplying on the left by p

Prop osition In al l Kleene algebras

a b a ba

Proof Toshow

a b a ba

observe that

a ba

aa ba a ba

ba ba ba

a ba

therefore

a ba ba aa ba ba ba

a ba

Then follows from

To show the reverse inequalitywe use the monotonicity of all the op era

tors

a ba a b a ba b

a b a b

a b

Matrices over a Kleene Algebra

Under the natural denitions of the op erators and the family

Mn K of n n matrices over a Kleene algebra K again forms a Kleene

algebra This is a standard result proved for various classes of algebras in

None of Conways or Backhouses algebras are Kleene algebras in our

sense and their results do not imply the result we need here so wemust

provide an explicit pro of Nevertheless many of the techniques are similar

Dene and on Mn K to b e the usual op erations of matrix addition

and multiplication resp ectively Z the n n zero matrix and I the n n

n n

identity matrix The partial order is dened on Mn K by

A B A B B

Under these denitions it is routine to verify

Lemma The structure

ZI Mn K

n n

is an idempotent semiring that is the Kleene algebra axioms are

satised

Proof See

The denition of E for E Mn K comes from We rst

consider the case n This construction will later b e applied inductively

Let

a b

E

c d

Let f a bd c and dene

f f bd

E

d cf d d cf bd

This construction is motivated bya twostate nite automaton over the

a b

alphab et fa b c dg with states fs tg and transitions s s s t

c d

t s t t For each pair of states u v consider the set of input strings in

taking state u to state v in this automaton Eachsuch set is regular and

is represented by a regular expression corresp onding to those derived for the

matrix E

s s a bd c

s t a bd c bd

t s d ca bd c

t t d d ca bd c bd

Lemma The matrix E dened in satises the Kleene algebra axioms

That is

I EE E

I E E E

and for any X

EX X E X X

XE X XE X

Proof Weshow and The arguments for and are

symmetric

The matrix inequality reduces to the four inequalities

af bd cf f

af bd bd d cf bd f bd

cf dd cf d cf

cf bd dd d cf bd d d cf bd

in K These are equivalent to the inequalities

ff f

f bd ff bd

dd cf d cf

dd cf bd d cf bd

resp ectively whichfollow from the axioms and basic prop erties of x

Wenow establish We show that holds for X an arbitrary

column vector of length then for X any n matrix follows by

applying this result to the columns of X separately

Let

x

X

y

We need to show that under the assumptions

ax by x

cx dy y

we can derive

f x f bd y x

d cf x d d cf bd y y

We establish and in a of steps With eachstepweidentify

the premises from which the conclusion follows by one of the axioms or basic

prop erties of x

ax x

by x

cx y

dy y

d y y

bd y by monotonicity

bd y x

bd cx bd y monotonicity

bd cx x

fx x

f x x

f bd y f x monotonicity

f bd y x

d cf x d cx monotonicity

d cx d y monotonicity

d cf x y

d cf bd y d cf x monotonicity

d cf bd y y

The conclusion now follows from and and follows from

and

Wenow apply this argument inductively

Lemma Let E Mn K There is a unique matrix E Mn K

satisfying the Kleene algebra axioms That is

I EE E

I E E E

and for any n m matrix X over K

EX X E X X

XE X XE X

Proof Partition E into submatrices A B C and D suchthat A and D

are square

A B

E

C D

By the induction hyp othesis D exists and is unique Let F A BD C

Again by the induction hyp othesis F exists and is unique We dene

F F BD

E

D D CF D CF BD

and claim that E satises The pro of is essentially identical to the

pro of of Lemma Wemust check that the axioms and basic prop erties of x

used in the pro of of Lemma still hold when the primitivesymb ols of regular

espressions are interpreted as matrices of various dimensions provided there

is no typ e mismatch in the application of the op erators

The uniqueness of E follows from Lemma

Combining Lemmas and we obtain

Theorem The structure

Mn K ZI

n n

is a Kleene algebra

We remark that the inductive denition of E in Lemma is inde

p endent of the partition of E chosen in This is a consequence of Lemma

once wehave established that the resulting structure is a Kleene algebra

under some partition cf Theorem p

In the pro of of Lemma wemust check that the basic axioms and

prop erties of x still hold when the primitive letters of regular expressions are

interpreted as matrices of various shap es p ossibly nonsquare provided there

is no typ e mismatch in the application of op erators eg one cannot add t wo

matrices unless they are the same shap e one cannot form the matrix pro duct

AB unless the column dimension of A is the same as the row dimension of

B and one cannot form the matrix A unless A is square In general all

the axioms and basic prop erties of Kleene algebra listed in x hold when the

primitive letters are interpreted as p ossibly nonsquare matrices over a Kleene

algebra provided that there are no typ e conicts in the application of the

Kleene algebra op erators A quick review of the axioms and basic prop erties

of x in light of this more general interpretation will suce to convince the

reader of the truth of this statement

For example the Kleene algebra theorem

ax xb a x xb

Prop osition holds even when a is an m m matrix b is an n n matrix

and x is an m n matrix

For another example consider the distributivelaw

ab c ab ac

Interpreting a b and c as matrices over a Kleene algebra K this equation

makes sense provided the shap es of b and c are the same and the column

dimension of a is the same as the row dimension of b and c Other than that

there are no typ e constraints It is easy to verify that the distributivelaw

holds for any matrices a b and c satisfying these constraints

For a more involved example consider the equational implication of Prop o

sition

ax xb a x xb

The typ e constraints saythata and b must b e square say s s and t t

resp ectively and that x must b e s t Under this typing all steps of the

pro of of Prop osition involveonlywelltyp ed expressions thus the pro of

remains valid

Finite Automata

Regular expressions and nite automata have traditionally b een used as syn

tactic representations of the regular languages over an alphab et The re

lationship b etween these two formalisms forms the basis of a welldevelop ed

classical theory Classical developments range from the more combinatorial

to the more algebraic The approach taken in this

pap er must ultimately b e attributed to Conway

In this section we dene the notion of an automaton over an arbitrary

Kleene algebra In subsequent sections we will use this formalism to derive

the classical results of the theory of nite automata equivalence with regular

expressions determinization via the subset construction elimination of

transitions and state minimization as consequences of the axioms of x

In the following although we consider regular expressions and automata

as syntactic ob jects as a matter of convenience we will b e reasoning mo d

ulo the axioms of Kleene algebra Ocially regular expressions will denote

elements of F the free Kleene algebra over The Kleene algebra F is con

structed by taking the quotient of the regular expressions mo dulo provable

equivalence The asso ciated canonical map assigns to each regular expres

sion its equivalence class in F Since wewillbeinterpreting expressions

only over Kleene algebras and all interpretations factor through F via the

canonical map this usage is without loss of generality

The following denition is closer to the algebraic denition used for ex

ample in than to the combinatorial denition used in

Denition A nite automaton over K is a triple

A u A v

n

where u v f g and A Mn K for some n

The states are the row and column indices The vector u determines the

start states and the vector v determines the nal statesastart state is an

index i for which ui and a nal state is one for which v i The

n n matrix A is called the transition matrix

The language acceptedby A is the element

T

u A v K

For automata over F the free Kleene algebra on free generators this

denition is essentially equivalent to the classical combinatorial denition of

an automaton over the alphab et as found in A similar denition

can b e found in

Example Consider the twostate automaton in the sense of with

states fp q g start state p nal state q and transitions

a a b b

p p q q p q q q

Classically this automaton accepts the set of strings over fa bg contain

ing at least one o ccurrence of b In our formalism this automaton is sp ecied

by the triple

a b

a b

Mo dulo the axioms of Kleene algebra wehave

h i

a b

a b

h i

a a ba b

a b

a ba b

The language in Reg accepted by this automaton is the image under R

of the expression

Denition Let A u A v b e an automaton over F the free Kleene

algebra on free generators The automaton A is said to b e simple if A can

b e expressed as a sum

X

A J a A

a

a

where J and the A are matrices In addition A is said to b e free if J

a

is the zero matrix Finally A is said to b e deterministic if it is simple and

free and u and all rows of A have exactly one

a

In Denition refers to the null string The matrix A in cor

a

resp onds to the adjacency matrix of the graph consisting of edges lab eled a

in the combinatorial mo del of automata or the image of a under a

linear representation map in the algebraic approach of An automaton

is deterministic according to this denition i it is deterministic in the sense

of

The automaton of Example is simple free and deterministic

Completeness

In this section we prove the completeness of the axioms of x for the algebra of

regular events Another way of stating this is that Reg is isomorphic to F

the free Kleene algebra on free generators and the standard interpretation

R F Reg collapses to an isomorphism of Kleene algebras

The rst lemma asserts that Kleenes representation theorem

is a theorem of Kleene algebra

Lemma For every regular expression over or moreaccurately its

image in F under the canonical map there is a simple automaton u A v

over F such that

T

u A v

Proof The pro of is by induction on the structure of the regular expres

sion We essentially implement the combinatorial constructions as found for

example in The ideas b ehind this construction are well known and

can b e found for example in

For a the automaton

a

suces since

h i

a

h i

a

a

For the expression letA u A v and B s B t b e automata

such that

T

u A v

T

s B t

Consider the automaton with transition matrix

A

B

and start and nal state vectors

u v

and

s t

resp ectively This construction corresp onds to the combinatorial construction

of forming the disjoint union of the two sets of states taking the start states

to b e the union of the start states of A and B and the nal states to b e the

union of the nal states of A and B Then

A A

B B

and

i h

A v

T T

s u

B t

T T

u A v s B t

For the expression let A u A v and B s B t b e automata

such that

T

u A v

T

B t s

Consider the automaton with transition matrix

T

A vs

B

and start and nal state vectors

u

and

t

resp ectively This construction corresp onds to the combinatorial construction

of forming the disjoint union of the two sets of states taking the start states

to b e the start states of A the nal states to b e the nal states of B and

connecting the nal states of A with the start states of B by transitions

T

this is the purp ose of the vs in the upp er right corner of the matrix Then

T T

A vs A vs B A

B B

and

T

h i

A A vs B

T

u

B t

T T

u A vs B t

For the expression letA u A v b e an automaton suchthat

T

u A v

We rst pro duce an automaton equivalent to the expression Consider

the automaton

T

u A vu v

This construction corresp onds to the combinatorial construction of adding

transitions from the nal states of A back to the start states Using Prop o

sitions and

T T T T

u A vu v u A vu A v

T T

u A v u A v

we can get an automaton for Once wehave an automaton for

by the construction for given ab ove using a trivial onestate

automaton for

Nowwegetridoftransitions This construction is also folklore and can

b e found for example in This construction mo dels algebraically the

combinatorial idea of computing the closure of a state see

Lemma For every simple automaton u A v over F there is a simple

free automaton s B t such that

T T

u A v s B t

Proof By Denition the matrix A can b e written as a sum A J A

where J is a matrix and A is free Then

T T

u A v u A J v

T

u J A J v

by Prop osition so we can take

T T

s u J

B A J

t v

Note that J is and therefore B is free

The following two results are algebraic analogs of the determinization of

automata via the subset construction and the minimization of determinis

tic automata via the collapsing of equivalent states under a MyhillNero de

equivalence relation These results are apparently new although the deter

minization result was recently given indep endently by Krob x using

dierenttechniques

Lemma For every simple free automaton u A v over F thereisa

b

b b

deterministic automaton u A v over F such that

T T

b

b b

u A v u A v

Proof We mo del the subset construction algebraically Let

u A v b e a simple free automaton with states Q By Denition A

can b e expressed

X

a A A

a

a

where eac h A is a matrix

a

Let P Q denote the p ower set of QWe identify elements of P Q with

n

their characteristic vectors in f g For each s PQ let e be the

s

P Q vector with in p osition s and elsewhere

th T

Let X b e the P Q Q matrix whose s rowiss ie

T T

e X s

s

th

b

For each a let A b e the P Q PQ matrix whose s rowise T

a

s A

a

in other words

T

b

e A e T

a

s A

s

a

Let

X

b b

A a A

a

a

b

u e

u

b

v Xv

b

b b

The automaton u A v is simple and deterministic

b

The relationship b etween A and A is expressed succinctly by the equation

b

XA AX

Intuitively this says that the actions of the two automata in the two spaces

Q P Q

K and K commute with the pro jection X Toprove observethat

for any s PQ

T T

e XA s A

s

X

T

a s A

a

a

X

T

a e X

s A

a

a

X

T

b

a e A X

a

s

a

T

b

e AX

s

By Prop osition or rather its extension to nonsquare matrices as de

scrib ed in x

b

XA A X

The theorem nowfollows

T T

b b

b b

u A v e A Xv

u

T

e XA v

u

T

u A v

u A v Lemma Let u A v be a simple deterministic automaton and let

be the equivalent minimal deterministic automaton obtainedfrom the classical

state minimization procedure Then

T T

u A v u A v

Proof In the combinatorial approach the unique minimal au

tomaton is obtained as a quotientby a MyhillNero de equivalence relation af

ter removing inaccessible states Wesimulate this construction algebraically

Q

Let Q denote the set of states of u A v For q Qlete f g

q

denote the vector with in p osition q and elsewhere For a let A be

a

the matrix as given in Denition Then

X

A a A

a

a

For each a and p Q let p a b e the unique state in Q suchthatthe

th T

p rowofA is e ie

a

pa

T T

e A e

a

pa p

The state p a exists and is unique since the automaton is deterministic

First weshowhow to get rid of unreachable states A state q is reachable

if

T

u A e

q

otherwise it is unreachable Let R b e the set of reachable states and let

U Q R b e the set of unreachable states Partition A into four submatrices

A A A and A suchthatforS T fR U g A is the S T

RR RU UR UU ST

submatrix of A Then A is the zero matrix otherwise a state in U would

RU

be reachable Similarly partition the vectors u and v into u u v and v

R U R U

The vector u is the zero vector otherwise a state in U would b e reachable

U

Wehave

T

u A v

h i

v A

R RR

T

u

R

A A v

UR UU U

i h

A v

R

RR

T

u

R

A A v A A

U UR

UU UU RR

T

u A v

R

R RR

Moreover the automaton u A v is simple and deterministic and all

R RR R

states are reachable

Assume nowthatu A v is simple and deterministic and all states are

reachable An equivalence relation on Q is called Myhil lNerode if p q

implies

p a q a a

T T

v v e e

q p

In combinatorial terms is Myhil lNerode if it is resp ected by the action

of the automaton under any input symbol a and the set of nal states

is a union of classes

Let be any MyhillNero de equivalence relation and let

p fq Q j q pg

Q fp j p Qg

Q

For p Q lete f g denote the vector with in p osition p

p

th

and elsewhere Let Y b e the Q Q matrix whose p column is the

characteristic vector of p ie

T T

e Y e

p p

th

For each a let A b e the Q Q matrix whose p rowis

a

e ie

pa

T T

A e e

a

pa p

The matrix A is welldened by Let

a

X

A a A

a

a

T T

u u Y

Q

Also let v f g be the vector suchthat

T T

v e v e

p p

The vector v is welldened by Note also that

T T

e Y v e v

p p

T

e v

p

therefore

Y v v

The automaton u A v is simple and deterministic

A commute with the As in the pro of of Lemma the action of A and

linear pro jection Y

AY Y A

Toprove observe that for any p Q

X

T T

A Y AY a e e

a

p p

a

X

T

Y a e

pa

a

X

T

a e

pa

a

X

T

a e A

a

p

a

X

T

Y a e A

a

p

a

T

Y e A

p

Nowby Prop osition

A Y Y A

therefore

T T

u A v u Y A v

T

u A Y v

T

u A v

Theorem Completeness Let and betworegular expressions over

denoting the same regular set Then is a theorem of Kleene algebra

Proof Let A s A tand B u B v b e minimal deterministic nite

automata over F suchthat

T

R R s A t

T

R R u B v

By Lemmas and wehave

T

s A t

T

u B v

as theorems of Kleene algebra Since

R R

by the uniqueness of minimal automata A and B are isomorphic Let P be

apermutation matrix giving this isomorphism Then

T

A P BP

T

s P u

T

t P v

Using Corollary wehave

T

s A t

T T T T

P u P BP P v

T T T

u P P BP P v

T T T

u PP B PP v

T

u B v

Op en Problems

An intriguing question is whether the techniques develop ed here can b e ex

tended to automata on innite ob jects An algebraic treatment of Safras

construction might conceivably b e used to establish completeness of the

prop ositional calculus Progress toward this goal has recently b een made

byWalukiewicz

Another question is whether the axioms presented in x are complete for

the universal Horn theory of the continuous Kleene algebras

Acknowledgements

Roland Backhouse John Horton Conway MerrickF urst Dana Scott Vaughan

Pratt Ross Willard and an anonymous referee provided valuable criticism

and references The supp ort of the Danish Research Academy the National

Science Foundation through grant CCR the John Simon Guggen

heim Foundation and the US Army Research Oce through ACSyAM

Mathematical Sciences Institute Cornell Universitycontract DAAL

C is gratefully acknowledged

References

Alfred V Aho John E Hop croft and Jerey D Ullman The Design and

Analysis of Computer Algorithms AddisonWesley

S Anderaa On the algebra of regular expressions Appl Math pages

January

K V Archangelsky A new nite complete solvable quasiequational calculus

for algebra of regular languages Manuscript Kiev State University

Roland Carl Backhouse Closure algorithms and the starheight problem of

regular languages PhD thesis Imp erial College

Jean Berstel and Christophe Reutenauer Rational Series and Their Lan

guages SpringerVerlag

Stephen L Blo om and Zoltan Esik Equational axioms for regular sets Tech

nical Rep ort Stevens Institute of TechnologyMay

Maurice Boa Une remarque sur les systemes complets didentites ra

tionnelles Informatique theoretique et ApplicationsTheoretical Informatics

and Applications

John Horton Conway Regular Algebra and Finite Machines Chapman and

Hall

S Eilenberg Automata Languages and Machinesvolume A Academic

Press

F Gecseg and I Peak Algebraic Theory of Automata Akademiai Kiado

John E Hop croft and Jerey D Ullman Introduction to

Languages and Computation AddisonWesley

Kazuo Iwano and Kenneth Steiglitz A semiring on convex p olygons and

zerosum cycle problems SIAM J Comput

Stephen C Kleene Representation of events in nerve nets and nite automata

In Shannon and McCarthy editors Automata Studies pages Princeton

University Press

Dexter Kozen On induction vs continuity In Kozen editor Proc Work

shop Logics of Programsvolume of Lect Notes in Comput Sci pages

SpringerVerlag

Dexter Kozen On Kleene algebras and closed semirings In Rovan editor

Proc Math Found Comput Sci volume of Lect Notes in Comput

Sci pages SpringerVerlag

Dexter Kozen A completeness theorem for Kleene algebras and the algebra

of regular events In Proc th Symp Logic in Comput Sci pages

IEEE July

Daniel Krob A complete system of B rational identities Theoretical Com

puter Science Octob er

Werner Kuich The Kleene and Parikh theorem in complete semirings In

Ottmann editor Proc th Col loq Automata Languages and Programming

volume of Lect Notes in Comput Sci pages EATCS Springer

Verlag

Werner Kuich and Arto Salomaa Semirings Automata and Languages

SpringerVerlag

Harry Lewis and Christos Papadimitriou Elements of the TheoryofCompu

tationPrenticeHall

Kurt Mehlhorn Data Structures and Algorithms Graph Algorithms and

NP CompletenessEATCS Monographs on Theoretical Computer Science

SpringerVerlag

K C Ng Relation Algebras with Transitive Closure PhD thesis University

of California Berkeley

K C Ng and A Tarski Relation algebras with transitive closure abstract

Notices Amer Math Soc AA

Vaughan Pratt Dynamic algebras as a wellb ehav ed fragment of relation

algebras In D Pigozzi editor Proc Conf on Algebra and Computer Science

Lect Notes in Comput Sci SpringerVerlag June

V N Redko On dening relations for the algebra of regular events Ukrain

Mat Z In Russian

Shmuel Safra On the complexityof automata In Proc th Symp Foun

dations of Comput Sci pages IEEE Octob er

Jacques Sakarovitch Kleenes Theorem revisited a formal path from Kleene

to Chomsky In A Kelemenova and J Keleman editors Trends Techniques

and Problems in Theoretical Computer Sciencevolume of Lect Notes in

Computer Science pages SpringerVerlag

Arto Salomaa Two complete axiom systems for the algebra of regular events

J Assoc Comput Mach January

Arto Salomaa and Matti Soittola Automata Theoretic Aspects of Formal

Power Series SpringerVerlag

A Selman Completeness of calculi for axiomatically dened classes of alge

bras Algebra Universalis

Igor Walukiewicz Completeness result for the prop ositional calculus In

Proc th Symp Logic in Comput Sci IEEE June