Abstract 1 Introduction 2 Preliminaries 3 Compression via Straight-Line Programs 4 Obstructions to Efficient Compression 5 Semigroups of Bounded Diameter 6 Permutative Semigroups 7 Groups 8 Completely Regular Semigroups 9 General Semigroups 10 The Membership Problem 11 Conclusion References

Efficient Compression in Semigroups

Alexander Thumm ORCID University of Siegen, Germany Armin Weiß ORCID FMI, University of Stuttgart, Germany
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 problem
Copyright and License:
[Uncaptioned image] © Alexander Thumm and Armin Weiß; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Algebraic language theory
; Theory of computation Problems, reductions and completeness ; Theory of computation Circuit complexity
Related Version:
Full Version: https://arxiv.org/abs/2601.04747
Acknowledgements:
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ắng

1 Introduction

The membership problem asks, given a (finite) algebraic structure S, a set ΣS, and a target element tS, whether t belongs to the substructure of S 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 𝖠𝖢0-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 loglogn), 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 k, all S𝐕 of size |S|N admit straight-line programs of length 𝒪(logkN); see Section 3. Here, the following three pseudovarieties – each requiring straight-line programs of length Ω(N) – play a crucial role, since they serve as primary obstructions:

𝐋𝐑𝐁=x2x,xyxxy,𝐑𝐑𝐁=x2x,xyxyx,𝐓=x2xyx0.
Theorem 1.

Let 𝐕 be a pseudovariety of semigroups. The following are equivalent.

  1. (1)

    The pseudovariety 𝐕 affords efficient compression.

  2. (2)

    The pseudovariety 𝐕 contains neither 𝐋𝐑𝐁, 𝐑𝐑𝐁, nor 𝐓.

  3. (3)

    The pseudovariety 𝐕 admits straight-line programs of length 𝒪(log2N).

Furthermore, if all groups in 𝐕 are solvable, then the above are equivalent to 𝐕 admitting straight-line programs of length 𝒪(logN) as well as of width 𝒪(1) and length 𝒪(polylogN).

