Deciding the existence of minority terms
aa r X i v : . [ m a t h . L O ] O c t DECIDING THE EXISTENCE OF MINORITY TERMS
ALEXANDR KAZDA, JAKUB OPRŠAL, MATT VALERIOTE,AND DMITRIY ZHUK
Abstract.
This paper investigates the computational complexity ofdeciding if a given finite idempotent algebra has a ternary term oper-ation m that satisfies the minority equations m ( y, x, x ) ≈ m ( x, y, x ) ≈ m ( x, x, y ) ≈ y . We show that a common polynomial-time approach totesting for this type of condition will not work in this case and that thisdecision problem lies in the class NP . Introduction
It is not difficult to see that for the 2-element group Z = h{ , } , + i , theterm operation m ( x, y, z ) = x + y + z satisfies the equations(1) m ( y, x, x ) ≈ m ( x, y, x ) ≈ m ( x, x, y ) ≈ y. A slightly more challenging exercise is to show that a finite Abelian groupwill have such a term operation if and only if it is isomorphic to a Cartesianpower of Z .A ternary operation m ( x, y, z ) on a set A is called a minority operation on A if it satisfies the identities (1). A ternary term t ( x, y, z ) of an algebra A isa minority term of A if its interpretation as an operation on A , t A ( x, y, z ) ,is a minority operation on A . Given a finite algebra A , one can decide if ithas a minority term by constructing all of its ternary term operations andchecking to see if any of them satisfy the equations (1). Since the set ofternary term operations of A can be as big as | A | | A | , this procedure willhave a runtime that in the worst case will be exponential in the size of A .In this paper we consider the computational complexity of testing forthe existence of a minority term for finite algebras that are idempotent.An n -ary operation f on a set A is idempotent if it satisfies the equation f ( x, x, . . . , x ) ≈ x and an algebra is idempotent if all of its basic operationsare. We observe that every minority operation is idempotent. While idem-potent algebras are rather special, one can always form one by taking the idempotent reduct of a given algebra A . This is the algebra with universe A whose basic operations are all of the idempotent term operations of A . It Mathematics Subject Classification.
Primary 68Q25, Secondary 03B05, 08A40.The first author was supported by the Charles University grants PRIMUS/SCI/12 andUNCE/SCI/22. The second author was supported by European Research Council (GrantAgreement no. 681988, CSP-Infinity) and UK EPSRC (Grant EP/R034516/1), and thethird author was supported by the Natural Sciences and Engineering Council of Canada. turns out that many important properties of an algebra and the variety thatit generates are governed by its idempotent reduct [9].The condition of an algebra having a minority term is an example of a moregeneral existential condition on the set of term operations of an algebracalled a strong Maltsev condition . Such a condition consists of a finite set ofoperation symbols along with a finite set of equations involving them. Analgebra is said to satisfy the condition if for each k -ary operation symbol fromthe condition, there is a corresponding k -ary term operation of the algebraso that under this correspondence, the equations of the condition hold. Fora more careful and complete presentation of this notion and related ones, werefer the reader to [6].Given a strong Maltsev condition Σ , the problem of determining if a finitealgebra satisfies Σ is decidable and lies in the complexity class EXPTIME .As in the minority term case, one can construct all term operations of analgebra up to the largest arity of an operation symbol in Σ and then checkto see if any of them can be used to witness the satisfaction of the equationsof Σ . In general, we cannot do any better than this, since for some strongMaltsev conditions, it is known that the corresponding decision problem is EXPTIME -complete [5].The situation for finite idempotent algebras appears to be better than inthe general case since there are a number of strong Maltsev conditions forwhich there are polynomial-time procedures to decide if a finite idempotentalgebra satisfies them [5, 7, 8]. At present there is no known characterizationof these strong Maltsev conditions and we hope that the results of this papermay help to lead to a better understanding of them. We refer the readerto [3] or to [1] for background on the basic algebraic notions and results usedin this work. 2.
Formulation of the problem
In this section, we formally introduce the considered problem. In all theproblems mentioned in the introduction, we assume that the input algebrais given as a list of tables of its basic operations. In particular, this impliesthat the input algebra has finitely many operations. We also assume thatthe input algebra has at least one operation (i.e., the input is non-empty)and we forbid nullary operations on the input. The main concern of thispaper is the following decision problem.
Definition 1.
Define
Minority Id to be the following decision problem: • INPUT: A list of tables of basic operations of an idempotent alge-bra A . • QUESTION: Does A have a minority term? ECIDING THE EXISTENCE OF MINORITY TERMS 3
The size of an input is measured by the following formula. For a finitealgebra A , let k A k = ∞ X i =1 k i | A | i , where k i is the number of i -ary basic operations of A . Since we assumethat A has only finitely many operations, the sum is finite. Also note that k A k ≥ | A | since we assumed that A has a non-nullary operation.3. Minority is a join of two weaker conditions
One approach to understanding the minority term condition is to see ifmaybe there exist two weaker Maltsev conditions Σ and Σ such that afinite algebra A has a minority term if and only if A satisfies both Σ and Σ . In this situation, we would say that the minority term condition is thejoin of Σ and Σ . Were this the case, we could decide if A has a minorityterm by deciding Σ and Σ .On the surface, the minority term condition is already quite concise andnatural; it is not clear if having a minority term can be expressed as a joinof weaker conditions. In this section, we show that it is a join of having aMaltsev term with a condition which we call having a minority-majority term(not to be confused with the ‘generalized minority-majority’ terms from [4]).Maltsev terms are a classical object of study in universal algebra – decidingif an algebra has them is in P for finite idempotent algebras. The minority-majority terms are much less understood. Definition 2.
A ternary term p ( x, y, z ) of an algebra A is a Maltsev termfor A if it satisfies the equations p ( x, x, y ) ≈ p ( y, x, x ) ≈ y and a 6-ary term t ( x , . . . , x ) is a minority-majority term of A if it satisfiesthe equations t ( y, x, x, z, y, y ) ≈ yt ( x, y, x, y, z, y ) ≈ yt ( x, x, y, y, y, z ) ≈ y. We point out that if an algebra has a minority term then it also, trivially,has a Maltsev term, but that the converse does not hold (as witnessed by thecyclic group Z ). Our definition of a minority-majority term is a strengthen-ing of the term condition found by Olšák in [12]. Olšák has shown that histerms are a weakest non-trivial strong Maltsev condition whose terms are allidempotent.We observe that by padding variables, any algebra that has a minorityterm or a majority term (just replace the final occurrence of the variable y in the equations (1) by the variable x to define such a term) also hasa minority-majority term. Since the 2-element lattice has a majority term ALEXANDR KAZDA, JAKUB OPRŠAL, MATT VALERIOTE, AND DMITRIY ZHUK but no minority term, it follows that having a minority-majority term isstrictly weaker than having a minority term.
Theorem 3.
An algebra has a minority term if and only if it has a Maltsevterm and a minority-majority term.Proof.
The discussion preceding this theorem establishes one direction ofthis theorem. For the other we need to show that if an algebra A hasa Maltsev term p ( x, y, z ) , and a minority-majority term t ( x , . . . , x ) then A has a minority term. Given such an algebra A , define m ( x, y, z ) = t ( x, y, z, p ( z, x, y ) , p ( x, y, z ) , p ( y, z, x )) . Verifying that m ( x, y, z ) is a minority term for A is straightforward; we showone of the three required equalities here as an example: m ( x, x, y ) ≈ t ( x, x, y, p ( y, x, x ) , p ( x, x, y ) , p ( x, y, x )) ≈ t ( x, x, y, y, y, p ( x, y, x )) ≈ y. (cid:3) Corollary 4.
The problem of deciding if a finite algebra has a minority termcan be reduced to the problems of deciding if it has a Maltsev term and if ithas a minority-majority term.
As was demonstrated in [5, 7], there is a polynomial-time algorithm todecide if a finite idempotent algebra has a Maltsev term. Therefore, shouldtesting for a minority-majority term for finite idempotent algebras prove tobe tractable, then this would lead to a fast algorithm for testing for a minorityterm, at least for finite idempotent algebras. From the hardness results foundin [5] it follows that in general, the problem of deciding if a finite algebrahas a minority-majority term is
EXPTIME -complete; the complexity of thisproblem restricted to idempotent algebras is unknown.4.
Local Maltsev terms
In [5, 7, 8, 13] polynomial-time algorithms are presented for deciding ifcertain Maltsev conditions hold in the variety generated by a given finiteidempotent algebra. One particular Maltsev condition that is addressed byall of these papers is that of having a Maltsev term. In all but [5], thepolynomial-time algorithm produced is based on testing for the presence ofenough ‘local’ Maltsev terms in the given algebra.
Definition 5.
Let A be an algebra and S ⊆ A × { , } . A term operation t ( x, y, z ) of A is a local Maltsev term operation for S if: • whenever (( a, b ) , ∈ S , t ( a, b, b ) = a , and • whenever (( a, b ) , ∈ S , t ( a, a, b ) = b .Clearly, if A has a Maltsev term then it has a local Maltsev term operationfor every subset S of A ×{ , } and conversely, if A has a local Maltsev termoperation for S = A × { , } then it has a Maltsev term. In [7, 8, 13] it is ECIDING THE EXISTENCE OF MINORITY TERMS 5 shown that if a finite idempotent algebra A has local Maltsev term operationsfor all two element subsets of A × { , } then A will have a Maltsev term.This fact is then used as the basis for a polynomial-time test to decide ifa given finite idempotent algebra has a Maltsev term.In this section we extract an additional piece of information from thisapproach to testing for a Maltsev term, namely that if a finite idempotentalgebra has a Maltsev term, then we can produce an operation table ora circuit for a Maltsev term operation in time polynomial in the size ofthe algebra. We will first prove that there is an algorithm for producingcircuits for a Maltsev function; the algorithm for producing the operationtable will then be given as a corollary. However, for the reduction presentedin Section 6 we need only the algorithm for producing a function table.Let us first briefly describe how to get a global Maltsev operation fromlocal ones. Assume we know (circuits of) a local Maltsev term operation t a,b,c,d ( x, y, z ) for each two element subset { (( a, b ) , , (( c, d ) , } of A × { , } . These are required for A to have a Maltsev term. A globalMaltsev term can be constructed from them in two stages: First, we con-struct, for each a, b ∈ A , an operation t a,b such that t a,b ( a, b, b ) = a and t a,b ( x, x, y ) = y for all x, y ∈ A . This is done by fixing an enumeration ( a , b ) , ( a , b ) , . . . , ( a n , b n ) of A , and then defining, for ≤ j ≤ n , theoperation t ja,b ( x, y, z ) on A inductively as follows: • t a,b ( x, y, z ) = t a,b,a ,b ( x, y, z ) , and • for ≤ j < n , t j +1 a,b ( x, y, z ) = t a,b,u,v ( t ja,b ( x, y, z ) , t ja,b ( y, y, z ) , z ) ,where u = t ja,b ( a j +1 , a j +1 , b j +1 ) and v = b j +1 .An easy inductive argument shows that t ja,b ( a, b, b ) = a and t ja,b ( a i , a i , b i ) = b i for all i ≤ j ≤ n , and so setting t a,b ( x, y, z ) = t n a,b ( x, y, z ) works.In the second stage, we construct a term t j ( x, y, z ) such that t j ( a, a, b ) = b for all a , b ∈ A and t j ( a i , b i , b i ) = a i for all i ≤ j . We define this sequence ofoperations inductively again: • t ( x, y, z ) = t a ,b ( x, y, z ) , and • for ≤ j < n , t j +1 ( x, y, z ) = t u,v ( x, t j ( x, y, y ) , t j ( x, y, z )) , where u = a j +1 and v = t j ( a j +1 , b j +1 , b j +1 ) .Again, it can be shown that for ≤ j ≤ n , the operation t j ( x, y, z ) satisfiesthe claimed properties and so t n ( x, y, z ) will be a Maltsev term operationfor A .From the above construction, one can obtain a term that represents aMaltsev term operation of the algebra A , starting with terms representingthe operations t a,b,c,d . But there is an efficiency problem with this approach:the term is extended by one layer in each step, which results in a term ofexponential size. Therefore, the bookkeeping of this term would increasethe running time of the algorithm beyond polynomial. Nevertheless, this ALEXANDR KAZDA, JAKUB OPRŠAL, MATT VALERIOTE, AND DMITRIY ZHUK fgxyz f ( g ( x, y, y ) , g ( x, y, y ) , z ) Figure 1.
A succinct circuit representation of the term f ( g ( x, y, y ) , g ( x, y, y ) , z ) .can be circumvented by constructing a succint representation of the termoperations, namely by considering circuits instead of terms.Informally, a circuit over an algebraic language (as a generalization oflogical circuits) is a collection of gates labeled by operation symbols, wherethe number of inputs of each gate corresponds to the arity of the operationsymbol. The inputs are either connected to outputs of some other gate, ordesignated as inputs of the circuit; an output of one of the gates is desig-nated as an output of the circuit. Furthermore, these connections allow forstraightforward evaluation, i.e., there are no oriented cycles.Formally, we define an n -ary circuit in the language of an algebra A asa directed acyclic graph with possibly multiple edges that has two kinds ofvertices: inputs and gates . There are exactly n inputs, labeled by variables x , . . . , x n , and each of them is a source, and a finite number of gates. Eachgate is labeled by an operation symbol of A , the in-degree corresponds tothe arity of the operation, and the in-edges are ordered. One of the verticesis designated as the output of the circuit. We define the size of the circuitto be the number of its vertices.The value of a circuit given an input tuple a , . . . , a n is defined by thefollowing recursive computation: The value on an input vertex labeled by x i is a i , the value on a gate labeled by g is the value of the operation g A applied to the values of its in-neighbours in the specified order. Finally, theoutput value of the circuit is the value of the output vertex. It is easy to seethat the value of a circuit on a given tuple can be computed in linear time(in the size of the circuit) in a straightforward way. For a fixed circuit thefunction that maps the input tuple to the output is a term function of A .Indeed, to find such a term it is enough to evaluate the circuit in the free(term) algebra on the tuple x , . . . , x n . The converse is also true since anyterm can be represented as a ‘tree’ circuit (it is an oriented tree if we omitall input vertices). Many terms can be expressed by considerably smallercircuits. We give one such example in Figure 1.In the proof of the theorem below, we will also use circuits with multipleoutputs. The only difference in the definition is that several vertices aredesignated as outputs. Any such circuit then computes a tuple of termfunctions. Theorem 6.
Let A be a finite idempotent algebra. There is an algorithmwhose runtime can be bounded by a polynomial in the size of A that will ECIDING THE EXISTENCE OF MINORITY TERMS 7 t a,b,u,v t a,b,u,v t j +1 a,b ( x, y, z ) t j +1 a,b ( y, y, z ) t ja,b ( x, y, z ) t ja,b ( y, y, z ) xyz zC ja,b Figure 2.
Recursive definition of circuit C j +1 a,b . either (correctly) output that A has no Maltsev term operation, or outputa circuit for some Maltsev term operation of A .Proof. Let n = | A | . Recall that A has at least one basic operation of positivearity and hence k A k ≥ n . Let m ≥ be the maximal arity of an operationof A .We construct a circuit representing a Maltsev operation in three steps:The first step produces, for each a , b , c , d from A , a circuit that computesa local Maltsev term operation t a,b,c,d as defined near the beginning of thissection, the second step produces circuits that compute t a,b , and the finalstep produces a circuit for a Maltsev operation t . We note that the algorithmcan fail only in the first step.Step 1: Circuits for t a,b,c,d . For each a, b, c, d , we aim to produce a circuitthat computes a local Maltsev term operation t a,b,c,d . To do this, we considerthe subuniverse R of A generated by { ( a, c ) , ( b, c ) , ( b, d ) } . According toProposition 6.1 from [5] R can be generated in time O ( || A || m ) . It is clearthat A has a local Maltsev term operation t a,b,c,d if and only if ( a, d ) ∈ R .Our algorithm produces a circuit for t a,b,c,d by generating elements of R oneat a time and keeping track of circuits that witness the membership of theseelements.More precisely, we employ a subuniverse generating algorithm to producea sequence r = ( a, c ) , r = ( b, c ) , r = ( b, d ) , r , . . . of elements of R (in time O ( || A || m ) ) such that each r k +1 , for k ≥ , is obtained from r , . . . , r k bya single application of an operation f of A . Our algorithm will also producea sequence of ternary circuits C a,b,c,d ⊆ C a,b,c,d ⊆ . . . such that each C ka,b,c,d has k outputs, and the values of C ka,b,c,d on r , r , r give r , . . . , r k . We define C a,b,c,d to be the circuit with no gates, and outputs x , x , x . The circuit C k +1 a,b,c,d is defined inductively from C ka,b,c,d : Consider an operation f and r i , . . . , r i p with i j ≤ k such that r k +1 = f ( r i , . . . , r i p ) ; add a gate labeled f to C ka,b,c,d connecting its inputs with the outputs of C ka,b,c,d numbered by ALEXANDR KAZDA, JAKUB OPRŠAL, MATT VALERIOTE, AND DMITRIY ZHUK i j for j = 1 , . . . , p . We designate the output of this gate as the ( k + 1) -stoutput of C k +1 a,b,c,d .It is straightforward to check that the circuits C ka,b,c,d satisfy the require-ments. We also note that the size of C ka,b,c,d is exactly k . We stop thisinductive construction at some step k if r k = ( a, d ) , in which case we pro-duce the circuit C a,b,c,d from C ka,b,c,d by indicating a single output to be the k -th output of C ka,b,c,d . If, on the other hand, we have generated all of R with-out producing ( a, d ) at any step then the algorithm halts and outputs that A does not have a Maltsev term operation. The soundness of our algorithmfollows from the fact that A has a local Maltsev term t a,b,c,d if and only if ( a, d ) ∈ R and that A has a Maltsev term if and only if it has local Maltsevterms t a,b,c,d for all a , b , c , d ∈ A . The algorithm produces circuits of size O ( n ) and spends most of its time generating new elements of R ; generatingeach C a,b,c,d takes time O ( k A k m ) , making the total time complexity of Step1 to be O ( k A k mn ) .Step 2: Circuits for t a,b . At this point we assume that the functions t a,b,c,d are part of the signature. It is clear that the full circuit can be obtained bysubstituting the circuits C a,b,c,d for gates labeled by t a,b,c,d , and this can bestill done in polynomial time.Our task is to obtain a circuit for t a,b . We do this by inductively con-structing circuits C ja,b that compute two values of the terms t ja,b , namely t ja,b ( x, y, z ) and t ja,b ( y, y, z ) . Starting with j = 0 and t ( x, y, z ) = x , we de-fine C a,b to be the circuit with no gates and outputs x, y . Further, we definecircuit C j +1 a,b inductively from C ja,b by adding two gates labeled by t a,b,u,v ,where u = t ja,b ( a j +1 , a j +1 , b j +1 ) and v = b j +1 : the first gate has as inputsthe two outputs of C ja,b and z , the second gate has as inputs two copies ofthe second output of C ja,b and z . See Figure 2 for a graphical representation.Again, it is straightforward to check that these circuits have the requiredproperties. Also note that the size of C ja,b is bounded by j + 3 which isa polynomial. The final circuit C a,b computing t a,b is obtained from C n a,b bydesignating the first output of C n a,b to be the only output of C a,b . Once wehave t a,b,c,d in the signature, this process will run in time O ( n ) .Step 3: Circuit for a Maltsev term. Again, we assume that t a,b are basicoperations, and construct circuits C j computing two values t j ( x, y, y ) and t j ( x, y, z ) of t j inductively. The proof is analogous to Step 2, with the onlydifference that we use Figure 3 for the inductive definition. Again the timecomplexity is O ( n ) .Each step runs in time polynomial in k A k (the time complexity is domi-nated by Step 1) and outputs a polynomial size circuit. This also implies thatexpanding the gates according to their definitions in Steps 2 and 3 can be ECIDING THE EXISTENCE OF MINORITY TERMS 9 t u,v t u,v t j +1 ( x, y, y ) t j +1 ( x, y, z ) t j ( x, y, y ) t j ( x, y, z ) xxyz C j Figure 3.
Recursive definition of circuit C j +1 .done in polynomial time; the final size of the output circuit will be boundedby O ( n ) . (cid:3) Corollary 7.
Let A be a finite idempotent algebra. There is an algorithmwhose runtime can be bounded by a polynomial in the size of A that willproduce the table of some Maltsev term operation of A , should one exist.Proof. The polynomial-time algorithm is as follows. First, generate a poly-nomial size circuit for some Maltsev term operation of A . This can be donein polynomial time by the above theorem. Second, evaluate this circuit atall | A | possible inputs. The second step runs in polynomial time since eval-uation of a circuit is linear in the size of the circuit. (cid:3) We note that there is also a more straightforward algorithm for producingthe operation table of a Maltsev term which follows the circuit constructionbut instead of circuits, it remembers the tables for each of the relevant termoperations. 5.
Local minority terms
In contrast to the situation for Maltsev terms highlighted in the previoussection, we will show that having plenty of ‘local’ minority terms does notguarantee that a finite idempotent algebra will have a minority term. Oneconsequence of this is that an approach along the lines in [7, 8, 13] to findingan efficient algorithm to decide if a finite idempotent algebra has a minorityterm will not work.In this section, we will construct for each odd natural number n > a finite idempotent algebra A n with the following properties: The universeof A n has size n and A n does not have a minority term, but for every subset E of A n of size n − there is a term of A n that acts as a minority term onthe elements of E . We start our construction by fixing some odd n > and some minorityoperation m on the set [ n ] = { , , . . . , n } . To make things concrete we set m ( x, y, z ) = x y = zy x = zz else,but note that any minority operation on [ n ] will do.Since there are two nonisomorphic groups of order 4, we have two differ-ent natural group operations on { , , , } : addition modulo 4, which wewill denote by ‘ + ’ (its inverse is ‘ − ’), and bitwise XOR, which we denoteby ‘ ⊕ ’ (this operation takes bitwise XOR of the binary representations ofinput numbers, so for example ⊕ ). Throughout this section, we willuse arithmetic modulo 4, e.g., x = x + x , for all expressions except thoseinvolving indices.The construction relies on similarities and subtle differences of the twogroup structures, and the derived Maltsev operations, x − y + z and x ⊕ y ⊕ z .Both these operations share a congruence ≡ that is given by taking theremainder modulo 2. We note that x ≡ y if and only if x = 2 y . Observation 8.
Let x, y, z ∈ { , , , } . Then ( x ⊕ y ⊕ z ) − ( x − y + z ) ∈ { , } , and moreover the result depends only on the classes of x , y , and z in thecongruence ≡ (i.e., the least significant binary bits of x , y , and z ).Proof. Both Maltsev operations agree modulo ≡ , hence the difference liesin the ≡ -class of 0.To see the second part, it is enough to observe that x ⊕ x + 2 = x − for all x . Hence changing, say x to x ′ = x ⊕ simply flips the most significantbinary bit of both x ⊕ y ⊕ z and x − y + z , keeping the difference the same. (cid:3) Definition 9.
Let A n = [ n ] × [4] . For i ∈ [ n ] , we define t i ( x, y, z ) to be thefollowing operation on A n : t i (( a , b ) , ( a , b ) , ( a , b )) = ( ( i, b − b + b ) if a = a = a = i , and ( m ( a , a , a ) , b ⊕ b ⊕ b ) , otherwise.The algebra A n is defined to be the algebra with universe A n and basicoperations t , . . . , t n .By construction, the following is true. Claim 10.
For every ( n − -element subset E of A n , there is a term op-eration of A n that satisfies the minority term equations when restricted toelements from E .Proof. Pick i ∈ [ n ] such that no element of E has its first coordinate equalto i ; the operation t i is a local minority for this E . (cid:3) ECIDING THE EXISTENCE OF MINORITY TERMS 11
Proposition 11.
For n > and odd, the algebra A n does not have a mi-nority term.Proof. Given some ( i, a ) ∈ A n , we will refer to a as the arithmetic part of ( i, a ) . This is to avoid talking about ‘second coordinates’ in the confusingsituation when ( i, a ) itself is a part of a tuple of elements of A n .To prove the proposition, we will define a certain subuniverse R of ( A n ) n and then show that R is not closed under any minority operation on A n (applied coordinate-wise). We will write n -tuples of elements of A n as n × matrices where the arithmetic parts of the elements make up thesecond column.Let R ⊆ ( A n ) n be the set of all n -tuples of the form x x ... n x n x n +1 x n +2 ... n x n x n +1 x n +2 ... n x n such that x kn +1 ≡ x kn +2 ≡ · · · ≡ x kn + n , for k = 0 , , , and(2) n X i =1 x i = 2 . (3)The three equations from (2) mean that the least significant bits of thearithmetic parts of the first n entries agree and similarly for the second andthe last n entries; equation (3) can be viewed as a combined parity check onall involved bits. Claim 12.
The relation R is a subuniverse of ( A n ) n . Proof.
By the symmetry of the t i ’s and R , it is enough to show that t preserves R . Let us take three arbitrary members of R : x , x , ... n x ,n x ,n +1 x ,n +2 ... n x , n x , n +1 x , n +2 ... n x , n , x , x , ... n x ,n x ,n +1 x ,n +2 ... n x , n x , n +1 x , n +2 ... n x , n , x , x , ... n x ,n x ,n +1 x ,n +2 ... n x , n x , n +1 x , n +2 ... n x , n and apply t to them to get:(4) ~r = x , − x , + x , x , ⊕ x , ⊕ x , ... n x ,n ⊕ x ,n ⊕ x ,n x ,n +1 − x ,n +1 + x ,n +1 x ,n +2 ⊕ x ,n +2 ⊕ x ,n +2 ... n x , n ⊕ x , n ⊕ x , n x , n +1 − x , n +1 + x , n +1 x , n +2 ⊕ x , n +2 ⊕ x , n +2 ... n x , n ⊕ x , n ⊕ x , n We want to verify that ~r ∈ R . First note that (2) is satisfied: This followsfrom the fact that x − y + z and x ⊕ y ⊕ z give the same result modulo 2,and the assumption that the original three tuples satisfied (2).What remains is to verify the property (3). If in the equality (4) abovewe replace the operations ⊕ by − and + , verifying (3) is easy: The sum ofthe arithmetic parts of such a modified tuple is(5) n X j =1 ( x ,j − x ,j + x ,j ) = n X j =1 x ,j − n X j =1 x ,j + n X j =1 x ,j = 2 − . This is why we need to examine the difference between the ⊕ -based and + -based Maltsev operations. For k ∈ { , , } and i ∈ { , . . . , n } we let c k,i = ( x ,kn + i ⊕ x ,kn + i ⊕ x ,kn + i ) − ( x ,kn + i − x ,kn + i + x ,kn + i ) ECIDING THE EXISTENCE OF MINORITY TERMS 13
By the second part of Observation 8, c k,i does not depend on i (changing i does not change the x j,kn + i ’s modulo ≡ by condition (2) in the definitionof R ). Hence we can write just c k instead of c k,i .Using c , c , and c to adjust for the differences between the two Maltsevoperations, we can express the sum of the arithmetic parts of the tuple ~r as n X j =1 ( x ,j − x ,j + x ,j ) + n X i =2 c + n X i =2 c + n X i =2 c = 2 + ( n − c + c + c ) where we used (5) to get the right hand side. We chose n odd, hence n − is even and each c k is even by Observation 8, so ( n − c k = 0 for any k = 0 , , . We see that the sum of the arithmetic parts of ~r is equal to 2which concludes the proof of (3) for the tuple ~r and we are done. (cid:3) It is easy to see that ... n
01 12 1 ... n
11 12 1 ... n , ... n
11 02 0 ... n
01 12 1 ... n , ... n
11 12 1 ... n
11 02 0 ... n ∈ R, and ... n
01 02 0 ... n
01 02 0 ... n / ∈ R. However, the last tuple can be obtained from the first three by applying anyminority operation on the set A n coordinate-wise. From this we concludethat A n does not have a minority term. (cid:3) We note that the above construction of A n makes sense for n even as welland claim that these algebras also have the same key features, namely, byconstruction, they have plenty of ‘local’ minority term operations but theydo not have minority terms. The verification of this last fact for n even issimilar, but slightly more technical than for n odd, and we omit the proofhere.The algebras A n can also be used to witness that having a lot of lo-cal minority-majority terms does not guarantee the presence of an actualminority-majority term. By padding with dummy variables, any local mi-nority term of an algebra A n is also a term that locally satisfies the minority-majority term equations. But since each A n has a Maltsev term but not a mi-nority term, then by Theorem 3 it follows that A n cannot have a minority-majority term. Deciding minority in idempotent algebras is in NP
The results from the previous section imply that one cannot base an effi-cient test for the presence of a minority term in a finite idempotent algebraon checking if it has enough local minority terms. This does not rule outthat the problem is in the class P , but to date no other approach to show-ing this has worked. As an intermediate result, we show, at least, thatthis decision problem is in NP and so cannot be EXPTIME -complete (unless NP = EXPTIME ).We first show that an instance A of the decision problem Minority Id canbe expressed as a particular instance of the subpower membership problemfor A . Definition 13.
Given a finite algebra A , the subpower membership problem for A , denoted by SMP ( A ) , is the following decision problem: • INPUT: ~a , . . . , ~a k ,~b ∈ A n • QUESTION: Is ~b in the subalgebra of A n generated by { ~a , . . . , ~a k } ?To build an instance of SMP ( A ) expressing that A has a minority term,let I = { ( a, b, c ) | a, b, c ∈ A and |{ a, b, c }| ≤ } . So | I | = 3 | A | − | A | . For ( a, b, c ) ∈ I , let min( a, b, c ) be the minority element of this triple. So min( a, b, b ) = min( b, a, b ) = min( b, b, a ) = min( a, a, a ) = a. For ≤ i ≤ , let ~π i ∈ A I be defined by ~π i ( a , a , a ) = a i and define ~µ A ∈ A I by ~µ A ( a , a , a ) = min( a , a , a ) , for all ( a , a , a ) ∈ I . Denotethe instance ~π , ~π , ~π , and ~µ A of SMP ( A ) by min( A ) . Proposition 14.
An algebra A has a minority term if and only if ~µ A isa member of the subpower of A I generated by { ~π , ~π , ~π } , i.e., if and onlyif min( A ) is a ‘yes’ instance of SMP ( A ) when A is finite.Proof. If m ( x, y, z ) is a minority term for A , then applying m coordinatewiseto the generators ~π , ~π , ~π will produce the element ~µ A . Conversely, anyterm that produces ~µ A from these generators will be a minority term for A . (cid:3) Examining the definition of min( A ) , we see that the parameters fromDefinition 13 are k = 3 and n = 3 | A | − | A | , which is (for algebras withat least one at least unary basic operation) polynomial in k A k . For A idempotent, we can in fact improve n to | A | − | A | , since then we do notneed to include in I entries of the form ( a, a, a ) .In general, it is known that for some finite algebras the subpower mem-bership problem can be EXPTIME -complete [10] and that for some others,e.g., for any algebra that has only trivial or constant basic operations, itlies in the class P . In [11], P. Mayr shows that when A has a Maltsev term,then SMP ( A ) is in NP . We claim that a careful reading of Mayr’s proof re-veals that in fact the following uniform version of the subpower membership ECIDING THE EXISTENCE OF MINORITY TERMS 15 problem, where the algebra A is considered as part of the input, is also in NP . Definition 15.
Define
SMP Un to be the following decision problem: • INPUT: A list of tables of basic operations of an algebra A thatincludes a Maltsev operation, and ~a , . . . , ~a k ,~b ∈ A n . • QUESTION: Is ~b in the subalgebra of A n generated by { ~a , . . . , ~a k } ?We base the main result of this section on the following. Theorem 16 (see [11]) . The decision problem
SMP Un is in the class NP . While this theorem is not explicitly stated in [11], it can be seen thatthe runtime of the verifier that Mayr constructs for the problem
SMP ( A ) ,when A has a Maltsev term, has polynomial dependence on the size of A in addition to the size of the input to SMP ( A ) . We stress that Mayr’sverifier requires that the table for a Maltsev term of A is given as part ofthe description of A . Theorem 17.
The decision problem
Minority Id is in the class NP .Proof. To prove this theorem, we provide a polynomial reduction f of Minority Id to SMP Un . By Theorem 16, this will suffice. Let A be an instance of Minority Id , i.e., a finite idempotent algebra that has at least one operation.We first check, using the polynomial-time algorithm from Corollary 7, tosee if A has a Maltsev term. If it does not, then A will not have a mi-nority term, and in this case we set f ( A ) to be some fixed ‘no’ instance of SMP Un . Otherwise, we augment the list of basic operations of A by addingthe Maltsev operation on A that the algorithm produced. Denote the result-ing (idempotent) algebra by A ′ and note that A ′ can be constructed from A by a polynomial-time algorithm. Also, note that A ′ is term equivalent to A and so the subpower membership problem is the same for both algebras.If we set f ( A ) to be the instance of SMP Un that consists of the list of tablesof basic operations of A ′ along with min( A ) then we have, by Proposition 14,that f ( A ) is a ‘yes’ instance of SMP Un if and only if A has a minorityterm. Since the construction of f ( A ) can be carried out by a procedurewhose runtime can be bounded by a polynomial in k A k , we have produceda polynomial reduction of Minority Id to SMP Un , as required. (cid:3) Conclusion
While Theorem 17 establishes that testing for a minority term for finiteidempotent algebras is not as hard as it could be, the true complexity ofthis decision problem is still open. Our proof of this theorem closely tiesthe complexity of
Minority Id to the complexity of the subpower membershipproblem for finite Maltsev algebras and specifically to the problem SMP Un .Thus any progress on determining the complexity of SMP ( A ) for finite Malt-sev algebras may have a bearing on the complexity of Minority Id . There has certainly been progress on the algorithmic side of SMP ; a major recent pa-per has shown in particular that
SMP ( A ) is tractable for A with cube termoperations (of which a Maltsev term operation is a special case) as long as A generates a residually small variety [2] (the statement from the paper isactually stronger than this, allowing multiple algebras in place of A ).In Section 3 we introduced the notion of a minority-majority term andshowed that if testing for such a term for finite idempotent algebras couldbe done by a polynomial-time algorithm, then Minority Id would lie in thecomplexity class P . This is why we conclude our paper with a question aboutdeciding minority-majority terms. Open problem.
What is the complexity of deciding if a finite idempotentalgebra has a minority-majority term?
References [1] Clifford Bergman.
Universal algebra: Fundamentals and selected topics , volume 301of
Pure and Applied Mathematics (Boca Raton) . CRC Press, Boca Raton, FL, 2012.[2] Andrei Bulatov, Peter Mayr, and Ágnes Szendrei. The subpower membership problemfor finite algebras with cube terms.
CoRR , abs/1803.08019, 2018.[3] Stanley Burris and H. P. Sankappanavar.
A course in universal algebra , volume 78 of
Graduate Texts in Mathematics . Springer-Verlag, New York-Berlin, 1981.[4] Victor Dalmau. Generalized Majority-Minority Operations are Tractable.
LogicalMethods in Computer Science , Volume 2, Issue 4, September 2006.[5] Ralph Freese and Matthew A. Valeriote. On the complexity of some Maltsev condi-tions.
Internat. J. Algebra Comput. , 19(1):41–77, 2009.[6] O. C. García and W. Taylor. The lattice of interpretability types of varieties.
Mem.Amer. Math. Soc. , 50(305):v+125, 1984.[7] Jonah Horowitz. Computational complexity of various Mal’cev conditions.
Internat.J. Algebra Comput. , 23(6):1521–1531, 2013.[8] Alexandr Kazda and Matthew Valeriote. Deciding some Maltsev conditions in finiteidempotent algebras. Preprint, 2017.[9] Keith A. Kearnes and Emil W. Kiss. The shape of congruence lattices.
Mem. Amer.Math. Soc. , 222(1046):viii+169, 2013.[10] Marcin Kozik. A finite set of functions with an EXPTIME-complete compositionproblem.
Theoretical Computer Science , 407(1-3):330–341, 2008.[11] Peter Mayr. The subpower membership problem for Mal’cev algebras.
InternationalJournal of Algebra and Computation , 22(07):1250075, 2012.[12] Miroslav Olšák. The weakest nontrivial idempotent equations.
Bulletin of the LondonMathematical Society , 49(6):1028–1047, 2017.[13] Matthew Valeriote and Ross Willard. Idempotent n -permutable varieties. Bull. Lond.Math. Soc. , 46(4):870–880, 2014.
ECIDING THE EXISTENCE OF MINORITY TERMS 17
Charles University, Prague, Czech Republic
E-mail address : [email protected] University of Durham, Durham, UK
E-mail address : [email protected] McMaster University, Hamilton, Ontario, Canada
E-mail address : [email protected] Charles University, Prague, Czech Republic and Lomonosov Moscow StateUniversity, Moscow, Russia
E-mail address ::