Abstract 1 Introduction 2 Algebraic preliminaries 3 Polynomial equivalence 4 Program satisfiability 5 Circuit equivalence 6 Final Remarks References

Nonuniform Deterministic Finite Automata
over Finite Algebraic Structures

Paweł M. Idziak Institute of Theoretical Computer Science, Jagiellonian University, Krakow, Poland Piotr Kawałek ORCID Institute of Discrete Mathematics and Geometry, TU Wien, Austria
Institute of Theoretical Computer Science, Jagiellonian University, Krakow, Poland
Jacek Krzaczkowski ORCID Institute of Computer Science and Mathematics, University of Maria Curie-Skłodowska, Lublin, Poland
Abstract

Nonuniform deterministic finite automata (NUDFA) over monoids were invented by Barrington in [2] to study boundaries of nonuniform constant-memory computation. Later, results on these automata helped to identify interesting classes of groups for which equation satisfiability problem (PolSat) is solvable in (probabilistic) polynomial time [13, 26]. Based on these results, we present a full characterization of groups, for which the identity checking problem (called PolEqv) has a probabilistic polynomial-time algorithm. We also go beyond groups, and propose how to generalise the notion of NUDFA to arbitrary finite algebraic structures. We study satisfiability of these automata in this more general setting. As a consequence, we present a full description of finite algebras from congruence modular varieties for which testing circuit equivalence CEqv can be solved by a probabilistic polynomial-time procedure. In our proofs we use two computational complexity assumptions: randomized Expotential Time Hypothesis and Constant Degree Hypothesis.

Keywords and phrases:
program satisfiability, circuit equivalence, identity checking
Category:
Track B: Automata, Logic, Semantics, and Theory of Programming
Funding:
Piotr Kawałek: This research was funded in whole or in part by National Science Centre, Poland #2021/41/N/ST6/03907. For the purpose of Open Access, the author has applied a CC-BY public copyright licence to any Author Accepted Manuscript (AAM) version arising from this submission. Funded by the European Union (ERC, POCOCOP, 101071674). Views and opinions expressed are however those of the author(s) only and do not necessarily reflect those of the European Union or the European Research Council Executive Agency. Neither the European Union nor the granting authority can be held responsible for them.
Jacek Krzaczkowski: This research was funded in whole or in part by National Science Centre, Poland #2022/45/B/ST6/02229.
For the purpose of Open Access, the author has applied a CC-BY public copyright licence to any Author Accepted Manuscript (AAM) version arising from this submission.
Copyright and License:
[Uncaptioned image] © Paweł M. Idziak, Piotr Kawałek, and Jacek Krzaczkowski; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Design and analysis of algorithms
; Theory of computation Complexity classes
Related Version:
Full Version: https://arxiv.org/abs/2501.12260 [24]
Acknowledgements:
The second and third authors would like to express their deep gratitude to Paweł Idziak, who passed away during the preparation of this paper. It was thanks to him that we met and collaborated for many years on problems related to satisfiability and equivalence in finite algebraic structures. His contributions to Algebra, Logic, and Computer Science will be remembered by many. Rest in peace, Paweł.
Editors:
Keren Censor-Hillel, Fabrizio Grandoni, Joël Ouaknine, and Gabriele Puppis

1 Introduction

There are many interactions between mathematics and (theoretical) computer science. Many branches of these sciences influence each other, sometimes in quite surprising ways. A relatively recent example of such an influence is the so-called algebraic approach to Constraint Satisfaction Problem (CSP) which led to a complete classification of computational complexity of CSP [8, 36]. It is really impressive how in this case (universal) algebra, combinatorics, logic, computational complexity and algorithmic work together to give new results in each of these fields.

Another example of synergy between different fields of mathematics and theoretical computer science can be observed on the borderline of circuit complexity, automata theory and (universal) algebra. The most significant example here is the role of monoids played in automata theory and formal languages.

Usually a deterministic finite automaton (DFA) is determined by an alphabet Σ acting over a set Q of states by a function δ:Σ×Q(σ,q)σqQ. This action can be extended (in an obvious way) to the action of the free monoid Σ. To decide if a word wΣ is accepted by a particular DFA we need to endow it with a starting state q0 and a set FQ of accepting states. Then w gets accepted if wq0F. For our purposes we prefer, first to treat the set QQ of functions as the monoid with fg=gf, and then to treat the action δ as a function a:ΣQQ given by a(σ)(q)=σq. Now, the word σ1σn gets accepted if a(σ1)a(σn)S, where S consists of transitions determined by the words wΣn satisfying wq0F.

Before restating Barrington’s definition of Non-uniform Deterministic Finite Automata (NUDFA) over monoids [3] we note that a(σ1)a(σn) is nothing else but 𝐭n(a(σ1),,a(σn)), where 𝐭n(x1,,xn)=x1xn. In a NUDFA over the monoid 𝐌 to accept the word from Σn we are going to relax the term x1xn to an arbitrary semigroup term 𝐭(x1,,xk) and replace one action a:ΣQQ by a bunch of functions ax:ΣM, one for each variable of 𝐭. Now a 𝐭-program (with inputs from Σn represented by an n-variable word b1bn) consists of:

  • a set of k-instructions, one for each variable x of 𝐭, of the form ι(x)=(bx,ax), where bx is one of the variables bi,

  • and a set SM of accepting values.

Finally, a NUDFA over 𝐌 is a sequence (possibly even nonrecursive) of programs
(𝐭n,n,ιn,Sn)n with 𝐭n(x1,,xkn) being some terms of 𝐌, SnM and ιn being the instructions for the variables of 𝐭n. A word b1bnΣn gets accepted by such a NUDFA if 𝐭n(ax1(bx1),,axkn(bxkn))Sn.

Example 1.

