Algorithmic aspects of finite semigroup and automata theory using - - PDF document

algorithmic aspects
SMART_READER_LITE
LIVE PREVIEW

Algorithmic aspects of finite semigroup and automata theory using - - PDF document

Algorithmic aspects of finite semigroup and automata theory using the computer algebra system GAP Manuel Delgado Soria, 20-24/07/2009 GAP Semigroups Automata Automata (II) Semigroups (II) NS References Outline I A short introduction


slide-1
SLIDE 1

Algorithmic aspects

  • f

finite semigroup and automata theory

using the

computer algebra system GAP

Manuel Delgado Soria, 20-24/07/2009

GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Outline I

1

A short introduction to GAP Generalities Basic instructions GAP Functions

2

Semigroups (a crash course) Definitions Morphisms and congruences Syntactic congruence Free monoids Green’s relations

3

Automata (basics) Recognizable languages Rational languages Graphs Σ∗-automata

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 2 / 147

slide-2
SLIDE 2

GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Outline II

Example

4

More on automata Non-deterministic automata varia Kleene’s Theorem Applications

5

Computing kernels of monoids Definitions and easy consequences Motivation On the algorithms Relative kernels and solvability

6

Numerical Semigroups Motivation PM semigroups A database

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 3 / 147 GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Outline III

7

References Software references Basic references Not so basic references Specific references

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 4 / 147

slide-3
SLIDE 3

Generalities Basic instructions GAP Functions GAP Semigroups Automata Automata (II) Semigroups (II) NS References

web pages

GAP: http://www.gap-system.org automata: http://www.gap-system.org/Packages/automata.html SgpViz: http://www.gap-system.org/Packages/sgpviz.html numericalsgps: http://www.gap-system.org/Packages/numericalsgps.html “GAP b´ asico para la docencia”: http://www.ugr.es/ pedro/gap/

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 5 / 147 Generalities Basic instructions GAP Functions GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Generalities on GAP

GAP stands for “Groups, Algorithms and Programming”. GAP is a free and open computer algebra system (you can access the system’s algorithms). It is extensible in the sense that the users can write their own programs and use them the same way as those of the system. GAP is developed internationally, through the cooperation of many

  • people. It appeared in 1986 in Aachen, Germany. In 1997, the

coordination center was transferred to St. Andrews in Scotland. Currently, centers in Aachen, Braunschweig, Fort Collins and St. Andrews coordinate together the development of GAP. There are easy ways to make the installation both in Linux and in Windows or Mac. GAP contains also a high level programming language (i.e., it is a language which is close to the language we speak).

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 6 / 147

slide-4
SLIDE 4

Generalities Basic instructions GAP Functions GAP Semigroups Automata Automata (II) Semigroups (II) NS References

The aspect of a shell where GAP is running:

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 7 / 147 Generalities Basic instructions GAP Functions GAP Semigroups Automata Automata (II) Semigroups (II) NS References

The last line of working area gap> is ready to receive the instructions.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 8 / 147

slide-5
SLIDE 5

Generalities Basic instructions GAP Functions GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Manual

The manual of GAP is composed by 5 books: Tutorial, Reference Manual, Programming Tutorial, Programming Reference Manual and New Features for Developers. In the doc folder, there is a sub-folder named htm providing access to the content of the manuals in html format. The complete path is file:///usr/local/lib/gap4r4/doc/htm/index.htm in a Linux standard installation. (In windows it is C:\gap4r4\doc\htm.) The manuals are also available in other formats, for example in pdf. The complete path in a Linux standard installation for the reference manual is /usr/local/lib/gap4r4/doc/ref/manual.pdf.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 9 / 147 Generalities Basic instructions GAP Functions GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Basic instructions

To end a GAP session, one has simply to write quit; followed by return, or to press simultaneously the keys ctrl-d. When an error occurs, GAP enters a break loop. This is indicated by brk> The get out of the loop one can proceed as to end a GAP session: to write quit; followed by return, or pushing up the keys ctrl-d at the same time. To make a comment one should use the symbol #. All that is written in same line to the right of this symbol is ignored by GAP. In what follow, we also use this symbol to clarify some details in the examples given.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 10 / 147

slide-6
SLIDE 6

Generalities Basic instructions GAP Functions GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Example

gap> 5 +34 * 2;(3 +9) * 4; 73 # The priority of the operations... 48 gap> 5(8 +9) Syntax error:; expected 5(8 +9); ^ gap> 5 *(8 +9); 85 gap>(9-7) *(46 +4; Syntax error:) expected (9-7) *(46 +4; ^ gap> # Using the ‘‘ up’’ arrow we can fix it: gap>(9-7) *(46 +4); 100

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 11 / 147 Generalities Basic instructions GAP Functions GAP Semigroups Automata Automata (II) Semigroups (II) NS References

In GAP the level of priority of arithmetic operators is as usual.

Example

gap> 24 * 2-5 ^ 2; 23 gap> 45 = 34 +11 and 45 = 45; true gap> 34 <> 67; true gap> 56 = 56 +1; false Each instruction given should always end with ; (semicolon) then GAP executes the instruction and gives the answer. Two consecutive semicolons ;; following an instruction make GAP to execute the instruction but not to show the answer to the user.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 12 / 147

slide-7
SLIDE 7

Generalities Basic instructions GAP Functions GAP Semigroups Automata Automata (II) Semigroups (II) NS References

To save the work developed in a GAP session, one may write the instruction LogTo(”path / filename ”);. To stop saving to the file filename should be written in LogTo();. The file can then be read and edited with a text editor.

Example

gap> LogTo"example1"; gap> a: = 12; 12 gap> a: = a +3; 15 gap> LogTo; The command InputLogTo works like LogTo, but rather than writing the inputs and output, only writes the inputs.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 13 / 147 Generalities Basic instructions GAP Functions GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Usually it is more practical to develop programs in a text editor (where you can save, read later and easily change) and copy them to GAP or read them with the command Read in GAP. To read a file

  • ne must specify the path.

Example

gap> Read "Desktop/Soria_2009/gap/example2.g";

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 14 / 147

slide-8
SLIDE 8

Generalities Basic instructions GAP Functions GAP Semigroups Automata Automata (II) Semigroups (II) NS References

GAP Functions

A program written in the GAP language is called a function. In GAP there are many pre-defined functions.

Example

gap> Factorial{23}; 25852016738884976640000 gap> gcd{18,32,8}; 2 gap> s5 := SymmetricGroup(5);; gap> GeneratorsOfGroup(s5); [ (1,2,3,4,5), (1,2) ] gap> IsAbelian(s5); false ... brk>

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 15 / 147 Generalities Basic instructions GAP Functions GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Functions may be defined in two ways. One is by using the symbol

  • >, as the example below illustrates.

Example

gap> triple: = x-> x * 3; function(x) ... end After defining the function, it can be applied to concrete cases many

  • times. For instance, we calculate the triple to 15.

Example

gap> triple{15}; 45

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 16 / 147

slide-9
SLIDE 9

Generalities Basic instructions GAP Functions GAP Semigroups Automata Automata (II) Semigroups (II) NS References

It is also possible to define functions using the following syntax: functionname:=function(arguments) instructions end;

Example

gap> name:=function(n) > Print("My name is ",n,"\n"); > end; function( n ) ... end gap> name("Manuel"); My name is Manuel

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 17 / 147 Generalities Basic instructions GAP Functions GAP Semigroups Automata Automata (II) Semigroups (II) NS References

The names of the functions which are part of GAP always begin with capitalized letters. Thus, a function whose name begins with a lowercase letter will not have compatibility problems. To complete the editing of functions, (from the GAP or defined by the user) can use to key tab after typing the first letters of the name

  • f the desired function.

In GAP, as in other programming languages, there are the following pre-defined: if (if ... then); while (while ... do); repeat (repeat ... until); for (for each object of the list do ...)

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 18 / 147

slide-10
SLIDE 10

Generalities Basic instructions GAP Functions GAP Semigroups Automata Automata (II) Semigroups (II) NS References

The syntax of the phrase if is: if condition then instructions fi; The else part may be omitted. One can write the condition if inside another several times, both in full and in abbreviated form. if condition then instructions else if condition then instructions else instructions fi, fi; if condition then instructions elif condition then instructions else instructions fi; The while, repeat and for are known as loops, since they allow to loop over the same set of instructions. The syntax: while bool-expr do statements od; repeat statements until bool-expr ; for variable in list do statements

  • d;

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 19 / 147 Definitions Morphisms and congruences Syntactic congruence Free monoids Green’s relations GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Semigroups and monoids

A semigroup (S, ⊙) is a non empty set S, the underlying set of the semigroup, in which an operation ⊙ : S × S → S is defined. The notation x ⊙ y instead of ⊙(x, y) is commonly used. It is also common to represent the operation simply by · (or even to omit it) and call it product. When there is no danger of confusion, we write S for (S, ⊙). Saying that the operation is associative means that, ∀x, y, z ∈ S, (x ⊙ y) ⊙ z = x ⊙ (y ⊙ z). This just means that the identity (x ⊙ y) ⊙ z = x ⊙ (y ⊙ z) is satisfied.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 20 / 147

slide-11
SLIDE 11

Definitions Morphisms and congruences Syntactic congruence Free monoids Green’s relations GAP Semigroups Automata Automata (II) Semigroups (II) NS References

A monoid is a semigroup with a neutral element, i.e., an element 1 such that 1x = x = x1, to any element x of the underlying set. Note that a semigroup can not have more than a neutral element. Therefore, we can use a special notation for it, which can be the same for all monoids. Sometimes, to avoid confusion, we write 1M to denote the neutral element of the monoid M. If a semigroup S has no identity element, we can add to S an element 1 / ∈ S satisfying 1 · 1 = 1 and 1 · a = a · 1 = a, for any a ∈ S. We define S1 =

  • S

if S has neutral element S ∪ {1}

  • therwise

Note that S1 is the smallest monoid (under inclusion) containing S. A semigroup is said to have a zero if it has an element 0 such that the identities x0 = 0x = 0 are satisfied. It is immediate to see that a semigroup can not have more than one zero.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 21 / 147 Definitions Morphisms and congruences Syntactic congruence Free monoids Green’s relations GAP Semigroups Automata Automata (II) Semigroups (II) NS References

An element e of a semigroup is said to be idempotent if e2 = e · e = e. A group is a monoid such that any element x has an inverse, i.e., there exists an element x−1 of the underlying set such that xx−1 = x−1x = 1. Note that an element of a group can not have more than one inverse.

Example

Let N and N0 denote the set of positive integers and non negative integers, respectively. The (usual) addition in any of these sets is denoted by +.

(N, +) is a semigroup (but not a monoid); (N0, +) is a monoid whose neutral element is 0.

Let A be a set and let AA be the set of mappings from A to A. Denote by ◦ the composition of functions..

(AA, ◦) is a monoid whose neutral element is the identity function.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 22 / 147

slide-12
SLIDE 12

Definitions Morphisms and congruences Syntactic congruence Free monoids Green’s relations GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Let M be a monoid with neutral element 1. A subset N of M containing 1 which is closed under the product in M is said to be a submonoid of M. (If the condition 1 ∈ N is not required, then N is a subsemigroup of M.) It is clear that N with the induced operation is a monoid itself. The notation N ≤ M means that N is a submonoid of M.

Example

For any monoid M, {1} and M are submonoids of M. The submonoids of (N0, +) whose complement in N0 is finite are called numerical semigroups.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 23 / 147 Definitions Morphisms and congruences Syntactic congruence Free monoids Green’s relations GAP Semigroups Automata Automata (II) Semigroups (II) NS References

It is easy to show that the intersection of a family of submonoids of a given monoid M is a submonoid of M. Let X be a subset of a monoid M. The submonoid X ∗ =

  • Y

