Deciding some Maltsev conditions in finite idempotent algebras
Alexandr Kazda, Matt Valeriote

TL;DR
This paper studies the computational complexity of determining whether finite idempotent algebras satisfy certain Maltsev conditions, showing that for path-based conditions, this testing can be done efficiently in polynomial time.
Contribution
The paper proves that deciding fixed path-based Maltsev conditions in finite idempotent algebras is polynomial-time solvable.
Findings
Polynomial-time decision algorithms for path-based Maltsev conditions
Applicability to conditions like Maltsev, majority, and Jónsson terms
Enhanced understanding of the complexity landscape for algebraic property testing
Abstract
In this paper we investigate the computational complexity of deciding if a given finite algebraic structure satisfies a fixed (strong) Maltsev condition . Our goal in this paper is to show that -testing can be accomplished in polynomial time when the algebras tested are idempotent and the Maltsev condition can be described using paths. Examples of such path conditions are having a Maltsev term, having a majority operation, and having a chain of J\'onsson (or Gumm) terms of fixed length.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Deciding some Maltsev conditions in finite idempotent algebras
Alexandr Kazda, Matt Valeriote
1 Introduction
In this paper we investigate the computational complexity of deciding if a given finite algebraic structure satisfies a certain type of existential condition on its set of term operations. These conditions, known as Maltsev conditions, have played a central role in the classification, study, and applications of general algebraic structures. Several well studied properties of equationally defined classes of algebras (also known as varieties of algebras), such as congruence permutability, distributivity, and modularity are equivalent to particular Maltsev conditions.
The general set up for the decision problems that we consider in this paper is as follows: for a fixed Maltsev condition , an instance of -testing is a finite algebraic structure (or just algebra for short) . The question to decide is if the variety of algebras generated by satisfies the Maltsev condition . This is a natural computational problem in universal algebra (especially in the case of important Maltsev conditions such as having a majority operation) that finds practical applications in the UACalc [8] software system for studying algebras on a computer. Moreover, some Maltsev conditions are also known to correspond to complexity classes of the Constraint Satisfaction Problem (see the recent survey [2] for an overview) and deciding these Maltsev conditions for algebras of polymorphisms of relational structures is an important meta-problem (which, however, is beyond the scope of this paper).
It turns out that deciding many common Maltsev conditions for finite algebras is often EXPTIME-complete [9, 14] and so some of the recent work in this area has focussed on the restriction of these decision problems to finite idempotent algebras. Idempotent algebras display rich behavior, while also offering relative comfort when it comes to composing operations. As two examples of the importance of idempotency, we note that classical Maltsev conditions that characterize properties of congruence lattices in varieties are idempotent [13], and the algebraic approach to the complexity of the Constraint Satisfaction Problem studies finite idempotent algebras (although the theory gradually moves towards general algebras, see [3]).
Our goal in this paper is to show that -testing can be accomplished in polynomial time when the algebras tested are idempotent and the (strong) Maltsev condition can be described using paths. While not all Maltsev conditions are of this form, path Maltsev conditions include many important conditions such as the Maltsev term, ternary majority, Jónsson terms or Gumm terms. While the efficient decidability of having the Maltsev or majority term was known before [9] as was the efficient decidability of a chain of Hagemann-Mitschke terms [21], our framework of path Maltsev conditions unifies these earlier results and shows that it is similarly tractable to decide if an algebra has a fixed length chain of (classical or directed) Jónsson or Gumm terms. See Corollary 8 for a summary of the Maltsev conditions we can work with.
While our framework is quite general, it does not cover all previously known positive results. For example, in [14] it is shown that testing for the presence of a -edge term, for some fixed , can be done in polynomial time for finite idempotent algebras. In [9] it is shown that testing if a finite idempotent algebra generates a congruence distributive or congruence modular variety can also be carried out by a polynomial time algorithm. In contrast, the same paper also proves that testing for either of these conditions in general algebras is an EXPTIME-complete problem.
2 Preliminaries
An algebra is a structure consisting of a non-empty set , called the universe or domain of , and a list of finitary operations on , , for , for some index set , called the basic operations of . The type of is the -indexed sequence , where the arity of is . A subset of is a subuniverse of if it is closed under the basic operations of . For any subset of there is a smallest subuniverse of , with respect to inclusion, that contains . This subuniverse is called the subuniverse of generated by and is denoted by .
A variety of algebras of type is a class of algebras of type that is closed under taking homomorphisms, subalgebras, and direct products. The variety generated by , denoted by , is the smallest variety of algebras having the same type as that contains . For background material on algebras and varieties, the reader may consult one of [5, 4, 20].
As noted in the Introduction, we will primarily be concerned with algebras that are finite (their domains are finite and their lists of basic operations are finite) and idempotent. An operation on a set is idempotent if the equation
[TABLE]
holds. An algebra is idempotent if each of its basic operations is idempotent.
We will often be working with tuples. The usual notation for an -tuple of elements of will be . To concatenate two tuples (or, more often, an -tuple and a single element of ) we will use the notation (resp. if is an element of ). We will use the notation for a tuple of tuples, i.e.. where each is a tuple.
An -ary relation over a set is nothing more than a subset of . We will usually write elements of relations in columns, as this allows us to apply operations of to -tuples of elements of : Given and a -ary operation , the -tuple is the result of applying to the rows of the matrix with columns . A relation is invariant under if whenever , is a -ary operation of and we have . A relation is subdirect in the product if the -th projection of is equal to for each .
A good part of our exposition concerns directed graphs, or digraphs. A digraph on the set of vertices is a relational structure with one binary relation . We allow loops in our digraphs and, because our digraphs’ edges will have labels on them, we allow multiple edges between a given pair of vertices.
Graphically, to denote that for vertices and , we draw an arrow (oriented edge) from to . We say that there is an oriented walk from to if there is a sequence of vertices such that for all there is an edge from to or from to . A walk is directed if for all the edge is always from to . An oriented walk where the vertices are pairwise distinct is an oriented path. If is an oriented path with vertices , then a prefix of is any oriented path and a suffix of is any oriented path where . A cycle of length is a sequence of vertices such that and for each we have an edge from to .
For the purposes of this paper, a strong Maltsev condition is a condition of the form: there are some operations that satisfy some set of equations involving the . For example
[TABLE]
is a strong Maltsev condition involving a binary operation and a unary operation . An algebra satisfies a strong Maltsev condition if for each operation that appears in there is a term operation of having the same arity as such that the collection of operations on satisfies the equations of .
Any Abelian group satisfies the above strong Maltsev condition, since the term operations and satisfy (1). In contrast, it can be checked that no non-trivial semilattice can satisfy this condition.
A strong Maltsev condition is linear if none of its equations involve the composition of operations. It is said to be idempotent if its equations imply that each of the operations involved in it are idempotent. An example of a strong linear idempotent Maltsev condition is that of having a Maltsev term, i.e., a ternary term that satisfies the equations and . A more thorough discussion of Maltsev conditions can be found in [10].
3 Path Maltsev conditions
In this section, we will show how to express several classical Maltsev conditions using paths and how to efficiently decide them in finite idempotent algebras by checking that they hold locally. The proof that one can go from operations that locally satisfy a given path Maltsev condition in a finite idempotent algebra to operations that satisfy it globally will be presented in the next section.
3.1 Pattern digraphs
Inspired by the work of Libor Barto and Marcin Kozik [1], we will represent some special Maltsev conditions as paths. To do this in a systematic way, we will need to introduce digraphs whose edges carry additional information.
Definition 1**.**
A pattern digraph is a directed graph with two kinds of edges: Solid and dashed. Additionally, each pattern digraph has two special distinguished vertices: The initial vertex and the terminal vertex (see Figure 1). We allow multiple edges between pairs of vertices of pattern digraphs.
If is a pattern digraph, then is a subgraph of if the set of vertices, dashed and solid edges of is the subset of the set of vertices, dashed and solid edges, respectively of . Additionally, any subgraph of must have the same initial and terminal vertices as .
A pattern path from to is a pattern digraph with initial vertex and terminal vertex such that viewed as a digraph is an oriented path with endpoints and . The length of a pattern path is the number of its edges.
If and are pattern digraphs, then a pattern digraph homomorphism (often shortened to just “homomorphism” in the rest of this paper) from to is a mapping which is a digraph homomorphism that sends all solid edges of to solid edges of . (Note that dashed edges of may be mapped to dashed or solid edges of .) We do not require that a pattern digraph homomorphism maps the initial and terminal vertices of its domain to their counterparts in its co-domain. If is a pattern digraph with initial vertex and terminal vertex , and is a pattern digraph, then we say that there is a -shaped walk from to in if there is a pattern digraph homomorphism such that and .
We define isomorphisms in the standard way: If and are two pattern digraphs, we say that and are isomorphic if and only if there is a bijection such that both and are pattern digraph homomorphisms that send initial vertices to initial vertices and terminal vertices to terminal vertices.
If and are pattern digraphs with initial vertices and and terminal vertices and respectively, then their product is the pattern digraph with the vertex set (of which is the initial and the terminal vertex). has an edge from to if and only if and . The edge is solid if and only if both edges and are solid; otherwise it is dashed (see Figure 2).
Let be an algebra and let be the 2-generated free algebra in with generators . The elements of can be represented as binary term operations of the algebra in the variables and , and from this perspective can be regarded as members of , i.e., as -tuples over . Under this representation the generators and correspond to the two binary projection functions and , respectively, and the universe of is the subuniverse of generated by and .
Consider the following subalgebra of :
[TABLE]
Most of the time, we shall view as a pattern digraph on the set by treating each as an edge from to . If , we declare the edge to be solid, otherwise it will be dashed. The initial and terminal vertices of the pattern digraph are and , respectively.
If we look at the generators of only and view them as a pattern digraph with initial vertex and terminal vertex , we will get a digraph that has two vertices, two solid loops and one dashed edge (see Figure 3). We will call this digraph .
While most of the time we only have to distinguish solid and dashed edges, sometimes this approach is too coarse. For example, when we view as a pattern digraph, we are losing information about the first coordinates of members of . This is why we will sometimes be talking about labelled digraphs instead of pattern digraphs. A labelled digraph is a directed graph together with a function that assigns a label from the set to each edge of . We will again allow multiple edges between two vertices.
3.2 From paths to Maltsev conditions
Let be a pattern path from [math] to with vertex set , and let be an algebra. When does there exist a -shaped walk from to in the pattern digraph ? We will show that such a path exists if and only if satisfies a specific strong linear Maltsev condition .
Given , we will construct as follows: For each , take a binary operation symbol , and for each , take a ternary operation symbol . Start with the equations and . The equations of that connect the operation symbols and depend on the nature of the edge between and in : If the edge has the form (what we call a forward edge), add to the pair of equations
[TABLE]
while if the -th edge of is a backward edge , we add to the pair
[TABLE]
Moreover, whenever the -th edge of is solid, we add to the equation .
Looking at , we see that it is a strong, linear Maltsev condition. Observe also that all the terms and have to be idempotent, since if we set , the chain gives us that all of the and are equal to each other and to .
Observation 2**.**
Let be an algebra and be a pattern path. Then the idempotent, strong, linear Maltsev condition is satisfied by if and only if there is a -shaped walk from to in .
Proof.
Suppose that satisfies , as witnessed by the terms , for and for . We claim that then is a -shaped walk from to in . Obviously, and . To see that the edge between and is of the right type, one needs to consider four cases, of which we will only do one in detail: Assume that is a solid forward edge of . Then
[TABLE]
lies in . Using the equations of involving , , and , we immediately see that is a solid edge of and we are done.
Conversely, suppose that is a -shaped walk from to in . We will show how to get the terms from forward edges of ; the construction for backward edges is similar. If is an edge of then is an edge of and so there is some ternary term of such that and . The way to satisfy is then to let to be , to be , and to be . Since and , the equations and are satisfied. Finally, if is a solid edge, then must be solid as well, and thus we can demand that , satisfying the corresponding condition in . ∎
3.3 Example gallery
To illustrate the connection between a pattern path and the associated Maltsev condition , we present some well known Maltsev conditions as for some pattern paths . Compare the paths in the pictures with the set of generators of as shown in Figure 3. To save space, we will replace by and by in the equations.
3.3.1 The trivial case
If contains any dashed forward edges (see Figure 4) then the condition will be trivially satisfied by all algebras; one needs only to set for , , and for .
3.3.2 Maltsev term
By the classic result due to Maltsev [19], a variety is congruence permutable if and only if it has a ternary term that satisfies the equations
[TABLE]
This strong Maltsev condition is equivalent to for the path pictured in Figure 5 that consists of a single dashed backward edge .
3.3.3 Majority
The path that gives rise to a majority term consists of a single solid forward edge (see Figure 6). The equations that define are:
[TABLE]
3.3.4 Chain of Jónsson terms
A fence is a sequence of vertices such that for even and for odd. Classic Jónsson terms for congruence distributivity [15] arise from a fence of solid edges, for some , from to that starts with a forward edge. The final edge’s direction depends on the parity of ; in the picture (Figure 7), is taken to be odd.
The corresponding condition is:
[TABLE]
Note that having a single Jónsson term is the same thing as having a majority term.
3.3.5 Chain of Gumm terms
A variety will be congruence modular if and only if it has a finite sequence of Gumm terms [11]. These terms are similar to Jónsson terms, except that the last edge (-st in our counting) is a backward dashed edge. We note that our formalism does not capture Day terms [7], another chain of terms that captures congruence modularity, because Day terms have arity four.
Gumm terms are given by the condition , for the path pictured in Figure 8. We denote this condition by CM().
[TABLE]
3.3.6 Chain of directed Jónsson terms
Directed Jónsson terms are a variation of those presented in Subsection 3.3.4 and also can be used to characterize congruence distributivity for varieties. See [16] for more details about these terms. The condition that arises from the path pictured in Figure 9 provides a sequence of directed Jónsson terms:
[TABLE]
3.3.7 Chain of directed Gumm terms of length
In a similar manner, one can consider the directed version of Gumm terms (see [16]). The corresponding path is pictured in Figure 10 and the Maltsev condition is given by:
[TABLE]
3.3.8 Chain of Hagemann-Mitschke terms
Hagemann-Mitschke terms can be used to characterize varieties that are congruence -permutable, for a given natural number [12]. The strong Maltsev condition corresponding to this property is given by for the path pictured in Figure 11:
[TABLE]
3.4 The property
For a given finite algebra , we would like to decide if there is a -shaped walk from to in and hence if satisfies the Maltsev condition . It turns out that for each fixed there is a polynomial time algorithm that decides this question as long as is idempotent. In the rest of this paper, we will assume that is a pattern path from 0 to with vertex set and that has no dashed forward edges (for else would be trivial).
As noted earlier, we regard the free algebra as a subuniverse of . Therefore, the labelled graph is a subuniverse of the -th power of and most likely too large to be searched directly. Our goal in the following is to approximate -shaped walks in using lower powers of .
One issue with our approach is that we need to approximate the images of different members of by different subpowers of . To facilitate this, we will use products.
Consider the pattern digraph . The vertex set of this pattern digraph consists of sets of the form , each of which will be easy to approximate using subpowers of . Moreover, it is elementary to show that there is a -shaped walk from to in if and only if there exists a -shaped walk from to in (and that each such walk necessarily sends the -th vertex of to a pair in ).
As an example, consider Figure 2. The product in this picture is in fact for the pattern path that corresponds to a chain of directed Gumm terms and the pattern digraph that records the generators of . To obtain , one has to close the set of edges between and under the operations of . This gives us a hint on how to approximate by smaller digraphs and we formalize this idea in the notion of testing pattern digraphs:
Definition 3**.**
Let be an algebra and a pattern path of length . Let be a tuple of natural numbers, let
[TABLE]
be tuples of tuples of members of such that are -ary and are -ary for all applicable values of .
The testing -ary pattern digraph for and generated by , denoted by , has vertex set consisting of a disjoint union of sets (which, after Barto and Kozik [1], we will call potatoes) , where . The vertices and are the initial and terminal vertices, respectively, of .
To obtain the edge set of , first generate, for , the labeled edge sets as follows:
- •
If the -th edge of is a forward edge, then
[TABLE]
- •
If the -th edge of is a backward edge, then swap and (as well as the corresponding generators) in the above definition, i.e.
[TABLE]
To obtain the edges of , we translate all members of into either solid or dashed edges: Given , we place into an edge from to . If and the -th edge of is solid, the new edge of is solid, otherwise the new edge is dashed. (As a consequence, the values of only matter when the -th edge of is solid. When the -th edge is dashed, we will nonetheless keep these dummy parameters to make the notation simpler.)
See Figure 12 for an example of a testing pattern digraph (and its generating set) in the case when encodes a chain of Gumm terms.
Note that in the generators of all ’s form a pattern digraph isomorphic to (where is the pattern digraph in Figure 3). This will be important later in Lemma 13.
Observation 4**.**
Let be an idempotent algebra, be tuples of positive integers and be an -ary testing pattern digraph. Then:
- (a)
the set of edges between and forms a subdirect relation, 2. (b)
if the -th edge of is solid then the set of solid edges between and is also a subdirect relation, 3. (c)
if the -th edge of is a forward edge then contains an edge from any to , and 4. (d)
if the -th edge of is a backward edge then contains an edge from any to .
Proof.
To see the first two claims, observe that the projection of each to contains the tuples and (the situation for is similar).
To prove the third claim, observe that the projection of to contains the tuples and . Since is idempotent and , the projection of to contains . The proof of the last claim is similar. ∎
A notable example of a testing pattern digraph is itself. Continuing with our representation of as a subuniverse of , with the free generators and equal to the binary projection maps and respectively, we have that is isomorphic to the -ary testing pattern digraph , where , , , and . Here, and in the following, denotes a constant tuple or sequence of an appropriate length with value at each entry. To see this claim, note that all of the potatoes , will be equal to and each is either or with its second and third coordinates swapped.
Definition 5**.**
We say that an algebra satisfies the condition if whenever is an -ary testing pattern digraph for and , there is a -shaped walk from the initial to the terminal vertex in .
For example, the in Figure 12 fails to have a -shaped walk from to .
The next observation connects the property with the Maltsev condition .
Observation 6**.**
Let be a pattern path of length . Then the following are equivalent:
Algebra satisfies 2. 2.
There is a -shaped walk from to in 3. 3.
There is a -shaped walk from to in 4. 4.
Algebra satisfies for all choices of tuples and . 5. 5.
Algebra satisfies .
Proof.
The proof is easy once we unpack the definitions. We already know that the first three items are equivalent. Trivially, .
We show that as follows: Take a testing pattern digraph . Since satisfies , there are binary and ternary terms and that satisfy the equations in . Comparing the equations in with the generators of , it is straightforward to verify that the sequence defined by is a -shaped walk from to .
To see that , recall that can be regarded as an -ary testing pattern digraph. The property then immediately gives us a -shaped walk from to in . ∎
It turns out that if is idempotent, then the minimum arity of instances that we need to check to determine if satisfies is merely rather than .
Theorem 7**.**
For a finite idempotent algebra and pattern path there is a -shaped walk from to in the pattern digraph if and only if satisfies .
The proof of this theorem will be the goal of the next section. Before we start proving it, though, let us remark on its significance. The condition asserts that we can always satisfy the Maltsev condition locally, and this local satisfiability is something that one can verify in time polynomial in , where is a measure of the size of the algebra . To make this definite, we use the measure from [9]:
[TABLE]
where is the largest arity of the basic operations of and is the number of basic operations of of arity , for . In our analysis below, we will assume that has at least one at least unary operation (nontrivial idempotent algebras can’t have constant operations) and hence .
Let us now fix a pattern path of length with solid edges (and dashed edges). To test if an algebra satisfies , we need to examine all -ary testing pattern digraphs and check them for -shaped walks from the initial to the terminal vertex.
Definition 3 gives us an algorithmic procedure to generate these digraphs: For each possible combination of values , generate the sets and translate them into edges of . Moreover, for the dashed edges of , the choice of labels has no effect on and we only need to calculate the second and third coordinates of . Omitting these dummy labels, there are many tuples to consider.
Using Proposition 6.1 of [9] it follows that, given , the graph can be constructed in time
[TABLE]
Since is fixed, if the asymptotic simplifies to and if the asymptotic is .
Any given testing pattern digraph has vertices and edges (for a given pair of vertices, we need to only remember the “best” edge, where solid is better than dashed is better than none), testing for a -shaped walk from to can be done by standard methods in time which is negligible compared to the time needed to generate . All in all, deciding if holds can be carried out by an algorithm whose run-time is for and for .
Corollary 8**.**
Let be a fixed pattern path. The associated idempotent, strong, linear Maltsev condition can be decided for a finite idempotent algebra by an algorithm whose run-time can be bounded by a polynomial in .
Using Theorem 7 and referring to the list of examples from the example gallery, we immediately obtain polynomial-time algorithms for deciding some well known strong Maltsev conditions for finite idempotent algebras.
Corollary 9**.**
Let . Each of the following strong Maltsev conditions can be decided for a finite idempotent algebra by a polynomial-time algorithm with the prescribed run-time.
Having a sequence of Jónsson terms, directed or not, can be decided in time . 2. 2.
Having a sequence of Gumm terms, directed or not, can be decided in time . 3. 3.
[21]** Having a sequence of Hagemann-Mitschke terms can be decided in time . 4. 4.
[9]** Having a Maltsev term can be decided in time . 5. 5.
[9]** Having a majority term can be decided in time .
4 From local to global
Let be a finite idempotent algebra that satisfies the condition
[TABLE]
Our goal is to increase all of the parameters of , eventually establishing that holds for and thereby proving, using Observation 6, that satisfies .
First observe that by adding dummy coordinates, we can always decrease the parameters of :
Observation 10**.**
If satisfies , , for , and , for , then also satisfies .
Definition 11**.**
Let be an algebra, a pattern path and be tuples of positive integers. The -ary testing pattern digraph is minimal if no proper subgraph of is isomorphic to another -ary testing pattern digraph for and .
It follows that every testing pattern digraph contains a subgraph isomorphic to a minimal testing pattern digraph. Since isomorphism respects initial and terminal vertices and removing edges or vertices can’t create new -shaped walks, it is enough to look at minimal testing pattern digraphs.
Observation 12**.**
Let be an algebra and be tuples of values. If every minimal -ary testing pattern digraph has a -shaped walk from the initial to the terminal vertex, then satisfies .
The following two lemmas allow us to comfortably handle minimal testing pattern digraphs.
Lemma 13**.**
If is a minimal testing pattern digraph and is a -shaped walk from to in then is equal to the pattern digraph where we retain the labels , let , and choose so that (if the -th edge of is a forward edge) or (if the -th edge of is a backward edge).
Proof.
Let be the -th labelled edge set of . By the choice of generators, we immediately have and hence is a subgraph of . By construction, the testing pattern digraph has the same initial and terminal vertices as and so by the minimality of we conclude that these two testing patterns are equal. ∎
The following Lemma will help us to prove Lemmas 16, 17, and 18 by induction on the arity of testing pattern digraphs. The hypothesis of the Lemma is a bit long, but it describes something quite natural: Given a testing pattern digraph , we can expand the tuples generating to get a more complicated testing pattern digraph . It now turns out that we can lift any -shaped path in to an “almost path” in .
Lemma 14** (Partial lifting).**
Let be an algebra and be a pattern path of length . Let be an -ary testing pattern digraph. Let be such that for each and for each . Let be any -ary testing pattern digraph so that for each applicable the tuple is a prefix of , is a prefix of , is a prefix of , and is a prefix of .
Let be a -shaped path from to in . Denote by the labels of the edges of . Then there exist tuples , and so that
for each , the tuple is a prefix of both and , 2. 2.
for each , the tuple is a prefix of , 3. 3.
* and ,* 4. 4.
if the -th edge of is a forward edge, then (where is the -th edge relation of ); if the -the edge of is a backward edge then , 5. 5.
if is such that the last coordinates of and agree, then , 6. 6.
if is such that the last coordinates of and agree and the -th edge is solid then .
Proof.
Let us examine the -th edge of . Without loss of generality assume that the -th edge is a forward edge (the case of backward edges is similar). In order for to be a -shaped path in , we have (where is the -th edge relation of ). Since is a subpower of generated by the three tuples
[TABLE]
there exists a ternary term operation of such that
[TABLE]
We obtain , , and by extending the input tuples (i.e. removing the zero superscripts):
[TABLE]
This procedure works for , so it remains to define and (see Figure 13).
The conclusions of the lemma all follow from the way that the relations and are generated. The first two points are consequences of acting coordinatewise. The third claim follows from the way we defined and . Since is invariant under , we have , proving the fourth point (the situation for backward edges is similar). Finally, the operation is idempotent, so if, say, the last coordinates of and are both equal to some tuple , then ; the case of edge labels is similar. ∎
Observe that Lemma 14 also holds if we replace prefixes by suffixes everywhere; we will sometimes use it in this way.
We will only need Lemma 14 in the case when differ from in at most one position (either or ). Then and for almost all . Therefore, the last two claims of Lemma 14 give us that fails to be a -shaped path only because either , or (if the -th edge is solid).
Lemma 15**.**
Let be an -ary testing pattern digraph for and for some tuples and . Let be a prefix of and a suffix of (possibly overlapping with ). Then:
- (a)
Every -shaped walk from to some can be extended to a -shaped walk from to . (Extending means that the image of is for all .) 2. (b)
Every -shaped walk from some to can be extended to a -shaped walk from to . (Extending means that the image of is for all .) 3. (c)
If is minimal, then for every -shaped walk and -shaped walk as in the previous two parts there exists a -shaped walk from to in that extends both and at the same time (see Figure 14).
Proof.
We begin with part (a). By Observation 4, we have that the set of (solid) edges between and is subdirect for each . This allows the map to be extended to a -shaped walk from to some . We claim that defined by and for all is a -shaped walk from to .
To prove this, let and consider the edge in between and . We will examine in detail one of the three possibilities for this edge (recall that we disallow forward dashed edges) and leave the other two cases for the reader. Suppose that there is a solid edge from to in . We need to prove that , , and are all edges in and that the first two are solid. The first two can be seen to be solid, since is a pattern digraph homomorphism and , while the existence of the edge follows from part (c) of Observation 4.
The proof of part (b) is similar. Note that our construction for this part is such that the image of each in the resulting -shaped walk is exactly . We will use this in the next paragraph.
We prove part (c) by applying parts (a) and (b) in turn: First get a -shaped walk from to that extends . Using Lemma 13, we get that , where for . Now apply part (b) that we have just proved to and to obtain a -shaped walk from to that sends each to and hence extends and at the same time. ∎
Lemma 16**.**
Suppose that satisfies for some tuples and and let . Then also satisfies , where is obtained from by increasing by 1.
Proof.
Suppose that is an -ary testing pattern digraph for and (all the other testing pattern digraphs we will consider in this proof are also for and ). We need to construct a -shaped walk from to . By Observation 12 we may assume that is minimal.
Let be the prefix of of length and let be the suffix of of length . The vertex sets for and are and respectively. By forgetting the -th coordinate of we obtain new label sets and . Consider the -ary testing pattern digraph .
Applying to we obtain a -shaped path from the initial to the terminal vertex of . Now apply Lemma 14 to and . Since and only differ in the -th potato, we see that in there exists a -shaped walk from to some and an -shaped walk from a suitable to , where and differ only in the last coordinate (see Figure 15).
Now, using Lemma 15 on and paths , , and , we obtain that we can extend both and to a -shaped walk from to . We now apply Lemma 13 to and to show that is equal to the testing pattern digraph . Examining Lemma 13 in detail, we see that and .
If we could show that there is a -shaped path from to in , we would be done. To that end, define to be equal to everywhere except at the -th place, where , and consider the testing pattern digraph of arity and with equal to everywhere except at the -th position, where we let and equal to the last entry of and , respectively. Since , we can apply to . We next apply Lemma 14 to and , where we switch from prefixes to suffixes. Noting that the first entries of and agree, we see that the sequence of vertices produced by Lemma 14 is in fact a -shaped path from to in , concluding the proof. ∎
Lemma 17**.**
Suppose that satisfies for some tuples and and let . If the -th edge of is a solid forward edge then also satisfies , where is obtained from by increasing by .
Proof.
The proof of this lemma is similar to that of Lemma 16. Again, all testing pattern digraphs will be for and . We start with a minimal -ary testing pattern digraph and will prove that there is a -shaped walk from to in . We set to be the prefix of with the vertex set and to be the suffix of with the vertex set . Take the -ary pattern digraph where we get and from and by forgetting the last entry of and , respectively.
As before, and Lemma 14 give us that there exists an “almost -shaped” path from to in . This time, we have a -shaped walk from to some and an -shaped walk from to such that contains an edge of the form , where comes from Lemma 14. Were it , we would have a solid edge from to and we would be done. Alas, it could happen that and differ in the last coordinate.
We again use part (c) of Lemma 15 to obtain a -shaped walk from to in that extends and . Since we have , Lemma 13 gives us that is equal to for suitable , , and , with . By forgetting the first coordinates of the labels of we obtain a -ary testing pattern digraph , where is obtained from by replacing by 1. can be applied to to produce a -shaped walk from the initial to the terminal vertex of . Using Lemma 14 for suffixes instead of prefixes, we can lift this -shaped walk to and are done. ∎
The case when the -th edge is a backward solid edge will start out similarly to Lemma 17, but we will need an additional trick.
Lemma 18**.**
Suppose that satisfies for some tuples and and let . If the -th edge of is a solid backward edge then also satisfies , where is obtained from by increasing by 1.
Proof.
Take , , , and as in the proof of Lemma 17. As before we apply to and lift the result to via Lemma 14. We get a -shaped walk from and an -shaped walk to such that . Part (c) of Lemma 15 again gives us a -shaped walk in that extends and . Applying Lemma 13, we again show that is equal to where and for each . Unfortunately, copying the proof of Lemma 17 fails at this point. The problem is that the edge has the wrong endpoints; we would need to have to finish as we did in Lemma 17. We recover by studying an auxiliary relation.
Let us choose and so that and . Define the new relation as follows:
[TABLE]
Since is idempotent, the relation is a subuniverse of a power of . Moreover, contains the tuples , , and (the last tuple is witnessed by , , ).
Consider now the -ary testing pattern digraph where is with replaced by and is with replaced by . For the most part, this digraph is identical to , only the edges from to have changed (see Figure 18). We have because the three generators of lie in (see previous paragraph).
Using on , we get a -shaped path from to . Since , there exist so that , , and are all solid edges in the original graph . One application of part (c) of Lemma 15 with the prefix of from 0 to and the suffix of from to (i.e. one edge longer than the original and ) with for , , and for , gives us that and can be extended to a -shaped walk from to (see Figure 19) in the original .
It remains to use and Lemma 13 to conclude that is equal to the testing pattern digraph where and for each . Crucially, with in hand we can choose . In other words, it turns out that all edges of the original between and are solid. But then we can easily connect the walks and from the first paragraph of this proof into a -shaped walk in and are done. ∎
Proof of Theorem 7.
Start with the tuples , , and the hypothesis that holds. From the definition of testing pattern digraphs, we know that if the -th edge of is dashed, then the value of does not affect , so we can immediately set any such to and keep the property. Next, repeatedly apply Lemmas 16, 17, and 18 to increase the entries of and until we get that satisfies . From this it follows that satisfies . ∎
5 Conclusion
It would be nice if the techniques introduced in proving Theorem 7 could be extended to handle conditions described by some graph (or structure) other than a path and so we ask whether this is the case. One prime example that has been considered is that of a ternary minority operation, i.e., an operation that satisfies the equations
[TABLE]
While this condition is quite similar to that of having a Maltsev term, it turns out that there is no chance of producing an efficient algorithm to decide if a finite idempotent algebra has such a term operation that is based on some variant of the “local to global” term method. This follows from the construction, by Dmitriy Zhuk, of a sequence of finite idempotent algebras , for , such that for every subset of of size , has a term operation that behaves as a minority operation on the subset, but as a whole does not have a minority term operation [17]. The complexity of determining if a finite idempotent algebra has such a term operation remains open, but recently, the authors, in collaboration with J. Opršal, have shown that this problem is in NP [17].
One can also consider the Maltsev conditions of being congruence meet-semidistributive or congruence join-semidistributive. They are the unions of sequences of strong linear Maltsev conditions ([18]). We ask whether testing for these strong linear Maltsev conditions can be carried out by polynomial time algorithms for finite idempotent algebras. It was noted in the introduction that some Maltsev conditions that are not strong, such as being congruence distributive or congruence modular, can also be tested by polynomial time algorithms, for finite idempotent algebras. We ask whether our techniques can be extended to handle some interesting class of Maltsev conditions that are not strong.
All of the Maltsev conditions studied in this paper are strong, linear, and idempotent (these are called special Maltsev conditions in [13]). As far as we know, for any special Maltsev condition , the problem of deciding if a given finite idempotent algebra satisfies is in P, and we conjecture that this will always be the case. An earlier stronger version of this conjecture held that there would be a polynomial time algorithm based on a “local to global” term result along the lines of our Theorem 7, but the case of the minority term Maltsev condition falsified it.
Finally, one can also consider the related problems for finite relational structures. Namely, given a (strong/linear/idempotent) Maltsev condition one can ask whether a given finite relational structure has polymorphisms that witness the satisfaction of . It is known that for strong linear idempotent Maltsev conditions that imply congruence meet-semidistributivity, this problem can be solved by a polynomial time algorithm. Recently Hubie Chen and Benoit Larose have produced some significant results related to this class of problems [6].
6 Acknowledgments
A. Kazda was supported by European Research Council under the European Unions Seventh Framework Programme (FP7/2007-2013)/ERC grant agreement no. 616160 and the Charles University PRIMUS/SCI/12 and UNCE/SCI/022 grants.
M. Valeriote was supported by a grant from the Natural Sciences and Engineering Research Council of Canada.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] Libor Barto and Marcin Kozik. Constraint satisfaction problems solvable by local consistency methods. J. ACM , 61(1):Art. 3, 19, 2014.
- 2[2] Libor Barto, Andrei Krokhin, and Ross Willard. Polymorphisms, and How to Use Them. In Andrei Krokhin and Stanislav Zivny, editors, The Constraint Satisfaction Problem: Complexity and Approximability , volume 7 of Dagstuhl Follow-Ups , pages 1–44. Schloss Dagstuhl–Leibniz-Zentrum für Informatik, Dagstuhl, Germany, 2017.
- 3[3] Libor Barto, Jakub Opršal, and Michael Pinsker. The wonderland of reflections. Israel Journal of Mathematics , 223(1):363–398, Feb 2018.
- 4[4] Clifford Bergman. Universal algebra , volume 301 of Pure and Applied Mathematics (Boca Raton) . CRC Press, Boca Raton, FL, 2012. Fundamentals and selected topics.
- 5[5] Stanley Burris and H. P. Sankappanavar. A course in universal algebra , volume 78 of Graduate Texts in Mathematics . Springer-Verlag, New York-Berlin, 1981.
- 6[6] Hubie Chen and Benoit Larose. Asking the metaquestions in constraint tractability. ACM Trans. Comput. Theory , 9(3):11:1–11:27, October 2017.
- 7[7] Alan Day. A characterization of modularity for congruence lattices of algebras. Canad. Math. Bull. , 12:167–173, 1969.
- 8[8] Ralph Freese, Emil Kiss, and Matthew Valeriote. Universal Algebra Calculator, 2011. Available at: www.uacalc.org .
