Quick viewing(Text Mode)

Computing the Maximal Subsemigroups of a Finite Semigroup

Computing the Maximal Subsemigroups of a Finite Semigroup

Computing the maximal subsemigroups of a finite

Wilf Wilson

25th April 2014

1 1

* *

1 2 2 1

* * * *

* *

2 * * 2

* * * * * * * * * *

* * * * * * * * * *

* * * * * * * * * *

3 3 3 3

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

* * * * * * * * * * * * * * * * * * * * * * * * *

* * * * * * * * * * * * * * * * * * * * * *

* * * * * * * * * * * * * * * * * * * * * * * * * * * * *

* * * * * * * * * * * * * * * * * * * * * * * * * * * *

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

* * * * * * * * * * * * * * * * * * * * * * * * * * *

* * * * * * * * * * * * * * * * * * * * * * * * * * * *

* * * * * * * * * * * * * * * * * * * * * * * * * * * * *

4 4 4 4

* * * * * * * * * * * * * * * * * * * *

* * * * * * * * * * * * * * * * * * * *

* * * * * * * * * * * * * * * * * * * *

* * * * * * * * * * * * * * * * * * * *

* * * * * * * * * * * * * * * * * * * *

Semigroup diagrams of the four maximal subsemigroups of the partition monoid of degree 3, B3, which do not arise from maximal of the of units. See Figure1 and Section 7.3 for more details. For Alan, my little brother.

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

Acknowledgements The original mathematics and implementation of the algorithms discussed in this project was part of a group project. The team consisted, at various points, of Casey Donoven, Robert Hancock, Julius Jonuš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 his encouraging supervision.

3 Contents

1 Introduction 1 1.1 Intended readership...... 1 1.2 Motivation and aims...... 1 1.3 Overview of project...... 1 1.4 Notation and conventions ...... 2 1.5 Pre-requisites for understanding...... 2

2 Graham, Graham and Rhodes6 2.1 A correction...... 11

3 Maximal subsemigroups of special classes of finite semigroup 12 3.1 Groups...... 12 3.2 Left-zero, right-zero, and other degenerate semigroups ...... 12 3.3 Commutative semigroups ...... 13 3.4 Commutative bands ...... 13 3.5 Monogenic semigroups...... 14 3.6 0-simple semigroups ...... 15 3.7 Simple semigroups ...... 18 3.8 Regular semigroups...... 19

4 Description of algorithms for Rees 0-matrix semigroups and Rees matrix semigroups 20 4.1 Algorithm for Rees 0-matrix semigroups...... 20 4.2 Algorithm for Rees matrix semigroups ...... 29

5 Description and justification of algorithms for arbitrary semigroups 30 5.1 Compute the maximal subsemigroups which lack a maximal J -class...... 31 5.2 Compute the maximal subsemigroups which lack a non-maximal J -class ...... 33

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

7 Maximal subsemigroups of specific finite semigroups 40 7.1 Full transformation monoid Tn ...... 40 7.2 Symmetric inverse monoid In ...... 41 7.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 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 about arbitrary 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 for arbitrary 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 answer the 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 an advanced undergraduate honours level is required. In particular, we assume that the reader is familiar with all of the topics covered in the module MT5823 Semigroups, which is taught at the University of St 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 the following 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. For example, it allows us to calculate every subsemigroup of a finite semigroup: we first calculate the maximal subsemigroups, then the maximal subsemigroups of those subsemigroups, and so on, until the process necessarily terminates. Since we are not aware of any previously existing algorithm for maximal subsemigroups, by creating a working algorithm, we are providing a useful tool for other researchers in the field. This is also a demonstration of the power and utility of computational ; in particular of the GAP system [6] and the Semigroups package [8] for GAP. We hope the reader will gain a strong understanding of the topic of maximal subsemigroups, and the included 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 finite semigroup. Section2 is particularly technical, and is entirely devoted entirely to presenting and proving the main results of Graham et al., which we will use throughout the rest of this project. Guided by the results of Section2, we describe the maximal subsemigroups of some special classes of finite semigroup in Section3, such as groups (3.1) and monogenic semigroups (3.5). Next, we describe novel and practical algorithms for calculating maximal subsemigroups, for which we provide pseudocode. Section4 contains algorithms to compute the maximal subsemigroups of a finite regular Rees 0-matrix semigroup over a group, and as a consequence, a finite Rees matrix semigroup over a group. We use these algorithms, along with further results from [5], to describe an algorithm to calculate the maximal subsemigroups of an arbitrary finite semigroup in Section5. We briefly comment on these algorithms in Section6, and suggest future improvements.

1 Finally, in Section7, aided by these algorithms, we calculate the maximal subsemigroups of particularly famous 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 not a 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 . To S avoid ambiguity when considering multiple semigroups, we write Ja to denote the J -class of the element 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 hX, x, yi to denote the semigroup hX ∪ {x, y}i.

• 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, ...}. 1 2 3 4 5  • When writing transformations we list only the image; for example, the transformation 4 3 5 1 4 is written as (43514). However, when specifically considering a group of permutations, we write in the usual 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 the notion of regularity. For the rest of this section, we will assume that the semigroup S is finite; although several similar or identical results hold for infinite semigroups, the results proved under this assumption will be sufficient for our purposes. Naturally, we begin by defining the terms maximal subsemigroup and maximal .

Definition 1.1 (Maximal subsemigroup, maximal subgroup). Let M be a subsemigroup of S. Then the subsemigroup M is called maximal if and only if M 6= S, and there are no proper subsemigroups of S properly 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 hM, xi = M or hM, xi = S.

• For all elements x ∈ S \ M: hM, xi = 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 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 subsemigroup of S. Since S has at least one proper subsemigroup, and (as a finite semigroup) has only finitely many subsemigroups, it must have maximal subsemigroups. For a finite semigroup, the relations D and J coincide. Throughout this project, we will most often formulate and prove results for J -classes, however it will be advantageous to remember that a J -class possesses 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), and non-regular otherwise. We note that every finite semigroup contains an idempotent (which is a regular element) and hence contains at least one regular J -class. In particular, the minimal ideal of a finite semigroup is a regular J -class.

It is also assumed that the reader has a familiarity with Rees 0-matrix semigroups and Rees matrix semigroups. 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}). The sandwich matrix P of a Rees 0-matrix semigroup R = M 0[G; I, Λ; P ] is called regular if and only if every row and every column of P contains a non-zero entry; the semigroup R has a regular sandwich matrix 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 I and Λ, 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 index sets 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 proper ideal of S, and S is not the null semigroup of order 2. A finite semigroup is 0-simple if and only if it is isomorphic to a regular Rees 0-matrix semigroup over a group. For a proof of this result, credited to Rees, see Proposition 3.2.1 and Theorem 3.2.3 of [7]. Similarly, a semigroup S is called simple if S has no proper ideals. A finite semigroup is simple if and only if it is isomorphic to a Rees matrix semigroup over a group. This result is credited to Rees and Suschkewitsch, and is stated more generally in Theorem 3.3.1 of [7].

We next define the term principal factor. Let J be a J -class of a finite semigroup S. Define J ∗ to be the set J ∪ {0} (where 0 is an element not in J) and define a multiplication ∗ on J ∗ by: ( xy if x, y, xy ∈ J. x ∗ y = 0 otherwise. Then (J ∗, ∗) is a semigroup, called the principal factor of J. The principal factor J ∗ is either a null semigroup 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 ∗ is a null semigroup (note that a semigroup can not be both 0-simple and null). In particular, the principal factor 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-one correspondence, via the bijection A 7→ ι(A) ∪ {0}. This correspondence obviously preserves inclusions, and will be particularly useful when describing the algorithms in Section5.

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

1 1 Proposition 1.3. Define a relation ≤ on the set of J -classes of S by: Jx ≤ Jy if and only if S xS ⊆ 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) element in this partial order. Clearly, every finite semigroup contains minimal and maximal J -classes. Next we show that given two elements of a semigroup, their product is contained a J -class which is less than the J -class of either element.

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

1 1 1 1 1 1 Proof. S xyS = S x(yS ) ⊆ S xS . 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 J 2 ∩ J = ∅.

Proof. A J -class J is non-regular if and only if the principal factor J ∗ is a null semigroup, which is true if and only if J 2 ∩ 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 and 1 y = sx for some elements s, t ∈ S . 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. 1 Analogously, if x = yt and y = xs for some elements s, t ∈ S , 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 preserve the 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 y is 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 finite semigroup, S is isomorphic to a subsemigroup of some full transformation monoid Tn. Therefore we may consider S to be a semigroup of transformations of a finite set. Since yDxy in S, then yDxy in Tn, and so rank(x) = rank(y). It is always true that im(xy) ⊆ im(y), but since |im(xy)| = |im(y)| < ∞, we conclude that im(xy) = im(y). Therefore yL xy in Tn. Finally, since y is a regular element we have that S Tn Ly = Ly ∩ 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 y is 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 by yx, and “left” is replaced by “right”.

