Professional Documents
Culture Documents
Textbook Mathematical Foundations of Automata Theory Pin J E Ebook All Chapter PDF
Textbook Mathematical Foundations of Automata Theory Pin J E Ebook All Chapter PDF
https://textbookfull.com/product/mathematical-foundations-of-
automata-theory-jean-eric-pin/
https://textbookfull.com/product/mathematical-foundations-of-
quantum-mechanics-neumann/
https://textbookfull.com/product/mathematical-foundations-for-
linear-circuits-and-systems-in-engineering-john-j-shynk/
https://textbookfull.com/product/mathematical-foundations-of-
computational-electromagnetism-franck-assous/
Cellular Learning Automata: Theory and Applications
Reza Vafashoar
https://textbookfull.com/product/cellular-learning-automata-
theory-and-applications-reza-vafashoar/
https://textbookfull.com/product/ma257-introduction-to-number-
theory-j-e-cremona/
https://textbookfull.com/product/mathematical-foundations-of-
computer-science-1st-edition-satyanarayana/
https://textbookfull.com/product/language-and-automata-theory-
and-applications-shmuel-tomi-klein/
https://textbookfull.com/product/notes-on-formal-languages-
automata-computability-and-complexity-gallier-j/
Mathematical Foundations
of Automata Theory
Jean-Éric Pin
These notes form the core of a future book on the algebraic foundations of
automata theory. This book is still incomplete, but the first eleven chapters
now form a relatively coherent material, covering roughly the topics described
below.
3
4
characterised the locally testable languages. The logical counterpart of the first
result was obtained by Thomas [158]. These successes settled the power of the
algebraic approach, which was axiomatized by Eilenberg in 1976 [40].
Acknowledgements
Several books on semigroups helped me in preparing these notes. Clifford and
Preston’s treatise [28, 29] remains the classical reference. My favourite source
for the structure theory is Grillet’s remarkable presentation [53]. I also borrowed
a lot from the books by Almeida [3], Eilenberg [40], Higgins [58], Lallement [73]
7
and Lothaire [75] and also of course from my own books [91, 86]. Another
source of inspiration (not yet fully explored!) are the research articles by my
colleagues Jorge Almeida, Karl Auinger, Jean-Camille Birget, Olivier Carton,
Mai Gehrke, Victor Guba, Rostislav Horčı́k, John McCammond, Stuart W.
Margolis, Dominique Perrin, Mark Sapir, Imre Simon, Ben Steinberg, Howard
Straubing, Pascal Tesson, Denis Thérien, Misha Volkov, Pascal Weil and Marc
Zeitoun.
I would like to thank my Ph.D. students Laure Daviaud, Luc Dartois,
Charles Paperman and Yann Pequignot, my colleagues at LIAFA and LaBRI
and the students of the Master Parisien de Recherches en Informatique (notably
Aiswarya Cyriac, Nathanaël Fijalkow, Agnes Köhler, Arthur Milchior, Anca Ni-
tulescu, Pierre Pradic, Léo Stefanesco, Boker Udi, Jill-Jênn Vie and Furcy) for
pointing out many misprints and corrections on earlier versions of this doc-
ument. I would like to acknowledge the assistance and the encouragements
of my colleagues of the Picasso project, Adolfo Ballester-Bolinches, Antonio
Cano Gómez, Ramon Esteban-Romero, Xaro Soler-Escrivà, Maria Belén Soler
Monreal, Jorge Palanca and of the Pessoa project, Jorge Almeida, Mário J.
J. Branco, Vı́tor Hugo Fernandes, Gracinda M. S. Gomes and Pedro V. Silva.
Other careful readers include Achim Blumensath and Martin Beaudry (with
the help of his student Cédric Pinard) who proceeded to a very careful reading
of the manuscript. Anne Schilling sent me some very useful remarks. Special
thanks are due to Jean Berstel and to Paul Gastin for providing me with their
providential LATEX packages.
I Algebraic preliminaries . . . . . . . . . . . . . . . . . . . . . . . 1
1 Subsets, relations and functions . . . . . . . . . . . . . . . . . . . . 1
1.1 Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Relations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.3 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.4 Injective and surjective relations . . . . . . . . . . . . . . . 4
1.5 Relations and set operations . . . . . . . . . . . . . . . . . 7
2 Ordered sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
i
ii CONTENTS
5 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
6 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
1 Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
2 Equational characterisation of lattices . . . . . . . . . . . . . . . . 162
3 Lattices of languages closed under quotients . . . . . . . . . . . . . 164
4 Streams of languages . . . . . . . . . . . . . . . . . . . . . . . . . . 165
5 C-streams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
6 Varieties of languages . . . . . . . . . . . . . . . . . . . . . . . . . . 167
7 The variety theorem . . . . . . . . . . . . . . . . . . . . . . . . . . 168
8 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
9 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
10 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
Annex 289
A A transformation semigroup . . . . . . . . . . . . . . . . . . . 291
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307
Chapter I
Algebraic preliminaries
(X c )c = X (X ∪ Y )c = X c ∩ Y c (X ∩ Y )c = X c ∪ Y c
We let |E| denote the number of elements of a finite set E, also called the size
of E. A singleton is a set of size 1. We shall frequently identify a singleton {s}
with its unique element s.
Given two sets E and F , the set of ordered pairs (x, y) such that x ∈ E and
y ∈ F is written E × F and called the product of E and F .
1.2 Relations
Let E and F be two sets. A relation on E and F is a subset of E × F . If
E = F , it is simply called a relation on E. A relation τ can also be viewed as
a function1 from E to P(F ) by setting, for each x ∈ E,
τ (x) = {y ∈ F | (x, y) ∈ τ }
τ −1 = {(y, x) ∈ F × E | (x, y) ∈ τ }
τ −1 (y) = {x ∈ E | y ∈ τ (x)}
1 Functions are formally defined in the next section, but we assume the reader is already
1
2 CHAPTER I. ALGEBRAIC PRELIMINARIES
A relation from E into F can be extended to a function from P(E) into P(F )
by setting, for each subset X of E,
[
τ (X) = τ (x) = {y ∈ F | for some x ∈ X, (x, y) ∈ τ }
x∈X
= {x ∈ E | τ (x) ∩ Y 6= ∅}
1 1
2
2
3
E
3 4
Then τ (1) = {1, 2}, τ (2) = {1, 3, 4}, τ (3) = ∅, τ −1 (1) = {1, 2}, τ −1 (2) = {1},
τ −1 (3) = {2}, τ −1 (4) = {2}.
Given two relations τ1 : E → F and τ2 : F → G, we let τ1 τ2 or τ2 ◦ τ1 denote
the composition of τ1 and τ2 , which is the relation from E into G defined by
1.3 Functions
A [partial] function ϕ : E → F is a relation on E and F such that for every
x ∈ E, there exists one and only one [in the case of a partial function, at most
one] element y ∈ F such that (x, y) ∈ ϕ. When this y exists, it is denoted by
ϕ(x). The set
is called the range or the image of ϕ. Given a set E, the identity mapping on
E is the mapping IdE : E → E defined by IdE (x) = x for all x ∈ E.
A mapping ϕ : E → F is called injective if, for every u, v ∈ E, ϕ(u) = ϕ(v)
implies u = v. It is surjective if, for every v ∈ F , there exists u ∈ E such
that v ∈ ϕ(u). It is bijective if it is simultaneously injective and surjective. For
instance, the identity mapping IdE (x) is bijective.
Proof. Suppose that τ is injective and let X and Y be two disjoint subsets of
E. If τ (X) ∩ τ (Y ) 6= ∅, then τ (x) ∩ τ (y) 6= ∅ for some x ∈ X and y ∈ Y . Since
τ is injective, it follows that x = y and hence X ∩ Y 6= ∅, a contradiction. Thus
X ∩ Y = ∅.
If the condition of the statement holds, then it can be applied in particular
when X and Y are singletons, say X = {x} and Y = {y}. Then the condition
becomes x 6= y implies τ (x) ∩ τ (y) = ∅, that is, τ is injective.
Proof. (1) implies (2). Suppose that τ is injective and let y ∈ τ −1 ◦ τ (x). By
definition, there exists z ∈ τ (x) such that y ∈ τ −1 (z). Thus x ∈ Dom(τ ) and
z ∈ τ (y). Now, τ (x) ∩ τ (y) 6= ∅ and since τ is injective, x = y. Therefore
τ −1 ◦ τ ⊆ IdDom(τ ) . But if x ∈ Dom(τ ), there exists by definition y ∈ τ (x) and
thus x ∈ τ −1 ◦ τ (x). Thus τ −1 ◦ τ = IdDom(τ ) .
(2) implies (3) is trivial.
(3) implies (1). Suppose that τ −1 ◦ τ ⊆ IdE and let x, y ∈ E. If τ (x) ∩ τ (y)
contains an element z, then z ∈ τ (x), z ∈ τ (y) and y ∈ τ −1 (z), whence y ∈
τ −1 ◦ τ (x). Since τ −1 ◦ τ ⊆ IdE , it follows that y = x and thus τ is injective.
Proof. The result follows from Proposition 1.10 since, by Proposition 1.8, τ is
a partial function if and only if τ −1 is injective.
6 CHAPTER I. ALGEBRAIC PRELIMINARIES
α β
β ◦ α−1
E F
Let z ′ ∈ β ◦ α−1 (x). Then z ′ = β(y ′ ) for some y ′ ∈ α−1 (x). Thus α(y ′ ) = x and
since α(y) = α(y ′ ), the condition of the statement implies that β(y) = β(y ′ ).
Thus z = z ′ , which shows that β ◦ α−1 is a function.
τ (X) − τ (Y ) ⊆ τ (X ∪ Y ) − τ (Y ) ⊆ τ (X − Y )
More precise results hold for inverses of functions on the one hand, and for
surjective partial functions on the other hand.
8 CHAPTER I. ALGEBRAIC PRELIMINARIES
2 Ordered sets
If R is a relation on E, two elements x and y of E are said to be related by R
if (x, y) ∈ R, which is also denoted by x R y.
A relation R is reflexive if, for each x ∈ E, x R x, symmetric if, for each
x, y ∈ E, x R y implies y R x, antisymmetric if, for each x, y ∈ E, x R y and
y R x imply x = y and transitive if, for each x, y, z ∈ E, x R y and y R z
implies x R z.
A relation is a preorder if it is reflexive and transitive, an order (or partial
order) if it is reflexive, transitive and antisymmetric and an equivalence relation
(or an equivalence) if it is reflexive, transitive and symmetric. If R is a preorder,
the relation ∼ defined by x ∼ y if and only if x R y and y R x is an equivalence
relation, called the equivalence relation associated with R.
Relations are ordered by inclusion. More precisely, if R1 and R2 are two
relations on a set S, R1 refines R2 (or R1 is thinner than R2 , or R2 is coarser
than R1 ) if and only if, for each s, t ∈ S, s R1 t implies s R2 t. Equality is
thus the thinnest equivalence relation and the universal relation, in which all
elements are related, is the coarsest. The following property is obvious.
Proposition 2.20 Any intersection of preorders is a preorder. Any intersec-
tion of equivalence relations is an equivalence relation.
It follows that, given a set R of relations on a set E, there is a smallest
preorder [equivalence relation] containing all the relations of E. This relation is
called the preorder [equivalence relation] generated by R.
Proposition 2.21 Let R1 and R2 be two preorders [equivalence relations] on
a set E. If they commute, the preorder [equivalence relation] generated by R1
and R2 is equal to R1 ◦ R2 .
3. EXERCISES 9
3 Exercises
1. Let ϕ1 : E1 → E2 , ϕ2 : E2 → E3 and ϕ3 : E3 → E1 be three functions.
Show that if, among the mappings ϕ3 ◦ ϕ2 ◦ ϕ1 , ϕ2 ◦ ϕ1 ◦ ϕ3 , and ϕ1 ◦ ϕ3 ◦ ϕ2 ,
two are surjective and the third is injective, or two are injective and the third
is surjective, then the three functions ϕ1 , ϕ2 and ϕ3 are bijective.
The purpose of this chapter is to introduce the basic algebraic definitions that
will be used in this book: semigroups, monoids, groups and semirings, mor-
phisms, substructures and quotients for these structures, transformation semi-
groups and free semigroups. We also devote a short section to idempotents, a
central notion in finite semigroup theory.
11
12 CHAPTER II. SEMIGROUPS AND BEYOND
Idempotents
Let S be a semigroup. An element e of S is an idempotent if e = e2 . The set of
idempotents of S is denoted by E(S). We shall see later that idempotents play
a fundamental role in the study of finite semigroups.
An element e of S is a right identity [left identity] of S if, for all s ∈ S, se = s
[es = s]. Observe that e is an identity if and only if it is simultaneously a right
and a left identity. Furthermore, a right [left] identity is necessarily idempotent.
The following elementary result illustrates these notions.
Zeros
An element e is said to be a zero [right zero, left zero] if, for all s ∈ S, es = e = se
[se = e, es = e].
A semigroup is called null if it has a zero and if the product of two elements is
always zero.
2 That is, the set on which the semigroup is defined.
3A singleton {s} will also be denoted by s.
1. SEMIGROUPS, MONOIDS AND GROUPS 13
Cancellative elements
An element s of a semigroup S is said to be right cancellative [left cancellative]
if, for every x, y ∈ S, the condition xs = ys [sx = sy] implies x = y. It is
cancellative if it is simultaneously right and left cancellative.
A semigroup S is right cancellative [left cancellative, cancellative] if all its
elements are right cancellative [left cancellative, cancellative].
Inverses
We have to face a slight terminology problem with the notion of an inverse.
Indeed, semigroup theorists have coined a notion of inverse that differs from the
standard notion used in group theory and elsewhere in mathematics. Usually,
the context should permit to clarify which definition is understood. But to avoid
any ambiguity, we shall use the terms group inverse and semigroup inverse when
we need to distinguish the two notions.
Let M be a monoid. A right group inverse [left group inverse] of an element
x of M is an element x′ such that xx′ = 1 [x′ x = 1]. A group inverse of x is an
element x′ which is simultaneously a right and left group inverse of x, so that
xx′ = x′ x = 1.
We now come to the notion introduced by semigroup theorists. Given an
element x of a semigroup S, an element x′ is a semigroup inverse or simply
inverse of x if xx′ x = x and x′ xx′ = x′ .
It is clear that any group inverse is a semigroup inverse but the converse is
not true. A thorough study of semigroup inverses will be given in Section V.2,
but let us warn the reader immediately of some counterintuitive facts about
inverses. An element of an infinite monoid may have several right group inverses
and several left group inverses. The situation is radically different for a finite
monoid: each element has at most one left [right] group inverse and if these
elements exist, they are equal. However, an element of a semigroup (finite or
infinite) may have several semigroup inverses, or no semigroup inverse at all.
1.3 Groups
A monoid is a group if each of its elements has a group inverse. A slightly weaker
condition can be given.
Proposition 1.3 A monoid is a group if and only if each of its elements has a
right group inverse and a left group inverse.
Proof. In a group, every element has a right group inverse and a left group
inverse. Conversely, let G be a monoid in which every element has a right
group inverse and a left group inverse. Let g ∈ G, let g ′ [g ′′ ] be a right [left]
inverse of g. Thus, by definition, gg ′ = 1 and g ′′ g = 1. It follows that g ′′ =
g ′′ (gg ′ ) = (g ′′ g)g ′ = g ′ . Thus g ′ = g ′′ is an inverse of g. Thus G is a group.
Proof. Let G be a finite monoid in which every element has a left group inverse.
Given an element g ∈ G, consider the map ϕ : G → G defined by ϕ(x) = gx.
We claim that ϕ is injective. Suppose that gx = gy for some x, y ∈ G and let
g ′ be the left group inverse of g. Then g ′ gx = g ′ gy, that is x = y, proving
the claim. Since G is finite, Proposition I.1.7 shows that ϕ is also surjective.
In particular, there exists an element g ′′ ∈ G such that 1 = gg ′′ . Thus every
element of G has a right group inverse and by Proposition 1.3, G is a group.
1.5 Semirings
A semiring is a quintuple consisting of a set k, two binary operations on k,
written additively and multiplicatively, and two elements 0 and 1, satisfying the
following conditions:
(1) k is a commutative monoid for the addition with identity 0,
(2) k is a monoid for the multiplication with identity 1,
(3) Multiplication is distributive over addition: for all s, t1 , t2 ∈ k, s(t1 +t2 ) =
st1 + st2 and (t1 + t2 )s = t1 s + t2 s,
(4) for all s ∈ k, 0s = s0 = 0.
A ring is a semiring in which the monoid (k, +, 0) is a group. A semiring is
commutative if its multiplication is commutative.
2. EXAMPLES 15
2 Examples
We give successively some examples of semigroups, monoids, groups, ordered
monoids and semirings.
Ruvennenko runoilullen
Tämän ajan asioista; —
Kuinka ajan kunkin kulku
Menojansa muutteleepi.
Samoin kaikki kansan toimet
Tapojansa toimittaapi
Aina kullakin ajalla;
Kuin on täällä kulkeminen,
Milloin myötä-, milloin vasta-
Tuulta täällä soudettava
Tämän maaliman merellä,
Ihmisillä ilman alla.
Kuitenkin on kulkijoilla,
Nykyajan asujoilla
Monenmoista muuttelua;
Joita nyt nykyinen aika
Tuopi etehen enemmän
Kaiken kansan keskentehen.
Kun on vielä vaaliajat,
Valtiollen valmistukset,
Edusmiesten evästykset.
Näistä ompi nähtävänä,
Näistä toimista tulokset,
Kuinka ompi Suomen kansa
Eri seuroiksi erinnä,
Pukeutunna puolueisiin,
Joita on jollain nimillä.
Siitäpä tulevi sitten,
Ett on kansasta kadonnut,
Sopu kaikki sortununna,
Veljeys manallen mennyt,
Mielet monimielisiksi;
Joista syntyy sanasota,
Kiistelyjä kiivahia.
Vaan mikä puolueista parahin
Ompi maata moittimassa,
Vielä vanhoja tapoja,
Se on suuret sosialistit,
Mokraatit monilukuiset;
Jotka kautta kokousten
Juttujansa jutteleepi;
Akitaattorien avulla.
Vaan on näissä joutavia
Monen puolueen puheissa.
Nää on aina alkusyynä
Että seuroja enemmän,
Puolueita kaikin paikoin.
Ompi sitten syntymässä.
Eri seuroiksi elämä
Turmiollen turmeltuupi;
Josta näky nähtävänä,
Edessämme esimerkit,
Miten on mielet muuttunehet,
Sopu kaikki sortununna
Kansan kaikissa tiloissa.
Paha on nähä näkevän,
Paha kuulla kuulevankin.
Toista oli aika ennen,
Viime vuosikymmeniset.
Eipä silloin elämässä
Ollut paljon puolueita;
Oli kaksi kaikestansa:
Olihan omat suomalaiset,
Vaarit vanhat ruotsalaiset.
Nyt on uudet urohomme
Ottanehet ohjelmaansa
Kutsut kuudella nimellä.
Ansainneeko aineheksi,
Ottaa puheeksi pakina,
Sanella saunaväestä,
Kyllin kylpyvierahista?
Vai lie aine aivan huono
Sanella runosanoiksi?
Vaan kuin sanoo sananlasku,
Että kaikki kelpajaakin
Laulajallen virren laadut;
Kun vaan saisi sattumahan
Sanan synnyt syitä myöten,
Luottehet lomia myöten.
Vesi on aivan arvollista
Ollut aikojen alusta.
Vettä kaikki kaipajaapi,
Koko Luojan luomakunta.
Vettä aivan arvosteli
Entiset esi-isätkin,
Koska sanoiksi sanovat
Kalevankin kansalaiset:
Ilma on emoja ensin,
Vesi vanhin veljeksiä.
Entäs nyt nykyinen aika,
Kuin on tarkat tutkimukset
Veden voimasta valittu,
Mitä auttais kylmä kylpy,
Mitä lämmin miellyttäisi,
Mitä savi, mitä suola,
Mitä höyry höydyttäisi —
Etten taida tarkemmasti
Nimittää niitä nimiä,
Mitä saapi saunavieras
Veden voimasta kokea
Kylpytiellä käydessänsä.
Kun on nyt tavaksi tullut,
Kylpykeino keksittynä,
Jota suosii suuret herrat,
Rouvat myöskin rohtonansa,
Viinit, hienot ryökkynätkin,
Ehkäpä ei pahaa tekisi
Höyrykylpy kyntäjällen,
Saada vähän virkistystä.
Mieli maistuisi mesillen,
Hunajallen höyrähtäisi;
Kuten tämän kertojankin,
Kun on ollut osallisna
Kylpijänä Kuopiossa.
Ehkä vaikutti vesikin,
Virkistänyt vanhan mieltä,
Kun hän kiireellä kyhäsi
Runon kehnon kylpijöillen,
Saunaväellen saneli.