Even faster algorithms for CSAT over~supernilpotent algebras
aa r X i v : . [ c s . CC ] F e b EVEN FASTER ALGORITHMS FOR CSATOVER SUPERNILPOTENT ALGEBRAS
PIOTR KAWA LEK
Jagiellonian University, Faculty of Mathematics and Computer Science,Department of Theoretical Computer Scienceul. Prof. S. Lojasiewicza 6,3‘0-348, Krak´ow, Poland
JACEK KRZACZKOWSKI
Maria Curie-Sklodowska University, Faculty of Mathematics, Physics andComputer Science, Department of Computer Scienceul. Akademicka 9, 20-033, Lublin, Poland
Abstract.
In this paper two algorithms solving circuit satisfiability problemover supernilpotent algebras are presented. The first one is deterministic andis faster than fastest previous algorithm presented in [1]. The second oneis probabilistic with linear time complexity. Application of the former algo-rithm to finite groups provides time complexity that is usually lower than inpreviously best [5] and application of the latter leads to corollary, that circuitsatisfiability problem for group G is either tractable in probabilistic linear timeif G is nilpotent or is NP -complete if G fails to be nilpotent. The results areobtained, by translating equations between polynomials over supernilpotentalgebras to bounded degree polynomial equations over finite fields. Introduction
Solving equations is one of the most popular mathematical problems with appli-cations in many areas. We are interested in computational complexity of equationssatisfiability problem for fixed finite algebra. In the original definition of the prob-lem for a given equation of polynomials over fixed algebra we ask if it has solutionor not. There is number of papers in which authors tried to characterize algebrasfor which this problem is tractable in polynomial time and for which it is hard interms of some well established complexity assumptions (i. e. P = NP ). Most of au-thors consider some well known structures with fixed language like groups [8], [13],[11], [12], [5], [6], rings [11], [20] or lattices [26], however there is some number ofpapers considering more general cases e.g. [10], [9], [1]. A new look on the problem E-mail addresses : [email protected], [email protected] . Key words and phrases. circuit satisfiability, solving equations, supernilpotent algebras, satis-fiability in groups.The first author was partially supported by Polish NCN Grant was proposed in [16]. This paper was the first systematic study on solving equa-tions in quite general setting. The authors of [16] decided to allow more compactrepresentation of polynomials on the input of the problem, so to represent them asmulti-valued circuits. It leads to the following definition of the problem:
Csat ( A ) : given a circuit over A with two output gates g , g is there avaluation of input gates ø x that gives the same output on g , g , i.e. g (ø x ) = g (ø x ).Such the definition gives us, that computational complexity of Csat( A ) dependsonly on the polynomial clone of A and in consequence can be characterized interms of algebraic properties of A . Several articles considering this new approachto solving equations have appeared e.g. [24], [17], [1], [21], [23], [18]. In this paperwe will present the results in terms of Csat, however for clarity we mention, that allthe algorithms and upper bounds presented here apply also to the original definitionof the problem as polynomials can be represented by circuits expanding size of therepresentation only by constant factor.Algebras generating congruence modular variety are the wide class of algebrascontaining among others many popular algebraic structures like groups, rings andlattices. We will call this class of algebras CM for short. Analyzing partial charac-terization of computational complexity of Csat for algebras from CM presented in[16] and also results of [17], [23] and [18], we can see the truly rich world in whichone can find problems of different complexities: NP -complete problems, problemscontained in P and those, that are natural candidates for NP -intermediate prob-lems. Surprisingly, there are known only three essentially different polynomial timealgorithms solving Csat over algebras from congruence modular varieties. Two ofthem are the black-box algorithms i.e. the algorithms which treat circuits as ablack-box and try to find the solution by checking not too big set of potential so-lutions (so called hitting set). One of them originally was proposed for nilpotentgroups [8] and the second one works for distributive lattices ([26]). The third of thealgorithms mentioned above solves Csat by inspecting some kind of normal form ofa given circuit but it seems that the usefulness of such kind of algorithm is limitedto so called 2-step supernilpotent algebras [17], [18].In this paper we consider supernilpotent algebras from CM which are naturalgeneralization of nilpotent groups (among all groups only those nilpotent ones in-duce tractable problems, assuming P = NP ). Every such supernilpotent algebra A decomposes into a direct product of supernilpotent algebras of prime power order.That is why we can reduce problem of solving equations over A to fixed number (atmost log | A | ) of satisfiability problems over supernilpotent algebras, but this time ofprime power order. This Turing reduction can be performed in linear time and thuswe will only be looking for an algorithm for solving equations over supernilpotentalgebras of prime power order.We will slightly modify algorithm that was applied in the group setting. In thisalgorithm we check potential solutions in which at most d variables are assignedto non-zero value. It was introduced by Goldmann and Russell in [8] for nilpotentgroups and its correctness was reproved by Horvath in [11]. In both cases it wasshown that considered algorithm works in polynomial time but the degree of thepolynomial came from application of Ramsey Theory and was really huge. Laterit was independently shown in [24] and [16] that essentially the same algorithmworks for supernilpotent algebras from congruence modular variety in polynomial VEN FASTER ALGORITHMS FOR CSAT OVER SUPERNILPOTENT ALGEBRAS 3 time with the same huge degree of the polynomial. This results was improved byAichinger in [1]. In his paper the degree of the polynomial describing complexityof Csat( A ) was bounded by d = | A | log | A | +log m +1 , where m is a maximal arity ofbasic operation of A . Using similar tools as Aichinger and some new ideas we showthe following. Theorem 1.1.
Let A be a supernilpotent algebra of prime power order q h fromcongruence modular variety. Then there exists black-box algorithm solving Csat( A ) in time O ( n d k ) , where d = | A | log q m +1 , m is a maximal arity of basic operations of A and k is the input size. Proof of this theorem can be found in Section 5. Note, that after applyingTheorem 1.1 in the realm of nilpotent groups of prime power order q h we obtainthat d = | G | log q . We note here that in [5] A. Fldvri, using some group specifictools, showed the different algorithm for original equation satisfiability problem oftime complexity O ( n d ), where d = | G | · log | G | (here n denotes the input size).So in most cases our algorithm improves this result too (especially when prime q ishuge).It turns out that switching from deterministic computational model to proba-bilistic one we obtain a great improvement. It is shown in the second main resultof this paper, which states the following Theorem 1.2.
Let A be a supernilpotent algebra of prime power order from congru-ence modular variety. Then there exists linear time Monte Carlo algorithm solving Csat( A ) . The surprising corollary we get when we apply Theorem 1.2 to finite groups anduse results from [8] and [14]
Corollary 1.3.
Let G be a finite group. Then Csat( G ) • can be solved by linear time Monte Carlo algorithm if G is nilpotent, • is NP -complete otherwise. To obtain algorithms mentioned above we study structure of nilpotent algebrasof prime power order. Thanks to deep universal algebraic tools developed in [7]and [25] our study does not contain hard to read technical proofs. Neverthelessreader not interested in algebraic details can skip Section 3. Reader interested inmore systematic and detailed study in this spirit but in more general settings cansee [19].The main conclusion of Section 3 is that solving equations over nilpotent algebrasof prime power order q h can be reduced to solving one special equation betweenpolynomials over field F q of bounded degree. Thus, in next sections we do not needthe universal algebraic tools and we work with finite fields only.Our randomized algorithm solving equations over F q of low degree is very simple.It turned out that all we need to do is randomly draw solutions with an uniformdistribution. In such the way, we obtain c -correct true-biased algorithm for someconstant c depending on the algebra. It works thanks to nice behavior of polynomialover F q of not too high degree. This behavior is described in the following Lemma. Lemma 1.4.
Let f be n -ary polynomial of degree d over finite field F q . Then, forevery y ∈ F q such that | f − ( y ) | > we have | f − ( y ) | > q n − d − q log q EVEN FASTER ALGORITHMS FOR CSAT OVER SUPERNILPOTENT ALGEBRAS
Note that if degree of polynomial was smaller than the size of the field, thenwe would just need to apply famous SchwartzZippel lemma to get that density ofsolutions among all possible assignments to variables is huge. In our case degree ofpolynomial is bounded by constant depending on A and almost always it exceedsthe field size we are working with. There are also number of another results,that can be applied here, introduced for polynomial identity checking of s -sparsepolynomials, but they do not lead to linear time algorithm.The article is organized as follows. The second section contains some definitionsand background materials. In Section 3 we present the structure of supernilpotentalgebras and show that Csat for such algebras can be reduced to solving equationsbetween polynomials of bounded degree over finite field. The proof of Lemma 1.4 iscontained in Section 4. In Sections 5 and 6 we show deterministic and randomizedalgorithms solving Csat for supernilpotent algebras and prove Theorem 1.1 andTheorem 1.2. Finally, Section 7 contains remarks regarding results contained inthis paper and conclusions.2. Background material
In this paper we use the standard notation of universal algebra (see e.g. [4]).An algebra is for us a structure consisting of the set called universe and the set offinitary operations on it. Groups and fields are obviously examples of algebras. Allalgebras considered in this paper are finite i.e with finite universe and finite set ofoperations. We usually denote algebras using bold capital letter and its universeby the same but non-bold letter. The language or type of algebra is the set F offunction symbols together with non-negative integers assigned to each member of F . We say that an algebra A = ( A, F ) is of type F if the set F of its operations isindexed by elements of F and for n -ary function symbol the corresponding operation f A ∈ F is also n -ary. We use overlined small letters e.g. ø x , ø a to denote tuples ofvariables or elements of an algebra and the same letters without overline but withsubscript to denote elements of tuples e.g. x i , a i .Now, we will recall some basic notions. Let A be an algebra and α, β, γ ∈ Con A .We say that α centralizes β modulo γ , denoted C ( α, β ; γ ), if for every n and n -aryterm t , every ( a, b ) ∈ α , and every ( c , d ) , . . . , ( c n , d n ) ∈ α we have t ( a, c ) γ ≡ t ( a, d ) iff t ( b, c ) γ ≡ t ( b, d ) . If α and β are congruence relations on an algebra A , then the commutator of α and β , denoted [ α, β ], is the least congruence γ for which C ( α, β ; γ ). Note thatfor algebras from congruence modular variety defined in this manner commutatoris commutative, monotone and join-distributive. We say that α is abelian over β if [ α, α ] β . An algebra A is abelian if [1 A , A ] = 0 A . Note, that in CM abelian algebras are exactly affine algebras i.e. algebras polynomially equivalent toa module.For a congruence θ and i = 1 , , . . . we write θ (1) = θθ ( i +1) = [ θ, θ ( i ) ]A congruence relation θ on A is called k -step nilpotent if θ ( k +1) = 0 A and thealgebra A is nilpotent if 1 A is k -step nilpotent for some finite k . VEN FASTER ALGORITHMS FOR CSAT OVER SUPERNILPOTENT ALGEBRAS 5
Our study is focused on supernilpotency - the strengthening of the nilpotency.For congruences α , . . . , α k , β, γ ∈ Con A we say that α , . . . , α k centralize β mod-ulo γ , and write C ( α , . . . , α k , β ; γ ), if for every polynomial f over A and all tuplesø a α ≡ ø b , . . . , ø a k α k ≡ ø b k and ø u β ≡ ø v such that f (ø x , . . . , ø x k , ø u ) γ ≡ f (ø x , . . . , ø x k , ø v )for all possible choices of (ø x , . . . , ø x k ) in { ø a , ø b }× . . . ×{ ø a k , ø b k } but (ø b , . . . . ø b k ),we also have f (ø b , . . . , ø b k , ø u ) γ ≡ f (ø b , . . . , ø b k , ø v ) . This notion was introduced by A. Bulatov [3] and further developed by E. Aichingerand N. Mudrinski [2]. In particular they have shown that for all α , . . . , α k ∈ Con A there is the smallest congruence γ with C ( α , . . . , α k ; γ ) called the k -arycommutator and denoted by [ α , . . . , α k ]. Such generalized commutator for algebrasfrom congruence modular varieties. has many nice properties. In particular thiscommutator is symmetric, monotone, join-distributive and we have(1) [ α , [ α , . . . , α k ]] [ α , . . . , α k ] [ α , . . . , α k ]Generalization of commutator enabled us to define k -supernilpotent algebras asalgebras satisfying [ k +1 times z }| { , . . . , k -supernilpotent for some k . Note that by (1) every k -supernilpotent algebra fromcongruence modular variety is k -nilpotent. Moreover supernilpotent algebras fromcongruence modular variety have very nice characterization which can be easilyinferred from the deep work of R. Freese and R. McKenzie [7] and K. Kearnes [22],and have been observed in [2]. Theorem 2.1.
For a finite algebra A from a congruence modular variety the fol-lowing conditions are equivalent: (1) A is k -supernilpotent, (2) A is k -nilpotent, decomposes into a direct product of algebras of prime powerorder and the term clone of A is generated by finitely many operations, (3) A is k -nilpotent and all commutator polynomials have rank at most k . We will see in the next sections that Theorem 2.1 shows two key propertiesof supernilpotent algebras: possibility of decomposition into direct product of al-gebras of prime power order and bounded essential arity of commutator polyno-mials. The second property can be formulate in a less formal way that for every k -supernilpotent algebra there is no possibility to express as a polynomial a functionwhich behave similarly to k + 1-ary conjunction.3. The structure of supernilpotent algebras
In this section we will see that every supernilpotent algebra of prime power order q h is in fact a wreath product of algebras polynomially equivalent to simple modulesof order q α . In fact, we will see even more, we will prove that every operation ofsuch the algebra can be described by a bunch of polynomials over F q of boundeddegree. Then using this characterization we will able to show some facts needed inthe next sections. More detailed investigations of structure of supernilpotent andnot only supernilpotent algebras can be find in [19]. EVEN FASTER ALGORITHMS FOR CSAT OVER SUPERNILPOTENT ALGEBRAS
First, we present mentioned earlier decomposition of supernilpotent algebras intowreath product of algebras polynomially equivalent with simple abelian groups. Wewill use Freese’s and McKenzie’s ideas from [7] developed in more general settingsin WanderWerf’s PhD thesis [25]. In particular for algebras Q = ( Q, F Q ) and B = ( B, F B ) of the same type F such that Q is abelian with associated group( Q, + , − ) and the set of operation T such that for n -ary operation f ∈ F there is t f : B n Q in [7] was defined algebra A = Q ⊗ T B of type F with universe Q × B and operations defined as follow f A (( q , b ) , . . . , ( q n , b n )) = (cid:0) f Q ( q , . . . , q n ) + t ( b , . . . , b n ) , f B ( b , . . . , b n ) (cid:1) , where f is n -ary operation from F . Note that since Q is an abelian algebra fromcongruence modular variety and hence affine f Q can be expressed in the form f Q ( q , . . . , g n ) = P ni =1 λ i q i + c , where λ i ’s are endomorphisms of ( Q, +).Let assume that A is supernilpotent algebra of prime power order q h and θ ∈ Con A be one of its atoms (i.e. conqruences covering 0 A ). Then using results form[7] it can be shown that A can be decomposed into wreath product of A /θ andsome algebra Q polynomially equivalent to simple module. More precisely A isisomorphic to the algebra Q ⊗ T A /θ for some T and Q . Note that if | Q | = q α then A /θ has order q h − α . Repeating this procedure recursively for A /θ we obtain that A is isomorphic to some algebra which is the wreath product of algebras polynomiallyequivalent to simple modules of order p α . . . . , p α s . From this point we assume that A itself is such the algebra. Denote e i the projection on the i -th coordinate of A (for i = 1 . . . s ). Now enrolling the recursive procedure we get, that every basicoperation f of A fulfills the following properties e s ( f ( x , . . . , x n )) = n X i =1 λ si e i ( x i ) + t sf ,. . .e j ( f ( x , . . . , x n )) = n X i =1 λ ji e j ( x i ) + t jf ( e j +1 ( x ) , . . . , e s ( x ) , . . . , e j +1 ( x n ) , . . . , e s ( x n )) , for some λ ji ’s being endomorphisms of j -th module (of order p α j ) and some t jf ’s.Note that constant summands in above expressions are hidden in t jf ’s and t sf is justthe constant.We will now translate every polynomial g over A to system of polynomials overthe field F q that will simulate the behaviour of g , From the above observationsabout wreath product we see, that every element a ∈ A can be written as a tuple a = ( e a. . . . , e s a ). Furthermore each e i a can be identified with a tuple b , . . . , b α s where each b j ∈ Z q . Indeed, each simple module of size q α has a group underlayof prime exponent, this group must be then isomorphic to group Z αq . So eachelement a ∈ A can be identified in such a way with tuple ( π ( a ) , . . . , π h ( a )) (with π i ( a ) ∈ Z q ) and without loss of generality we will just write a = ( a , . . . , a h ) (as wecan replace algebra A with isomorphic algebra accordingly) or a = ( a , a . . . . , a α i )when a ∈ e i A .So now it is clear, that for i = 1 . . . h each π i g ( x , . . . , x n ) is in fact the functionfrom ( Z q ) nh −→ Z q so as such can be represented by multivariate polynomial overvariables π x , . . . π h x , . . . , π x n , . . . π h x n . So for each i = 1 . . . h we have somepolynomial p i satisfying π i g ( x , . . . , x n ) = p i ( π x , . . . π h x , . . . , π x n , . . . π h x n ). VEN FASTER ALGORITHMS FOR CSAT OVER SUPERNILPOTENT ALGEBRAS 7
We know from basic algebra that p i has unique representation up to equations x q = x (for all variables). We will always mean by polynomial representing π i g this of smallest total degree up to those equations. We will also write deg π i g for the degree of polynomial representing π i g . We now want to prove, that suchpolynomials have small degrees. Lemma 3.1.
Let A be supernilpotent algebra of prime power order q h and g be n -ary polynomial of A . Let d i be maximal degree of π j g for α + . . . + α i − < j α + . . . + α i − + α i . Then s X i =1 α i · d i ( mq ) α + ... + α s − · α s where m is maximal arity of basic operation in the signature of A .Proof. We will inductively decrease j = s . . . e j A (there is α j of them) to obtain degree of π j g for α + . . . + α i − < j α + . . . + α i − + α i . Observe, that from the form of any basic operation of A that we unrolledfrom wreath product representation we can get (by simple induction) that for any n -ary polynomial g its j -th coordinate e j g can be written as sum of elements ofone of the forms: • λe j x i , where x i is variable and λ is some endomorphism of module corre-sponding to e j A , • t jf ( e j +1 g (1) , . . . , e s g (1) . . . , e j +1 g ( l ) . . . , e s g ( l ) ), where t jf comes from l -arybasic operation f of the algebra A and g ( i ) are other polynomials of A , • constant,and for j = s we do not have the second type of the above summands. To startwith take j = s . e s A is then underlying set of a module of size q α s so it has α s coordinates. We want to bound degree of polynomial representing e s f projectedto each such coordinate. Notice that λe s x i is essentially an unary function, thatdepends only on projections of x i to α s coordinates. Moreover on each coordinate itmust be a linear function, because λ is endomorphism of abelian group of exponentq. It means that on each coordinate it can be represented by polynomial of degreeat most 1. So we get that d s j < s we again bound degrees of polynomials for λe j x i by 1 and we areleft with the summands of the form t jf ( e j +1 g (1) , . . . , e s g (1) , . . . , e j +1 g ( l ) , . . . , e s g ( l ) ),where l is arity of basic operation f . For u > j each e u g ( v ) can be representedby α u polynomials of degree at most d u . As every projection of t jf itself can berepresented as polynomial whose each of variable appears with degree at most q −
1, so t jf ( e j +1 g (1) , . . . , e s g (1) , . . . , e j +1 g ( l ) , . . . , e s g ( l ) ) projected to any of its α j coordinates can be represented by polynomial of degree d j l · ( q − · s X i = j +1 α i d i Since it works for any j we have that: EVEN FASTER ALGORITHMS FOR CSAT OVER SUPERNILPOTENT ALGEBRAS s X i =1 α i d i = α d + s X i =2 α i d i α · l · ( q − · s X i =2 α i d i + s X i =2 α i d i = (( q − lα +1)( s X i =2 α i d i )As ( q − lα + 1 ( ql ) α we get s X i =1 α i d i ( ql ) α · ( s X i =2 α i d i ) , and applying the same reasoning recursively to P si = j α i d i for j = 2 , , . . . , s we willend up s X i =1 α i d i ( ql ) α ( ql ) α · ( ql ) α s − α s d s = ( ql ) α + ... + α s − · α s what we wanted to prove. (cid:3) Lemma 3.1 shows in fact, how to reduce solving equations over supernilpotentalgebra A of prime power order q h to system of h equations over field F q . Now,we would like to reduce solving equations over A to solving one equations of thefrom p ( x ) = 1, where p is bounded degree polynomial over field F q . Moreover, thelemma shows that there is easy to compute one to one mapping between solutionsof new equation and the original one. Lemma 3.2.
Let A be supernilpotent algebra of prime power order q h . Then for n -ary p and g polynomials over A there exists nh -ary polynomial f over F q ofdegree at most | A | log q m +1 such that f ( F hnq ) ⊆ { , } and for ø a ∈ A n p ( a , . . . , a n ) = g ( a , . . . , a n ) iff f ( π a , . . . , π h a , . . . , π a n , . . . , π h x n ) = 1 . Proof.
Let(2) p ( x , . . . , x n ) = g ( x , . . . , x n )be an equation over A . Note that every polynomial of A projected by every π i canbe represented by polynomial over field F q . So naturally we can write our equationsequivalently as system of h polynomial equations:(3) p ( π x , . . . , π h x n ) = 0 p ( π x , . . . , π h x n ) = 0 . . . p h ( π x , . . . , π h x n ) = 0It is easy to see that function defined as follows(4) f (ø x ) = h Y i =1 (1 − p i (ø x ) q − )fulfills conditions of the Lemma. It left to count degree of f . As α j of thosepolynomials have degree bounded by d j for j = 1 . . . s we get that degree of f is VEN FASTER ALGORITHMS FOR CSAT OVER SUPERNILPOTENT ALGEBRAS 9 bounded by ( q − P si =1 α i d i ) So by lemma 3.1 as q α + ... + α n = | A | this is boundedby ( q − · ( mq ) α + ... + α s − · α s ( mq ) α + ..., + α s = | A | log q m +1 (cid:3) Behavior of polynomials over finite fields
This section contains proof of Lemma 1.4. The main idea of the proof is to showthat given polynomial over a finite field can be transformed into some special poly-nomial of known degree. The way we do this transformation allow us to establishthe lower bound of the given polynomial’s degree depending among other on theinverse image of chosen element of the field. Hence, by elementary calculations weobtain that the statement of the lemma holds.Let f be a n -ary polynomial over field F q for some prime q . We will prove thatfor every y ∈ f ( F q ) we have that | f − ( y ) | > q n − deg f − q log q . Since for a constantpolynomial this is obviously true, we assume that f is not constant. Fix y ∈ f ( F q ).We will construct the sequence of at most n polynomials of decreasing arity suchthat: • f = f , • arity of f i is n − i , • | f − i ( y ) | c > | f − i +1 ( y ) | >
0, where c ∈ { , q } , • polynomial f i +1 is obtained by substituting some variable in f i by constantor linear combination of other variables, • if f l is the last polynomial in the sequence then either | f − l ( y ) | = 1 or f l isa polynomial in one variable.We start with defining the sequence { f i } li =0 . Let f = f . If arity of f i is higherthen 1 and | f − i ( y ) | > f i +1 in one of two ways depending on thesize of | f − i ( y ) | >
1. If 1 < | f − i ( y ) | < q q then there exists ø a, ø b ∈ f − i ( y ) such thatø a = ø b . Since ø a and ø b are not equal we can choose j such that a j = b j . Withoutloss of generality assume j = n − i . Now we obtain f i +1 from f i by substitutingvariable x n − i by some constant c ∈ Z q . We choose value c to minimize | f − i +1 ( y ) | ,but to keep | f − i +1 ( y ) | >
0. Note that as there are at least two possible valuesfor c preserving | f − i +1 ( y ) | >
0, namely a n − and b n − so 1 | f − i +1 ( y ) | | f − i ( y ) | .Moreover, it is easy to see that deg f i > deg f i +1 .Case | f − i ( y ) | > q q is a bit more complicated since we want to reduce the size of f − ( y ) faster than in the previous case. As | f − i ( y ) | > q q we can find q elementsof f − i ( y ), say v , v ,. . . , v q , which treated as a vectors over field F q are linearlyindependent. Hence there exists (0 , . . . , = ( β , . . . , β n − i ) ∈ F n − iq such that forevery a ∈ F q there exists k such that n − i X j =1 β j · v kj = a. Since, v j ’s are taken from f − i ( y ) it follows that for every a ∈ F q the system ofequations ( f i (ø x ) = y P n − ij =1 β j · x j = a has a solution. Denote the set of solutions of system of equations in such the formas S a . Let u be such that β u = 0. Assume without loss of generality, that u = n − i .We choose b ∈ F q which minimize the size of set S b and produce f i +1 by substitutingin f i variable x n − i with β − n − i ( b − n − i − X j =1 β j · x j ) . Note that P a ∈ F q | S a | = | f − i ( y ) | and hence | S b | | f − i ( y ) | q . Thus, | f − i +1 ( y ) | | f − i ( y ) | q . Besides, deg f i > deg f i +1 . It is easy to see that sequence of polynomialsconstructed in presented way fulfills required conditions.Now, we will prove that deg f > n − l . There are two cases: f is a polynomial inone variable and | f − l ( y ) | = 1. If f is an univariate polynomial then n − l = 1 andsince f is not a constant polynomial deg f > n − l . The case when | f − l ( y ) | = 1 is abit more complicated. Notice, that there is exactly one tuple ø a = ( a , . . . , a n − l ) ∈ F n − lq such that f l (ø a ) = y . Let f ′ ( x , . . . , x n − l ) = 1 − ( f l ( x + a , . . . , x n − l + a n − l ) − y ) q − . One can easily check that f ′ (ø x ) = 1 iff x = (0 , . . . ,
0) and otherwise it is equalzero. Obviously deg f ′ ( q −
1) deg f l . On the other hand we can express f ′ in thefollowing way: f ′ ( x , . . . , x n − l ) = n − l Y i =1 (1 − x q − i ) . Above polynomial has degree ( q − · ( n − l ). This is the lowest possible degreeas every polynomial over field F q has unique representation as sum of monomialsmodulo identities in the form x qi = x i . Hence, ( q −
1) deg f l > deg f ′ > ( q − n − l )and in a consequence deg f > deg f l > n − l .Now, we are ready to do the final calculations. Denote K = | f − ( y ) | . Let l bethe number of f i ’s obtained by substituting one of variables in f i − by a constant,and l = l − l i.e the number of f i ’s we get substituting one of the variables of f i − by linear combination of other variables. It is easy to see that l log q q = q log q and l log q K . Summarizingdeg f > n − l = n − l − l > n − q log q − log q K. Hence, q deg f > q n − q log q − log q K and finally | f − ( y ) | = K = q log q K > q n − deg f − q log q . which finishes the proof of the lemma.5. Deterministic algorithm
In this Section we prove Theory 1.1. Let A be a fixed supernilpotent algebra ofprime power order q h and(5) p (ø x ) = g (ø x ) VEN FASTER ALGORITHMS FOR CSAT OVER SUPERNILPOTENT ALGEBRAS 11 be a given equation over A . By Lemma 3.2 there exists polynomial f over F q ofdegree d = | A | log q m +1 and arity hn , where m is bound on arity of basic operationof A , such that f ( F hnq ) ⊆ { , } and an equation(6) f ( x , . . . , x h , . . . , x n , . . . , x hn ) = 1has a solution iff equation (5) has a solution. We have even more, ø a ∈ A n is asolution of equation (5) iff f ( π ( a ) , . . . , π h ( a ) , . . . , π ( a n ) , . . . , π h ( a n )) = 1. Thus,it is enough to show the algorithm solving equation f (ø x ) = 1.Our algorithm treats circuit as a black-box and checks the set S n,h ∈ F nhq ofpotential solutions of polynomial size in n with such the property that if equation(6) has a solution it has solution contained in S nh . The algorithm returns ”yes” ifit finds the solution in the hitting set, and ”no” otherwise. In the next paragraphwe will show that such the set S nh exists for every n and it can be compute inpolynomial time. If f is a constant function then the algorithm obviously returnsproper answer for every non-empty set of potential solutions as a hitting set. Hence,we can assume that f is not a constant function.As every polynomial over F q also polynomial f can be presented as a sum ofpairwise different monomials multiplied by nonzero constants from the field. Let t be a monomial taken from this presentation which contains the biggest number ofdifferent variables. From the fact that degree of f is bounded by d we have that t depends on at most d variables. Now, let consider the polynomial f ′ formed bysubstituting variables not contained in t by 0 ∈ F q . Note that f ′ is not syntacticallyequal any constant and hence it is not a constant function as every polynomialfunction over finite filed has unique representation (modulo equations x q = x forvariables). Therefore, there exists solution to the equation f ′ (ø x ) = 1. Such thesolution corresponds to the solution of equation (6) in which at most d variables anot equal 0. Hence, we obtain that equation (6) has a solution if it has a solution inwhich at most d variables are not equal 0. There are O (( q h n ) d ) = O ( n d ) valuationsof variables in which at most d variables are different than 0. Thus, to check ifequation (6) has a solution it is enough to check O ( n d ) potential solutions and itcan be done in time O ( n d k ), where k is a size of circuit on the input.6. Randomized algorithm
In this section we will prove Theorem 1.2 which says that there exists linear timeMonte Carlo algorithm solving Csat for supernilpotent algebras. More precisely,we will prove that if there exists solution to the equations over fixed supernilpotentalgebra of prime power order then checking random assignments of variables withuniform distribution we will find the solution with probability at least c for some c > p ( x , . . . , x n ) = g ( x , . . . , x n )be a given equation over supernilpotnent algebra A of prime power order q h . ByLemma 3.2 we get function f which is hn -ary polynomial over F q such that ø a ∈ A is a solution to above equation iff f ( π a , . . . , π h a , . . . , π , a n , . . . , π h a n ) = 1.Moreover, the degree of f is bounded by constant d which depend only on A .Now, by Lemma 1.4 as f is nh -ary we obtain that | f − (1) | > q nh − deg f − q log q > q nh − d − q log q . Observe that | f − (1) || A | n the fraction of assignments of variables for which f is equal 1 is at least c = q nh − d − g log2 q q nh = q − d − q log q . This bound doesnot depend on f and n . Hence, linear time randomized algorithm which picks theassignments of variables with uniform distribution and check if picked assignmentsis a solution to the equation is a c -correct true-biased Monte Carlo algorithm solvingCsat( A ). 7. Conclusions
The main idea of presented in this paper deterministic black-box algorithm cor-rectness proof is translating polynomials of nilpotent algebra A of prime powerorder to polynomial over F q of small degree d | A | log q m +1 . This allowed us tocreate the hitting sets for Csat( A ) by translating hitting sets for bounded degreepolynomial equations over F q . It is worth to emphasize that this reasoning worksfor any hitting set. This means that any black-box algorithm for polynomials over F q of degree at most d translates to an algorithm solving equations over supernilpo-tent algebras of prime power order. As each variable from A (in the reduction fromCsat( A ) to polynomial equations) is factored to at most log( | A | ) variables, thereduction does not affect the time complexity too much. If for instance we havesome black-box algorithm for polynomial equation with hitting set of size O ( n c ),the same upper bound holds for Csat( A ).On the other hand it’s easy to prove the dual theorem. For any polynomialequation over F q of degree at most d = | A | log q m m there is nilpotent algebra A of size q h and maximal arity of basic operation m such that any black-box algorithm forthe algebra A translates to black box algorithm for solving equations over F q ofdegree at most d . To see it, we will consider the following example. Example 7.1.
Let A [ h, m ] = ( A h , + , p , . . . , p h − ) be an algebra such that: • ( A h , +) = Z hq , • π i p i ( x , . . . , x m ) = Q kj =1 π i +1 x j • π j p i ( x , . . . , x m ) = 0 for j = i Note that by results of [7] algebra A from Example 7.1 is supernilpotent andbelongs to congruence modular variety. It easy to see that every equation betweenpolynomials over F q of degree bounded by d = m h − = m log q | A | m = | A | log q m m can beeeasily translate into equation over A . Moreover, projections on the first coordinateof element of any hitting set for Csat( A ) is a hitting set for solving equations ofpolynomials over F q of degree bounded by d .In the light of above paragraphs, to obtain efficient black-box algorithm solvingCsat over supernilpotent algebras it’s enough to produce black-box algorithm forsolving bounded degree equations for polynomials over fields and translate it toblack-box algorithm for supernilpotent algebras since any other black-box algorithmfor supernilpotent algebras cannot be much more efficient (in terms of size of thealgebra and maximal arity of operation). So it seems that the right approach tofind asymptotically optimal deterministic algorithm for supenilpotent algebras isto find optimal algorithm for polynomials of bounded degree.There is a big disproportion between computational complexity of deterministicand probabilistic algorithms presented in this paper. Hence, it would not be surpris-ing if there was an effective derandomization of our Monte Carlo algorithm whichwould result in new fast deterministic algorithm solving Csat. What is also worth VEN FASTER ALGORITHMS FOR CSAT OVER SUPERNILPOTENT ALGEBRAS 13 noting is the fact, that there is one probabilistic algorithm for all supernilpotentalgebras that is probabilistic
FPT in terms of the algebra signature. It is nontrivialresult, because if we were allowed to present the signature of supernilpotent alge-bra on the input, such a problem would be NP -complete (to prove it, we can useconstruction of the algebra showed in Example 7.1 to encode q -coloring). References [1] E. Aichinger. Solving systems of equations in supernilpotent algebras. arXiv , 2019,arXiv:1901.07862.[2] E. Aichinger and N. Mudrinski. Some applications of higher commutators in Malcev algebras.
Algebra Universalis , (2010), 367–403.[3] A. Bulatov. On the number of finite Maltsev algebras. Contributions to general algebra , (2000), 41–54.[4] S. Burris and H. P. Sankappanavar. A Course in Universal Algebra-With 36 Illustrations .2006.[5] A. Fldvri. The complexity of the equation solvability problem over nilpotent groups.
J. Al-gebra , (2018), 289303.[6] A. Fldvri and G. Horvath. The complexity of the equation solvability and equivalence prob-lems over finite groups. International Journal of Algebra and Computation , (2019), 1-17.[7] R. Freese and R. McKenzie.
Commutator Theory for Congruence Modular Varieties . LondonMath. Soc. Lecture Notes, No. 125. Cambridge U. Press, Cambridge, 1987.[8] M. Goldmann and A. Russell. The complexity of solving equations over finite groups.
Pro-ceedings of the Fourteenth Annual IEEE Conference on Computational Complexity , (1999),pp. 80–86.[9] T. Gorazd and J. Krzaczkowski. Term equation satisfiability over finite algebras.
InternationalJournal of Algebra and Computation , (2010), 1001–1020.[10] T. Gorazd and J. Krzaczkowski. The complexity of problems connected with two-elementalgebras. Reports on Mathematical Logic , (2011), 91–108.[11] G. Horv´ath. The complexity of the equivalence and equation solvability problems over nilpo-tent rings and groups. Algebra Universalis , (2011), 391-403.[12] G. Horv´ath. The complexity of the equivalence and equation solvability problems over meta-Abelian groups. Journal of Algebra , (2015), 208–230.[13] G. Horv´ath and Cs. Szab´o. The Complexity of Checking Identities over Finite Groups. In-ternational Journal of Algebra and Computation , (2006), 931–940.[14] G. Horv´ath and Cs. Szab´o. The extended equivalence and equation solvability problems forgroups. Discrete Mathematics & Theoretical Computer Science , (2011), 23–32.[15] G. Horv´ath and Cs. Szab´o. Equivalence and equation solvability problems for the alternatinggroup A . Journal of Pure and Applied Algebra , (2012), 2170–2176.[16] P. M. Idziak and J. Krzaczkowski. Satisfiability in multi-valued circuits. LICS ’18: Proceed-ings of the 33rd Annual ACM/IEEE Symposium on Logic in Computer Science , (2018),550558[17] P. M. Idziak, P. Kawalek and J. Krzaczkowski. Expressive Power, Satisfiability and Equiv-alence of Circuits over Nilpotent Algebras. . Schloss Dagstuhl-Leibniz-Zentrum fuer In-formatik, (2018).[18] P. M. Idziak, P.Kawaek and J. Krzaczkowski. Intermediate problems in modular circuitssatisfiability.
Manuscript , (2020).[19] P. M. Idziak, P.Kawaek and J. Krzaczkowski. Classifying algebras by supernilpotent intervals,
Manuscript (2020).[20] G. Krolyi and C. Szab. The complexity of the equation solvablity problem over nilpotentrings.
Manuscript available at http://web.cs.elte.hu/˜csaba/publications, (2015).[21] P. Kawa lek, M. Kompatscher and J. Krzaczkowski. Circuit equivalence in 2-nilpotent algebras. arXiv , (2019), arXiv:1909.12256.[22] K. Kearnes. Congruence modular varieties with small free spectra.
Algebra Universalis , (1999), 165–181. [23] M. Kompatscher. CC-circuits and the expressive power of nilpotent algebras. arXiv , (2019).arXiv:1911.01479.[24] M. Kompatscher. The equation solvability problem over supernilpotent algebras with Malcevterm. International Journal of Algebra and Computation , (2018), 1005-1015.[25] J. WanderWerf,
Wreath Decomposition of Algebras . PhD thesis, University of California,Berkeley, (1995)[26] B. Schwarz. The complexity of satisfiability problems over finite lattices.