≤ M X ⊆ Y Y is said to be the submonoid of M generated by X. Note that X ∗ is the smallest (under inclusion) submonoid of M containing X. When dealing with semigroups it is used the notation X +. Let X and Y be subsets of a monoid M. We define the product of X by Y to be the following subset of M: XY = {xy | x ∈ X, y ∈ Y }.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 24 / 147

slide-13
SLIDE 13

Definitions Morphisms and congruences Syntactic congruence Free monoids Green’s relations GAP Semigroups Automata Automata (II) Semigroups (II) NS References

It is immediate that the power-set P(M) of M endowed with this

  • peration is a monoid (with neutral element {1}).

Singular sets are usually represented by the single letter they contain. Thus, it is common to write, for instance, xY instead of {x}Y . Let X be a subset of the monoid M. We define: X 0 = {1}; X n = {x1 · · · xn | x1, . . . , xn ∈ X}, for n ∈ N. It is easy to show that if X is a subset of a monoid M, then X ∗ =

n∈N0 X n.

The notation X is also used for the submonoid of M (or the subsemigroup of S) generated by X, that is, the least submonoid (subsemigroup) of M (S) containing X. A monoid (or a semigroup) is said to be finitely generated if it is generated by a finite set.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 25 / 147 Definitions Morphisms and congruences Syntactic congruence Free monoids Green’s relations GAP Semigroups Automata Automata (II) Semigroups (II) NS References

If S = A, A is said to be a generating set of the semigroup S. If A = {a} ⊆ S is a singular set, then we represent by a the subsemigroup of S generated by a, a =

  • a, a2, a3, . . .
  • .

If there are no positive integers n and m such that an = am, then it is easy to see that a is isomorphic to the additive semigroup N and is

  • infinite. If there are such positive integers, a is finite and it is not

too difficult to prove the following:

Proposition 2.1

If S = a is finite of order n, then there are unique positive integers i and p such that: i) S =

  • a, a2, a3, . . . , ai+p−1

. ii) ai = ai+p. iii) n = i + p − 1. iv) G =

  • ai, . . . , ai+p−1

is a cyclic group, whose neutral element is the only idempotent of S.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 26 / 147

slide-14
SLIDE 14

Definitions Morphisms and congruences Syntactic congruence Free monoids Green’s relations GAP Semigroups Automata Automata (II) Semigroups (II) NS References

The following picture illustrates the proposition. a a2 ai = ai+p aω The neutral element of the group G appearing in preceding proposition is denoted by aω. Note that as a consequence we have that if S is a finite semigroup and a ∈ S, then there exists a natural number k such that ak is an idempotent.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 27 / 147 Definitions Morphisms and congruences Syntactic congruence Free monoids Green’s relations GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Relations

Let A and B be sets. A relation from A to B is s subset R of A × B. When B = A we say that R is a binary relation on A. A binary relation that is simultaneously reflexive, symmetric and transitive is said to be an equivalence relation. An equivalence relation on a set splits the set into equivalence classes. A (partial) function ϕ from A to B, denoted ϕ : A → B, is a relation from A to B such that for each element x ∈ A there exists (at most) one element y ∈ B such that (x, y) ∈ ϕ. One may compose relations in a natural way: if ϕ : A → B ψ : B → C are relations, then (a, c) ∈ ψ ◦ ϕ : A → C if there exists b ∈ B such that (a, b) ∈ ϕ and (b, c) ∈ ψ. A function, as defined usually, may be seen as a relation: if ρ : A → B is a function, then the graph {(a, ρ(a)) | a ∈ A} is a relation from A to B. The “inverse” of a function may also be seen as a relation.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 28 / 147

slide-15
SLIDE 15

Definitions Morphisms and congruences Syntactic congruence Free monoids Green’s relations GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Homomorphisms

A semigroup homomorphism is a function f : S → T from a semigroup S into a semigroup T such that f (xy) = f (x)f (y), ∀x, y ∈ S. If, in addition, S and T are monoids and the image by f of the identity of S is the identity of T, we say that f is a monoid homomorphism. Usually, when we are dealing with monoids, we only consider monoid homomorphisms and, when there is no risk of confusion, we say just homomorphism. If f is an onto homomorphism, we say that T is an homomorphic image of S. A homomorphism that is one-one and onto is said to be an isomorphism. If there is an isomorphism from a monoid M to a monoid N, we say that the monoids M and N are isomorphic.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 29 / 147 Definitions Morphisms and congruences Syntactic congruence Free monoids Green’s relations GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Relational morphisms

Let S and T be monoids. A relational morphism of monoids τ : S− →

  • T is a function from S into P(T) = 2Q, the power set of

T, such that: for all s ∈ S, τ(s) = ∅; for all s1, s2 ∈ S, τ(s1)τ(s2) ⊆ τ(s1s2); 1 ∈ τ(1). A relational morphism τ : S− →

  • T is, in particular, a relation in

S × T. Thus, composition of relational morphisms is naturally defined. Homomorphisms, seen as relations, and inverses of onto homomorphisms are examples of relational morphisms.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 30 / 147

slide-16
SLIDE 16

Definitions Morphisms and congruences Syntactic congruence Free monoids Green’s relations GAP Semigroups Automata Automata (II) Semigroups (II) NS References

A monoid M is said to divide a monoid N, and we write M | N in this case, if there exists a submonoid S of N and an onto homomorphism ϕ : S → M, that is, M is a homomorphic image of a submonoid of N. S N M ι

ϕ

Note that ι ◦ ϕ−1 is a relational morphism.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 31 / 147 Definitions Morphisms and congruences Syntactic congruence Free monoids Green’s relations GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Congruences

An equivalence relation ρ in a monoid M is said to be a congruence in M if ∀a, b, c ∈ M, (a, b) ∈ ρ = ⇒ (ac, bc), (ca, cb) ∈ ρ.

Example

Let Z = (Z, +). For n ∈ N, the relation ≡n defined by a ≡n b ⇐ ⇒ n divide b − a is a congruence in Z. Let ρ be a congruence in a monoid M. We can define a binary

  • peration in the set M/ρ of the equivalence classes of ρ through the

following rule (aρ) · (bρ) = (ab)ρ.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 32 / 147

slide-17
SLIDE 17

Definitions Morphisms and congruences Syntactic congruence Free monoids Green’s relations GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Showing that the preceding rule does not depend on the representatives chosen, one can obtain the following:

Proposition 2.2

Let ρ be a congruence on the monoid M. The set M/ρ of the equivalence classes of ρ endowed with the product (aρ) · (bρ) = (abρ) is a monoid. The monoid M/ρ with this operation is said to be the quotient of M by ρ.

Example

Given n ∈ N, (Z/≡n, +) is a monoid. It is even a group, called the group of the integers modulo n.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 33 / 147 Definitions Morphisms and congruences Syntactic congruence Free monoids Green’s relations GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Proposition 2.3

Let ρ be a congruence on M and let ϕ : M → M/ρ a → aρ . Then ϕ is an onto homomorphism.

  • Proof. Let a, b ∈ M. We have

ϕ(ab) = (ab)ρ = (aρ)(bρ) = ϕ(a)ϕ(b). Furthermore ϕ(1) = 1ρ is the neutral element of M/ρ. The surjectivity is immediate. The homomorphism defined in the preceding proposition is referred as the canonical homomorphism from M into the quotient monoid M/ρ.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 34 / 147

slide-18
SLIDE 18

Definitions Morphisms and congruences Syntactic congruence Free monoids Green’s relations GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Let ϕ : M → N be a homomorphism. The kernel of ϕ is the relation ker ϕ on M defined by (a, b) ∈ ker ϕ ⇐ ⇒ ϕ(a) = ϕ(b). The following proposition, stated for monoids, holds in many other contexts of abstract algebra. Part 3 is known as the homomorphism theorem.

Proposition 2.4

Let M and N be monoids and let ϕ : M → N be a homomorphism. Then

1

ker ϕ is a congruence on M;

2

ϕ(M) is a submonoid of N;

3

M/ ker ϕ is isomorphic to ϕ(M).

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 35 / 147 Definitions Morphisms and congruences Syntactic congruence Free monoids Green’s relations GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Syntactic congruence

A subset of a monoid M is said to be a M-language. When the monoid M is understood, one usually says simply “language”. Let L be a M-language. We define the relation ∼L on M as follows: (a ∼L b) if and only if (xay ∈ L ⇐ ⇒ xby ∈ L, ∀x, y ∈ M). From the definition, it follows immediately that ∼L=∼M\L.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 36 / 147

slide-19
SLIDE 19

Definitions Morphisms and congruences Syntactic congruence Free monoids Green’s relations GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Proposition 2.5

The relation ∼L is a congruence on M.

  • Proof. To check that ∼L is an equivalence relation is straightforward.

Suppose now that a ∼L b and that c ∈ M. For any x, y ∈ M we have x(ac)y ∈ L ⇐ ⇒ xa(cy) ∈ L ⇐ ⇒ xb(cy) ∈ L ⇐ ⇒ x(bc)y ∈ L, thus (ac) ∼L (bc). One can show analogously that (ca) ∼L (cb), thus ∼L is a congruence on M. The congruence ∼L is said the syntactic congruence of L and the quotient M/∼L is said the syntactic monoid of L.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 37 / 147 Definitions Morphisms and congruences Syntactic congruence Free monoids Green’s relations GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Let L be a M-language. We say that a congruence ρ on M saturates L if L is a union of ρ equivalence classes.

Proposition 2.6

Let M be a monoid and let L be a M-language. The syntactic congruence ∼L is the biggest congruence (under inclusion) that saturates L

  • Proof. Suppose that u ∼L v. If u ∈ L, then u = 1u1 ∈ L thus

v = 1v1 ∈ L. It follows that ∼L saturates L. Suppose that ρ is a congruence on M that saturates L and suppose that u ρ v. Then xuy ρ xvy for any x, y ∈ M, thus, for any choice of x, y ∈ M, either xuy, xvy ∈ L or xuy, xvy ∈ L. This means that, for any x, y ∈ M, xuy ∈ L if and only if xvy ∈ L. Thus u ∼L v.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 38 / 147

slide-20
SLIDE 20

Definitions Morphisms and congruences Syntactic congruence Free monoids Green’s relations GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Free monoids

Let Σ be a finite non empty set. It will be convenient to refer Σ as an alphabet and its elements as letters. A word in Σ is a finite sequence of letters. This sequence may be

  • empty. The empty sequence is called the empty word and is

represented by 1. The notation ε is also used. Given a word u in Σ, we use the convention u0 = 1 and, for an integer n ≥ 1, un = un−1 · u, that is, un = u · · · u

n times

.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 39 / 147 Definitions Morphisms and congruences Syntactic congruence Free monoids Green’s relations GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Let w = σ1 · · · σn (σi ∈ Σ) be a non empty word in Σ. The integer n is said to be the length of w and is denoted by |w|. The notation |w|σ is used for the number of occurrences of the letter σ in w. The content of w is the set {σ1, . . . , σn} of letters that

  • ccur in w and is denoted by c(w). We define |1| = 0 and c(1) = ∅.

Example

Let Σ = {σ, τ}. Then

1

{1, σ, τ, σ2, στ, τσ, τ 2} = {w ∈ Σ∗ : |w| ≤ 2};

2

c(σ2τσ) = {σ, τ}.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 40 / 147

slide-21
SLIDE 21

Definitions Morphisms and congruences Syntactic congruence Free monoids Green’s relations GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Let u and v be words in Σ. We say that u is prefix of v if v = uw for some word w in Σ; u is suffix of v if v = wu for some word w in Σ; u is factor of v if v = zuw for some words w and z in Σ. u = σ1 · · · σn is a sub-word of v if v = u0σ1u1σ2 · · · σnun for some words u0, . . . , un in Σ.

Example

Let w = abacbacb. Then aba is a prefix of w, acb is a suffix, bacb is a factor and bcbc is a sub-word of w.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 41 / 147 Definitions Morphisms and congruences Syntactic congruence Free monoids Green’s relations GAP Semigroups Automata Automata (II) Semigroups (II) NS References

