computingthemaximalsubsemigroupsofafinitesemigroupwaw7/files/projects/... · abstract...

47
Computing the maximal subsemigroups of a finite semigroup Wilf Wilson 25 th April 2014 1 * 2 * * * * * * * * * 3 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 4 * * * * * * * * * * * * * * * * * * * * * * * * * 1 * 2 * * * * * * * * * 3 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 4 * * * * * * * * * * * * * * * * * * * * * * * * * 1 * 2 * * * * * * * * * 3 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 4 * * * * * * * * * * * * * * * * * * * * * * * * * 1 * 2 * * * * * * * * * 3 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 4 * * * * * * * * * * * * * * * * * * * * * * * * * Semigroup diagrams of the four maximal subsemigroups of the partition monoid of degree 3, B 3 , which do not arise from maximal subgroups of the group of units. See Figure 1 and Section 7.3 for more details.

Upload: others

Post on 27-Mar-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Computingthemaximalsubsemigroupsofafinitesemigroupwaw7/files/projects/... · Abstract Wecharacterisethemaximalsubsemigroupsofsomespecialclassesoffinitesemigroup. Thisthen

Computing the maximal subsemigroups of a finite semigroup

Wilf Wilson

25th April 2014

1

*

2

* * *

* * *

* * *

3

* * * * *

* * * * *

* * * * *

* * * * * * *

* * * * * * *

* * * * * * * *

* * * * * * *

* * * * * * * *

* * * * * * * *

* * * * * * * * * *

4

* * * * *

* * * * *

* * * * *

* * * * *

* * * * *

1

*

2

*

*

*

* *

* *

* *

3

* * * * * * * * * *

* * * * * * * *

* * * * *

* * * * * * * *

* * * * *

* * * * *

* * * * * * * *

* * * * * * *

* * * * * * *

* * * * * * *

4

* * * * *

* * * * *

* * * * *

* * * * *

* * * * *

1

*

2

*

*

*

* *

* *

* *

3

* * * * *

* * * * *

* * * * *

* * * * * * *

* * * * * * * *

* * * * * * * * * *

* * * * * * * *

* * * * * * *

* * * * * * * *

* * * * * * *

4

* * * * *

* * * * *

* * * * *

* * * * *

* * * * *

1

*

2

* * *

* * *

* * *

3

* * * * * * * * * *

* * * * * * *

* * * * * * *

* * * * * * *

* * * * * * * *

* * * * * * * *

* * * * * * * *

* * * * *

* * * * *

* * * * *

4

* * * * *

* * * * *

* * * * *

* * * * *

* * * * *

Semigroup diagrams of the four maximal subsemigroups of the partition monoid of degree 3, B3, whichdo not arise from maximal subgroups of the group of units. See Figure 1 and Section 7.3 for more details.

Page 2: Computingthemaximalsubsemigroupsofafinitesemigroupwaw7/files/projects/... · Abstract Wecharacterisethemaximalsubsemigroupsofsomespecialclassesoffinitesemigroup. Thisthen

For Alan, my little brother.

2

Page 3: Computingthemaximalsubsemigroupsofafinitesemigroupwaw7/files/projects/... · Abstract Wecharacterisethemaximalsubsemigroupsofsomespecialclassesoffinitesemigroup. Thisthen

Abstract

We characterise the maximal subsemigroups of some special classes of finite semigroup. This thenleads us to describe novel algorithms for computing the maximal subsemigroups of an arbitrary finitesemigroup. These algorithms have now been implemented in the Semigroups package [8] for GAP [6].We conclude by detailing the maximal subsemigroups of some specific semigroups, guided by thesealgorithms.

Acknowledgements

The original mathematics and implementation of the algorithms discussed in this project was partof a group project. The team consisted, at various points, of Casey Donoven, Robert Hancock, JuliusJonušas, Dr James Mitchell, Dr Yann Péresse, and myself. I enjoyed working with you all. However,the work on this project report is mine alone. I would like to thank Dr Mitchell in particular for hisencouraging supervision.

3

Page 4: Computingthemaximalsubsemigroupsofafinitesemigroupwaw7/files/projects/... · Abstract Wecharacterisethemaximalsubsemigroupsofsomespecialclassesoffinitesemigroup. Thisthen

Contents

1 Introduction 11.1 Intended readership . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2 Motivation and aims . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.3 Overview of project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.4 Notation and conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.5 Pre-requisites for understanding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

2 Graham, Graham and Rhodes 62.1 A correction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

3 Maximal subsemigroups of special classes of finite semigroup 123.1 Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123.2 Left-zero, right-zero, and other degenerate semigroups . . . . . . . . . . . . . . . . . . . . 123.3 Commutative semigroups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133.4 Commutative bands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133.5 Monogenic semigroups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143.6 0-simple semigroups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153.7 Simple semigroups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183.8 Regular semigroups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

4 Description of algorithms for Rees 0-matrix semigroups and Rees matrix semigroups 204.1 Algorithm for Rees 0-matrix semigroups . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204.2 Algorithm for Rees matrix semigroups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

5 Description and justification of algorithms for arbitrary semigroups 305.1 Compute the maximal subsemigroups which lack a maximal J -class . . . . . . . . . . . . 315.2 Compute the maximal subsemigroups which lack a non-maximal J -class . . . . . . . . . 33

6 Notes about algorithms 396.1 Possible improvements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

7 Maximal subsemigroups of specific finite semigroups 407.1 Full transformation monoid Tn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407.2 Symmetric inverse monoid In . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417.3 Partition monoid Bn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

References 43

Note that many of the diagrams contained in this project convey information through the use of colour.For this reason, it is recommended that this report be read in colour.

4

Page 5: Computingthemaximalsubsemigroupsofafinitesemigroupwaw7/files/projects/... · Abstract Wecharacterisethemaximalsubsemigroupsofsomespecialclassesoffinitesemigroup. Thisthen

1 Introduction

In this project, we address the question: given a finite semigroup, what are its maximal subsemigroups?Semigroups are renowned for their unrestrictive definition and large number. For example, there are

12,418,001,077,381,302,684 non-equivalent (where equivalence is up to isomorphism or anti-isomorphism)semigroups of order 10 [2]. Only 2 of these are groups. This suggests that answering a question aboutarbitrary semigroups, especially when considered computationally, can be much more difficult than an-swering an analogous question for groups. Indeed, we will see that in order to answer this question forarbitrary semigroups, we rely on it having already been answered for groups.

However, the inherent diversity in semigroup theory does not translate to a complete lack of structure.We find there is much structure present in an arbitrary semigroup, and we will use this to help us answerthe question in a practical way.

1.1 Intended readership

Many parts of this project are highly technical, and so an understanding of semigroup theory at anadvanced undergraduate honours level is required. In particular, we assume that the reader is familiarwith all of the topics covered in the module MT5823 Semigroups, which is taught at the University ofSt Andrews. A familiarity with basic graph theory is also required for several sections of this project.Beyond this level, additional important definitions and results are stated in Section 1.5. We hope that thefollowing pages are both instructive and intriguing to any suitably qualified reader.

1.2 Motivation and aims

The maximal subsemigroups of a semigroup are an interesting attribute in their own right. However,being able to know the maximal subsemigroups of a semigroup allows us to answer further questions. Forexample, it allows us to calculate every subsemigroup of a finite semigroup: we first calculate the maximalsubsemigroups, then the maximal subsemigroups of those subsemigroups, and so on, until the processnecessarily terminates.

Since we are not aware of any previously existing algorithm for maximal subsemigroups, by creatinga working algorithm, we are providing a useful tool for other researchers in the field. This is also ademonstration of the power and utility of computational algebra; in particular of the GAP system [6] andthe Semigroups package [8] for GAP.

We hope the reader will gain a strong understanding of the topic of maximal subsemigroups, and theincluded algorithms - and perhaps be inspired to explore related topics in computational semigroup theory.

1.3 Overview of project

Much of this project is based on the results of Maximal subsemigroups of finite semigroups by Graham,Graham and Rhodes [5]. This paper describes the possible forms of a maximal subsemigroup of a finitesemigroup. Section 2 is particularly technical, and is entirely devoted entirely to presenting and provingthe main results of Graham et al., which we will use throughout the rest of this project.

Guided by the results of Section 2, we describe the maximal subsemigroups of some special classes offinite semigroup in Section 3, such as groups (3.1) and monogenic semigroups (3.5).

Next, we describe novel and practical algorithms for calculating maximal subsemigroups, for whichwe provide pseudocode. Section 4 contains algorithms to compute the maximal subsemigroups of a finiteregular Rees 0-matrix semigroup over a group, and as a consequence, a finite Rees matrix semigroup overa group. We use these algorithms, along with further results from [5], to describe an algorithm to calculatethe maximal subsemigroups of an arbitrary finite semigroup in Section 5. We briefly comment on thesealgorithms in Section 6, and suggest future improvements.

1

Page 6: Computingthemaximalsubsemigroupsofafinitesemigroupwaw7/files/projects/... · Abstract Wecharacterisethemaximalsubsemigroupsofsomespecialclassesoffinitesemigroup. Thisthen

Finally, in Section 7, aided by these algorithms, we calculate the maximal subsemigroups of particularlyfamous semigroups, such as the full transformation monoid (7.1) and the symmetric inverse monoid (7.2).

1.4 Notation and conventions

• S denotes an arbitrary semigroup (S, ∗); we require that S be non-empty.

• If the semigroup S is a monoid, then we define S1 to be the semigroup S. If the semigroup S is nota monoid, then we define S1 to be the monoid formed by adjoining the identity 1 to S.

• M denotes a maximal subsemigroup of the semigroup S.

• For an element a ∈ S, Ja denotes the J -class of the element a, i.e. the equivalence class a/J . Toavoid ambiguity when considering multiple semigroups, we write JSa to denote the J -class of theelement a in the semigroup S. The other Green’s relations are handled in the same way.

• When there is no possibility for confusion, we occasionally omit brackets, for example writing 〈X,x, y〉to denote the semigroup 〈X ∪ x, y〉.

• Mappings are composed from left to right.

• N denotes the set of natural numbers without zero: 1, 2, 3, ....

• N0 denotes the set of natural numbers with zero: 0, 1, 2, 3, ....

• When writing transformations we list only the image; for example, the transformation(1 2 3 4 54 3 5 1 4

)is

written as (43514). However, when specifically considering a group of permutations, we write in theusual disjoint cycle notation - we shall make clear when this is the case (such as in Example 4.2).

1.5 Pre-requisites for understanding

As stated in Section 1.1, it is assumed that the reader is familiar with the basics of semigroup theory,especially with the definitions of subsemigroups, groups, and ideals; with Green’s relations; and with thenotion of regularity.

For the rest of this section, we will assume that the semigroup S is finite; although several similar oridentical results hold for infinite semigroups, the results proved under this assumption will be sufficient forour purposes. Naturally, we begin by defining the terms maximal subsemigroup and maximal subgroup.

Definition 1.1 (Maximal subsemigroup, maximal subgroup). Let M be a subsemigroup of S. Then thesubsemigroup M is called maximal if and only if M 6= S, and there are no proper subsemigroups of Sproperly containing M . The term maximal subgroup is defined by replacing ‘semigroup’ by ‘group’ and‘subsemigroup’ by ‘subgroup’ in the previous sentences.

It is easy to see that for a proper subsemigroup M of S, the following are equivalent:

• M is a maximal subsemigroup of S.

• If T is a subsemigroup of S such that M ≤ T S, then T = M .

• For all elements x ∈ S, either 〈M,x〉 = M or 〈M,x〉 = S.

• For all elements x ∈ S \M : 〈M,x〉 = S.

We will often use this fourth characterisation to prove that a subsemigroup is maximal.

Example 1.2. If T ≤ S is a subsemigroup of S and |S \ T | = 1, then the subsemigroup T is maximal.

2

Page 7: Computingthemaximalsubsemigroupsofafinitesemigroupwaw7/files/projects/... · Abstract Wecharacterisethemaximalsubsemigroupsofsomespecialclassesoffinitesemigroup. Thisthen

We record that the trivial semigroup has no maximal subsemigroups, since it has no proper subsemi-groups. Any other finite semigroup S contains an idempotent e, and so the set e is a proper subsemigroupof S. Since S has at least one proper subsemigroup, and (as a finite semigroup) has only finitely manysubsemigroups, it must have maximal subsemigroups.

For a finite semigroup, the relations D and J coincide. Throughout this project, we will most oftenformulate and prove results for J -classes, however it will be advantageous to remember that a J -classpossesses all the properties of a D-class. Therefore we may define the regularity of a J -class. A J -class is called regular if it contains one regular element (and hence, contains only regular elements), andnon-regular otherwise. We note that every finite semigroup contains an idempotent (which is a regularelement) and hence contains at least one regular J -class. In particular, the minimal ideal of a finitesemigroup is a regular J -class.

It is also assumed that the reader has a familiarity with Rees 0-matrix semigroups and Rees matrixsemigroups. For the purposes of this project, we will only consider finite regular Rees 0-matrix semigroups,and finite Rees matrix semigroups, where the underlying semigroup is a group.

• We use the notation M 0[G; I,Λ;P ] to denote a Rees 0-matrix semigroup with index sets I and Λover the group G, and with sandwich matrix P (a Λ × I matrix with entries from G ∪ 0). Thesandwich matrix P of a Rees 0-matrix semigroup R = M 0[G; I,Λ;P ] is called regular if and only ifevery row and every column of P contains a non-zero entry; the semigroup R has a regular sandwichmatrix P if and only if R is a regular semigroup.

• Similarly, we use the notation M [G; I,Λ;P ] to denote a Rees matrix semigroup with index sets Iand Λ, over the group G, with sandwich matrix P (a Λ× I matrix with entries from G).

Note that a Rees 0-matrix semigroup M 0[G; I,Λ;P ] is finite if and only if the group G and the indexsets I and Λ are finite; the same is true for a Rees matrix semigroup.

A non-trivial semigroup S is called 0-simple if S has a zero element, the set 0 is the only properideal of S, and S is not the null semigroup of order 2. A finite semigroup is 0-simple if and only if itis isomorphic to a regular Rees 0-matrix semigroup over a group. For a proof of this result, credited toRees, see Proposition 3.2.1 and Theorem 3.2.3 of [7]. Similarly, a semigroup S is called simple if S has noproper ideals. A finite semigroup is simple if and only if it is isomorphic to a Rees matrix semigroup overa group. This result is credited to Rees and Suschkewitsch, and is stated more generally in Theorem 3.3.1of [7].

We next define the term principal factor. Let J be a J -class of a finite semigroup S. Define J∗ to bethe set J ∪ 0 (where 0 is an element not in J) and define a multiplication ∗ on J∗ by:

x ∗ y =

xy if x, y, xy ∈ J.0 otherwise.

Then (J∗, ∗) is a semigroup, called the principal factor of J . The principal factor J∗ is either a nullsemigroup or a 0-simple semigroup. Indeed, the J -class J is regular if and only if its principal factor J∗

is a 0-simple semigroup, and hence the J -class J is non-regular if and only if its principal factor J∗ isa null semigroup (note that a semigroup can not be both 0-simple and null). In particular, the principalfactor of a regular J -class is hence isomorphic to a regular Rees 0-matrix semigroup over a group.

Given a J -class J and its principal factor J∗, there exists a natural injective function ι : J → J∗

defined by x 7→ x. The subsets A of J and the subsets A∗ of J∗ such that A∗ contains 0 are in one-to-onecorrespondence, via the bijection A 7→ ι(A) ∪ 0. This correspondence obviously preserves inclusions,and will be particularly useful when describing the algorithms in Section 5.

3

Page 8: Computingthemaximalsubsemigroupsofafinitesemigroupwaw7/files/projects/... · Abstract Wecharacterisethemaximalsubsemigroupsofsomespecialclassesoffinitesemigroup. Thisthen

It is necessary to establish some facts about the J -classes of finite semigroups. These will be vitalfor the rest of the project. Firstly, we note that there is natural partial order on the J -classes of a finitesemigroup.

Proposition 1.3. Define a relation ≤ on the set of J -classes of S by: Jx ≤ Jy if and only if S1xS1 ⊆S1yS1. Then ≤ is a partial order.

Proof. This follows from the fact that the relation ⊆ is a partial order on the set of ideals of S.

A J -class is called minimal (respectively, maximal) if it is a minimal (respectively, maximal) elementin this partial order. Clearly, every finite semigroup contains minimal and maximal J -classes. Next weshow that given two elements of a semigroup, their product is contained a J -class which is less than theJ -class of either element.

Lemma 1.4. Let x, y ∈ S. Then Jxy ≤ Jx and Jxy ≤ Jy.

Proof. S1xyS1 = S1x(yS1) ⊆ S1xS1. Therefore Jxy ≤ Jx. It follows similarly that Jxy ≤ Jy.

Lemma 1.5. A J -class J of the semigroup S is non-regular if and only if J2 ∩ J = ∅.

Proof. A J -class J is non-regular if and only if the principal factor J∗ is a null semigroup, which is trueif and only if J2 ∩ J = ∅, by the definition of multiplication in J∗.

Corollary 1.6. Let J be a non-regular J -class, and let x, y ∈ J . Then Jxy Jx.

Proof. This follows immediately from Lemma 1.4 and Lemma 1.5.

Theorem 1.7 (Green’s Lemma). Let x, y ∈ S be elements which are L -related, so that x = ty andy = sx for some elements s, t ∈ S1. Define a mapping λs : Lx → Ly by a 7→ sa, and a define mappingλt : Ly → Lx by a 7→ ta. Then λs and λt are mutually-inverse bijections which preserve the R-relation:that is, H -classes map to H -classes.

Analogously, if x = yt and y = xs for some elements s, t ∈ S1, then the mappings ρs : Rx → Ry(defined by a 7→ as) and ρt : Ry → Rt (defined by a 7→ at) are mutually-inverse bijections which preservethe L -relation.

See [7, p. 49] for a detailed explanation and justification of this famous and fundamental theorem.

Theorem 1.8. Let S be a finite semigroup, let x and y be elements of S and suppose that the element yis regular. Then yJ xy if and only if yL xy.