Let Σ={a,b,c}, M=(2,+)×(2,+) and for every n let

  • tn(x1,,x2n)=x1+x2++x2n,

  • ιn(xi)=(bi/2,axi), where

    axi(bxi)={(1,0)i is even and bxi{a,b},(0,1)i is odd and bxi{b,c},(0,0)otherwise,
  • Sn={(0,1)}.

Now, to determine the language accepted by the NUDFA consisting of the sequence of programs (𝐭n,n,ιn,Sn)n note that 𝐭n(ax1(bx1),,axkn(bxkn)) is the sum of:

  • na,b values (1,0), where na,b is the number of occurrences of letters ’a’ and ’b’ in the input word,

  • nb,c values (0,1), where nb,c is the number of occurrences of letters ’b’ and ’c’ in the input word,

  • some number of values (0,0).

This sum is equal (0,1), and hence the word is accepted by the NUDFA, iff the following holds:

  • parities of the numbers of occurrences of letters ’a’ and ’b’ in word b1bn are equal,

  • parities of the numbers of occurrences of letters ’b’ and ’c’ in word b1bn are not equal.

Originally Barrington considered mainly the Boolean case where Σ={0,1} to study computational boundaries of non-uniform constant-memory computation. Such automata can be used to compute the Boolean functions of the form {0,1}n{0,1}. They also give an interesting algebraic insight into the internal structure of the class NC1 [6]. Note that in the Boolean case Σ={0,1} the function ax is given by the pair of values ax(0),ax(1). In such a case, for simplicity we write ι(x)=(bx,ax(0),ax(1)).

A natural question that arises here is whether the language accepted by a particular NUDFA over 𝐌 is nonempty. This problem reduces to:

  • ProgSat(𝐌):  Decide if a given program over 𝐌 accepts at least one word.

The problem ProgSat proved itself to be extremely useful in studying groups (and monoids) for which determining if an equation has a solution (PolSat) is in P. In fact the proof of Goldmann and Russell in [13] that each nilpotent group 𝐆 has tractable PolSat(𝐆) modifies a polynomial time algorithm for ProgSat(𝐆). A study of connections between PolSat and ProgSat for finite monoids is given in [5]. Recently a complete classification of finite groups 𝐆 with ProgSat(𝐆)RP, together with its consequences for PolSat has been provided by Idziak, Kawałek and Krzaczkowski in [26].

Now the results of [26] allow us to complete the long term extensive investigations [9, 20, 17, 18, 11, 35, 25] on equivalence problem PolEqv of polynomials (i.e. terms with some variables already evaluated) over finite groups.

The lower bound in our characterization relies on the randomized version of the Exponential Time Hypothesis (rETH), while the upper bounds explore the so-called Constant Degree Hypothesis (CDH). This hypothesis, introduced in [6], can be rephrased to state that for a fixed integer d, a prime p and an integer m which is not just a power of p, any 3-level circuit of the form 𝖠𝖭𝖣d𝖬𝖮𝖣m𝖬𝖮𝖣p requires exponential size to compute 𝖠𝖭𝖣n of arbitrary large arity n (in which 𝖠𝖭𝖣d gates are in the input layer, 𝖬𝖮𝖣m gates are in the middle layer, and there is one 𝖬𝖮𝖣p gate in the output layer). The best known lower bound, due to Chattopadhyay et al. [10], for the size of 𝖠𝖭𝖣d𝖬𝖮𝖣m𝖬𝖮𝖣p computing 𝖠𝖭𝖣n is only superlinear. Much earlier CDH has been considered in many different contexts. Already in [6] the case d=1, i.e. no 𝖠𝖭𝖣d layer, has been confirmed. Also restrictions put either on the number of 𝖠𝖭𝖣d used locally, or on the local structure of 𝖠𝖭𝖣d𝖬𝖮𝖣m fragments, allowed Grolmusz and Tardos [15, 14] to confirm CDH. Very recently Kawałek and Weiß [30] confirmed CDH for symmetric circuits.

In this paper, under these two complexity hypotheses (i.e. rETH and CDH), the characterization of finite groups with tractable ProgSat from [26] is applied to obtain an unexpectedly different characterization for tractable PolEqv.

Theorem 1.1.

Let 𝐆 be a finite group. Assuming rETH and CDH the problem PolEqv(𝐆) is in coRP if and only if 𝐆 is solvable and has a nilpotent normal subgroup 𝐇 with the quotient 𝐆/𝐇 being also nilpotent.

A surprising part of these investigations is that such characterization can not only be done, but that it can be stated, in terms of algebraic structure of the groups. In fact this reveals another connection between (universal) algebra and circuit complexity theory.

The goal of this paper is to leave the group realm and generalize ˜1.1 to a much broader setting of algebras. As we will see shortly this generalization is two-fold. First we generalize the concept of NUDFAs to cover automata working over arbitrary finite algebraic structure 𝐀. This requires to define a program over 𝐀 and can be done by simply replacing the monoid 𝐌 by the algebra 𝐀 and assume that this time 𝐭 is a term of the algebra 𝐀.

Figure 1: Compressing the size of 𝐭n. ©Idziak, Krzaczkowski [27]

Second, in general algebraic context it is not clear which operations are to be chosen to be the basic ones. And this choice may be extremely important from computational point of view. Recall after [27], that adding the binary commutator operation [x,y]=x1y1xy to the language of a group may exponentially shorten the size of the input. Indeed the term 𝐭n(x1,,xn)=[[[x1,x2],x3],xn] has linear size if the commutator operation is allowed, while after writing this term in the pure group language (of multiplication and the inverse) we see that the size |𝐭n| of 𝐭n is 2|𝐭n1|+2, as 𝐭n(x1,,xn)=𝐭n1(x1,,xn1)1xn1𝐭n1(x1,,xn1)xn, so that |𝐭n| is exponential in n. Actually for the alternating group 𝐀4 it is shown in [19] that PolSat(𝐀4) is in P, while after endowing 𝐀4 with the commutator operation (and therefore shortening the size of inputs) the problem becomes NP-complete. A solution to this phenomenon has been proposed by Idziak and Krzaczkowski in [27] by presenting a term by the algebraic circuit that computes it. For example 𝐭n(x1,,xn) can be computed by the circuit of size 6n5 as shown by Figure 1.
Representing polynomials of an algebra with algebraic circuits leads to a modified version of ProgSat which we explore in this paper.

  • ProgCSat(𝐀):  Decide if a given program (𝐭,n,ι,S) over 𝐀 accepts at least one word, where 𝐭 is given by a circuit over 𝐀.

Measuring the size of the input, i.e. the expression of the form 𝐩=𝐪 by the lengths of the polynomials 𝐩 and 𝐪 or by the sizes of their algebraic circuits used to compute 𝐩 and 𝐪 give rise to either PolSat or CSat in the satisfiability setting or to PolEqv or CEqv in the equivalence setting. Note here that [27] argues that the complexity of CSat(𝐀) and CEqv(𝐀) is independent of which term operations of the algebra 𝐀 are chosen to be the basic ones. This independence gives a hope for a characterization of algebras 𝐀 with tractable CSat(𝐀) or CEqv(𝐀) in terms of algebraic structure of 𝐀. Actually already a series of papers [21, 35, 23, 26, 27, 33] enforces a bunch of such necessary algebraic conditions for an algebra to have CSat or CEqv tractable. Not surprisingly solvability and nilpotency are among these conditions.

To define these two notions of solvability and nilpotency outside the group realm we need a notion of a commutator. However we need to work with a commutator [α,β] of two congruences α,β (that in the group setting correspond to normal subgroups) instead of a commutator of elements of an algebra. For more details on the definition and the properties of commutator, we refer to the book [12] and Section 2. Here we only note that this concepts of commutator of congruences works smoothly only in some restricted setting of the so-called congruence modular varieties, i.e. equationally definable classes of algebras with modular congruence lattices. Fortunately this setting includes groups, rings, quasigroups, loops, Boolean algebras, Heyting algebras, lattices and almost all algebras related to logic. In groups, rings or Boolean/Heyting algebras the congruences are determined by normal subgroups, ideals or filters respectively. Obviously this new concept of commutator of normal subgroups coincides with the old one. The commutator of two ideals I,J of a commutative ring is simply their algebraic product IJ, while the commutator of filters in a Boolean/Heyting algebra is their intersection. Now we can say that a congruence α is abelian, nilpotent or solvable if [α,α]=0𝐀, [[[α,α],α],α]=0𝐀 or [[[α,α],[α,α]],[[α,α],[α,α]]]=0𝐀 respectively (for some number of nested commutators). Here, 0𝐀 is the identity relation/congruence of 𝐀. The algebra 𝐀 itself is said to be abelian, nilpotent or solvable if the total congruence 1𝐀 collapsing everything is abelian, nilpotent or solvable, respectively.

Note that, for nilpotent groups, Boolean programs (of NUDFAs) compute 𝖠𝖭𝖣 functions only of bounded arity, i.e. for each nilpotent group 𝐆 there is a constant k such that 𝖠𝖭𝖣k is computable by no program over 𝐆 [6]. This nonexpressibility phenomenon does not transfer to nilpotent algebras in general congruence modular context. The most natural example here is the algebra (6;+,%2), i.e. the group (6;+) endowed with the unary operation %2 computing the parity. In this algebra all the circuits of the form 𝖬𝖮𝖣2𝖬𝖮𝖣3 can be modeled so that 𝖠𝖭𝖣n can be expressed for all n (however by exponential size of the circuits). This action of the prime 2 acting over prime 3 cannot occur in nilpotent groups. Indeed, due to the Sylow theorem, each finite nilpotent group is a product of p-groups. This decomposition prevents interaction between different primes, as they occur on different stalks/coordinates. And the lack of such interactions is crucial in bounding the arity of expressible 𝖠𝖭𝖣n’s. Also in our considerations the finite nilpotent algebras that decompose into a product of algebras of prime power order occur naturally. They are known as supernilpotent algebras [7, 1]. We will return to this concept of supernilpotent algebras and its relativization to supernilpotent congruences in Section 2.

Now we are ready to state the other two main results of the paper.

Theorem 1.2.

Let 𝐀 be a finite algebra from a congruence modular variety. Assuming rETH and CDH the problem ProgCSat(𝐀) is in RP if and only if 𝐀 is nilpotent and has a supernilpotent congruence σ with supernilpotent quotient 𝐀/σ and such that all cosets of σ have sizes that are powers of the same prime number p.

Theorem 1.3.

Let 𝐀 be a finite algebra from a congruence modular variety. Assuming rETH and CDH the problem CEqv(𝐀) is in coRP if and only if 𝐀 is nilpotent and has a supernilpotent congruence σ with supernilpotent quotient 𝐀/σ.

Results from [26] that we use in the proof of ˜1.1 heavily rely on a method of representing terms/polynomials of finite solvable group 𝐆 by bounded-depth circuits that use only modular gates. Besides the obvious requirement that the circuit representing a group-polynomial 𝐩 has to compute the very same function as 𝐩 does, we also want to control the size of the circuit to be polynomial in terms of the size (length) of 𝐩.

A very similar approach can be found in [32], where M.​ Kompatscher considers generalizations of finite nilpotent groups, i.e.​ nilpotent algebras from the congruence modular varieties. He provides a method to rewrite circuits over such algebras to constant-depth circuits which, again, use only modulo-counting gates. These modular circuits, which appear in both of the mentioned cases, are known as CC-circuits. However, since [32] does not use the notion of a program/NUDFA, the author formulates his results for circuits over 𝐀 representing only some specific functions. For those functions, it is natural how to interpret Boolean values 0/1 in the non-Boolean algebra 𝐀. In our paper, the notion of a program/NUDFA provides us with a formal framework which helps to relate the expressive power of algebraic structures to some standard circuit complexity classes. Here, we present a very precise characterization of functions computable by programs over algebras corresponding to polynomial-time cases of ProgCSat.

Theorem 1.4.

Let 𝐀 be a finite nilpotent algebra from a congruence modular variety with supernilpotent congruence σ of 𝐀 such that cosets of α are of prime power size pk and 𝐀/σ is supernilpotent. Then the function computable by a Boolean program of size over the algebra 𝐀 can be also computed by an 𝖠𝖭𝖣d𝖬𝖮𝖣m𝖬𝖮𝖣p-circuits of size O(c) with d,m,c being natural numbers depending only on 𝐀, and m being relatively prime to p.

This theorem not only is an interesting result on its own, but also is crucial in proving ˜1.2 and 1.3. Quite a technical proof of ˜1.4 can be found in the full version of the paper on arXiv [24]. It combines advanced tools of commutator theory [12], as well as many combinatorial lemmas on how to compose / compress circuits using gates 𝖬𝖮𝖣m. This is in line (and in some parts extends) with some of the earlier works on these circuits (see for instance [14, 15, 22]).

2 Algebraic preliminaries

An algebra is a set called a universe together with a finite set of operations acting on it called basic operations of the algebra. We usually use boldface letter to denote the algebra and the very same letter, but with a regular font, to denote its universe. Pol𝐀 is the polynomial clone of 𝐀, that is the set of all polynomial operations of 𝐀. An algebra 𝐀 is polynomially equivalent to an algebra 𝐁 if it is isomorphic to an algebra which has the same set of polynomial operations as 𝐁. An induced algebra 𝐀|S is a set S with all polynomial operations of 𝐀 closed on S (or in other word polynomial operations that produce values in S when applied to arguments from S). An idempotent function is a function f such that f(f(x))=f(x).

In proofs of intractability of ProgCSat and CEqv for algebras from congruence modular varieties the crucial role is played by Tame Congruence Theory (see [16] for details). This is a deep algebraic tool describing local behavior of finite algebras. TCT shows that locally finite algebras behave in one of following five ways:

  1. 1.

    a finite set with a group action on it,

  2. 2.

    a finite vector space over a finite field,

  3. 3.

    a two-element Boolean algebra,

  4. 4.

    a two-element lattice,

  5. 5.

    a two-element semilattice.

By typ{𝐀}, let us denote a subset of {𝟏,..,𝟓} which describes the local behaviours we can find in an algebra 𝐀. Note that in a case of algebra 𝐀 from a congruence modular variety only three types can appear in typ{𝐀}, that is types 2, 3 and 4. In case of types 3 and 4 there has to be a two-element set U (whose elements we call 0 and 1) such that

  • there is a polynomial 𝐞 of 𝐀 fulfilling 𝐞(A)=U,

  • there are polynomials of 𝐀 which behaves on U like and ,

  • in case of type 3 there is also unary polynomial of 𝐀 which is a negation on U.

If we can find type 3 or 4 in typ{𝐀}, the complexity of both ProgCSat and CEqv is relatively easy to determine, as we shall see in forthcoming chapters. For this reason the most of the volume of the paper is devoted to algebras with typ{𝐀}={𝟐}. In the congruence modular variety those are precisely the solvable algebras [12, 16]. In fact, some of the earlier papers already dealt with algebras that are solvable but not nilpotent, so we will be mostly concerned with the notion of nilpotency and its properties.

Every solvable (so in particular - nilpotent) algebra in the congruence modular variety is Malcev, i.e.​ it possesses a polynomial operation 𝐝 satisfying the following identity: 𝐝(y,x,x)=𝐝(x,x,y)=y. A standard example of Malcev algebras are groups with a Malcev term of the form xy1z. Unlike for groups, nilpotent algebras do not necessarily decompose into a direct product of algebras of prime power order. However, the technique contained in this paper splits an algebra into slices on which such nice decomposition can be observed.

To define this slicing properly, we need to consider congruences. Recall that congruence σ of an algebra 𝐀 is an equivalence relation which is preserved by the operations of 𝐀. Such relations are naturally associated with surjective homomorphisms from 𝐀 to 𝐀/σ mapping x to [x]σ (equivalence class of x in σ), so congruences are essentially generalization of normal subgroups of a group. Similarly as normal subgroups, congruences of an algebra form a lattice. From now on, we write 𝖢𝗈𝗇𝐀 for the set of all congruences of 𝐀. Every element of a finite lattice can be written as a meet (join) of meet-irreducible (join-irreducible) elements, i.e.​ elements which cannot be written as a meet (join) of any other two elements of the lattice. These special elements, generating 𝖢𝗈𝗇𝐀, will play a significant role in our analysis.

For α,β𝖢𝗈𝗇𝐀, by I[α,β] we mean a set of congruences γ such that αγβ. In case when I[α,β]={α,β}, i.e.​ there are no congruences between α and β, we call β a cover of α, we call α a subcover of β, and we call α,β a covering pair. To highlight such a situation we write αβ for short. Whenever α is meet-irreducible (join-irreducible) congruence, then there is a unique congruence α+ (α) such that αα+ (αα). For a nilpotent algebra 𝐀 from a congruence modular variety whenever its congruences α,β satisfy αβ, the cosets (congruence classes) of β/α in 𝐀/α have equal sizes, being a power of some prime (this is a consequence of the results contained in the fifth and seventh chapters of [12]). We later denote this prime by 𝖼𝗁𝖺𝗋(α,β) and call it a characteristic of a congruence cover αβ. Moreover for arbitrary α<β, we write 𝖼𝗁𝖺𝗋{α,β} for the set of all possible prime characteristics of covering pairs, which are fully contained in I[α,β]. We say that a pair of congruences α<β of a nilpotent algebra 𝐀 forms a Prime Uniform Product Interval (PUPI), if there are congruences α<α1,,αkβ such that

  • αi=β

  • αi(jiαj)=α, for i,j{1..k},

  • For every i we have |𝖼𝗁𝖺𝗋{α,αi}|=1.

We call a congruence β supernilpotent whenever it is nilpotent and the interval I[0𝐀,β] is a PUPI, and we call an algebra 𝐀 supernilpotent, whenever 1𝐀 is supernilpotent. Each supernilpotent algebra is isomorphic to a direct product of nilpotent algebras of prime power size. In this sense supernilpotence generalizes nilpotence for groups. Note that this definition is equivalent to a standard definition of supernilpotent algebras in congruence modular varieties [34].

We say that a nilpotent algebra 𝐀 has supernilpotent rank k whenever k is the smallest number for which we can find sequence of congruences 0𝐀=α0<α1<<αk=1𝐀 such that interval I[αi,αi+1] is a PUPI for each 0i<k. Note that for a finite nilpotent algebra 𝐀 we can always find such a finite sequence, since each covering pair forms a PUPI. This notion of supernilpotent rank of an algebra, later denoted by 𝗌𝗋(𝐀), proved to be extremely useful in some very recent results on the computation complexity of circuit satisfiability problem [21, 33]. In fact, results for ProgCSat/CEqv we present in this paper, are essentially about nilpotent algebras with 𝗌𝗋(A)=2.

3 Polynomial equivalence

Our characterization of polynomial time cases of PolEqv is achieved through a reduction to some special instances of PolSat. It was already noticed in [13] that PolSat(𝐆) for finite group 𝐆 reduces in polynomial time to ProgSat(𝐆). Very recently, the full characterization of groups for which ProgSat can be solved in randomized polynomial time was shown under the assumptions of rETH and CDH in [26].

Theorem 3.1.

Let 𝐆 be a finite group. Assuming rETH and CDH the problem ProgSat(𝐆) is in RP if and only if 𝐆/𝐆p is nilpotent for some normal p-subgroup 𝐆p of 𝐆 (with p being prime).

˜3.1 together with a result from [25] provides us with enough information to prove the ˜1.1.

Proof.

We start with recalling that [25, Theorem 1] tells us that under ETH, PolEqv(𝐆)P forces 𝐆 to have a normal nilpotent subgroup 𝐇 with nilpotent quotient 𝐆/𝐇. The very same proof actually gives the same structure of 𝐆 under rETH and PolEqv(𝐆)coRP.

For the converse we start by observing that the nilpotent normal subgroup 𝐇 of 𝐆 is a product of its Sylow subgroups, say 𝐇1,,𝐇s with 𝐇j being a pj-group. Each such subgroup 𝐇j is isomorphic to the quotient 𝐇/𝐇j for the normal subgroup 𝐇j of 𝐇 consisting of all elements in H with the order not divisible by pj. In particular H1Hs={1}. Moreover for an inner automorphism h of 𝐆 we have not only h(H)=H but also h(Hj)=Hj, as h has to preserve the order of elements. This means that 𝐇j is normal also in 𝐆.

Now we know that the quotient 𝐆/𝐇j has a nilpotent normal subgroup 𝐇/𝐇j with a nilpotent quotient (𝐆/𝐇j)/(𝐇/𝐇j)=𝐆/𝐇. Thus CDH and Theorem 3.1 give us that ProgSat(𝐆/𝐇j) and consequently PolSat(𝐆/𝐇j) are in RP. Consequently PolEqv(𝐆/𝐇j)coRP as deciding whether 𝐭=𝐬 holds in 𝐆/𝐇j reduces to check if none of the |G/Hj|1 equations of the form 𝐭𝐬1=a, with aG/Hj{1} has a solution.

Finally, H1Hs={1} tells us that an equation holds in 𝐆 iff it holds in all the quotients 𝐆/𝐇j, so that PolEqv(𝐆)coRP.

4 Program satisfiability

The goal of this section is to prove ˜1.2. First we observe in ˜4.1 that if a nilpotent algebra has a Malcev term then CSat and CEqv for this algebra reduce to ProgCSat. Thus, intractability of CSat or CEqv implies intractability of ProgCSat and conversely if ProgCSat is in RP, then CSat is in RP and CEqv is in coRP.

Fact 4.1.

For a finite nilpotent Malcev algebra 𝐀 the problems CSat(𝐀) and CEqv(𝐀) are many-to-one reducible to ProgCSat(𝐀) and the complement of ProgCSat(𝐀) respectively.

Proof.

To prove the fact we start with fixing a0A and enumerating A{a0}={a1,,ak} to form Aj={a0,aj}. Using Malcev term 𝐝 we define the k-ary polynomial 𝐟 by putting

𝐟(x1,,xk)=𝐝(𝐝(𝐝(x1,a0,x2),a0,x3),a0,xk).

Obviously 𝐟(a0,,a0)=a0. To see that the other aj’s are in 𝐟(A1,,Ak) simply evaluate xj by ajAj and the rest of the xi’s by a0.

Observe that if 𝐀 is a nilpotent algebra with a Malcev term 𝐝(x,y,z) and e,a,bA then, by [12, Lemma 7.3] we have a=b iff 𝐝(a,b,e)=e. This immediately shows that in nilpotent Malcev algebras only equations of the form 𝐭(x¯)=e (i.e. equations in which one side is a constant polynomial) need to be considered in satisfiability or equivalence problems.

Thus we start with an instance of CSat [or CEqv] 𝐭(x¯)=e and define kn-ary polynomial

𝐭(x11,,x1k,,xn1,,xnk)=𝐭(𝐟(x11,,x1k),,𝐟(xn1,,xnk)).

Due to A=𝐟(A1,,Ak) we easily get that 𝐭=e has a solution in 𝐀 [holds identically in 𝐀] iff 𝐭=𝐞 has a solution with xij restricted to be taken from Aj [or holds for all 2kn evaluations of the xij’s in Aj, respectively].

We define the reduction which for a given instance of CSat(𝐀) [CEqv(𝐀)] in the form 𝐭(x¯)=e returns nk-ary Boolean 𝐭-program (over the variables b11,,b1k,,bn1,,bnk) with the instructions ι(xij)=(bij,a0,aj). One can easily see that these reductions work, after setting the accepting values to be S={e} in case of CSat(𝐀), and S=A{e} for CEqv(𝐀). In the proof of Theorem 1.2 we will use Fact 4.1 to show that, under our assumptions, nilpotent Malcev algebra with tractable ProgCSat has supernilpotent rank equal at most 2. We use advanced tools of Tame Congruence Theory and Commutator Theory to prove the following lemma which shows that not for every algebra with supernilpotent rank equal 2 ProgCSat is tractable. The proof of the lemma can be found in the full version of the paper on arXiv [24].

Lemma 4.2.

Let 𝐀 be a finite nilpotent algebra from a congruence modular variety with 𝗌𝗋(𝐀)=2 and tractable ProgCSat(𝐀).

Then 𝐀 has a supernilpotent congruence α with cosets of prime power order such that quotient algebra 𝐀/α is also supernilpotent, or rETH fails.

The important ingredient of the proof of above lemma is an idea of Barrington et al [4] heavily explored in [22] and [26] resulting in the following lemma.

Lemma 4.3.

Let p be a prime number and ν1 be an integer. Then for each 3-CNF formula Φ(x¯) with n variables there is a polynomial wpΦ(x¯) over GF(p) of degree at most O(pν) such that for all b¯{0,1}n we have

wpΦ(b¯)={0,if the number of unsatisfied (by b¯) clauses in Φis divisible by pν1,otherwise.

Moreover, computing wpΦ from Φ can be done in 2O(pν(logn+logp)) steps.

The power of ˜4.3 can be observed when we use it simultaneously for two different primes, say p1 and p2. Then if for a given 3-CNF formula Φ with m clauses we will choose positive integers ν1, ν2 such that piνi1m<piνi, we will get, by Chinese Remainder Theorem, that Φ is satisfied by b¯{0,1} iff wp1Φ(b¯)=wp2Φ(b¯)=0. Moreover, the lengths of wp1Φ(b¯) and wp2Φ(b¯) are subexponential in the size of Φ. The core of the proof of ˜4.2 is showing (with heavilly use of Tame Congruence Theory and Commutator Theory) that if nilpotent Malcev algebra 𝐀 with supernilpotent rank 2 has supernilpotent congruence α which cosets are not of prime power size and such that 𝐀/α is supernilpotent then we can simulate by programs over 𝐀 systems of equations in the form:

wp1Φ(b¯)=0,
wp2Φ(b¯)=0.

Now we are ready to prove ˜1.2

Proof of Theorem 1.2:.

We start with the following observation:

  • (4.1)

    ProgCSat(({0,1};,)) is NP-complete.

To see that we start with an n-ary CNF-formula Φ(b1,,bn), treat it as a function {0,1}n{0,1}, and convert to n-ary program over the lattice ({0,1};,). First, by introducing the variables x1,,xn and x1,,xn we produce a new 2n-ary formula Φ(x1,,xn,x1,,xn) by simply replacing each positive literal bi by xi and negative literal ¬bi by xi. This leads to a function Φ:{0,1}2n{0,1} and allows us to transform the formula Φ to the program (Φ,n,ι,{1}) by putting ι(xi)=(bi,0,1) and ι(xi)=(bi,1,0).
Using (4.1) we can exclude TCT types 𝟑 and 𝟒 from the typeset typ{𝐀} so that:

  • (4.2)

    Either ProgCSat(𝐀) is NP-complete or 𝐀 is solvable.

Actually we can force 𝐀 to be nilpotent. Indeed, Lemma 2.2 of [23] supplies us with an element eA and a partition of A into two nonempty disjoint subsets A=A0A1 which allows to associate (in linear time O(m)) with a 3-CNF-formula Φ (with m clauses and n variables) a 3m-ary circuit(polynomial) 𝐬𝐚𝐭Φ of 𝐀 such that for b11,b21,b31,,b1m,b2m,b3m{0,1} and x11,x21,x31,,x1m,x2m,x3mA with xijAbij we have

Φ(b11,b21,b31,,b1m,b2m,b3m)=1iff𝐬𝐚𝐭Φ(x11,x21,x31,,x1m,x2m,x3m)=e.

Thus fixing a0A0 and a1A1 we end up with a program (𝐬𝐚𝐭Φ,3m,ι,{e}) over 𝐀, where ι(xij)=(bij,a0,a1). This reduction from 3-CNF-SAT to ProgCSat(𝐀) shows that:

  • (4.3)

    Either ProgCSat(𝐀) is NP-complete or 𝐀 is nilpotent.

To enforce that tractability of ProgCSat(𝐀) enforces 𝐀 to have supernilpotent rank 2 we refer to [21], where 𝗌𝗋(𝐀)3 gives a chain p1p2p3 of primes occurring as characteristics in consecutive PUPI in 𝖢𝗈𝗇𝐀. Moreover [21] shows how to use one alternation of characteristics to represent n-ary 𝖠𝖭𝖣 by a polynomial/circuit of size 2O(n), and further how to use two alternations of characteristics to compose such created n-ary 𝖠𝖭𝖣 functions to represent n-ary 𝖠𝖭𝖣 by a polynomial/circuit of size 2O(n). From this one expects that under (r)ETH CSat(𝐀) is not in (R)P if 𝗌𝗋(𝐀)3. In fact [21] provides examples of such algebras, while [33] contains a nice proof of this expectation. This, together with ˜4.1, gives us that:

  • (4.4)

    If ProgCSat(𝐀)(R)P then 𝗌𝗋(𝐀)2, or (r)ETH fails.

Now, the immediate consequence of (4.4) and ˜4.2 is that:

  • (4.5)

    If ProgCSat(𝐀)(R)P then there exists supernilpotent congruence α of 𝐀 with cosets of prime power size and such that 𝐀/α is supernilpotent, or (r)ETH fails.

Finally, let 𝐀 be a nilpotent algebra of supernilpotent rank 2 having supernilpotent congruence α of 𝐀 with costes of prime power size and such that 𝐀/α is supernilpotent. In such the case programs over 𝐀 computing n-ary 𝖠𝖭𝖣 functions have size at least 2Ω(n), or (r)ETH and CDH fails. This is an immediate consequence of ˜1.4, for if not, the 𝖠𝖭𝖣n function computed by a program of size (n) can be also computed by a 𝖠𝖭𝖣d𝖬𝖮𝖣m𝖬𝖮𝖣p-circuit of size O((n)c) for the constants c,d,m,p depending only of the algebra 𝐀. But then CDH tells us that O((n)c), and therefore (n) itself, has to dominate 2Ω(n). Now, to prove that ProgCSat(𝐀) is in RP recall that the second part of [26, Proposition 9] tells that a set of binary words accepted by a program (𝐩,n,ι,S) of size is either empty or has the size at least 2n/c, for some constant c. Thus checking at least c random Boolean words of length n finds a word accepted by the program (if there is one at all) with probability at least 1/2. This obviously puts ProgCSat(𝐀) into RP.

5 Circuit equivalence

In this section we will prove ˜1.3. To do it we will show that solving CEqv for an algebra 𝐀 can be reduced to solving the very same problem for quotients of 𝐀 by a meet-irreducible congruences. Obviously, every quotient algebra by a meet-irreducible congruence has the smallest congruence bigger than the identity relation. This observation plays a crucial role in the proof of ˜1.3.

Proof of ˜1.3.

First suppose that CEqv(𝐀) is tractable to eliminate types 𝟑 and 𝟒 from the typ{𝐀}. It should be obvious how to do it for type 𝟑. For the lattice type 𝟒 we first note that the existence of a solution (in the two element lattice) to the systems of two equations of the form 𝐦(x¯)=1&𝐣(x¯)=0 is NP-complete, where 𝐦(x¯) is in CNF and 𝐣(x¯) is in DNF, both with only positive literals. But obviously this system has no solutions iff 𝐦(x¯)𝐣(x¯)=𝐣(x¯) holds identically in ({0,1};,). To put this into the minimal set U of type 𝟒 simply replace each variable x by 𝐞U(x) (where 𝐞U is an idempotent polynomial of 𝐀 with the range U) and the operations , by the corresponding polynomials of 𝐀 turning 𝐀|U into the two element lattice. This shows that typ{𝐀}{𝟐} (i.e. 𝐀 is solvable) or CEqv(𝐀) is co-NP-complete.

Now the discussion made in [23, Section 4] between Problems 2 and 3 shows that (under (r)ETH) in fact 𝐀 has to be nilpotent and that 𝗌𝗋(𝐀)2. This shows the “only if” direction of our theorem.

To prove the converse note that an identity holds in an algebra 𝐀 iff it holds in all quotients of 𝐀 by meet-irreducible congruences (as the intersection of all meet-irreducible congruences is the identity relation 𝟎𝐀). Let α be a meet-irreducible congruence of 𝐀. To complete the proof it suffices to show that (under CDH) CEqv(𝐀/α)coRP.

Observe that if 𝐀 is nilpotent and 𝗌𝗋(𝐀)2 then each quotient of 𝐀 has these two properties as well. Moreover, identity relation in 𝐀/α (i.e. 0𝐀/α) has the unique cover. Since congruence classes for covering pairs have equal sizes [12, Colloraly 7.5], it is clear from definition of supernilpotency that every supernilpotent congruences of 𝐀/α has cosets of prime power sizes (as for every β1,β2𝖢𝗈𝗇𝐀/α, if β1,β2>0𝐀/α, then β1β2>0𝐀/α). Therefore by ˜1.2, ProgCSat(𝐀/α)RP. Finally ˜4.1 gives us CEqv(𝐀)coRP, as required.

6 Final Remarks

The Constant Degree Hypothesis plays a crucial role in our proofs of the existence of randomized polynomial-time algorithms. One can ask if this assumption is really needed. In fact, there are some unconditional results. For example very recent paper [29] shows that CEqv(𝐀) is in P whenever 𝐀 from a congruence modular variety is 2-nilpotent, i.e. it has abelian congruence with abelian quotient. Also supernilpotent algebras admit (unconditional) polynomial-time algorithm for CSat/CEqv [1, 31, 27], and if we allow random bits the time complexity drops down to linear [28]. Unfortunately, it is not hard to construct for a given d, m, p an algebra 𝐀 with supernilpotent rank equal 2 such that functions computable by 𝖠𝖭𝖣d𝖬𝖮𝖣m𝖬𝖮𝖣p-circuit are exactly functions computable by, not too long, programs over 𝐀. This, together with our results, shows that (under ETH) showing unconditional algorithms solving ProgCSat for algebras from congruence modular variety with supernilpotent rank equal 2 is equivalent to proving CDH. Hence, the natural question is if CDH holds.

Problem 1.

Prove or disprove the Constant Degree Hyphothesis.

The natural next step in our investigations is to go outside of the congruence modular realm. The first problem in such a case is that Tame Congruence Theory and Commutator Theory (our heavily used tools) for arbitrary algebras do not work as well as for algebras from congruence modular varieties. Moreover [27, Example 2.8] shows that there is an algebra 𝐀 (not contained in congruence modular variety) and its congruence σ such that CSat(𝐀) is in P, while CSat(𝐀/σ) is NP-complete. This suggests that we cannot expect a nice characterization of polynomial-time cases for CSat outside congruence modular setting. On the other hand, we are not aware of any such examples for ProgCSat and CEqv. In fact we saw that the hardness of ProgCSat(𝐀/σ) implies the hardness for ProgCSat(𝐀). This gives hope for characterization of tractable cases of ProgCSat for general finite algebras.

Problem 2.

Characterize finite algebras with tractable ProgCSat/CEqv.

References

  • [1] Erhard Aichinger and Nebojša Mudrinski. Some applications of higher commutators in Mal’cev algebras. Algebra universalis, 63(4):367–403, 2010. doi:10.1007/s00012-010-0084-1.
  • [2] David A. Mix Barrington. Width-3 permutation branching programs. Technical Report TM-293, MIT Laboratory for Computer Science, 1985.
  • [3] David A. Mix Barrington. Bounded-Width Polynomial-Size Branching Programs Recognize Exactly Those Languages in NC1. In Proceedings of the 18th Annual ACM Symposium on Theory of Computing (STOC’86), pages 1–5, 1986. doi:10.1145/12130.12131.
  • [4] David A. Mix Barrington, Richard Beigel, and Steven Rudich. Representing Boolean Functions as Polynomials Modulo Composite Numbers. Computational Complexity, 4:367–382, 1994. doi:10.1007/BF01263424.
  • [5] David A. Mix Barrington, Pierre McKenzie, Cristopher Moore, Pascal Tesson, and Denis Thérien. Equation Satisfiability and Program Satisfiability for Finite Monoids. In Proceedings of the 25th International Symposium on Mathematical Foundations of Computer Science (MFCS’2000), pages 172–181, 2000. doi:10.1007/3-540-44612-5_13.
  • [6] David A. Mix Barrington, Howard Straubing, and Denis Thérien. Non-Uniform Automata Over Groups. Information and Computation, 89(2):109–132, 1990. doi:10.1016/0890-5401(90)90007-5.
  • [7] Andrei Bulatov. On the number of finite Mal’tsev algebras. Contributions to general algebra, 13:41–54, 2000.
  • [8] Andrei A. Bulatov. A Dichotomy Theorem for Nonuniform CSPs. In Proceedings of the 58th Annual IEEE Symposium on Foundations of Computer Science (FOCS’17), pages 319–330, 2017. doi:10.1109/FOCS.2017.37.
  • [9] Stanley Burris and John Lawrence. Results on the equivalence problem for finite groups. Algebra Universalis, 52(4):495–500, 2005. doi:10.1007/s00012-004-1895-8.
  • [10] Arkadev Chattopadhyay, Navin Goyal, Pavel Pudlak, and Denis Thérien. Lower bounds for circuits with MODm gates. In Proceedings of the 47th Annual IEEE Symposium on Foundations of Computer Science (FOCS’06), pages 709–718, 2006. doi:10.1109/FOCS.2006.46.
  • [11] Attila Földvári and Gábor Horváth. The complexity of the equation solvability and equivalence problems over finite groups. International Journal of Algebra and Computation, 30(03):607–623, 2020. doi:10.1142/S0218196720500137.
  • [12] Ralph Freese and Ralph McKenzie. Commutator Theory for Congruence Modular Varieties. London Mathematical Society Lecture Notes, No. 125. Cambridge University Press, 1987.
  • [13] Mikael Goldmann and Alexander Russell. The complexity of solving equations over finite groups. Information and Computation, 178(1):253–262, 2002. doi:10.1006/inco.2002.3173.
  • [14] Vince Grolmusz. A degree-decreasing lemma for (MODp-MODm) circuits. Discrete Mathematics & Theoretical Computer Science, 4(2):247–254, 2001. doi:10.46298/dmtcs.289.
  • [15] Vince Grolmusz and Gábor Tardos. Lower bounds for (MODp-MODm) circuits. SIAM Journal on Computing, 29(4):1209–1222, 2000. doi:10.1137/S0097539798340850.
  • [16] David Hobby and Ralph McKenzie. Structure of Finite Algebras. Contemporary Mathematics vol. 76. American Mathematical Society, 1988. doi:10.1090/conm/076.
  • [17] Gábor Horváth. The complexity of the equivalence and equation solvability problems over nilpotent rings and groups. Algebra Universalis, 66(4):391–403, 2011. doi:10.1007/s00012-011-0163-y.
  • [18] Gábor Horváth. The complexity of the equivalence and equation solvability problems over meta-Abelian groups. Journal of Algebra, 433:208–230, 2015. doi:10.1016/j.jalgebra.2015.03.015.
  • [19] Gábor Horváth and Csaba Szabó. Equivalence and equation solvability problems for the alternating group 𝐀4. Journal of Pure and Applied Algebra, 216(10):2170–2176, 2012. doi:10.1016/j.jpaa.2012.02.007.
  • [20] Gábor Horváth and Csaba A. Szabó. The complexity of checking identities over finite groups. International Journal of Algebra and Computation, 16(5):931–940, 2006. doi:10.1142/S0218196706003256.
  • [21] Paweł M. Idziak, Piotr Kawałek, and Jacek Krzaczkowski. Intermediate Problems in Modular Circuits Satisfiability. In Proceedings of the 35th Annual ACM/IEEE Symposium on Logic in Computer Science (LICS’20), pages 578–590, 2020. doi:10.1145/3373718.3394780.
  • [22] Pawel M. Idziak, Piotr Kawałek, and Jacek Krzaczkowski. Complexity of Modular Circuits. In Proceedings of the 37th Annual ACM/IEEE Symposium on Logic in Computer Science (LICS’22), pages 32:1–32:11, 2022. doi:10.1145/3531130.3533350.
  • [23] Pawel M. Idziak, Piotr Kawałek, and Jacek Krzaczkowski. Satisfiability of circuits and equations over finite Malcev algebras. In Proceedings of the 39th International Symposium on Theoretical Aspects of Computer Science (STACS’22), pages 37:1–37:14, 2022. doi:10.4230/LIPIcs.STACS.2022.37.
  • [24] Paweł M Idziak, Piotr Kawałek, and Jacek Krzaczkowski. Nonuniform deterministic finite automata over finite algebraic structures. arXiv eprint, 2025. arXiv:2501.12260. doi:10.48550/arXiv.2501.12260.
  • [25] Pawel M. Idziak, Piotr Kawałek, Jacek Krzaczkowski, and Armin Weiß. Equation satisfiability in solvable groups. Theory of Computing Systems, 68:740–757, 2022.
  • [26] Paweł M. Idziak, Piotr Kawałek, Jacek Krzaczkowski, and Armin Weiß. Satisfiability Problems for Finite Groups. In Proceedings of the 49th International Colloquium on Automata, Languages, and Programming (ICALP’22), volume 229, pages 127:1–127:20, 2022. doi:10.4230/LIPIcs.ICALP.2022.127.
  • [27] Paweł M. Idziak and Jacek Krzaczkowski. Satisfiability in MultiValued Circuits. SIAM Journal on Computing, 51(3):337–378, 2022. doi:10.1137/18M1220194.
  • [28] Piotr Kawałek and Jacek Krzaczkowski. Even Faster Algorithms for CSAT Over supernilpotent Algebras. In Proceedings of the 45th International Symposium on Mathematical Foundations of Computer Science (MFCS’20), volume 170, pages 55:1–55:13, 2020. doi:10.4230/LIPIcs.MFCS.2020.55.
  • [29] Piotr Kawałek, Michael Kompatscher, and Jacek Krzaczkowski. Circuit equivalence in 2-nilpotent algebras. In Proceedings of the 41st International Symposium on Theoretical Aspects of Computer Science (STACS’24), volume 289, pages 45:1–45:17, 2024. doi:10.4230/LIPIcs.STACS.2024.45.
  • [30] Piotr Kawałek and Armin Weiß. Violating Constant Degree Hypothesis Requires Breaking Symmetry. In Proceedings of the 42nd International Symposium on Theoretical Aspects of Computer Science (STACS’25), volume 327, pages 58:1–58:21, 2025. doi:10.4230/LIPIcs.STACS.2025.58.
  • [31] Michael Kompatscher. The equation solvability problem over supernilpotent algebras with Mal’cev term. International Journal of Algebra and Computation, 28:1005–1015, 2017. doi:10.1142/S0218196718500443.
  • [32] Michael Kompatscher. CC-circuits and the expressive power of nilpotent algebras. Logical Methods in Computer Science, 18(2):12:1–12:15, 2022. doi:10.46298/lmcs-18(2:12)2022.
  • [33] Michael Kompatscher. CSAT and CEQV for nilpotent Maltsev algebras of Fitting length > 2. arXiv eprint, 2023. arXiv:2105.00689.
  • [34] Peter Mayr and Ágnes Szendrei. Algebras from congruences. Algebra universalis, 82(55), 2021. doi:10.1007/s00012-021-00740-7.
  • [35] Armin Weiß. Hardness of equations over finite solvable groups under the exponential time hypothesis. In Proceedings of the 47th International Colloquium on Automata, Languages, and Programming (ICALP’20), pages 102:1–102:19, 2020. doi:10.4230/LIPIcs.ICALP.2020.102.
  • [36] Dmitriy Zhuk. A Proof of the CSP Dichotomy Conjecture. Journal of the ACM, 67(5), 2020. doi:10.1145/3402029.