One defines a multiplication among words in Σ which is called concatenation, which consists of juxtaposition of words, when these are non-empty. Let σ1 · · · σn, σ′

1 · · · σ′ m be two non empty words in Σ. We define

(σ1 · · · σn) · (σ′

1 · · · σ′ m) = σ1 · · · σnσ′ 1 · · · σ′ m;

1 · (σ1 · · · σn) = (σ1 · · · σn) · 1 = σ1 · · · σn; 1 · 1 = 1. It is clear that this operation is associative and that the empty word is the neutral element. We then have that the set of words in Σ endowed with the operation just defined is a monoid, called the free monoid over Σ. It is denoted by Σ∗. Each letter is naturally identified with the word of length 1 of Σ∗ constituted by that letter.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 42 / 147

slide-22
SLIDE 22

Definitions Morphisms and congruences Syntactic congruence Free monoids Green’s relations GAP Semigroups Automata Automata (II) Semigroups (II) NS References

The algebraic importance of the free monoid is mainly due to the following proposition (which says that the free monoid satisfies the so called universal property).

Proposition 2.7

Let Σ be a non empty finite set, M a monoid and ϕ : Σ → M a

  • function. Then there exists one and only one homomorphism

Φ : Σ∗ → M such that Φ|Σ = ϕ, that is, such that the following diagram commutes. (The function ι is the inclusion.) Σ M Σ∗

ϕ

ι Φ (To say that the diagram commutes means that Φ(i(σ)) = ϕ(σ), for allσ ∈ Σ.)

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 43 / 147 Definitions Morphisms and congruences Syntactic congruence Free monoids Green’s relations GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Proposition 2.8

Every monoid is a homomorphic image of a free monoid.

  • Proof. Let M be a monoid and let Σ be a generating set of M. (Note

that we can take Σ = M, but usually Σ can be taken much smaller.)

Let ϕ : Σ ֒ → M be the. By the universal property, there exists a homomorphism Φ : Σ∗ → M such that Φ|Σ = ϕ. Φ is an onto homomorphism, since any element of M is the product σ1 · · · σn of elements of Σ, thus image by Φ of σ1 · · · σn ∈ Σ∗. The following is an immediate consequence of previous results.

Corollary 2.9

Every monoid is isomorphic to a quotient of a free monoid.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 44 / 147

slide-23
SLIDE 23

Definitions Morphisms and congruences Syntactic congruence Free monoids Green’s relations GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Green’s relations

Next we introduce the equivalence relations L , R, J , H e D. They are known as Green’s relations and are an essential ingredient in semigroup theory. They have been introduced by J. Green in 1951

Definition

Let S be a semigroup and let a, b ∈ S aRb ⇐ ⇒ aS1 = bS1; aL b ⇐ ⇒ S1a = S1b; aJ b ⇐ ⇒ S1aS1 = S1bS1;

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 45 / 147 Definitions Morphisms and congruences Syntactic congruence Free monoids Green’s relations GAP Semigroups Automata Automata (II) Semigroups (II) NS References

The relation H is defined as H = L ∩ R and the relation D is the least equivalence relation containing both L and R. It is not difficult to observe that D = R ◦ L = L ◦ R = L ∨ R. An important result, when dealing with finite semigroups, is the following:

Theorem 2.10

If S is a finite semigroup, then D = J . Let S be a semigroup and let K be one of the Green’s relations on

  • S. We denote by Ka the equivalence class of the element a ∈ S for

the corresponding relation.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 46 / 147

slide-24
SLIDE 24

Definitions Morphisms and congruences Syntactic congruence Free monoids Green’s relations GAP Semigroups Automata Automata (II) Semigroups (II) NS References

The following results are due to Green.

Proposition 2.11

All H -classes of a J -class J of a finite semigroup have the same

  • cardinality. Similarly, all L -classes of J have the same size and all

R-classes of J have the same size. All L -classes of J contain the same number of H -classes and all R-classes of J contain the same number of H -classes.

Proposition 2.12

Every H -class of a semigroup S containing an idempotent is a group. In particular, no H -class contains more than one idempotent. Let S be a semigroup. A subsemigroup of S that happens to be a group is usually called a subgroup of the semigroup.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 47 / 147 Definitions Morphisms and congruences Syntactic congruence Free monoids Green’s relations GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Its worth to mention some other facts:

Proposition 2.13

Let S be a semigroup. The maximal subgroups of S are precisely the H -classes containing idempotents. The maximal subgroups of S contained in a D class are isomorphic. In virtue of the above results, the D-classes of a finite semigroup are usually depicted by means of the so-called “egg-box” pictures.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 48 / 147

slide-25
SLIDE 25

Definitions Morphisms and congruences Syntactic congruence Free monoids Green’s relations GAP Semigroups Automata Automata (II) Semigroups (II) NS References

The presence of an idempotent in a H class is signaled by a “star”.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 49 / 147 Definitions Morphisms and congruences Syntactic congruence Free monoids Green’s relations GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Several important classes of finite semigroups can be defined using Green’s relations. The classes of H -trivial or J -trivial semigroups are such examples. A finite semigroup S is said to be aperiodic if and only if all its subgroups are trivial. One can prove that this is equivalent to being H -trivial.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 50 / 147

slide-26
SLIDE 26

Recognizable languages Rational languages Graphs Σ∗-automata Example GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Automata and recognizable languages

Recall that a subset of a monoid M is said to be a M-language. We say that a M-language L is recognized by a monoid N if there exists a homomorphism ϕ : M → N and a subset P of N such that L = ϕ−1(P). This is equivalent to saying that ϕ−1(ϕ(L)) = L, or that ϕ(L) ∩ ϕ(M \ L) = ∅ (exercise). We also say in that the homomorphism ϕ recognizes L. We say that L is recognizable by a monoid if it is recognized by a finite monoid.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 51 / 147 Recognizable languages Rational languages Graphs Σ∗-automata Example GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Example

1

Let Z = (Z, +) and n ∈ N. The consideration of the homomorphism ϕ : Z → Z/ ≡n a → a ≡n allows us to conclude that the set L of the multiples of n is recognizable by a monoid. Note that L = ϕ−1(0 ≡n).

2

For any monoid M, the homomorphism ϕ : M → {1} recognizes the languages M and ∅.

3

Let Σ = {σ, τ}. The language L = {w ∈ Σ∗ | |w| is a multiple of n} is recognizable by a

  • monoid. In fact, if we consider the homomorphism

ϕ : Σ∗ → Z/≡n defined by ϕ(σ) = ϕ(τ) = 1, we have that L = ϕ−1(0 ≡n).

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 52 / 147

slide-27
SLIDE 27

Recognizable languages Rational languages Graphs Σ∗-automata Example GAP Semigroups Automata Automata (II) Semigroups (II) NS References

A deterministic M-automaton is a quadruple A = (Q, i, F, δ) where Q is a non-empty set (known as the set of states) i is an element of Q (known as the initial state) F is a non-empty subset of Q (known as the set of final states) and δ : Q × M → Q (q, m) → qm is a partial function such that q1 = q, (qm)n = q(mn), for any q ∈ Q, m, n ∈ M (that is, δ is an action of M over Q). The partial function δ is said to be the transition function of the automaton. Note that, instead of the notation δ((q, m)), we are using qm to denote the image of (q, m) ∈ Q × M by δ.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 53 / 147 Recognizable languages Rational languages Graphs Σ∗-automata Example GAP Semigroups Automata Automata (II) Semigroups (II) NS References

The M-language recognized by A is L(A) = {m ∈ M | im ∈ F}. An automaton is said to be finite if it has a finite number of states. A M-language is said to be recognizable by a (deterministic) automaton if it is recognized by some finite M-deterministic automaton.

Proposition 3.1

Let L be a M-language. The following conditions are equivalent:

1

L is recognizable by a monoid;

2

L is recognizable by a (deterministic) automaton;

3

the syntactic monoid M/∼L is finite.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 54 / 147

slide-28
SLIDE 28

Recognizable languages Rational languages Graphs Σ∗-automata Example GAP Semigroups Automata Automata (II) Semigroups (II) NS References

  • Proof. (1 =

⇒ 2) Suppose that there exist a finite monoid N, a homomorphism ϕ : M → N and a subset P ⊆ N such that ϕ−1(P) = L. Let A = (Q, i, F, δ) with Q = N, i = 1, F = P and nm = δ(n, m) = nϕ(m), with n ∈ N and m ∈ M. One has n1 = n and

(nm)m′ = [nϕ(m)]m′ = [nϕ(m)]ϕ(m′) = n[ϕ(m)ϕ(m′)] = n[ϕ(mm′)] = n(mm′),

for any n ∈ N, m, m′ ∈ M, thus δ is an action of M over N and, therefore, A is an M-automaton. One has L(A) = {m ∈ M | im ∈ P} = {m ∈ M | ϕ(m) ∈ P} = L. Thus L is recognizable by a (deterministic) automaton.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 55 / 147 Recognizable languages Rational languages Graphs Σ∗-automata Example GAP Semigroups Automata Automata (II) Semigroups (II) NS References

(2 = ⇒ 3) Let A = (Q, i, F, δ) be a finite M-automaton such that L = L(A). Each m ∈ M induces a partial function δm : Q → Q defined through δm(q) = qm. As Q is finite, there exists a finite number of such functions (no more than |Q||Q|). We define in M he following relation τ: m τ m′ if and only if, for all q ∈ Q, qm = qm′. It is straightforward that τ is an equivalence relation in M. As two elements m, m′ ∈ M are τ-equivalent if and only if δm = δm′, we have that the set M/τ of equivalence classes is finite. To conclude that the syntactic monoid M/∼L is finite it suffices to show that τ ⊆∼L. Suppose that m, m′ ∈ M are τ-equivalent. Let x, y ∈ M and suppose that xmy ∈ L, that is, i(xmy) ∈ F. We then have i(xmy) = ((ix)m)y = ((ix)m′)y = i(xm′y), thus i(xm′y) ∈ F and, therefore, xm′y ∈ L. Analogously, xm′y ∈ L implies xmy ∈ L. It follows that m ∼L m′.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 56 / 147

slide-29
SLIDE 29

Recognizable languages Rational languages Graphs Σ∗-automata Example GAP Semigroups Automata Automata (II) Semigroups (II) NS References

(3 = ⇒ 1) Suppose that M/∼L is finite and let ϕ : M → M/∼L a → a∼L . We will see that ϕ−1(ϕ(L)) = L. First note that L ⊆ ϕ−1(ϕ(L)) holds for any function ϕ. In order to prove the reverse inclusion, let m ∈ ϕ−1(ϕ(L)). Then ϕ(m) = ϕ(ℓ) for some ℓ ∈ L. This implies that m ∼L ℓ. As ∼L saturates L, we have that m ∈ L and, therefore, ϕ−1(ϕ(L)) ⊆ L. this proves that L is recognizable by a monoid. A M-language is said to be recognizable if it satisfies any (and thus all) of the equivalent conditions of previous proposition. The set of all recognizable M-languages is denoted by Rec M.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 57 / 147 Recognizable languages Rational languages Graphs Σ∗-automata Example GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Proposition 3.2

Let L ∈ Rec M. Then M \ L ∈ Rec M.

  • Proof. Let ϕ : M → N be a homomorphism from M into a finite

monoid N and P ⊆ N be such that L = ϕ−1(P). Then M \ L = ϕ−1(N \ P).

Proposition 3.3

Let L1, L2 ∈ Rec M. Then L1 ∩ L2, L1 ∪ L2 ∈ Rec M.

  • Proof. Let ϕ1 : M → N1 and ϕ2 : M → N2 be homomorphisms from

M into the finite monoids N1 and N2 respectively, and let P1 ⊆ N1 and P2 ⊆ N2 be such that L1 = ϕ−1

1 (P1) and L2 = ϕ−1 2 (P2).

