Quick viewing(Text Mode)

On Krohn-Rhodes Theory for Semiautomata

On Krohn-Rhodes Theory for Semiautomata

arXiv:2010.16235v1 [cs.FL] 30 Oct 2020 ent rh n onRoe 4 n a ese sageneralizat a as seen be jo can groups. a and o finite was [4] of banks theory Rhodes Jordan-H¨older decomposition Krohn-Rhodes John are and as which Krohn known automata Kenneth result and deep au groups This of spec simple flip-flops. cascade More are feed-forward a by A components. emulated transition elementary be 6]. can into automaton 5, automata finite framework finite [2, a of problems provides is theory position computational and Krohn-Rhodes their science or theory computer and automata theortical automata of abstract subfield of a is theory Automata Introduction 1 ayoeain npriua,amni sasmgopwt nidentity an with a a is an with a structure particular, algebraic In an operation. is nary semigroup a algebra, Monoids abstract In and 2 th that note b may [1]. theory reader al. Krohn-Rhodes et inclined of Diekert representation The of algebraic work purely [3]. a Ginzburg also of is work valuable the hspprpoie hr nrdcint rh-hdstheory Krohn-Rhodes to introduction short a provides paper This Keywords: Classification: Subject AMS ∗ mi:[email protected] Email: nKonRoe hoyfrSemiautomata for Theory Krohn-Rhodes On ntevlal oko Ginzburg. of work Krohn-Rhodes valuable into compu the working introduction on the short for a access provides produ to paper cascade easy This not a is by outcome connected this corr ever, automata which reset components elementary and into permutation fin decomposed each that be states auto can roughly elementary ton Rhodes and into Krohn of decomposition result their famous and automata nite rh-hdster nopse h ehiusfrtestu the for techniques the encompasses theory Krohn-Rhodes eiuoao,mni,gop rh-hdstheory Krohn-Rhodes group, monoid, , eateto optrEngineering Computer of Department abr nvriyo Technology of University Hamburg 17 abr,Germany Hamburg, 21071 alHizZimmermann Karl-Heinz oebr2 2020 2, November Abstract 87,2M5 20A05 20M35, 68Q70, 1 ∗ hoybased theory e scientist. ter t automa- ite aa The mata. sodto espond o h decom- the for t How- ct. oaawhose tomata yo fi- of dy scaiebi- ssociative h recent the y n okof work int h study the o fthe of ion fial,a ifically, ae on based element. lgebraic reset f ere Semigroups and monoids play an important role in the fundamental aspects of theoretical . Notably, the full transformation monoid captures the notion of composition, and each finitely generated can be represented by the of strings over a finite alphabet, A semigroup is an algebraic structure consisting of a non-empty set S and a binary operation

· : S × S → S : (x, y) 7→ x · y (1)

that satisfies the associative law; i.e., for all r,s,t ∈ S,

(r · s) · t = r · (s · t). (2)

A semigroup S is commutative if it satisfies the commutative law; i.e., for all s,t ∈ S,

s · t = t · s. (3)

A semigroup S with operation · is also written as a pair (S, ·). The juxtapo- sition s · t is also denoted as st. The number of elements of a semigroup S is called the order of S.

Example 1.

• Each singleton set S = {s} forms a commutative semigroup under the operation s · s = s. • The set of natural numbers N forms a commutative semigroup under ad- dition, or multiplication. • The set of integers Z forms a commutative semigroup under minimum, or maximum.

A monoid is a semigroup M with a distinguished element e ∈ M, called , which satisfies for all m ∈ M,

m · e = m = e · m. (4)

A monoid is commutative if its operation is commutative. A monoid M with operation · and identity element e is also written as (M, ·,e). Note that each monoid M has a unique identity element, since if e and e′ are identity elements of M, then e = e · e′ = e′. Example 2.

• Any semigroup S can be made into a monoid by adjoining an element e not in S and defining s · e = s = e · s for all s ∈ S ∪{e}.

• The set of natural numbers N0 forms a commutative monoid under addi- tion (with identity element 0), or multiplication (with identity element 1). • The power set P (X) of a set X forms a commutative monoid under inter- section (with identity element X), or union (with identity element ∅).

2 • The set of all integral 2 × 2 matrices Z2×2 forms a commutative monoid under addition (with the zero matrix O as identity element), and a non- commutative monoid under multiplication (with the unit matrix I as iden- tity element). In view of the above observation, we will concentrate on monoids instead of semigroups in the sequel. Proposition 2.1. Let (M, ·,e) be a monoid and X a non-empty set. The set of all mappings from M to X,

M X = {f | f : X → M}, (5) forms a monoid under component-wise multiplication

(f · g)(x)= f(x)g(x), f,g ∈ M X , x ∈ X. (6)

Proof. The operation is associative, since for all f,g,h ∈ M X and x ∈ X,

((f · g) · h)(x) = (f · g)(x)h(x) = (f(x)g(x))h(x)= f(x)(g(x)h(x)) = f(x)(g · h)(x) = (f · (g · h))(x), and the mapping X → M : x 7→ e is the identity element. The image of x under a mapping f is denoted by f(x) or xf. Proposition 2.2. Let X be a non-empty set. The set of all mappings on X,

T (X)= {f | f : X → X}, (7)

forms a monoid under

(fg)(x)= g(f(x)), x ∈ X, (8)

and the id = idX : X → X : x 7→ x is the identity element. Proof. The function composition is associative and the identity function is the identity element. The monoid T (X) is called the full transformation monoid of X. Proposition 2.3. Let (M, ·,e) and (M ′, ·′,e′) be monoids. The direct product set M × M ′ forms a monoid under the component-wise operation

(x, x′) ◦ (y,y′) = (x · y, x′ ·′ y′), x,y ∈ M, x′,y′ ∈ M ′, (9)

and the pair (e,e′) is the identity element. The monoid M × M ′ is commutative if M and M ′ are commutative. Proof. Let x,y,z ∈ M and x′,y′,z′ ∈ M ′. The operation is associative, since

(x, x′) ◦ [(y,y′) ◦ (z,z′)] = (x, x′) ◦ (y · z,y′ ·′ z′) = (x · (y · z), x′ ·′ (y′ ·′ z′)) = ((x · y) · z, (x′ ·′ y′) ·′ z′) ′ ′ ′ ′ = (x · y, x · y ) ◦ (z,z ) = [(x, x′) ◦ (y,y′)] ◦ (z,z′).

3 The operation is commutative, since if M and M ′ are commutative, then (x, x′) ◦ (y,y′) = (x · y, x′ ·′ y′) = (y · x, y′ ·′ x′) = (y,y′) ◦ (x, x′). Finally, the identity element is (e,e′), since ′ ′ ′ ′ ′ ′ (x, x ) ◦ (e,e ) = (x · e, x · e ) = (x, x ), (e,e′) ◦ (x, x′) = (e · x, e′ ·′ x′) = (x, x′).

An alphabet denotes always a finite non-empty set, and the elements of an alphabet are called symbols or characters. A word or string of length n ≥ 0 over an alphabet Σ is a finite x = (x1,...,xn) with components in Σ. A string x = (x1,...,xn) is usually written without delimiters x = x1 ...xn. If n = 0, then x is the empty string denoted by ǫ. Proposition 2.4. Let Σ be an alphabet. The set Σ∗ of all finite strings over Σ forms a monoid under of strings and the empty string ǫ is the identity element. The monoid Σ∗ is called the word monoid over Σ. A submonoid of a monoid (M, ·,e) is a non-empty subset U of M which contains the identity element e and is closed under the monoid operation; i.e., for all u, v ∈ U, u · v ∈ U. Example 3. • Each monoid (M, ·,e) has two trivial submonoids, M and {e}. • ∗ Let Σ1 and Σ2 be alphabets. If Σ1 is asubset ofΣ2, then Σ1 is a submonoid ∗ of Σ2. • Consider the set of all upper triangular integral 2 × 2 matrices U = a b | a,b,c ∈ Z . The set U forms a submonoid of the matrix  0 c   a b monoid (Z2×2, +, O), since U is closed under matrix addition +  0 c  d e a + d b + e = and contains the unit element O. Like-  0 f   0 c + f  wise, the set U forms a submonoid of the matrix monoid (Z2×2, ·, I), a b d e since U is closed under matrix multiplication =  0 c   0 f  ad ae + bf and contains the unit element I.  0 cf 

Lemma 2.5. Let (M, ·,e) be a monoid. The mapping rx : M → M : m 7→ mx is called right multiplication with x ∈ M. The set of all right multiplications with elements from M, RM = {rx | x ∈ M}, forms a submonoid of the full transformation monoid T (M).

Proof. Let x,y,z ∈ M. Then rxry = rxy since for all z ∈ M,

zrxy = z(xy) = (zx)y = (zx)ry = (zrx)ry = z(rxry), and re = id since for all z ∈ M, re(z)= ze = z = id(z).

4 The left multiplications are similarly defined. Each submonoid of a full trans- formation monoid is called a transformation monoid. Proposition 2.6. Let M be a monoid and X be a subset of M. The set of all finite products of elements of X,

hXi = {x1 ··· xn | x1,...,xn ∈ X,n ≥ 0}, (10)

forms a submonoid of M. It is the smallest submonoid of M containing X. Proof. The product of two finite products of elements of X is also a finite product, and the empty product (n = 0) gives the identity element of M. Thus hXi is a submonoid of M. Moreover, each submonoid U of M containing the set X must also contain all finite products of elements of X; i.e., we have hXi⊆ U.

For each finite set X = {x1,...,xn} write hx1,...,xni instead of hXi. Let M be a monoid and X be a subset of M. Then M is said to be generated by X if M = hXi. In this case, X is a generating set of M. In particular, M is finitely generated if M has a finite generating set X.

Example 4.

• For each monoid (M, ·,e), we have h∅i = {e} und hMi = M.

• The monoid (N0, +, 0) is generated by X = {1}, since n = n·1=1+...+1 for all n ∈ N0. • The monoid (N, ·, 1) is generated by the set of prime numbers, since by the fundamental theorem of arithmetic, each positive is a (unique) product of prime numbers. • The word monoid Σ∗ is generated by the underlying alphabet Σ. • Consider the matrix monoid (Z2×2, ·, I). The powers of the matrix A = 0 1 −1 0 0 −1 1 0 are A2 = , A3 = , A4 = ,  −1 0   0 −1   1 0   0 1  and A5 = A. Thus hAi = {I, A, A2, A3} is a (cyclic) submonoid of order 4.

Let (M, ·,e) and (M ′, ·′,e′) be monoids. A is a mapping φ : M → M ′ which assigns the identity elements

φ(e)= e′ (11) and commutes with the monoid operations, i.e., for all x, y ∈ M,

′ φ(x · y)= φ(x) · φ(y). (12)

A homomorphism φ : M → M ′ between monoids is a monomorphism if φ is one-to-one, an epimorphism if φ is onto, an isomorphism if φ is one-to- one and onto, an if M = M ′, and an automorphism if φ is an endomorphism and an isomorphism. In particular, two monoids M and M ′ are isomorphic if there is an isomorphism φ : M → M ′. Isomorphic monoids have the same structure up to a relabelling of the elements.

5 Example 5.

∗ • Let Σ be an alphabet. The length mapping φ : Σ → N0 : x 7→ |x| is ∗ ∗ a homomorphism from (Σ , ·,ǫ) onto (N0, +, 0), since for all x, y ∈ Σ , φ(xy)= |xy| = |x| + |y| = φ(x)+ φ(y) and φ(ǫ)= |ǫ| = 0. This homomor- phism is an epimorphism. • The mapping φ : Z2×2 → Z : A 7→ det(A), where det(A) = ad − bc a b denotes the determinant of the matrix A = , is a homorphisms  c d  from (Z2×2, ·, I) onto (Z, ·, 1). This homomorphism is an epimorphism. • Let X be a set. The mapping φ : P (X) → P (X): A 7→ X \ A is a homomorphism from (P (X), ∩,X) onto (P (X), ∪, ∅), since for all A, B ∈ P (X), φ(A ∩ B)= X \ (A ∩ B) = (X \ A) ∪ (X \ B)= φ(A) ∪ φ(B) and φ(X)= X \ X = ∅. This homomorphism is an isomorphism.

Lemma 2.7. Let φ : M → M ′ be a homomorphism between monoids. • The image of φ is a submonoid of M ′, written im(φ). • If N ′ is a submonoid of M ′, then φ−1(N ′) is a submonoid of M. • If ψ : M ′ → M ′′ is another homomorphism between monoids, the compo- sition φψ : M → M ′′ is also a homomorphism. Proof. Let x, y ∈ M. Then φ(x) ·′ φ(y) = φ(x · y) ∈ im(φ). Moreover, e′ = φ(e) ∈ im(φ). Therefore, im(φ) is a submonoid of M ′. Let x, y ∈ φ−1(N ′). Then φ(x · y)= φ(x) ·′ φ(y) ∈ N ′. Moreover, φ(e)= e′ ∈ N ′ and so e ∈ φ−1(N ′). Thus φ−1(N ′) is a submonoid of M. The composition of mappings is a mapping. Moreover, for all x, y ∈ M,

(φψ)(x · y) = ψ(φ(x · y)) = ψ(φ(x) ·′ φ(y)) ′′ = ψ(φ(x)) · ψ(φ(y)) = (φψ)(x) ·′′ (φψ)(y) and (φψ)(e)= ψ(φ(e)) = ψ(e′)= e′′. Proposition 2.8. The set of all End(M) of a monoid M forms a monoid under the composition of mappings. Proof. By Lemma 2.7, the composition of two endomorphisms φ : M → M and ψ : M → M is an endomorphism φψ : M → M. Thus the set of all endomorphisms of M is closed under composition. Moreover, the composition of mappings is associative and the identity mapping id : M → M is the identity element. Therefore, the endomorphism monoid End(M) is a submonoid of the full transformation monoid T (M). Proposition 2.9. Let M and N be monoids. If φ : M → M ′ is an isomorphism, the inverse mapping φ−1 : M ′ → M is also an isomorphism.

6 Proof. The inverse mapping φ−1 exists, since φ is bijective. Moreover, the mapping φ−1 is also bijective and we have φφ−1 = id = φ−1φ. Since φ is a homomorphism, we have for all x, y ∈ M ′,

φ(φ−1(x) · φ−1(y)) = φ(φ−1(x)) ·′ φ(φ−1(y)) = x ·′ y

and therefore φ−1(x) · φ−1(y) = φ−1(x ·′ y). Moreover, φ(e) = e′ implies φ−1(e′)= e. Theorem 2.10. Each monoid M is isomorphic to a transformation monoid.

Proof. Claim that the mapping φ : M → RM : x 7→ rx is an isomorphism. Indeed, for all x, y ∈ M, we have φ(xy) = rxy = rxry = φ(x)φ(y) and φ(e) = re = id. It is clear that the mapping is onto. It is also one-to-one, since rx = ry with x, y ∈ M implies by substitution of the identity element e, x = xe = rx(e)= ry(e)= ye = y. Therefore, the theory of monoids can be considered as the theory of transfor- mations.

Example 6. Consider the monoid M = {a,e,b} (corresponding to the multi- plicative monoid {−1, 0, 1}) with the multiplication table

· a e b a b e a e e e e b a e b

The transformation monoid of left multiplications RM consists of the elements a e b a e b a e b rb = , re = , rb = ,  b e a   e e e   a e b  where the right multiplications correspond one-to-one with the rows of the mul- tiplication table of M. The multiplication table of RM is as follows:

· rb re rb

ra rb re ra re re re re rb ra re rb Let M be a monoid. Suppose ≡ is an equivalence relation on M. The equiva- lence class of x ∈ M is given by the set of all elements of M which are equivalent to x,

[x]= {y ∈ M | x ≡ y}. (13)

The quotient set consisting of all equivalence classes is

M/≡ = {[x] | x ∈ M}. (14)

An equivalence relation ≡ on M is a congruence relation if it is compatible with the monoid operation, i.e., for all x, x′,y,y′ ∈ M,

x ≡ x′ ∧ y ≡ y′ =⇒ xy ≡ x′y′, (15)

7 or equivalently, ′ ′ ′ ′ [x] = [x ] ∧ [y] = [y ] =⇒ [xy] = [x y ]. (16) The equivalence classes of a congruence relation are called congruence classes and elements in the same congruence class are said to be congruent.

Example 7. Let n ≥ 2 be an integer. The relation on Z given by a ≡ b ( mod n):⇐⇒ n divides (a − b) is a congruence on the monoid (Z, +, 0), or the monoid (Z, ·, 1).

Proposition 2.11. Let M be a monoid and ≡ a congruence relation on M. Then the quotient set M/≡ forms a monoid under the operation [x] · [y] = [xy], x,y ∈ M. (17)

The monoid M/≡ is commutative if M is commutative. Proof. The operation is well-defined, since if [x] = [x′] and [y] = [y′] for some x, x′,y,y′ ∈ M, then by the congruence property [xy] = [x′y′]. The operation is associative, since for all x,y,z ∈ M, [x] · ([y] · [z]) = [x] · [yz] = [x(yz)] = [(xy)z] = [xy] · [z] = ([x] · [y]) · [z]. The equivalence class of the identity element e ∈ M is the identity element of M/≡, since for all x ∈ M,[x] · [e] = [xe] = [x] = [ex] = [e] · [x]. Finally, if M is commutative, then for all x, y ∈ M,[x] · [y] = [xy] = [yx] = [y] · [x]. Example 8. Reconsider the congruence modulo n on Z. Two integers are congruent modulo n if and only if they have the same remainder upon integral division by n. The quotient set Z/ ≡, consisting of all congruence classes of remainders [0],..., [n − 1], forms a commutative monoid under addition, or multiplication.

Proposition 2.12. Let M be a monoid and ≡ a congruence on M. Then the mapping π : M → M/≡: x 7→ [x] is an epimorphism. Proof. The mapping π is surjective. Moreover, by Prop. 2.11, for all x, y ∈ M, φ(xy) = [xy] = [x] · [y]= φ(x) · φ(y), and φ(e) = [e]. Example 9. Consider the monoid M given by the multiplication table · ea b c e ea b c a ae c b b b c ea c c bae

The partition {{e,a}, {b,c}} defines a congruence ≡ on M, and the quotient monoid M/≡ is given by the multiplication table · [e][b] [e] [e][b] [b] [b][e]

8 Lemma 2.13. Let φ : M → N be a homomorphism between monoids M and N. Then the relation on M defined by x ≡ y :⇐⇒ φ(x)= φ(y), x,y ∈ M, (18) is a congruence on M. Proof. Let x, x′,y,y′ ∈ M with x ≡ x′ and y ≡ y′. Then φ(x) = φ(x′) and φ(y)= φ(y′). Since φ is a homomorphism, φ(xy)= φ(x) · φ(y)= φ(x′) · φ(y′)= φ(x′y′) and hence xy ≡ x′y′. This congruence relation is called the kernel of φ and is denoted by ker(φ). Proposition 2.14 (Homomorphism Theorem). Let φ : M → N be a homo- between monoids M and N. Then the mapping ψ : M/ ker(φ) → N given by [x] 7→ φ(x) is a monomorphism such that πψ = φ, where π : M → M/ ker(φ): x 7→ [x] is a natural epimorphism. Proof. The mapping ψ is well-defined, since if [x] = [y] for some x, y ∈ M, then x ≡ y and so φ(x) = φ(y). The mapping is a homomorphism, since for all x, y ∈ M, ψ([xy]) = φ(xy)= φ(x) · φ(y)= ψ([x]) · ψ([y]), and ψ([e]) = φ(e)= e′ for the identity elements e ∈ M and e′ ∈ N. The mapping is one-to-one, since if ψ([x]) = ψ([y]) for some x, y ∈ M, then φ(x)= φ(y), or equivalently x ≡ y or [x] = [y]. Finally, for each x ∈ M, (πψ)(x)= ψ(π(x)) = ψ([x]) = φ(x). This result provides the following commutative diagram:

φ M ♠6/ N ♠ ♠ π ♠ ♠ ♠ ψ  ♠ M/ ker(φ)

The Homomorphism theorem shows that any homomorphic image of a monoid can be constructed by means of a congruence relation on M. ∗ Example 10. Reconsider the epimorphism (length mapping) φ : Σ → N0 : x 7→ |x|. In the kernel of this mapping, two strings are congruent if and only if they have the same length; i.e., the congruence class of x ∈ Σ∗ is [x]= {y ∈ ∗ ∗ Σ | |x| = |y|}. The monomorphism ψ : Σ / ker(φ) → N0 :[x] 7→ |x| assigns to each congruence class the length of its elements. A monoid M is called free if M has a generating set X such that each element of M can be uniquely written as a product of elements in X. In this case, the set X is called a basis of M. Proposition 2.15. The word monoid Σ∗ over Σ is free with basis Σ. Proof. By definition, Σ∗ = hΣi. Suppose the word x ∈ Σ∗ has two representa- tions x1x2 ...xm = x = y1y2 ...yn, xi,yj ∈ Σ. Each word is a sequence or mapping 1 2 ... m 1 2 ... n = x = .  x1 x2 ... xm   y1 y2 ... yn 

Thus by the equality of mappings m = n and xi = yi for 1 ≤ i ≤ n.

9 Theorem 2.16 (). Let M be a free monoid with basis X. ′ ′ For each monoid M and each mapping φ0 : X → M there is a unique homo- ′ morphism φ : M → M extending φ0. The universal property provides the following commutative diagram:

φ0 X / M ′ ♦7 ♦ ♦ id ♦ ♦ φ  ♦ ♦ M

Proof. Since M is a free monoid with basis X, each element x ∈ M has a unique ′ representation x = x1x2 ...xn, where xi ∈ X. Thus the mapping φ0 : X → M can be extended to a mapping φ : M → M ′ such that

φ(x1x2 ...xn)= φ0(x1)φ0(x2) ...φ0(xn), xi ∈ X.

The uniqueness property ensures that φ is a mapping. This mapping is a ho- ∗ ∗ momorphism, since for all x = x1 ...xm ∈ Σ and y = y1 ...yn ∈ Σ with xi,yj ∈ Σ, we have

φ(xy) = φ(x1 ...xmy1 ...yn)

= φ0(x1) ...φ0(xm)φ0(y1) ...φ0(yn)

= φ(x1 ...xm)φ(y1 ...yn)= φ(x)φ(y).

′ Let ψ : M → M be another homomorphism extending φ0. Then for each ∗ x = x1 ...xn ∈ Σ with xi ∈ Σ,

φ(x1x2 ...xn) = φ0(x1)φ0(x2) ...φ0(xn)

= ψ(x1)ψ(x2) ...ψ(xn)

= ψ(x1x2 ...xn).

Hence, φ = ψ.

Example 11.

• The trivial monoid M = {e} is free with basis X = ∅.

• The monoid (N0, +, 0) is free with basis X = {1}, since each natural number n can be uniquely written as n = n · 1=1+ ... + 1. • The monoid (N, ·, 1) is not free. Suppose it would be free with basis ∗ X. Take the word monoid Σ with basis Σ = X und the mapping φ0 : X → Σ∗ : n 7→ n. By the universal property 2.16, there is a unique ∗ homomorphism φ : N → Σ extending φ0. The basis X contains at least two elements, since N is more than the power of one number. If say 2, 3 ∈ X, then

23 = φ0(2)φ0(3) = φ(2 · 3) = φ(6) = φ(3 · 2) = φ0(3)φ0(2) = 32.

But 23 and 32 are different as strings. A contradiction.

10 • Each finite non-trivial monoid M cannot be free. Suppose M would be free with basis X. Take the word monoid Σ∗ with basis Σ = X and the ∗ mapping φ0 : X → Σ : x 7→ x. By the universal property 2.16, there is a ∗ unique homomorphism φ : M → Σ extending φ0. Since M is non-trivial, there is an element x 6= e in M. Consider the powers x, x2, x3,.... Since M is finite, there are numbers i, j such that i < j and xi = xj . Then xi = φ(xi) = φ(xj ) = xj . But xi and xj are distinct as strings in Σ∗. A contradiction.

Proposition 2.17. Let M and M ′ be free monoids with finite bases X and X′, respectively. If |X| = |X′|, then M and M ′ are isomorphic. Proof. Since X and X′ have the same finite cardinality, we can choose bijections ′ ′ φ0 : X → X and ψ0 : X → X which are inverse to each other. By the universal property 2.16, there are φ : M → M ′ and ψ : M ′ → M extending φ0 and ψ0, respectively. Then for each x = x1 ...xm ∈ M with xi ∈ X,

(ψφ)(x) = (ψφ)(x1 ...xm)

= ψ(φ0(x1) ...φ0(xm))

= ψ0(φ0(x1)) ...ψ0(φ0(xm))

= x1 ...xm = x.

Thus ψφ = idM and similarly φψ = idM ′ . Therefore, φ and ψ are isomorphisms, as required. By the Propositions 2.15 and 2.17, and Example 11, we obtain the following result. Theorem 2.18. For each number n ≥ 0, there is exactly one free monoid (up to isomorphism) with a basis of n elements.

3 Semiautomata

Semiautomata are deterministic finite state machines with inputs but no out- puts. They can serve as basic abstractions of various physical devices. A semiautomaton is a triple A = (S, Σ,δ), where S is a finite set of states, Σ is an alphabet of inputs, and δ : S × Σ → S is a mapping called transition function. A semiautomaton is a deterministic finite state machine that is exactly in one state at a time. If the semiautomaton is in state s and reads the input symbol a, it transits into the state s′ = δ(s,a). Lemma 3.1. Let A = (S, Σ,δ) be a semiautomaton. Then there is a unique mapping δ∗ : S × Σ∗ → S extending δ as follows: • δ∗(s,ǫ)= s for all s ∈ S. • δ∗(s,a)= δ(s,a) for all s ∈ S and a ∈ Σ. • δ∗(s,ax)= δ∗(δ(s,a), x) for all s ∈ S, a ∈ Σ, and x ∈ Σ∗.

11 We have δ∗(s,xy)= δ∗(δ∗(s, x),y) for all s ∈ S and x, y ∈ Σ∗. The proof is based on the universal property 2.16 and makes use of induction. Proposition 3.2. Let A = (S, Σ,δ) be a semiautomaton. Then there is an action of Σ∗ on S defined by s · x = δ∗(s, x), s ∈ S, x ∈ Σ∗. (19) Proof. The operation is associative, since for all s ∈ S and x, y ∈ Σ∗, s · (xy)= δ∗(s,xy)= δ∗(δ∗(s, x),y) = (s · x) · y, and s · ǫ = δ∗(s,ǫ)= s. Let A = (S, Σ,δ) be a semiautomaton. For each string x ∈ Σ∗, define the mapping

τx : S → S : s 7→ s · x (20) which describes the effect that the string x has on the set of states. Proposition 3.3. Let A = (S, Σ,δ) be a semiautomaton. The mapping τ : ∗ Σ → T (S): x 7→ τx is a monoid homomorphism. The image ∗ T (A)= {τx | x ∈ Σ } (21) is a submonoid of the full transformation monoid T (S) generated by the set {τa | a ∈ Σ}. Proof. The mapping τ is a homomorphism, since for all x, y ∈ Σ∗ and s ∈ S,

sτxy = s · (xy) = (s · x) · y = (sτx)τy, i.e., τxy = τxτy, and sτǫ = s · ǫ = s, i.e., τǫ = idS. By Lemma. 2.7, T (A) is a submonoid of T (S). For each symbol a ∈ Σ and each string x ∈ Σ∗, we have τax = τaτx. Thus by induction on the length of strings, the monoid T (A) is generated by the set of transformations {τa | a ∈ Σ}. Therefore, the behavior of a semiautomaton A given by the transition func- tion δ is fully described by the set of transformations corresponding to the input alphabet {τa | a ∈ Σ}. The monoid T (A) is called the transition monoid of the semiautomaton A. Example 12. Consider the semiautomaton A = (S, Σ,δ) with state set S = {1, 2, 3}, input alphabet Σ = {a,b}, and transition function δ given by the automaton graph in Figure 1. The corresponding transformation monoid is generated by the transformations 1 2 3 1 2 3 τa = and τb = .  1 1 1   2 2 3  We have 1 2 3 1 2 3 τaa = , τab = ,  1 1 1   2 2 2  1 2 3 1 2 3 τba = , τbb = .  1 1 1   2 2 3  Therefore, the transformation monoid T (A) is given by the set of transforma- tions {idS, τa, τb, τab}.

12 b a 1 + 2 b 6?>=<89:;^❃k ?>=<89:;h ❃❃ a ❃❃ a ❃❃ ❃❃ 3 b ?>=<89:;h

Figure 1: Semiautomaton A.

A semiautomaton B = (SB, ΣB,δB ) is a homomorphic image of a semiau- tomaton A = (SA, ΣA,δA) if there are surjective mappings φ : SA → SB and ξ :ΣA → ΣB such that for each symbol a ∈ ΣA,

A B τa φ = φτξ(a). (22)

If both mappings φ and ξ are also injective, the semiautomata A and B are said to be isomorphic. If two semiautomata are isomorphic, one can be obtained from the other by simply renaming the states and inputs. Proposition 3.4. If a semiautomaton B is a homomorphic image of a semi- automaton A, then T (B) is a homomorphic image of T (A). Proof. Let B be a homomorphic image of A. Then there are surjective mappings A B A B A B A φ : S → S and ξ :Σ → Σ such that τa φ = φτξ(a) for each a ∈ Σ . The in- put mapping ξ can be extended to strings by setting ξ(a1 ...an)= ξ(a1) ...ξ(an) A A B A for all a1,...,an ∈ Σ . Then we obtain τx φ = φτξ(x) for each string x over Σ . −1 Since φ is surjective, we have φ φ = idSB and therefore for each string x over ΣA, −1 A −1 B B φ τx φ = φ φτξ(x) = τξ(x). A B Consider the mapping ψ : T (A) → T (B) defined by τx 7→ τξ(x). This mapping A A A −1 A is well-defined, since if τx = τy for some strings x, y over Σ , then φ τx φ = −1 A B B φ τy φ and so τξ(x) = τξ(x). This mapping is a homomorphism, since for all strings x, y over ΣA,

A A A B B B B A A ψ(τx τy )= ψ(τxy)= τξ(xy) = τξ(x)ξ(y) = τξ(x)τξ(y) = ψ(τx )ψ(τy ). The mapping ψ is surjective, since the mapping ξ is onto and so each transfor- B B B A mation τ ∈ T (B) has the form τ = τξ(x) for some string x over Σ . Example 13. Consider the semiautomata A and B given in Fig. 2. The semi- automaton B is a homomorphic image of the semiautomaton A with mappings 1 2 3 a φ = and ξ = . The transformation monoids T (A) =  1 1 3   a  1 2 3 1 3 {id, τ A} and T (B) = {id, τ B } with τ A = and τ B = a a a  3 3 3  a  3 3  are isomorphic, although the semiautomata A and B are not isomorphic.

A semiautomaton B = (SB, ΣB,δB) is a subsemiautomaton of a semiautoma- ton A = (SA, ΣA,δA) if SB ⊆ SA, ΣB ⊆ ΣA, and δB is the restriction of δA onto SB × ΣB; i.e., δB(s,a)= δA(s,a) for all s ∈ SB and a ∈ ΣB.

13 a / a ?>=<89:;1 ?>=<89:;9 3 h rrr h a rrr a rr ?>=<89:;1 /?>=<89:;3 a rrr h rrr ?>=<89:;2

Figure 2: Semiautomata A and B.

Proposition 3.5. If B is a subsemiautomaton of a semiautomaton A, then T (B) is a homomorphic image of a subsemigroup of T (A). In particular, if ΣA =ΣB, then T (B) is a homomorphic image of T (A).

A B Proof. The transformations τa with a ∈ Σ generate a subsemigroup T of T (A). The restrictions of the elements of T to ΣB are mappings from ΣB to ΣB which form the submonoid T (B). The mapping φ : T → T (B) which assigns to each transformation τ ∈ T its restriction to SB is a homomorphism.

Example 14. Reconsider the semiautomaton A in Figure 1. Take the semi- automaton B = (S, Σ,δ) with state set S = {1, 2}, input alphabet Σ = {a,b}, and transition function δ given by the automaton graph in Figure 3. The cor- responding transformation monoid is generated by the transformations

1 2 1 2 τa = and τb = .  1 1   2 2 

We have 1 2 1 2 1 2 1 2 τaa = , τab = , τba = , and τbb = .  1 1   2 2   1 1   2 2 

Thus the transformation monoid T (B) is given by the set of transformations {idS, τa, τb}. The mapping T (A) → T (B) defined by restricting each transfor- A B mation τx of T (A) to S is an epimorphism.

b + a ?>=<89:;1 k ?>=<89:;2 b 6 a h

Figure 3: Semiautomaton.

4 Coverings of Semiautomata

The covering of semiautomata is the most important concept in algebraic au- tomata theory. A covering semiautomaton is able to perform the tasks of the covered semiautomaton but may have a different structure.

14 A semiautomaton B = (SB, ΣB,δB) covers semiautomaton A = (SA, ΣA,δA) written B ≥ A, if there is a surjective mapping φ of a subset of SB onto SA and a mapping ξ :ΣA → ΣB such that for each symbol a ∈ ΣA,

A B φτa = τξ(a)φ. (23)

Note that if B covers A and the state set SB or the input alphabet ΣB or both are augmented to larger sets, the resulting semiautomaton will still cover A. Lemma 4.1. If B ≥ A such that the mapping ξ is injective, then A is a homomorphic image of a subsemiautomaton of B. Proof. Let B be a covering of A. Then there are appropriate mappings φ and A B A ξ such that φτa = τξ(a)φ for all a ∈ Σ . Claim that the subset SC = φ−1(SA) of SB forms a subsemiautomaton C C A B −1 A B A of B with input alphabet Σ = ξ(Σ ). Indeed, if s ∈ φ (S ), then s φτa = B B B B −1 A C s τξ(a)φ and so s τξ(a) ∈ φ (S ); i.e., the set S is closed under the trans- formations in T (B) which correspond to ΣC . Claim that A is a homomorphic image of the subsemiautomaton C of B. Indeed, we have C A A τξ(a)φ = φτξ−1 (ξ(a)) = φτa , since ξ is injective and so ξξ−1 is the identity on ΣA. Note that if in the covering B ≥ A, φ is injective and ξ is bijective, then the semiautomaton obtained from A by coinciding the subsets of inputs having equal images under ξ is isomorphic to B.

Example 15. The semiautomaton A in Fig. 1 covers the semiautomaton B in Fig. 3, where the state mapping φ : {1, 2}→{1, 2} and the alphabet mapping ξ : {a,b}→{a,b} are the identity mappings.

Lemma 4.2. Let A, B, and C be semiautomata. If C ≥ B and B ≥ A, then C ≥ A. Proof. Suppose C covers B and B covers A. Then there are surjective mappings C B B A B B C C φC : S1 → S and φB : S1 → S , where S1 ⊆ S and S1 ⊆ S , and A B B C A mappings ξB : Σ → Σ and ξC :Σ → Σ such that for all symbols a ∈ Σ B A B and b ∈ Σ , φBτa = τξB (a)φB and φC τb = τξC (b)φC . Then the composition C A A C φC φB : S1 → S is surjective and the composition ξBξC : Σ → Σ is a mapping. For all symbols a ∈ ΣA, we have

A A B B (φC φB )τa = φC (φB τa )= φC (τξB (a)φB) = (φC τξB (a))φB C C = (τξC (ξB (a))φC )φB = τξC (ξB (a))(φC φB).

The relation of covering is reflexive and transitive, but may not be symmetric. If A and B are semiautomata with A ≥ B and B ≥ A, then A and B are called equivalent.

15 The direct product of semiautomata A = (SA, Σ,δA) and B = (SB, Σ,δB) is the semiautomaton A × B = (SA×B, Σ,δA×B) with state set SA×B = SA × SB and transition function δA×B((sA,sB),a) = (δA(sA,a),δB(sB,a)), sA ∈ SA,sB ∈ SB,a ∈ Σ. (24) A direct product semiautomaton consists of two subsemiautomata that work in parallel and independently of each other. Proposition 4.3. The transition monoid of a semiautomaton A × B is the direct product monoid T (A × B)= T (A) × T (B). Proof. Let x ∈ Σ∗ and (sA,sB) ∈ SA × SB. Then ∗ ∗ A×B A B A A B B A B τx (s ,s ) = (δ (s , x),δ (s , x)) = (τx (sA), τx (sB)) A×B A B A B and so τx = (τx , τx ). Conversely, each pair (τx , τx ) gives a transformation of T (A × B). Let A = (SA, ΣA,δA) and B = (SB, ΣB,δB) be semiautomata, and ω : SA × ΣA → ΣB a mapping. The cascade product of A and B with respect to the connection mapping ω is the semiautomaton

A◦ωB A◦ωB A◦ωB A ◦ω B = (S , Σ ,δ ) ◦ ◦ with state set SA ωB = SA × SB, input alphabet ΣA ωB =ΣA, and transitions defined by

A B A◦ω B A A B B A A B B A (s ,s )τa = (s τa ,s τω(sA,a)), s ∈ S ,s ∈ S ,a ∈ Σ . (25) The cascade product is commonly used in the case when SA × ΣA ⊆ ΣB and ω is the identity mapping on SA × ΣA. Then the cascase product of A and B is denoted by A ◦ B and we have

A B A◦B A A B B A A B B A (s ,s )τa = (s τa ,s τ(sA,a)), s ∈ S ,s ∈ S ,a ∈ Σ . (26) Note that if ΣA =ΣB and ω(sA,a)= a for each sA ∈ SA and a ∈ ΣA, then the cascade product A ◦ω B reduces to the direct product A × B. Hence, the direct product of semiautomata is special case of the cascade product of semiautomata. Lemma 4.4. Let A, B, and C be semiautomata. If B ≥ A, then for each ′ C ◦ω A, there exists a connection mapping ω such that C ◦ω′ B ≥ C ◦ω A. Proof. Let B ≥ A. Then there is a mapping φ from a subset of SB onto SA A B A A B and a mapping ξ from Σ into Σ such that for each a ∈ Σ , φτa = τξ(a)φ. Define the mapping φ′ : SC × φ−1(SA) → SC × SA by (sC ,sB)φ′ = (sC ,sBφ), sC ∈ SC ,sB ∈ φ−1(SA). Moreover, define the mapping ω′ : SC × ΣC → ΣA as (sC ,a)ω′ = (sC ,a)ωξ, sC ∈ SC,a ∈ ΣC. − ◦ Then it follows for each (sC ,sB) ∈ SC × φ 1(SA) ⊆ SC ω′ B and a ∈ ΣC, ′ ◦ ◦ ′ C B C ωA C B C ω′ B (s ,s )φ τa = (s ,s )τa φ .

Hence, C ◦ω′ B ≥ C ◦ω A.

16 Lemma 4.5. Let A, B, and C be semiautomata. If B ≥ A with ξ an injec- tive mapping, then for each semiautomaton A ◦ω C, there exists a connection ′ mapping ω such that B ◦ω′ C ≥ A ◦ω C. Proof. Let B ≥ A. Then there is a mapping φ from a subset of SB onto SA A B A A B and a mapping ξ from Σ into Σ such that for each a ∈ Σ , φτa = τξ(a)φ. Suppose ξ is injective. ′ − ◦ Define the mapping φ : φ 1(SA) × SC → SA × SC = SA ωC by

(sB ,sC)φ′ = (sBφ, sC ), sB ∈ φ−1(SA),sC ∈ SC .

Moreover, define the mapping ω′ : SB × ΣB → ΣC such that if sB ∈ φ−1(SA) and a ∈ ΣA, then (sB , ξ(a))ω′ = (sB φ, a)ω. This assignment is well-defined since ξ is injective. For all other pairs (sB,a) the image under ω′ can be defined arbitrarily. − ◦ Then it follows for each (sB ,sC) ∈ φ 1(SA) × SC ⊆ SB ω′ C and a ∈ ΣC,

◦ ′ B C ′ A◦ω C B C B ω C ′ (s ,s )φ τa = (s ,s )τξ(a) φ .

Hence, B ◦ω′ C ≥ A ◦ω C.

5 Coverings with Cascade Product

Semiautomata coming from partitions or decompositions of state sets play an important role in algebraic . Let A = (S, Σ,δ) be a semiautomaton. A partition of S is a collection of non-empty pairwise disjoint subsets of S, whose union is the whole set S. The elements of a partition are called blocks. A partition P of S is called admissible if it is compatible with the monoid action of the semiautomaton; i.e., for each input symbol a ∈ Σ and each block B in P , the set τa(B) = {τa(b) | b ∈ B} is contained in a block of P . Note that ∗ for each string x ∈ Σ and each block B of P , it follows that τx(B) is contained in a block of P . A partition P of a set S is a refinement of a partition Q of S if each block of P is a subset of some block of Q. This finer relation on the set of partitions of a set S is a partial order. Each element has a least upper bound and a greatest lower bound. Thus the partitions of a set S form a lattice. The coarsest partition of S is {S} consisting of S as the only block and the finest partition is {{s} | s ∈ S} consisting of the elements of S as singleton blocks.

Example 16. Consider the semiautomaton A with state set S = {1,..., 7}, input alphabet Σ = {a,b}, and transitions given by

1234567 1234567 τa = and τb = .  2135457   5651227 

Then P = {P1 = {1, 2, 3}, P2 = {4, 5, 6}, P3 = {7}} is an admissible partition of S, since

P1τa = {1, 2, 3}⊆ P1, P2τa = {4, 5}⊆ P2, P3τa = {7}⊆ P3, P1τb = {5, 6}⊆ P2, P2τb = {1, 2}⊆ P1, P3τb = {7}⊆ P3.

17 A A A Let A = (S , Σ ,δ ) be a semiautomaton. Suppose P = {P1,...,Ps} is an admissible partition of the state set SA. Then there is a semiautomaton B B A B = A/P with state set S = {P¯1,..., P¯s} and input alphabet Σ = Σ . A Since the partition P is admissible, for each symbol a ∈ Σ and each block Pi A B there is a block Pj such that τa (Pi) ⊆ Pj . Thus the transition function δ of B B can be defined as δ (P¯i,a)= P¯j . The semiautomaton B is called the P -factor of A.

Example 17. The P -factor of the semiautomaton A in Ex. 16 is the semiau- B B tomaton B = A/P with state set S = {P¯1, P¯2, P¯3}, input alphabet Σ = {a,b}, and transitions given by

B P¯1 P¯2 P¯3 B P¯1 P¯2 P¯3 τa = and τb = .  P¯1 P¯2 P¯3   P¯2 P¯1 P¯3 

Proposition 5.1. Let B be a semiautomaton, P an admissible partition of SB, and A = B/P the P -factor of B. Then B ≥ A.

B B A Proof. Let P = {P1,...,Ps} be a partition of S . Then define φ : S → S B B A B by setting φ(s ) = P¯i if and only if s ∈ Pi, and ξ : Σ → Σ the identity B B B B B A ¯ A mapping. Then for each s ∈ S with s ∈ Pi and a ∈ Σ , s (φτa )= Piτa = A ¯ ¯ B B B B ¯ δ (Pi,a)= Pj if and only if s (τa φ)= δ (s ,a)φ = Pj .

In the following, let πP : S → P denote the natural mapping of S onto the set of blocks of a partition P of S; i.e., πP (s)= Pi if and only if s ∈ Pi. Moreover, let m(P ) denote the maximal number of elements in a block of a partition (or decomposition) P of a finite set. Theorem 5.2. Let A = (SA, Σ,δA) be a semiautomaton and P an admissible partition of SA. Then there is a semiautomaton C with |SC | = m(P ) such that the cascade product B ◦ C covers A, where B = A/P is the P -factor of A.

A Proof. Let P = {P1,...,Ps} be an admissible partition of S , and B the P - B factor of A with state set S = {P¯1,..., P¯s} and input alphabet Σ. One can A find a partition Q = {Q1,...,Qt} of S with t = m(P ) elements such that the intersection of the partitions P and Q,

P ∩ Q = {Pi ∩ Qj | Pi ∩ Qj 6= ∅, 1 ≤ i ≤ s, 1 ≤ j ≤ t}, (27) equals the finest partition of SA; i.e., each block in P ∩ Q is a singleton set; i.e., P ∩ Q = {{s} | s ∈ SA}. C Consider the semiautomaton C with state set S = {Q¯1,..., Q¯t}, input al- phabet ΣC = SB × Σ, and transitions given by

Q¯ τ C = (Q ∩ P )τ Aπ , a ∈ Σ. j (P¯i,a) j i a Q

This operation is well-defined, since Qj ∩ Pi is either empty or a singleton set {sA}. In the first case, the transition can be chosen arbitrarily. In the second, A A ¯ A A s τa πQ is the state Qi of C where s τa ∈ Qi. B◦C B◦C Let T denote the subset of S consisting of all pairs (P¯i, Q¯j ) such that B◦C A Pi ∩ Qj 6= ∅. Then by construction there is a bijective mapping φ : T → S

18 B◦C defined by (P¯i, Q¯j ) 7→ Pi ∩ Qj . Thus for each element (P¯i, Q¯j ) in T and each symbol a ∈ Σ, ¯ ¯ A A (Pi, Qj)φτa = (Pi ∩ Qj )τa A A = Piτa πP ∩ (Pi ∩ Qj)τa πQ A A = (Piτa πP , (Pi ∩ Qj)τa πQ)φ = (P¯ τ B , Q¯ τ C )φ i a j (P¯i,a) ¯ ¯ B◦C = (Pi, Qj)τa φ.

Hence, B ◦ C covers A. Note that if Q is an admissible partition of SA, then the mappings τ C are (P¯i,a) ¯ A independent of Pi, since all elements of Qj are mapped by τa into the same A block of Q. Then all inputs (P¯i,a) with the same symbol a ∈ Σ are equal and ¯ C A after identifying them, the transitions of C are of the form Qj τa = Qj τa πQ. Therefore, the cascade product B ◦ C reduces to the direct product B × C.

Example 18. Consider the semiautomaton A in Ex. 16 together with the ad- missible partition P of SA and the P -factor B = A/P in Ex. 17. Note that we have m(P ) = 3. A The partition Q = {Q1 = {1, 4, 7},Q2 = {2, 5},Q3 = {3, 6}} of S has the A property that P ∩ Q is the finest partition of S . Indeed, P1 ∩ Q1 = {1}, P1 ∩ Q2 = {2}, P1 ∩ Q3 = {3}, and so on. C C The semiautomaton C has state set S = {Q¯1, Q¯2, Q¯3}, input alphabet Σ = SB × Σ, and transitions given by the following table:

C Q¯1 Q¯2 Q¯3

(P¯1,a) Q¯2 Q¯1 Q¯3 (P¯1,b) Q¯2 Q¯3 Q¯2 (P¯2,a) Q¯2 Q¯1 Q¯2 (P¯2,b) Q¯1 Q¯2 Q¯2 ¯ ¯ ¯∗ ¯∗ (P3,a) Q1 Q1 Q1 ¯ ¯ ¯∗ ¯∗ (P3,b) Q1 Q1 Q1

For instance, Q¯ τ C = {1}τ Aπ = {2}π = Q¯ . Note that the marked (*) 1 (P¯1,a) a Q Q 2 transitions can be chosen arbitrarily, since the intersections of blocks are empty. The semiautomaton B ◦ C has the state set SB◦C = SB × SC , the input alphabet ΣB◦C =ΣB, and the transitions given by the following table:

B ◦ C (P¯1, Q¯1) (P¯1, Q¯2) (P¯1, Q¯3) (P¯2, Q¯1) (P¯2, Q¯2) a (P¯1, Q¯2) (P¯1, Q¯1) (P¯1, Q¯3) (P¯2, Q¯2) (P¯2, Q¯1) b (P¯2, Q¯2) (P¯2, Q¯3) (P¯2, Q¯2) (P¯1, Q¯1) (P¯1, Q¯2)

(P¯2, Q¯3) (P¯3, Q¯1) (P¯3, Q¯2) (P¯3, Q¯3) a (P¯2, Q¯2) (P¯3, Q¯1) (P¯3, Q¯1) (P¯3, Q¯1) b (P¯1, Q¯2) (P¯3, Q¯1) (P¯3, Q¯1) (P¯3, Q¯1)

Let A = (S, Σ,δ) be a semiautomaton. A decomposition of S is a collection of non-empty subsets of S, whose union is the whole set S. The elements of a decomposition are called blocks. If the blocks of a decomposition are pairwise

19 disjoint, the decomposition is a partition. A decomposition D of S is called admissible if for each input symbol a ∈ Σ and each block B in D, there is at least one block of D containing the set τa(B) = {τa(b) | b ∈ B}. Note that for each string x ∈ Σ∗ and each block B of D, it follows that there is a least one block of D including τx(B). For an admissible decomposition D of S, the D-factor of A is defined as for a partition of S. However, if for some input symbol a ∈ Σ and some block B in D, τa(B) may be contained in more than one block of D and then one of these blocks can be arbitrarily chosen.

Example 19. Consider the semiautomaton A = (S, Σ,δ) with state set S = {1, 2, 3, 4, 5, 6}, input alphabet Σ = {a,b}, and transitions given by

123456 123456 τa = and τb = .  213135   543333 

Then D = {D1 = {1, 2, 3},D2 = {3, 4, 5},D3 = {5, 6}} is an admissible decom- positon of S, since

D1τa = {1, 2, 3}⊆ D1,D2τa = {1, 3}⊆ D1,D3τa = {3, 5}⊆ D2, D1τb = {3, 4, 5}⊆ D2,D2τb = {3}⊆ D1,D2,D3τb = {3}⊆ D1,D2.

D A D-factor B = A/D of A can be defined with state set S = {D¯ 1, D¯ 2, D¯ 3}, input alphabet ΣD = {a,b}, and transitions given by the table

B D¯ 1 D¯ 2 D¯ 3

a D¯ 1 D¯ 1 D¯ 2 b D¯ 2 D¯ 1 D¯ 1

¯ B ¯ B ¯ ¯ Note that D2τb and D3τb can be defined as either D1 or D2.

It is more convenient to work with partitions than with decompositions. For this, the following construction due to Michael Yoeli (1963) is useful. To this A A A end, let A = (S , Σ ,δ ) be a semiautomaton, D = {D1,...,Ds} be an ad- missible decomposition of SA, and B = A/D be a D-factor. ∗ ∗ ∗ Define an auxiliary semiautomaton A∗ = (SA , ΣA ,δA ) from A and B with A∗ A A A A∗ A B state set S = {(s , D¯ i) | s ∈ S ∩ Di}, input alphabet Σ = Σ = Σ , and transitions given by

A ¯ A∗ A A ¯ B A∗ (s , Di)τa = (s τa , Diτa ), a ∈ Σ . (28) A ¯ B ¯ Note that this operation is well-defined, since if s ∈ Di and Diτa = Dj for A A some 1 ≤ j ≤ s, then s τa ∈ Dj . ∗ A∗ A Define the partition D of S , where each block consists of all pairs (s , D¯ i) ∗ ∗ ∗ ∗ which have the same second component, i.e., D = {D1,...,Ds } with Di = A A A {(s ,Di) | s ∈ S ∩ Di}. ∗ A ¯ B ¯ Then D is an admissible partition, since if s ∈ Di and Diτa = Dj for some A A A ¯ A∗ A A ¯ B A A ¯ 1 ≤ j ≤ s, then s τa ∈ Dj and so (s , Di)τa = (s τa , Diτa ) = (s τa , Dj ); A∗ i.e., Diτa ⊆ Dj . ∗ ∗ ∗ ∗ ∗ B∗ ¯ ∗ ¯ ∗ The D -factor B = A /D of A has state set S = {D1,..., Ds }, input B∗ A∗ ¯ ∗ B∗ ¯ alphabet Σ = Σ , and the transitions are defined as Di τa = Dj , where A∗ Diτa ⊆ Dj.

20 Proposition 5.3. The semiautomata B∗ and B are isomorphic and moreover A∗ covers A.

∗ Proof. Take the bijective mapping φ : SB → SB : D¯ ∗ 7→ D¯ and the identity ∗ i ∗ i mapping ξ : ΣB → ΣB. Then for each symbol a ∈ ΣB and 1 ≤ i ≤ s, we ¯ ∗ B∗ ¯ ∗ ¯ ¯ ∗ B ¯ B ¯ have Di τa φ = Dj φ = Dj if and only if Di φτa = Diτa = Dj . Therefore, the semiautomata B∗ and B are isomorphic. A∗ A A A Take the surjective mapping φ : S → S : (s , D¯ i) 7→ s . Then for each A A ¯ A A A A ¯ A∗ symbol a ∈ Σ and 1 ≤ i ≤ s, we have (s , Di)φτa = s τa and (s , Di)τa φ = A A ¯ B A A A A∗ ∗ (s τa , Diτa )φ = s τa . Thus φτa = τa φ and hence A covers A.

Example 20. In view of the semiautomaton A in Ex. 19, the auxiliary semi- automaton A∗ has state set

A∗ S = {(1, D¯ 1), (2, D¯ 1), (3, D¯ 1), (3, D¯ 2), (4, D¯2), (5, D¯2), (5, D¯ 3), (6, D¯ 3)}, input alphabet {a,b}, and transitions given by the table

∗ A (1, D¯ 1) (2, D¯ 1) (3, D¯ 1) (3, D¯ 2) (4, D¯ 2) (5, D¯ 2) (5, D¯ 3) (6, D¯ 3)

a (2, D¯ 1) (1, D¯ 1) (3, D¯ 1) (3, D¯ 1) (1, D¯ 1) (3, D¯ 1) (3, D¯ 2) (5, D¯ 1) b (5, D¯ 2) (4, D¯ 2) (3, D¯ 2) (3, D¯ 1) (3, D¯ 1) (3, D¯ 1) (3, D¯ 1) (3, D¯ 1)

A∗ ∗ ¯ ∗ ¯ ∗ ¯ ∗ The corresponding partition of the state set S is D = {D1, D2, D3 }, where ¯ ∗ ¯ ¯ ¯ D1 = {(1, D1), (2, D1), (3, D1)}, ¯ ∗ ¯ ¯ ¯ D2 = {(3, D2), (4, D2), (5, D2)}, ¯ ∗ ¯ ¯ D3 = {(5, D3), (6, D3)}, and the semiautomaton B∗ = A∗/D∗ has the transition table ∗ ¯ ∗ ¯ ∗ ¯ ∗ B D1 D2 D3 ¯ ∗ ¯ ∗ ¯ ∗ a D1 D1 D2 ¯ ∗ ¯ ∗ ¯ ∗ b D2 D1 D1

Theorem 5.4. Let A = (SA, Σ,δA) be a semiautomaton, D an admissible decomposition of SA, and B the D-factor of A. Then there exist semiau- tomata B∗ and C such that B∗ is isomorphic to B, |SC| = m(D), and moreover B∗ ◦ C ≥ A. Proof. Consider the auxiliary semiautomaton A∗ constructed from A and B. ∗ Let D∗ be the admissible partition of SA associated to D and B∗ = A∗/D∗ the corresponding factor. Then by Thm. 5.2, there is a semiautomaton C such that B∗ ◦ C covers A∗ and |SC | = m(D∗). But by Prop. 5.3, B∗ and B are isomorphic and A∗ covers A. Thus by Lemma 4.2, B∗ ◦ C covers A. Moreover, m(D)= m(D∗).

6 Permutation and Reset Semiautomata

This section treats specific semiautomata which play an important role in alge- braic automata theory.

21 Let A be a semiautomaton. A permutation input of A is an input a ∈ ΣA A A A such that the transformation τa is a permutation of S ; i.e., τa is a bijective mapping. A reset input of A is an input a ∈ ΣA such that the transformation yields A A A A |S τa | = 1, i.e., S τa is a singleton set. A permutation-reset semiautomaton is a semiautomaton A whose inputs a ∈ ΣA are either reset or permutation inputs. Theorem 6.1. Each semiautomaton A with n = |SA|≥ 2 states can be covered by a cascade product of at most n − 1 permutation-reset semiautomata. Proof. Take the decomposition D of SA, whose blocks are all the n − 1 element subsets of SA. For each subset S of SA and each input a ∈ ΣA, we have A A |Sτa | ≤ |S|. Thus D is an admissible decomposition of S . A A Consider the corresponding D-factor B = A/D. If |S τa | < n, there is a A A block Di of D such that S τa ⊆ Di. It follows that for each block Dj of D, A A A ¯ A ¯ Dj τa ⊆ S τa ⊆ Di. Thus in the D-factor B, we can define Diτa = Dj for each block Di. Hence, a is a reset input of B. A A A A A If |S τa | = n, then τa is a permutation of S , and the permutation τa B provides a permutation of the blocks of D. Thus the transition τa is also a permutation of SB and hence a is a permutation input of B. It follows that the D-factor B is a permutation-reset semiautomaton. By Thm. 5.4, the semiautomaton A can be covered by a cascade product B ◦ C, where B is a permutation-reset semiautomaton and C is a semiautomaton with m(D)= n − 1 states. Applying the same construction to the semiautomaton C provides a covering of C by a cascade product E ◦ F , where E is a permutation- reset semiautomaton and F is a semiautomaton with n−2 states. By Lemma 4.4, B ◦ (E ◦ F ) ≥ B ◦ C and so by Lemma 4.2, B ◦ (E ◦ F ) ≥ A. Since each two- state semiautomaton is a permutation-reset semiautomaton, the repetition of this construction yields the desired result.

Example 21. Let A be a semiautomaton with state set SA = {1, 2, 3, 4, 5}, input alphabet ΣA = {a,b}, and transitions

12345 12345 τ A = and τ A = . a  23451  b  24532 

Consider the decomposition D of the state set SA into the |SA|− 1 element blocks D1 = {2, 3, 4, 5},D2 = {1, 3, 4, 5},D3 = {1, 2, 4, 5}, D4 = {1, 2, 3, 5},D5 = {1, 2, 3, 4}. This decomposition is admissible, and the corresponding D-factor B = A/D B B has state set S = {D¯ 1, D¯ 2, D¯ 3, D¯ 4, D¯5}, input alphabet Σ = {a,b}, and transitions

B D¯ 1, D¯ 2, D¯ 3, D¯4, D¯5 B D¯ 1, D¯ 2, D¯ 3, D¯4, D¯5 τa = and τb = .  D¯ 2, D¯ 3, D¯ 4, D¯5, D¯1   D¯ 1, D¯ 1, D¯ 1, D¯1, D¯1 

Thus a is permutation input and b is a reset input of B. Hence, B is a permutation-reset semiautomaton.

22 A permutation semiautomaton is a semiautomaton Π where each transforma- Π Π Π tion τa with a ∈ Σ is a permutation of S . R A reset semiautomaton is a semiautomaton R where each transformation τa with a ∈ ΣR is either the identity mapping or a reset mapping. Theorem 6.2. Each permutation-reset semiautomaton A can be covered by a cascade product Π ◦ R of a permutation semiautomaton Π and a reset semiau- tomaton R. Proof. Decompose the state set Σ = ΣA of A into two disjoint subsets Σ = Σp ∪ Σr, where Σp and Σr are the sets of permutation and reset inputs of A, respectively. Take the transformation monoid T (Π) generated (as group) by the permu- A tations τa corresponding to the permutation inputs a ∈ Σp. Clearly, T (Π) is A a subgroup of T (A). The elements of T (Π) are the permutations τx , where ∗ x ∈ Σp. They form the state set of a semiautomaton Π which are denoted by A Π A xp . The semiautomaton Π has the input alphabet Σ =Σ and the transitions

A Π A A Π A ∗ xp τap = (xap)p and xp τar = xp , ap ∈ Σp,ar ∈ Σr, xp ∈ Σp. Thus Π is a permutation semiautomaton. Define the semiautomaton R with state set SR = {sA | sA ∈ SA}, input alphabet ΣR = SΠ × Σ, and transitions

A R A A R A A A −1 ∗ s τ A = s and s τ A = (s τar )(τx ) , ap ∈ Σp,ar ∈ Σr, xp ∈ Σp. (xp ,ap) (xp ,ar)

A A A Since s τar is the same for all s , it follows that R is a reset semiautomaton. Claim that the cascade product Π ◦ R covers A. Indeed, define the mapping φ : SΠ◦R → SA by setting

A A A A φ(xp , s )= s τx .

A A Since τx is a permutation of S , the mapping φ is surjective. Moreover, since the cascade product Π◦R has the input alphabet Σ, the mapping ξ :ΣΠ◦R → ΣA A Π◦R can be chosen as the identity. The equation φτa = τa φ with a ∈ Σ can be easily checked.

Example 22. Consider the semiautomaton A with state set SA = {1, 2, 3, 4, 5}, input alphabet ΣA = {a,b}, and transitions

12345 12345 τ A = and τ A = . a  23451  b  11112  This is a permutation-reset semiautomaton with permutation input a and reset input b. The state set Σ decomposes into the set of permutation inputs Σp = {a} and the set of reset inputs Σr = {b} (see semiautomaton B in Ex. 21). The semiautomaton A is covered by a cascade product Π ◦ R with permuta- tion semiautomaton Π and reset semiautomaton R. The permutation semiau- tomaton Π has the transformation monoid T (Π) generated by the permutation A g = τa of the permutation input a ∈ Σp. This is a cyclic group of order 5,

A 2 A 3 A 4 A 5 A T (Π) = {g = τa ,g = τaa,g = τaaa,g = τaaaa, id = g = τaaaaa}.

23 Thus the semiautomaton Π has state set SΠ = {id, g, . . . , g4}, input alphabet Σ, and the transitions

i Π i+1 i Π i g τa = g and g τb = g , 0 ≤ i ≤ 4, where i + 1 is taken modulo 5. The reset semiautomaton R has state set ΣR = {1A,..., 5A}, input alphabet ΣR = SΠ × Σ, and transitions

A A j τ(gi,a) = j , 0 ≤ i ≤ 4, 1 ≤ j ≤ 5, and R 1A 2A 3A 4A 5A (id,b) 1A 1A 1A 1A 1A (g,b) 5A 5A 5A 5A 5A (g2,b) 4A 4A 4A 4A 4A (g3,b) 3A 3A 3A 3A 3A (g4,b) 2A 2A 2A 2A 2A

Theorem 6.3. Each reset semiautomaton can be covered by a direct product of two-state reset semiautomata. Proof. Let A be a reset semiautomaton with n = |SA|≥ 2 states. If n = 2, the assertion is clear. Otherwise note that each partition P of SA is admissible, since A every transition τa is either the identity mapping or a reset mapping. Thus we may take a partition P of SA with two blocks. Then by Thm. 5.2, A can be covered by a cascade product B ◦ C, where |SB| = 2 and |SC | = m(P ) < |SA|. In this case, the cascade product B◦C can be chosen as the direct product B×C. The same procedure can be applied to the semiautomaton C providing a covering of C by a direct product D × E. By Lemma 4.4, B × (D × E) covers B ×C and thus by Lemma 4.2, B ×(D ×E) covers A. Continuing this way leads to the desired result. For this, note that a reset semiautomaton B covering a semiautomaton A can be augmented by one state and still covers A. A finite group G gives rise to a grouplike semiautomaton, which is a semi- automaton denoted by G with state set G, input alphabet G, and transitions G given by the right multiplications τg : G → G : x 7→ xg, where g ∈ G. Example 23. Consider the Klein four-group G = {e,a,b,c} given by the group table · ea b c e ea b c a ae c b b b c ea c c bae The grouplike semiautomaton G has state set G, input alphabet G, and the transitions are the right multiplications given by the rows of the group table, e a bc e ab c τ G = , τ G = , e  e a bc  a  a e cb  eab c ea b c τ G = , τ G = . b  b c ea  c  c b ae 

24 Lemma 6.4. The permutation semiautomaton Π in Thm. 6.2 can be covered by a grouplike semiautomaton. Proof. The permutation automaton Π has state set G = T (Π) and input al- Π Π phabet Σ = Σ. Each transition τap corresponding to a permutation input ap ∈ Σp is a permutation which amounts to a right multiplication, and each Π transition τar associated with a reset input ar ∈ Σr is the identity mapping. Define the semiautomaton G with state set SG = G, input alphabet ΣG = G, and transitions given by the right multiplications with the elements of G. Then G covers Π if we take φ : SG → SΠ as the identity mapping and ξ : ΣΠ → ΣG as the mapping that assigns each a ∈ ΣΠ to the element of G which Π performs the same right multiplication as τa . Example 24. Reconsider the permutation semiautomaton Π in Ex. 22. This semiautomaton is covered by the grouplike semiautomaton G = C5 given by the cyclic group of order 5. Theorem 6.5. Let G be a grouplike semiautomaton and H a subgroup of G. Then G can be covered by a cascade product B◦ω C such that the semiautomaton C is grouplike and isomorphic to H.

Proof. Let G be a grouplike semiautomaton and H = {e = h1,...,ht} a sub- group G. Take the partition P of G into the right cosets of H:

P = {H = He,Hg2,...,Hgs}, (29)

where T = {e = g1,...,gs} is a transversal of H in G, i.e., a full set of rep- resentatives of the right cosets of H in G. Note that by Lagrange’s theorem, we have |G| = st. Moreover, P is an admissible partition of G, since the right cosets of H in G are pairwise disjoint and for each 1 ≤ i ≤ s and g ∈ G, we have G (Hgi)τg = (Hgi)g = H(gig) = Hgj where gig = hgj ∈ Hgj for some h ∈ H and 1 ≤ j ≤ s. On the hand, the set Q = {T,h2T,...,htT } is also a partition of G, since if g ∈ hiT ∩ hjT , then g = higk = hjgl for some gk,gl ∈ T . Since the cosets in (29) are disjoint, k = l and therefore hi = hj . Moreover, the partition P ∩ Q is the finest one of G; i.e., each block in P ∩ Q is a singleton set. To see this, let higk = hj gl. Then as above, k = l and so hi = hj . It follows that each group element g ∈ G can be written as g = higj , where 1 ≤ i ≤ t and 1 ≤ j ≤ s. By Thm. 5.2, the semiautomaton G can be covered by the cascade product B ◦ C, where B = G/P and |SC | = |H| = t. The semiautomaton C is isomorphic to the grouplike semiautomaton H with state set H, input alphabet H, and transitions given by the right multiplication with the elements of H. To see this, define the mapping φ : H → SC by C H ′ φ(hi)= hiT and the mapping ξ :Σ → Σ by ξ(Hgi,g)= hj , where gig = hjg for some 1 ≤ j ≤ t and g′ ∈ G. Both mappings are surjective. The identity φτ C = τ H φ can now be easily checked. (Hgi ,g) ξ(Hgi ,g) By the remark after Lemma 4.1, after identifying the inputs of C giving the same image we obtain a semiautomaton C′ which is isomorphic to the grouplike semiautomaton H. If the mapping ξ is taken as ω, the result is obtained. Corollary 6.6. Let G be a grouplike semiautomaton and H a normal subgroup of G. Then G can be covered by a cascade product B ◦ω C such that B is grouplike and isomorphic to G/H and C is grouplike and isomorphic to H.

25 Proof. In the previous proof, the P -factor B = G/P has the state set SB = {He, Hg2,..., Hgs} which corresponds to the set of cosets of H in G. By hypothesis, H is normal, i.e., gHg−1 = H for each group element g ∈ G. Thus the cosets H,Hg2,...,gs form the factor group G/H. Let g and g′ belong to the same coset of H in G. Then g′ = hg for some h ∈ H and so in the P -factor B,

′ ′ ′ (Hgi)g = (giH)g = gi(Hg)= gi(Hg ) = (giH)g = (Hgi)g .

B B Thus the transitions τg and τg′ are equal, and vice versa. This shows that B is a grouplike semiautomaton which is isomorphic to G/H.

Example 25. Reconsider the grouplike semiautomaton G in Ex. 23. Take the subgroup H = {e,a} of G. Then P = {P1 = H = {e,a}, P2 = Hb = {b,c}} is a partition of G into right cosets and T = {e,b} is a transversal of H in G. The set Q = {Q1 = T = {e,b},Q2 = Ta = {a,c}} is also a partition of G and P ∩ Q is the finest partition of G:

P1 ∩ Q1 = {e}, P1 ∩ Q2 = {a}, P2 ∩ Q1 = {b}, P2 ∩ Q2 = {c}.

B The semiautomaton B = A/P has the state set S = {P¯1, P¯2}, the input alphabet ΣB =ΣA, and the transitions given by ¯ ¯ ¯ ¯ B P1, P2 B P1, P2 τe = , τa = ,  P¯1, P¯2   P¯1, P¯2  ¯ ¯ ¯ ¯ B P1, P2 B P1, P2 τb = , τc = .  P¯2, P¯1   P¯2, P¯1  Since the group G is abelian, the subgroup H is normal. Thus the semiautoma- ton B is grouplike and isomorphic to the factor group G/H = {H,Hb} which has the following group table: B H Hb H H Hb Hb Hb H

C C The semiautomaton C has state set S = {Q¯1, Q¯2}, input alphabet Σ = SB × ΣA, and transitions given by following table:

C Q¯1 Q¯2

(P¯1,e) Q¯1 Q¯2 (P¯1,a) Q¯2 Q¯1 (P¯1,b) Q¯1 Q¯2 (P¯1,c) Q¯2 Q¯1 (P¯2,e) Q¯2 Q¯2 (P¯2,a) Q¯1 Q¯1 (P¯2,b) Q¯2 Q¯2 (P¯2,c) Q¯1 Q¯2 The grouplike semiautomaton H has state set H, input alphabet H, and the transitions e a e a τ H = and τ H = . e  e a  a  a e 

26 Now identify equal inputs in C: (P¯1,e), (P¯1,b), (P¯2,a), (P¯2,c) and (P¯1,a), ′ (P¯1,c), (P¯2,e), (P¯2,b). Then we obtain a semiautomaton C with state set {Q¯1, Q¯2}, input alphabet say {(P¯1,e), (P¯1,a)} and transition table ′ C Q¯1 Q¯2

(P¯1,e) Q¯1 Q¯2 (P¯1,a) Q¯2 Q¯1 It is clear that C′ is isomorphic to the grouplike semiautomaton H.

A group G is simple if it has only the trivial normal subgroups G and {e}. A simple grouplike semiautomaton is a grouplike semiautomaton G which cor- responds to a simple group. Theorem 6.7. Each grouplike semiautomaton G can be covered by a cascade product of simple grouplike semiautomata. Proof. Each finite group G has a composition series. That is, a series G = H0,H1,...,Hr = {e} of subgroups of G such that Hi+1 is a proper normal subgroup of Hi and the factor groups Hi/Hi+1 are simple. By Cor. 6.6, the grouplike semiautomaton G can be covered by a cascade product G/H1 ◦ω1 H1, where the grouplike semiautomaton G/H1 is simple. The same construction can be applied to the grouplike semiautomaton H1,

which can be covered by a cascade product H1/H2 ◦ω2 H2, where the grouplike semiautomaton H1/H2 is simple. Thus by Lemma 4.4,

′ G/H ◦ω2 (H1/H2 ◦ω2 H2) ≥ G/H1 ◦ω1 H1 and hence by Lemma 4.2,

′ G/H ◦ω2 (H1/H2 ◦ω2 H2) ≥ G. By repeating this construction the result is follows.

7 Krohn-Rhodes Decomposition

The assertions established in the previous sections cumulate in the following result. Theorem 7.1 (Krohn-Rhodes). Each semiautomaton A can be covered by di- rect and cascade products of semiautomata of two shapes: • simple grouplike semiautomata, and • two-state reset semiautomata. This assertion can be refined by allowing only simple grouplike semiautomata with simple groups that are homomorphic images of subgroups of the transi- tion monoid T (A). For this, specific admissible decompositions are employed. However, this will not be pursued any further. Instead, we will give an example to demonstrate the construction in the above theorem. For this, note that the construction of a covering of a given semiau- tomaton A can always be started with the decomposition D of SA, whose blocks are all the |SA|− 1 element subsets of SA as described in the proof of Thm. 6.1.

27 Example 26. Reconsider the semiautomaton A with admissible decomposition A D = {D1,...,D5} of S and D-factor B = A/D in Ex. 21. Regard the auxiliary semiautomaton A∗ covering A. The semiautomaton A∗ A∗ A∗ has state set S = {(i, D¯ j) | 1 ≤ i, j ≤ 5,i 6= j}, input alphabet Σ = {a,b}, and transitions ¯ A∗ A B ¯ ¯ A∗ A B ¯ (i, Dj )τa = (τa (i), τa (Dj )) and (i, Dj)τb = (τb (i), τb (Dj )), ¯ A∗ A B ¯ where 1 ≤ i, j ≤ 5 and i 6= j. For instance, (3, D2)τa = (τa (3), τa (D2)) = ¯ ¯ A∗ A B ¯ ¯ (4, D3) and (3, D2)τb = (τb (3), τb (D2)) = (5, D1). ∗ ∗ ∗ A∗ ∗ Define the decomposition D = {D1,...,D5} of S having blocks Di = {(j, D¯ i) | 1 ≤ j ≤ 5,i 6= j} for 1 ≤ i ≤ 5. This decomposition is an admissible partition. ∗ The semiautomaton B∗ = A∗/D∗ has the state set SB = {D¯ ∗ | 1 ≤ i ≤ 5}, ∗ i input alphabet ΣB = {a,b}, and transitions given by the table ∗ ¯ ∗ ¯ ∗ ¯ ∗ ¯ ∗ ¯ ∗ B D1 D2 D3 D4 D5 B∗ ¯ ∗ ¯ ∗ ¯ ∗ ¯ ∗ ¯ ∗ τa D2 D3 D4 D5 D1 B∗ ¯ ∗ ¯ ∗ ¯ ∗ ¯ ∗ ¯ ∗ τb D1 D1 D1 D1 D1 This is a permutation-reset semiautomaton isomorphic to B. It is covered by the cascade product Π ◦ R of a permutation semiautomaton Π and a reset semiautomaton R (see Ex. 22). The permutation semiautomaton Π is covered by a grouplike semiautomaton G which corresponds to the cyclic group of order 5. Since groups of prime order are simple, the semiautomaton G is already simple. On the other hand, the reset semiautomaton R can be covered by a cascade of two-state reset semiautomata. In the next step, a semiautomaton C can be constructed such that B∗ ◦ C ∗ covers A∗. To this end, a partition P of SA is required such that D∗ ∩ P is the A∗ finest partition of S . For instance, we may take the partition P = {P1,...,P5} with blocks

P1 = {(1, D¯ 2), (1, D¯ 3), (1, D¯ 4), (1, D¯5)},

P2 = {(2, D¯ 1), (2, D¯ 3), (2, D¯ 4), (2, D¯5)},

P3 = {(3, D¯ 1), (3, D¯ 2), (3, D¯ 4), (3, D¯5)},

P4 = {(4, D¯ 1), (4, D¯ 2), (4, D¯ 3), (4, D¯5)},

P5 = {(5, D¯ 1), (5, D¯ 2), (5, D¯ 3), (5, D¯4)}. ∗ ¯ Then we have Dj ∩ Pi = {(i, Dj)} for 1 ≤ i, j ≤ 5 with i 6= j. Define the semiautomaton C with state set SC = {P¯ ,..., P¯ }, input alphabet ∗ 1 5 ΣC = SA ×{a,b}, and transitions

¯ C ¯ A∗ ¯ C ¯ A∗ Piτ ¯ ∗ = (i, Dj)τa πP , and Piτ ¯ ∗ = (i, Dj )τb πP , (Dj ,a) (Dj ,b)

C A∗ where 1 ≤ i, j ≤ 5 with i 6= j. For instance, we have P¯3τ ∗ = (3, D¯ 2)τ πP = (D¯ 2 ,a) a C A∗ (4, D¯ 3)πP = P¯4 and P¯3τ ∗ = (3, D¯ 2)τ πP = (5, D¯ 1)πP = P¯5. (D¯ 2 ,b) b The cascade product B∗ ◦ C covers A. Further decomposition of C yields the desired covering of A as stated in the above result.

28 References

[1] V. Diekert, M. Kufleitner, B. Steinberg: The Krohn-Rhodes theorem and local divisors, Fundam. Inform., 116(1-4), 65-77, 2012. doi: 10.1016/s0304- 3975(99)00315-1 [2] S. Eilenberg: Automata, Languages, and Machines/Part A, Academic Press, New York, 1973. [3] A. Ginzburg: Algebraic Theory of Automata, Academic Press, New York, 1968. [4] K.R. Krohn, J.I. Rhodes: Algebraic Theory of Machines, Academic Press, M.A. Arbib (ed.), New York, 1968. [5] S. Mihov, K.U. Schulz: Finite-State Techniques, Cambridge Univ. Press, New York, 2019. [6] A. Salomaa: Theory of Automata, Pergamon Press, Oxford, 1969.

29