Efficient Compression in Semigroups
Abstract
Straight-line programs are a central tool in several areas of computer science, including data compression, algebraic complexity theory, and the algorithmic solution of algebraic equations. In the algebraic setting, where straight-line programs can be interpreted as circuits over algebraic structures such as semigroups or groups, they have led to deep insights in computational complexity.
A key result by Babai and Szemerédi (1984) showed that finite groups afford efficient compression via straight-line programs, enabling the design of a black-box computation model for groups. Building on their result, Fleischer (2019) placed the Cayley table membership problem for certain classes (pseudovarieties) of finite semigroups in , and in some cases even in . He also provided a complete classification of pseudovarieties of finite monoids affording efficient compression.
In this work, we complete this classification program initiated by Fleischer, characterizing precisely those pseudovarieties of finite semigroups that afford efficient compression via straight-line programs. Along the way, we also improve several known bounds on the length and width of straight-line programs over semigroups, monoids, and groups. These results lead to new upper bounds for the membership problem in the Cayley table model: for all pseudovarieties that afford efficient compression and do not contain any nonsolvable group, we obtain algorithms. In particular, we resolve a conjecture of Barrington, Kadau, Lange, and McKenzie (2001), showing that the membership problem for all solvable groups is in .
Keywords and phrases:
Semigroups, straight-line programs, compression, membership problemCopyright and License:
2012 ACM Subject Classification:
Theory of computation Algebraic language theory ; Theory of computation Problems, reductions and completeness ; Theory of computation Circuit complexityAcknowledgements:
The authors thank Markus Lohrey and Florian Stober for valuable discussions, and the anonymous referees for their helpful comments and suggestions.Funding:
This work was partially supported by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) – LO 748/15-1, WE 6835/1-2.Editors:
Meena Mahajan, Florin Manea, Annabelle McIver, and Nguyễn Kim ThắngSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
The membership problem asks, given a (finite) algebraic structure , a set , and a target element , whether belongs to the substructure of generated by . Thinking of groups, semigroups, or vector spaces, this is a very fundamental problem in computational algebra with many applications. For permutation groups, Sims gave an efficient solution already in 1967 [34], later refined to an algorithm by Babai, Luks, and Seress [4]. For transformation semigroups, Kozen [24] showed in 1977 that the problem is -complete, as hard as intersection non-emptiness for deterministic finite automata (DFAs).
As a different variant, the membership problem membCT in the Cayley table model was introduced by Jones, Lien, and Laaser [22], where the semigroup is given by its multiplication table; here the problem is -complete. For groups, Barrington and McKenzie [8] showed that memb can be solved in with an oracle to undirected graph reachability [29], and conjectured it might be -hard. Fleischer [16, 17] refuted the latter (under -reductions) by placing the problem in . His proof is based on straight-line programs (algebraic circuits or context-free grammars producing precisely one word), a tool central in data compression [23, 6], algebraic complexity [11], and in solving algebraic equations [21, 12]. A key feature is their support for efficient manipulation of compressed data [25, 26, 19, 36].
Babai and Szemerédi [5] showed that finite groups afford efficient compression: every element can be expressed by a straight-line program of polylogarithmic length in the size of the group. Fleischer used this to place memb in and extended the result to pseudovarieties of monoids: efficient compression occurs precisely for Clifford monoids (which comprise both groups and semilattices) and commutative monoids. In contrast, there is no maximal pseudovariety of semigroups that affords efficient compression.111At the first glance, the difference between monoids and semigroups might seem negligible; however, the landscape of pseudovarieties of semigroups is much richer than the one of monoids.
The membership problem has also been studied restricted to other pseudovarieties: Beaudry, McKenzie, and Thérien [9] investigated aperiodic monoids, while Fleischer, Stober, and the authors [18] considered inverse semigroups.
An important variant are straight-line programs of polylogarithmic length and bounded width. Fleischer showed that they yield membership algorithms in (polynomial-size Boolean circuits of depth ), which applies to all commutative semigroups. Earlier, Barrington, Kadau, Lange, and McKenzie [7] placed membership in solvable groups of bounded derived length in , and conjectured that the membership problem for all solvable groups may also be in . This was partially confirmed by Collins, Grochow, Levet, and the second author [13] showing this to be true for the class of all nilpotent groups.
In this work, we complete Fleischer’s program to characterize pseudovarieties of finite semigroups that afford efficient compression. Moreover, we also improve upon some of the best previously-known length and width bounds for semigroups, monoids, and groups. Finally, we apply our findings to the membership problem, in particular, resolving Barrington, Kadau, Lange, and McKenzie’s conjecture. In more detail, our results are as follows.
Our Contribution.
Our main theorem completely characterizes those pseudovarieties of semigroups that afford efficient compression – meaning that, for some , all of size admit straight-line programs of length ; see Section 3. Here, the following three pseudovarieties – each requiring straight-line programs of length – play a crucial role, since they serve as primary obstructions:
Theorem 1.
Let be a pseudovariety of semigroups. The following are equivalent.
-
(1)
The pseudovariety affords efficient compression.
-
(2)
The pseudovariety contains neither , , nor .
-
(3)
The pseudovariety admits straight-line programs of length .
Furthermore, if all groups in are solvable, then the above are equivalent to admitting straight-line programs of length as well as of width and length .
Moreover, if for some , then the pseudovariety admits straight-line programs of bounded width and length. Except in the case that contains a nonsolvable group, we show that these bounds are essentially asymptotically optimal. Our proofs are fully constructive and can be found in Sections 4–9.
In Section 10, we apply our findings to the membership problem proving the following result, where memb denotes the membership problem for in the Cayley table model.
Corollary 2.
Let be a pseudovariety of semigroups with , , .
-
(1)
The membership problem memb is in .
-
(2)
If, moreover, contains no nonsolvable group, then memb is in .
Our results almost completely answer an open problem due to Fleischer [17], who deemed it “interesting to see whether the Cayley semigroup membership problem can be shown to be in for all classes of semigroups with the polylogarithmic circuits property.” Moreover, we positively resolve Barrington, Kadau, Lange, and McKenzie’s conjecture [7] concerning the membership problem for the pseudovarierty of all finite solvable groups.
Corollary 3.
The problem memb is in .
Proof Outline.
Our proof of Theorem 1 combines structural results on semigroups with explicit constructions. The negative results for the pseudovarieties , , and were already established by Fleischer [16]. For the positive direction, we rely on a recent characterization of pseudovarieties satisfying by first author [35], which shows that any such pseudovariety necessarily falls into one (or both) of the following two classes.
-
The pseudovariety is almost completely regular, meaning that all its members satisfy an identity of the form . This condition properly generalizes complete regularity (that is, being a union of groups), which is characterized by the identity . In Section 9 we show that the general problem for almost completely regular pseudovarieties reduces to this special case. If, in addition, the pseudovariety satisfies , then the completely regular members of are necessarily normal bands of groups [28, Proposition 4]. Exploiting this structural restriction, we further reduce the problem to the group case in Section 8. Combined with Babai and Szemerédi’s result for groups [5], this completes the proof.
-
The pseudovariety is permutative, meaning that an identity holds for all members of , where is some nontrivial permutation of the symbols . This notion properly generalizes commutativity, which is characterized by the identity . In Section 6 we present a direct proof that such pseudovarieties afford efficient compression, refining an earlier argument for commutative semigroups due to Fleischer [16]. Our construction yields straight-line programs of asymptotically optimal length and width two. (Matching lower bounds are established in Section 5.)
For pseudovarieties in the first class, our reductions are also efficient in that questions about asymptotically optimal straight-line program length (and width) reduce to the group case. The latter is discussed in Section 7, where we additionally present two new constructions for solvable groups, yielding straight-line programs of asymptotically optimal length but unbounded width, and of polylogarithmic length and bounded width, respectively.
2 Preliminaries
In this section, we provide a very brief overview of the necessary material from semigroup theory and complexity theory, along with a summary of the notational conventions used throughout this paper. For background on group theory, we refer the reader to Section 7.
2.1 Semigroups
We assume that the reader is familiar with the theory of finite semigroups, and we refer to the excellent treatments of the subject by Almeida [1], and Rhodes and Steinberg [31] for relevant background material as well as any undefined terms.
Given a semigroup , we write to indicate that is a subsemigroup. For an arbitrary subset , we denote by the subsemigroup generated by , consisting of all elements of expressible as a product of elements of . We write for the set of all elements expressible in this way by a product of length at most . The set of completely regular elements of a finite semigroup is denoted by where, as usual, denotes the unique idempotent power of an element of a finite semigroup.
| Symbol | Identities | Description |
|---|---|---|
| – | all semigroups | |
| bands (idempotent semigroups) | ||
| trivial semigroups | ||
| completely regular semigroups | ||
| groups | ||
| aperiodic semigroups | ||
| nilpotent semigroups | ||
| commutative semigroups |
Most of our analysis will concern pseudovarieties – that is, classes of finite semigroups closed under formation of finite direct products, subsemigroups, and homomorphic images. According to Reitermann [30, Theorem 3.1], such a class consists of all finite semigroups satisfying some set of profinite identities. Pseudovarieties are also closely connected to classes of regular languages exhibiting natural closure properties, as established by Eilenberg [14].
Throughout, we use boldface type to denote pseudovarieties and specify defining sets of (profinite) identities using double-struck square brackets. For example, indicates that is the pseudovariety consisting of all finite semigroups satisfying the identity , that is, all finite commutative semigroups. Some important pseudovarieties, which serve as convenient reference points, are listed in Table 1.
Central in this work, as they form primary obstructions, are the following pseudovarieties:
For reference, is a pseudovariety of nilpotent semigroups (that is, ), while the classes and consist of all finite left-regular and right-regular bands, respectively.
Other pseudovarieties of bands that we consider here are , comprising rectangular bands;222Be aware that in the literature sometimes denotes the pseudovariety of regular bands instead. , comprising semilattices; and , comprising normal bands. The (pseudo-)varieties of bands have been completely classified by Biryukov [10], Fennemore [15], and Gerhard [20].
In addition, we consider pseudovarieties defined in terms of extensions by nilpotent semigroups, which are most conveniently expressed as Mal’cev products (though used here only for notation). Given a pseudovariety , we write for the pseudovariety with if and only if the ideal belongs to for some – that is, the semigroup is an extension of by the Rees quotient , which is obtained by identifying all elements of . Fixing yields the pseudovariety instead, where refers to the pseudovariety of finite -nilpotent semigroups.
2.2 Complexity
We assume that the reader is familiar with standard complexity classes such as , , , , , and ; see, for example, [3]. Throughout, we write for .
For sublinear time classes, we use random-access Turing machines meaning that the Turing machine has a separate address tape and a query state; whenever the Turing machine goes into the query state and the address tape contains the number in binary, the th symbol of the input is read (the content of the address tape is not deleted after that). Apart from that, random-access Turing machines work like regular Turing machines.
For functions , the classes and consist of the problems decidable by (non-)deterministic, -time and -space bounded, random-access Turing machines. Be aware that there must be one Turing machine that simultaneously satisfies the time and space bound. Without restricting the available space one obtains the classes and . We also define
The class is defined as the class of problems decidable by polynomial-size, constant-depth Boolean circuits where all gates may have arbitrary fan-in. The classes and are defined analogously but allowing for circuits of polynomial size and depth , and for quasipolynomial size (i.e., ) and constant depth, respectively. Throughout, we consider only uniform circuit classes (specifically, -uniform circuits for and , and -uniform circuits for ), meaning that the circuits can be constructed (or verified) efficiently; see [38] for details.
3 Compression via Straight-Line Programs
In this work, we are interested in the efficient representation of semigroup elements using straight-line programs. These are commonly defined as circuits over the algebraic structure (e.g. [26]), via context-free grammars that generate a single word (e.g. [25]) or, in some cases, as sequences of elements corresponding to intermediate values of the former (e.g. [5]).
Here we take a pragmatic point of view. Given a semigroup , a straight-line program over a set is a finite sequence of instructions to be executed in order (that is, without branches or loops) and operating on a potentially unbounded set of registers . Each register can store a single element of the semigroup , and the straight-line program may use the following two instruction types to alter the contents of the registers.
-
Assign the fixed element to the register .
-
Assign the product of the registers to the register .
In the second type of instruction, the registers , , and are not necessarily distinct, but we require that the input registers and were each assigned in some previous instruction.
The straight-line program is said to compute a semigroup element if, upon completion of execution, some register contains the value . More generally, computes some set if it computes every , and the largest such set is the value set .
The length and width of the straight-line program are the number of its instructions and the number of registers it operates on, respectively. Intuitively, the length and width of a straight-line program measure the time and space required to execute it.
Let be a finite semigroup and . Given a set and a width bound , we define the straight-line cost of over to be the quantity
The straight-line cost of an element , written , is defined analogously. Sometimes we employ more general terminology and refer to either straight-line programs of bounded width, corresponding to arbitrary , or unbounded width, in the case where .
As with conventional programs, straight-line programs can be composed sequentially and invoked as subroutines, modulo simple modifications such as register renaming. Applying such composition techniques leads to the following estimates.
Lemma 4.
Let be a finite semigroup, , and . Then, for all ,
A fundamental subroutine, which we often employ without explicit reference, is fast exponentiation via repeated squaring. In the context of straight-line programs, this technique dates back at least to 1937, when Scholz presented it as an application of addition chains [33].
Observation 5.
Let be a finite semigroup, , and . Then .
One of our primary concerns are worst-case bounds for as and vary; that is, in the quantity . More specifically, we seek to asymptotically bound in the size of the semigroup as the latter ranges over the members of a given pseudovariety . To this end, let us define by
We then say that admits straight-line programs of width and length provided that and, conversely, that requires straight-line programs of length provided that . Finally, we say that a pseudovariety affords efficient compression (via straight-line programs) if .
4 Obstructions to Efficient Compression
As mentioned in the introduction, the following three pseudovarieties constitute the primary obstructions to efficient compression in semigroups via straight-line programs:
A simple consequence of their defining identities is that representing elements of their members in terms of generators essentially requires injective words, that is, words in which each generator appears at most once. Indeed, for , all nonzero elements must be represented this way, while for and , any word in generators defines the same element as the word obtained by keeping only the first or last occurrence of each generator, respectively.
Intuitively, since injective words contain no repeated factors, they cannot be efficiently compressed via straight-line programs (or any compression method relying on such repetitions). However, because we measure efficiency relative to the size of the semigroup, a formal proof requires exhibiting members of these pseudovarieties in which some element cannot be expressed using few generators, as done by Fleischer [16, Lemma 4.11, Lemma 4.15].
Lemma 6 (Fleischer).
Let be a pseudovariety that contains , , or . Then, for every , there exist with , a generating set with , and an element such that no subsemigroup generated by a proper subset of contains .
In particular, ; that is, requires straight-line programs of length .
5 Semigroups of Bounded Diameter
In this section, we classify pseudovarieties where every semigroup element can be written as a product of bounded length over any generating set (see Theorem 10) and show that all other pseudovarieties require straight-line programs of length .
Definition 7.
Let be a pseudovariety. We say that has bounded diameter if there is a constant such that, for every and generating set , it holds that ; that is, every element is a product of generators from of length at most .
Clearly, if has bounded diameter, then (with as above); and, conversely, if for some constant , then has bounded diameter (with ). In other words, the pseudovarieties of bounded diameter are precisely the pseudovarieties admitting straight-line programs of length (and width) . An obvious example of such a pseudovariety is , which consists of all finite -nilpotent semigroups.
The following result, which will also be of use in the proof of our main theorem, generalizes this example to Mal’cev products of the form . (Indeed, it applies to where is the trivial pseudovariety.) Recall that a finite semigroup belongs to the pseudovariety if and only if its ideal belongs to .
Lemma 8.
Let for a pseudovariety and . Then, for all ,
Herein, the factor is a constant and, hence, suppressed in Landau notation, in which the bound reads . However, be aware that , which consists of all finite nilpotent semigroups, does not afford efficient compression since .
Proof.
Consider a semigroup , a generating set , and an element . If the element is not contained in the ideal , then it can be written as a product of generators from of length less than ; hence . Otherwise, since is generated by the set , the second inequality of Lemma 4 yields
Another example of bounded diameter is given by , which consists of all finite rectangular bands, and satisfies . Combining the latter with Lemma 8 yields for every pseudovariety . Using a direct argument (which is straight-foreword and, therefore, omitted), this can be slightly improved.
Lemma 9.
If for some , then .
Fleischer showed that the pseudovariety has bounded diameter for all [16, Proposition 4.5]. However, since holds for every , this is equivalent to the above. As it turns out, every pseudovariety of bounded diameter is contained in or, equivalently, in for some .
Theorem 10.
Let be a pseudovariety. Then exactly one of the following holds.
-
The pseudovariety has bounded diameter. In particular, .
-
The pseudovariety requires straight-line programs of length .
Moreover, the former is the case if and only if for some .
Before we prove Theorem 10 in its full generality, let us first establish the lower bound asserted by the second alternative. We will distinguish between two cases, depending on how the pseudovariety in question is situated relative to pseudovarieties and .
The first case concerns the pseudovariety of locally trivial semigroups, that is, semigroups having only trivial submonoids. By [1, Exercise 6.4.2], it satisfies
The following observation is also contained in Fleischer’s dissertation [16, Proposition 4.7].
Lemma 11 (Fleischer).
Let be a pseudovariety with . Then .
The second case concerns the pseudovariety , which serves as a direct obstruction to the property of having bounded diameter.
Lemma 12.
Let be a pseudovariety with . Then .
Proof.
For every , the semigroup is contained in . Indeed, the defining relations imply , so that is the zero element of for every . The semigroup contains exactly elements, namely the zero element and every product of distinct elements from .
Since the element is not contained in the subsemigroup generated by any proper subset of , it follows that every generator must appear in every straight-line program computing over ; hence, .
Proof of Theorem 10.
In view of Lemma 9 as well as Lemmas 11 and 12, it suffices to show that if and , then for some . To this end, let us first note that ; see [1, Exercise 6.4.2]. Assuming , we therefore have that if and only if . Almeida and Reilly [2, Proposition 4.4] have shown that the latter is equivalent to the condition where . Since , this condition holds for some provided that .
6 Permutative Semigroups
In this section, we examine efficient compression in pseudovarieties where every member satisfies a common permutation identity – that is, an identity where is a nontrivial permutation of the symbols . We refer to such pseudovarieties, and their members, as permutative.333Be aware that some authors define a permutative pseudovariety as a pseudovariety consisting of permutative semigroups, meaning that the permutation identity may differ between its members. This notion generalizes commutativity, which corresponds to the identity , and is equivalent to it for monoids.
Proposition 13.
Let be a permutative pseudovariety. Then .
This improves upon an upper bound previously established by Fleischer [16, Lemma 4.9], which shows that commutative semigroups admit straight-line programs of width three and length . In view of Theorem 10, our bound is asymptotically optimal.
Proof.
According to Putcha and Yaqub [27, Theorem 1], every permutation identity implies the identity for each sufficiently large . In the following, we fix some such that satisfies this identity.
Consider a semigroup , a generating set , and some element . Without loss of generality, the element is not a product of generators with or fewer factors. Under these assumptions, the element can then be written as
| (1) |
Fix the elements and involved in such an expression. Once these are fixed, we associate to each the element . We then also fix the lexicographically minimal tuple of exponents such that .
Suppose given such that in the component-wise order. We claim that, under these conditions, implies . Indeed, if , then
and, clearly, ; hence, by minimality of . This establishes our claim, which implies and, hence, .
Computing as in the expression (1) and using fast exponentiation yields a straight-line program of width three and length – the latter being due to the above inequality. Using a simultaneous variant of fast exponentiation, this can be done with two registers.
Combining Lemma 6 and Proposition 13, we arrive at the following characterization for pseudovarieties of aperiodic semigroups, i.e., for subpseudovarieties of .
Theorem 14.
Let be a pseudovariety. The following are equivalent.
-
(1)
The pseudovariety affords efficient compression.
-
(2)
The pseudovariety contains neither , , nor .
-
(3)
The pseudovariety is permutative.
-
(4)
The pseudovariety admits straight-line programs of width two and length .
Proof.
See Lemma 6 for , Proposition 13 entails , and holds by definition. For the implication we refer to [35, Corollary 16].
7 Groups
Having just established our main theorem for the case of aperiodic semigroups (Theorem 14), we now turn our attention to the pseudovarieties of groups.
Most of our group theory notation follows Robinson’s book [32]. In particular, denotes that is a normal subgroup of a group . Furthermore, denotes the conjugate of by and, for , we write for the subgroup generated by all commutators with and . We differ from the notation in Robinson’s book, however, by writing to denote the normal subgroup generated by ; that is, . Note that, since we only consider finite groups, the subgroup generated by a (nonempty) set coincides with the subsemigroup generated by it.
By Lagrange’s theorem, we have the following well-known and straight-forward observation, which will be used in the following without further reference.
Observation 15.
If with , then . In particular, for every there exists a subset such that and .
7.1 General Groups
When considering a group , we allow for the formation inverses in straight-line programs; that is, a group straight-line program over may use the following instruction types.
-
Assign the fixed element to the register .
-
Assign the product of the registers to the register .
-
Assign the inverse of the registers to the register .
This modification does not increase the expressiveness for finite groups compared to ordinary (semigroup) straight-line programs, since one can compute the inverse of a group element as . The following observation shows that the decrease in cost afforded by the extra instruction type is often negligible as well. Therein, and throughout this section, the group straight-line costs, which are defined just as in Section 3, are marked with a tilde.
Lemma 16.
Let be a pseudovariety of groups. Then, for all ,
Proof Sketch.
The second inequality arises from the on-the-fly computation of inverses via fast exponentiation. To see the first, the crucial step is to note that for all with . Indeed, one can compute the product of all , then invert this product using fast exponentiation and, finally, extract the inverses of the individual generators from the result. From there, we can emulate group straight-line programs over by using a separate register for each register to simultaneously compute inverses.
Due to the above, the following well-known result by Babai and Szemerédi [5, Theorem 3.1], which was originally stated for groups, can also be utilized in the semigroup setting.
Reachability Lemma (Babai, Szemerédi).
The pseudovariety , which consists of all finite groups, admits straight-line programs of width444While Babai and Szemerédi [5] do not discuss width bounds, this follows easily from their proof. and length .
Note that the bounds presented by Babai and Szemerédi are not necessarily optimal. For instance, Proposition 13 implies that the pseudovariety , which consists of all finite Abelian groups, satisfies . In the following, we present some techniques that might aid in future improvements of the bounds for general groups. The techniques will then be applied in Section 7.2 to obtain such improvements for solvable groups.
Definition 17.
Let be a group. We call a generating set adapted to a subnormal series555Recall that is a subnormal series if is normal in for all . provided that generates for all .
Moreover, we say that is a polycyclic generating set if it is adapted to a subnormal series with cyclic for all . Note that, as every generating set of an Abelian group is polycyclic, it follows that is a polycyclic generating set if and only if it is adapted to a subnormal series with Abelian quotients.
If a generating set is adapted to a subnormal series, then the associated straight-line costs are essentially dominated by those in the consecutive quotients.
Lemma 18.
Let be a group generated by a set , and let .666Here, we allow to be an arbitrary class of finite groups. Furthermore, suppose that is adapted to a subnormal series with satisfying for all . Then, for all and ,
In particular, if for some , then .
Note that this yields yet another proof that the pseudovariety of finite Abelian groups admits straight-line programs of bounded width and logarithmic length. Indeed, we can simply take to be the class of all finite cyclic groups, which satisfies .
Proof.
In the additional register, we accumulate with . Specifically, suppose that is already determined. Lifting an appropriately chosen straight-line program computing over – where denotes the quotient homomorphism – yields a straight-line program computing over with . Since the latter implies , we may continue the process until we eventually arrive at ; hence, .
For the addendum we assume, without loss of generality, that for all , so that . Then, since by Lagrange’s theorem, we obtain the equality and the bound . This implies desired bound on by superaditivity of the function .
7.2 Solvable Groups
Let us now turn our attention to solvable groups; that is, to groups admitting a subnormal series with Abelian consecutive quotients. The finite such groups form the pseudovariety .
Theorem 19.
Let be a pseudovariety with . Then
We suspect that it is also possible to show that for some slightly larger width bound using similar techniques. On the other hand, to answer whether or not the bound holds for some is likely to require new ideas.
In the following, we prove Theorem 19 by providing efficient constructions of polycyclic generating sets for solvable groups – the unbounded and bounded width cases being treated separately. Throughout, we write for the derived series of a group where and abbreviate and .
Lemma 20.
Let be a group, a normal subgroup, and . Then
In particular, if is a solvable group, then .
Proof.
The first implication can be found in Robinson’s book [32, 5.1.7]. For the second implication, note that if , then and, hence,
where the second equality is due to well-known commutator identities; see [32, 5.1.5].
The addendum follows by induction on the derived length of . We omit the details.
Given subsets and , we write and, in case consists of a single element , we abbreviate this to . This construction can be used to efficiently construct a generating set of the normal closure.
Lemma 21.
Let be a group, a generating set, and . If , then there exists some with and .
Proof.
To an initially empty set , we successively add elements with , , and such that (the size of) the group increases in every step. Since , this process terminates after at most steps. Hence, and, clearly, . We show that holds eventually.
Suppose that for some and . Since generates as a semigroup, we may assume that . Moreover, writing with , we see that for some , for otherwise . It follows that we may still add the element to the set , thereby continuing the process.
Combining the above Lemmas 20 and 21, we arrive at the following result. Together with Lemma 18, it implies the assertion of Theorem 19 for unbounded width.
Proposition 22.
Let be a solvable group with a generating set . Then there exists a generating set adapted to the derived series of with .
Proof.
For every , we will construct a set with and such that and for . In particular, the union will have the required properties, as
To begin the construction, we choose any of size with the property that . Now suppose that we have already constructed . To construct for , we proceed as follows. First, using Lemma 21, choose such that and . We then have by Lemma 20.
As the next step, we choose minimally with the property that and, hence, by Lemma 20. By minimality of , we have . Moreover, since for every , this yields .
Finally, we use Lemma 21 to obtain with and . Combining the straight-line costs yields
Unfortunately, the construction in Proposition 22 does not seem to adapt well to the case of bounded width straight-line programs. The problem is that the commutators formed in the construction have arguments and that are essentially independent of one another. Since the arguments and may themselves be commutators, nested to potentially unbounded depth, this rules out computation with a bounded number of registers.
This issue may be circumvented with an alternative construction: given subsets with generating , we let and define sets
for with . Recall from Lemma 21 that generates the normal subgroup and, hence, so does the union .
Note also that . Therefore, if is solvable, then for all , so that we then have .
Lemma 23.
If is solvable, then for all .
Proof.
Let where and with .
To prove the required bound on the straight-line cost, it suffices to show that can be computed by a straight-line program over of width three and length under the additional premiss that is already contained in one of the registers. To do so, we always keep in this register . We use one further register as an accumulator, which should hold the value at the end of execution. The third register is a utility register used for loading generators and for fast exponentiation (in particular, the computation of inverses). We allow for and to exchange these roles during the computation as necessary.
It remains to observe that can be computed from and by successively inverting the accumulator or multiplying the accumulator from the left or right by or elements from , and this requires only a constant number of inversions.
Lemma 24.
If is solvable, then is a polycyclic generating set of .
Proof.
We proceed by induction on the size of the group . We have , and if for some , then is a polycyclic generating set of the normal subgroup by induction. Hence, if holds for all , then is a polycyclic generating set of . Otherwise, we may as well assume that . By Lemma 21, is generated by . Hence, by Lemma 20 and, therefore, the set
satisfies . By induction, is a polycyclic generating set of . Now, observe that . Therefore, the set is indeed a polycyclic generating set of .
Proof of Theorem 19.
Let , a generating set, and . For the case of straight-line programs of unbounded width, Proposition 22 yields a polycyclic generating set with . By Lemma 18, applied with Abelian subquotients, we obtain . Hence, . This results in the estimate . In turn, Lemma 16 yields .
8 Completely Regular Semigroups
In this section, we classify the pseudovarieties of completely regular semigroups that afford efficient compression. Recall that a semigroup is completely regular if is a union of groups, and that finite such semigroups form a pseudovariety, which we denote by .
A semigroup is a band of groups if, for some band , there is a partition into disjoint subgroups such that for all . Bands of groups form an important subclass of the completely regular semigroups. Imposing restrictions on the band involved in the above decomposition naturally leads to the classes of semilattices of groups – commonly referred to as Clifford semigroups – and normal bands of groups.
The pseudovariety of normal bands plays an important role here, as it is the largest permutative pseudovariety of bands [39, Theorem 10] and the largest pseudovariety of bands containing neither of the obstructions nor [10, 15, 20].
The finite normal bands of groups form a pseudovariety, which we denote by .777We will only make use of this description as a Mal’cev product for notational purposes. If the involved groups are moreover confined to some pseudovariety , then we obtain the pseudovariety consisting of all finite normal bands of -groups. Crucially, results on efficient compression for groups in transfer to semigroups in .
Proposition 25.
Let for some pseudovariety . For all ,
Note that the first of these bounds is, except for the increase in width, essentially optimal. Indeed, if is not the trivial pseudovariety, then by Lemma 11.
For normal bands of solvable groups, we obtain the following due to Theorem 19.
Corollary 26.
Let be a pseudovariety. Then
Our proof of Proposition 25 relies on the following construction of generating sets for the subgroups involved in a decomposition as a normal band of groups.
Lemma 27.
Let be a finite normal band of groups generated by a set . Then is generated by where .
In the above, refers to Green’s preorder , meaning that holds for some . Note that satisfies if and only if in . Since is a normal band, this is furthermore equivalent to . Hence, .
Proof.
Suppose that and with . Then and, thus, for all . Considering the expression , we note that every prefix of the form belongs to where and, similarly, that every suffix of the form belongs to . Upon inserting the elements and , we obtain the expression wherein the pre- and suffixes of the form and belong to . Inserting the element yields
We have thus written as a product of elements as well as elements of the form . The latter also belong to , as such an element can be written as
Proof of Proposition 25.
Consider a semigroup , a generating set , and some element . Since , the semigroup admits a decomposition into subgroups belonging to for some normal band such that the map sending every element of a subgroup to the corresponding is a homomorphism.
Let be the neutral element the subgroups for some . We claim that this element can be efficiently computed by a straight-line program, viz., . To see this, first note that the pseudovariety is permutative and, therefore, by Proposition 13. Next, take any straight-line program in over that achieves this bound and lift it to a straight-line program in over . The lifted straight-line program computes some element , and we then obtain using fast exponentiation in instructions.
Let us now fix the unique with , and denote by the generating set of from Lemma 27. Further, let us fix a straight-line program computing over of width at most and length . For the case that two additional registers are permitted, we modify this straight-line program as follows. First, we compute as described above, and keep it in one of the additional registers throughout the computation. From this point on, we emulate on the original registers and, whenever we encounter an assignment for some generator , we use the register and the additional register not holding to compute or with as appropriate. This yields the estimate .
We proceed similarly if only one additional register is permitted, but temporarily overwrite the element when producing a generator of the form with .
Summarizing the preceding results, we arrive at the following characterization for pseudovarieties of completely regular semigroups with efficient compression.
Theorem 28.
Let be a pseudovariety. The following are equivalent.
-
(1)
The pseudovariety affords efficient compression.
-
(2)
The pseudovariety contains neither nor .
-
(3)
The pseudovariety comprises only normal bands of groups; that is, .
-
(4)
The pseudovariety admits straight-line programs of length .
Proof.
Lemma 6 shows that . The implication is a well-known result by Rasin [28, Proposition 4]: If and , then . (Recall that for any pseudovariety either holds, or contains or .)
Proposition 25 and the Reachability Lemma of Babai and Szemerédi [5, Theorem 3.1] combine to show the implication . Finally, holds by definition.
9 General Semigroups
In this section, we finally prove our main theorem (Theorem 1). The following restatement also reveals the close connection between the semigroup and group cases.
Theorem 29.
Let be a pseudovariety, and let . The following are equivalent.
-
(1)
The pseudovariety affords efficient compression.
-
(2)
The pseudovariety contains neither , , nor .
-
(3)
The pseudovariety satisfies the following for every :
In particular, admits straight-line programs of length .
Our proof of Theorem 29 is based on an observation on the structure of a pseudovariety with that was recently obtained by the first author [35, Theorem A, Theorem B].
Theorem 30.
Let be a pseudovariety. If , then one of the following holds.
-
(1)
There exist such that .
-
(2)
There exists with such that .
Notably, for monoids all identities in the first item of Theorem 30 are equivalent to the defining identity of completely regular monoids, and all identities in the second item are equivalent to the defining identity of commutative monoids. Additionally excluding and narrows the first item to the pseudovarieties of Clifford monoids by Rasin’s result [28, Proposition 4]. In this way, we obtain an alternative proof of Fleischer’s classification of pseudovarieties of monoids affording efficient compression [16, Theorem 4.13].
For semigroups, we will also need the following observation, which is a direct consequence of Volkov’s characterization [37, Theorem 1.1] (see also [35, Lemma 18]).
Lemma 31.
Let be a pseudovariety with . For every semigroup , the set of its completely regular elements is a subsemigroup of .
Proof of Theorem 29.
Lemma 6 shows that . Since the addendum in item follows from Babai and Szemerédi’s Reachability Lemma, we have that by definition.
Let us thus assume that holds. Recall from Theorem 30 that satisfies the identity
for some parameters , or is permutative otherwise. We may assume the former, since otherwise holds by Proposition 13 and this clearly implies .
Under this assumption, we have for a sufficiently large . Let , and note that and . Thus, also satisfies and, in light of Lemma 8, it suffices to prove that, for all ,
Consider a semigroup , a generating set , and some element . Without loss of generality, the element is not a product of generators with two or fewer factors. Under these assumptions, the element can be written as with .
For , let and note that . Further, let be the subsemigroup generated by the set . Since and the latter is a subsemigroup of by Lemma 31, we in fact have and, therefore, .
By Theorem 28, . Moreover, since , we have that . By Proposition 25, for every , there is a straight-line program computing over with (or ) and (resp. ) where . We modify the straight-line program by replacing every instruction with by the instruction where with . (In case satisfy , we choose arbitrarily between and .) The result of this modification is a straight-line program over of the same length and width as . Let be the element computed by corresponding to . We claim that .
To see this claim to be true, note that there is a word over that evaluates to and . Due to the identity ,
as required. Since, moreover, can be computed from using no additional registers, since , and at most four additional instructions, this completes the proof.
Remark 32.
By reusing one of the additional registers between the constructions in Lemma 8 and Proposition 25, the above bounds can be slightly improved to
Incorporating this improvement, we obtain the following due to Corollary 26.
Corollary 33.
Let be a pseudovariety, , and . Then
10 The Membership Problem
The membership problem is one of the most fundamental decision problems for algebraic structures. In the case of semigroups, this problem is given as follows.
- Input.
-
A semigroup , a subset , and an element .
- Question.
-
Is a member of the subsemigroup ?
Here, we consider a restricted variant memb with the additional promise that the subsemigroup888Be aware that in some related work, including [16, 17], not only the subsemigroup is restricted to the pseudovariety , but also the surrounding semigroup . As we require a weaker promise, we obtain a stronger algorithmic result (Corollary 35) than with the formulation from [16, 17]. belongs to some fixed pseudovariety . This includes the general problem as memb and allows for a more fine-grained analysis of the problem’s complexity.
There are different ways to represent the semigroup and its elements as part of the input. Our main focus is on the Cayley table model where is given as multiplication table and its elements as indices into its rows and columns; in this case, we denote the membership problem by memb. Other forms of input are considered at the end of this section.
Note that, in general, the membership problem memb is -complete [22]; in fact, this already holds for memb [16, Theorem 5.6]. On the other hand, our results – see Corollary 35 below – imply that, for any pseudovariety with , the corresponding membership problem memb cannot even be hard under -reductions for any complexity class containing parity – such as .
The following observation shows that efficient compression via straight-line programs gives rise to nontrivial complexity upper bounds for the membership problem. Both items can be found in the dissertation of Fleischer [16, Corollary 5.2, Corollary 5.3]. However, using the techniques by Collins, Grochow, Levet, and the second author [13] (where this fact has also been used implicitly), we can give a simpler proof of the second item.
Lemma 34 (Fleischer).
Let be a pseudovariety, and let .
-
(1)
If , then memb is in .
-
(2)
If , then memb is in .
Proof.
To certify membership of an element in a subsemigroup , we can use a suitable straight-line program over computing . We guess and execute , instruction by instruction, on the random access machine and accept once some register is assigned .
For the bounded-width case, observe that we only need to store a bounded number of elements, which only requires logarithmic space. In this case, the membership problem can thus be solved in , which is a subset of [13, Lemma 2.6].
Using this lemma, we obtain the following from Theorem 29 (thus, proving Corollary 2).
Corollary 35.
Let be a pseudovariety. The following are equivalent.
-
(1)
The pseudovariety affords efficient compression.
-
(2)
The pseudovariety contains neither , , nor .
-
(3)
The membership problem memb is in .
Furthermore, if contains neither , , , nor any nonsolvable group, then the membership problem memb is in and, hence, in .
Note that in some cases even smaller bounds are known: if or , then the membership problem is in [16, Proposition 4.5 and Corollary 5.2, Theorem 5.12].
Proof.
The first two items are equivalent by Theorem 29 and imply the third by Lemma 34.
On the other hand, if the problem memb is in , then for any fixed semigroup and generating set , a target element can only depend on a polylogarithmic number of generators as in one computation path the algorithm cannot access more elements during its running time – meaning that for some of polylogarithmic size. In turn, this implies that , , by Lemma 6.
Finally, if contains neither , , , nor any nonsolvable group, then the problem memb is in by Corollary 33 and Lemma 34.
Corollary 35 confirms, in particular, the conjecture by Barrington, Kadau, Lange, and McKenzie [7] that solvable groups have their membership problem in . Moreover, it completely reduces Fleischer’s question [17] whether all classes of semigroups that afford efficient compression have their membership problem in to the case of groups.
For membership in the transformation model, the semigroup is the semigroup of all maps from some finite set to itself, with elements given in a point-wise representation.
Corollary 36.
Let be a pseudovariety of semigroups with , , . Then the membership problem for -semigroups in the transformation model is in .
Note that this corollary is far from being optimal. Indeed, it should be rather easy to show that for the membership problem in the transformation model is in (building on [4]). Moreover, Fleischer, Stober, and the authors already showed that this holds for Clifford semigroups and, more generally, for strict inverse semigroups [18, Theorem B].
On the other hand, Corollary 36 has some interesting consequences to the minimum generating set problem (given a semigroup and a number , decide whether the semigroup can be generated by at most elements), the problem of solving equations, and the isomorphism problem. Indeed, if , , , then the former two problems can be solved in for semigroups from by simply guessing a suitable generating set (resp. a solution to the equations) and then checking its validity using the algorithm for the membership problem. Moreover, using a similar approach the isomorphism problem can be solved in , that is, in the second level of the polynomial-time hierarchy.
11 Conclusion
In this work, we classified those pseudovarieties of semigroups that afford efficient compression via straight-line programs and also considered the case of efficient compression via bounded-width straight-line programs. In the absence of nonsolvable groups, we obtained algorithms for the membership problem for such pseudovarieties, thereby solving open problems from [17] and [7]. We conclude with the following questions.
Question 37.
Suppose that the pseudovariety affords efficient compression.
-
Does admit straight-line program of logarithmic length and unbounded width?
-
Does admit straight-line program of polylogarithmic length and bounded width?
-
Does admit straight-line program of logarithmic length and bounded width?
We note that Theorem 29 reduces all three of these questions to pseudovarieties of groups. The second one is particularly interesting, as an affirmative answer would imply that all such pseudovarieties admit algorithms for their membership problem.
Question 38.
Which pseudovarieties have their membership problem in ?
We suspect that some of our results and techniques (in particular, Lemma 8 and Theorem 10) might be useful in making progress towards resolving this question. In contrast, addressing the following question appears to be a significantly more ambitious endeavor.
Question 39.
Does the membership problem exhibit a vs. -complete dichotomy?
Finally, we want to ask to what extent the methods of this work can be transferred to study compression in other algebraic structures such as rings and quasigroups.
References
- [1] J. Almeida. Finite Semigroups and Universal Algebra, volume 3 of Ser. Algebra. World Scientific Publishing Co., Inc., River Edge, NJ, 1994. doi:10.1142/2481.
- [2] J. Almeida and N. R. Reilly. Generalized varieties of commutative and nilpotent semigroups. Semigroup Forum, 30(1):77–98, 1984. doi:10.1007/BF02573439.
- [3] S. Arora and B. Barak. Computational Complexity – A Modern Approach. Cambridge University Press, 2009.
- [4] L. Babai, E. M. Luks, and Á. Seress. Permutation groups in NC. In STOC 1987, Proceedings, STOC ’87, pages 409–420, 1987. doi:10.1145/28395.28439.
- [5] L. Babai and E. Szemerédi. On the complexity of matrix group problems I. In FOCS 1984, Proceedings, pages 229–240, October 1984. doi:10.1109/SFCS.1984.715919.
- [6] H. Bannai. Grammar compression. In Encyclopedia of Algorithms, pages 861–866. Springer New York, 2016. doi:10.1007/978-1-4939-2864-4_635.
- [7] D. A. M. Barrington, P. Kadau, K.-J. Lange, and P. McKenzie. On the complexity of some problems on groups input as multiplication tables. J. Comput. Syst. Sci., 63(2):186–200, 2001. doi:10.1006/jcss.2001.1764.
- [8] D. A. M. Barrington and P. McKenzie. Oracle branching programs and Logspace versus P. Inform. and Comput., 95(1):96–115, 1991. doi:10.1016/0890-5401(91)90017-V.
- [9] M. Beaudry, P. McKenzie, and D. Thérien. The membership problem in aperiodic transformation monoids. J. ACM, 39(3):599–616, 1992. doi:10.1145/146637.146661.
- [10] A. P. Biryukov. Varieties of idempotent semigroups. Algebra Logic, 9(3):153–164, 1970. doi:10.1007/BF02218673.
- [11] P. Bürgisser, M. Clausen, and M. A. Shokrollahi. Algebraic complexity theory, volume 315 of Grundlehren der mathematischen Wissenschaften. Springer, 1997.
- [12] L. Ciobanu, V. Diekert, and M. Elder. Solution sets for equations over free groups are EDT0L languages. Int. J. Algebra Comput., 26(5):843–886, 2016. doi:10.1142/S0218196716500363.
- [13] N. A. Collins, J. A. Grochow, M. Levet, and A. Weiß. On the constant-depth circuit complexity of generating quasigroups. TheoretiCS, Volume 4, 2025. doi:10.46298/theoretics.25.19.
- [14] S. Eilenberg. Automata, languages, and machines. Vol. B. Pure and Applied Mathematics, Vol. 59. Academic Press, New York-London, 1976.
- [15] C. F. Fennemore. All varieties of bands I, II. Math. Nachr., 48(1-6):237–252; ibid., 253–262, 1971. doi:10.1002/mana.19710480118.
- [16] L. Fleischer. Algorithms and complexity results for finite semigroups. Dissertation, Institut für Formale Methoden der Informatik, Universität Stuttgart, 2019. doi:10.18419/opus-10339.
- [17] L. Fleischer. The Cayley semigroup membership problem. Theory Comput., 18:1–18, 2022. Conference version at CCC 2018. doi:10.4086/toc.2022.v018a008.
- [18] L. Fleischer, F. Stober, A. Thumm, and A. Weiß. Membership and conjugacy in inverse semigroups. In 52nd International Colloquium on Automata, Languages, and Programming, ICALP 2025, volume 334 of LIPIcs, pages 156:1–156:19. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2025. doi:10.4230/LIPIcs.ICALP.2025.156.
- [19] M. Ganardi, A. Jez, and M. Lohrey. Balancing straight-line programs. In D. Zuckerman, editor, 60th IEEE Annual Symposium on Foundations of Computer Science, FOCS 2019, Baltimore, Maryland, USA, November 9-12, 2019, pages 1169–1183. IEEE Computer Society, 2019. doi:10.1109/FOCS.2019.00073.
- [20] J. A. Gerhard. The lattice of equational classes of idempotent semigroups. J. Algebra, 15(2):195–224, 1970. doi:10.1016/0021-8693(70)90073-6.
- [21] A. Jez. Faster fully compressed pattern matching by recompression. ACM Trans. Algorithms, 11(3):20:1–20:43, 2015. doi:10.1145/2631920.
- [22] N. D. Jones, Y. E. Lien, and W. T. Laaser. New problems complete for nondeterministic log space. Math. Syst. Theory, 10(1):1–17, December 1976. doi:10.1007/BF01683259.
- [23] J. C. Kieffer and E.-H. Yang. Grammar-based codes: A new class of universal lossless source codes. IEEE Trans. Inf. Theory, 46(3):737–754, 2000. doi:10.1109/18.841160.
- [24] D. Kozen. Lower bounds for natural proof systems. In FOCS 1977, Proceedings, pages 254–266, Providence, Rhode Island, 1977. IEEE Computer Society Press.
- [25] M. Lohrey. Algorithmics on SLP-compressed strings: A survey. Groups Complexity Cryptology, 4:241–299, 2012. doi:10.1515/gcc-2012-0016.
- [26] M. Lohrey. The Compressed Word Problem for Groups. Springer Briefs in Mathematics. Springer, 2014. doi:10.1007/978-1-4939-0748-9.
- [27] M. S. Putcha and A. Yaqub. Semigroups satisfying permutation identities. Semigroup Forum, 3(1):68–73, 1971/72. doi:10.1007/BF02572944.
- [28] V. V. Rasin. On the varieties of Cliffordian Semigroups. Semigroup Forum, 23(1):201–220, 1981. doi:10.1007/BF02676644.
- [29] O. Reingold. Undirected connectivity in log-space. J. ACM, 55(4):17:1–17:24, September 2008. doi:10.1145/1391289.1391291.
- [30] J. Reiterman. The Birkhoff theorem for finite algebras. Algebra Universalis, 14(1):1–10, 1982. doi:10.1007/BF02483902.
- [31] J. Rhodes and B. Steinberg. The -theory of Finite Semigroups. Springer Monogr. Math. Springer, New York, NY, 2009. doi:10.1007/b104443.
- [32] D. J. S. Robinson. A course in the theory of groups, volume 80 of Graduate Texts in Mathematics. Springer-Verlag, New York, second edition, 1996. doi:10.1007/978-1-4419-8594-1.
- [33] A. Scholz. In: Aufgaben und Lösungen. Jahresber. Deutsch. Math.-Verein., 47:41–42, 1937.
- [34] C. C. Sims. Computational methods in the study of permutation groups. In Conference on Computational Problems in Abstract Algebra 1967, Proceedings, pages 169–183, New York, 1970. Pergamon. doi:10.1016/B978-0-08-012975-4.50020-5.
- [35] A. Thumm. Finite semigroups satisfying an identity . Preprint, 2025. arXiv:2509.19216.
- [36] J. van der Hoeven and G. Lecerf. Towards a library for straight-line programs. Preprint, 2025. URL: https://hal.science/hal-05075591.
- [37] M. V. Volkov. “Forbidden divisor” characterizations of epigroups with certain properties of group elements. RIMS Kokyuroku, 1166:226–234, 2000.
- [38] H. Vollmer. Introduction to Circuit Complexity - A Uniform Approach. Texts Theoret. Comput. Sci. EATCS Ser. Springer, 1999. doi:10.1007/978-3-662-03927-4.
- [39] M. Yamada and N. Kimura. Note on idempotent semigroups. II. Proc. Japan Acad., 34:110–112, 1958. doi:10.3792/pja/1195524790.