Then the homomorphism ϕ : M → N1 × N2 defined by ϕ(m) = (ϕ1(m), ϕ2(m)) is such that ϕ−1(P1 × P2) = L1 ∩ L2 and ϕ−1(P1 × N2 ∪ N1 × P2) = L1 ∪ L2.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 58 / 147

slide-30
SLIDE 30

Recognizable languages Rational languages Graphs Σ∗-automata Example GAP Semigroups Automata Automata (II) Semigroups (II) NS References

As a consequence of the fact that Rec M is closed under union, we have that if we generalize the definition of automaton to allow more than one initial state and we define, as would be natural to do, the language recognized by one of these automata as the set of all elements leading from some initial state to some final state, we do not get the recognition of new languages.

Proposition 3.4

Let ψ : M → M′ be a monoid homomorphism and let L′ ∈ Rec M′. Then ψ−1(L′) ∈ Rec M.

  • Proof. Let ϕ : M′ → N be a homomorphism from M′ into a finite

monoid N and P ⊆ N be such that L′ = ϕ−1(P). Then ψ−1(L′) = ψ−1(ϕ−1(P)) = (ϕ ◦ ψ)−1(P), which shows that ψ−1(L′) is recognized by ϕ ◦ ψ.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 59 / 147 Recognizable languages Rational languages Graphs Σ∗-automata Example GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Rational languages

The rational subsets of a monoid M form the least class Rat M of M-languages such that: (a) the empty set ∅ and all the singular subsets {m} of M belong to Rat M; (b) if S and T belong to Rat M, then ST and S ∪ T, belong to Rat M; (c) if S belongs to Rat M, the same happens with S∗. A subset A of a monoid M obtained from the singular subsets through a finite number of “unions”, “products” and “stars” belongs to Rat M. Furthermore, all subsets of M obtained in this way, together with the empty set, satisfy (a)-(c). Thus, we can express any non empty rational subset starting from singular sets and using a finite number of times the union, the product and the star operation. Such an expression is said to be a rational expression of the subset.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 60 / 147

slide-31
SLIDE 31

Recognizable languages Rational languages Graphs Σ∗-automata Example GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Note that different rational expressions may represent the same set.

Proposition 3.5

Let ϕ : M → N be a homomorphism and let L ∈ Rat M. Then ϕ(L) ∈ Rat N.

  • Proof. Let F = {A ⊆ M | ϕ(A) ∈ Rat N}. We want to show that

Rat M ⊆ F. It is clear that ∅ ∈ F and {m} ∈ F, for all m ∈ M. It remains to prove that F is closed for the operators “union”, “product” and “star”. Let A, B ∈ F. We have: ϕ(A ∪ B) = ϕ(A) ∪ ϕ(B) ∈ Rat N, thus A ∪ B ∈ F; ϕ(AB) = ϕ(A)ϕ(B) ∈ Rat N, thus AB ∈ F; ϕ(A∗) = ϕ(∪n≥0An) = ∪n≥0ϕ(An) = ∪n≥0(ϕ(A))n = (ϕ(A))∗ ∈ Rat N, thus A∗ ∈ F. We have that F is closed under the three operators under consideration, thus Rat M ⊆ F. In particular, ϕ(L) ∈ Rat N.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 61 / 147 Recognizable languages Rational languages Graphs Σ∗-automata Example GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Graphs

A graph G is an ordered pair of disjoint sets (V , E) such that E is a set of subsets of V containing two distinct elements. The set V is said to be the set of vertices and E is said to be the set

  • f edges We say that an edge {x, y} connects the vertices x and y,

being these vertices said to be the ends of the edge. Two vertices connected by an edge are said to be adjacent. Two edges sharing a common vertex are said to be adjacent. As the terminology suggests, one usually does not think in a graph as an ordered pair, but as a collection of vertices some of which are connected by edges.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 62 / 147

slide-32
SLIDE 32

Recognizable languages Rational languages Graphs Σ∗-automata Example GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Example

The graph ({1, 2, 3}, {{1, 2}, {1, 3}, {2, 3}}) is described through the following picture.

1 2 3

We say that a graph G ′ = (V ′, E ′) is a subgraph of G = (V , E) if V ′ ⊆ V and E ′ ⊆ E. Two graphs are said to be isomorphic if there exists a correspondence between its vertex vets that preserves adjacency.

(Formally: G = (V , E) is isomorphic to G ′ = (V ′, E ′) if the exists a

  • ne-one and onto function ϕ : V → V ′ such that {x, y} ∈ E if and only if

{ϕ(x), ϕ(y)} ∈ E ′.)

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 63 / 147 Recognizable languages Rational languages Graphs Σ∗-automata Example GAP Semigroups Automata Automata (II) Semigroups (II) NS References

A path C in a graph G is an alternate sequence of vertices and edges x0, α1, x1, . . . , αn, xn such that αi = {xi−1, xi}, 0 < i ≤ n. The length of the path x0, α1, x1, . . . , αn, xn is the integer n. The path C can also be represented as x0, x1, . . . , xn, since the edges are completely determined by its ends. If x0 = xn, we say that C is a circuit. (Some authors use the terminology “walk” for the notion of path just

  • defined. In this case, the term “path” is reserved to walks with no

vertex repetition.) A graph is said to be connected if any two vertices can be connected by a path. Let Σ be a set. If to every edge e of a graph G is associated an element σ ∈ Σ (which is said to be the label of e), we say that G is labeled by Σ.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 64 / 147

slide-33
SLIDE 33

Recognizable languages Rational languages Graphs Σ∗-automata Example GAP Semigroups Automata Automata (II) Semigroups (II) NS References

There are many notions closely related to the notion of graph. Among them are the notions of multi-graph, directed graph and directed multi-graph. The notion of multi-graph is obtained with the following modification: there are permitted multiple edges between pairs of vertices and loops (i.e., edges with a single end). The notion of directed graph is obtained by requiring the edges to be ordered pairs, instead of two element sets. An ordered pair (x, y) is then said to be a directed edge from x to y

  • r an edge whose beginning is x and whose end is y.

The notion of directed multi-graph is obtained in a similar way.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 65 / 147 Recognizable languages Rational languages Graphs Σ∗-automata Example GAP Semigroups Automata Automata (II) Semigroups (II) NS References

The notions of path, circuit and labeled graph previously defined for graphs may also be defined, with the obvious changes, for multi-graphs, directed graphs and directed multi-graphs. The notion of path in a directed multi-graph may also be defined as a sequence of consecutive edges α1, . . . , αn (the end of αi−1 is the beginning of αi, i ∈ {2, . . . , n}). Usually we use the notation (x, a, y) to indicate that the edge (x, y)

  • f a directed graph has label a. This notation is often convenient to

represent the edges of a directed multi-graph. The labels can then help to distinguish between the various edges connecting two vertices.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 66 / 147

slide-34
SLIDE 34

Recognizable languages Rational languages Graphs Σ∗-automata Example GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Example

A directed multi-graph labeled by Σ = {a, b}.

1 2 3

b a b a a b a A path in a directed labeled multi-graph is usually described through a picture like the one that follows.

q0 q1 qk−1 qk

σ1 σ2 σk−1 σk If the labels σ1, . . . , σm of the edges forming a path belong to a monoid, then the product of the labels σ1 · · · σm is said to be the label of the path.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 67 / 147 Recognizable languages Rational languages Graphs Σ∗-automata Example GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Σ∗-automata

From now on we will only consider the particular case of the Σ∗-automata. It is probably the most important case, since it has many applications. The prefix Σ∗ is usually omitted, and we say just automaton. In this case, it is common to include the alphabet in the list of elements used to describe the automaton. So we can say “the deterministic Σ∗-automaton (Q, i, F, δ)” or the “deterministic automaton (Q, Σ, i, F, δ)”, with the same meaning. For any q ∈ Q and σ1, σ2, · · · , σn ∈ Σ, we have q(σ1σ2 · · · σn) = (qσ1)(σ2 · · · σn) = . . . = ((· · · (qσ1)σ2) · · · )σn, thus the partial function δ : Q × Σ∗ → Q is completely determined by its restriction to Q × Σ.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 68 / 147

slide-35
SLIDE 35

Recognizable languages Rational languages Graphs Σ∗-automata Example GAP Semigroups Automata Automata (II) Semigroups (II) NS References

The observation just made enables us to give an elegant description

  • f Σ∗-automata through directed multi-graphs labeled by Σ.

In this context, it is common to use the terminology “graph” instead

  • f “directed labeled multi-graph”.

A deterministic automaton A = (Q, Σ, i, F, δ) may then be seen as a graph whose vertex and edge sets are respectively Q and E = {(p, σ, q) ∈ Q × Σ × Q | pσ = q}. So, the deterministic automaton A may be given through a set E of edges (with the restriction: “to each pair (p, σ) ∈ Q × Σ, there exists at most a state q ∈ Q such that (p, σ, q) ∈ E”) instead of the partial function δ. The automaton A is then described through a vector (Q, Σ, i, F, E). The terminology “state” or “vertex” for an element of Q is used indistinctly. The initial and terminal vertices are naturally distinguished in this representation.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 69 / 147 Recognizable languages Rational languages Graphs Σ∗-automata Example GAP Semigroups Automata Automata (II) Semigroups (II) NS References

In a graphical representation the initial state i is represented by

i

while a terminal state may be represented by one of the following ways:

f f

The edge (p, σ, q) (p, q ∈ Q and σ ∈ Σ such that pσ = q) is represented by the subgraph

p q

σ A path that goes from the initial state to a final state is said to be successful.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 70 / 147

slide-36
SLIDE 36

Recognizable languages Rational languages Graphs Σ∗-automata Example GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Example

Let Σ = {σ, τ} be an alphabet. The automaton A = (Q, Σ, i, F, δ) with Q = {q1, q2, q3}, i = q1, F = {q1, q3} and the partial function δ given by the table: δ q1 q2 q3 σ q2 q3 q1 τ − q3 q3 has the graphical description:

q1 q2 q3

σ σ, τ σ τ

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 71 / 147 Recognizable languages Rational languages Graphs Σ∗-automata Example GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Before presenting some generalizations of the concept of automaton that, although not recognizing more languages, give us greater flexibility, we prove the following result, known as the Pumping Lemma.

Theorem 3.6

Let L be a recognizable Σ∗-language. Then there exists a positive integer N such that, for all word u ∈ L with |u| ≥ N + 1, there exist x, v, y ∈ Σ∗ such that |xv| ≤ N, v = 1, u = xvy and xv ∗y ⊆ L.

  • Proof. One has L = L(A), for some finite Σ∗-automaton A with N

states. Let u = σ1σ2 · · · σk ∈ L(A), σi ∈ Σ, with |u| = k > N.

q0 q1 qk−1 qk

σ1 σ2 σk−1 σk

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 72 / 147

slide-37
SLIDE 37

Recognizable languages Rational languages Graphs Σ∗-automata Example GAP Semigroups Automata Automata (II) Semigroups (II) NS References

In the successful path labeled u = σ1σ2 · · · σk there exists at least a repetition among the first N + 1 states q0, q1, . . . , qN. Let qr, with r ≥ 0, be the first state that repeats and let qr+s be the first

  • repetition. Observe that r ≥ 0, s > 0 and r + s ≤ N.

Then we have u = xvy with x ∈ Σ∗ the label of the path from q0 to qr, v ∈ Σ+ the label of the path from qr to qr+s and y ∈ Σ∗ the label of the path from qr+s to qk. The path from q0 to qk includes the circuit qr → qr+1 → · · · → qr+s−1 → qr+s = qr labeled by v. We obtain successful paths if we loop over this circuit any number of times (including none). Thus xv my ∈ L, for any m ≥ 0. It remains to observe that |xv| = r + s ≤ N.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 73 / 147 Recognizable languages Rational languages Graphs Σ∗-automata Example GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Informally, the Pumping Lemma says that if L is recognizable, then any ”sufficiently long” word of L contains a factor which may be repeated any number of times, keeping the resulting word in L. In particular, if L has a sufficiently long word, then L is infinite. Since the Pumping Lemma gives a necessary condition for a language to be recognizable, its use is often by the negative: it is useful to prove that certain languages are not recognizable.