Moreover, if 𝐕𝐑𝐁𝐍k for some k1, 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 49.

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. (1)

    The membership problem memb(𝐕)𝐂𝐓 is in 𝖭𝖯𝖮𝖫𝖸𝖫𝖮𝖦𝖳𝖨𝖬𝖤𝗊𝖠𝖢0.

  2. (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 𝐆sol of all finite solvable groups.

Corollary 3.

The problem memb(𝐆sol)𝐂𝐓 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 x1xnx1xi1(xixj)ω+1xj+1xn. This condition properly generalizes complete regularity (that is, being a union of groups), which is characterized by the identity xxω+1. 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 x1xnxσ(1)xσ(n) holds for all members of 𝐕, where σSym(n) is some nontrivial permutation of the symbols 1,,n. This notion properly generalizes commutativity, which is characterized by the identity xyyx. 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 𝒪(logN) 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 𝒪(logN) 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 S, we write TS to indicate that TS is a subsemigroup. For an arbitrary subset ΣS, we denote by Σ the subsemigroup generated by Σ, consisting of all elements of S expressible as a product of elements of Σ. We write Σk for the set of all elements expressible in this way by a product of length at most k. The set of completely regular elements of a finite semigroup S is denoted by I(S)={sS:sω+1=s} where, as usual, sω denotes the unique idempotent power of an element s of a finite semigroup.

Table 1: Important pseudovarieties (left) and their relationships (right).
Symbol Identities Description
𝐒 all semigroups
𝐁 x2x bands (idempotent semigroups)
𝐈 xy trivial semigroups
𝐂𝐑 xω+1x completely regular semigroups
𝐆 xω1 groups
𝐀 xω+1xω aperiodic semigroups
𝐍 xω0 nilpotent semigroups
𝐂𝐨𝐦 xyyx 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, 𝐂𝐨𝐦=xyyx indicates that 𝐂𝐨𝐦 is the pseudovariety consisting of all finite semigroups satisfying the identity xyyx, 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:

𝐋𝐑𝐁=x2x,xyxxy,𝐑𝐑𝐁=x2x,xyxyx,𝐓=x2xyx0.

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 𝐑𝐁=x2x,xyzxz, comprising rectangular bands;222Be aware that in the literature 𝐑𝐁 sometimes denotes the pseudovariety of regular bands instead. 𝐒𝐥=𝐁𝐂𝐨𝐦=x2x,xyyx, comprising semilattices; and 𝐍𝐁=x2x,uxyvuyxv, 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 S𝐕𝐍 if and only if the ideal SkS belongs to 𝐕 for some k1 – that is, the semigroup S is an extension of Sk𝐕 by the Rees quotient S/Sk𝐍, which is obtained by identifying all elements of Sk. Fixing k1 yields the pseudovariety 𝐕𝐍k instead, where 𝐍k=x1xk0 refers to the pseudovariety of finite k-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 polylogn for log𝒪(1)n.

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 i in binary, the ith 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 t(n),s(n)Ω(logn), the classes 𝖣𝖳𝖨𝖲𝖯(t(n),s(n)) and 𝖭𝖳𝖨𝖲𝖯(t(n),s(n)) consist of the problems decidable by (non-)deterministic, 𝒪(t(n))-time and 𝒪(s(n))-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 𝖣𝖳𝖨𝖬𝖤(t(n)) and 𝖭𝖳𝖨𝖬𝖤(t(n)). We also define

𝖭𝖯𝖮𝖫𝖸𝖫𝖮𝖦𝖳𝖨𝖬𝖤=𝖭𝖳𝖨𝖬𝖤(polylogn)=c1𝖭𝖳𝖨𝖬𝖤(logcn).

The class 𝖠𝖢0 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 𝗊𝖠𝖢0 are defined analogously but allowing for circuits of polynomial size and depth 𝒪(loglogn), and for quasipolynomial size (i.e., 2polylogn) and constant depth, respectively. Throughout, we consider only uniform circuit classes (specifically, 𝖣𝖳𝖨𝖬𝖤(logn)-uniform circuits for 𝖠𝖢0 and 𝖥𝖮𝖫𝖫, and 𝖣𝖳𝖨𝖬𝖤(polylogn)-uniform circuits for 𝗊𝖠𝖢0), 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 S, a straight-line program 𝒜 over a set ΣS 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 {r1,r2,}. Each register rk can store a single element of the semigroup S, and the straight-line program may use the following two instruction types to alter the contents of the registers.

  • Assign the fixed element sΣ to the register rk. rks

  • Assign the product of the registers ri,rj to the register rk. rkrirj

In the second type of instruction, the registers ri, rj, and rk are not necessarily distinct, but we require that the input registers ri and rj were each assigned in some previous instruction.

The straight-line program 𝒜 is said to compute a semigroup element tS if, upon completion of execution, some register rk contains the value t. More generally, 𝒜 computes some set TS if it computes every tT, and the largest such set is the value set V(𝒜).

The length (𝒜) and width w(𝒜) 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 S be a finite semigroup and ΣS. Given a set TS and a width bound 2w, we define the straight-line cost of T over Σ to be the quantity

cSw(T;Σ)min{(𝒜):𝒜 is a straight-line program over Σ with TV(𝒜) and w(𝒜)w}.

The straight-line cost of an element tS, written cSw(t;Σ), is defined analogously. Sometimes we employ more general terminology and refer to either straight-line programs of bounded width, corresponding to arbitrary w<, or unbounded width, in the case where w=.

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 S be a finite semigroup, Σ,ΔS, and tS. Then, for all 2w,δ,

cSw+δ(t;Σ)cSw(t;ΣΔ)+cSδ(Δ;Σ)andcSw+δ1(t;Σ)cSw(t;ΣΔ)maxtΔcSδ(t;Σ).

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 S be a finite semigroup, tS, and n1. Then cS2(tn;{t})𝒪(logn).

One of our primary concerns are worst-case bounds for cSw(t;Σ) as ΣS and tS vary; that is, in the quantity CSwmax{cSw(t;Σ):tΣS}. More specifically, we seek to asymptotically bound CSw in the size of the semigroup S as the latter ranges over the members of a given pseudovariety 𝐕. To this end, let us define C𝐕w: by

C𝐕w(N)max{CSw:S𝐕,|S|N}.

We then say that 𝐕 admits straight-line programs of width w and length 𝒪(f(N)) provided that C𝐕w(N)𝒪(f(N)) and, conversely, that 𝐕 requires straight-line programs of length Ω(f(N)) provided that C𝐕(N)Ω(f(N)). Finally, we say that a pseudovariety 𝐕 affords efficient compression (via straight-line programs) if C𝐕(N)𝒪(polylogN).

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:

𝐋𝐑𝐁=x2x,xyxxy,𝐑𝐑𝐁=x2x,xyxyx,𝐓=x2xyx0.

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 N1, there exist S𝐕 with |S|N, a generating set ΣS with |Σ|Ω(N), and an element tS such that no subsemigroup generated by a proper subset of Σ contains t.

In particular, C𝐕(N)Ω(N); that is, 𝐕 requires straight-line programs of length Ω(N).

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 Ω(logN).

Definition 7.

Let 𝐕 be a pseudovariety. We say that 𝐕 has bounded diameter if there is a constant D1 such that, for every S𝐕 and generating set ΣS, it holds that ΣD=S; that is, every element tS is a product of generators from Σ of length at most D.

Clearly, if 𝐕 has bounded diameter, then C𝐕2(N)2D1 (with D as above); and, conversely, if C𝐕(N)C for some constant C, then 𝐕 has bounded diameter (with D=2C). In other words, the pseudovarieties of bounded diameter are precisely the pseudovarieties admitting straight-line programs of length (and width) 𝒪(1). An obvious example of such a pseudovariety is 𝐍k=x1xk0, which consists of all finite k-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 𝐕𝐍k. (Indeed, it applies to 𝐍k=𝐈𝐍k where 𝐈=x1 is the trivial pseudovariety.) Recall that a finite semigroup S belongs to the pseudovariety 𝐕𝐍k if and only if its ideal SkS belongs to 𝐕.

Lemma 8.

Let 𝐕𝐕𝐍k for a pseudovariety 𝐕 and k1. Then, for all 2w,

C𝐕w+1(N)C𝐕w(N)(4k3).

Herein, the factor 4k3 is a constant and, hence, suppressed in Landau notation, in which the bound reads C𝐕w+1(N)𝒪(C𝐕w(N)). However, be aware that 𝐍=k𝐍k, which consists of all finite nilpotent semigroups, does not afford efficient compression since 𝐓𝐍.

Proof.

Consider a semigroup S𝐕, a generating set ΣS, and an element tS. If the element t is not contained in the ideal SkS, then it can be written as a product of generators from Σ of length less than k; hence cS2(t;Σ)2k3. Otherwise, since Sk𝐕 is generated by the set Δ=Σ2k1Sk, the second inequality of Lemma 4 yields

cSw+1(t;Σ)cSkw(t;Δ)maxtΔcS2(t;Σ)C𝐕w(|S|)(4k3).

Another example of bounded diameter is given by 𝐑𝐁=x2x,xyzxz, which consists of all finite rectangular bands, and satisfies C𝐑𝐁2(N)3. Combining the latter with Lemma 8 yields C𝐕3(N)12k9 for every pseudovariety 𝐕𝐑𝐁𝐍k. Using a direct argument (which is straight-foreword and, therefore, omitted), this can be slightly improved.

Lemma 9.

If 𝐕𝐑𝐁𝐍k for some k1, then C𝐕2(N)6k3.

Fleischer showed that the pseudovariety 𝕃𝐈k=x1xkyz1zkx1xkz1zk has bounded diameter for all k1 [16, Proposition 4.5]. However, since 𝕃𝐈k𝐑𝐁𝐍2k𝕃𝐈3k holds for every k1, this is equivalent to the above. As it turns out, every pseudovariety of bounded diameter is contained in 𝐑𝐁𝐍k or, equivalently, in 𝕃𝐈k for some k1.

Theorem 10.

Let 𝐕 be a pseudovariety. Then exactly one of the following holds.

  • The pseudovariety 𝐕 has bounded diameter. In particular, C𝐕2(N)𝒪(1).

  • The pseudovariety 𝐕 requires straight-line programs of length Ω(logN).

Moreover, the former is the case if and only if 𝐕𝐑𝐁𝐍k for some k1.

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 𝕃𝐈=xωyxωxω of locally trivial semigroups, that is, semigroups having only trivial submonoids. By [1, Exercise 6.4.2], it satisfies

𝕃𝐈=𝐑𝐁𝐍=k1𝐑𝐁𝐍k=k1𝕃𝐈k.

The following observation is also contained in Fleischer’s dissertation [16, Proposition 4.7].

Lemma 11 (Fleischer).

Let 𝐕 be a pseudovariety with 𝐕𝕃𝐈. Then C𝐕(N)Ω(logN).

The second case concerns the pseudovariety 𝐔=𝐓𝐂𝐨𝐦=xyyx,x20, which serves as a direct obstruction to the property of having bounded diameter.

Lemma 12.

Let 𝐕 be a pseudovariety with 𝐔𝐕. Then C𝐕(N)Ω(logN).

Proof.

For every n1, the semigroup S=s1,,sn:sisj=sjsi,si2sj=si2(1i,jk) is contained in 𝐔𝐕. Indeed, the defining relations imply si2=si2sj2=sj2, so that s2 is the zero element of S for every sS. The semigroup S contains exactly 2n elements, namely the zero element and every product of distinct elements from Σ{s1,,sn}.

Since the element t=s1snS 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 t over Σ; hence, cS(t;Σ)Ω(log|S|).

Proof of Theorem 10.

In view of Lemma 9 as well as Lemmas 11 and 12, it suffices to show that if 𝐕𝕃𝐈 and 𝐔𝐕, then 𝐕𝐑𝐁𝐍k for some k1. To this end, let us first note that 𝕃𝐈=𝐑𝐁𝐍; see [1, Exercise 6.4.2]. Assuming 𝐕𝕃𝐈, we therefore have that 𝐕𝐑𝐁𝐍k if and only if 𝐕𝐍𝐍k. Almeida and Reilly [2, Proposition 4.4] have shown that the latter is equivalent to the condition 𝐔k+1𝐕𝐍 where 𝐔k+1=𝐔𝐍k+1. Since k1𝐔k=𝐔𝐍, this condition holds for some k1 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 x1xnxσ(1)xσ(n) where σSym(n) is a nontrivial permutation of the symbols 1,,n. 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 xyyx, and is equivalent to it for monoids.

Proposition 13.

Let 𝐕 be a permutative pseudovariety. Then C𝐕2(N)𝒪(logN).

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 𝒪(log2N). 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 u1ukxyv1vku1ukyxv1vk for each sufficiently large k0. In the following, we fix some k1 such that 𝐕 satisfies this identity.

Consider a semigroup S𝐕, a generating set ΣS, and some element tS. Without loss of generality, the element t is not a product of generators with 2k or fewer factors. Under these assumptions, the element t can then be written as

t=us1ν1snνnvwith s1,,snΣu,vΣk, and ν1,,νn0. (1)

Fix the elements s1,,snΣ and u,vΣk involved in such an expression. Once these are fixed, we associate to each μ=(μ1,,μn)n the element sμs1μ1snμnS{1}. We then also fix the lexicographically minimal tuple of exponents νn such that t=usνv.

Suppose given ξ,ηn such that ξ,ην in the component-wise order. We claim that, under these conditions, usξ=usη implies ξ=η. Indeed, if ξlexη, then

t=usνv=usηsνηv=usξsνηv=usνη+ξv

and, clearly, νη+ξlexν; hence, ξ=η by minimality of ν. This establishes our claim, which implies (ν1+1)(νn+1)|S| and, hence, log(ν1+1)++log(νn+1)log|S|.

Computing t as in the expression (1) and using fast exponentiation yields a straight-line program of width three and length 𝒪(log|S|) – 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 𝐀=xω+1xω.

Theorem 14.

Let 𝐕𝐀 be a pseudovariety. The following are equivalent.

  1. (1)

    The pseudovariety 𝐕 affords efficient compression.

  2. (2)

    The pseudovariety 𝐕 contains neither 𝐋𝐑𝐁, 𝐑𝐑𝐁, nor 𝐓.

  3. (3)

    The pseudovariety 𝐕 is permutative.

  4. (4)

    The pseudovariety 𝐕 admits straight-line programs of width two and length 𝒪(logN).

Proof.

See Lemma 6 for (1)(2), Proposition 13 entails (3)(4), and (4)(1) holds by definition. For the implication (2)(3) 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, NG denotes that N is a normal subgroup of a group G. Furthermore, gh=h1gh denotes the conjugate of gG by hG and, for Δ,ΣG, we write [Δ,Σ] for the subgroup generated by all commutators [g,h]=g1h1gh with gΔ and hΣ. We differ from the notation in Robinson’s book, however, by writing Σ to denote the normal subgroup generated by Σ; that is, Σ=gh:gΣ,hG. 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 HG with HG, then 2|H||G|. In particular, for every ΣG there exists a subset ΔΣ such that Δ=Σ and |Δ|log|Σ|.

7.1 General Groups

When considering a group G, we allow for the formation inverses in straight-line programs; that is, a group straight-line program over ΣG may use the following instruction types.

  • Assign the fixed element gΣ to the register rk. rkg

  • Assign the product of the registers ri,rj to the register rk. rkrirj

  • Assign the inverse of the registers ri to the register rk. rkri1

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 g as g1=gω1. 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 2w,

C𝐇(N)2C~𝐇(N)+𝒪(logN)andC𝐇w+1(N)C~𝐇w(N)𝒪(logN).

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 cG(Σ1;Σ)𝒪(log|G|) for all ΣG with |Σ|log|G|. Indeed, one can compute the product of all gΣ, 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 r¯ for each register r 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 𝐆=xω1, 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. 𝒪(logN) and length 𝒪(log2N).

Note that the bounds presented by Babai and Szemerédi are not necessarily optimal. For instance, Proposition 13 implies that the pseudovariety 𝐆Ab, which consists of all finite Abelian groups, satisfies C𝐆Ab2(N)𝒪(logN). 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 G be a group. We call a generating set ΣG adapted to a subnormal series555Recall that G=G0Gn=1 is a subnormal series if Gi is normal in Gi1 for all 1in. G=G0Gn=1 provided that ΣGi1 generates Gi1 for all 1in.

Moreover, we say that ΣG is a polycyclic generating set if it is adapted to a subnormal series G=G0Gn=1 with Gi1/Gi cyclic for all 1in. Note that, as every generating set of an Abelian group is polycyclic, it follows that ΣG is a polycyclic generating set if and only if it is adapted to a subnormal series with Abelian quotients.

If a generating set ΣG is adapted to a subnormal series, then the associated straight-line costs cGw(t;Σ) are essentially dominated by those in the consecutive quotients.

Lemma 18.

Let G be a group generated by a set ΣG, and let 𝐇𝐆.666Here, we allow 𝐇𝐆 to be an arbitrary class of finite groups. Furthermore, suppose that Σ is adapted to a subnormal series G=G0Gn=1 with HiGi1/Gi satisfying Hi𝐇 for all 1in. Then, for all tG and 2w,

cGw+1(t;Σ)C𝐇w(|H1|)++C𝐇w(|Hn|)+n1.

In particular, if C𝐇w(N)𝒪(logcN) for some c1, then cGw+1(t;Σ)𝒪(logc|G|).

Note that this yields yet another proof that the pseudovariety 𝐆Ab 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 C𝐇2(N)𝒪(logN).

Proof.

In the additional register, we accumulate t=t1tn with tiGi1. Specifically, suppose that ti=(t1ti1)1tGi1 is already determined. Lifting an appropriately chosen straight-line program computing πi(ti)Hi over πi(ΣGi1) – where πi:Gi1Hi denotes the quotient homomorphism – yields a straight-line program computing tiGi1 over ΣGi1 with πi(ti)=πi(ti). Since the latter implies ti+1Gi, we may continue the process until we eventually arrive at tn+1Gn=1; hence, t=t1tn.

For the addendum we assume, without loss of generality, that Hi1 for all 1in, so that |H1|,,|Hn|2. Then, since |H1||Hn|=|G| by Lagrange’s theorem, we obtain the equality log|H1|++log|Hn|=log|G| and the bound nlog|G|. This implies desired bound on cGw+1(t;Σ) by superaditivity of the function logc:[1,)[0,).

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 𝐆sol.

Theorem 19.

Let 𝐇 be a pseudovariety with 𝐇𝐆sol. Then

C𝐇(N)𝒪(logN)andC𝐇4(N)𝒪(log3N).

We suspect that it is also possible to show that C𝐇w(N)𝒪(log2N) for some slightly larger width bound w< using similar techniques. On the other hand, to answer whether or not the bound C𝐇w(N)𝒪(logN) holds for some w< 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 G=G(0)G(1) for the derived series of a group G where G(k)=[G(k1),G(k1)] and abbreviate GG(1) and G′′G(2).

Lemma 20.

Let G be a group, NG a normal subgroup, and ΔN. Then

N=ΔN′′N=[Δ,Δ]N′′andN=ΔNN=ΔN′′.

In particular, if N is a solvable group, then N=ΔNN=Δ.

Proof.

The first implication can be found in Robinson’s book [32, 5.1.7]. For the second implication, note that if N=ΔN, then N=Δ[ΔN,ΔN] and, hence,

NΔ[ΔN,ΔN]=Δ[Δ,Δ][Δ,N][N,N]=ΔN′′

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 N. We omit the details.

Given subsets Δ,ΣG and k0, we write NCk(Δ;Σ)={gh:gΔ,hΣk} and, in case Δ consists of a single element gG, we abbreviate this to NCk(g;Σ). This construction can be used to efficiently construct a generating set of the normal closure.

Lemma 21.

Let G be a group, ΣG a generating set, and ΔG. If klog|Δ/Δ|, then there exists some ΞNCk(Δ;Σ) with Δ=ΔΞ and c~G(Ξ;ΔΣ)5k.

Proof.

To an initially empty set Ξ, we successively add elements gh with gΔΞ, hΣ, and such that (the size of) the group ΔΞ increases in every step. Since ΔΞΔ, this process terminates after at most log|Δ/Δ|k steps. Hence, ΞNCk(Δ;Σ) and, clearly, c~G(Ξ;ΔΣ)5k. We show that Δ=ΔΞ holds eventually.

Suppose that ghΔΞ for some gΔΞ and hG. Since Σ generates G as a semigroup, we may assume that hΣ. Moreover, writing g=g1gn with g1,,gnΔΞ, we see that gihΔΞ for some 1in, for otherwise gh=g1hgnhΔΞ. It follows that we may still add the element gih 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 G be a solvable group with a generating set Σ. Then there exists a generating set ΔG adapted to the derived series of G with c~G(Δ;Σ)𝒪(log|G|).

Proof.

For every i0, we will construct a set ΔiG(i) with G(i)=ΔiG(i+1) and such that c~G(Δ0;Σ)log|G(0)/G(1)| and c~G(Δi;Δi1Σ)17log|G(i1)/G(i+1)| for i1. In particular, the union Δ=i0Δi will have the required properties, as

c~G(Δ;Σ)c~G(Δ0;Σ)+i1c~G(Δi;Δi1Σ)18log|G|+17log|G|𝒪(log|G|).

To begin the construction, we choose any Δ0Σ of size |Δ0||G(0)/G(1)| with the property that G=Δ0G. Now suppose that we have already constructed Δ0,,Δi1. To construct Δi for i1, we proceed as follows. First, using Lemma 21, choose ΞG(i1) such that Δi1G(i+1)=Δi1ΞG(i+1) and c~G(Ξ;Δi1Σ)5log|G(i1)/G(i+1)|. We then have G(i1)=Δi1G(i+1)=Δi1ΞG(i+1) by Lemma 20.

As the next step, we choose Θ{[g,h]:g,hΔi1Ξ} minimally with the property that ΘG(i+1)=[Δi1Ξ,Δi1Ξ]G(i+1) and, hence, G(i)=ΘG(i+1) by Lemma 20. By minimality of Θ, we have |Θ|log|G(i)/G(i+1)|. Moreover, since c~G(t;Δi1Ξ)7 for every tΘ, this yields c~G(Θ;Δi1Ξ)7log|G(i)/G(i+1)|.

Finally, we use Lemma 21 to obtain ΔiG(i) with ΔiG(i+1)=ΘG(i+1)=G(i) and c~G(Δi;ΘΣ)5log|G(i)/G(i+1)|. Combining the straight-line costs yields

c~G(Δi;Δi1Σ)c~G(Δi;ΘΣ)+c~G(Θ;ΞΣ)+c~G(Ξ;Δi1Σ)12log|G(i)/G(i+1)|+5log|G(i1)/G(i+1)|17log|G(i1)/G(i+1)|.

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 [g,h] formed in the construction have arguments g and h that are essentially independent of one another. Since the arguments g and h 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 Δ,ΣG with Σ generating G, we let k=log|G| and define sets

PCCi+1(Δ;Σ)=NCk({[g,g~]:gPCCi(Δ;Σ),g~NCk(g;Σ)};Σ)

for i0 with PCC0(Δ;Σ)=NCk(Δ;Σ). Recall from Lemma 21 that PCC0(Δ;Σ) generates the normal subgroup Δ and, hence, so does the union PCC(Δ;Σ)=i0PCCi(Δ;Σ).

Note also that PCCi(Δ;Σ)G(i). Therefore, if G is solvable, then PCCi(Δ;Σ)=1 for all ik, so that we then have PCC(Δ;Σ)=PCC0(Δ;Σ)PCCk(Δ;Σ).

Lemma 23.

If G is solvable, then cG3(t;ΔΣ)𝒪(log2|G|) for all tPCC(Δ;Σ).

Proof.

Let t=[g,g~]uPCCi(Δ;Σ) where gPCCi1(Δ;Σ) and g~=gv with u,vΣk.

To prove the required bound on the straight-line cost, it suffices to show that t can be computed by a straight-line program over ΔΣ of width three and length 𝒪(log|G|) under the additional premiss that g is already contained in one of the registers. To do so, we always keep g in this register rg. We use one further register ra as an accumulator, which should hold the value t at the end of execution. The third register ru is a utility register used for loading generators and for fast exponentiation (in particular, the computation of inverses). We allow for ra and ru to exchange these roles during the computation as necessary.

It remains to observe that t=u1g1v1g1vgv1gvu can be computed from g and Σ by successively inverting the accumulator or multiplying the accumulator from the left or right by g or elements from Σ, and this requires only a constant number of inversions.

Lemma 24.

If G is solvable, then PCC(Δ;Σ) is a polycyclic generating set of Δ.

Proof.

We proceed by induction on the size of the group Δ. We have Δ=gΔg, and if Δg for some gΔ, then PCC({g};Σ) is a polycyclic generating set of the normal subgroup g by induction. Hence, if Δg holds for all gΔ, then PCC(Δ;Σ)=gΔPCC({g};Σ) is a polycyclic generating set of Δ. Otherwise, we may as well assume that Δ={g}. By Lemma 21, Ng is generated by NCk(g;Σ). Hence, N=[NCk(g;Σ),NCk(g;Σ)] by Lemma 20 and, therefore, the set

Δ{[h,h~]:hPCC0({g};Σ),h~NCk(g;Σ)}{[h,h]:h,hNCk(g;Σ)}

satisfies N=Δ. By induction, PCC(Δ;Σ) is a polycyclic generating set of N. Now, observe that PCC0(Δ;Σ)=NCk(Δ;Σ)=PCC1(Δ;Σ). Therefore, the set PCC(Δ;Σ)=PCC0(Δ;Σ)PCC(Δ;Σ) is indeed a polycyclic generating set of N=Δ.

Proof of Theorem 19.

Let G𝐇𝐆sol, ΣG a generating set, and tG. For the case of straight-line programs of unbounded width, Proposition 22 yields a polycyclic generating set ΔG with c~G(Δ;Σ)𝒪(log|G|). By Lemma 18, applied with Abelian subquotients, we obtain cG(t;Δ)𝒪(log|G|). Hence, c~G(t;Σ)cG(t;Δ)+c~G(Δ;Σ)𝒪(log|G|). This results in the estimate C~𝐇(N)𝒪(logN). In turn, Lemma 16 yields C𝐇(N)𝒪(logN).

For bounded width, Δ=PCC(Σ;Σ) is a polycyclic generating set of G by Lemma 24. By Lemma 18, applied with cyclic subquotients, we obtain cG3(t;Δ)𝒪(log|G|). Hence,

cG5(t;Σ)cG3(t;Δ)maxtΔcG3(t;Δ)𝒪(log|G|)𝒪(log2|G|)𝒪(log3|G|)

where the first inequality is due to Lemma 4 and the second uses Lemma 23. In fact, we can obtain cG4(t;Σ)𝒪(log3|G|) by reusing registers between Lemma 23 and Lemma 18.

8 Completely Regular Semigroups

In this section, we classify the pseudovarieties of completely regular semigroups that afford efficient compression. Recall that a semigroup S is completely regular if S is a union of groups, and that finite such semigroups form a pseudovariety, which we denote by 𝐂𝐑=xxω+1.

A semigroup S is a band of groups if, for some band B, there is a partition S=αBSα into disjoint subgroups SαS such that SαSβSαβ for all α,βB. Bands of groups form an important subclass of the completely regular semigroups. Imposing restrictions on the band B 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 𝐍𝐁=x2x,uxyvuyxv 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 2w,

C𝐕w+2(N)𝒪(C𝐇w(N)+logN)andC𝐕w+1(N)𝒪(C𝐇w(N)logN).

Note that the first of these bounds is, except for the increase in width, essentially optimal. Indeed, if 𝐇𝐆 is not the trivial pseudovariety, then C𝐇(N)Ω(logN) by Lemma 11.

For normal bands of solvable groups, we obtain the following due to Theorem 19.

Corollary 26.

Let 𝐕𝐆sol𝐍𝐁 be a pseudovariety. Then

C𝐕(N)𝒪(logN)andC𝐕6(N)𝒪(log3N),C𝐕5(N)𝒪(log4N).

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 S=αBSα be a finite normal band of groups generated by a set ΣS. Then Sα is generated by Σα={eαseαS:sΣ2,s𝒥eα} where eα=eα2Sα.

In the above, s𝒥eα refers to Green’s preorder 𝒥, meaning that eα=usv holds for some u,vS{1}. Note that sSβ satisfies s𝒥eα if and only if β𝒥α in B. Since B is a normal band, this is furthermore equivalent to αβα=α. Hence, ΣαSα.

Proof.

Suppose that tSα and t=s1sn with s1,,snΣ. Then eαt𝒥si and, thus, eα𝒥si for all 1in. Considering the expression t=eαs1sneα, we note that every prefix of the form eαs1si belongs to Sαβi where siSβi and, similarly, that every suffix of the form sisneα belongs to Sβiα. Upon inserting the elements eαβi and eβiα, we obtain the expression t=eαs1eαβ1eβiαsieαβieβnαsneα, wherein the pre- and suffixes of the form eαeβiα and eαβieα belong to Sα. Inserting the element eα yields

t=(eαs1eα)eαβ1eβiα(eαsieα)eαβieβnα(eαsneα).

We have thus written t as a product of elements eαsieαΣα as well as elements of the form eαβieβjα. The latter also belong to ΣαSα, as such an element can be written as

eαβieβjα=(eαsi)ω(sjeα)ω =(eαsieα)ω1(eαsisjeα)(eαsjeα)ω1.

Proof of Proposition 25.

Consider a semigroup S𝐕, a generating set ΣS, and some element tS. Since 𝐕𝐇𝐍𝐁, the semigroup S admits a decomposition S=αBSα into subgroups SαS belonging to 𝐇 for some normal band B such that the map π:SB sending every element of a subgroup Sα to the corresponding αB is a homomorphism.

Let eα be the neutral element the subgroups SαS for some αB. We claim that this element can be efficiently computed by a straight-line program, viz., cS2(eα;Σ)𝒪(log|S|). To see this, first note that the pseudovariety 𝐍𝐁=x2x,uxyvuyxv is permutative and, therefore, cB2(α;π(Σ))𝒪(log|B|)𝒪(log|S|) by Proposition 13. Next, take any straight-line program in B over π(Σ) that achieves this bound and lift it to a straight-line program in S over Σ. The lifted straight-line program computes some element tαSα, and we then obtain eα=tαω using fast exponentiation in 𝒪(log|Sα|)𝒪(log|S|) instructions.

Let us now fix the unique αB with tSα, and denote by Σα the generating set of Sα from Lemma 27. Further, let us fix a straight-line program 𝒜 computing t over ΣαSα of width at most w and length cSαw(t;Σα). For the case that two additional registers are permitted, we modify this straight-line program as follows. First, we compute eαSα 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 ris for some generator sΣα, we use the register ri and the additional register not holding eα to compute s=eαs1eα or s=eαs1s2eα with s1,s2Σ as appropriate. This yields the estimate cSw+2(t;Σ)5cSαw(t;Σα)+𝒪(log|S|).

We proceed similarly if only one additional register is permitted, but temporarily overwrite the element eα when producing a generator of the form eαs1s2eα with s1,s2Σ.

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. (1)

    The pseudovariety 𝐕 affords efficient compression.

  2. (2)

    The pseudovariety 𝐕 contains neither 𝐋𝐑𝐁 nor 𝐑𝐑𝐁.

  3. (3)

    The pseudovariety 𝐕 comprises only normal bands of groups; that is, 𝐕𝐆𝐍𝐁.

  4. (4)

    The pseudovariety 𝐕 admits straight-line programs of length 𝒪(log2N).

Proof.

Lemma 6 shows that (1)(2). The implication (2)(3) 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 (3)(4). Finally, (4)(1) 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. (1)

    The pseudovariety 𝐕 affords efficient compression.

  2. (2)

    The pseudovariety 𝐕 contains neither 𝐋𝐑𝐁, 𝐑𝐑𝐁, nor 𝐓.

  3. (3)

    The pseudovariety 𝐕 satisfies the following for every 2w:

    C𝐕w+3(N)𝒪(C𝐇w(N)+logN)andC𝐕w+2(N)𝒪(C𝐇w(N)logN).

    In particular, 𝐕 admits straight-line programs of length 𝒪(log2N).

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. (1)

    There exist 1ijn such that 𝐕x1xnx1xi1(xixj)ω+1xj+1xn.

  2. (2)

    There exists σSym(n) with σid such that 𝐕x1xnxσ(1)xσ(n).

Notably, for monoids all identities in the first item of Theorem 30 are equivalent to the defining identity xxω+1 of completely regular monoids, and all identities in the second item are equivalent to the defining identity xyyx 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 S𝐕, the set of its completely regular elements I(S)={sS:s=sω+1} is a subsemigroup of S.

Proof of Theorem 29.

Lemma 6 shows that (1)(2). Since the addendum in item (3) follows from Babai and Szemerédi’s Reachability Lemma, we have that (3)(1) by definition.

Let us thus assume that (2) holds. Recall from Theorem 30 that 𝐕 satisfies the identity

x1xnx1xi1(xixj)ω+1xj+1xn

for some parameters 1ijn, or is permutative otherwise. We may assume the former, since otherwise C𝐕2(N)𝒪(logN) holds by Proposition 13 and this clearly implies (3).

Under this assumption, we have 𝐕xyzxyω+1z𝐍k for a sufficiently large k1. Let 𝐕=𝐕xyzxyω+1z, and note that 𝐕𝐕 and 𝐕𝐕𝐍k. Thus, 𝐕 also satisfies (2) and, in light of Lemma 8, it suffices to prove that, for all 2w,

C𝐕w+2(N)𝒪(C𝐇w(N)+logN)andC𝐕w+1(N)𝒪(C𝐇w(N)logN).

Consider a semigroup S𝐕, a generating set ΣS, and some element tS. Without loss of generality, the element t is not a product of generators with two or fewer factors. Under these assumptions, the element t can be written as t=us1snv with u,s1,,sn,vΣ.

For 1in, let s~i=siω+1 and note that s~iI(S). Further, let S~S be the subsemigroup generated by the set Σ~={s~1,,s~n}. Since Σ~I(S) and the latter is a subsemigroup of S by Lemma 31, we in fact have S~I(S)S and, therefore, S~𝐕𝐂𝐑.

By Theorem 28, S~𝐆𝐍𝐁. Moreover, since 𝐕𝐆𝐇, we have that S~𝐇𝐍𝐁. By Proposition 25, for every 2w, there is a straight-line program 𝒜~ computing s~S~ over Σ~S~ with w(𝒜~)=w+2 (or w+1) and (𝒜~)𝒪(C𝐇w(N)+logN) (resp. 𝒪(C𝐇w(N)logN)) where N=|S~||S|. We modify the straight-line program 𝒜~ by replacing every instruction rks~i with s~iΣ~ by the instruction rksi where siΣ with siω+1=s~i. (In case sisi satisfy siω+1=siω+1, we choose arbitrarily between si and si.) The result of this modification is a straight-line program 𝒜 over ΣS of the same length and width as 𝒜~. Let sS be the element computed by 𝒜 corresponding to s~S~. We claim that t=usv.

To see this claim to be true, note that there is a word ρ(x1,,xn) over {x1,,xn} that evaluates to ρ(s1,,sn)=s and ρ(s~1,,s~n)=s~. Due to the identity xyzxyω+1z,

t=us1snv=us~1s~nv=us~v=uρ(s~1,,s~n)v=uρ(s1,,sn)v=usv

as required. Since, moreover, t=usv can be computed from s using no additional registers, since w(𝒜)2, 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

C𝐕w+2(N)𝒪(C𝐇w(N)+logN)andC𝐕w+1(N)𝒪(C𝐇w(N)logN).

Incorporating this improvement, we obtain the following due to Corollary 26.

Corollary 33.

Let 𝐕 be a pseudovariety, 𝐋𝐑𝐁,𝐑𝐑𝐁,𝐓𝐕, and 𝐕𝐆𝐆sol. Then

C𝐕(N)𝒪(logN)andC𝐕6(N)𝒪(log3N),C𝐕5(N)𝒪(log4N).

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

A semigroup S, a subset ΣS, and an element tS.

Question.

Is t a member of the subsemigroup ΣS?

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 S. As we require a weaker promise, we obtain a stronger algorithmic result (Corollary 35) than with the formulation from [16, 17]. ΣS 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 S and its elements as part of the input. Our main focus is on the Cayley table model where S 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 𝖠𝖢0-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 2w<.

  1. (1)

    If C𝐕(N)𝒪(polylogN), then memb(𝐕)𝐂𝐓 is in 𝖭𝖯𝖮𝖫𝖸𝖫𝖮𝖦𝖳𝖨𝖬𝖤𝗊𝖠𝖢0.

  2. (2)

    If C𝐕w(N)𝒪(polylogN), then memb(𝐕)𝐂𝐓 is in 𝖭𝖳𝖨𝖲𝖯(polylogn,logn)𝖥𝖮𝖫𝖫.

Proof.

To certify membership of an element tS in a subsemigroup ΣS, we can use a suitable straight-line program 𝒜 over Σ computing t. We guess and execute 𝒜, instruction by instruction, on the random access machine and accept once some register is assigned t.

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 𝖭𝖳𝖨𝖲𝖯(polylogn,logn), 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. (1)

    The pseudovariety 𝐕 affords efficient compression.

  2. (2)

    The pseudovariety 𝐕 contains neither 𝐋𝐑𝐁, 𝐑𝐑𝐁, nor 𝐓.

  3. (3)

    The membership problem memb(𝐕)𝐂𝐓 is in 𝖭𝖯𝖮𝖫𝖸𝖫𝖮𝖦𝖳𝖨𝖬𝖤.

Furthermore, if 𝐕 contains neither 𝐋𝐑𝐁, 𝐑𝐑𝐁, 𝐓, nor any nonsolvable group, then the membership problem memb(𝐕)𝐂𝐓 is in 𝖭𝖳𝖨𝖲𝖯(polylogn,logn) and, hence, in 𝖥𝖮𝖫𝖫.

Note that in some cases even smaller bounds are known: if 𝐕𝕃𝐈k or 𝐕𝐍𝐁, then the membership problem is in 𝖠𝖢0 [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 S𝐕 and generating set ΣS, a target element tS 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 tΣ 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 𝖭𝖳𝖨𝖲𝖯(polylogn,logn)𝖥𝖮𝖫𝖫 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 S is the semigroup 𝒯X of all maps from some finite set X 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 k, decide whether the semigroup can be generated by at most k 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 Σ2𝖯, 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 𝖠𝖢0?

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 𝗊𝖠𝖢0 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 q-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 x1xnρ(x1,,xn). 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.