4 We end this section by introducing the diagrams which will be used throughout this project to illustrate examples 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 -classes of S, and the partial order is the usual J -class partial order, defined in Proposition 1.3. The nodes are indexed (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 visualised by its egg-box diagram, and this is how the nodes are displayed. The R-classes of a J -class correspond to 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 a non-group H -class is drawn in white. A group H -class may be labelled with its isomorphism type, but more 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 Figure1.

6 5

C₃ C₃

2 1

3 7

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

Figure 1: The transformation semigroup S = h(4333), (1341), (2214), (2412), (3341), (4142)i. The semi- group S contains four non-regular J -classes: they are all non-maximal and they have index 1, 2, 3, and 7. The remaining four J -classes are regular. There are two which are maximal (those with index 5 and 6); their group H -classes are isomorphic to the cyclic group of order 3. There is the minimal ideal (with index 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 2 Graham, Graham and Rhodes

As mentioned in Section 1.3, the algorithms which appear in the later sections of this project rely on the results contained in Maximal subsemigroups of finite semigroups [5], a paper published in 1968 by the mathematicians N. Graham, R. Graham and J. Rhodes. The paper contains several important results about the relationship between a finite semigroup S and a maximal subsemigroup M of S. In this section, we present these theorems and prove them. We will follow the approach and techniques of Graham et al. but with added exposition, in the hope of making the 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 since M is a proper subsemigroup of S, and S is the union of its J -classes. The set A is also finite (because S is finite), and so we can choose a particular J -class, J, which is minimal amongst those in A. The minimality 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. Since M is a subsemigroup, if xy∈ / M, then either x∈ / M or y∈ / M. Suppose x∈ / M (so x ∈ J). Therefore Jxy ≤ 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 as required.

When talking about the maximal subsemigroup M in the future, we will use the notation J(M) in this sense, to mean the unique J -class of S which M does not contain. We have proved that we are justified in using this notation without ambiguity. Additionally, for a semigroup S and a J -class J of S, we will use the phrase a maximal subsemigroup of S arising from J to mean a maximal subsemigroup M of S such that J(M) = J. Theorem 2.2. The maximal subsemigroup M intersects each H -class of S non-trivially, or M is a union of H -classes of S. Proof. Let J = J(M). Firstly, we define the set M 0 to be the union of all H -classes of S which intersect non-trivially with M. Clearly M 0 contains the maximal subsemigroup M. We will show that the set M 0 is in fact a subsemigroup of S. To that end let x and y be elements of M 0. By definition, both x and y are 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 0 and we are done. Otherwise the product xy ∈ S \ M, and since M is a subsemigroup, at least one of x and y is in S \ M. In particular, by Theorem 2.1, xy ∈ J, and at least 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 by x maps Hy bijectively onto Hxy. Since t ∈ Hy, we have that xyH xt. However both x and t are elements of M, meaning that xt ∈ M; thus xy ∈ M 0. 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 -class J, we conclude by Lemma 1.5 that J is regular. Therefore the principal factor J ∗ is 0-simple. The relation H is a congruence on a 0-simple semigroup, and so since xH s and yH t, it follows that xyH st. Since the element st ∈ M, we conclude that xy ∈ M 0. In all cases, xy ∈ M 0. Since M 0 is a subsemigroup of the semigroup S containing the maximal subsemigroup M, then either M 0 = M, in which case M is a union of H -classes, or else M 0 = S, and M intersects every H -class of S non-trivially.

6 Theorem 2.4 provides more detail about the ways in which a maximal subsemigroup M can contain or intersect H -classes of the J -class J(M). However, we first prove a result which applies when the J -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 element y ∈ M. Since xJ y, there exist elements s, t ∈ S1 such that x = syt. Suppose that s ∈ J. Then since J is 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 M 1, and so y ∈ M implies 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, it contains 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) is regular, but nevertheless the intersection J(M) ∩ M is empty. (for example, the maximal subsemigroups of a commutative band, as seen in Section 3.4, or a particular maximal subsemigroup of Tn, as seen in Section 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 the J -class J(M). Theorem 2.4. Let J = J(M). If the intersect J ∩ M is non-empty, then two cases arise, depending on whether the maximal subsemigroup M is a union of H -classes of S, or whether M intersects each H -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 an isomorphism π : 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:

0 0 (a) [(I \ I ) × G × Λ] ∪ {0}, where ∅= 6 I ( I (i.e. M lacks some R-classes of J -class J), 0 0 (b) [I × G × (Λ \ Λ )] ∪ {0}, where ∅= 6 Λ ( Λ (i.e. M lacks some L -classes of the J -class J), 0 0 0 0 (c) [(I × G × Λ) \ (I × G × Λ )] ∪ {0}, where ∅= 6 I ( I and ∅= 6 Λ ⊆ Λ (i.e. M lacks a rectangle of 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 regular Rees 0-matrix semigroup R = M 0[G; I, Λ; P ], where G is a group. Let φ be an isomorphism from J ∗ to R. 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 subsemigroup of R, and by our initial assumption, T intersects every H -class of R non-trivially. Before we continue, we must 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 λ.

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

7 • 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 subgroup of Hiλ. So, suppose that Hiλ is a group, and let x, y ∈ Miλ = Hiλ ∩ T . Since the H -class Hiλ is a group 2 we have that Hiλ ∩ Hiλ = Hiλ, from which it follows that xy ∈ Hiλ. In addition, T is a subsemigroup, and so 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 has the same cardinality. Since the semigroup R is regular, we can select a fixed non-zero group H -class of R, Hjµ. In particular the matrix entry pµj is non-zero, and therefore the function φ : Hjµ → G given by (j, g, µ)φ = pµjg is an isomorphism. Furthermore, since Mjµ is a subgroup of Hjµ, then (Mjµ)φ is a subgroup of G. If we define K to be the subgroup (Mjµ)φ of G, then we see that pµjXjµ = K. (Note that −1 Xjµ = pµ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 element of Xjλ. Define elements t1 = (i, xi, µ) ∈ T and t2 = (j, yλ, λ) ∈ T . If we note that t1Mjµt2 ⊆ T (since T is a semigroup), then we see that:

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

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

= (i, xiKpµjyλ, λ) (1)

⊆ T ∩ Hiλ

= Miλ.

By Green’s Lemma (Theorem 1.7), left multiplication by the element t1 and right multiplication by the 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, Equation1 tells us that Mjµ 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|.

Equation1 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-zero H -class of R, and further, that it intersects every non-zero group H -class of R as a subgroup, as is required by the theorem. We are now ready to create an isomorphism ψ such that T ψ has the desired form. 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 Λ × I matrix over G ∪ {0} with entries: qλi = hλpλixi. Now, define a mapping ψ : R → M 0[G; I, Λ; Q] by:

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

8 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:

−1 −1 −1 −1 (aψ)(bψ) = (i, xi ghλ , λ)(k, xk fhν , ν) −1 −1 −1 −1 = (i, xi ghλ qλkxk fhν , ν) −1 −1 −1 −1 = (i, xi ghλ hλpλkxkxk fhν , ν) −1 −1 = (i, xi gpλkfhν , ν) = (i, gpλkf, ν)ψ = (ab)ψ.

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

−1 −1 Miλψ = (i, xi Xiλhλ , λ) = (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 λ ∈ Λ and 2 i ∈ I and suppose that qλi 6= 0. Since T ψ is a semigroup, the element (i, 1, λ) = (i, qλi, λ) ∈ T ψ. By the form of T ψ, we see that qλi ∈ K. It is instructive to note that therefore T ψ is in fact equal to the semigroup M 0[K; I, Λ; Q]. To complete our argument, we would like to show that (M ∩J)∗ is a maximal subsemigroup of the principal factor 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; it remains to show that K is maximal. To that end, suppose that F is a subgroup of G such that K ≤ F ≤ G. Define U ∗ to be the subset ((I × F × Λ) ∪ {0})π−1 ⊆ J ∗, and let U be the corresponding subset of J. Since M 0[F ; I, Λ; Q] is a semigroup (because the matrix Q is over K ∪ {0} ⊆ F ∪ {0}) it follows that the subset U ∗ is a subsemigroup of the principal factor J ∗. Define M 0 to be the subset M ∪ U of the semigroup S. We will show that the subset M 0 is a subsemigroup of S. Let x, y ∈ M 0. 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 that xy ∈ 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 an element of M: we have shown above that M intersects every group H -class of J as a subgroup; so in particular, 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 that J = Jxy = Jxey ≤ Jey J, a contradiction. We conclude that Jey = J, i.e. ey ∈ J. In sum, we have shown 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 definition of multiplication in the principal factor and recalling that U ∗ is a subsemigroup of the principal factor, it 0 follows 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 0 is a subsemigroup of S. We have shown that M ≤ M 0 ≤ S. Since M is a maximal subsemigroup, either M 0 = M, in which case F = K; or M 0 = 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 subsemigroup M is a union of H -classes with with non-empty intersection with the J -class J.

9 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 of ∗ ∗ non-zero L -classes of J . We denote a non-zero R-class of J by Ri (for i ∈ I), and we denote a non-zero ∗ L -class of J by Lλ (for λ ∈ Λ). Let Hiλ = Ri ∩ Lλ be the H -class of M in row i and column λ. 0 0 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 I0 and Λ0 are non-empty, since M does not contain the J -class J. 0 1 Let i ∈ I , and define T the be the subset (M) Ri ∪ M of S. We shall show that T is in fact equal to the 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.9 rmRr, 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 the 1 product mr, where m ∈ M and r ∈ Ri. Therefore xy = (xm)r ∈ MRi ⊆ T .

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

1 3. Otherwise x, y∈ / M. Then x = m1r1, and y = m2r2 for m1, m2 ∈ M , and r1, r2 ∈ Ri. Note that r1m2 ∈ RiM ⊆ Ri ∪ M by Equation2.

• 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 using 1 Corollary 1.9, that r1m2r2Rr1m2, i.e. r1m2r2 ∈ Ri. Therefore xy = m1(r1m2r2) ∈ M Ri ⊆ T .

Since the R-class Ri is not contained in the subsemigroup M, the semigroup T properly contains M 1 0 by its definition. Since M is maximal, we conclude that S = T = (M) Ri ∪ M for all indices i ∈ I . We shall now investigate the relationship between the R-classes which the maximal subsemigroup M 0 1 1 does not contain. Let i, j ∈ I . Since S = (M) Ri ∪ M, if it were the case that (M) Ri ∩ Rj = ∅, then Rj 1 would have to be contained within M, contradicting the choice of j. Therefore (M) Ri ∩ Rj 6= ∅, and so 1 there exists m ∈ M such that mRi ∩ Rj 6= ∅. By Green’s Lemma (Theorem 1.8) we conclude that in fact mRi = Rj, and moreover mHiλ = Hjλ for all λ ∈ Λ. Very similar arguments hold for L -classes, and so we conclude analogously that for all indices λ, µ ∈ Λ0, 1 there exists m ∈ M such that for Hiλm = Hiµ for all i ∈ I.

Now suppose that i ∈ I0 and λ ∈ Λ0. Since the maximal subsemigroup M is a union of H -classes of S, 0 either Hiλ ⊆ M or Hiλ ∩ M = ∅. If Hiλ ⊆ M, then by the previous paragraphs, for each j ∈ I there 1 exists mj ∈ M 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 -class 0 0 Hiλ 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 λ ∈ Λ:

0 0 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 semigroup M 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 0 0 • If Λ = Λ, then for each i ∈ I , M ∩ Ri = ∅ by Equation3. Therefore M lacks the R-classes indexed by I0, and so (M ∩ J)∗π has form (a).

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

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

Remark 2.6. It can not be the case that both Λ0 = Λ and I0 = I, for then J ∩ M = ∅, contradicting our assumption that J ∩ M 6= ∅. Also, recall that we have previously argued that I0 and Λ0 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 so we will provide a correction. Let R = M 0[G; I, Λ; P ] be a finite regular Rees 0-matrix semigroup over a group G, and let M be a maximal subsemigroup of R such that J(M) = R \{0}. Then the following is asserted: M ∩ J(M) = ∅ if and only if R \{0} is a simple . 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 of M, it follows that R = hM, ei = {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}. Since M is a proper subsemigroup of R, and M contains {0}, we have that e∈ / M. Thus, M ∩ J(M) = ∅, as required.

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 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 be no need for the paper described in Section2. Of course, this is not the case, and many semigroups can exhibit peculiar maximal subsemigroups. However there do exist some classes of semigroup whose maximal subsemigroups are somewhat straightforward to characterise. For the following results, we proceed either in an elementary way, or by making use of the tools we have developed in Section2.

3.1 Groups Naturally, we begin by considering the maximal subsemigroups of a group. The maximal subsemigroups of 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 of G. We must also show that the subset H is closed under inversion. Let a ∈ H. Then the element ai in contained in H for all i ∈ N. Since the group G is finite, the element a is of finite order n. If n = 1, then the element a is the identity, its own inverse. Otherwise n > 1, and from an−1a = 1 = aan−1, it follows that 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 GAP system [6], and is available as the MaximalSubgroups function. The computation of maximal subgroups of 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 of integers 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 hN0, zi equals the group Z. Clearly hN0, zi ⊆ 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) ∈ hN0, zi. Therefore N0 is a non-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 any proper subsemigroups, they must be maximal. Since any proper subsemigroup lacking more than one element must be contained in such a subsemigroup, these are the only ones.

Example 3.4. The maximal subsemigroups of the semigroup (N, ∗) (with multiplication m∗n = Min{m, 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 are special types of rectangular band. They are distinguished by their multiplication: for any elements x and y of the semigroup, the product xy = x for left-zero semigroups, and the product xy = y for right-zero semigroups. 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 Corollary 3.6. Let S be a left-zero semigroup, and let A be a non-empty subset of S. Then A is a maximal subsemigroup 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-zero and 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 form S \{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 elements x, y ∈ S, the products xy and yx are equal. There is one property of commutative semigroups which is particularly 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. The equivalences are now obvious.

This lemma allows us to refine the theorems from Section2, 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 a maximal 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 element is 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 becomes a partially ordered set in which every pair of elements has a greatest lower bound. The product of two elements 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 y covers 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 of idempotents, it follows that every H -class of the band B is trivial. Further, Theorem 3.9 implies that a maximal subsemigroup of B lacks just one H -class of B, and so any maximal subsemigroup of B lacks a single element. It is now a straightforward matter to describe the maximal subsemigroups of the commutative band B. For an element x ∈ B, the subset B \{x} is a subsemigroup of B (and hence a maximal subsemigroup of B) if and only if x is not the greatest lower bound of any pair of any elements in B \{x}. These are precisely the maximal elements of the partially ordered set, and those elements x which are covered by a single element.

13 3.5 Monogenic semigroups A semigroup S is called monogenic if there exists an element a ∈ S such that hai = S. Note that a monogenic semigroup is commutative.

A finite monogenic semigroup is uniquely specified by its index m ∈ N and period r ∈ N, and it has 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 partial order (and hence, the minimal ideal). Note that if the index m = 1, then the semigroup S is a group, and so 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 = hai, the order relation ≤ is total on the J -classes of S.

m n Proof. Let x, y ∈ S, so that x = a , y = a for some m, n ∈ N. If m = n, then Jx = Jy. Otherwise, n−m 1 1 1 1 1 1 if m n, then y = 1 ∗ x ∗ a ∈ S xS . Therefore S yS ⊆ S xS , and Jy ≤ Jx. By a symmetrical argument 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, the element an lies in a singleton J -class, since the ideal S1anS1 = {an, an+1, ..., am, ...am+r−1} is uniquely determined by the number n. Therefore a finite monogenic semigroup consists of a chain of singleton J -classes, followed by the minimal ideal, which is a cyclic group. As a proper subsemigroup, no maximal subsemigroup can contain the element a, since a generates the semigroup S. Hence by Theorem 2.1, any maximal subsemigroup of S 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 the set M = S \{a} = {a2, a3, ..., am, ..., am+r−1} is in fact the principal ideal generated by a2 it follows that a non-group finite monogenic semigroup S = hai has precisely one maximal subsemigroup: S \{a}.

1

(231345)

2 2

(312134) (312134)

3 3

(123213) (123213) (213321) (213321) (312132) (312132)

Semigroup: A Semigroup: B

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

14 Remark 3.13. The set M = {2, 3, 4, ...} is a subsemigroup of the infinite monogenic semigroup (N, +) = h1i; it is maximal since it lacks only one element. Any other proper subsemigroup of N also lacks the element 1, and is hence contained in M. Therefore M is the only maximal subsemigroup of N. Note that any n infinite monogenic semigroup is isomorphic to N by the isomorphism a 7→ n. Inspired by the previous remark, it is left as an exercise for the reader to show that for a non-empty set 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 Rees 0-matrix semigroup over a group. Therefore, to describe all maximal subsemigroups of a finite 0-simple semigroup, it suffices to consider an isomorphic Rees 0-matrix semigroup. To that end, assume that R = 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 maximal subsemigroup of R lacking the J -class {0}, then obviously M = R \{0}. This case will arise if and only if the maximal J -class of R is a subsemigroup, which occurs if and only if every entry of the sandwich matrix P is non-empty. Any other maximal subsemigroup must arise by removing part of the maximal J -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 set R \{0} is a trivial group, which is true if and only if R has order 2. In this case, the set {0} is the only maximal subsemigroup arising from the J -class J. If |R| ≥ 3, then this is not the case, and any maximal subsemigroup of R arising from the maximal J -class J has non-trivial intersection with J. Therefore we may apply the results of Theorem 2.4. Let M be a maximal subsemigroup of R which does not contain J, but which has non-trivial intersection with J. By the proof of Theorem 2.4 we saw that if the maximal subsemigroup M intersects each H -class of R non-trivially, then there exists some maximal subgroup K of G and some sandwich matrix Q (over K ∪ {0}) such that R =∼ M 0[G; I, Λ; Q] and M =∼ M 0[K; I, Λ; Q]. Otherwise, the maximal subsemigroup M is a union of H -classes of R, and so by Theorem 2.4, it is formed either by removing L -classes from the 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 about those maximal subsemigroups of R which are formed by removing L -classes, R-classes or rectangles of H -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, the subset 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 let x and y be two elements of T . If xy = 0, then xy ∈ T . Otherwise x = (j, g, λ), y = (k, h, µ) ∈ T (note that 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 of R. Recall that the rows of a Rees 0-matrix semigroup correspond to its R-classes, indexed by I, and the columns correspond to its L -classes, indexed by Λ. Lemma 3.14 tells us that no maximal subsemigroup arising from J can lack multiple rows of R; if a subsemigroup did lack multiple rows, it would be properly contained in a proper subsemigroup lacking a fewer number of rows. The previous sentence also holds when considering columns of R. We may now state precisely which of these subsemigroups T are maximal:

15 Theorem 3.15. Let R = M 0[G; I, Λ; P ] be a regular Rees 0-matrix semigroup such that |I| ≥ 2. Let i ∈ I, and let T = R \ ({i} × G × Λ) be the subsemigroup formed by removing row i from R. Then T is a maximal 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 show that hT, xi = R. Let y ∈ R \ T , so that y = (i, h, µ). Then since T is regular, there exists a non-zero entry −1 −1 pλj in row λ and column j 6= i of the matrix P . Therefore y = (i, h, µ) = (i, g, λ)(j, pλj g h, µ) ∈ hT, xi. (⇒) 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 every H -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 is non-zero, but pλj = 0 for all j ∈ I \{i}. This allows us to form another subsemigroup of R by adjoining the 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 a proper 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 removing the 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 Analogously, if R = M 0[G; I, Λ; P ] is a regular Rees 0-matrix semigroup such that |Λ| ≥ 2, then for an 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 are precisely those formed by removing a single permissible row or column from R. Note that if R has only one row, then the subsemigroup formed by removing that row equals the set {0}; we have seen that this subsemigroup 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, how do we describe the maximal subsemigroups in which they are contained? The answer to that question is found by considering the final case of Theorem 2.4. In this case, a maximal subsemigroup M lacks a rectangle of H -classes of J (but M does not lack a whole row or column of J). That is, M = R\(I0×G×Λ0), 0 0 where ∅= 6 I ( I and ∅ 6= Λ ( Λ. We will show that such maximal subsemigroups arise from special rectangles 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 ⊆ I and Λ# ⊆ Λ are non-empty subsets of the index sets of R.A rectangle of non-group H -classes is such a rectangle which contains no group H -classes of J, and a rectangle of non-group H -classes A is called maximal if A is not properly contained in any other such rectangle. Note that for a rectangle of non-group H -classes, the subsets I# and Λ# must be proper subsets, since every row and column of J contains at least one group H -class (the semigroup R is regular). We demonstrate with an example in Figure3.

* * * * * * * * *

* * *

* * * * * * * * * * * *

* * * * * * * * * * * *

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

0 Proof. (⇒) Suppose that some H -class Hiλ ∈ A is a group. Then pλi 6= 0. Choose any indices j ∈ I and 0 µ ∈ Λ . Then the elements (j, 1, λ) and (i, 1, µ) are in T , but their product (j, 1, λ)(i, 1, µ) = (j, pλi, µ) is not 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. Assume that we can add a row; if we must add a column, the result follows similarly. Therefore there exists an index i ∈ I0 such that the sets (I# ∪ {i}) and Λ# form a larger rectangle of non-group H -classes. Note that because R is a regular semigroup, the set (I# ∪ {i}) 6= I (as no rectangle of non-group H -classes can contain an entire row) and so I0 \{i}= 6 ∅. Let U = R \ ((I0 \{i}) × G × Λ0) = T ∪ ({i} × G × Λ0). We will show that U is a semigroup. For x, 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, then xy ∈ T . Therefore U is a subsemigroup of R. Note that U 6= R, since I0 \{i}= 6 ∅. Thus we contradict the maximality of T . Therefore A is a maximal rectangle.

(⇐) Let x ∈ R\T be arbitrary. We will show that the subsemigroup hT, xi = R. Obviously hT, xi ⊆ R, and T ⊆ hT, xi. It remains to show that R\T ⊆ hT, xi. So let y ∈ R\T . Then x = (i, g, λ) and y = (j, h, µ) for some indices i, j ∈ I0, λ, µ ∈ Λ0, 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 λ, −1 −1 a contradiction). In particular, pγi 6= 0 and pλk 6= 0. Defining the elements a = (j, g pγi , γ) ∈ T and −1 b = (k, pλk h, µ) ∈ T , we see that y = axb ∈ hT, xi. Therefore T is maximal. Having considering all possible forms, this classifies all maximal subsemigroups of a finite regular Rees 0-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 matrix semigroup over a group. Like with finite 0-simple semigroups, to describe the maximal subsemigroups of a finite 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 matrix semigroup can be thought of as a Rees 0-matrix semigroup in which every matrix entry is non-zero, and from which the zero element has been removed. We can therefore repeat our arguments from the previous section which related to the maximal J -class, with the added assumption that every matrix entry is non-zero (equivalently, that every H -class is a group). We then find that the maximal subsemigroups of R are precisely those subsemigroups which are:

• Isomorphic to a Rees matrix semigroup M [K; I, Λ; Q] for some maximal subgroup K of G and for some 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 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 matrix semigroup over the trivial group. Since the trivial group has no maximal subgroups, there are no maximal subsemigroups of B which intersect every H -class. Therefore, if both m > 1 and n > 1, then by the above arguments, the rectangular band B has precisely m + n maximal subsemigroups, which are formed by removing any single L -class or R-class. If m = n = 1, then B is the trivial semigroup, with no maximal subsemigroups. Otherwise, if m = 1 or n = 1, then the rectangular band B is either a right-zero semigroup 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 semigroups and groups. However, we saw in Theorem 2.3 that non-regular J -classes are the easiest to understand when 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 of semigroup, can exhibit maximal subsemigroups with extremely complicated behaviour. There is very little we can say a priori about the type or even number of maximal subsemigroups which an arbitrary regular semigroup possesses. This suggests that our task to create an algorithm to compute the maximal subsemigroups of an arbitrary finite semigroup is inherently rather difficult.

19 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 regular Rees 0-matrix semigroup over a group, having already proved many useful results in Section 3.6. In several of the cases which arise, it remains to apply the results in the obvious way. Once we have described these algorithms, an algorithm for computing the maximal subsemigroups of a finite Rees matrix semigroup over 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, we learned the precise form of each maximal subsemigroup of R, and for many of these forms, we know exactly when such maximal subsemigroups occur. However, we must describe exactly how to calculate all of 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 every element of the sandwich matrix P is non-zero. An algorithm to find this type of maximal subsemigroup would simply search the sandwich matrix P for non-zero entries, and return the maximal subsemigroup R \{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 subsemigroup of 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 of the 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 subsemigroup M of R which intersects every H -class of R non-trivially a maximal subsemigroup of ‘maximal subgroup’-type. By the proof of Theorem 2.4 (Case 1), for such a maximal subsemigroup M there is a maximal subgroup K of G and a sandwich matrix Q (with entries from K ∪ {0}) such that R =∼ M 0[G; I, Λ; Q] and M =∼ M 0[K; I, Λ; Q]. However, the set of elements of M does not necessarily equal (I × K × Λ) ∪ {0}, as we 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 subsemigroup M is regular, since both can 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 that M =∼ 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 h(12)i = {1G, (12)}, let I = Λ = {1, 2}, and define the sandwich 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 is ∼ 0 isomorphic to K. Theorem 2.4 thus implies that U = M [K; I, Λ; Q] (where Q is the all-1G sandwich matrix). However, U is clearly not equal to the set (I × K × Λ) ∪ {0}.

20 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 a Rees 0-matrix semigroup. To do this we define a graph, B. Let the graph B have vertex set I ∪ Λ (which we assume to be a disjoint union), and let two vertices i ∈ I and λ ∈ Λ be adjacent if and only if Hiλ is a group. Every vertex is adjacent to at least one other vertex, since the sandwich matrix P is regular. Then the 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 of the graph B. The Rees 0-matrix semigroup T from Example 4.2 has one connected component, and the Rees 0-matrix semigroup from Example 4.3 has two. Further, we note that the vertices of a connected 0 component induce a rectangle of H -classes. If the vertices of a connected component are I = {i1, i3} 0 0 0 and Λ = {λ2}, then they induce the rectangle of H -classes A = {Hiλ : i ∈ I , λ ∈ Λ }. We call such a rectangle a component rectangle. Then we say that two H -classes Hiλ and Hjµ are in the same connected component if the H -classes all lie in the same component rectangle, or equivalently if i, j, λ, and µ lie in the same connected component of B. Note that distinct component rectangles are disjoint, and that every group H -class is contained in some 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 h(12)i, and where the sandwich matrix P is given by:   1G (12) 0 0 0  0 (12) 1G 0 0     0 0 (12) 0 0     0 0 0 1G 1G 0 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 corresponds to the component rectangle A2 = {Hiλ : i ∈ I2, λ ∈ Λ2}. These rectangles are illustrated below, by highlighting the relevant H -classes in the egg-box diagram:

21 Λ₁ Λ₂

* * *

* * I₁ * * * *

* * * * * *

* * * * * * I₂ * * *

The maximal J-class of T Component rectangle A₁ Component rectangle A₂

In a casual sense, the elements of H -classes contained in distinct component rectangles are somewhat independent of each other, since multiplication within a Rees 0-matrix semigroup can not take elements from one component to the other. We shall see that the greater the number of connected components of a 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 any maximal subsemigroup of ‘maximal subgroup’-type must have a specific kind of generating set. The algorithm will then calculate all of these possible generating sets, calculate the subsemigroups of R which they 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 be contained 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 M be a maximal subsemigroup of R such that M =∼ M 0[K; I, Λ; Q] for some maximal subgroup K of G and sandwich matrix Q. Then every non-zero group H -class Hiλ of M is of the form:

−1 Hiλ = {(i, kpλ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. −1 However, the H -class Hiλ is the set {(i, g, λ): g ∈ X} = {(i, gpλi , λ): g ∈ Xpλi}, so if we put ∼ K1 = Xpλi = K, we are done. Since the identity element is in any subgroup of G, we conclude that every maximal subsemigroup M −1 of R of ‘maximal subgroup’-type contains the elements E = {(i, pλi , λ): pλi 6= 0} ∪ {0} (that is, the set of idempotents of R). Therefore hEi ⊆ M. Let Hiλ be a fixed group H -class of the maximal subsemigroup M. Suppose that the H -class Hiµ is also a group. Then since Hiµ in the same R-class as Hiλ, we can use Green’s Lemma (Theorem 1.7) to −1 see that Hiµ = Hiλ(i, pµi , µ). Likewise, if Hjλ is a group H -class in the L -class of Hiλ, then we have

22 −1 that Hjλ = (j, pλj , λ)Hiλ. Continuing in this way, we see that once the elements of one group H -class are known (call it H), then left- and right-translation by the relevant idempotents maps H onto all other group 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 the elements 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 j and µ 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 of k adjacency in B, the H -class Hikλk is a group. Furthermore, for each index k < n, the vertices λ and k+1 i are adjacent, which implies that the matrix entry pλkik+1 is non-zero. Therefore, we can realise the non-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 -class in the same component rectangle as Hiλ, then Hjµ ⊆ hE,Hiλi ≤ M. Remark 4.5. Note that by almost identical arguments, we see that the idempotent generated subsemigroup hEi 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 single component 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 generators to 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 the component 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 -class from the semigroup T , in Example 4.3 (with k = n = 2):

Λ₂ Λ₁

* *

I₁ * * * *

* * * *

* * * * I₂ * *

Rectangle C₁.₂ Rectangle C₂.₁

23 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 group H -class Hjµ of the component rectangle Ak.

We will show that C1,k ⊆ hE,Hiλ, xi:

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

• Let Hlµ be any H -class of C1,k in the same column as Hiµ. Then since Hlλ is in the component rectangle A1, it is contained in hE,Hiλ, xi. Therefore Hlµ = HlλHiµ ⊆ hE,Hiλ, xi.

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

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

Hjµ = yHiλx ∈ hE,Hiλ, x, yi.

Since the subsemigroup hE,Hiλ, x, yi contains one group H -class of the component rectangle Ak, it follows (by the same reasoning as for the first component) that it contains every H -class of the component rectangle Ak. In this way, we have shown that the set {E,Hiλ, x, y} generates every element of the the component rectangles A1 and Ak, and the rectangles C1,k and Ck,1. For every component rectangle Ak (for 2 ≤ k ≤ n) of M let us choose an element xk from the rectangle C1,k and an element yk from the rectangle Ck,1. We have shown that A1 ⊆ hE,Hiλi, and that for each index k ∈ {2, ..., n} the rectangles Ak,C1,k,Ck,1 are contained in the subsemigroup hE,Hiλ, xk, yki. If we define U = hE,Hiλ, x2, y2, ..., xn, yni, then every component rectangle Ak and every rectangle C1,k and Ck,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,k and 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 for l ∈ {1, ..., k−1}, the rectangles Cl,k and Ck,l are contained in U. We will show the first of these; the second follows 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 that Hjµ = HjλHiµ ⊆ U. Since Hjµ ∈ Cl,k was arbitrary, we conclude that Cl,k ⊆ U. By induction, the result is proved. Therefore, we have proved that:

M = hE,Hiλ, x2, y2, ..., xn, yni. (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 will prove that the subsemigroup of R generated by such a set is either a maximal subsemigroup, or is equal to R. Having done this, an algorithm can construct these generating sets, and discard those which generate the whole of R. Again, we define n to be the number of connected components of R, and we ask the question: how many possible generating sets are there? U Let U = hE,Hiλ, x2, y2, ..., xn, yni 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 U R • By Lemma 4.4, the H -class Hiλ ⊆ Hiλ of a maximal subsemigroup of R is determined by the U −1 choice of a maximal subgroup K of G. Specifically Hiλ = {(i, kpλi , λ): k ∈ K}, which we write as −1 (i, Kpλi , λ). There are as many choices here as there are maximal subgroups of G. U • It remains to show, given the set E and the H -class Hiλ, 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 element U from the rectangle C1,k ∩ U in row i; say that we choose it to be in some column µ, so that xk ∈ Hiµ. 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. In U particular, yk ∈ Hjλ. 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- 0 0 semigroup U. To this end, suppose that xk = (i, g, µ) and xk = (i, g , µ) are two elements chosen from the R H -class Hiµ. Then:

U U 0 −1 −1 0 Hiλx = Hiλx ⇔ (i, Kpλi , λ)(i, g, µ) = (i, Kpλi , λ)(i, g , µ) ⇔ Kp−1p g = Kp−1p g0 λi λi λi λi (5) ⇔ Kg = Kg0 ⇔ g and g0 are in the same right coset of K.

0 0 Therefore, to give rise to different subsemigroups of R, the group elements g and g of xk and xk must be contained in different right cosets of the maximal subgroup K ≤ G. Similarly, if yk = (j, h, λ) and 0 0 0 yk = (j, h , λ) give rise to different subsemigroups of R, then the group elements hpλi and h pλi must be contained 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. U U −1 U By Green’s Lemma, it follows that xkHjλ = Hiλ = (i, Kpλi , λ). Certainly, since yk ∈ Hjλ, we have −1 −1 that xkyk = (i, gpµjh, λ) ∈ (i, Kpλi , λ). In particular, gpµjh ∈ Kpλi , which we may rearrange to show −1 −1 −1 that hpλi ∈ pµj g K. 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 Equation5). −1 −1 Thus, once the generator xk has been chosen, we may assume that yk = (j, pµj g pλi, λ).

In sum, if the number of connected components of R is n, then for each maximal subgroup K of G, there are 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 Equation4, then either hXi = R, or hXi is a maximal subsemigroup of ‘maximal subgroup’-type. Suppose X is such a generating set arising from the maximal subgroup K of G. Clearly hXi is a subsemigroup of R which intersects every H -class of R, and each H -class contains at least |K| elements, by construction. Assume that hXi is not a maximal subsemigroup. In order to reach a contradiction, assume that hXi= 6 R. As a proper subsemigroup, hXi is properly contained in a maximal subsemigroup M 0 of R. Since the subsemigroup hXi intersects every H -class of R non-trivially, so does the maximal subsemigroup M 0. Therefore M 0 is a maximal subsemigroup of ‘maximal subgroup’-type: where the relevant maximal subgroup is some K0 0 such that K K G. This contradicts the maximality of the subgroup K. Therefore hXi = R. Finally, pseudocode for an algorithm which uses these ideas is included as Algorithm4. 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 this graph.

25 Algorithm 1 Compute the maximal subsemigroups of ‘maximal subgroup’-type Input: 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] −1 3: E := {0} ∪ {(j, pµj , µ): j ∈ I, µ ∈ Λ, pµj 6= 0};[create E, the set of idempotents of R] 4: for each maximal subgroup K of G do −1 5: X := {(i, kpλi , λ): k ∈ K};[populate the elements of the fixed group H -class] 6: U := hX,Ei; 7: Ω ← Ω ∪ NonGroupRecursion(U, 0, 0, 1);[find maximal subsemigroups with recursive function] 8: end for 9: function NonGroupRecursion(U, x, y, k) 10: U := hU, x, yi;[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 then th 13: Fix arbitrary j ∈ (Ck+1 ∩ I), µ ∈ nbhd(j);[fix a group H -class in the (k + 1) component] 14: for each right coset Kz of K in G do [attempt each possible choice] −1 −1 −1 15: x := (i, z, µ), y := (j, pµj z pλi , λ);[choose the generators for next component] 16: Γ ← Γ ∪ NonGroupRecursion(U, x, y, k + 1); [continue to next component] 17: end for 18: else 19: Γ ← Γ ∪ {U};[U is a maximal subsemigroup of R] 20: end if 21: end if 22: return Γ. 23: end function 24: return Ω.

26 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 which lack a single row or column (R-class or L -class) of R. By Theorem 3.15, we can remove a row from the Rees 0-matrix semigroup R if and only if R has at least 2 rows, and removing the corresponding column from the sandwich matrix P leaves a regular matrix P 0; and likewise we can remove a column from R if and only if R has at least 2 columns, and removing the corresponding row from the sandwich matrix P leaves a regular matrix P 0. We provide pseudocode for such a computation in Algorithm2.

Algorithm 2 Compute the maximal subsemigroups which lack a row or column Input: 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 do 2: 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 if 6: 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 for 11: return Ω.

4.1.3 Compute maximal subsemigroups which lack the complement of a maximal rectangle of 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 lacks a rectangle of H -classes of R. We learned in Theorem 3.17 that for this case, our problem is reduced to computing 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 we assume to be a disjoint union, and let two vertices i ∈ I and λ ∈ Λ be adjacent if and only if the H -class Hiλ is not a group (or equivalently, if and only if the matrix entry pλi = 0). These adjacencies are trivial to compute, by looking at the sandwich matrix P . See Figure5 for an example of such a graph. We shall call 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 correspondence with the complete bipartite subgraphs B.

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

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

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

27 λ₁ λ₂ λ₃ λ₄ λ₁ λ₂ λ₃ λ₄

i₁ * * i₁ * *

i₂ * i₂ *

i₃ * i₃ *

Egg-box diagram Maximal rectangle

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 Figure4.

i1 i2 i3

λ1 λ2 λ3 λ4

Figure 6: Shown in blue is the complete bipartite subgraph of B which corresponds to maximal rectangle from Figure4.

Conversely, a complete bipartite subgraph C of the graph B contains vertices in both index sets I and Λ, say I0 ⊆ I and Λ0 ⊆ Λ. By definition of their adjacency in the graph B, if i ∈ I0 and λ ∈ Λ0, then the H -class Hiλ is not a group. Therefore, each complete bipartite subgraph of the graph B induces a unique rectangle of non-group H -classes of R, namely that indexed by I0 and Λ0, which is obviously maximal. In conclusion, the hard work has been translated into calculating the complete bipartite subgraphs of the graph B. Given the graph B and the set of complete bipartite subgraphs of B, pseudocode to calculate the maximal subsemigroups of the Rees 0-matrix semigroup R which lack a rectangle of H -classes of R is included as Algorithm3. The GRAPE package [9] for GAP [6] is capable of constructing graphs of the type required here, and is capable of computing the complete subgraphs of graphs. For the working implementation in the Semigroups package [8], we rely on the function CompleteSubgraphs in the GRAPE package to perform these calculations. Therefore, Algorithm3 is indeed practical.

28 Algorithm 3 Compute the maximal subsemigroups of a regular Rees 0-matrix semigroup which lack a rectangle of H -classes Input: 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 do # # 2: I := Vi ∩ I, Λ := Vi ∩ Λ;[calculate the vertices of I and Λ contained in Bi] 3: I0 := I \ I#, Λ0 := Λ \ Λ#;[calculate the complement rectangle of I# × Λ#] 4: M := R \ (I0 × G × Λ0);[create the maximal subsemigroup of R formed by removing this rectangle] 5: Ω ← Ω ∪ {M}; 6: end for 7: 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 to be a Rees 0-matrix semigroup in which every matrix entry is non-zero, and from which the 0 element has been removed. Thinking this way, it is clear that an algorithm for computing the maximal subsemigroups of a R should proceed exactly as the previously described algorithm for Rees 0-matrix semigroups (Section 4.1), except that the cases which require the existence of a 0 should be ignored. Therefore, in creating the algorithms for Rees 0-matrix semigroups, we have done the hard work of creating an algorithm to compute the 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 Rees matrix semigroup is formed by removing any single row from R (as long as R has more than one row) or any 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 described in Algorithm2, except that it is no longer necessary to check for the existence of non-zero matrix entries. Provided that the semigroup R has more than one row, we take each row in turn and simply remove it from the semigroup, and likewise for columns.

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

29 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 Section2 are very useful, in general they are descriptive of maximal subsemigroups, without giving a recipe for calculating them. Although we can describe the form that a maximal subsemigroup must have, it is not always the case that a subsemigroup with 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 = hX0i. 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 semigroup has no maximal subsemigroups. If S is a group, then we return its maximal subgroups - recall that there are pre-existing algorithms to calculate the maximal subgroups of a finite group, for example the MaximalSubgroups function in GAP [6]. If the semigroup S is simple, it is isomorphic to a regular Rees 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 maximal subsemigroups of R can be computed using the algorithms described in Section4, and then translated into maximal subsemigroups of S via the inverse isomorphism. If the semigroup S is 0-simple, we proceed similarly. Otherwise, calculation of the maximal subsemigroups of S will require more computation. We assume 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 hX \{x}i = S. Then the generating set X is called irredundant if 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 its generating set X0. Therefore, by repeatedly removing a redundant generator from X0, eventually the generating set X0 becomes irredundant. There is a function called IrredundantGeneratingSubset to perform this computation in the Semigroups package [8]. Define X = {g1, g2, ..., gn} to be an irredundant generating subset of X0. Next, note that any maximal subsemigroup M must lack at least one of the generators in the set X, since if M contained the generating set X, then S = hXi ≤ M S, a contradiction. Therefore, each generator gives rise to at least one maximal subsemigroup of S: for each element gi ∈ X, the subsemigroup hX \{gi}i is properly contained in S (since X is irredundant) and is thus contained in a maximal subsemigroup of S. Further, if i 6= j then the subsemigroups hX \{gi}i and hX \{gj}i are contained in distinct maximal subsemigroups. To see this, suppose that T is a subsemigroup of S which contains both hX \{gi}i and hX \{gj}i. Then the subsemigroup T contains X, and hence T = S. In particular, there are as many maximal subsemigroups of the semigroup S as their are elements in any irredundant generating set of S. We note in Example 5.2 that a maximal subsemigroup may lack multiple generators:

Example 5.2. Consider the of permutations on the {1, 2, 3}, S3 = h(12), (123)i. This generating set is clearly irredundant. However, the subgroup generated by the permutation (13), h(13)i, 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 described above, the maximal subsemigroup M must lack at least one generator of S. Therefore, the J -class of S which 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 The algorithm will locate the J -classes of the semigroup S which contain generators. This is a trivial computation. It will then consider each such J -class in turn, calculating the maximal subsemigroups of S 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 a generator of S. There do exist maximal subsemigroups of S arising from J by Corollary 5.3. However, since a maximal subsemigroup is a proper subsemigroup which lacks elements of only one J -class (Theorem 2.1), there is exactly one maximal subsemigroup arising from J: the subset S\J. In this case, an algorithm would simply remove the J -class J to find this maximal subsemigroup. Therefore, for the remainder of this 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 maximal subsemigroups 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 function PartialOrderOfDClasses in the Semigroups package [8]. Remark 5.4. All maximal J -classes must contain at least one generator, since Lemma 1.4 implies that elements 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 by Remark 5.4. In some sense, a maximal J -class J is independent of multiplication in the other J -classes of the semigroup S, since, as we shall see in Lemma 5.5, the complement of J is in fact an ideal. It is therefore easier to describe how a maximal subsemigroup can arise from a maximal J -class, and the resulting 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 formed by 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 the following pages, when the J -class J in question is unambiguously defined we will adopt the notation SJ to 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 subsemigroup of S.

Proof. Note that SJ is a non-empty subset of S, since S is not simple. To show that SJ is an ideal, let x ∈ SJ and y ∈ S. By Lemma 1.4, we have that Jxy ≤ Jx and Jyx ≤ Jx. Since J is a maximal J -class and 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, it turns 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) we conclude that Jxy 6= Jx, i.e. xy∈ / Jx. Therefore only right multiplication by an adjoined identity gives a product in Jx, so Rx = {x}; similarly Lx = {x}. Hence Jx = Dx = {x}.

31 Note that a regular maximal J -class can have size 1: take for example the trivial semigroup, or any non-monoid to which an identity has been adjoined. In any case, all further maximal J -classes to be considered are regular and non-trivial; so let J be such a J -class. We shall see that maximal subsemigroups 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 only if 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 ideal of 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 subset of J ∗ which contains zero, we define its corresponding subset A to be the subset A∗ \{0} of J. These sets A 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 a subsemigroup 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 whenever x, y ∈ A, then xy ∈ A or xy∈ / J. Equivalently, A∗ is closed under multiplication if and only if whenever x, 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 a maximal subsemigroup of the semigroup S if and only if A∗ is a maximal subsemigroup of the principal factor J ∗.

Proof. Since the bijective correspondence between the subsets of J and the subsets of J ∗ which include 0 preserves inclusions, so does the correspondence between subsemigroups of S containing SJ , and the subsemigroups 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 the 0 J -class J is regular, it contains an idempotent e, and so M = SJ ∪{e} is a subsemigroup of S. Since J is 0 non-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 does indeed 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 finding those 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 a group. An algorithm to calculate the maximal subsemigroups arising from a non-trivial maximal J -class of S would calculate such a Rees 0-matrix semigroup, R. (The function InjectionPrincipalFactor is available in GAP [6] to do just this). We can use the algorithms described in Section4 to then calculate the maximal subsemigroups of R which contain the element 0. We then translate these subsemigroups into the corresponding subsets of the J -class J. By adjoining each of these sets to the ideal SJ , we find every maximal subsemigroup of S arising from the non-trivial maximal J -class J.

32 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 a non-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, and so 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. There exist maximal subsemigroups of S arising from J by Corollary 5.3. However, by Theorem 2.3, the only maximal subsemigroup M arising from J is S \ J. In this case, an algorithm would simply remove the J -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 irredundant generating set for S. This also provides an alternative proof of Lemma 5.7: since every element of a maximal 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 which contains some generators of S. In this case, we can not use the same strategy as with maximal regular J -classes. The arguments we employed in Section 5.1 often relied on the maximality of the relevant J -class. In particular, we saw that maximal subsemigroups are in one-to-one correspondence with the maximal subsemigroups of the principal factor which contain 0. However, as demonstrated in Examples 5.13 and 5.14, not every maximal subsemigroup of S arising from J gives a maximal subsemigroup of its principal factor, and not every maximal subsemigroup of the principal factor (which contains 0) gives a maximal 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, the elements 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 corresponding subset of J. Then either SJ ∪ A is a maximal subsemigroup of S, or hSJ ∪ Ai = S.

Proof. Note that A is non-empty. If hSJ ∪ Ai = SJ ∪ A, then SJ ∪ A is a proper subsemigroup of S. To ∗ show that it is maximal, let x ∈ S \(SJ ∪A) = J \A. Then the subset of J corresponding to J ∩hSJ ∪A, xi is a subsemigroup of J ∗ properly containing A∗, and since A∗ is maximal, this subset hence equals J ∗. Therefore J ⊆ hSJ ∪ A, xi, so that hSJ ∪ A, xi = S. Otherwise, SJ ∪ A is not a semigroup, and so there exists x ∈ J \ A such that x ∈ hSJ ∪ Ai. Again, we conclude that hSJ ∪ Ai = hSJ ∪ A, xi = S.

In conclusion, an algorithm can not look at each non-maximal regular J -class in isolation, as we could with 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 principal factor, and we still have many useful results from Section2 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 -class of J, else it contains a union of the H -classes of J. Our algorithm will separately look for maximal subsemigroups 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 regular J -class J, and further suppose that M intersects every H -class of J non-trivially. By Theorem 2.4, the subset of the principal factor J ∗ corresponding to M ∩ J is in fact a maximal subsemigroup of J ∗; it is one 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 maximal ∗ subsemigroups of J corresponds to a subset of J; we try adjoining the corresponding subset of J to SJ .

33 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. Pseudocode code for such an algorithm is included as Algorithm4. Note that the principal factor J ∗ is 0-simple, and is thus isomorphic to a regular Rees 0-matrix semigroup over a group. Therefore we may use the algorithms described in Section4 to calculate these maximal subsemigroups.

Algorithm 4 Compute the maximal subsemigroups of S which intersect every H -class of S Input: S = hXi, where X is irredundant; J, a non-trivial and non-maximal regular J -class of S which contains generators of X; ∗ ∗ ∗ Γ = {A1, ..., Am}, 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 intersect every H -class of S non-trivially. 1: for A∗ ∈ Γ do 2: A := A∗ \{0};[get the subset of J corresponding to the maximal subsemigroup of J ∗] 3: M := h(S \ J) ∪ Ai;[adjoin A to S \ J] 4: if M 6= S then [use Lemma 5.12] 5: Ω ← Ω ∪ {M}; 6: end if 7: end for 8: 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, despite the wastefulness of this approach, it is not immediately evident how to avoid this work. We demonstrate the necessity of this caution with the following example:

1 1 (123) (213) (123) 1

(123)

2 2

(121) (121) 2 (212) (212) (121) (122) (122) (211) (211) (122)

Semigroup: R Semigroup: U Semigroup: V

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 regular J -classes, as shown above. A subsemigroup U of R is also shown, which has an irredundant generating set 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 This J -class contains the generator σ = (211), and so there are maximal subsemigroups of both R and ∗ U arising from J2. The principal factor J2 is clearly isomorphic to a 2 × 1 Rees 0-matrix semigroup over C2, the cyclic group of order 2. Do there exist maximal subsemigroups of R arising from the J -class J2 which intersect every H -class of R non-trivially? And likewise for U? We can compute using our algorithms from Section 4.1, and find that there is only one maximal subsemigroup of the principal factor J ∗ of ‘maximal subgroup’-type. The corresponding subset of J2 is given by the set A = {(121), (122)}. We shall see that the subset A gives rise 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 hW i = 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 is easy to verify), and so V is maximal by Lemma 5.12. More precisely, V is a maximal subsemigroup of 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 maximal subsemigroups 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 shows that not every H∗ maximal subsemigroup arises from a maximal subsemigroup of the principal factor.

1 1 1

(21345) (21345) (12345) (21345) (12345) (12345)

2 2 2 (11444) (22444) (11333) (22333) (11333) (22333) (11444) (22444) (11333) (22333) (11441) (22442) (11331) (22332) (11331) (22332)

Semigroup: T Semigroup: U Semigroup: V

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, which both contain generators. Let J2 be the J -class of T with index 2 in the above diagram. ∗ The principal factor J2 is isomorphic to a 2 × 4 rectangular band with an adjoined zero. From Section ∗ 3.7.1, we easily see that there are 6 maximal subsemigroups of J2 which contain zero, formed by removing either a single row or column. One of these, removing the second row of the rectangular band, corresponds to 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 mapped bijectively 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 similarly for the third and fourth columns. The result of removing the first two columns is shown above as V ; it

35 ∗ is easy to verify that V is a maximal subsemigroup of T . However, the subset of the principal factor J2 ∗ corresponding to J ∩ V is not a maximal subsemigroup of J2 , since it lacks more than one column. This demonstrates that, when a maximal subsemigroup M is a union of H -classes, the corresponding subset 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 arise from the non-trivial non-maximal regular J -class J. This is the final type of maximal subsemigroup which to be computed. Let M be such a maximal subsemigroup. Then we may say that if M contains the element x, then it must contain the whole H -class Hx; and if M does not contain the element x, then it must 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 -class H S closure of C in S, i.e. C = x∈C Hx. Any maximal subsemigroup arising from the J -class J must lack some number of generators in the set X ∩ J (else it would not be a proper subsemigroup). Therefore, we take each non-empty subset of X ∩ J, and attempt to find the H∗ maximal subsemigroups which lack precisely these generators (if they exist). Let Y be a non-empty subset of X ∩ J. For reasons which shall become apparent, we consider the subsets 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 set X \ Y , but which does not contain the generators in the set Y . Certainly M contains the set X \ Y and the set S \ J, and so M contains the subsemigroup U = hX \ Y,S \ JiH . By definition, M contains no element of the set Y , and hence no element of the set Y H . Moreover, the maximal subsemigroup M can not contain any element x ∈ J such that the set hU, xiH ∩ Y is non-empty. If this were the case, then we would have that: ∅= 6 hU, xiH ∩ Y ⊆ M ∩ Y, contradicting the definition of M. Therefore, we may compute a set of elements of J, and hence a set of H -classes of J, none of which is contained in the maximal subsemigroup M. If we call this set B, then certainly Y H ⊆ B; pseudocode is included as Algorithm5 to compute as large a set B as possible.

Algorithm 5 Calculate elements which are not contained in particular maximal subsemigroups of S Input: S = hXi, 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∗ maximal subsemigroup of S which lacks the generators in Y ; 1: U := hX \ Y,S \ JiH ;[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= ∅ do 5: Choose c ∈ C; 6: V := hU, ciH ;[adjoin the element c to U] 7: if V ∩ B 6= ∅ then 8: 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: else 11: C := C \ V ;[for x ∈ V : hU, xiH ≤ V , and so x need not be checked] 12: end if 13: end while 14: return B.

36 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 which contain the generators in the set X \ Y ), we may assume that we have already found all H∗ maximal subsemigroups which lack the generators in the set Y 0 (but which contain the generators in the set X \Y 0) for each proper non-empty subset Y 0 of Y . We may also assume that we have calculated all maximal subsemigroups arising from the J -class J which intersect every J -class of J non-trivially. Call the set of all previously found maximal subsemigroups Γ. Note that if there are no maximal subsemigroups of S arising from J which intersect every H -class of J 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 Algorithm5. If there does exist an H∗ maximal subsemigroup M lacking the generators in Y (and containing the other generators) then by definition of the 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 satisfy the inequality M ≤ S \B S (by Equation6). Therefore, M exists if and only if S \B is a maximal subsemigroup 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 of S 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 some x ∈ B such that Vx is a proper subsemigroup of S, and is hence contained in a maximal subsemigroup in the set Γ. Therefore S \ B is a maximal subsemigroup of S if and only if S \ B is not contained in 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 subset A = J \ (U ∪ B) of J is non-empty. Note that since the both the subsemigroup U and the subset B are unions of H -classes, it follows that the set A must also be a union of H -classes. Therefore, we may 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 which lacks the generators in Y . Using Equation6, all we can say for such a hypothetical maximal subsemigroup 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 this search in Algorithm6.

37 Algorithm 6 Compute the maximal subsemigroups of S which are a union of H -classes Input: S = hXi, 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 Algorithm5; Γ, 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= ∅ do 4: 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 := hU, HiH ;[adjoin the H -class H to U] 7: if V 6= S then 8: 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 if 12: A ← A \{H}; 13: end if 14: end while 15: if m, and U is not contained in any maximal subsemigroup W ∈ Γ then 16: Ω ← Ω ∪ {U};[U is a maximal subsemigroup] 17: end if 18: return 19: end function 20: U := hS \ J, X \ Y iH ;[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 6 Notes about algorithms

In Section4 we described an algorithm to calculate the maximal subsemigroups of a finite regular Rees 0-matrix semigroup over a group. In Section5 we used this, and other ideas, to describe an algorithm to calculate the maximal subsemigroups of an arbitrary finite semigroup. Far from being an entirely theoretical exercise, the algorithms described were actually practical. As part of a group project, these algorithms have now been translated into working computer code; in particular they have been implemented in the GAP system [6]. This code is included in version 2.0 of the Semigroups package [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 to computationally verify that the results are indeed maximal. Also, by running the MaximalSubsemigroups function on a semigroup S, and then recursively calling the 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 is a 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 presented in Section3. For example, we can completely describe the maximal subsemigroups of a finite monogenic semigroup (Section 3.5), and so for these types of semigroup it is unnecessary to perform a complicated computation. Similarly, the maximal subsemigroups of a commutative semigroup (Section 3.3) do not require the full generality of the algorithms described, since all of the Green’s relations on a commutative semigroup 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 Section5, the maximal subsemigroups which arise from one J -class are completely independent of the maximal subsemigroups which arise from a separate J -class. Therefore, once we have calculated the J -classes which contain generators, the algorithm could be run to calculate the maximal subsemigroups arising from each J -class simultaneously. However, at various points throughout the computation (particularly when calculating maximal subsemigroups which are a union a H -classes) it is necessary to have access to the maximal subsemigroups which have already been calculated. Therefore, it is not obvious how to parallelise the computation further. At various points in the algorithms, for example when calculating the maximal subsemigroups of an arbitrary semigroup which are a union of H -classes, and when calculating the maximal subsemigroups of a Rees 0-matrix semigroup of ‘maximal subgroup’-type, it is necessary to perform recursive depth-first searches. Writing efficient search algorithms is a difficult task, and there are undoubtedly many ideas available from computer science to greatly optimise these searches. However, perhaps there are further mathematical ideas which could increase the efficiency of these parts of the algorithms. If we had access to the automorphism group of the semigroup we are computing with, this information could be used to avoid following branches of the search tree which are equivalent under 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) project would be to create an algorithm to compute the subsemigroups of an arbitrary finite semigroup which are maximal with a certain property. For example, it would be interesting to be able to compute the largest inverse subsemigroup of an arbitrary semigroup, or the largest regular subsemigroup of an arbitrary semigroup (although these are not necessarily maximal in the sense which we have been using in this project). There are many topics in computational semigroup theory still to be investigated.

39 7 Maximal subsemigroups of specific finite semigroups

For the final section of this project, we will apply the ideas from the algorithm in Section5 to find the maximal 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 transformations of the set {1, 2, ..., n} under composition. The full transformation monoid Tn is a finite semigroup which is regular, and is one of the most fundamental examples in semigroup theory, since every finite semigroup can 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 natural partial 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 use the notation Ji to denote the J -class of Tn consisting of transformations of rank i. Thus, the maximal J -class Jn consists of all transformations of rank n: that is, all permutations of the set {1, 2, ..., n}. In particular, we see that the maximal J -class, Jn, consists of a single H -class which is isomorphic to the symmetric group Sn. For a monoid, we call the H -class of the identity the group of units, because it is a group, and every element of the group is invertible in the group, and hence in the semigroup. So for the full 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 MT5823 Semigroups) 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 rank n − 1. Such a generating set is obviously irredundant. We shall now follow the algorithms described in Section5 to compute the maximal subsemigroups of the full transformation monoid Tn. Since the J -classes Jn and Jn−1 are the only J -classes which contain generators, it follows that there exist maximal subsemigroups arising from each of these J -classes, but not 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 the ∗ principal factor Jn which contain the element 0. However, since the J -class Jn is isomorphic to the ∗ symmetric group Sn, the principal factor Jn is isomorphic to the semigroup formed by adjoining 0 to Sn. ∗ Therefore the maximal subsemigroups of Jn which contain 0 are in one-to-one correspondence with the maximal subgroups of Sn. For each maximal subgroup K of Sn, the corresponding maximal subsemigroup of Tn is the set (Tn \ Jn) ∪ K. We next consider the maximal subsemigroups of the full transformation monoid Tn which arise from the J -class Jn−1. There do exist maximal subsemigroups arising from this J -class, since Jn−1 contains an element of the irredundant generating set. Suppose that M is such a maximal subsemigroup. By definition, the maximal subsemigroup M 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 Sn along with any element of Jn−1. Therefore the maximal subsemigroup M (being a proper subsemigroup of Tn) can not contain any elements of the J -class Jn−1. We conclude that there is precisely one maximal subsemigroup 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 Sn by mn, then there are mn + 1 maximal subsemigroups of the full transformation monoid Tn of degree n.

40 7.2 Symmetric inverse monoid In

For a number n ∈ N, the symmetric inverse monoid of degree n, In, is the semigroup of all partial permutations of the set {1, 2, ..., n}. As the name would suggest, In is an inverse semigroup, and it is finite. 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 and only if they have equal rank. Further, the maximal J -class of In is isomorphic to the symmetric group Sn, and an irredundant generating set is specified by an irredundant generating set for Sn, along with any element 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 are precisely mn + 1 maximal subsemigroups of In, which occur in the same way as do the mn + 1 maximal subsemigroups 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 partition monoid of degree n is the semigroup of all partitions of the set n ∪ −n. The multiplication of partitions is somewhat complicated, and is explained in detail Chapter 5 of the documentation for the Semigroups package [8]. As a demonstration, let f and g be the following two partitions of degree 6:

1 2 3 4 5 6

−1 −2 −3 −4 −5 −6 1 2 3 4 5 6

−1 −2 −3 −4 −5 −6

Figure 7: The partition f (top) and the partition g (bottom). Each is depicted as a graph with vertex set n ∪ −n, where two vertices are in the same connected component if and only if they are contained in the same 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 4 5 6

−1 −2 −3 −4 −5 −6

41 Recently, the partition monoids have become more widely known and researched. They have some very interesting 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 of degree 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 both n 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 of units) is isomorphic to the symmetric group Sn. Thus, if we again define mn to be the number of maximal subgroups of Sn, then there are precisely mn maximal subsemigroups of the partition monoid Bn which arise from its maximal J -class. However, these are not the only maximal subsemigroups of Bn. Along with a generating set for the symmetric group Sn, it can be shown that any generating set for the partition monoid must include two partitions 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 for small values of n, we can be more specific. For these small examples, we find that there are in fact four maximal subsemigroups arising from the J -class J. Each maximal subsemigroup is formed by removing either half of the L -classes or half of the R-classes from the J -class J. Therefore, we may conjecture that for all natural numbers n, the partition monoid Bn of degree n has precisely mn+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 precisely mn +4 maximal subsemigroups, the algorithm has guided us in this direction, and it has allowed us to make this conjecture. Surely there are many other interesting examples of finite semigroup for which this approach could be adopted.

42 References

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

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

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

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

[5] N. Graham, R. Graham, and J. Rhodes. Maximal Subsemigroups of Finite Semigroups. Journal of Combinatorial 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