Example

Let Σ = {σ, τ} be an alphabet. The language L = {σnτ n : n ∈ N} is non recognizable. If it were recognizable, then it would be recognized by some finite Σ∗-automaton A with, say, N states. Let us look to the word u = σnτ n with n > N. By the Pumping Lemma, u may be written as xvy with |xv| ≤ N and v = 1, having also xv 2y ∈ L. Since v is of the form σk, xv 2y contains more occurrences of σ than those of τ, which is absurd.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 74 / 147

slide-38
SLIDE 38

Recognizable languages Rational languages Graphs Σ∗-automata Example GAP Semigroups Automata Automata (II) Semigroups (II) NS References

If the package “SgpViz” has been loaded into a GAP session, by typing “XSemigroup();” in the command line: gap> XSemigroup(); a window like the following pops up One may then choose to give a semigroup (or a monoid) by specifying a presentation, by giving (partial) transformations generating it or by giving it as the syntactic semigroup of a rational language or a finite state automaton.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 75 / 147 Recognizable languages Rational languages Graphs Σ∗-automata Example GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Next, the Brandt 6 element monoid is specified through a

  • presentation. (Note that “0” is just an abbreviation.)

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 76 / 147

slide-39
SLIDE 39

Recognizable languages Rational languages Graphs Σ∗-automata Example GAP Semigroups Automata Automata (II) Semigroups (II) NS References

The following appears in the GAP shell:

gap> fxsgp:=FreeMonoid("a","b");; <free monoid on the generators [ a, b ]> gap> a:=GeneratorsOfMonoid( fxsgp )[ 1 ];; a gap> b:=GeneratorsOfMonoid( fxsgp )[ 2 ];; b gap> rxsgp:=[[a*a*a,a*a],[a*a*a,a*a],[a*a*b,a*a],[b*a*a,a*a],[a*b*a,a], [b*b*a,b*b],[a*b*b,b*b],[b*b*b,b*b],[b*b*b,b*b],[b*a*b,b]];; [ [ a^3, a^2 ], [ a^3, a^2 ], [ a^2*b, a^2 ], [ b*a^2, a^2 ], [ a*b*a, a ], [ b^2*a, b^2 ], [ a*b^2, b^2 ], [ b^3, b^2 ], [ b^3, b^2 ], [ b*a*b, b ] ] gap> b21:=fxsgp/rxsgp; <fp monoid on the generators [ a, b ]> gap>

(Of course, this gives an alternative way to give the same semigroup to GAP.)

Now one may use the GAP shell to perform computations, but (for some) one may use the Tcl/Tk graphical interface as well.

gap> Elements(b21); [ <identity ...>, a, b, a^2, a*b, b*a ]

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 77 / 147 Recognizable languages Rational languages Graphs Σ∗-automata Example GAP Semigroups Automata Automata (II) Semigroups (II) NS References

By typing “DrawRightCayleyGraph(b21);” in the GAP command line, a picture of the right Cayley graph of the Brandt monoid pops up. The same may be obtained by pressing the “Draw Cayley Graph” bottom in the “Functions” menu of the Tcl/Tk interface.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 78 / 147

slide-40
SLIDE 40

Recognizable languages Rational languages Graphs Σ∗-automata Example GAP Semigroups Automata Automata (II) Semigroups (II) NS References

If we want to compute ϕ−1(b) we should start by turning the states 1 and 3, respectively, into the initial and the final state. gap> rcg := RightCayleyGraph(b21);; gap> SetInitialStatesOfAutomaton(rcg,1);; gap> SetFinalStatesOfAutomaton(rcg,3);; gap> DrawAutomaton(rcg); A document viewer containing the following image pops up.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 79 / 147 Recognizable languages Rational languages Graphs Σ∗-automata Example GAP Semigroups Automata Automata (II) Semigroups (II) NS References Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 80 / 147

slide-41
SLIDE 41

Recognizable languages Rational languages Graphs Σ∗-automata Example GAP Semigroups Automata Automata (II) Semigroups (II) NS References

A rational expression for ϕ−1(b): gap> AutomatonToRatExp(rcg); b(ab)* Its commutative image is the semilinear set (0, 1) ∪ ((1, 2) + (1, 1)N).

Proposition 3.7

The Ab-closure of a semilinear set may be obtained by replacing the N’s by Z’s. Thus, the Ab-closure of a semilinear set is a finite union of cosets of subgroups of the free abelian group. For this case we obtain (1, 2) + (1, 1)Z. gap> FAtoZSmlExp(rcg); [ < Z-linear subset of $ZZ^2$ > ] gap> Display(last[1]); [ 0, 1 ] + [ 1, 1 ] Z

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 81 / 147 Non- deterministic automata varia Kleene’s Theorem Applications GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Non-deterministic automata

If we do not require a single initial state and permit the graph describing the automaton to have a configuration like the following

p q1 q2

σ σ ceases the determinism, in the sense that after reaching a state p, the reading of a letter σ may lead to any one of several states. In a deterministic automaton this can not occur, since δ is required to be a partial function (δ(p, σ) has, at most,one image).

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 82 / 147

slide-42
SLIDE 42

Non- deterministic automata varia Kleene’s Theorem Applications GAP Semigroups Automata Automata (II) Semigroups (II) NS References

In this more general setting, we may think of δ as a function δ : Q × Σ∗ → 2Q (or as a relation δ ⊆ (Q × Σ∗, Q)). We define a non-deterministic automaton over a finite alphabet Σ as a vector (Q, Σ, I, F, E), with Q a set (the set of states), Σ the automaton alphabet, I and F subsets of Q (said respectively set of initial states and set of final states) and E ⊆ Q × Σ × Q a set of edges. Often we will just say automaton without specifying whether the automaton is deterministic or not (we’ll see later that both recognize the same languages). An automaton is said to be finite if it has a finite number of states.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 83 / 147 Non- deterministic automata varia Kleene’s Theorem Applications GAP Semigroups Automata Automata (II) Semigroups (II) NS References

A path in an automaton A = (Q, Σ, I, F, E) is a sequence c = (ei)1≤i≤n of consecutive edges ei = (qi, σi, qi+1). The word w = σ1 · · · σn is said the label of the path. The vertex q1 is said the beginning of the path, and qn+1 it’s end. The integer n is said to be the length length of the path. A path that goes from an initial state to a final state is said to be

  • successful. A word w is said to be recognized by an automaton A

if it is the label of a successful path. The set of all words recognized by an automaton A is precisely the language recognized by A. We denote it by L(A). A Σ∗-automaton A = (Q, I, F, E) is said to be complete if, for any pair (p, σ) ∈ Q × Σ, there exists at least a state q ∈ Q such that (p, σ, q) ∈ E. Note that L(A) is independent of the name of the states. Thus, in a graphical description of an automaton, we may not indicate the names of the vertices.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 84 / 147

slide-43
SLIDE 43

Non- deterministic automata varia Kleene’s Theorem Applications GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Examples

Let Σ = {σ, τ}.

1

A : : L(A) = ∅; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2

A : : L(A) = 1; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3

A : σ : L(A) = σ; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

4

A : σ, τ : L(A) = Σ∗; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 85 / 147 Non- deterministic automata varia Kleene’s Theorem Applications GAP Semigroups Automata Automata (II) Semigroups (II) NS References

  • 5. A :

σ : L(A) = σ∗; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

  • 6. B :

σ σ : L(B) = σ+; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

  • 7. B :

τ τ σ τ : L(B) = τσ ∪ τ 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 86 / 147

slide-44
SLIDE 44

Non- deterministic automata varia Kleene’s Theorem Applications GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Since any deterministic Σ∗-automaton is also non-deterministic, we have that the class of the Σ∗-languages recognized by non-deterministic Σ∗-automata contains Rec Σ∗. Next we will prove that it is exactly Rec Σ∗. To this effect we will make use of the subset construction indicated in what follows. Let A = (Q, Σ, I, F, E) be a non-deterministic Σ∗-automaton. We define the Σ∗-automaton ˆ A = ( ˆ Q, Σ,ˆ i, ˆ F, ˆ E) by: ˆ Q = 2Q = {P | P ⊆ Q}; ˆ i = I; ˆ F = {P ⊆ Q | P ∩ F = ∅}; ˆ E = {(P, σ, R) ∈ 2Q × Σ × 2Q | R = {q | (p, σ, q) ∈ E, for any p ∈ P}}. (In particular, Pσ = {q | (p, σ, q) ∈ E, for any p ∈ P}.) It is straightforward that ˆ A is deterministic and complete.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 87 / 147 Non- deterministic automata varia Kleene’s Theorem Applications GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Example

Let Σ be the alphabet {σ, τ} and let A be the following automaton.

1 2 3

σ τ σ σ Then ˆ A may be represented through the following picture:

∅ {1} {2} {3} {2, 3} {1, 2} {1, 3} {1, 2, 3}

σ, τ τ σ τ σ σ τ τ σ σ τ σ τ σ τ

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 88 / 147

slide-45
SLIDE 45

Non- deterministic automata varia Kleene’s Theorem Applications GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Proposition 4.1

Let c be a path in ˆ A beginning in Q, ending in Q′ and having label

  • u. Then Q′ = {q′ | exists q ∈

Q such that there is a path in A from q to q′ and labeled by u}. The proof can be done easily by induction on the length of u. From the definitions, it comes out easily the following:

Corollary 4.2

One has: L(A) = L( ˆ A). We have thus proved:

Proposition 4.3

To any finite non-deterministic Σ∗-automaton there is a finite and complete deterministic Σ∗-automaton recognizing the same language.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 89 / 147 Non- deterministic automata varia Kleene’s Theorem Applications GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Automata with ε-transitions

Next we introduce a new generalization of the concept of automaton. Again, we do not get the recognition of new languages. Automata with ε-transitions are Σ∗-automata where edges of the form (p, ε, q) are allowed, that is, automata with ε-transitions may have edges labeled by the empty word. For a word, being recognized by an automaton with ε-transitions has the obvious meaning. As any Σ∗-automaton is an automaton with ε-transitions, we have that the languages recognized by automata are also recognized by automata with ε-transitions. In fact, they recognize the same languages, as follows from the next statement:

Proposition 4.4

Let A = (Q, I, F, E) be a Σ∗-automaton with ε-transitions. Then L(A) ∈ Rec Σ∗.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 90 / 147

slide-46
SLIDE 46

Non- deterministic automata varia Kleene’s Theorem Applications GAP Semigroups Automata Automata (II) Semigroups (II) NS References

The the proof of the above proposition (which may be found in any basic textbook on automata) involves the the construction of an automaton from an automaton with ε-transitions indicated in what follows. Let A = (Q, I, F, E) be a Σ∗-automaton with ε-transitions. We define the Σ∗-automaton A′ = (Q, I ′, F, E ′) by making: I ′ = Iε ∪ I; E ′ = {(p, σ, q′) | (p, σ, q) ∈ E, σ ∈ Σ, q′ ∈ qε}.

Example

Let Σ = {σ, τ} and let A and A′ be the following automata: σ τ, ε ε σ τ σ We have L(A) = L(A′).

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 91 / 147 Non- deterministic automata varia Kleene’s Theorem Applications GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Minimal automata (motivation)

When performing the subset construction above, we have obtained the following automaton:

∅ {1} {2} {3} {2, 3} {1, 2} {1, 3} {1, 2, 3}

σ, τ τ σ τ σ σ τ τ σ σ τ σ τ σ τ As we are interested in the language recognized by this automaton, the following question is natural: are there superfluous states?

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 92 / 147

slide-47
SLIDE 47

Non- deterministic automata varia Kleene’s Theorem Applications GAP Semigroups Automata Automata (II) Semigroups (II) NS References