Proof. (⇒) Since S is finite, the relations J and D coincide. Therefore yDxy. Further, as a finitesemigroup, S is isomorphic to a subsemigroup of some full transformation monoid Tn. Therefore we mayconsider S to be a semigroup of transformations of a finite set. Since yDxy in S, then yDxy in Tn, andso rank(x) = rank(y). It is always true that im(xy) ⊆ im(y), but since |im(xy)| = |im(y)| < ∞, weconclude that im(xy) = im(y). Therefore yL xy in Tn. Finally, since y is a regular element we have thatLSy = LTny ∩ S, and so yL xy in S. The converse is immediate since L ⊆J .

Corollary 1.9. Let S be a finite semigroup, let x and y be elements of S and suppose that the element yis regular. If yJ xy, then left multiplication by x maps the H -class Hy bijectively onto the H -class Hxy.

Proof. The result is proved by combining Theorems 1.7 and 1.8.

Note that the analogues of the previous two results hold, when L is replaced by R, xy is replaced byyx, and “left” is replaced by “right”.

4

Page 9: Computingthemaximalsubsemigroupsofafinitesemigroupwaw7/files/projects/... · Abstract Wecharacterisethemaximalsubsemigroupsofsomespecialclassesoffinitesemigroup. Thisthen

We end this section by introducing the diagrams which will be used throughout this project to illustrateexamples of semigroups. They are produced by the DotDClasses function of the Semigroups package [8].The semigroup diagram of a finite semigroup S is a Hasse diagram, where the nodes are the J -classesof S, and the partial order is the usual J -class partial order, defined in Proposition 1.3. The nodes areindexed (arbitrarily) to allow particular J -classes to be referenced.

Since the semigroup S is finite, each J -class is a D-class. Therefore each J -class can be visualisedby its egg-box diagram, and this is how the nodes are displayed. The R-classes of a J -class correspondto the rows of the egg-box, and the L -classes correspond to the columns. The intersection of every R-class and every L -class with a single J -class is an H -class: a group H -class is drawn in grey, and anon-group H -class is drawn in white. A group H -class may be labelled with its isomorphism type, butmore usually, since our examples will be small, an H -class will be labelled with the elements it contains.An example semigroup diagram is shown in Figure 1.

1

7

2

3

4

C₂ C₂ C₂ C₂

C₂ C₂ C₂

C₂ C₂

C₂ C₂ C₂

C₂ C₂ C₂

C₂ C₂ C₂

C₂ C₂

8

1 1 1 1

5

C₃

6

C₃

Figure 1: The transformation semigroup S = 〈(4333), (1341), (2214), (2412), (3341), (4142)〉. The semi-group S contains four non-regular J -classes: they are all non-maximal and they have index 1, 2, 3, and7. The remaining four J -classes are regular. There are two which are maximal (those with index 5 and6); their group H -classes are isomorphic to the cyclic group of order 3. There is the minimal ideal (withindex 8); its group H -classes are trivial. Finally there is an additional non-maximal regular J -class(with index 4); its group H -classes are isomorphic to the cyclic group of order 2.

5

Page 10: Computingthemaximalsubsemigroupsofafinitesemigroupwaw7/files/projects/... · Abstract Wecharacterisethemaximalsubsemigroupsofsomespecialclassesoffinitesemigroup. Thisthen

2 Graham, Graham and Rhodes

As mentioned in Section 1.3, the algorithms which appear in the later sections of this project rely on theresults contained in Maximal subsemigroups of finite semigroups [5], a paper published in 1968 by themathematicians N. Graham, R. Graham and J. Rhodes.

The paper contains several important results about the relationship between a finite semigroup S anda maximal subsemigroup M of S. In this section, we present these theorems and prove them. We willfollow the approach and techniques of Graham et al. but with added exposition, in the hope of makingthe results more accessible to the reader.

For the following theorems, let M be a maximal subsemigroup of a finite semigroup S.

Theorem 2.1. There exists a J -class of S, J(M), such that S \ J(M) ⊆M .

Proof. Let A be the set of J -classes of S which are not contained in M . The set A is non-empty sinceM is a proper subsemigroup of S, and S is the union of its J -classes. The set A is also finite (becauseS is finite), and so we can choose a particular J -class, J , which is minimal amongst those in A. Theminimality of J implies that for any element x ∈ S, if Jx ≤ J then x ∈M ∪ J .

We will show that M ∪ J is a subsemigroup of S. So let x, y ∈M ∪ J . If xy ∈M , we are done. SinceM is a subsemigroup, if xy /∈ M , then either x /∈ M or y /∈ M . Suppose x /∈ M (so x ∈ J). ThereforeJxy ≤ Jx = J by Lemma 1.4, and so xy ∈M ∪ J ; the result follows similarly if y /∈M .

By the definition of J , M is properly contained in the subsemigroup M ∪ J . Since M is maximal,we conclude that M ∪ J = S. Thus if we define J(M) to be the J -class J , then S \ J(M) ⊆ M asrequired.

When talking about the maximal subsemigroupM in the future, we will use the notation J(M) in thissense, to mean the unique J -class of S which M does not contain. We have proved that we are justifiedin using this notation without ambiguity. Additionally, for a semigroup S and a J -class J of S, we willuse the phrase a maximal subsemigroup of S arising from J to mean a maximal subsemigroup M of Ssuch that J(M) = J .

Theorem 2.2. The maximal subsemigroup M intersects each H -class of S non-trivially, or M is a unionof H -classes of S.

Proof. Let J = J(M). Firstly, we define the set M ′ to be the union of all H -classes of S which intersectnon-trivially with M . Clearly M ′ contains the maximal subsemigroup M . We will show that the set M ′

is in fact a subsemigroup of S. To that end let x and y be elements of M ′. By definition, both x and yare H -related in S to elements of M . That is, there exist elements s, t ∈M such that xH s and yH t.

If the product xy ∈M , then xy ∈M ′ and we are done. Otherwise the product xy ∈ S \M , and sinceM is a subsemigroup, at least one of x and y is in S \M . In particular, by Theorem 2.1, xy ∈ J , and atleast one of x and y is in J . We spilt into the following two cases:

Case 1: Suppose that x ∈ M and y ∈ J . Corollary 1.9 tells us that since xy ∈ J , left multiplication byx maps Hy bijectively onto Hxy. Since t ∈ Hy, we have that xyH xt. However both x and t areelements of M , meaning that xt ∈M ; thus xy ∈M ′. A dual argument holds if y ∈M and x ∈ J .

Case 2: Suppose that both x, y ∈ J . Since the elements x, y, and xy are all contained in the J -classJ , we conclude by Lemma 1.5 that J is regular. Therefore the principal factor J∗ is 0-simple. Therelation H is a congruence on a 0-simple semigroup, and so since xH s and yH t, it follows thatxyH st. Since the element st ∈M , we conclude that xy ∈M ′.

In all cases, xy ∈ M ′. Since M ′ is a subsemigroup of the semigroup S containing the maximalsubsemigroup M , then either M ′ = M , in which case M is a union of H -classes, or else M ′ = S, and Mintersects every H -class of S non-trivially.

6

Page 11: Computingthemaximalsubsemigroupsofafinitesemigroupwaw7/files/projects/... · Abstract Wecharacterisethemaximalsubsemigroupsofsomespecialclassesoffinitesemigroup. Thisthen

Theorem 2.4 provides more detail about the ways in which a maximal subsemigroup M can containor intersect H -classes of the J -class J(M). However, we first prove a result which applies when theJ -class J(M) is non-regular:

Theorem 2.3. If the J -class J(M) is non-regular, then J(M) ∩M = ∅, and so M = S \ J(M).

Proof. Again, let J = J(M), and let x, y ∈ J . We will show that element x ∈M if and only if the elementy ∈ M . Since xJ y, there exist elements s, t ∈ S1 such that x = syt. Suppose that s ∈ J . Then since Jis non-regular, Jsy J (by Lemma 1.5), and so Jsyt J also. In particular, x = syt /∈ J , a contradiction.Therefore s /∈ J , and likewise we see that t /∈ J . Thus both s and t are contained in M1, and so y ∈ Mimplies that x = syt ∈M . By symmetry, x ∈M implies that y ∈M .

Since M is a proper subsemigroup of S, it does not contain every element of the J -class J . Hence, itcontains none of these elements; i.e. J ∩M = ∅. Theorem 2.1 then implies that M = S \ J .

Note that the converse does not hold, since there exist maximal subsemigroups M such that J(M) isregular, but nevertheless the intersection J(M) ∩M is empty. (for example, the maximal subsemigroupsof a commutative band, as seen in Section 3.4, or a particular maximal subsemigroup of Tn, as seen inSection 7.1). However, the contrapositive of Theorem 2.3 says that if J(M)∩M 6= ∅, then J(M) is regular.In this case, Theorem 2.4 describes the form of the intersection of the maximal subsemigroup M with theJ -class J(M).

Theorem 2.4. Let J = J(M). If the intersect J ∩M is non-empty, then two cases arise, dependingon whether the maximal subsemigroup M is a union of H -classes of S, or whether M intersects eachH -class of S non-trivially (see Theorem 2.2).

Case 1 If the maximal subsemigroup M intersects each H -class of S non-trivially, then there exists anisomorphism π : J∗ →M 0[G; I,Λ;Q] under which

(M ∩ J)∗π = (I ×K × Λ) ∪ 0

for some maximal subgroup K of G. In this case, (M ∩ J)∗ is a maximal subsemigroup of J∗.

Case 2 If M is a union of H -classes of S, then there exists an isomorphism π : J∗ → M 0[G; I,Λ;P ]under which the image (M ∩ J)∗π has one of the following three forms:

(a) [(I \ I ′)×G× Λ] ∪ 0, where ∅ 6= I ′ ( I (i.e. M lacks some R-classes of J -class J),

(b) [I ×G× (Λ \ Λ′)] ∪ 0, where ∅ 6= Λ′ ( Λ (i.e. M lacks some L -classes of the J -class J),

(c) [(I ×G× Λ) \ (I ′ ×G× Λ′)] ∪ 0, where ∅ 6= I ′ ( I and ∅ 6= Λ′ ⊆ Λ (i.e. M lacks a rectangleof H -classes of J).

Proof of Theorem 2.4: Case 1. We assume that the maximal subsemigroup M intersects every H -class of S non-trivially. Since the J -class J is regular, the principal factor J∗ is isomorphic to a regularRees 0-matrix semigroup R = M 0[G; I,Λ;P ], where G is a group. Let φ be an isomorphism from J∗ toR. Recall that (M ∩ J)∗ is defined to be the set (M ∩ J) ∪ 0 ⊆ J∗.

Let T be the subset (M ∩J)∗φ of the Rees 0-matrix semigroup R. Then T is a clearly a subsemigroupof R, and by our initial assumption, T intersects every H -class of R non-trivially. Before we continue, wemust define some additional notation. Let i ∈ I, λ ∈ Λ. Then:

• For a subset X of G, let (i,X, λ) be the subset (i, g, λ) : g ∈ X ⊆ R.

• Define Hiλ = (i, G, λ) to be the H -class of R in row i and column λ.

• DefineMiλ = Hiλ∩T to be the subset of Hiλ which remains in T . This is non-empty by assumption.

7

Page 12: Computingthemaximalsubsemigroupsofafinitesemigroupwaw7/files/projects/... · Abstract Wecharacterisethemaximalsubsemigroupsofsomespecialclassesoffinitesemigroup. Thisthen

• Define Xiλ = g ∈ G : (i, g, λ) ∈ T to be the subset of the group G, of elements which arise in Miλ.Note that Miλ = (i,Xiλ, λ) and |Xiλ| = |Miλ|.

We start by showing that if the H -class Hiλ of R is a group, then the subset Miλ is in fact a subgroupof Hiλ. So, suppose that Hiλ is a group, and let x, y ∈Miλ = Hiλ ∩ T . Since the H -class Hiλ is a groupwe have that H2

iλ∩Hiλ = Hiλ, from which it follows that xy ∈ Hiλ. In addition, T is a subsemigroup, andso xy ∈ T . Therefore xy ∈ Miλ, and Miλ is a subsemigroup of the finite group Hiλ. Thus, it is a group(see Theorem 3.1).

Next we will show that the intersection of the subsemigroup T with each non-zero H -class of R hasthe same cardinality. Since the semigroup R is regular, we can select a fixed non-zero group H -class ofR, Hjµ. In particular the matrix entry pµj is non-zero, and therefore the function φ : Hjµ → G givenby (j, g, µ)φ = pµjg is an isomorphism. Furthermore, since Mjµ is a subgroup of Hjµ, then (Mjµ)φ is asubgroup of G. If we define K to be the subgroup (Mjµ)φ of G, then we see that pµjXjµ = K. (Note thatXjµ = p−1µj K, and so Xjµ is a coset of K).

For each index i ∈ I let xi be a fixed element of Xiµ, and for each index λ ∈ Λ let yλ be a fixed elementof Xjλ. Define elements t1 = (i, xi, µ) ∈ T and t2 = (j, yλ, λ) ∈ T . If we note that t1Mjµt2 ⊆ T (since Tis a semigroup), then we see that:

t1Mjµt2 = (i, xi, µ)(j,Xjµ, µ)(j, yλ, λ)

= (i, xipµjXjµpµjyλ, λ)

= (i, xiKpµjyλ, λ)

⊆ T ∩Hiλ

= Miλ.

(1)

By Green’s Lemma (Theorem 1.7), left multiplication by the element t1 and right multiplication bythe element t2 maps the H -class Hjµ bijectively onto the H -class Hiλ. Since Mjµ is a subgroup of Hjµ

this same multiplication maps the subgroup Mjµ injectively into Hiλ. However, Equation 1 tells us thatMjµ is in fact mapped injectively into the subset Miλ of Hiλ, from which we conclude that |Miλ| ≤ |Mjµ|.Similarly t2Miλt1 ⊆Mjµ, and so |Mjµ| ≤ |Miλ|.

Thus we can say that for all i ∈ I, λ ∈ Λ:

|Xiλ| = |Xjµ| = |K|.

Equation 1 also tells us that xiKpµjyλ ⊆ Xiλ. But since |xiKpµjyλ| = |K| = |Xiλ| it follows that:

Xiλ = xiKpµjyλ.

We have shown that the subsemigroup T has the same cardinality intersection with every non-zeroH -class of R, and further, that it intersects every non-zero group H -class of R as a subgroup, as isrequired by the theorem. We are now ready to create an isomorphism ψ such that Tψ has the desiredform. We begin by defining a new sandwich matrix.

For each index λ ∈ Λ, define the element hλ = pµjyλ. We note that Xiλ = xiKhλ. Let Q be a Λ× Imatrix over G ∪ 0 with entries:

qλi = hλpλixi.

Now, define a mapping ψ : R→M 0[G; I,Λ;Q] by:

(i, g, λ)ψ = (i, x−1i gh−1λ , λ), and 0ψ = 0.

The function ψ is clearly bijective. To show that ψ is a homomorphism, let a, b ∈ R. If a = 0 or b = 0, thenthe homomorphism condition obviously holds. Otherwise, write a = (i, g, λ) and b = (k, f, µ). Note that

8

Page 13: Computingthemaximalsubsemigroupsofafinitesemigroupwaw7/files/projects/... · Abstract Wecharacterisethemaximalsubsemigroupsofsomespecialclassesoffinitesemigroup. Thisthen

matrix entry pλk = 0 if and only if the matrix entry qλk = 0, so if pλk = 0, then (ab)ψ = 0ψ = 0 = (aψ)(bψ)and again the required condition holds. If not, then:

(aψ)(bψ) = (i, x−1i gh−1λ , λ)(k, x−1k fh−1ν , ν)

= (i, x−1i gh−1λ qλkx−1k fh−1ν , ν)

= (i, x−1i gh−1λ hλpλkxkx−1k fh−1ν , ν)

= (i, x−1i gpλkfh−1ν , ν)

= (i, gpλkf, ν)ψ

= (ab)ψ.

Therefore, we conclude that ψ is indeed an isomorphism. Since T is a subsemigroup of R, it follows thatTψ is a subsemigroup of M 0[G; I,Λ;Q]. Recall that T consists of sets of the form Miλ = (i,Xiλ, λ), alongwith the element0. Additionally, if we use the fact shown above that Xiλ = xiKhλ, we see that:

Miλψ = (i, x−1i Xiλh−1λ , λ) = (i,K, λ).

In conclusion, Tψ = (I×K×Λ)∪0, so if we define our isomorphism to be the composition π = φψ,then (M ∩ J)∗π = (I ×K × Λ) ∪ 0 as required.Remark 2.5. We can further say that the sandwich matrix Q has entries over K ∪ 0. Let λ ∈ Λ andi ∈ I and suppose that qλi 6= 0. Since Tψ is a semigroup, the element (i, 1, λ)2 = (i, qλi, λ) ∈ Tψ. Bythe form of Tψ, we see that qλi ∈ K. It is instructive to note that therefore Tψ is in fact equal to thesemigroup M 0[K; I,Λ;Q].To complete our argument, we would like to show that (M∩J)∗ is a maximal subsemigroup of the principalfactor J∗; or equivalently that M 0[K; I,Λ;Q] is a maximal subsemigroup of M 0[G; I,Λ;Q]. To show this,it suffices to show that K is a maximal subgroup of G. We have seen already that K is a subgroup; itremains to show thatK is maximal. To that end, suppose that F is a subgroup of G such thatK ≤ F ≤ G.

Define U∗ to be the subset ((I × F × Λ) ∪ 0)π−1 ⊆ J∗, and let U be the corresponding subset ofJ . Since M 0[F ; I,Λ;Q] is a semigroup (because the matrix Q is over K ∪ 0 ⊆ F ∪ 0) it follows thatthe subset U∗ is a subsemigroup of the principal factor J∗. Define M ′ to be the subset M ∪ U of thesemigroup S.

We will show that the subset M ′ is a subsemigroup of S. Let x, y ∈ M ′. If xy ∈ M , we are done.Otherwise xy ∈ S \M ⊆ J , and x ∈ U or y ∈ U . If both elements x and y are contained in the set U ,then since U∗ is a subsemigroup of the principal factor and their product xy is in J , we conclude thatxy ∈ U . It remains to handle the cases when x ∈ U and y ∈M , or x ∈M and y ∈ U .

Suppose the former of these cases. Since the J -class J is regular, there exists an idempotent e ∈Lx ⊆ J . Since e is a right identity for its L -class, Lx, we have that xe = x. We also note that e is anelement of M : we have shown above that M intersects every group H -class of J as a subgroup; so inparticular, M contains every idempotent of J . Thus the product ey is in the maximal subsemigroup M .It is always true that Jey ≤ Je = J by Lemma 1.4. If it were true that Jey J , then we would have thatJ = Jxy = Jxey ≤ Jey J , a contradiction. We conclude that Jey = J , i.e. ey ∈ J . In sum, we haveshown that the element ey is contained in the intersection J ∩M ⊆ U .

Since both the element x and the product ey are contained in the set U , then by recalling the definitionof multiplication in the principal factor and recalling that U∗ is a subsemigroup of the principal factor, itfollows that either xey ∈ U , or Jxey J . However, xey = (xe)y = xy ∈ J , and so xy ∈ U ⊆M ′.

The case when x ∈ M and y ∈ U follows dually. We conclude that M ′ is a subsemigroup of S. Wehave shown that M ≤ M ′ ≤ S. Since M is a maximal subsemigroup, either M ′ = M , in which caseF = K; or M ′ = S, in which case F = G. Therefore K is a maximal subgroup of G.

Proof of Theorem 2.4: Case 2. We assume that the maximal subsemigroupM is a union of H -classeswith with non-empty intersection with the J -class J .

9

Page 14: Computingthemaximalsubsemigroupsofafinitesemigroupwaw7/files/projects/... · Abstract Wecharacterisethemaximalsubsemigroupsofsomespecialclassesoffinitesemigroup. Thisthen

Let I be an index set for the set of non-zero R-classes of J∗, and let Λ be an index set for the set ofnon-zero L -classes of J∗. We denote a non-zero R-class of J∗ by Ri (for i ∈ I), and we denote a non-zeroL -class of J∗ by Lλ (for λ ∈ Λ). Let Hiλ = Ri ∩ Lλ be the H -class of M in row i and column λ.

Let I ′ = i ∈ I : Ri * M and Λ′ = λ ∈ Λ : Lλ * M be sets indexing the R- and L -classes(respectively) of J which are not contained in the maximal subsemigroup M . The sets I ′ and Λ′ arenon-empty, since M does not contain the J -class J .

Let i ∈ I ′, and define T the be the subset (M)1Ri ∪M of S. We shall show that T is in fact equal tothe semigroup S. Firstly, we note that:

RiM ⊆ Ri ∪M ⊆ T. (2)

To see this, let r ∈ Ri ⊆ J,m ∈M , and suppose that rm /∈M . Therefore rm ∈ J , and so by Corollary 1.9rmRr, i.e. rm ∈ Ri. The second inclusion is obvious by definition of T . To prove that T is a semigroup,let x, y ∈ T . If xy ∈M we are done; if xy /∈M (and in particular, xy ∈ J), then either x /∈M or y /∈M .We split into the following three cases:

1. If x ∈M,y /∈M , then by the definition of the subsemigroup T , the element y can be written as theproduct mr, where m ∈M1 and r ∈ Ri. Therefore xy = (xm)r ∈MRi ⊆ T .

2. Suppose that x /∈ M,y ∈ M , Then similarly x = mr, where m ∈ M1 and r ∈ Ri. Note that ry ∈RiM , and so by Equation 2, ry ∈ Ri∪M . Therefore xy = m(ry) ∈M1(Ri∪M) = (M1)Ri∪M = T .

3. Otherwise x, y /∈ M . Then x = m1r1, and y = m2r2 for m1,m2 ∈ M1, and r1, r2 ∈ Ri. Note thatr1m2 ∈ RiM ⊆ Ri ∪M by Equation 2.

• If r1m2 ∈M , then xy = (m1r1m2)r2 ∈MRi ⊆ T .• Else r1m2 ∈ Ri. We must have that r1m2r2 ∈ J (if not, then Jxy = Jm1r1m2r2 ≤ Jr1m2r2 J

by Lemma 1.4, from which we get that xy /∈ J , a contradiction). We conclude, again by usingCorollary 1.9, that r1m2r2Rr1m2, i.e. r1m2r2 ∈ Ri. Therefore xy = m1(r1m2r2) ∈M1Ri ⊆ T .

Since the R-class Ri is not contained in the subsemigroup M , the semigroup T properly contains Mby its definition. Since M is maximal, we conclude that S = T = (M)1Ri ∪M for all indices i ∈ I ′.

We shall now investigate the relationship between the R-classes which the maximal subsemigroup Mdoes not contain. Let i, j ∈ I ′. Since S = (M)1Ri ∪M , if it were the case that (M)1Ri ∩Rj = ∅, then Rjwould have to be contained within M , contradicting the choice of j. Therefore (M)1Ri ∩ Rj 6= ∅, and sothere exists m ∈M1 such that mRi ∩Rj 6= ∅. By Green’s Lemma (Theorem 1.8) we conclude that in factmRi = Rj , and moreover mHiλ = Hjλ for all λ ∈ Λ.

Very similar arguments hold for L -classes, and so we conclude analogously that for all indices λ, µ ∈ Λ′,there exists m ∈M1 such that for Hiλm = Hiµ for all i ∈ I.

Now suppose that i ∈ I ′ and λ ∈ Λ′. Since the maximal subsemigroup M is a union of H -classes of S,either Hiλ ⊆ M or Hiλ ∩M = ∅. If Hiλ ⊆ M , then by the previous paragraphs, for each j ∈ I ′ thereexists mj ∈ M1 such that mjHiλ = Hjλ. Thus for all j ∈ I, Hjλ ⊆ M , which implies that Lλ ⊆ M ,contradicting the definition of the index λ. Therefore the intersection Hiλ∩M is empty. Since the H -classHiλ is contained in both Ri and Lλ, we conclude that Ri, Lλ *M ; i.e. i ∈ I ′ and λ ∈ Λ′.

In showing these results, we have proved that for all indices i ∈ I and λ ∈ Λ:

i ∈ I ′ and λ ∈ Λ′ if and only if Hiλ ∩M = ∅. (3)

This implies that the maximal subsemigroup M is missing a rectangle of H -classes from the J -class J . Note that as a J regular J -class, J∗ is isomorphic to some regular Rees 0-matrix semigroupM 0[G; I,Λ;P ] (where G is a group) via an isomorphism π. We may now specify the precise forms of(J ∩M)∗, and hence conclude our results.

10

Page 15: Computingthemaximalsubsemigroupsofafinitesemigroupwaw7/files/projects/... · Abstract Wecharacterisethemaximalsubsemigroupsofsomespecialclassesoffinitesemigroup. Thisthen

• If Λ′ = Λ, then for each i ∈ I ′, M ∩Ri = ∅ by Equation 3. Therefore M lacks the R-classes indexedby I ′, and so (M ∩ J)∗π has form (a).

• Likewise, if I ′ = I, then the maximal subsemigroup M lacks the L -classes indexed by Λ′, and so(M ∩ J)∗π has form (b).

• Otherwise, if both I ′ and Λ′ are proper subsets of I and Λ, then Equation 3 implies that (M ∩ J)∗πhas form (c).

Remark 2.6. It can not be the case that both Λ′ = Λ and I ′ = I, for then J ∩M = ∅, contradicting ourassumption that J ∩M 6= ∅. Also, recall that we have previously argued that I ′ and Λ′ are non-empty.

2.1 A correction

In this section we note a small error in a remark in [5]. This result will be useful in Section 3.6, and sowe will provide a correction. Let R = M 0[G; I,Λ;P ] be a finite regular Rees 0-matrix semigroup over agroup G, and let M be a maximal subsemigroup of R such that J(M) = R \ 0. Then the following isasserted:

M ∩ J(M) = ∅ if and only if R \ 0 is a simple abelian group.

The corrected statement follows:

Lemma 2.7. The intersection M ∩ J(M) is empty if and only if the subset R \ 0 is the trivial group.

Proof. (⇒) By assumption, the maximal subsemigroup M is the set 0. Since R is a regular semigroup,the J -class J(M) contains an idempotent, e. By the maximality ofM , it follows that R = 〈M, e〉 = 0, e,and we hence conclude that R \ 0 = e, the trivial group.

(⇐) Suppose that J(M) = R \ 0 is the trivial group e, where e2 = e. Therefore R = 0, e. SinceM is a proper subsemigroup of R, and M contains 0, we have that e /∈ M . Thus, M ∩ J(M) = ∅, asrequired.

Remark 2.8. It is easy to see that |M ∩ J(M)| = 1 if and only if R \ 0 is a simple abelian group.

11

Page 16: Computingthemaximalsubsemigroupsofafinitesemigroupwaw7/files/projects/... · Abstract Wecharacterisethemaximalsubsemigroupsofsomespecialclassesoffinitesemigroup. Thisthen

3 Maximal subsemigroups of special classes of finite semigroup

If the maximal subsemigroups of an arbitrary finite semigroup were all easy to describe, there would beno need for the paper described in Section 2. Of course, this is not the case, and many semigroups canexhibit peculiar maximal subsemigroups. However there do exist some classes of semigroup whose maximalsubsemigroups are somewhat straightforward to characterise. For the following results, we proceed eitherin an elementary way, or by making use of the tools we have developed in Section 2.

3.1 Groups

Naturally, we begin by considering the maximal subsemigroups of a group. The maximal subsemigroupsof a finite group turn out to be especially easy to describe.

Theorem 3.1. Let G be a finite group, and let H be a subsemigroup of G. Then H is a group.

Proof. By definition, H is a non-empty subset of the group G which is closed under the multiplication ofG. We must also show that the subset H is closed under inversion. Let a ∈ H. Then the element ai incontained in H for all i ∈ N. Since the group G is finite, the element a is of finite order n. If n = 1, thenthe element a is the identity, its own inverse. Otherwise n > 1, and from an−1a = 1 = aan−1, it followsthat a−1 = an−1 ∈ H.

Corollary 3.2. The maximal subsemigroups of a finite group are precisely its maximal subgroups.

Note that an algorithm to calculate the maximal subgroups of a group is implemented in the GAPsystem [6], and is available as the MaximalSubgroups function. The computation of maximal subgroupsof a finite permutation group is discussed in [4], and a practical algorithm is described in [1].

We next note that neither Theorem 3.1 nor Corollary 3.2 hold in general for infinite groups:

Example 3.3. The set of natural numbers with zero N0 forms a submonoid of the additive group ofintegers Z. However, the submonoid N0 is not a group since no strictly positive number has an inverse.

Further, for any element z ∈ Z \N0 (that is, for any negative integer), we can show that the subsemi-group 〈N0, z〉 equals the group Z. Clearly 〈N0, z〉 ⊆ Z. To see the reverse inclusion, for an element x ∈ Z,let k any positive integer such that kz ≤ x, and note that x = kz + (x− kz) ∈ 〈N0, z〉. Therefore N0 is anon-group maximal subsemigroup of the group Z.

3.2 Left-zero, right-zero, and other degenerate semigroups

Let S be a non-trivial semigroup with the peculiar property that every non-empty subset of S is a semi-group. Then the maximal subsemigroups of S are precisely those subsets which lack a single element.Since they are proper subsemigroups of the semigroup S, and they are not properly contained in anyproper subsemigroups, they must be maximal. Since any proper subsemigroup lacking more than oneelement must be contained in such a subsemigroup, these are the only ones.

Example 3.4. The maximal subsemigroups of the semigroup (N, ∗) (with multiplicationm∗n = Minm,n)are those subsets of N of the form N \ n, for all n ∈ N.

Two particular types of such semigroups are left-zero semigroups and right-zero semigroups; these arespecial types of rectangular band. They are distinguished by their multiplication: for any elements x andy of the semigroup, the product xy = x for left-zero semigroups, and the product xy = y for right-zerosemigroups. Rectangular bands will be discussed in more detail in Section 3.7.1.

Lemma 3.5. Let S be a left-zero semigroup. Then every non-empty subset of S is a subsemigroup.

Proof. Let A be a non-empty subset of S. Then for x, y ∈ A, we have xy = x ∈ A. Therefore A ≤ S.

12

Page 17: Computingthemaximalsubsemigroupsofafinitesemigroupwaw7/files/projects/... · Abstract Wecharacterisethemaximalsubsemigroupsofsomespecialclassesoffinitesemigroup. Thisthen

Corollary 3.6. Let S be a left-zero semigroup, and let A be a non-empty subset of S. Then A is a maximalsubsemigroup of S if and only if A = S \ x, for some x ∈ S.

We observe that analogously, the result holds for a non-empty subset of a right-zero semigroup.A null semigroup, sometimes called a zero semigroup, is a semigroup S with distinguished element 0,

in which the product ab = 0 for all elements a, b ∈ S. Here, a very similar result holds as for left-zeroand right-zero semigroups. It is easy to see that a subset A of S is a subsemigroup if and only if 0 ∈ A.Therefore, the maximal subsemigroups of the semigroup null S are precisely those subsets of the formS \ x, for x ∈ S \ 0.Remark 3.7. The results of Section 3.2 hold for both finite and infinite semigroups.

3.3 Commutative semigroups

A commutative semigroup S is a semigroup whose multiplication is commutative; i.e. for all elementsx, y ∈ S, the products xy and yx are equal. There is one property of commutative semigroups which isparticularly useful when it comes to calculating maximal subsemigroups.

Lemma 3.8. In a commutative semigroup S, the Green’s relations H ,L ,R,D , and J coincide.

Proof. Let x, y ∈ S, and suppose that xJ y. Then S1xS1 = S1yS1, and so (S1)2x = (S1)2y by com-mutativity. Since (S1)2 = S1, it follows that S1x = S1y, i.e. xL y. Similarly if xJ y, then xRy. Theequivalences are now obvious.

This lemma allows us to refine the theorems from Section 2, which we include below:

Theorem 3.9. Let M be a maximal subsemigroup of a finite commutative semigroup S. Then:

• There exists an H -class H(M) of S, such that S \M ⊆ H(M).

• The maximal subsemigroup M is equal to the set S \ H(M), or the intersection M ∩ H(M) is amaximal subgroup of the H -class H(M).

3.4 Commutative bands

Bands, mentioned briefly in Section 3.2, are a class of semigroup which satisfy the axiom that every elementis idempotent. Let B be a finite commutative band.

From Howie [7], we learn that commutative bands and lower semilattices are equivalent [7, p. 14].Specifically, by defining a relation ≤ on the band B by a ≤ b if and only if ab = a, then B becomesa partially ordered set in which every pair of elements has a greatest lower bound. The product of twoelements in the band B is precisely their greatest lower bound in this semilattice.

Definition 3.10. Let (X,≤) be a partially ordered set. Then for two elements x, y ∈ X we say that ycovers x if x y, and for all elements a ∈ X: x a ≤ y implies that a = y.

Since an H -class of any semigroup contains at most one idempotent, and a band consists solely ofidempotents, it follows that every H -class of the band B is trivial. Further, Theorem 3.9 implies that amaximal subsemigroup of B lacks just one H -class of B, and so any maximal subsemigroup of B lacks asingle element.

It is now a straightforward matter to describe the maximal subsemigroups of the commutative bandB. For an element x ∈ B, the subset B \ x is a subsemigroup of B (and hence a maximal subsemigroupof B) if and only if x is not the greatest lower bound of any pair of any elements in B \ x. These areprecisely the maximal elements of the partially ordered set, and those elements x which are covered by asingle element.

13

Page 18: Computingthemaximalsubsemigroupsofafinitesemigroupwaw7/files/projects/... · Abstract Wecharacterisethemaximalsubsemigroupsofsomespecialclassesoffinitesemigroup. Thisthen

3.5 Monogenic semigroups

A semigroup S is called monogenic if there exists an element a ∈ S such that 〈a〉 = S. Note that amonogenic semigroup is commutative.

A finite monogenic semigroup is uniquely specified by its index m ∈ N and period r ∈ N, and ithas precisely the m + r − 1 elements: a, a2, ..., am, am+1, ..., am+r−1 See [7, p. 9-11]. The subset K =am, am+1, ..., am+r−1 of S forms a cyclic subgroup of order r, and is the minimal J -class in the partialorder (and hence, the minimal ideal). Note that if the index m = 1, then the semigroup S is a group, andso its maximal subsemigroups are precisely its maximal subgroups, as detailed in Section 3.1.

Now assume that the index m > 1, so that S is not a group.

Lemma 3.11. In a monogenic semigroup S = 〈a〉, the order relation ≤ is total on the J -classes of S.

Proof. Let x, y ∈ S, so that x = am, y = an for some m,n ∈ N. If m = n, then Jx = Jy. Otherwise,if m n, then y = 1 ∗ x ∗ an−m ∈ S1xS1. Therefore S1yS1 ⊆ S1xS1, and Jy ≤ Jx. By a symmetricalargument n m implies that Jx ≤ Jy. In all cases, the ideals are comparable, and so the order is total.

We have shown that the partial order of J -classes of S is a chain. For a natural number n < m, theelement an lies in a singleton J -class, since the ideal S1anS1 = an, an+1, ..., am, ...am+r−1 is uniquelydetermined by the number n.

Therefore a finite monogenic semigroup consists of a chain of singleton J -classes, followed by theminimal ideal, which is a cyclic group. As a proper subsemigroup, no maximal subsemigroup can containthe element a, since a generates the semigroup S. Hence by Theorem 2.1, any maximal subsemigroup ofS must lack part of the J -class Ja, and contain all other J -classes of S. But since Ja is a singleton,there exists at most one maximal subsemigroup: that formed by removing Ja = a completely. Since theset M = S \ a = a2, a3, ..., am, ..., am+r−1 is in fact the principal ideal generated by a2 it follows thata non-group finite monogenic semigroup S = 〈a〉 has precisely one maximal subsemigroup: S \ a.

Semigroup: A

1

(231345)

2

(312134)

3

(123213)(213321)(312132)

Semigroup: B

2

(312134)

3

(123213)(213321)(312132)

Example 3.12. Let σ be the transformation (231345) of degree 6, and let A = 〈σ〉 be the semigroupgenerated by σ. Then the semigroup A has order 5, and consists of 3 J -classes, as shown above. Thesemigroup A has two singleton classes, along with the minimal ideal, which is isomorphic to the cyclicgroup of order 3. Its sole maximal subsemigroup, B, is also shown. Their relationship is obvious.

14

Page 19: Computingthemaximalsubsemigroupsofafinitesemigroupwaw7/files/projects/... · Abstract Wecharacterisethemaximalsubsemigroupsofsomespecialclassesoffinitesemigroup. Thisthen

Remark 3.13. The setM = 2, 3, 4, ... is a subsemigroup of the infinite monogenic semigroup (N,+) = 〈1〉;it is maximal since it lacks only one element. Any other proper subsemigroup of N also lacks the element1, and is hence contained in M . Therefore M is the only maximal subsemigroup of N. Note that anyinfinite monogenic semigroup is isomorphic to N by the isomorphism an 7→ n.

Inspired by the previous remark, it is left as an exercise for the reader to show that for a non-emptyset A, the maximal subsemigroups of the free semigroup A+ are the subsets A+ \ a, for each a ∈ A.

3.6 0-simple semigroups

As discussed in Section 1.5, a finite semigroup is 0-simple if and only if it is isomorphic to a regular Rees0-matrix semigroup over a group. Therefore, to describe all maximal subsemigroups of a finite 0-simplesemigroup, it suffices to consider an isomorphic Rees 0-matrix semigroup. To that end, assume thatR = M 0[G; I,Λ;P ] is a finite regular Rees 0-matrix semigroup, where G is a group and P is a regularΛ×I matrix over G∪0. The semigroup R contains at least two elements and consists of two J -classes:a maximal regular J -class R \ 0, and the minimal ideal 0.

By Theorem 2.1, any maximal subsemigroup M of R lacks a single J -class of R. If M is a maximalsubsemigroup of R lacking the J -class 0, then obviously M = R \ 0. This case will arise if and onlyif the maximal J -class of R is a subsemigroup, which occurs if and only if every entry of the sandwichmatrix P is non-empty. Any other maximal subsemigroup must arise by removing part of the maximalJ -class of R, which we will call J .

By Lemma 2.7, the minimal ideal 0 of R is itself a maximal subsemigroup if and only if the setR \ 0 is a trivial group, which is true if and only if R has order 2. In this case, the set 0 is the onlymaximal subsemigroup arising from the J -class J . If |R| ≥ 3, then this is not the case, and any maximalsubsemigroup of R arising from the maximal J -class J has non-trivial intersection with J . Therefore wemay apply the results of Theorem 2.4.

LetM be a maximal subsemigroup of R which does not contain J , but which has non-trivial intersectionwith J . By the proof of Theorem 2.4 we saw that if the maximal subsemigroupM intersects each H -classof R non-trivially, then there exists some maximal subgroup K of G and some sandwich matrix Q (overK ∪ 0) such that R ∼= M 0[G; I,Λ;Q] and M ∼= M 0[K; I,Λ;Q]. Otherwise, the maximal subsemigroupM is a union of H -classes of R, and so by Theorem 2.4, it is formed either by removing L -classes fromthe J -class J , or by removing R-classes from J , or by removing a rectangle of H -classes from J .

Next, we shall see that the regularity of the semigroup R allows us to be much more specific aboutthose maximal subsemigroups of R which are formed by removing L -classes, R-classes or rectangles ofH -classes from the maximal J -class of R, J .

Lemma 3.14. Let R = M 0[G; I,Λ;P ] be a Rees 0-matrix semigroup. Then for all indices i ∈ I, thesubset T = R \ (i ×G× Λ) is a subsemigroup of R.

Proof. Note first that if |I| = 1, then T = 0, a subsemigroup. So suppose |I| ≥ 2, and let i ∈ I and letx and y be two elements of T . If xy = 0, then xy ∈ T . Otherwise x = (j, g, λ), y = (k, h, µ) ∈ T (notethat j 6= i) and so xy = (j, gpλkh, µ) ∈ T .

It is proved analogously that for each index λ ∈ Λ, the subset R \ (I ×G× λ) is a subsemigroup ofR. Recall that the rows of a Rees 0-matrix semigroup correspond to its R-classes, indexed by I, and thecolumns correspond to its L -classes, indexed by Λ. Lemma 3.14 tells us that no maximal subsemigrouparising from J can lack multiple rows of R; if a subsemigroup did lack multiple rows, it would be properlycontained in a proper subsemigroup lacking a fewer number of rows. The previous sentence also holdswhen considering columns of R.

We may now state precisely which of these subsemigroups T are maximal:

15

Page 20: Computingthemaximalsubsemigroupsofafinitesemigroupwaw7/files/projects/... · Abstract Wecharacterisethemaximalsubsemigroupsofsomespecialclassesoffinitesemigroup. Thisthen

Theorem 3.15. Let R = M 0[G; I,Λ;P ] be a regular Rees 0-matrix semigroup such that |I| ≥ 2. Leti ∈ I, and let T = R \ (i ×G× Λ) be the subsemigroup formed by removing row i from R. Then T is amaximal subsemigroup of R if and only if T is regular.

Note that T is regular if and only if the sandwich matrix P is still regular when column i is removed.

Proof. (⇐) Suppose that the subsemigroup T is regular. Let x ∈ R\T , so that x = (i, g, λ). We will showthat 〈T, x〉 = R. Let y ∈ R \T , so that y = (i, h, µ). Then since T is regular, there exists a non-zero entrypλj in row λ and column j 6= i of the matrix P . Therefore y = (i, h, µ) = (i, g, λ)(j, p−1λj g

−1h, µ) ∈ 〈T, x〉.(⇒) Suppose that the subsemigroup T is non-regular. Note for later that this implies that |Λ| ≥ 2: if

|Λ| = 1, then the regularity of the semigroup R would imply that every H -class of R, and hence everyH -class of T , is a group, contradicting our assumption of non-regularity.

Since R is regular but T is not, there exists some index λ ∈ Λ such that the matrix entry pλi isnon-zero, but pλj = 0 for all j ∈ I \ i. This allows us to form another subsemigroup of R by adjoiningthe group H -class Hiλ to T . Let U = T ∪Hiλ.

To show that U is a subsemigroup, let x, y ∈ U . If x, y ∈ T , then we are done since T is a subsemigroup.If x, y ∈ Hiλ, then we are done since Hiλ is a group. Otherwise if x ∈ T and y ∈ Hiλ, then x = (j, g, µ)(for j 6= i) and y = (i, h, λ). We see that xy = (j, gpµih, λ) ∈ T (possibly 0), and yx = 0 ∈ T .

Since |Λ| ≥ 2, there exists some H -class of R in row i which is not contained in U . Therefore U is aproper subsemigroup of R. We conclude that the subsemigroup T is not maximal.

The egg-box diagram of J

* *

* * *

* * * *

Row 1

* *

* * *

* * * *

Row 2

* *

* * *

* * * *

Row 3

* *

* * *

* * * *

Figure 2: Suppose that J (shown above) is the maximal J -class of a regular Rees 0-matrix semigroup R.Recall that group H -classes are coloured grey. We can form a maximal subsemigroup of R by removingthe first or third row of J . However the subsemigroup T formed by removing the second row is not regular,since the second column of T contains no group H -classes. Therefore the subsemigroup T is not maximal.

16

Page 21: Computingthemaximalsubsemigroupsofafinitesemigroupwaw7/files/projects/... · Abstract Wecharacterisethemaximalsubsemigroupsofsomespecialclassesoffinitesemigroup. Thisthen

Analogously, if R = M 0[G; I,Λ;P ] is a regular Rees 0-matrix semigroup such that |Λ| ≥ 2, then foran index λ ∈ Λ, the subsemigroup T = R \ (I ×G× λ) is maximal if and only if T is regular.

Therefore, maximal subsemigroups corresponding to type (a) and (b) of Case 2 of Theorem 2.4 areprecisely those formed by removing a single permissible row or column from R. Note that if R has onlyone row, then the subsemigroup formed by removing that row equals the set 0; we have seen that thissubsemigroup of R is maximal if and only if |R| = 2; likewise if R has only one column.

Now, the question naturally arises: for those subsemigroups T from above which are non-regular, howdo we describe the maximal subsemigroups in which they are contained? The answer to that questionis found by considering the final case of Theorem 2.4. In this case, a maximal subsemigroup M lacks arectangle of H -classes of J (butM does not lack a whole row or column of J). That is,M = R\(I ′×G×Λ′),where ∅ 6= I ′ ( I and ∅ 6= Λ′ ( Λ. We will show that such maximal subsemigroups arise from specialrectangles of non-group H -classes of J . We start with a few definitions:

Definition 3.16. A rectangle of H -classes of J is a set A = Hiλ : i ∈ I#, λ ∈ Λ#, where I# ⊆ Iand Λ# ⊆ Λ are non-empty subsets of the index sets of R. A rectangle of non-group H -classes is sucha rectangle which contains no group H -classes of J , and a rectangle of non-group H -classes A is calledmaximal if A is not properly contained in any other such rectangle. Note that for a rectangle of non-groupH -classes, the subsets I# and Λ# must be proper subsets, since every row and column of J contains atleast one group H -class (the semigroup R is regular). We demonstrate with an example in Figure 3.

The J-class J

* * *

*

* * * *

* * * *

#1

* * *

*

* * * *

* * * *

#2

* * *

*

* * * *

* * * *

#3

* * *

*

* * * *

* * * *

#4

* * *

*

* * * *

* * * *

#5

* * *

*

* * * *

* * * *

Figure 3: Suppose that J (shown above) is the maximal J -class of a regular Rees 0-matrix semigroup R.Then the 5 maximal rectangles of non-group H -classes of J are indicated above.

17

Page 22: Computingthemaximalsubsemigroupsofafinitesemigroupwaw7/files/projects/... · Abstract Wecharacterisethemaximalsubsemigroupsofsomespecialclassesoffinitesemigroup. Thisthen

Theorem 3.17. Let R = M 0[G; I,Λ;P ] be a regular Rees 0-matrix semigroup, and let T = R\(I ′×G×Λ′)be a subsemigroup of R which lacks a rectangle of H -classes of J , where ∅ 6= I ′ ( I and ∅ 6= Λ′ ( Λ.Define the sets I# = (I \ I ′) and Λ# = (Λ \ Λ′), and let A = Hiλ : i ∈ I#, λ ∈ Λ# be the rectangleof H -classes of J formed by I# and Λ#. Then T is a maximal subsemigroup of R if and only if A is amaximal rectangle of non-group H -classes.

Proof. (⇒) Suppose that some H -class Hiλ ∈ A is a group. Then pλi 6= 0. Choose any indices j ∈ I ′ andµ ∈ Λ′. Then the elements (j, 1, λ) and (i, 1, µ) are in T , but their product (j, 1, λ)(i, 1, µ) = (j, pλi, µ) isnot in T , contradicting that T is a semigroup. Therefore A is a rectangle of non-group H -classes.

Suppose that the rectangle A is properly contained within another rectangle of non-group H -classes.Hence we can extend A by a row or a column to form a larger rectangle of non-group H -classes. Assumethat we can add a row; if we must add a column, the result follows similarly. Therefore there exists anindex i ∈ I ′ such that the sets (I# ∪ i) and Λ# form a larger rectangle of non-group H -classes. Notethat because R is a regular semigroup, the set (I#∪i) 6= I (as no rectangle of non-group H -classes cancontain an entire row) and so I ′ \ i 6= ∅.

Let U = R \ ((I ′ \ i) × G × Λ′) = T ∪ (i × G × Λ′). We will show that U is a semigroup. Forx, y ∈ U , it is easy to see that if x ∈ U \ T and y ∈ U , then xy = 0 ∈ U ; whilst if x ∈ T and y ∈ U , thenxy ∈ T . Therefore U is a subsemigroup of R. Note that U 6= R, since I ′ \ i 6= ∅. Thus we contradictthe maximality of T . Therefore A is a maximal rectangle.

(⇐) Let x ∈ R\T be arbitrary. We will show that the subsemigroup 〈T, x〉 = R. Obviously 〈T, x〉 ⊆ R,and T ⊆ 〈T, x〉. It remains to show that R\T ⊆ 〈T, x〉. So let y ∈ R\T . Then x = (i, g, λ) and y = (j, h, µ)for some indices i, j ∈ I ′, λ, µ ∈ Λ′, and group elements g, h ∈ G.

Since I# and Λ# form a maximal rectangle of non-group H -classes, there exists γ ∈ Λ# and k ∈ I#such that Hiγ and Hkλ are groups (if not, our rectangle could be extended to include row i or column λ,a contradiction). In particular, pγi 6= 0 and pλk 6= 0. Defining the elements a = (j, g−1p−1γi , γ) ∈ T andb = (k, p−1λk h, µ) ∈ T , we see that y = axb ∈ 〈T, x〉. Therefore T is maximal.

Having considering all possible forms, this classifies all maximal subsemigroups of a finite regular Rees0-matrix semigroup over a group.

3.7 Simple semigroups

As discussed in Section 1.5, a finite semigroup is simple if and only if it is isomorphic to a Rees matrixsemigroup over a group. Like with finite 0-simple semigroups, to describe the maximal subsemigroups of afinite simple semigroup, it suffices to describe the maximal subsemigroups of such Rees matrix semigroups.Therefore let R = M [G; I,Λ;P ] be such a semigroup.

However, we have done all of the hard work in the previous section. In a casual sense, a Rees matrixsemigroup can be thought of as a Rees 0-matrix semigroup in which every matrix entry is non-zero, andfrom which the zero element has been removed. We can therefore repeat our arguments from the previoussection which related to the maximal J -class, with the added assumption that every matrix entry isnon-zero (equivalently, that every H -class is a group). We then find that the maximal subsemigroups ofR are precisely those subsemigroups which are:

• Isomorphic to a Rees matrix semigroup M [K; I,Λ;Q] for some maximal subgroup K of G and forsome sandwich matrix Q (with elements from the subgroup K).

• Formed by removing any single row from R, if R has at least 2 rows.

• Formed by removing any single column from R, if R has at least 2 columns.

18

Page 23: Computingthemaximalsubsemigroupsofafinitesemigroupwaw7/files/projects/... · Abstract Wecharacterisethemaximalsubsemigroupsofsomespecialclassesoffinitesemigroup. Thisthen

3.7.1 Finite rectangular bands

Let B be the m × n rectangular band. Then B is simple, and is isomorphic to an m × n Rees matrixsemigroup over the trivial group. Since the trivial group has no maximal subgroups, there are no maximalsubsemigroups of B which intersect every H -class. Therefore, if both m > 1 and n > 1, then by theabove arguments, the rectangular band B has precisely m+ n maximal subsemigroups, which are formedby removing any single L -class or R-class. If m = n = 1, then B is the trivial semigroup, with nomaximal subsemigroups. Otherwise, if m = 1 or n = 1, then the rectangular band B is either a right-zerosemigroup or a left-zero semigroup; for these cases, see Corollary 3.6.

3.8 Regular semigroups

In semigroup theory, the class of regular semigroups is an important bridge between arbitrary semigroupsand groups. However, we saw in Theorem 2.3 that non-regular J -classes are the easiest to understandwhen it comes to describing the maximal subsemigroups of a finite semigroup. A regular semigroup,consisting only of regular J -classes, despite sometimes being considering a somewhat tractable type ofsemigroup, can exhibit maximal subsemigroups with extremely complicated behaviour. There is verylittle we can say a priori about the type or even number of maximal subsemigroups which an arbitraryregular semigroup possesses. This suggests that our task to create an algorithm to compute the maximalsubsemigroups of an arbitrary finite semigroup is inherently rather difficult.

19

Page 24: Computingthemaximalsubsemigroupsofafinitesemigroupwaw7/files/projects/... · Abstract Wecharacterisethemaximalsubsemigroupsofsomespecialclassesoffinitesemigroup. Thisthen

4 Description of algorithms for Rees 0-matrix semigroups and Rees ma-trix semigroups

In this section, we will describe an algorithm to calculate the maximal subsemigroups of a finite regularRees 0-matrix semigroup over a group, having already proved many useful results in Section 3.6. In severalof the cases which arise, it remains to apply the results in the obvious way. Once we have described thesealgorithms, an algorithm for computing the maximal subsemigroups of a finite Rees matrix semigroupover a group will be apparent.

4.1 Algorithm for Rees 0-matrix semigroups

Let R = M 0[G; I,Λ;P ] be a finite regular Rees 0-matrix semigroup over a group. In Section 3.6, welearned the precise form of each maximal subsemigroup of R, and for many of these forms, we knowexactly when such maximal subsemigroups occur. However, we must describe exactly how to calculate allof the maximal subsemigroups of R.

We saw in Section 3.6 that the subset R \ 0 of R is a maximal subsemigroup if and only if everyelement of the sandwich matrix P is non-zero. An algorithm to find this type of maximal subsemigroupwould simply search the sandwich matrix P for non-zero entries, and return the maximal subsemigroupR \ 0 if none were found.

All other maximal subsemigroups of R arise by removing part of the maximal J -class of R, R \ 0,which we shall call J . Again, we saw in Section 3.6 that the subset 0 is itself a maximal subsemigroupof R if and only if |R| = 2. It is a trivial calculation to check whether the semigroup R has order 2. If so,then the set 0 is the only maximal subsemigroup arising from the J -class J , and we have found all ofthe maximal subsemigroups of R.

Therefore we may assume that |R| > 2, and proceed.

4.1.1 Compute the maximal subsemigroups of ‘maximal-subgroup’-type

We shall call a maximal subsemigroupM of R which intersects every H -class of R non-trivially a maximalsubsemigroup of ‘maximal subgroup’-type.

By the proof of Theorem 2.4 (Case 1), for such a maximal subsemigroup M there is a maximalsubgroup K of G and a sandwich matrix Q (with entries from K ∪0) such that R ∼= M 0[G; I,Λ;Q] andM ∼= M 0[K; I,Λ;Q]. However, the set of elements of M does not necessarily equal (I ×K ×Λ) ∪ 0, aswe shall see in Example 4.2. It is for this reason that many of the complications in this section arise.

Remark 4.1. The semigroup R is regular if and only if the maximal subsemigroupM is regular, since bothcan be expressed as Rees 0-matrix semigroups with the same sandwich matrix.

For the rest of this section, let M be a maximal subsemigroup of R = M 0[G; I,Λ;P ] such thatM ∼= M 0[K; I,Λ;Q] for some maximal subgroup K of G and sandwich matrix Q.

Example 4.2. Let G be the permutation group 〈(12)〉 = 1G, (12), let I = Λ = 1, 2, and define thesandwich matrix P by: (

1G 1G(12) (12)

)Now let T be the regular Rees 0-matrix semigroup M 0[G; I,Λ;P ], and let U be the subset:

0, (1, 1G, 1), (1, (12), 2), (2, 1G, 1), (2, (12), 2)

of R. One can verify that U is a maximal subsemigroup of T which intersects every H -class of R non-trivially. If we put K = 1G, then K is a maximal subgroup of G, and each non-zero H -class of U isisomorphic to K. Theorem 2.4 thus implies that U ∼= M 0[K; I,Λ;Q] (where Q is the all-1G sandwichmatrix). However, U is clearly not equal to the set (I ×K × Λ) ∪ 0.

20

Page 25: Computingthemaximalsubsemigroupsofafinitesemigroupwaw7/files/projects/... · Abstract Wecharacterisethemaximalsubsemigroupsofsomespecialclassesoffinitesemigroup. Thisthen

Example 4.2 shows us that the sandwich matrix P influences which maximal subsemigroups of R of‘maximal subgroup’-type can arise. To continue, we must introduce the notation of the connectedness of aRees 0-matrix semigroup. To do this we define a graph, B. Let the graph B have vertex set I ∪Λ (whichwe assume to be a disjoint union), and let two vertices i ∈ I and λ ∈ Λ be adjacent if and only if Hiλ is agroup. Every vertex is adjacent to at least one other vertex, since the sandwich matrix P is regular. Thenthe graph B is called the Graham-Houghton bipartite graph of the Rees 0-matrix semigroup R.

We say that the number of connected components of R is the number of connected components ofthe graph B. The Rees 0-matrix semigroup T from Example 4.2 has one connected component, and theRees 0-matrix semigroup from Example 4.3 has two. Further, we note that the vertices of a connectedcomponent induce a rectangle of H -classes. If the vertices of a connected component are I ′ = i1, i3and Λ′ = λ2, then they induce the rectangle of H -classes A = Hiλ : i ∈ I ′, λ ∈ Λ′. We call such arectangle a component rectangle.

Then we say that two H -classes Hiλ and Hjµ are in the same connected component if the H -classesall lie in the same component rectangle, or equivalently if i, j, λ, and µ lie in the same connected componentof B. Note that distinct component rectangles are disjoint, and that every group H -class is contained insome component rectangle. However, this need to be true of every non-group H -class.

Example 4.3. Let T be the 5× 5 regular Rees 0-matrix semigroup M 0[G; I,Λ;P ], where |I| = |Λ| = 5,where G is the permutation group 〈(12)〉, and where the sandwich matrix P is given by:

1G (12) 0 0 00 (12) 1G 0 00 0 (12) 0 00 0 0 1G 1G0 0 0 (12) 0

The corresponding Graham-Houghton graph B of the semigroup T is given by:

i1 i2 i3 i4 i5

λ1 λ2 λ3 λ4 λ5

The first connected component of the graph B contains the vertices I1 = i1, i2, i3 and Λ1 =λ1, λ2, λ3. This component corresponds to the component rectangle A1 = Hiλ : i ∈ I1, λ ∈ Λ1;the second connected component contains the vertices I2 = i4, i5 and Λ2 = λ4, λ5, and correspondsto the component rectangle A2 = Hiλ : i ∈ I2, λ ∈ Λ2. These rectangles are illustrated below, byhighlighting the relevant H -classes in the egg-box diagram:

21

Page 26: Computingthemaximalsubsemigroupsofafinitesemigroupwaw7/files/projects/... · Abstract Wecharacterisethemaximalsubsemigroupsofsomespecialclassesoffinitesemigroup. Thisthen

The maximal J-class of T

*

* *

* *

* *

*

Component rectangle A₁

Λ₁

I₁

*

* *

* *

* *

*

Component rectangle A₂

Λ₂

*

* *

* *

I₂* *

*

In a casual sense, the elements of H -classes contained in distinct component rectangles are somewhatindependent of each other, since multiplication within a Rees 0-matrix semigroup can not take elementsfrom one component to the other. We shall see that the greater the number of connected components ofa Rees 0-matrix semigroup, the more difficult our search for this type of maximal subsemigroup becomes.

This notion of independence guides the algorithm which we will describe. We will show that anymaximal subsemigroup of ‘maximal subgroup’-type must have a specific kind of generating set. Thealgorithm will then calculate all of these possible generating sets, calculate the subsemigroups of R whichthey generate, and in doing so, find all maximal subsemigroups of the desired form.

We continue by proving a lemma which will allow us to describe a set of elements which must becontained in any maximal subsemigroup of ‘maximal subgroup’-type.

Lemma 4.4. Let R = M 0[G; I,Λ;P ] be a finite regular Rees 0-matrix semigroup over a group, and let Mbe a maximal subsemigroup of R such that M ∼= M 0[K; I,Λ;Q] for some maximal subgroup K of G andsandwich matrix Q. Then every non-zero group H -class Hiλ of M is of the form:

Hiλ = (i, kp−1λi , λ) : k ∈ K1

for some subgroup K1 ≤ G such that K1∼= K.

Proof. Since M is a regular subsemigroup of R, the H -classes of M are subsets of the H -classes of R.Hence for a group H -class Hiλ of M , there exists a subset X ⊆ G such that Hiλ = (i, g, λ) : g ∈ X.Note that every group H -class of M is isomorphic to K. Moreover, the function π : Hiλ → G given by(i, g, λ) 7→ gpλi is clearly an injective homomorphism, with image Xpλi. Therefore, the groups K, Hiλ,and Xpλi are isomorphic.

However, the H -class Hiλ is the set (i, g, λ) : g ∈ X = (i, gp−1λi , λ) : g ∈ Xpλi, so if we putK1 = Xpλi ∼= K, we are done.

Since the identity element is in any subgroup of G, we conclude that every maximal subsemigroup Mof R of ‘maximal subgroup’-type contains the elements E = (i, p−1λi , λ) : pλi 6= 0 ∪ 0 (that is, the setof idempotents of R). Therefore 〈E〉 ⊆M .

Let Hiλ be a fixed group H -class of the maximal subsemigroup M . Suppose that the H -class Hiµ isalso a group. Then since Hiµ in the same R-class as Hiλ, we can use Green’s Lemma (Theorem 1.7) tosee that Hiµ = Hiλ(i, p−1µi , µ). Likewise, if Hjλ is a group H -class in the L -class of Hiλ, then we have

22

Page 27: Computingthemaximalsubsemigroupsofafinitesemigroupwaw7/files/projects/... · Abstract Wecharacterisethemaximalsubsemigroupsofsomespecialclassesoffinitesemigroup. Thisthen

that Hjλ = (j, p−1λj , λ)Hiλ. Continuing in this way, we see that once the elements of one group H -classare known (call it H), then left- and right-translation by the relevant idempotents maps H onto all othergroup H -classes in the connected component of H.

In fact, once the elements of every group H -class in a component rectangle are known, then theelements of every non-group H -class within that component rectangle are known as well. To show this,let Hjµ be a non-group H -class of a component whose group H -classes are known. Since the vertices jand µ are in the same connected component of the Graham-Houghton bipartite graph B (by definition),then there is a path in B from the vertex j to the vertex µ:

j = i1 → λ1 → i2 → λ2 → ...→ in → λn = µ.

For each index k, the vertices ik and λk are adjacent in the graph B, and so by the definition ofadjacency in B, the H -class Hikλk is a group. Furthermore, for each index k < n, the vertices λk andik+1 are adjacent, which implies that the matrix entry pλkik+1 is non-zero. Therefore, we can realise thenon-group H -class Hjµ as the product:

Hjµ = Hi1λ1 ·Hi2λ2 · ... ·Hinλn .

To summarise, if the maximal subsemigroup M contains a group H -class Hiλ, and Hjµ is an H -classin the same component rectangle as Hiλ, then Hjµ ⊆ 〈E,Hiλ〉 ≤M .Remark 4.5. Note that by almost identical arguments, we see that the idempotent generated subsemigroup〈E〉 of M contains one element in every H -class of every connected component of M .

If the maximal subsemigroup M is connected, then every H -class of M is contained within a singlecomponent rectangle. Therefore, the set E of idempotents of M , along with any group H -class of M ,forms a generating set for M . However, if M is not connected, then we must specify additional generatorsto generate the H -classes which do not lie within the first component rectangle.

Suppose that the maximal subsemigroup M is not connected, so that M has n ≥ 2 connected com-ponents. Consider the component rectangles A1 and Ak, which are indexed by the sets I1, Λ1, and Ik,Λk, respectively, where k ∈ 2, ..., n. For the rest of this section, let Hiλ be a group H -class in thecomponent rectangle A1. Then consider the rectangle C1,k (indexed by I1 and Λk) and the rectangle Ck,1(indexed by Ik and Λ1). These rectangles consist of non-group H -classes. We illustrate with the J -classfrom the semigroup T , in Example 4.3 (with k = n = 2):

Rectangle C₁.₂

Λ₂

I₁

*

* *

* *

* *

*

Rectangle C₂.₁

Λ₁

*

* *

* *

I₂* *

*

23

Page 28: Computingthemaximalsubsemigroupsofafinitesemigroupwaw7/files/projects/... · Abstract Wecharacterisethemaximalsubsemigroupsofsomespecialclassesoffinitesemigroup. Thisthen

Now, let x = (i, g, µ) be any element of the rectangle C1,k in the same row as Hiλ.

Remark 4.6. Since the H -class Hx = Hiµ is in the rectangle C1,k, it is in the same column as a groupH -class Hjµ of the component rectangle Ak.

We will show that C1,k ⊆ 〈E,Hiλ, x〉:

• By Green’s Lemma (Theorem 1.7) the H -class Hiµ = Hiλx is contained in 〈E,Hiλ, x〉.

• Let Hlµ be any H -class of C1,k in the same column as Hiµ. Then since Hlλ is in the componentrectangle A1, it is contained in 〈E,Hiλ, x〉. Therefore Hlµ = HlλHiµ ⊆ 〈E,Hiλ, x〉.

• Finally, let Hlγ be an arbitrary H -class of the rectangle C1,k. Let z = (j, f, γ) be an element of〈E,Hiλ, x〉 in row j and column γ (this exists by Remark 4.5). Then Hlγ = Hlµz ⊆ 〈E,Hiλ, x〉.

Also, let y = (j, h, λ) be any element of the H -class Hjλ; this is contained in the rectangle Ck,1. By asymmetrical argument, we see that Ck,1 ⊆ 〈E,Hiλ, y〉. Finally, the group H -class Hjµ (contained in thesecond connected component, Ak) can be realised as the product:

Hjµ = yHiλx ∈ 〈E,Hiλ, x, y〉.

Since the subsemigroup 〈E,Hiλ, x, y〉 contains one group H -class of the component rectangle Ak, itfollows (by the same reasoning as for the first component) that it contains every H -class of the componentrectangle Ak. In this way, we have shown that the set E,Hiλ, x, y generates every element of the thecomponent rectangles A1 and Ak, and the rectangles C1,k and Ck,1.

For every component rectangle Ak (for 2 ≤ k ≤ n) ofM let us choose an element xk from the rectangleC1,k and an element yk from the rectangle Ck,1. We have shown that A1 ⊆ 〈E,Hiλ〉, and that for eachindex k ∈ 2, ..., n the rectangles Ak, C1,k, Ck,1 are contained in the subsemigroup 〈E,Hiλ, xk, yk〉. If wedefine U = 〈E,Hiλ, x2, y2, ..., xn, yn〉, then every component rectangle Ak and every rectangle C1,k andCk,1 is contained in U .

To show that in fact U = M , it remains to show that for all indices k ∈ 2, ..., n, the rectangles Cl,kand Ck,l are contained in U , for l ∈ 1, ..., k − 1. We prove this by induction on k. For the base case(k = 2) there is nothing further to do.

So let k > 2 and suppose the result holds for all indices 2, ..., k − 1. We must show that for all forl ∈ 1, ..., k−1, the rectangles Cl,k and Ck,l are contained in U . We will show the first of these; the secondfollows similarly. Fix l ∈ 1, ..., k − 1 and let Hjµ ∈ Cl,k. Then Hjλ ∈ Cl,1 ⊆ U , and Hiµ ∈ C1,k ⊆ U .Therefore by Green’s Lemma, and recalling that pλi 6= 0 (since Hiλ is a group H -class) it follows thatHjµ = HjλHiµ ⊆ U . Since Hjµ ∈ Cl,k was arbitrary, we conclude that Cl,k ⊆ U . By induction, the resultis proved. Therefore, we have proved that:

M = 〈E,Hiλ, x2, y2, ..., xn, yn〉. (4)

where Hiλ denotes the H -class of the maximal subsemigroup M of R in row i and column λ.We can use this knowledge to find all maximal subsemigroups of the Rees 0-matrix semigroup R of

‘maximal-subgroup’-type. We do this by finding all distinct generating sets of this special form. We willprove that the subsemigroup of R generated by such a set is either a maximal subsemigroup, or is equal toR. Having done this, an algorithm can construct these generating sets, and discard those which generatethe whole of R. Again, we define n to be the number of connected components of R, and we ask thequestion: how many possible generating sets are there?

Let U = 〈E,HUiλ, x2, y2, ..., xn, yn〉 be a subsemigroup of R with a generating set of the kind we are

considering.

• There is no choice for the set E; it is the set of idempotents of R.

24

Page 29: Computingthemaximalsubsemigroupsofafinitesemigroupwaw7/files/projects/... · Abstract Wecharacterisethemaximalsubsemigroupsofsomespecialclassesoffinitesemigroup. Thisthen

• By Lemma 4.4, the H -class HUiλ ⊆ HR

iλ of a maximal subsemigroup of R is determined by thechoice of a maximal subgroup K of G. Specifically HU

iλ = (i, kp−1λi , λ) : k ∈ K, which we write as(i,Kp−1λi , λ). There are as many choices here as there are maximal subgroups of G.

• It remains to show, given the set E and the H -class HUiλ, how many different subsemigroups U can

arise from different choices of xk, yk ∈ R (for all 2 ≤ k ≤ n)?

Let 2 ≤ k ≤ n. For each index k, we have seen that the element xk is free to be chosen as any elementfrom the rectangle C1,k ∩ U in row i; say that we choose it to be in some column µ, so that xk ∈ HU

iµ.By Remark 4.6 and the arguments following it, once xk is chosen, we can then choose the element yk

to be any element in the rectangle Ck,1 ∩ U which is column λ, and is in a row j such that pµj 6= 0. Inparticular, yk ∈ HU

jλ. Thus we may write xk = (i, g, µ) and yk = (j, h, λ), and assume that pµj 6= 0.We would like to know when different choices for the elements xk and yk give rise to the same sub-

semigroup U . To this end, suppose that xk = (i, g, µ) and x′k = (i, g′, µ) are two elements chosen from theH -class HR

iµ. Then:

HUiλx = HU

iλx′ ⇔ (i,Kp−1λi , λ)(i, g, µ) = (i,Kp−1λi , λ)(i, g′, µ)

⇔ Kp−1λi pλig = Kp−1λi pλig′

⇔ Kg = Kg′

⇔ g and g′ are in the same right coset of K.

(5)

Therefore, to give rise to different subsemigroups of R, the group elements g and g′ of xk and x′k mustbe contained in different right cosets of the maximal subgroup K ≤ G. Similarly, if yk = (j, h, λ) andy′k = (j, h′, λ) give rise to different subsemigroups of R, then the group elements hpλi and h′pλi must becontained in different left cosets of K. In particular, there are at most [G : K] choices for xk, and at most[G : K] choices for yk.

However, we will now see the elements xk and yk are not independent.By Green’s Lemma, it follows that xkHU

jλ = HUiλ = (i,Kp−1λi , λ). Certainly, since yk ∈ HU

jλ, we havethat xkyk = (i, gpµjh, λ) ∈ (i,Kp−1λi , λ). In particular, gpµjh ∈ Kp−1λi , which we may rearrange to showthat hp−1λi ∈ p

−1µj g−1K. Therefore, the choice of xk (and hence the group element g) specifies the left coset

of the group element hpλi. Hence there is no freedom in choosing yk (by the analogue of Equation 5).Thus, once the generator xk has been chosen, we may assume that yk = (j, p−1µj g

−1pλi, λ).

In sum, if the number of connected components of R is n, then for each maximal subgroup K of G, thereare at most [G : K]n−1 possible different generating sets arising from it.

It remains to show that if X is a generating set of the form described in Equation 4, then either〈X〉 = R, or 〈X〉 is a maximal subsemigroup of ‘maximal subgroup’-type. Suppose X is such a generatingset arising from the maximal subgroup K of G. Clearly 〈X〉 is a subsemigroup of R which intersectsevery H -class of R, and each H -class contains at least |K| elements, by construction. Assume that 〈X〉is not a maximal subsemigroup. In order to reach a contradiction, assume that 〈X〉 6= R. As a propersubsemigroup, 〈X〉 is properly contained in a maximal subsemigroup M ′ of R. Since the subsemigroup〈X〉 intersects every H -class of R non-trivially, so does the maximal subsemigroup M ′. Therefore M ′ isa maximal subsemigroup of ‘maximal subgroup’-type: where the relevant maximal subgroup is some K ′

such that K K ′ G. This contradicts the maximality of the subgroup K. Therefore 〈X〉 = R.Finally, pseudocode for an algorithm which uses these ideas is included as Algorithm 4. Note that this

is indeed a practical algorithm which has been implemented in the Semigroups package [8]. The Graham-Houghton bipartite graph of a Rees 0-matrix semigroup can constructed using the GRAPE package [9],and other function in the GRAPE package can be used to compute the connected components of thisgraph.

25

Page 30: Computingthemaximalsubsemigroupsofafinitesemigroupwaw7/files/projects/... · Abstract Wecharacterisethemaximalsubsemigroupsofsomespecialclassesoffinitesemigroup. Thisthen

Algorithm 1 Compute the maximal subsemigroups of ‘maximal subgroup’-typeInput: R = M 0[G; I,Λ;P ] where:

G is a finite group, I and Λ are finite sets, and P is a regular Λ× I matrix over G ∪ 0;B, the Graham-Houghton bipartite graph of R with vertex set I ∪ Λ;C = C1, C2, ..., Cn, the connected components of B, where Ci is the set of vertices of I ∪ Λ in

the ith component;Output: Ω, the set of maximal subsemigroups of R which intersect every H -class of R;1: n := |C|;2: Fix arbitrary i ∈ (C1 ∩ I), λ ∈ nbhd(i); [fix a group H -class Hiλ in the first component; nbhd(i) is

the set of vertices of B which are adjacent to the vertex i]3: E := 0 ∪ (j, p−1µj , µ) : j ∈ I, µ ∈ Λ, pµj 6= 0; [create E, the set of idempotents of R]4: for each maximal subgroup K of G do5: X := (i, kp−1λi , λ) : k ∈ K; [populate the elements of the fixed group H -class]6: U := 〈X,E〉;7: Ω← Ω ∪NonGroupRecursion(U, 0, 0, 1); [find maximal subsemigroups with recursive function]8: end for9: function NonGroupRecursion(U, x, y, k)

10: U := 〈U, x, y〉; [add generators x and y, the choices for the kth component]11: if every H -class of U has size at most |K| then [check that choosing x and y does not create a

subsemigroup which is too large]12: if k < n then13: Fix arbitrary j ∈ (Ck+1 ∩ I), µ ∈ nbhd(j); [fix a group H -class in the (k+ 1)th component]14: for each right coset Kz of K in G do [attempt each possible choice]15: x := (i, z, µ), y := (j, p−1µj z

−1p−1λi , λ); [choose the generators for next component]16: Γ← Γ ∪ NonGroupRecursion(U, x, y, k + 1); [continue to next component]17: end for18: else19: Γ← Γ ∪ U; [U is a maximal subsemigroup of R]20: end if21: end if22: return Γ.23: end function24: return Ω.

26

Page 31: Computingthemaximalsubsemigroupsofafinitesemigroupwaw7/files/projects/... · Abstract Wecharacterisethemaximalsubsemigroupsofsomespecialclassesoffinitesemigroup. Thisthen

4.1.2 Compute maximal subsemigroups which lack precisely one row or column of R

We now come to compute the next type of maximal subsemigroup described in Section 3.6: those whichlack a single row or column (R-class or L -class) of R. By Theorem 3.15, we can remove a row from theRees 0-matrix semigroup R if and only if R has at least 2 rows, and removing the corresponding columnfrom the sandwich matrix P leaves a regular matrix P ′; and likewise we can remove a column from R ifand only if R has at least 2 columns, and removing the corresponding row from the sandwich matrix Pleaves a regular matrix P ′. We provide pseudocode for such a computation in Algorithm 2.

Algorithm 2 Compute the maximal subsemigroups which lack a row or columnInput: R = M 0[G; I,Λ;P ] where:

G is a finite group, I and Λ are finite sets, and P is a regular Λ× I matrix over G ∪ 0;Output: Ω, the set of maximal subsemigroups of R which lack a single column or row of R;1: for λ ∈ Λ, i ∈ I do2: if there exist some matrix entry pλj 6= 0 for j 6= i then [check whether row λ of P can be removed]3: M := R \ (I ×G×λ); [create the maximal subsemigroup of R formed by removing column λ]4: Ω← Ω ∪ M;5: end if6: if there exist some matrix entry pµi 6= 0 for µ 6= λ then [check whether col. i of P can be removed]7: M := R \ (i ×G× Λ); [create the maximal subsemigroup of R formed by removing row i]8: Ω← Ω ∪ M;9: end if

10: end for11: return Ω.

4.1.3 Compute maximal subsemigroups which lack the complement of a maximal rectangleof non-group H -classes of R

As we saw in Section 3.6, the final case which can occur is when a maximal subsemigroup M of R lacksa rectangle of H -classes of R. We learned in Theorem 3.17 that for this case, our problem is reduced tocomputing the maximal rectangles of non-group H -classes of R.

To do this we again define a bipartite graph, B. Let the vertex set of the graph B be I ∪Λ, which weassume to be a disjoint union, and let two vertices i ∈ I and λ ∈ Λ be adjacent if and only if the H -classHiλ is not a group (or equivalently, if and only if the matrix entry pλi = 0). These adjacencies are trivialto compute, by looking at the sandwich matrix P . See Figure 5 for an example of such a graph. We shallcall this graph the rectangle graph of the Rees 0-matrix semigroup R.

We shall see that the maximal rectangles of non-group H -classes are in one-to-one correspondencewith the complete bipartite subgraphs B.

Definition 4.7. Let G = (V,E) be a bipartite graph. A complete bipartite subgraph of G is a subgraphK which is isomorphic to a complete bipartite graph, and which is not properly contained within anyother such subgraph of the graph G.

Lemma 4.8. Each maximal rectangle of non-group H -classes A = Hiλ : i ∈ I ′, λ ∈ Λ′ of the Rees0-matrix semigroup R corresponds to a unique complete bipartite subgraph of the graph B.

Proof. For every index i ∈ I ′, λ ∈ Λ′, the H -class Hiλ is not a group, and so the vertices i and λ areadjacent in B. Therefore, the subgraph C induced by I ′ ∪ Λ′ is a complete bipartite graph. We mustalso show that C is not properly contained in another such graph. However, the maximality of A givesprecisely this condition. Note that the subgraph C is uniquely specified by the sets I ′ and Λ′.

27

Page 32: Computingthemaximalsubsemigroupsofafinitesemigroupwaw7/files/projects/... · Abstract Wecharacterisethemaximalsubsemigroupsofsomespecialclassesoffinitesemigroup. Thisthen

Egg-box diagram

λ₁ λ₂ λ₃ λ₄

i₁ * *

i₂ *

i₃ *

Maximal rectangle

λ₁ λ₂ λ₃ λ₄

i₁ * *

i₂ *

i₃ *

Figure 4: The egg-box diagram of a J -class, and a maximal rectangle of non-group H -classes.

i1 i2 i3

λ1 λ2 λ3 λ4

Figure 5: The rectangle graph B corresponding to the J -class shown in Figure 4.

i1 i2 i3

λ1 λ2 λ3 λ4

Figure 6: Shown in blue is the complete bipartite subgraph of B which corresponds to maximal rectanglefrom Figure 4.

Conversely, a complete bipartite subgraph C of the graph B contains vertices in both index sets I andΛ, say I ′ ⊆ I and Λ′ ⊆ Λ. By definition of their adjacency in the graph B, if i ∈ I ′ and λ ∈ Λ′, then theH -class Hiλ is not a group. Therefore, each complete bipartite subgraph of the graph B induces a uniquerectangle of non-group H -classes of R, namely that indexed by I ′ and Λ′, which is obviously maximal.

In conclusion, the hard work has been translated into calculating the complete bipartite subgraphs ofthe graph B. Given the graph B and the set of complete bipartite subgraphs of B, pseudocode to calculatethe maximal subsemigroups of the Rees 0-matrix semigroup R which lack a rectangle of H -classes of Ris included as Algorithm 3. The GRAPE package [9] for GAP [6] is capable of constructing graphs ofthe type required here, and is capable of computing the complete subgraphs of graphs. For the workingimplementation in the Semigroups package [8], we rely on the function CompleteSubgraphs in the GRAPEpackage to perform these calculations. Therefore, Algorithm 3 is indeed practical.

28

Page 33: Computingthemaximalsubsemigroupsofafinitesemigroupwaw7/files/projects/... · Abstract Wecharacterisethemaximalsubsemigroupsofsomespecialclassesoffinitesemigroup. Thisthen

Algorithm 3 Compute the maximal subsemigroups of a regular Rees 0-matrix semigroup which lack arectangle of H -classesInput: R = M 0[G; I,Λ;P ] where G is a finite group, I and Λ are finite sets, and P is a regular Λ × I

matrix over G ∪ 0;C = (V1, E1), (V2, E2), ..., (Vn, En), the set of complete bipartite subgraphs of the rectangle

graph of R;Output: Ω, the set of maximal subsemigroups of R which lack a rectangle of H -classes of R;1: for Bi := (Vi, Ei) ∈ C do2: I# := Vi ∩ I, Λ# := Vi ∩ Λ; [calculate the vertices of I and Λ contained in Bi]3: I ′ := I \ I#, Λ′ := Λ \ Λ#; [calculate the complement rectangle of I# × Λ#]4: M := R \ (I ′ ×G×Λ′); [create the maximal subsemigroup of R formed by removing this rectangle]5: Ω← Ω ∪ M;6: end for7: return Ω.

4.2 Algorithm for Rees matrix semigroups

Let R = M [G; I,Λ;P ] be a finite Rees matrix semigroup over a group G. Casually, we can consider R tobe a Rees 0-matrix semigroup in which every matrix entry is non-zero, and from which the 0 element hasbeen removed. Thinking this way, it is clear that an algorithm for computing the maximal subsemigroupsof a R should proceed exactly as the previously described algorithm for Rees 0-matrix semigroups (Section4.1), except that the cases which require the existence of a 0 should be ignored. Therefore, in creating thealgorithms for Rees 0-matrix semigroups, we have done the hard work of creating an algorithm to computethe maximal subsemigroups of a Rees matrix semigroup.

In particular, from the discussion in Section 3.7, we have seen that a maximal subsemigroup of a Reesmatrix semigroup is formed by removing any single row from R (as long as R has more than one row) orany single column from R (as long as R has more than one column); or it is a maximal subsemigroup of‘maximal subgroup’-type.

• To compute the first two types, we proceed exactly as with Rees 0-matrix semigroups, as describedin Algorithm 2, except that it is no longer necessary to check for the existence of non-zero matrixentries. Provided that the semigroup R has more than one row, we take each row in turn and simplyremove it from the semigroup, and likewise for columns.

• To calculate the maximal subsemigroups of ‘maximal subgroup’-type, we must perform a simplifiedversion of the computation described in Algorithm 1 for Rees 0-matrix semigroups. Since everyH -class of R is a group, then the semigroup is connected, and so the search is much shorter ingeneral. In particular, there can be at most as many maximal subsemigroups of R of this form asthere are maximal subgroups of the group G.

29

Page 34: Computingthemaximalsubsemigroupsofafinitesemigroupwaw7/files/projects/... · Abstract Wecharacterisethemaximalsubsemigroupsofsomespecialclassesoffinitesemigroup. Thisthen

5 Description and justification of algorithms for arbitrary semigroups

In this section, we describe how to compute the maximal subsemigroups of an arbitrary finite semigroup.Whilst the results from Graham et al. [5] described in Section 2 are very useful, in general they are

descriptive of maximal subsemigroups, without giving a recipe for calculating them. Although we candescribe the form that a maximal subsemigroup must have, it is not always the case that a subsemigroupwith such a form is maximal. Therefore, much work remains to be done.

For the following, we assume that S is a finite semigroup with a generating set X0, so that S = 〈X0〉.Firstly, we check whether the semigroup S is a type of semigroup for which our algorithm would

be unnecessary. If S is the trivial semigroup, then we can end immediately, since the trivial semigrouphas no maximal subsemigroups. If S is a group, then we return its maximal subgroups - recall thatthere are pre-existing algorithms to calculate the maximal subgroups of a finite group, for example theMaximalSubgroups function in GAP [6]. If the semigroup S is simple, it is isomorphic to a regularRees matrix semigroup over a group. There exists a function named IsomorphismReesMatrixSemigroup

in GAP [6] which will return to isomorphism from S to a Rees matrix semigroup R. The maximalsubsemigroups of R can be computed using the algorithms described in Section 4, and then translatedinto maximal subsemigroups of S via the inverse isomorphism. If the semigroup S is 0-simple, we proceedsimilarly. Otherwise, calculation of the maximal subsemigroups of S will require more computation. Weassume that the semigroup S is not one of these easier cases, and we proceed.

Definition 5.1 (Irredundant generating set). Let X be a generating set for a semigroup S. If |X| ≥ 2,then we call a generator x ∈ X redundant if 〈X \x〉 = S. Then the generating set X is called irredundantif either |X| = 1, or it contains no redundant generators.

Firstly, we compute an irredundant generating set for S. Since the semigroup S is finite, so is itsgenerating set X0. Therefore, by repeatedly removing a redundant generator from X0, eventually thegenerating set X0 becomes irredundant. There is a function called IrredundantGeneratingSubset toperform this computation in the Semigroups package [8]. Define X = g1, g2, ..., gn to be an irredundantgenerating subset of X0.

Next, note that any maximal subsemigroup M must lack at least one of the generators in the setX, since if M contained the generating set X, then S = 〈X〉 ≤ M S, a contradiction. Therefore,each generator gives rise to at least one maximal subsemigroup of S: for each element gi ∈ X, thesubsemigroup 〈X \ gi〉 is properly contained in S (since X is irredundant) and is thus contained in amaximal subsemigroup of S. Further, if i 6= j then the subsemigroups 〈X \ gi〉 and 〈X \ gj〉 arecontained in distinct maximal subsemigroups. To see this, suppose that T is a subsemigroup of S whichcontains both 〈X \ gi〉 and 〈X \ gj〉. Then the subsemigroup T contains X, and hence T = S. Inparticular, there are as many maximal subsemigroups of the semigroup S as their are elements in anyirredundant generating set of S.

We note in Example 5.2 that a maximal subsemigroup may lack multiple generators:

Example 5.2. Consider the symmetric group of permutations on the 1, 2, 3, S3 = 〈(12), (123)〉. Thisgenerating set is clearly irredundant. However, the subgroup generated by the permutation (13), 〈(13)〉,is a maximal subgroup of S3 which contains none of the generators of S3.

By Theorem 2.1, any maximal subsemigroup M of S contains all but one J -class of S. As describedabove, the maximal subsemigroup M must lack at least one generator of S. Therefore, the J -class of Swhich M lacks must contain at least one generator. We are now ready to state our first existence result:

Corollary 5.3. Let J be a J -class of S. Then there are maximal subsemigroups arising from J (i.e.maximal subsemigroups M of S such that J(M) = J) if and only if J ∩X 6= ∅.

30

Page 35: Computingthemaximalsubsemigroupsofafinitesemigroupwaw7/files/projects/... · Abstract Wecharacterisethemaximalsubsemigroupsofsomespecialclassesoffinitesemigroup. Thisthen

The algorithm will locate the J -classes of the semigroup S which contain generators. This is a trivialcomputation. It will then consider each such J -class in turn, calculating the maximal subsemigroups ofS which are formed by removing part of that J -class.

Let J be a J -class of the semigroup S which contains precisely one element, that element being agenerator of S. There do exist maximal subsemigroups of S arising from J by Corollary 5.3. However, sincea maximal subsemigroup is a proper subsemigroup which lacks elements of only one J -class (Theorem2.1), there is exactly one maximal subsemigroup arising from J : the subset S\J . In this case, an algorithmwould simply remove the J -class J to find this maximal subsemigroup. Therefore, for the remainder ofthis section, we may assume that any J -class to be considered is non-trivial.

It will soon become apparent that the methods which we will employ to calculate the maximal sub-semigroups arising from a maximal J -class are different from those needed to calculate the maximalsubsemigroups arising from a non-maximal J -class. Therefore, it is necessary to calculate partial or-der of the J -classes of the semigroup S. This can be calculated, for example, using the functionPartialOrderOfDClasses in the Semigroups package [8].

Remark 5.4. All maximal J -classes must contain at least one generator, since Lemma 1.4 implies thatelements of a maximal J -class can not be realised as products of elements in other J -classes.

5.1 Compute the maximal subsemigroups which lack a maximal J -class

We first consider the maximal J -classes of the semigroup S; note that they all contain generators byRemark 5.4. In some sense, a maximal J -class J is independent of multiplication in the other J -classesof the semigroup S, since, as we shall see in Lemma 5.5, the complement of J is in fact an ideal. Itis therefore easier to describe how a maximal subsemigroup can arise from a maximal J -class, and theresulting computation is much more straightforward, since we can focus on the particular maximal J -class in isolation. We shall see that a maximal subsemigroup arising from a maximal J -class is formedby either removing the J -class entirely, or by adjoining a maximal subsemigroup of the principal factor.

For aesthetic reasons, and since we will need to describe the set S \ J so frequently throughout thefollowing pages, when the J -class J in question is unambiguously defined we will adopt the notation SJto denote the set S \ J . Note that for a maximal J -class J , the subset SJ is in fact an ideal of S:

Lemma 5.5. Let J be a maximal J -class of S. Then SJ is an ideal of S; in particular, it is a subsemigroupof S.

Proof. Note that SJ is a non-empty subset of S, since S is not simple. To show that SJ is an ideal, letx ∈ SJ and y ∈ S. By Lemma 1.4, we have that Jxy ≤ Jx and Jyx ≤ Jx. Since J is a maximal J -classand x /∈ J , it follows that J Jx. Therefore Jxy 6= J and Jyx 6= J , i.e. xy, yx ∈ SJ .

We again see Remark 5.4 as an obvious corollary of this lemma:

Corollary 5.6. Every maximal J -class contains generators.

Since every J -class contains generators, each must give rise to some number of maximal subsemi-groups. Hence, our algorithm must treat each one in turn, and calculate the resulting maximal subsemi-groups. In considering all trivial J -classes of the semigroup S, as our algorithm has already done, itturns out that we have already considered all maximal non-regular J -classes of S:

Lemma 5.7. Let Jx be a non-regular maximal J -class with representative x. Then Jx is trivial.

Proof. Let y be an element of S. If y ∈ Jx, then Jxy Jx, since Jx is non-regular (by Lemma 1.5).Otherwise y /∈ Jx, and so Jxy ≤ Jy (by Lemma 1.4). Since Jx is a maximal J -class (so that Jx Jy) weconclude that Jxy 6= Jx, i.e. xy /∈ Jx. Therefore only right multiplication by an adjoined identity gives aproduct in Jx, so Rx = x; similarly Lx = x. Hence Jx = Dx = x.

31

Page 36: Computingthemaximalsubsemigroupsofafinitesemigroupwaw7/files/projects/... · Abstract Wecharacterisethemaximalsubsemigroupsofsomespecialclassesoffinitesemigroup. Thisthen

Note that a regular maximal J -class can have size 1: take for example the trivial semigroup, orany non-monoid to which an identity has been adjoined. In any case, all further maximal J -classesto be considered are regular and non-trivial; so let J be such a J -class. We shall see that maximalsubsemigroups of S arising from J are in correspondence with particular maximal subsemigroups of J∗,the principal factor of the J -class J .

Lemma 5.8. Let A be a subset of J , and define U = SJ ∪A. Then U is a subsemigroup of S if and onlyif for all elements x, y ∈ A such that xy ∈ J , we have xy ∈ A.

Proof. (⇒) Let x, y ∈ A be such that xy ∈ J . Then the subsemigroup U contains A, and so xy ∈ U .Since xy /∈ SJ , we have that xy ∈ A by definition of U .

(⇐) Let x and y be two elements of U . If xy ∈ SJ then we are done. Otherwise, since SJ is an idealof S, we must have that both x and y are in the J -class J , and so xy ∈ A by assumption.

Recall that for a subset A of J , we define A∗ to be the subset A∪0 of J∗. Likewise, if A∗ is a subsetof J∗ which contains zero, we define its corresponding subset A to be the subset A∗ \ 0 of J . These setsA and A∗ are clearly in an inclusion-preserving one-to-one correspondence.

Theorem 5.9. Let A be a non-empty subset of the J -class J , and define U = SJ ∪ A. Then U is asubsemigroup of the semigroup S if and only if A∗ is a subsemigroup of the principal factor J∗.

Proof. The set A∗ is a subsemigroup of the principal factor J∗ if and only if A∗ is closed under multi-plication. By the definition of multiplication in the principal factor, this is true if and only if wheneverx, y ∈ A, then xy ∈ A or xy /∈ J . Equivalently, A∗ is closed under multiplication if and only if wheneverx, y ∈ A and xy ∈ J , we have that xy ∈ A. By Lemma 5.8, we conclude the result.

Corollary 5.10. Let A be a non-empty subset of the J -class J , and define U = SJ ∪ A. Then U is amaximal subsemigroup of the semigroup S if and only if A∗ is a maximal subsemigroup of the principalfactor J∗.

Proof. Since the bijective correspondence between the subsets of J and the subsets of J∗ which include0 preserves inclusions, so does the correspondence between subsemigroups of S containing SJ , and thesubsemigroups of J∗ which contain 0. The result follows by applying Theorem 5.9.

We note that for a non-trivial maximal J -class, the ideal SJ is never itself maximal. Because theJ -class J is regular, it contains an idempotent e, and soM ′ = SJ ∪e is a subsemigroup of S. Since J isnon-trivial, M ′ is a proper subsemigroup of S properly containing the ideal SJ , and so SJ is not maximal.

Note also that 0 is not a maximal subsemigroup of the principal factor J∗, since |J | ≥ 2, and so|J∗| ≥ 3 (see Lemma 2.7). Therefore every such maximal subsemigroup A∗ of J∗ which contains 0 doesindeed correspond to a non-empty proper subset A of J , and hence a maximal subsemigroup of S.

In conclusion, for a non-trivial maximal J -class of the semigroup S, our task amounts to findingthose maximal subsemigroups of the principal factor J∗ which contain 0. Since J is a regular J -class,the principal factor J∗ is 0-simple, and is hence isomorphic to a regular Rees 0-matrix semigroup over agroup. An algorithm to calculate the maximal subsemigroups arising from a non-trivial maximal J -classof S would calculate such a Rees 0-matrix semigroup, R. (The function InjectionPrincipalFactor isavailable in GAP [6] to do just this). We can use the algorithms described in Section 4 to then calculatethe maximal subsemigroups of R which contain the element 0. We then translate these subsemigroupsinto the corresponding subsets of the J -class J . By adjoining each of these sets to the ideal SJ , we findevery maximal subsemigroup of S arising from the non-trivial maximal J -class J .

32

Page 37: Computingthemaximalsubsemigroupsofafinitesemigroupwaw7/files/projects/... · Abstract Wecharacterisethemaximalsubsemigroupsofsomespecialclassesoffinitesemigroup. Thisthen

5.2 Compute the maximal subsemigroups which lack a non-maximal J -class

It remains to describe how to compute the maximal subsemigroups of the semigroup S which lack part of anon-maximal and non-trivial J -class. By Theorem 2.3, the J -classes which are non-regular are straight-forward to handle, but for non-maximal regular J -class, the results of [5] are much less prescriptive, andso our algorithms will be considerably more complicated.

Let J be a non-regular J -class of the semigroup S which contains at least one generator of S. Thereexist maximal subsemigroups of S arising from J by Corollary 5.3. However, by Theorem 2.3, the onlymaximal subsemigroup M arising from J is S \ J . In this case, an algorithm would simply remove theJ -class J to find this maximal subsemigroup.

Remark 5.11. This implies that a non-regular J -class can contain at most one element of any irredundantgenerating set for S. This also provides an alternative proof of Lemma 5.7: since every element of amaximal non-regular J -class must be a generator, it follows that it can contain only one element.

Hence for the final case, we may assume that J is a non-maximal and non-trivial regular J -class whichcontains some generators of S. In this case, we can not use the same strategy as with maximal regularJ -classes. The arguments we employed in Section 5.1 often relied on the maximality of the relevantJ -class. In particular, we saw that maximal subsemigroups are in one-to-one correspondence with themaximal subsemigroups of the principal factor which contain 0. However, as demonstrated in Examples5.13 and 5.14, not every maximal subsemigroup of S arising from J gives a maximal subsemigroup of itsprincipal factor, and not every maximal subsemigroup of the principal factor (which contains 0) gives amaximal subsemigroup of S arising from the J -class J .

Essentially, this is because for a non-maximal J -class, the subset SJ is not an ideal. Therefore, theelements of SJ might interact with the elements of J in surprising ways.

Lemma 5.12. Let A∗ be a maximal subsemigroup of J∗ which contains 0, and let A be the correspondingsubset of J . Then either SJ ∪A is a maximal subsemigroup of S, or 〈SJ ∪A〉 = S.

Proof. Note that A is non-empty. If 〈SJ ∪ A〉 = SJ ∪ A, then SJ ∪ A is a proper subsemigroup of S. Toshow that it is maximal, let x ∈ S\(SJ∪A) = J \A. Then the subset of J∗ corresponding to J∩〈SJ∪A, x〉is a subsemigroup of J∗ properly containing A∗, and since A∗ is maximal, this subset hence equals J∗.Therefore J ⊆ 〈SJ ∪A, x〉, so that 〈SJ ∪A, x〉 = S.

Otherwise, SJ ∪ A is not a semigroup, and so there exists x ∈ J \ A such that x ∈ 〈SJ ∪ A〉. Again,we conclude that 〈SJ ∪A〉 = 〈SJ ∪A, x〉 = S.

In conclusion, an algorithm can not look at each non-maximal regular J -class in isolation, as we couldwith maximal J -classes. Instead, we must consider the place of J within the semigroup S as a whole.However, some maximal subsemigroups do indeed correspond to a maximal subsemigroup of the principalfactor, and we still have many useful results from Section 2 and [5] to guide us. Firstly and in particular,Theorem 2.2 proves that a maximal subsemigroup of S arising from J either intersects every H -classof J , else it contains a union of the H -classes of J . Our algorithm will separately look for maximalsubsemigroups of each type.

5.2.1 Compute the maximal subsemigroups which intersect every H -class non-trivially

Suppose that M is a maximal subsemigroup of S arising from the non-trivial, non-maximal, and regularJ -class J , and further suppose that M intersects every H -class of J non-trivially. By Theorem 2.4, thesubset of the principal factor J∗ corresponding to M ∩ J is in fact a maximal subsemigroup of J∗; it isone of ‘maximal subgroup’-type.

Therefore, to compute all such maximal subsemigroups M , we simply calculate all maximal sub-semigroups of the principal factor J∗ which are of ‘maximal subgroup’-type. Each of these maximalsubsemigroups of J∗ corresponds to a subset of J ; we try adjoining the corresponding subset of J to SJ .

33

Page 38: Computingthemaximalsubsemigroupsofafinitesemigroupwaw7/files/projects/... · Abstract Wecharacterisethemaximalsubsemigroupsofsomespecialclassesoffinitesemigroup. Thisthen

By Lemma 5.12, the result is either a maximal subsemigroup, or it generates the whole semigroup. By dis-carding all of this latter type, we find every such maximal subsemigroup of S that we require. Pseudocodecode for such an algorithm is included as Algorithm 4.

Note that the principal factor J∗ is 0-simple, and is thus isomorphic to a regular Rees 0-matrixsemigroup over a group. Therefore we may use the algorithms described in Section 4 to calculate thesemaximal subsemigroups.

Algorithm 4 Compute the maximal subsemigroups of S which intersect every H -class of SInput: S = 〈X〉, where X is irredundant;

J , a non-trivial and non-maximal regular J -class of S which contains generators of X;Γ = A∗1, ..., A∗m, the max. subsemigroups of the principal factor J∗ of ‘maximal subgroup’-type.

Output: Ω, the set of maximal subsemigroups of S which lack part of the J -class J , and which intersectevery H -class of S non-trivially.

1: for A∗ ∈ Γ do2: A := A∗ \ 0; [get the subset of J corresponding to the maximal subsemigroup of J∗]3: M := 〈(S \ J) ∪A〉; [adjoin A to S \ J ]4: if M 6= S then [use Lemma 5.12]5: Ω← Ω ∪ M;6: end if7: end for8: return Ω.

Having computed the maximal subsemigroups of ‘maximal subgroup’-type of the principal factor J∗,we may find that few (or even none) of them give rise to maximal subsemigroups of S. However, despitethe wastefulness of this approach, it is not immediately evident how to avoid this work. We demonstratethe necessity of this caution with the following example:

Semigroup: R

1

(123)(213)

2

(121)(212)

(122)(211)

Semigroup: U

1

(123)

2

(121)(212)

(122)(211)

Semigroup: V

1

(123)

2

(121)

(122)

Example 5.13. Consider the semigroup R, which is generated irredundantly by the transformationsσ = (211), and τ = (213). The semigroup R consists of 6 elements, which are contained in two regularJ -classes, as shown above. A subsemigroup U of R is also shown, which has an irredundant generatingset given by: σ = (211), (212), (123); it is obviously a maximal subsemigroup.

The J -class J2 (with index 2 in the diagram) is a non-maximal regular J -class of both R and U .

34

Page 39: Computingthemaximalsubsemigroupsofafinitesemigroupwaw7/files/projects/... · Abstract Wecharacterisethemaximalsubsemigroupsofsomespecialclassesoffinitesemigroup. Thisthen

This J -class contains the generator σ = (211), and so there are maximal subsemigroups of both R andU arising from J2. The principal factor J∗2 is clearly isomorphic to a 2× 1 Rees 0-matrix semigroup overC2, the cyclic group of order 2.

Do there exist maximal subsemigroups of R arising from the J -class J2 which intersect every H -classof R non-trivially? And likewise for U? We can compute using our algorithms from Section 4.1, and findthat there is only one maximal subsemigroup of the principal factor J∗ of ‘maximal subgroup’-type. Thecorresponding subset of J2 is given by the set A = (121), (122). We shall see that the subset A givesrise to a maximal subsemigroup of U , but not of R.

• Define W to be the subset (R\J2)∪A of R. Then the set W is not a subsemigroup of R, since (121)and τ are both elements of W , but their product equals σ, which is not an element of W . Therefore〈W 〉 = R by Lemma 5.12 (this is easy to verify).

• Define V to be the subset (U \ J2) ∪A of U . Then the set V is indeed a subsemigroup of U (this iseasy to verify), and so V is maximal by Lemma 5.12. More precisely, V is a maximal subsemigroupof the semigroup U which intersects every H -class of U non-trivially.

This example demonstrates the necessity of considering the semigroup as a whole when looking for maximalsubsemigroups arising from a non-maximal regular J -class.

5.2.2 Compute maximal subsemigroups which are a union of H -classes

We define an H∗ maximal subsemigroup of S to be one which is a union of H -classes. Example 5.14 showsthat not every H∗ maximal subsemigroup arises from a maximal subsemigroup of the principal factor.

Semigroup: T

1

(21345)(12345)

2

(11444) (22444) (11333) (22333)

(11441) (22442) (11331) (22332)

Semigroup: U

1

(21345)(12345)

2

(11444) (22444) (11333) (22333)

Semigroup: V

1

(21345)(12345)

2

(11333) (22333)

(11331) (22332)

Example 5.14. Consider the monoid T of order 10 generated irredundantly by the transformationsρ = (11333), σ = (22442), and τ = (21345). Then the monoid T consists of two regular J -classes, whichboth contain generators. Let J2 be the J -class of T with index 2 in the above diagram.

The principal factor J∗2 is isomorphic to a 2× 4 rectangular band with an adjoined zero. From Section3.7.1, we easily see that there are 6 maximal subsemigroups of J∗2 which contain zero, formed by removingeither a single row or column. One of these, removing the second row of the rectangular band, correspondsto the maximal subsemigroup U of T , which is shown above (it is easy to verify that U is maximal).However, not all 6 of these maximal subsemigroups corresponds to a maximal subsemigroup of T .

For example, the first column of the J -class J2, containing the elements (11444), (11441), is mappedbijectively by τ onto the second column, containing the elements (22444), (22442); and vice versa.Therefore, one of these columns can not be removed without the other also being removed; and similarlyfor the third and fourth columns. The result of removing the first two columns is shown above as V ; it

35

Page 40: Computingthemaximalsubsemigroupsofafinitesemigroupwaw7/files/projects/... · Abstract Wecharacterisethemaximalsubsemigroupsofsomespecialclassesoffinitesemigroup. Thisthen

is easy to verify that V is a maximal subsemigroup of T . However, the subset of the principal factor J∗2corresponding to J ∩ V is not a maximal subsemigroup of J∗2 , since it lacks more than one column.

This demonstrates that, when a maximal subsemigroup M is a union of H -classes, the correspondingsubset of the principal factor need not be a maximal subsemigroup.

Let us proceed to describe an algorithm to compute the H∗ maximal subsemigroups of S which arisefrom the non-trivial non-maximal regular J -class J . This is the final type of maximal subsemigroupwhich to be computed. Let M be such a maximal subsemigroup. Then we may say that if M contains theelement x, then it must contain the whole H -class Hx; and if M does not contain the element x, then itmust not contain any element of Hx. To that end, we make the following definition:

Definition 5.15. For a non-empty subset C of the semigroup S, define the set CH to be the H -classclosure of C in S, i.e. CH =

⋃x∈C Hx.

Any maximal subsemigroup arising from the J -class J must lack some number of generators in theset X ∩ J (else it would not be a proper subsemigroup). Therefore, we take each non-empty subset ofX ∩ J , and attempt to find the H∗ maximal subsemigroups which lack precisely these generators (if theyexist). Let Y be a non-empty subset of X ∩ J . For reasons which shall become apparent, we consider thesubsets Y in order of increasing size, starting with the singletons.

Now suppose that M is an H∗ maximal subsemigroup of S which contains the generators in the setX \ Y , but which does not contain the generators in the set Y . Certainly M contains the set X \ Y andthe set S \ J , and so M contains the subsemigroup U = 〈X \ Y, S \ J〉H . By definition, M contains noelement of the set Y , and hence no element of the set Y H . Moreover, the maximal subsemigroup M cannot contain any element x ∈ J such that the set 〈U, x〉H ∩ Y is non-empty. If this were the case, then wewould have that:

∅ 6= 〈U, x〉H ∩ Y ⊆M ∩ Y,

contradicting the definition of M . Therefore, we may compute a set of elements of J , and hence a set ofH -classes of J , none of which is contained in the maximal subsemigroup M . If we call this set B, thencertainly Y H ⊆ B; pseudocode is included as Algorithm 5 to compute as large a set B as possible.

Algorithm 5 Calculate elements which are not contained in particular maximal subsemigroups of SInput: S = 〈X〉, where X is irredundant;

J , a non-trivial non-maximal regular J -class of S which contains generators of X;Y , a non-empty subset of X ∩ J ;

Output: B, a set of elements of J . None of these elements can not be contained in any H∗ maximalsubsemigroup of S which lacks the generators in Y ;

1: U := 〈X \ Y, S \ J〉H ; [any maximal subsemigroup of the desired form must contain U ]2: B := Y H [any maximal subsemigroup of the desired form can not contain any element of Y ]3: C := J \ (U ∪B) [the elements in neither U or B; currently unknown]4: while C 6= ∅ do5: Choose c ∈ C;6: V := 〈U, c〉H ; [adjoin the element c to U ]7: if V ∩B 6= ∅ then8: C := C \Hc; [all elements of this H -class have now been considered]9: B := B ∪Hc; [adjoining the element c generated forbidden elements, so add its H -class to B]

10: else11: C := C \ V ; [for x ∈ V : 〈U, x〉H ≤ V , and so x need not be checked]12: end if13: end while14: return B.

36

Page 41: Computingthemaximalsubsemigroupsofafinitesemigroupwaw7/files/projects/... · Abstract Wecharacterisethemaximalsubsemigroupsofsomespecialclassesoffinitesemigroup. Thisthen

Recall that we consider the subsets Y (of generators of X ∩ J) in order of increasing size. Therefore,if we are searching for H∗ maximal subsemigroups which lack the generators in the set Y (but whichcontain the generators in the set X \ Y ), we may assume that we have already found all H∗ maximalsubsemigroups which lack the generators in the set Y ′ (but which contain the generators in the set X \Y ′)for each proper non-empty subset Y ′ of Y . We may also assume that we have calculated all maximalsubsemigroups arising from the J -class J which intersect every J -class of J non-trivially. Call the setof all previously found maximal subsemigroups Γ.

Note that if there are no maximal subsemigroups of S arising from J which intersect every H -class ofJ non-trivially, then by Corollary 5.3, there must exist some H∗ maximal subsemigroups arising from J .

Now, suppose that we have calculated the set B, using Algorithm 5. If there does exist an H∗ maximalsubsemigroup M lacking the generators in Y (and containing the other generators) then by definition ofthe subsemigroup U and the set B, we have:

U ≤M ⊆ S \B ( S. (6)

Note that S\B is a proper subset of S since B is non-empty (it contains Y ). There are now two possibilities:

Case 1. The set S \B is a subsemigroup of S.

Therefore, if there does exist an H∗ maximal subsemigroup M of the desired form, it must satisfythe inequalityM ≤ S \B S (by Equation 6). Therefore, M exists if and only if S \B is a maximalsubsemigroup of S (in which case M = S \B).

By definition of the set B, adjoining any element x ∈ B to S \B will generate a subsemigroup Vx ofS which contains some generator in Y .

Either Vx = S for all x ∈ B, in which case the subsemigroup S \B is maximal, or there exists somex ∈ B such that Vx is a proper subsemigroup of S, and is hence contained in a maximal subsemigroupin the set Γ. Therefore S \ B is a maximal subsemigroup of S if and only if S \ B is not containedin any maximal subsemigroup W ∈ Γ.

Case 2. The set S \B is not a subsemigroup of S.

Since U is a subsemigroup of S and U ⊆ S \ B, it follows that U ( B. Therefore the subsetA = J \ (U ∪B) of J is non-empty. Note that since the both the subsemigroup U and the subset Bare unions of H -classes, it follows that the set A must also be a union of H -classes. Therefore, wemay interpret the set A to be a set of H -classes of J (rather than just a set of elements).

The set A contains H -classes which might be contained in some H∗ maximal subsemigroup whichlacks the generators in Y . Using Equation 6, all we can say for such a hypothetical maximalsubsemigroup M is that:

U ≤M ( S \B.

Firstly, we check that the set S \ B is not contained in any maximal subsemigroup W ∈ Γ; if it is,then clearly no maximal subsemigroup M can exist.

Otherwise, we perform a depth-first search with backtracking to find which combinations of H -classes in the set A, if any, form maximal subsemigroups. Pseudocode is provided to perform thissearch in Algorithm 6.

37

Page 42: Computingthemaximalsubsemigroupsofafinitesemigroupwaw7/files/projects/... · Abstract Wecharacterisethemaximalsubsemigroupsofsomespecialclassesoffinitesemigroup. Thisthen

Algorithm 6 Compute the maximal subsemigroups of S which are a union of H -classesInput: S = 〈X〉, where X is irredundant;

J , a non-maximal regular J -class of S which contains generators of X;Y , a non-empty subset of X ∩ J ;B, a set of H -classes of J which no maximal subsemigroup of S lacking Y can contain, computed

using Algorithm 5;Γ, the set of maximal semigroups of S which contain the generators in the set X \ Y and which

contain a non-empty subset of the generators in the set Y ;Output: Ω, the set of H∗ maximal subsemigroups of S which lack the generators in the set Y but contain

the generators in the set X \ Y ;1: function HClassRecursion(U,K,A) [function to test whether U is maximal]2: m := true;3: while A 6= ∅ do4: Choose H ∈ A; [pick any H -class in A]5: if H ∩K = ∅ then [check that this H -class has not yet been determined]6: V := 〈U,H〉H ; [adjoin the H -class H to U ]7: if V 6= S then8: m := false; [U is not maximal since it is properly contained in V ]9: HClassRecursion(V,K, (A \ V )); [V is now a candidate for maximality; test it]

10: K ← K ∪H; [this H -class does not need to be considered subsequently]11: end if12: A← A \ H;13: end if14: end while15: if m, and U is not contained in any maximal subsemigroup W ∈ Γ then16: Ω← Ω ∪ U; [U is a maximal subsemigroup]17: end if18: return19: end function20: U := 〈S \ J,X \ Y 〉H ; [any maximal subsemigroup of the desired form must contain U ]21: A := J \ (U ∪B); [the H -classes which a max. subsemigroup of the desired form perhaps contains]22: HClassRecursion(U, ∅, A);23: return Ω.

This completes the description of algorithms contained in this project.

38

Page 43: Computingthemaximalsubsemigroupsofafinitesemigroupwaw7/files/projects/... · Abstract Wecharacterisethemaximalsubsemigroupsofsomespecialclassesoffinitesemigroup. Thisthen

6 Notes about algorithms

In Section 4 we described an algorithm to calculate the maximal subsemigroups of a finite regular Rees0-matrix semigroup over a group. In Section 5 we used this, and other ideas, to describe an algorithm tocalculate the maximal subsemigroups of an arbitrary finite semigroup.

Far from being an entirely theoretical exercise, the algorithms described were actually practical. As partof a group project, these algorithms have now been translated into working computer code; in particularthey have been implemented in the GAP system [6]. This code is included in version 2.0 of the Semigroupspackage [8], and is available to use as the function MaximalSubsemigroups.

As a demonstration of the utility of these functions, we note that it is often much quicker to com-pute the maximal subsemigroups of a semigroup with the MaximalSubsemigroups function, than it is tocomputationally verify that the results are indeed maximal.

Also, by running the MaximalSubsemigroups function on a semigroup S, and then recursively callingthe algorithm on the maximal subsemigroups which it produces, it is possible to enumerate every sub-semigroup of S. By performing this computation on the full transformation monoid of degree 3, T3, it isa quick and easy exercise to verify the result of [3] that there are 1298 non-empty subsemigroups of T3.

6.1 Possible improvements

The MaximalSubsemigroups function could be improved by incorporating more of the results presentedin Section 3. For example, we can completely describe the maximal subsemigroups of a finite monogenicsemigroup (Section 3.5), and so for these types of semigroup it is unnecessary to perform a complicatedcomputation. Similarly, the maximal subsemigroups of a commutative semigroup (Section 3.3) do notrequire the full generality of the algorithms described, since all of the Green’s relations on a commutativesemigroup coincide. By performing additional checks at the start of the MaximalSubsemigroups function,we could avoid unnecessary computation by handling these easier cases separately.

Computing the maximal subsemigroups of a semigroup is a task which could be easily parallelised.As we have seen in Section 5, the maximal subsemigroups which arise from one J -class are completelyindependent of the maximal subsemigroups which arise from a separate J -class. Therefore, once we havecalculated the J -classes which contain generators, the algorithm could be run to calculate the maximalsubsemigroups arising from each J -class simultaneously. However, at various points throughout thecomputation (particularly when calculating maximal subsemigroups which are a union a H -classes) it isnecessary to have access to the maximal subsemigroups which have already been calculated. Therefore, itis not obvious how to parallelise the computation further.

At various points in the algorithms, for example when calculating the maximal subsemigroups of anarbitrary semigroup which are a union of H -classes, and when calculating the maximal subsemigroupsof a Rees 0-matrix semigroup of ‘maximal subgroup’-type, it is necessary to perform recursive depth-firstsearches. Writing efficient search algorithms is a difficult task, and there are undoubtedly many ideasavailable from computer science to greatly optimise these searches.

However, perhaps there are further mathematical ideas which could increase the efficiency of theseparts of the algorithms. If we had access to the automorphism group of the semigroup we are computingwith, this information could be used to avoid following branches of the search tree which are equivalentunder the automorphism group to a branch which has already been considered.

We leave this section with one final suggestion. Perhaps a worthwhile and related (but different) projectwould be to create an algorithm to compute the subsemigroups of an arbitrary finite semigroup which aremaximal with a certain property. For example, it would be interesting to be able to compute the largestinverse subsemigroup of an arbitrary semigroup, or the largest regular subsemigroup of an arbitrarysemigroup (although these are not necessarily maximal in the sense which we have been using in thisproject). There are many topics in computational semigroup theory still to be investigated.

39

Page 44: Computingthemaximalsubsemigroupsofafinitesemigroupwaw7/files/projects/... · Abstract Wecharacterisethemaximalsubsemigroupsofsomespecialclassesoffinitesemigroup. Thisthen

7 Maximal subsemigroups of specific finite semigroups

For the final section of this project, we will apply the ideas from the algorithm in Section 5 to find themaximal subsemigroups of a few well-known and interesting finite semigroups.

7.1 Full transformation monoid Tn

For a number n ∈ N, the full transformation monoid of degree n, Tn, is the semigroup of all transformationsof the set 1, 2, ..., n under composition. The full transformation monoid Tn is a finite semigroup whichis regular, and is one of the most fundamental examples in semigroup theory, since every finite semigroupcan be embedded into some such semigroup Tn.

Any two mappings x, y ∈ Tn are J -equivalent if and only if they have equal rank, and the naturalpartial order of J -classes of Tn is characterised by the condition that Jx ≤ Jy if and only if rank(x) ≤rank(y). Therefore, the J -class partial order is in fact a chain. For a number i ∈ 1, 2, ..., n, we shall usethe notation Ji to denote the J -class of Tn consisting of transformations of rank i. Thus, the maximalJ -class Jn consists of all transformations of rank n: that is, all permutations of the set 1, 2, ..., n. Inparticular, we see that the maximal J -class, Jn, consists of a single H -class which is isomorphic to thesymmetric group Sn. For a monoid, we call the H -class of the identity the group of units, because it is agroup, and every element of the group is invertible in the group, and hence in the semigroup. So for thefull transformation monoid Tn, the group of units is the symmetric group Sn.

The full transformation monoid of degree 1 is the trivial semigroup, which has no maximal sub-semigroups. However, if n ≥ 2 then it is well known (for example, it is proved in the course MT5823Semigroups) that a minimal generating set for the full transformation monoid Tn can be formed by spec-ifying an irredundant generating set for the symmetric group Sn, along with any transformation of rankn− 1. Such a generating set is obviously irredundant.

We shall now follow the algorithms described in Section 5 to compute the maximal subsemigroups ofthe full transformation monoid Tn. Since the J -classes Jn and Jn−1 are the only J -classes which containgenerators, it follows that there exist maximal subsemigroups arising from each of these J -classes, butnot from any others.

The J -class Jn is maximal and non-trivial. We have seen in Section 5.1 that the maximal subsemi-groups of Tn arising from Jn are in one-to-one correspondence with the maximal subsemigroups of theprincipal factor J∗n which contain the element 0. However, since the J -class Jn is isomorphic to thesymmetric group Sn, the principal factor J∗n is isomorphic to the semigroup formed by adjoining 0 to Sn.Therefore the maximal subsemigroups of J∗n which contain 0 are in one-to-one correspondence with themaximal subgroups of Sn. For each maximal subgroup K of Sn, the corresponding maximal subsemigroupof Tn is the set (Tn \ Jn) ∪K.

We next consider the maximal subsemigroups of the full transformation monoid Tn which arise from theJ -class Jn−1. There do exist maximal subsemigroups arising from this J -class, since Jn−1 contains anelement of the irredundant generating set. Suppose thatM is such a maximal subsemigroup. By definition,the maximal subsemigroupM must contain the maximal J -class of Tn, which is the symmetric group Sn.However, we have stated that a generating set for the full transformation monoid Tn can be specified by Snalong with any element of Jn−1. Therefore the maximal subsemigroupM (being a proper subsemigroup ofTn) can not contain any elements of the J -class Jn−1. We conclude that there is precisely one maximalsubsemigroup arising from the non-maximal J -class Jn−1: the set Tn \ Jn−1.

In conclusion, for n ≥ 2, if we denote the number of maximal subgroups of the symmetric group Snby mn, then there are mn + 1 maximal subsemigroups of the full transformation monoid Tn of degree n.

40

Page 45: Computingthemaximalsubsemigroupsofafinitesemigroupwaw7/files/projects/... · Abstract Wecharacterisethemaximalsubsemigroupsofsomespecialclassesoffinitesemigroup. Thisthen

7.2 Symmetric inverse monoid In

For a number n ∈ N, the symmetric inverse monoid of degree n, In, is the semigroup of all partialpermutations of the set 1, 2, ..., n. As the name would suggest, In is an inverse semigroup, and it isfinite.

The symmetric inverse monoid shares many properties with the full transformation monoid. In partic-ular, the J -class partial order of In is a chain, where two partial permutations are J -equivalent if andonly if they have equal rank. Further, the maximal J -class of In is isomorphic to the symmetric groupSn, and an irredundant generating set is specified by an irredundant generating set for Sn, along with anyelement of rank n− 1.

Therefore, the arguments for the symmetric inverse monoid In proceed exactly as for the full transfor-mation monoid Tn. If mn is the number of maximal subgroups of the symmetric group Sn, then there areprecisely mn + 1 maximal subsemigroups of In, which occur in the same way as do the mn + 1 maximalsubsemigroups of Tn.

7.3 Partition monoid Bn

For a number n ∈ N, let n be the set 1, 2, ..., n and let −n be the set −1,−2, ...,−n. Then the partitionmonoid of degree n is the semigroup of all partitions of the set n ∪ −n. The multiplication of partitionsis somewhat complicated, and is explained in detail Chapter 5 of the documentation for the Semigroupspackage [8]. As a demonstration, let f and g be the following two partitions of degree 6:

1

−1 −2

2 3

−3 −5 −6

4 5 6

−4

1 2 6

−1

3 5

−2

4

−4 −5−3 −6

Figure 7: The partition f (top) and the partition g (bottom). Each is depicted as a graph with vertex setn ∪ −n, where two vertices are in the same connected component if and only if they are contained in thesame part of the partition. Each part is arbitrarily assigned a colour. Their product fg is shown below.These illustrations are produced by the function TikzBipartition in the Semigroups package [8].

1 2 3

−1 −2

4 5 6

−3 −6−4 −5

41

Page 46: Computingthemaximalsubsemigroupsofafinitesemigroupwaw7/files/projects/... · Abstract Wecharacterisethemaximalsubsemigroupsofsomespecialclassesoffinitesemigroup. Thisthen

Recently, the partition monoids have become more widely known and researched. They have some veryinteresting properties - for example, the full transformation monoid, the partial transformation monoid,and the symmetric inverse monoid (all of degree n) can each be embedded in the partition monoid ofdegree n. The partition monoids are an intriguing candidate for further study.

If we define the rank of a partition f to be the number of parts of f which contain elements of bothn and −n, then two partitions f and g in Bn are J -equivalent if and only if they have equal rank.

It can then be shown that, as with the full transformation monoid and the symmetric inverse monoid,the J -class partial order of the partition monoid Bn is a chain, and the maximal J -class (the group ofunits) is isomorphic to the symmetric group Sn. Thus, if we again define mn to be the number of maximalsubgroups of Sn, then there are precisely mn maximal subsemigroups of the partition monoid Bn whicharise from its maximal J -class.

However, these are not the only maximal subsemigroups of Bn. Along with a generating set for thesymmetric group Sn, it can be shown that any generating set for the partition monoid must include twopartitions of rank n − 1. Therefore, there are at least two maximal subsemigroups arising from the J -class of partitions of rank n− 1. We shall call this J -class J . By applying the MaximalSubsemigroups

algorithm (which has been implemented in the Semigroups package [8]) to the partition monoid Bn forsmall values of n, we can be more specific. For these small examples, we find that there are in fact fourmaximal subsemigroups arising from the J -class J . Each maximal subsemigroup is formed by removingeither half of the L -classes or half of the R-classes from the J -class J . Therefore, we may conjecture thatfor all natural numbers n, the partition monoid Bn of degree n has preciselymn+4 maximal subsemigroups.

This is a demonstration of the utility of the algorithms which we have described in this project. Al-though we have not proved that the partition monoid monoid has preciselymn+4 maximal subsemigroups,the algorithm has guided us in this direction, and it has allowed us to make this conjecture. Surely thereare many other interesting examples of finite semigroup for which this approach could be adopted.

42

Page 47: Computingthemaximalsubsemigroupsofafinitesemigroupwaw7/files/projects/... · Abstract Wecharacterisethemaximalsubsemigroupsofsomespecialclassesoffinitesemigroup. Thisthen

References

[1] J. Cannon and D. F. Holt. Computing maximal subgroups of finite groups. Journal of SymbolicComputation, 37(5):589–609, 2004.

[2] A. Distler, C. Jefferson, T. Kelsey, and L. Kotthoff. The semigroups of order 10. In Principles andPractice of Constraint Programming, Lecture Notes in Computer Science, pages 883–899. SpringerBerlin Heidelberg, 2012.

[3] J. East, A. Egri-Nagy, and J. D. Mitchell. On Enumerating Transformation Semigroups. ArXive-prints, March 2014.

[4] B. Eick and A. Hulpke. Computing the maximal subgroups of a permutation group I. Groups andcomputation, III (Columbus, OH, 1999), 8:155–168, 2001.

[5] N. Graham, R. Graham, and J. Rhodes. Maximal Subsemigroups of Finite Semigroups. Journal ofCombinatorial Theory, 4:203–209, 1968.

[6] The GAP Group. GAP – Groups, Algorithms, and Programming, Version 4.7.4, February 2014.http://www.gap-system.org.

[7] J. M. Howie. Fundamentals of Semigroup Theory. Clarendon Press, 1995.

[8] J. D. Mitchell et al. Semigroups - GAP package, Version 2.0, April 2014.http://www-circa.mcs.st-and.ac.uk/~jamesm/semigroups.php.

[9] L. H. Soicher. GRAPE - GAP package, May 2012. http://www.maths.qmul.ac.uk/~leonard/grape/.

43