In this case, the answer is “yes”. It is clear that the states ∅, {3}, {1, 3} are not vertices of any successful path and thus the recognized language is not affected if we remove them.

∅ {1} {2} {3} {2, 3} {1, 2} {1, 3} {1, 2, 3}

σ, τ τ σ τ σ σ τ τ σ σ τ σ τ σ τ (This suggests that one can easily improve the subset construction to

  • btain deterministic automata that recognize the same languages

than non-deterministic ones.)

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 93 / 147 Non- deterministic automata varia Kleene’s Theorem Applications GAP Semigroups Automata Automata (II) Semigroups (II) NS References

More generally, one could ask the question: given a recognizable language, is there a deterministic automaton recognizing it that is minimal in some sense? The answer is “yes”. There exists a unique (up to isomorphism) deterministic automaton that is accessible and co-accessible, with a minimum number of states that recognizes the language. One may construct such an automaton (there are various algorithms in the literature; one of them is implemented in the package “automata”). (The concept of “isomorphism” has to be defined, of course.)

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 94 / 147

slide-48
SLIDE 48

Non- deterministic automata varia Kleene’s Theorem Applications GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Transition monoid

Let PT (X) be the set of partial transformations on a set X. It is easy to see that PT (X) with the operation fg = g ◦ f is a monoid, since the composition of partial functions is associative and the identity is the neutral element The monoid PT (X) is known as the monoid of partial transformations on X. Let A = (Q, Σ, i, F, E) be a deterministic automaton. It is immediate that the function Φ : Σ∗ → PT (Q) defined by Φ(u) = Φu, where Φu : Q → Q is the partial function Φu(q) = qu, is a monoid homomorphism.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 95 / 147 Non- deterministic automata varia Kleene’s Theorem Applications GAP Semigroups Automata Automata (II) Semigroups (II) NS References

The image of Φ, Φ(Σ∗), is a submonoid of PT (Q), is called the transition monoid of the automaton and is denoted by MA. Clearly, MA is generated by the partial transformations defined by the letters.

Example

Consider the automaton

1 2 3

σ σ τ σ, τ τ We have δ 1 2 3 σ 2 3 3 τ 1 1 3 σ2 3 3 3 στ 1 3 3 τσ 2 2 3

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 96 / 147

slide-49
SLIDE 49

Non- deterministic automata varia Kleene’s Theorem Applications GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Continuing the computation, we can observe that τ, τ 2 and τστ define the same mapping from Q into Q. The same happens with σ2, σ3, σ2τ and τσ2 and also with σ and στσ. The transition monoid

  • f the automaton contains 6 elements, the transformations

corresponding to the words 1, σ, τ, σ2, στ, τσ. Note that the transformation corresponding to σ2 is a zero of the monoid.

Proposition 4.5

Let L ∈ Rec Σ∗, L = ∅. Then the syntactic monoid of L is isomorphic to the transition monoid of the minimal automaton of L, that is, Σ∗/∼L≃ MminL.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 97 / 147 Non- deterministic automata varia Kleene’s Theorem Applications GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Kleene’s Theorem

We already know that Rec Σ∗ is closed under union. We have shown it using the definition of recognition by a monoid. Another way to show it is to note that if A = (Q, I, F, E) and A′ = (Q′, I ′, F ′, E ′) are automata, then the disjoint union A′′ = (Q ˙ ∪ Q′, I ˙ ∪ I ′, F ˙ ∪ F ′, E ˙ ∪ E ′) recognizes L(A) ∪ L(A′). To produce similar constructions for the operators “product” and “star” we will use automata with ε-transitions. They are left as exercises to be done during the break. (Illustrates of the constructions are given...)

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 98 / 147

slide-50
SLIDE 50

Non- deterministic automata varia Kleene’s Theorem Applications GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Lemma 4.6

Let L, L′ ∈ Rec Σ∗. Then L · L′ ∈ Rec Σ∗.

Illustration of the construction...

A :

q0 q1 q2

σ σ τ A′ :

p0 p1 p2 p3

σ σ τ τ , Then

q0 q1 q2 p0 p1 p2 p3

σ σ τ σ σ τ τ ε ε ε ε recognizes L(A) · L(A′).

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 99 / 147 Non- deterministic automata varia Kleene’s Theorem Applications GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Lemma 4.7

Let L ∈ Rec Σ∗. Then L+, L∗ ∈ Rec Σ∗.

Illustration of the construction...

Let A:

q0 q1 q2

σ σ τ Then

q0 q1 q2

σ σ ε ε τ recognizes L(A)+ and

q0 q1 q2

σ σ ε ε τ

q

recognizes L(A)∗.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 100 / 147

slide-51
SLIDE 51

Non- deterministic automata varia Kleene’s Theorem Applications GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Generalized transition graphs

Next we introduce a new variation of the notion of automaton. The definition of generalized transition graph (abbreviated: GTG) G over a given alphabet may be obtained from the definition of automaton by requesting: G has a single initial state qI and a single final state qF, with qF = qI; given two states of G there is exactly one edge beginning in one

  • f them and ending in the other;

the labels of the edges of G are rational sets (instead of letters, as happens in the automata case) or, more precisely, rational expressions representing them. For states p, q of G we denote by λ(p, q) the label of the single edge beginning in p and ending in q.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 101 / 147 Non- deterministic automata varia Kleene’s Theorem Applications GAP Semigroups Automata Automata (II) Semigroups (II) NS References

A word w is recognized by G if and only if there is a finite sequence qI = p0, . . . , pn = qF of states of G and a factorization w = u1 · · · un

  • f w such that, for 1 ≤ i ≤ n, ui belongs to λ(pi−1, pi). The

language recognized by G is the set of words recognized by G. Let A be a finite automaton and let Q be its set of states. The

  • utput of the following algorithm, whose input is A, is the label of

the single edge from the initial state to the final state of the GTG

  • btained at the end. It will be a rational expression for the language

recognized by A.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 102 / 147

slide-52
SLIDE 52

Non- deterministic automata varia Kleene’s Theorem Applications GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Algorithm 4.8

Construct the following generalized transition graph G: the set

  • f states is Q′ = Q ∪ {qI, qF} where qI and qF do not belong to

Q; the edges are labeled in the following way: the label of an edge from qI to any initial state of A is the empty word and the same happens with the label of the edge from any final state of A to qF. The remaining edges adjacent to qI or to qF are labeled by ∅, the empty set. The label λ(p, q), p, q ∈ Q, is the set (eventually ∅) of letters labeling the edges from p to q in A. Execute the following cycle: While Q = ∅, – choose q ∈ Q; – destroy the loop in q, then eliminate q.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 103 / 147 Non- deterministic automata varia Kleene’s Theorem Applications GAP Semigroups Automata Automata (II) Semigroups (II) NS References

The way the destruction of a loop and the elimination of a state are performed is indicated in what follows. Destroy a loop at q: if the label of the loop at q is non-empty and p ∈ Q \ {q}, replace the label λ(q, p) of the edge from q to p by (λ(q, q))∗λ(q, p) and the label λ(q, q) of the loop in q by ∅.

p q

ℓ2 ℓ1 →

p q

ℓ∗

1ℓ2

∅ Eliminate a state q (with λ(q, q) = ∅): for all states r, s of G such that r, s = q, the label λ(r, s) of the edge from r to s is replaced by λ(r, q)λ(q, s) ∪ λ(r, s). The state q and all edges adjacent to q are then removed.

q r s

ℓ1 ℓ ℓ2 →

p q

ℓ ∪ ℓ1ℓ2 ∅

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 104 / 147

slide-53
SLIDE 53

Non- deterministic automata varia Kleene’s Theorem Applications GAP Semigroups Automata Automata (II) Semigroups (II) NS References

We observe that the language recognized by the generalized transition graph G constructed in the first step of the algorithm is precisely the language recognized by A. We observe also that the language recognized by a GTG obtained from a GTG by destruction

  • f a loop at some state followed by the elimination of this state is the

language recognized by the original GTG. So, the output of Algorithm 4.8 is a rational expression for the language recognized by the automaton A given.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 105 / 147 Non- deterministic automata varia Kleene’s Theorem Applications GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Theorem 4.9 (Kleene’s Theorem)

Let Σ be a finite alphabet. Then Rat Σ∗ = Rec Σ∗.

  • Proof. To prove that Rat Σ∗ ⊆ Rec Σ∗, it suffices to observe that

∅, {σ} ∈ Rec Σ∗, for any σ ∈ Σ, and that Rec Σ∗ is closed under the

  • perators “union”, “product” e “star”.

The preceding algorithm shows the other inclusion, which concludes the proof.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 106 / 147

slide-54
SLIDE 54

Non- deterministic automata varia Kleene’s Theorem Applications GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Piecewise testable languages: Simon’s theorem

A Σ∗-language is said to be piecewise testable if it can be obtained from languages of the form Σ∗σ1Σ∗ · · · Σ∗σnΣ∗, com σ1, . . . , σn ∈ Σ using a finite number of times the operators of union and complementation.

Theorem 4.10 (Simon)

A rational language is piecewise testable if and only if its syntactic monoid is J -trivial.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 107 / 147 Non- deterministic automata varia Kleene’s Theorem Applications GAP Semigroups Automata Automata (II) Semigroups (II) NS References

The following question is a simple exercise (assuming we have Simon’s Theorem at hand).

Question 4.11

Is the rational language Σ∗abΣ∗ piecewise testable? The answer is “depends”... Answer: Volkov said it! (Proof by eminent authority...) Alternatively, we can get convinced by using the following sequence

  • f images obtained with the GAP packages already mentioned:

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 108 / 147

slide-55
SLIDE 55

Non- deterministic automata varia Kleene’s Theorem Applications GAP Semigroups Automata Automata (II) Semigroups (II) NS References

The following is popped up. After pressing the “Ok”, the “functions” bottom appears and is ready to be used.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 109 / 147 Non- deterministic automata varia Kleene’s Theorem Applications GAP Semigroups Automata Automata (II) Semigroups (II) NS References

By pressing the “Draw D-Classes” bottom, we obtain the following picture which shows that each D-class has just an element and thus the monoid is J -trivial. By Simon’s theorem, the language is piecewise testable.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 110 / 147

slide-56
SLIDE 56

Non- deterministic automata varia Kleene’s Theorem Applications GAP Semigroups Automata Automata (II) Semigroups (II) NS References

As an alternative to the use of “XSemigroup”, by writing the following sequence of commands in a GAP session, one get an image that shows that the syntactic semigroup of the language Σ∗abΣ∗ is not J -trivial and thus the language is not piecewise testable, if the alphabet has 3 letters.

reg := RationalExpression("(aUbUc)*ab(aUbUc)*"); autxsgp:=RatExpToAut(reg); gap> ts := TransitionSemigroup(autxsgp); gap> DrawDClasses(ts);

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 111 / 147 Definitions and easy consequences Motivation On the algorithms Relative kernels and solvability GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Definitions

A pseudovariety H of groups (monoids) is a class of finite groups (monoids) closed under formation of finite direct products, subgroups (submonoids) and quotients. Given a pseudovariety H of groups, the H-kernel of a finite monoid S is the submonoid KH(S) =

  • τ −1(1),

with the intersection being taken over all groups G ∈ H and all relational morphisms of monoids τ : S− →

  • G.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 112 / 147

slide-57
SLIDE 57

Definitions and easy consequences Motivation On the algorithms Relative kernels and solvability GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Easy consequences

Since a relational morphism into a group belonging to a certain pseudovariety H1 of groups is also a relational morphism into a group belonging to a pseudovariety H2 containing it, the following fact follows.

Fact 5.1

Let M be a finite monoid and let H1 and H2 be pseudovarieties of groups such that H1 ⊆ H2. Then KH2 (M) ⊆ KH1 (M).

Proposition 5.2 (˜ , 98)

Let G be a group and H a pseudovariety of groups. Then KH(G) is the smallest normal subgroup of G such that G/KH(G) ∈ H.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 113 / 147 Definitions and easy consequences Motivation On the algorithms Relative kernels and solvability GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Corollary 5.3

Any relative abelian kernel of a finite group contains its derived subgroup. As the restriction τ| of a relational morphism τ : S− →

  • G to a

subsemigroup T of S is a relational morphism τ| : T− →

  • G, we have

the following:

Fact 5.4

If T is a subsemigroup of a finite semigroup S, then KH(T) ⊆ KH(S). Let e be an idempotent of a finite semigroup S. As for every relational morphism τ : S− →

  • G into a group G we have

τ(e)τ(e) ⊆ τ(e), we get that τ(e) is a subgroup of G. It follows that e ∈ τ −1(1). If x, y ∈ τ −1(1), then 1 ∈ τ(x)τ(y) ⊆ τ(xy), therefore xy ∈ τ −1(1), thus τ −1(1) is a subsemigroup of S containing the idempotents.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 114 / 147

slide-58
SLIDE 58

Definitions and easy consequences Motivation On the algorithms Relative kernels and solvability GAP Semigroups Automata Automata (II) Semigroups (II) NS References

As the non-empty intersection of subsemigroups is a subsemigroup, we have the following fact.

Fact 5.5

Let H be a pseudovariety of groups and let M be a finite monoid. The relative kernel KH(M) is a submonoid of M containing the idempotents. Fact 5.4 may be used to determine elements in the H-kernel of a monoid without its complete determination. Note that, for example, if we can determine a set X of generators of a monoid M such that X ⊆ KH(M), then we can conclude by Fact 5.5 that the M = X ⊆ KH(M).

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 115 / 147 Definitions and easy consequences Motivation On the algorithms Relative kernels and solvability GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Motivation

Rhodes Type II conjecture proposed an algorithm to compute KG(S), where G is the class of all finite groups and S is a given finite monoid. Solutions were given by Ash and by Ribes and Zalesski˘ ı in the early nineties. Pin showed that the problem of computing KG(S) can be reduced to that of computing the closure (relative to the profinite topology) of a rational subset of the free group. This approach led to the solution given by Ribes Ribes and Zalesski˘ ı. Algorithms to compute other relative kernels (e.g., kernels relative to pseudovarieties of p-groups and pseudovarieties of abelian groups) followed the idea of Pin.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 116 / 147

slide-59
SLIDE 59

Definitions and easy consequences Motivation On the algorithms Relative kernels and solvability GAP Semigroups Automata Automata (II) Semigroups (II) NS References

A different algorithm has been given by Steinberg. The Mal’cev product, when the rightmost factor is a pseudovariety of groups, may be defined as follows: for a pseudovariety V of monoids and a pseudovariety H of groups, the Mal’cev product of V and H is the pseudovariety V

m H = {S | KH(S) ∈ V}.

Algorithms to compute relative kernels may lead to decidability results.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 117 / 147 Definitions and easy consequences Motivation On the algorithms Relative kernels and solvability GAP Semigroups Automata Automata (II) Semigroups (II) NS References

On the algorithms

Let M be a finite n-generated monoid. There exists a finite ordered set A of cardinality n and a surjective homomorphism ϕ : A∗ → M from the free monoid on A onto M.

Proposition 5.6 (Pin, 88)

Let x ∈ M. Then x ∈ KG(M) if and only if 1 ∈ ClG(ϕ−1(x)) (the closure is taken for the profinite group topology of A∗). Commutative images of languages in A∗ are used for the abelian kernel case, that is, the canonical homomorphism γ : A∗ → Zn defined by γ(ai) = (0, . . . , 0, 1, 0, . . . , 0) (1 in position i), where ai is the ith element of A, is considered.

Proposition 5.7 (˜ , 98)

Let x ∈ M. Then x ∈ KAb(M) if and only if 0 ∈ ClAb(γ(ϕ−1(x))).

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 118 / 147

slide-60
SLIDE 60

Definitions and easy consequences Motivation On the algorithms Relative kernels and solvability GAP Semigroups Automata Automata (II) Semigroups (II) NS References

This proposition, similar to the former one of Pin, leads to an algorithm to compute the abelian kernel of a finite monoid. A generalization, to all pseudovarieties of abelian groups, was

  • btained by Steinberg.

A supernatural number is a formal product of the form

  • pnp

where p runs over all positive prime numbers and 0 ≤ np ≤ +∞. To a supernatural number π one associates the pseudovariety Hπ generated by the cyclic groups {Z/nZ | n divides π}. H2+∞ is the pseudovariety of all 2-groups which are abelian; to the supernatural number p+∞, where p runs over all positive prime numbers, is associated the pseudovariety Ab of all finite abelian groups.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 119 / 147 Definitions and easy consequences Motivation On the algorithms Relative kernels and solvability GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Proposition 5.8 (Steinberg, 99)

Let π be an infinite supernatural number and let x ∈ M. Then x ∈ KHπ(M) if and only if 0 ∈ ClHπ(γ(ϕ−1(x))). As a way to compute (a rational expression for) ϕ−1(x) one can consider the automaton Γ(M, x) obtained from the right Cayley graph of M by taking the neutral element as the initial state and x as final state. Note that the language of Γ(M, x) is precisely ϕ−1(x). This motivated the appearance of the GAP package “automata”, a GAP package to deal with finite state automata. There exist implementations in GAP of the mentioned algorithms to compute kernels of finite monoids relative to G, Ab, Hπ and Gp. The first ones follow the above strategy, while the implemented algorithm to compute kernels relative to Gp is due to Steinberg. It has been achieved with the collaboration of J. Morais and benefits also of the existence of the package “automata”.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 120 / 147

slide-61
SLIDE 61

Definitions and easy consequences Motivation On the algorithms Relative kernels and solvability GAP Semigroups Automata Automata (II) Semigroups (II) NS References

The usefulness of visualizing the results motivated the GAP package “sgpviz”.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 121 / 147 Definitions and easy consequences Motivation On the algorithms Relative kernels and solvability GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Given a finite group G and a positive integer k, denote by G [k] the subgroup of G generated by the commutators of G and by the the elements of the form xk, x ∈ G. In other words, let G [k] be the smallest subgroup of G containing the derived subgroup G ′ and the k-powers. Jointly with Cordeiro and Fernandes for finite superatural numbers and with Cordeiro for the general case, we obtained:

Proposition 5.9

Let π be a supernatural number, G a finite group and le k = gcd(|G|, π). Then we have: KHπ(G) = G [k].

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 122 / 147

slide-62
SLIDE 62

Definitions and easy consequences Motivation On the algorithms Relative kernels and solvability GAP Semigroups Automata Automata (II) Semigroups (II) NS References

We define recursively Kn

H(S) as follows:

K0

H(S) = S;

Kn

H(S) = KH(Kn−1 H

(S)), for n ≥ 1. Since S is finite and the operator KH is non-increasing, it follows that the sequence Kn

H(S) is eventually constant; we denote this constant

value by Kω

H(S).

Observe that Kω

H(S) is the largest subsemigroup of S fixed by KH.

For a pseudovariety V and n ≥ 0, we define the operator (−)n

m H

recursively as follows: V 0

m H = V;

V n+1

m H = (V n m H) m H;

V ω

mH = ∪n≥0V n m H.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 123 / 147 Definitions and easy consequences Motivation On the algorithms Relative kernels and solvability GAP Semigroups Automata Automata (II) Semigroups (II) NS References

It is easy to see V n

m H = {S | Kn

H(S) ∈ V} and V ω

mH = {S | Kω

H(S) ∈ V}.

In a joint work with Fernandes (2005), a semigroup was defined to be H-solvable if iterating the H-kernel operator eventually arrives at the subsemigroup generated by the idempotents. A semigroup with commuting idempotents has been proved to be Ab-solvable if and only if its subgroups are solvable groups. A much more general result has then been obtained in a joint work with Fernandes, Margolis and Steinberg (2004). It states that: for a non-trivial pseudovariety H of groups, a semigroup with an aperiodic idempotent-generated subsemigroup is H-solvable if and

  • nly if it subgroups are H-solvable.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 124 / 147

slide-63
SLIDE 63

Definitions and easy consequences Motivation On the algorithms Relative kernels and solvability GAP Semigroups Automata Automata (II) Semigroups (II) NS References

We proved, in particular, that EA = A ω

mG

where we denote by EA the pseudovariety consisting of all monoids whose idempotents generate an aperiodic submonoid By using a modification of the technique, it has been shown in a joint work with Steinberg that: a semigroup S is H-solvable if and only if, for each idempotent e ∈ S, there is a subnormal series with smallest element the maximal subgroup at e of the idempotent-generated subsemigroup of S and largest element the maximal subgroup of S at e such that the successive quotients belong to H.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 125 / 147 Motivation PM semigroups A database GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Motivation

Let us consider an automatic selling machine

Prices: a: 1 Cent b: 2 Cent c: 3 Cent ... x: 1.000.000.000 EUR ...

WARNING: Exact amount, please

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 126 / 147

slide-64
SLIDE 64

Motivation PM semigroups A database GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Suppose that we have infinitely many coins

Question

Which is the price of the most expensive product that we cannot buy?

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 127 / 147 Motivation PM semigroups A database GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Let us consider S = < 3, 5 > = {x · 3 + y · 5 | x, y ∈ N0} = {0, 3, 5, 6, 8, 9, 10, →} S is a numerical semigroup, i.e. a co-finite submonoid of (N0, +). m(S) = 3 is the multiplicity of S. H(S) = N \ S = {1, 2, 4, 7} is the set of gaps of S. F(S) = maxH(S) = 7 is the Frobenius number of S. So, the answer to our question is: 7. If S is a numerical semigroup, then the greatest integer that is not in S is called the Frobenius number of S and is denoted by F(S). There exists a formula for the Frobenius number of a numerical semigroup generated by two elements...

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 128 / 147

slide-65
SLIDE 65

Motivation PM semigroups A database GAP Semigroups Automata Automata (II) Semigroups (II) NS References

If we had the following coins, how could we answer the question posed above? We could install the GAP package numericalsgps and let the computer do the work.

Remark

Unlike what happens for a semigroup generated by two elements, no general formula is known for a F(< a, b, c >).

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 129 / 147 Motivation PM semigroups A database GAP Semigroups Automata Automata (II) Semigroups (II) NS References

The Frobenius problem

Remark

If S is a numerical semigroup, then the set gen(S) = (S \ {0}) \ ((S \ {0}) + (S \ {0})) is a set of generators of S, (i.e. all the elements of S may be written as non-negative integer linear combinations of elements of gen(S)). Moreover, gen(S) is finite. It is a minimal set of generators of S (which is unique).

Frobenius problem

Given positive integers a1, . . . , an, with gcd(a1, . . . , an) = 1, which is the greatest integer that cannot be written as a positive linear combination of a1, . . . , an?

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 130 / 147

slide-66
SLIDE 66

Motivation PM semigroups A database GAP Semigroups Automata Automata (II) Semigroups (II) NS References

The Frobenius problem, although apparently too specialised, appears naturally in several areas of mathematics. So, to find “formulas” or “eficient algorithms” even for some particular cases may have some interest.

Proposition 6.1 (Sylvester)

Let p, q be relatively prime positive integers. Then F(< p, q >) = pq − p − q For much more on the Frobenius problem, one may consult a book by Ram´ ırez Alfons´ ın.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 131 / 147 Motivation PM semigroups A database GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Proportionally modular numerical semigroups

Let a, b, c be positive integers. The set S(a, b, c) = {x ∈ Z | ax mod b ≤ cx} is a numerical semigroup. A semigroup of this form is said to be proportionally modular. As the inequality ax mod b ≤ cx has precisely the same integer solutions than the inequality (a mod b)x mod b ≤ cx, we do not loose generality by supposing that a < b. If c ≥ a, then S(a, b, c) = N, thus we may also suppose that c < a. It is not difficult to show that S(a, b, c) = S(b + c − a, b, c), which has as a consequence that we may also suppose that a ≤ b+c

2 .

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 132 / 147

slide-67
SLIDE 67

Motivation PM semigroups A database GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Example 6.2

S(4, 18, 1) = {0, 5, 6, 9, 10, 11, 12, 14, →}. ❛ ❛ ❛ ❛ ❛ ❛ ❛ ❛ ❛ ❛ ❛ ❛ ❛ ❛ ❛ ❛ ❛ ❛ ❜ ❜ ❜ ❜ ❜ ❜ ❜ ❜ ❜ ❜ ❜ ❜ ❜ ❜ ❜ ❜ ❜ ❜ ❜ ❜

y = cx b b

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 133 / 147 Motivation PM semigroups A database GAP Semigroups Automata Automata (II) Semigroups (II) NS References

For a rational number r, ⌈r⌉ denotes the least integer not smaller than r and ⌊r⌋ denotes the greatest integer not bigger than r. Ona can show:

Theorem 6.3

F(S(a, b, c)) ∈

  • b −

kb

a

  • − 1 | k ∈ {1, . . . , a − 1}
  • .

Let ξ = min

  • k ∈ {1, . . . , a − 1} | kb mod a +

kb

a

  • c > (c − 1)b + a − c
  • .

Corollary 6.4

F(S(a, b, c)) = b −

  • ξb

a

  • − 1.

The preceding corollary gives an algorithm to compute the Frobenius number of a proportionally modular Diophantine inequality. Note that one has to do at most a − 1 tests and recall that we may suppose that a ≤ b+c

2 .

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 134 / 147

slide-68
SLIDE 68

Motivation PM semigroups A database GAP Semigroups Automata Automata (II) Semigroups (II) NS References

This algorithm can be improved:

Algorithm 6.5

INPUT: positive integers a, b and c. OUTPUT: F(S(a, b, c)).

1

If a ≤ c, then return −1.

2

a := a mod b.

3

If a = 0, then return −1.

4

If a > b+c

2 , then a := b + c − a.

5

If a = c + 1, then return g = b −

  • (a−1)b

a

  • − 1.

6

Compute α =

  • a − a

c − a b + 2a cb

  • .

7

while αb mod a + αb

a

  • c ≤ (c − 1)b + a − c do α := α + 1.

8

return b − αb

a

  • − 1.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 135 / 147 Motivation PM semigroups A database GAP Semigroups Automata Automata (II) Semigroups (II) NS References

After obtaining an upper bound for ξ, we have been able to give a formula to compute the Frobenius number of a large family of proportionally modular numerical semigroups.

Theorem 6.6

If a(a − c) < bc and α =

  • a − a

c − a b + 2a cb

  • , then F(S(a, b, c)) =

                     b − αb

a

  • − 1

if αb mod a + αb

a

  • c > (c − 1)b + a − c;

b −

  • (α+1)b

a

  • − 1

if αb mod a + αb

a

  • c ≤ (c − 1)b + a − c

< (α + 1)b mod a +

  • (α+1)b

a

  • c;

b −

  • (α+2)b

a

  • − 1
  • therwise.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 136 / 147

slide-69
SLIDE 69

Motivation PM semigroups A database GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Proposition 6.7

If b is a multiple of a, then F(S(a, b, c)) = b −

  • γb

a

  • − 1, where

γ =

  • a − a

c + a2 bc − a b + 1

  • .

These results appeared have been obtained in a joint work with Rosales.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 137 / 147 Motivation PM semigroups A database GAP Semigroups Automata Automata (II) Semigroups (II) NS References

A database on numerical semigroups

Given a numerical semigroup S, g(S) = #H(S) is said to be the genus of S.

Remark

[Rosales & Garc´ ıa-S´ anchez] Numerical semigroups of genus n + 1 are

  • btained from numerical semigroups of genus n by removing a

minimal generator greater than the Frobenius number.

Example

S =< 2, 3 > is the only numerical semigroup of genus 1. As F(S) = 1, the semigroups of genus 2 are S \ {2} and S \ {3}

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 138 / 147

slide-70
SLIDE 70

Motivation PM semigroups A database GAP Semigroups Automata Automata (II) Semigroups (II) NS References

We want to create a database of numerical semigroups of genus smaller than a certain number.

Remark

If g > m(S), then m(S \ {g}) = m(S). If g = m(S), then m(S \ {g}) = m(S) + 1. m(S) ≤ g(S) + 1. As a consequence, the computation can be “naively” parallelized: Suppose we have computed all the numerical semigroups of genus n − 1. Then we can put n processors together to calculate the numerical semigroups of genus n: the first processor calculates the numerical semigroup(s) of multiplicity 2 and genus n; the second processor calculates the numerical semigroups of multiplicity 3 and genus n; ...

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 139 / 147 Motivation PM semigroups A database GAP Semigroups Automata Automata (II) Semigroups (II) NS References

... the ith processor calculates the numerical semigroup(s) of multiplicity i + 1 and genus n; ... the nth processor calculates the numerical semigroup(s) of multiplicity n + 1 and genus n; We can keep on going, adding a processor from time to time...

Remark

The heavy work occurs around multiplicity n/2. Let ng and npmg denote the number of numerical semigroups of genus g and the number of proportionally modular numerical semigroups, respectively.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 140 / 147

slide-71
SLIDE 71

Motivation PM semigroups A database GAP Semigroups Automata Automata (II) Semigroups (II) NS References

A table...

g ng ng−1 + ng−2

ng−1+ng−2 ng ng ng−1

npm g

npmg ng npmg npmg−1

2 2 2 1 2 2 1 2 3 4 3 0.75 2 4 1 2 4 7 6 0.8571428 1.75 6 0.8571428 1.5 5 12 11 0.9166666 1.714285 9 0.75 1.5 6 23 19 0.8260869 1.916666 15 0.6521739 1.666666 7 39 35 0.8974358 1.695652 18 0.4615384 1.2 8 67 62 0.9253731 1.717948 22 0.3283582 1.222222 9 118 106 0.8983050 1.761194 32 0.2711864 1.454545 10 204 185 0.9068627 1.728813 36 0.1764705 1.125 11 343 322 0.9387755 1.681372 42 0.1224489 1.166666 12 592 547 0.9239864 1.725947 57 0.0962837 1.357142 13 1001 935 0.9340659 1.690878 58 0.0579420 1.017543 14 1693 1593 0.9409332 1.691308 69 0.0407560 1.189655 15 2857 2694 0.9429471 1.687536 87 0.0304515 1.260869 16 4806 4550 0.9467332 1.682184 93 0.0193508 1.068965 17 8045 7663 0.9525170 1.673949 105 0.0130515 1.129032 18 13467 12851 0.9542585 1.673958 125 0.0092819 1.190476 19 22464 21512 0.9576210 1.668077 130 0.0057870 1.04

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 141 / 147 Motivation PM semigroups A database GAP Semigroups Automata Automata (II) Semigroups (II) NS References

g ng ng−1 + ng−2

ng−1+ng−2 ng ng ng−1

npm g

npmg ng npmg npmg−1

20 37396 35931 0.9608246 1.664707 145 0.0038774 1.115384 21 62194 59860 0.9624722 1.663119 169 0.0027173 1.165517 22 103246 99590 0.9645894 1.660063 173 0.0016756 1.023668 23 170963 165440 0.9676947 1.655880 188 0.0010996 1.086705 24 282828 274209 0.9695256 1.654322 224 0.0007920 1.191489 25 467224 453791 0.9712493 1.651972 218 0.0004665 0.973214 26 770832 750052 0.9730421 1.649812 238 0.0003087 1.091743 27 1270267 1238056 0.9746423 1.647916 275 0.0002164 1.155462 28 2091030 2041099 0.9761213 1.646134 273 0.0001305 0.992727 29 3437839 3361297 0.9777354 1.644088 303 0.0000881 1.109890 30 5646773 5528869 0.9791201 1.642535 359 0.0000635 1.184818 31 9266788 9084612 0.9803409 1.641076 353 0.0000380 0.983286 32 15195070 14913561 0.9814736 1.639734 375 0.0000246 1.062322 33 24896206 24461858 0.9825536 1.638439 401 0.0000161 1.069333 34 40761087 40091276 0.9835673 1.637240 405 0.0000099 1.009975

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 142 / 147

slide-72
SLIDE 72

Motivation PM semigroups A database GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Remark

  • M. Bras-Amor´
  • s conjectures that the number of numerical

semigroups of a given genus has a Fibonacci-like behavior: ng−1 + ng−2 ng →g 1 it is not even known whether ng+1 > ng; it seems that ng+1 ≥ (1.6)ng. This implies that ng+k ≥ (1.6)kng and, thus the growth of the number of numerical semigroups of a given genus is exponential.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 143 / 147 Software references Basic references Not so basic references Specific references GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Software references

  • M. Delgado, S. Linton and J. Morais, Automata: a GAP

package on finite automata. (http://www.gap-system.org/Packages/automata.html).

  • M. Delgado, P. A. Garc´

ıa-S´ anchez and J. Morais, “numericalsgps”: a GAP package on numerical semigroups. (http://www.gap-system.org/Packages/numericalsgps.html).

  • M. Delgado and J. Morais, SgpViz, a GAP [3] package to

visualize finite semigroups, (http://www.gap-system.org/Packages/sgpviz.html). The GAP Group. GAP – Groups, Algorithms, and Programming, Version 4.4, 2004. (http://www.gap-system.org).

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 144 / 147

slide-73
SLIDE 73

Software references Basic references Not so basic references Specific references GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Basic references

J.M. Howie, “Fundamentals of Semigroup Theory”, Oxford University Press, 1995. J.M. Howie, “Automata and Languages”, Clarendon Press, 1991.

  • J. E. Hopcroft J. D. Ullman, “Introduction to Automata Theory,

Languages and Computation”, Addison Wesley, 1979.

  • D. C. Kozen, “Automata and Computability”, Springer, 1997.
  • G. Lallement, “Semigroups and Combinatorial Applications”,

John Wiley & Sons, New York, 1979. J.-E. Pin, “Varieties of Formal Languages”, Plenum, London, 1986.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 145 / 147 Software references Basic references Not so basic references Specific references GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Not so basic references

  • J. Almeida, “Finite Semigroups and Universal Algebra”, World

Scientific, Singapore, 1995.

  • J. Rhodes and B. Steinberg, “The q-theory of finite

semigroups”, Springer Monographs in Mathematics, 2009 J.C. Rosales and P. A. Garc´ ıa-S´ anchez, “Numerical Semigroups”,

  • Springer. To appear.
  • J. L. Ram´

ırez Alfons´ ın, “The Diophantine Frobenius Problem”, Oxford Lectures Series in Mathematics and its Applications 30, Oxford University Press, (2005).

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 146 / 147

slide-74
SLIDE 74

Software references Basic references Not so basic references Specific references GAP Semigroups Automata Automata (II) Semigroups (II) NS References

Specific references

  • M. Bras-Amor´
  • s, Fibonacci-like behavior of the number of numerical

semigroups of a given genus, Semigroup Forum, 76 (2008) 379–384.

  • E. Cordeiro, M. Delgado and V.H. Fernandes, Relative abelian kernels
  • f some classes of transformation monoids, Bull. Austral. Math. Soc.

73 (2006) 375–404.

  • M. Delgado, Abelian pointlikes of a monoid, Semigroup Forum 56

(1998) 339–361.

  • M. Delgado, V.H. Fernandes, S. Margolis and B. Steinberg, On

semigroups whose idempotent-generated subsemigroup is aperiodic,

  • Int. J. Algebra Comput. 14 (2004) 655-665.
  • M. Delgado and J. C. Rosales, On the Frobenius number of a

proportionally modular Diophantine inequality. Portugaliae Mathematica, 63 (2006) 415-425.

Manuel Delgado Semigroups and Automata Soria, 20-24/07/2009 147 / 147