cs-lora-training-data / structured /0705.2229.structured.json
Shivatandav64's picture
Upload folder using huggingface_hub
a3b809c verified
{"paper_meta":{"paper_id":"arxiv:0705.2229","title":"0705.2229","authors":[],"year":null,"published":null,"updated":null,"venue_or_source":"arxiv-papers-shard","primary_category":"cs","secondary_categories":[],"doi":null,"license":"unknown","source_type":"pdf+shard","source_url":null,"pdf_url":null},"abstract":{"raw":"","cleaned":"","offsets":[]},"full_paper_text":{"raw_ordered_text":"Logical Methods in Computer Science\nVol. 3 (2:6) 2007, pp. 1–1–20\nwww.lmcs-online.org\nSubmitted\nOct. 18, 2006\nPublished\nJun.\n8, 2007\nON TRACTABILITY AND CONGRUENCE DISTRIBUTIVITY ∗\nEMIL KISS a AND MATTHEW VALERIOTE b\na Department of Algebra and Number Theory, E ̈otv ̈os University, 1117 Budapest, P ́azm ́any P ́eter\ns ́et ́any 1/c, Hungary\ne-mail address: ewkiss@cs.elte.hu\nb Department of Mathematics and Statistics, McMaster University, Hamilton, Ontario, L8S 4K1,\nCanada\ne-mail address: matt@math.mcmaster.ca\nAbstract. Constraint languages that arise from finite algebras have recently been an\nobject of study, especially in connection with the Dichotomy Conjecture of Feder and\nVardi.\nAn important class of algebras are those that generate congruence distributive\nvarieties and included among this class are lattices, and more generally, those algebras that\nhave near-unanimity term operations. An algebra will generate a congruence distributive\nvariety if and only if it has a sequence of ternary term operations, called J ́onsson terms,\nthat satisfy certain equations.\nWe prove that constraint languages consisting of relations that are invariant under\na short sequence of J ́onsson terms are tractable by showing that such languages have\nbounded relational width.\n1. Introduction\nThe Constraint Satisfaction Problem (CSP) provides a framework for expressing a wide\nclass of combinatorial problems. Given an instance of the CSP, the aim is to determine if\nthere is a way to assign values from a fixed domain to the variables of the instance so\nthat each of its constraints is satisfied. While the entire collection of CSPs forms an NP-\ncomplete class of problems, a number of subclasses have been shown to be tractable (i.e., to\nlie in P). A major focus of research in this area is to determine the subclasses of the CSP\nthat are tractable.\nOne way to define a subclass of the CSP is to restrict the constraint relations that occur\nin an instance to a given finite set of relations over a fixed, finite domain, called a constraint\nlanguage. A central problem is to classify the constraint languages that give rise to tractable\nsubclasses of the CSP. Currently, all constraint languages that have been investigated have\nbeen shown to give rise to a subclass of the CSP that is either NP-complete or in P. It is\n2000 ACM Subject Classification: F.1.3, F.4.1.\nKey words and phrases: constraint satisfaction problem, tractability, universal algebra, congruence\ndistributivity.\n∗An extended abstract of this paper has appeared in the Proceedings of the Twenty-First Annual IEEE\nSymposium on Logic in Computer Science.\nLOGICAL METHODS\nl IN COMPUTER SCIENCE\nDOI:10.2168/LMCS-3 (2:6) 2007\nc\n⃝\nE. Kiss and M. Valeriote\nCC\n⃝\nCreative Commons\n\n2\nE. KISS AND M. VALERIOTE\nconjectured in [10] that this dichotomy holds for all subclasses arising from finite constraint\nlanguages.\nIn some special cases, the conjectured dichotomy has been verified. For example, the\nwork of Schaefer [18] and of Bulatov [6] establish this over domains of sizes 2 and 3 respec-\ntively. For constraint languages over larger domains a number of significant results have\nbeen obtained [5, 1, 9].\nOne method for establishing that the subclass of the CSP associated with a finite\nconstraint language is tractable is to establish a type of local consistency property for\nthe instances in the subclass.\nIn [11] Feder and Vardi introduce a notion of the width\nof a constraint language and show that languages of bounded width give rise to tractable\nsubclasses of the CSP. There is a natural connection between these subclasses of the CSP\nand definability within Datalog.\nIn work by Jeavons and his co-authors an approach to classifying the tractable con-\nstraint languages via algebraic methods has been proposed and applied with great success\n[5]. In essence, their work allows one to associate a finite algebraic structure to each con-\nstraint language and then to analyze the complexity of the corresponding subclass of the\nCSP in purely algebraic terms.\nIn this paper, we employ the algebraic approach to analyzing constraint languages\nand with it are able to identify a new, general class of tractable constraint languages.\nThese languages arise from finite algebras that generate congruence distributive varieties,\nor equivalently, that have a sequence of special term operations, called J ́onsson terms, that\nsatisfy certain equations. Theorem 4.1 establishes the tractability of these languages by\nshowing that they are of bounded width. Related to our result is the theorem of Jeavons,\nCohen, and Cooper in [14] that establishes the tractability of constraint languages that arise\nfrom another class of finite algebras that generate congruence distributive varieties. These\nalgebras are equipped with a special term operation called a near unanimity operation.\nDalmau [9] provides an alternate proof of their result.\n2. Preliminaries\nIn this section we introduce the necessary terminology and results on the CSP and from\nuniversal algebra that will be needed to prove the main result (Theorem 4.1) of this paper.\nIn the following discussion we will employ standard terminology and notation when\ndealing with n-tuples and relations over sets. In particular, if ⃗a is a tuple over the sequence\nof domains Ai, 1 ≤i ≤n, (i.e., is a member of Q\n1≤i≤n Ai) and I is a subset of {1, 2, . . . , n}\nthen projI(⃗a) denotes the tuple (ai : i ∈I) ∈Q\ni∈I Ai over the sequence of domains\n(Ai : i ∈I) and is called the restriction (or the projection) of ⃗a to I. We extend this\nprojection function to arbitrary relations over the Ai. The ith element of the tuple ⃗a will\nbe denoted by ⃗a(i).\nFor R and S binary relations on a set A, we define the relational product of R and S,\ndenoted R ◦S, to be the binary relation consisting of all pairs (a, b) for which there is some\nc with (a, c) ∈R and (c, b) ∈S.\n2.1. The Constraint Satisfaction Problem.\nDefinition 2.1. An instance of the constraint satisfaction problem is a triple P = (V, A, C)\nwith\n\nON TRACTABILITY AND CONGRUENCE DISTRIBUTIVITY ∗\n3\n• V a non-empty, finite set of variables,\n• A a non-empty, finite set (or domain),\n• C a set of constraints {C1, . . . , Cq} where each Ci is a pair (⃗si, Ri) with\n– ⃗si a tuple of variables of length mi, called the scope of Ci, and\n– Ri an mi-ary relation over A, called the constraint relation of Ci.\nGiven an instance P of the CSP we wish to answer the following question:\nIs there a solution to P, i.e., is there a function f : V →A such that for\neach i ≤q, the mi-tuple f(⃗si) ∈Ri?\nWe say that two instances of the CSP having the same set of variables and the same\ndomain are equivalent if they have the same set of solutions.\nIn general, the class of CSPs is NP-complete (see [14]), but by restricting the nature of\nthe constraint relations that are allowed to appear in an instance of the CSP, it is possible\nto find natural subclasses of the CSP that are tractable.\nDefinition 2.2. Let A be a domain and Γ a set of finitary relations over A. CSP(Γ) denotes\nthe collection of all instances of the CSP with domain A and with constraint relations coming\nfrom Γ. Γ is called the constraint language of the class CSP(Γ).\nDefinition 2.3. Call a finite constraint language Γ tractable if the class of problems CSP(Γ)\nis tractable (i.e., lies in P). If Γ is infinite and each finite subset Γ′ of Γ is tractable then\nwe say that Γ is tractable. If the entire class CSP(Γ) is in P then we say that Γ is globally\ntractable.\nΓ is said to be NP-complete if for some finite subset Γ′ of Γ, the class of problems\nCSP(Γ′) is NP-complete.\nA key problem in this area is to classify the (globally) tractable constraint languages.\nNote that in this paper we will assume that P ̸= NP. Feder and Vardi [11] conjecture that\nevery finite constraint language is either tractable or is NP-complete.\nWe will find it convenient to extend the above notions of instances of the CSP and\nconstraint languages to a multi-sorted setting. This approach has been used on a number\nof occasions, in particular in [3].\nDefinition 2.4. A multi-sorted instance of the constraint satisfaction problem is a pair\nP = (A, C) where\n• A = (A1, A2, . . . , An) is a sequence of finite, non-empty sets, called the domains of\nP, and\n• C is a set of constraints {C1, . . . , Cq} where each Ci is a pair (Si, Ri) with\n– Si a non-empty subset of {1, 2, . . . , n} called the scope of Ci, and\n– Ri an |Si|-ary relation over (Aj : j ∈Si), called the constraint relation of Ci.\nIn this case, a solution to P is an n-tuple ⃗a over the sequence (Ai : 1 ≤i ≤n) such\nthat projSj(⃗a) ∈Rj for each 1 ≤j ≤q. Clearly, each standard instance of the CSP can\nbe expressed as an equivalent multi-sorted instance. While the given definition of a multi-\nsorted instance of the CSP does not allow for the repetition of variables within the scope\nof any constraint, there is a natural extension of Definition 2.1 that allows this. Note that\nthere is a very straightforward procedure to transform such an instance to an equivalent\none that conforms to Definition 2.4.\n\n4\nE. KISS AND M. VALERIOTE\nDefinition 2.5. A relation R over the sets Ai, 1 ≤i ≤n, is subdirect if for all 1 ≤i ≤n,\nproj{i}(R) = Ai. We call a multi-sorted instance P of the CSP subdirect if each of its\nconstraint relations is.\nIn addition to the set of solutions of an instance of the CSP, one can also consider\npartial solutions of the instance.\nDefinition 2.6. For P as in Definition 2.4 and I a subset of {1, 2, . . . , n}, the set of partial\nsolutions of P over I, denoted PI, is the set of solutions of the instance P ′ = (A′, C′) where\nA′ = (Ai : i ∈I) and C = {C′\n1, . . . , C′\nq} with C′\nj = (I ∩Sj, proj(I∩Sj)(Rj)) for 1 ≤j ≤q.\nClearly if the set of partial solutions of an instance over some subset of coordinates is\nempty then the instance has no solutions.\nDefinition 2.7. Let C be a finite set (or sequence) of finite, non-empty sets. A (multi-\nsorted) constraint language over C is a collection of finitary relations over the sets in C.\nGiven a multi-sorted constraint language Γ over C, the class CSP(Γ) consists of all multi-\nsorted instances of the CSP whose domains come from C and whose constraint relations\ncome from Γ. ΓC denotes the set of all finitary relations over the members of C.\nIn a natural way, the notions of tractability and NP-completeness can be extended to\nmulti-sorted constraint languages.\n2.2. Algebras. There are a number of standard sources for the basics of universal algebra,\nfor example [7] and [17]. The books [12, 8] provide details on the more specialized aspects\nof the subject that we will use in this paper.\nDefinition 2.8. An algebra A is a pair (A, F) where A is a non-empty set and F is a\n(possibly infinite) collection of finitary operations on A. The operations in F are called the\nbasic operations of A. A term operation of an algebra A is a finitary operation on A that\ncan be obtained by repeated compositions of the basic operations of A.\nWe assume some familiarity with the standard algebraic operations of taking subalge-\nbras, homomorphic images and cartesian products. Note that in order to sensibly take a\nhomomorphic image of an algebra, or the cartesian product of a set of algebras or to speak\nof terms and equations of an algebra we need to have some indexing of the basic operations\nof the algebras. Algebras that have the same indexing are said to be similar (or of the same\nsimilarity type).\nWhen necessary, we distinguish between an algebra and its underlying set, or universe.\nA subuniverse of an algebra (A, F) is a subset of A that is invariant under F. Note that we\nallow empty subuniverses but not algebras with empty universes.\nDefinition 2.9. A variety of algebras is a collection of similar algebras that is closed under\nthe taking of cartesian products, subalgebras and homomorphic images. If K is a class of\nsimilar algebras then V(K) denotes the smallest variety that contains K.\nTheorem 2.10 (Birkhoff). A class V of similar algebras is a variety if and only if V can\nbe axiomatized by a set of equations.\nIt turns out that for a class K of similar algebras, V(K) = HSP(K), i.e., the class of\nhomomorphic images of subalgebras of cartesian products of members of K.\nDefinition 2.11. Let A be an algebra.\n\nON TRACTABILITY AND CONGRUENCE DISTRIBUTIVITY ∗\n5\n(1) An equivalence relation θ on A is a congruence of A if it is invariant under the\nbasic operations of A.\n(2) The congruence lattice of A, denoted Con (A), is the lattice of all congruences of\nA, ordered by inclusion.\n(3) 0A denotes the congruence relation {(a, a) : a ∈A} and 1A denotes the congruence\nrelation {(a, b) : a, b ∈A}, the smallest and largest congruences of the algebra A,\nrespectively.\n(4) An algebra A is simple if 0A and 1A are its only congruences.\nThe congruence lattice of an algebra is a very useful invariant and the types of con-\ngruence lattices that can appear in a variety govern many properties of the algebras in the\nvariety. One particularly relevant and important property of congruence lattices is that of\ndistributivity.\nDefinition 2.12. An algebra A is said to be congruence distributive if its congruence lattice\nsatisfies the distributive law for congruence meet and join. A class of algebras is congruence\ndistributive if all of its members are.\nDefinition 2.13. For k > 0, we define CD(k) to be the class of all algebras A that have a\nsequence of ternary term operations pi(x, y, z), 0 ≤i ≤k, that satisfies the identities:\np0(x, y, z)\n=\nx\npk(x, y, z)\n=\nz\npi(x, y, x)\n=\nx for all i\npi(x, x, y)\n=\npi+1(x, x, y) for all i even\npi(x, y, y)\n=\npi+1(x, y, y) for all i odd\nA sequence of term operations of an algebra A that satisfies the above equations will\nbe referred to as J ́onsson terms of A. The following celebrated theorem of J ́onsson relates\ncongruence distributivity to the existence of J ́onsson terms.\nTheorem 2.14 (J ́onsson). An algebra A generates a congruence distributive variety if and\nonly if there is some k > 0 such that A is in CD(k). In this case, all algebras in V(A) lie\nin CD(k).\nDefinition 2.15. For k > 1, define Vk to be the variety of all algebras that have as basic\noperations a sequence of k + 1 ternary operations pi(x, y, z), for 0 ≤i ≤k, that satisfy the\nequations from Definition 2.13.\nNote that an algebra is in CD(1) if and only if it has size 1 and is in CD(2) if and\nonly if it has a majority term operation (i.e., a term operation m(x, y, z) that satisfies the\nequations m(x, x, y) = m(x, y, x) = m(y, x, x) = x).\nSome of the main results and conjectures dealing with the CSP can be expressed in\nterms of Tame Congruence Theory, a deep theory of the local structure of finite algebras\ndeveloped by Hobby and McKenzie. Details of this theory may be found in [12] or [8]. The\nconnection between the CSP and Tame Congruence Theory was made by Bulatov, Jeavons,\nand Krokhin [5] and we will touch on it in the next subsection. In this paper we will only\nintroduce some of the basic terminology of the theory and will omit most details.\nIn Tame Congruence Theory, five local types of behaviour of finite algebras are identified\nand studied. The five types are, in order:\n\n6\nE. KISS AND M. VALERIOTE\n(1) the unary type,\n(2) the affine or vector-space type,\n(3) the 2 element Boolean type,\n(4) the 2 element lattice type,\n(5) the 2 element semi-lattice type.\nWe say that an algebra A omits a particular type if, locally, the corresponding type of\nbehaviour does not occur in A. A class of algebras C is said to omit a particular type if all\nfinite members of C omit that type.\nIn [12], chapter 9, characterizations of finite algebras that generate varieties that omit\nthe unary type or both the unary and affine type are given. The characterizations are similar\nto that given by J ́onsson of the congruence distributive varieties. It easily follows from the\ncharacterizations that if A is a finite algebra that generates a congruence distributive variety\nthen the variety omits both the unary and affine types.\nTo close this subsection we note a special property of the term operations of the algebras\nin Vk for all k > 1.\nDefinition 2.16. An n-ary operation f(x1, . . . , xn) on a set A is idempotent if for all a ∈A,\nf(a, a, . . . , a) = a . An algebra is idempotent if all of its term operations are idempotent.\nNote that idempotency is hereditary in the sense that if a function is the composition of\nsome idempotent operations then it too is idempotent. In another sense, if A is idempotent\nthen all algebras in V(A) are idempotent, since this condition can be described equationally.\nFinally, note that J ́onsson terms are idempotent and so all algebras in Vk for k > 1 are\nidempotent.\n2.3. Algebras and the CSP. The natural duality between sets of relations (constraint\nlanguages) over a set A and sets of operations (algebras) on A has been studied by algebraists\nfor some time. Jeavons and his co-authors [13] have shown how this link between constraint\nlanguages and algebras can be used to transfer questions about tractability into equivalent\nquestions about algebras. In this subsection we present a concise overview of this connection.\nDefinition 2.17. Let A be a non-empty set.\n(1) Let R be an n-ary relation over A and f( ̄x) an m-ary function over A for some n,\nm ≥0. We say that R is invariant under f and that f is a polymorphism of R if\nfor all ⃗ai ∈R, for 1 ≤i ≤m, the n-tuple f(⃗a1, . . . ,⃗am), whose i-th coordinate is\nequal to f(⃗a1(i), . . . ,⃗am(i)), belongs to R.\n(2) For Γ a set of relations over A, Pol (Γ) denotes the set of functions on A that are\npolymorphisms of all the relations in Γ.\n(3) For F a set of finitary operations on A, Inv(F) denotes the set of all finitary relations\non A that are invariant under all operations in F.\n(4) For Γ a constraint language over A, ⟨Γ⟩denotes Inv(Pol (Γ)) and AΓ denotes the\nalgebra (A, Pol (Γ)).\n(5) For A = (A, F), an algebra over A, ΓA denotes the constraint language Inv(F).\n(6) We call a finite algebra A tractable (NP-complete) if the constraint language ΓA\nis.\nNote that if A is an algebra, then Inv(A) coincides with the set of all subuniverses of\nfinite cartesian powers of A. Sets of relations of the form Inv(Γ) for a set of relations Γ\nare known as relational clones. Equivalently, a set of relations Λ over a finite set A is a\n\nON TRACTABILITY AND CONGRUENCE DISTRIBUTIVITY ∗\n7\nrelational clone if and only if it is closed under definition by primitive positive formulas (or\nconjunctive queries).\nTheorem 2.18. ([13]) Let Γ be a constraint language on a finite set. If Γ is tractable then\nso is ⟨Γ⟩. If ⟨Γ⟩is NP-complete then so is Γ.\nIn algebraic terms, Theorem 2.18 states that a constraint language Γ is tractable (or\nNP-complete) if and only if the algebra AΓ is.\nSo, the problem of characterizing the\ntractable constraint languages can be reduced to the problem of characterizing the tractable\nfinite algebras. In a further step, Bulatov, Jeavons and Krokhin [5] provide a reduction down\nto idempotent algebras. For this class of algebras, they propose the following characteriza-\ntion of tractability.\nConjecture 2.19. Let A be a finite idempotent algebra. Then A is tractable if and only\nif the variety V(A) omits the unary type.\nThey show that when this condition fails, the algebra is NP-complete [5]. They also\nshow that if A is a finite, idempotent algebra then V(A) omits the unary type if and only\nif the class HS(A) does. This conjecture has been verified for a number of large classes of\nalgebras. For example, results of Schaefer [18] and Bulatov [6] provide a verification for\nalgebras whose universes have size 2 and 3 respectively.\nAs noted in the introduction, one approach to proving the tractability of a constraint\nlanguage Γ is to apply a notion of local consistency to the instances in CSP(Γ) to determine\nif the instances have solutions.\nWe present a notion of width, called relational width,\ndeveloped by Bulatov and Jeavons [4] that, for finite constraint languages, is closely related\nto the notion of width defined by Feder and Vardi (see [15, 16]). In this paper we will closely\nfollow the presentation of relational width found in [3].\nDefinition 2.20. Let A = (A1, . . . , An) be a sequence of finite, non-empty sets, let P =\n(A, C) be an instance of the CSP and let k > 0. We say that P is k-minimal if:\n(1) For each subset I of {1, 2, . . . , n} of size at most k, there is some constraint (S, R)\nin C such that I ⊆S, and\n(2) If (S1, R1) and (S2, R2) are constraints in C and I ⊆S1 ∩S2 has size at most k then\nprojI(R1) = projI(R2).\nIt is not hard to show that the second condition of this definition is equivalent to having\nthe set of partial solutions PI of P equal to projI(Ri) for all subsets I of size at most k and\nall i with I ⊆Si.\nProposition 2.21. Let Γ be a constraint language and k > 0. There is a polynomial time\nalgorithm (the k-minimality algorithm) that converts a given instance P from CSP(Γ) into\nan equivalent k-minimal instance P ′ from CSP(⟨Γ⟩). In fact, if the arities of the constraint\nrelations of P are bounded by an integer m ≥k then the arities of the constraint relations\nof P ′ are also bounded by m.\nProof. See the discussion in Section 3.1 of [3].\nDefinition 2.22. Let Γ be a constraint language and k > 0. We say that Γ has relational\nwidth k if for every instance P from CSP(Γ), P has a solution if and only if the constraint\nrelations of P ′, the equivalent k-minimal instance produced by the k-minimality algorithm,\nare all non-empty.\n\n8\nE. KISS AND M. VALERIOTE\nProposition 2.23. Let Γ be a constraint language and k > 0.\n(1) If an instance P of the CSP has a solution then the constraint relations of all\nequivalent instances are non-empty.\n(2) If Γ has relational width k and ∆⊆Γ then ∆also has relational width k.\n(3) If Γ has relational width k then every k-minimal instance P from CSP(Γ) whose\nconstraint relations are non-empty has a solution.\n(4) If Γ is of finite relational width then it is globally tractable.\n(5) If every k-minimal instance from CSP(⟨Γ⟩) whose constraint relations are non-\nempty has a solution then Γ has relational width k and hence is globally tractable.\n(6) If Γ is finite and m ≥k is an upper bound on the arities of the relations in Γ then Γ\nhas relational width k if every k-minimal instance from CSP(⟨Γ⟩) whose constraint\nrelations are non-empty and have arity ≤m has a solution.\nProof. Statement (4) follows from Proposition 2.21, since if Γ has relational width k and\nP is an instance from CSP(Γ) then in order to determine if P has a solution, it suffices to\ntest if P ′, the equivalent k-minimal instance produced by the k-minimality algorithm, has\nnon-empty constraint relations. Statements (5) and (6) also follows from Proposition 2.21\nsince the constraint relations of P ′ belong to ⟨Γ⟩and their arities are no bigger than the\nmaximum of k and the arities of the constraint relations of P.\nIn the case where Γ happens to be a relational clone (i.e., Γ = ⟨Γ⟩) it follows from\nstatements (3) and (5) of the previous proposition that Γ has relational width k if and only\nif every k-minimal instance of CSP(Γ) whose constraint relations are all non-empty has a\nsolution. For the most part, we are interested in this type of constraint language in this\npaper.\nWe note that in [15, 16] it is shown that a finite constraint language has bounded\nrelational width if and only if it has bounded width in the sense of Feder-Vardi.\nThe\nfollowing conjecture is similar to Conjecture 2.19 and was proposed by Larose and Z ́adori\n[16] for constraint languages of bounded width.\nConjecture 2.24. Let A be a finite idempotent algebra. Then A is of bounded width if\nand only if V(A) omits the unary and affine types.\nIn [16] Larose and Z ́adori verify one direction of this conjecture, namely that if V(A)\nfails to omit the unary or affine types then A is not of bounded width. Note that in [2],\nBulatov proposes a conjecture that is parallel to 2.24. Larose and the second author have\nnoted that, as with the unary type, one need only check in HS(A) to determine if V(A)\nomits the unary and affine types when A is finite and idempotent (see Corollary 3.2 of [19]\nfor a more general version of this).\nThe main result of this paper can be regarded as providing some evidence in support of\nConjecture 2.24. Theorem 4.1 establishes that if A is a finite member of CD(3) then any\nfinite constraint language contained in ΓA is of bounded width and hence tractable.\n3. Algebras in CD(3)\nRecall that the variety V3 consists of all algebras A having four basic operations\npi(x, y, z), 0 ≤i ≤3 that satisfy the equations of Definition 2.13. Since the equations\ndictate that p0 and p3 are projections onto x and z respectively, they will play no role in\nthe analysis of algebras in CD(3).\n\nON TRACTABILITY AND CONGRUENCE DISTRIBUTIVITY ∗\n9\n3.1. J ́onsson ideals. For A an algebra in V3, define x · y to be the binary term operation\np1(x, y, y) of A. Note that the J ́onsson equations imply that x · y = p2(x, y, y) as well. This\n“multiplication” will play a crucial role in the proof of the main theorem of this paper.\nDefinition 3.1. For X a subset of an algebra B ∈V3 let J(X) be the smallest subuniverse\nY of B containing X and satisfying the following closure property: if x is in Y and u ∈B\nthen u · x is also in Y .\nWe will call J(X) the J ́onsson ideal of B generated by X. The concept of a J ́onsson\nideal was developed in [19] for any algebra that generates a congruence distributive variety\nand was used in that paper to establish some intersection properties of subalgebras that are\nrelated to relational width.\nDefinition 3.2. A finite algebra B ∈V3 will be called J ́onsson trivial if it has no proper\nnon-empty J ́onsson ideals.\nNote that B is J ́onsson trivial if and only if J({b}) = B for all b ∈B. Also note that\nif B is J ́onsson trivial then every homomorphic image of it is, as well.\nWe now define a notion of distance in an algebra that will be applied to J ́onsson trivial\nalgebras to establish some useful features of the subalgebras of their cartesian products.\nDefinition 3.3. Let A and B be arbitrary similar algebras and S a subdirect subalgebra of\nA × B.\n(1) Let S0 = 0A and S1 be the relation on A defined by:\n(a, c) ∈S1 ⇐⇒(a, b), (c, b) ∈S for some b ∈B.\n(2) For k > 0, let Sk+1 = Sk ◦S1.\n(3) For a, b ∈A, we write d(a, b) = k if the pair (a, b) is in Sk and not in Sk−1 and will\nsay that the distance between a and b relative to S is k. If no such k exists, d(a, b)\nis said to be undefined.\n(4) If d(a, b) is defined for all a and b ∈A we say that A is connected with respect to S.\nProposition 3.4. Let A, B and S be as in the definition.\n(1) For each k ≥0, the relation Sk is a reflexive, symmetric subuniverse of A2.\n(2) If A is an idempotent algebra and c ∈A then for any k ≥0, the set of all elements\na with d(a, c) ≤k is a subuniverse of A.\n(3) If A is a simple algebra then either d(a, b) is undefined for all a ̸= b ∈A (equivalently\nS1 = 0A) or A is connected with respect to S.\nProof. The symmetry of S1 is immediate from its definition and its reflexivity follows from S\nbeing subdirect. To see that it is a subuniverse of A2, let t(x1, . . . , xn) be a term operation of\nA and (ai, bi) ∈S1 for 1 ≤i ≤n. Then for all i there are ci ∈B with (ai, ci) and (bi, ci) ∈S.\nApplying t to these pairs shows that (t( ̄a), t( ̄c)) and (t( ̄b), t( ̄c)) ∈S and so (t( ̄a), t( ̄b)) ∈S1.\nThis establishes that S1 is a subuniverse of A2. Since the relational product operation\npreserves the properties of symmetry, reflexivity and being a subuniverse, it follows that Sk\nhas all three properties, for k ≥0.\nSuppose that A is idempotent, c ∈A, and k ≥0. If t(x1, . . . , xn) is a term operation\nof A and ai ∈A with d(ai, c) ≤k, for 1 ≤i ≤n, then (ai, c) ∈Sk for all i. By the\nfirst claim of this proposition, it follows that (t(a1, . . . , an), t(c, . . . , c)) ∈Sk since Sk is a\nsubuniverse of A2. By idempotency we have t(c, . . . , c) = c and so (t(a1, . . . , an), c) ∈Sk,\nor d(t(a1, . . . , an), c) ≤k. This establishes the second claim of the proposition.\n\n10\nE. KISS AND M. VALERIOTE\nFor the last claim, note that since S1 is a symmetric, reflexive subuniverse of A2 then\nits transitive closure is a congruence on A that is equal to the union of the Sk, k ≥0. Since\nA is assumed to be simple then this congruence is either 0A or 1A. In the former case we\nconclude that d(a, b) is undefined for all a ̸= b ∈A and in the latter case that for all a,\nb ∈A, (a, b) ∈Sk for some k ≥0 and so d(a, b) is defined.\nLemma 3.5. Let A and B be finite algebras in V3 and S a subdirect subalgebra of A × B.\nSuppose that A is connected with respect to S. Then for every x, y, z ∈A we have\nd(x · y, z) ≤max\n d(x, y) + 1\n2\n \n, d(y, z)\n \n.\nProof. Let d(y, z) = m, d(x, y) = n and choose elements ai ∈A for 0 ≤i ≤n with x = a0,\nan = y and (ai, ai+1) ∈S1 for 0 ≤i < n. For k the largest integer below [(n + 1)/2] we get\nthat d(x, ak) and d(ak, y) are both at most k. Therefore if d = max(k, m), then the pairs\n(x, ak), (y, ak), (y, z) are in Sd, and so\n(p2(x, y, y), p2(ak, ak, z)) ∈Sd .\nBut p2(x, y, y) = x · y and p2(ak, ak, z) = z, proving the lemma.\nCorollary 3.6. For A, B and S as in the previous lemma, suppose that d(a, b) ≤n for all\na, b ∈A. Let m ≥[(n + 1)/2] be any integer and c ∈A. Then the set of all elements of A\nwhose distance from c is at most m is a J ́onsson ideal of A.\nProof. As noted earlier the set I = {a ∈A : d(a, c) ≤m} is a subuniverse of A since A\nis idempotent. We need only show that I is closed under multiplication on the left. So,\nsuppose that a ∈I and u ∈A. Since d(u, c) ≤n, we have d(u · a, c) ≤max(m, d(a, c)) ≤m\nby the previous lemma.\nCorollary 3.7. Let A and B be finite members of V3 such that A is J ́onsson trivial and\nconnected with respect to some subdirect subalgebra S of A × B. Then d(a, b) ≤1 for all a,\nb ∈A (or equivalently, S1 = A2).\nProof. Suppose that the maximum distance n between the points of A is at least 2 and\nthat a, b ∈A with d(a, b) = n. Then m, the largest integer below [(n + 1)/2] is less than\nn. From the previous lemma, the set of all elements u ∈A with d(a, u) ≤m is a proper\nJ ́onsson ideal of A, contradicting that A is J ́onsson trivial.\nLemma 3.8. Let A, B be finite members of V3 with A J ́onsson trivial and simple and let\nS be a subdirect subalgebra of A × B. Then either S = A × B, or S is the graph of an onto\nhomomorphism from B to A.\nProof. As A is simple, then either S1 = 0A or A is connected with respect to S. In the\nformer case, we conclude that S is the graph of an onto homomorphism from B to A and\nin the latter, it follows from the previous corollary that S1 = A2.\nFor a ∈A, let Ba = {b ∈B : (a, b) ∈S} and choose a with |Ba| maximal. Let I denote\nthe set of those elements x of A for which Bx = Ba. To complete the proof we will need to\ndemonstrate that I = A and Ba = B. To show that I = A it will suffice to prove that it is\na J ́onsson ideal of A.\nIndeed, let u ∈A and c ∈I be arbitrary. Then (u, c) ∈S1 (since S1 = A2) and therefore\nthere is a b ∈B such that (u, b) and (c, b) are in S. Note that since c ∈I then b ∈Ba. If d\nis any element of Ba then c ∈I implies that (c, d) ∈S, so we get that\n(p2(u, c, c), p2(b, b, d)) = (u · c, d) ∈S.\n\nON TRACTABILITY AND CONGRUENCE DISTRIBUTIVITY ∗\n11\nSince this holds for every d ∈Ba, we conclude that u · c ∈I. Finally, since S is subdirect\nit follows that Ba = B.\nWe apply this lemma to obtain a simple description of subdirect products of finite,\nsimple, J ́onsson trivial members of V3 and then show how to use this description to prove\nthat certain k-minimal instances of the CSP have solutions, when k ≥3.\nLemma 3.9. Let Ai, for 1 ≤i ≤n, be finite members of V3 with A1 J ́onsson trivial. Let\nS be a subdirect product of the Ai’s such that for all 1 < i ≤n, the projection of S onto\ncoordinates 1 and i is equal to A1 × Ai. Then S = A1 × D, where D = proj{2≤i≤n}(S).\nProof. We prove this by induction on n. For n = 2, the result follows by our hypotheses.\nConsider the case n = 3 and let D be the projection of S onto A2 × A3. Let (u, v) ∈D\nand let I(u,v) = {a ∈A1 : (a, u, v) ∈S}. Our goal is to show that I(u,v) = A1 and we\ncan accomplish this by showing that it is a non-empty J ́onsson ideal. Clearly I(u,v) is a\nnon-empty subuniverse of A1 since all algebras involved are idempotent.\nLet a ∈I(u,v), b ∈A1 and choose elements y ∈A3 and x ∈A2 with (b, u, y) and\n(a, x, y) ∈S. By our hypotheses, these elements exist. Applying p2 to these elements, along\nwith (a, u, v), we get the element (b · a, u, v), showing that b · a ∈I(u,v). Thus I(u,v) is a\nJ ́onsson ideal.\nNow, consider the general case and suppose that the result holds for products of fewer\nthan n factors. Let S1 = proj{1≤i<n}(S) and S2 = proj{2≤i<n}(S). Then S is isomorphic\nto a subdirect product of A1, S2 and An and, by induction, S1 = A1 × S2. Then, applying\nthe result with n = 3 to this situation, we conclude that S = A1 × D, as required.\nCorollary 3.10. Let Ai be finite, simple, J ́onsson trivial members of V3, for 1 ≤i ≤n,\nand let S be a subdirect product of the Ai’s. If, for all 1 ≤i < j ≤n, the projection of S\nonto Ai × Aj is not the graph of a bijection then S = Q\n1≤i≤n Ai.\nProof. For 1 ≤i < j ≤n, we have, by Lemma 3.8 that either the projection of S onto\nAi × Aj is the graph of a bijection between the two factors (since they are both simple) or\nis the full product. The former case is ruled out by assumption and so we are in a position\nto apply the previous lemma inductively to reach the desired conclusion.\nDefinition 3.11. A subdirect product S of the algebras Ai, 1 ≤i ≤n, is said to be almost\ntrivial if, after suitably rearranging the coordinates, there is a partition of {1, 2, . . . , n} into\nintervals Ij, 1 ≤j ≤p, such that S = projI1(S) × · · · × projIp(S) and, for each j, if\nIj = {i : u ≤i ≤v} then there are bijections πi : Au →Ai, for i ∈Ij such that\nprojIj(S) = {(a, πu+1(a), . . . , πv(a)) : a ∈Au}.\nCorollary 3.12. Let Ai be finite, simple, J ́onsson trivial members of V3, for 1 ≤i ≤n,\nand let S be a subdirect product of the Ai’s. Then S is almost trivial.\nProof. For 1 ≤i, j ≤n, set i ∼j if i = j or the projection of S onto Ai and Aj is equal to\nthe graph of a bijection between these two factors. In this case, let πi,j denote this bijection.\nIt is not hard to see that ∼is an equivalence relation on the set {1, 2, . . . , n} and, by\napplying Lemma 3.8, if i ̸∼j then the projection of S onto Ai and Aj is equal to Ai × Aj.\nBy using the bijections πi,j and Corollary 3.10 it is elementary to show that S is indeed\nalmost trivial.\n\n12\nE. KISS AND M. VALERIOTE\nFor A a finite sequence of finite algebras, P = (A, C) denotes a multi-sorted instance\nof the CSP whose domains are the universes of the algebras in A and whose constraint\nrelations are subuniverses of cartesian products of members from A.\nTheorem 3.13. Let A be a finite sequence of finite, simple, J ́onsson trivial members of V3\nand let P = (A, C) be a subdirect, k-minimal instance of the CSP for some k ≥3. If the\nconstraint relations of P are all non-empty then P has a solution.\nDefinition 3.11 and analogs of Corollary 3.12 and Theorem 3.13 can be found at the\nend of Section 3.3 in [3]. The proof of Corollary 3.4 given in that paper can be used to\nprove our Theorem 3.13. As we shall see, this theorem will form the base of the inductive\nproof of our main result.\n3.2. The reduction to J ́onsson trivial algebras. The goal of this subsection is to show\nhow to reduce a k-minimal instance P of the CSP whose domains all lie in V3 and whose\nconstraint relations are all non-empty to another k-minimal, subdirect instance P ′ whose\ndomains are all J ́onsson trivial and whose constraint relations are non-empty. In order to\naccomplish this, we will need to work with a suitably large k ≥3.\nTo start, let A = (A1, . . . , An) be a sequence of finite algebras from V3 and let M =\nmax{|Ai| : 1 ≤i ≤n}. Let k > 0 and P = (A, C) be a k-minimal instance of the CSP with\nC consisting of the constraints Ci = (Si, Ri), 1 ≤i ≤m. By taking suitable subalgebras\nof the Ai we may assume that P is subdirect and, of course, we also assume that the Ri\nare all non-empty. In addition, k-minimality assures that we may assume that the scope of\neach constraint of P consists of at least k variables and that no two constraints have the\nsame k-element set as their scopes.\nSince P is k-minimal then its system of partial solutions over k-element sets satisfies\nan important compatibility property. Namely, if I and K are k-element sets of coordinates\nthen proj(I∩K)(PI) = proj(I∩K)(PK). In this section we will denote PI by Λ(I) and call this\nfunction the k-system (of partial solutions) determined by P. Since P is subdirect then for\nall I, Λ(I) will be a subdirect product of the algebras Ai, for i ∈I.\nWe wish to consider the situation in which some Ai, say A1, has a proper J ́onsson ideal\nJ. The main result of this subsection is that if the scopes of the constraints of P all have\nsize at most k (and hence exactly k), or if k ≥M2 then we can reduce the question of the\nsolvability of P to the solvability of a k-minimal instance with A1 replaced by J. Doing\nso will allow us to proceed by induction to reduce our original instance down to one whose\ndomains are all J ́onsson trivial.\nSo, let J be a proper non-empty J ́onsson ideal of A1 and define ΛJ to be the following\nfunction on the set of k-element subsets of {1, 2, . . . , n}:\n• If I is a k-element set that includes 1 then define ΛJ(I) to be {⃗a ∈Λ(I) : ⃗a(1) ∈J}.\n• If 1 /∈I, define ΛJ(I) to be the set of all ⃗a ∈Λ(I) such that for all i ∈I the\nrestriction of ⃗a to I \\ {i} can be extended to an element of ΛJ({1} ∪(I \\ {i})).\nLemma 3.14. If k ≥3 then\n(1) ΛJ(I) is non-empty for all I and if 1 ∈I then the projection of ΛJ(I) onto the first\ncoordinate is equal to J.\n(2) For I, K, k-element subsets of {1, 2, . . . , n}, proj(I∩K)(ΛJ(I)) = proj(I∩K)(ΛJ(K)).\n\nON TRACTABILITY AND CONGRUENCE DISTRIBUTIVITY ∗\n13\nProof. Since P is subdirect then for any k-element set I with 1 ∈I we have that ΛJ(I) is\nnon-empty and projects onto J in the first coordinate.\nLet I be some k-element set of coordinates with 1 /∈I.\nFor ease of notation, we\nmay assume that I = {2, 3, . . . , k, k + 1}. Let ⃗a = (a1, a2, a3, . . . , ak) be any member of\nΛJ({1, 2, . . . , k}). We will show that there is some ak+1 ∈Ak+1 such that (a2, a3, . . . , ak+1) ∈\nΛJ(I). This will not only show that ΛJ(I) is non-empty, but will also allow us to easily\nestablish condition (2) of the lemma.\nWe construct the element ak+1 as follows. Since Λ is the k-system for P then there\nis some element u ∈Ak+1 such that (a2, . . . , ak, u) ∈Λ(I). Furthermore, there is some\nv ∈Ak+1 such that (a1, a3, . . . , ak, v) ∈Λ({1, 3, . . . , k + 1}) and then some v′ ∈A2\nwith (v′, a3, . . . , ak, v) ∈Λ(I). Similarly, there are w and w′ with (a1, a2, a4, . . . , ak, w) ∈\nΛ{1, 2, 4, . . . , k + 1}) and (a2, w′, a4, . . . , ak, w) ∈Λ(I). Let ak+1 = p1(u, v, w) ∈Ak+1. By\napplying p1 to the tuples (a2, . . . , ak, u), (v′, a3, . . . , ak, v) and (a2, w′, a4, . . . , ak, w) we see\nthat the tuple (a2, a3, . . . , ak+1) ∈Λ(I).\nWe now need to show that for all 2 ≤i ≤k + 1 there is some b ∈J with\n(b, a2, . . . , ai−1, ai+1, . . . , ak+1) ∈ΛJ({1, 2, . . . , i −1, i + 1, . . . , k + 1}).\nThere are a number of cases to consider.\n• If i = k + 1 then the tuple (a2, . . . , ak) extends to (a1, a2, . . . , ak), a member of\nΛJ({1, 2, . . . , k}), as required.\n• If i = 2: There are x ∈A1 and y ∈A3 with (x, a3, . . . , ak, u) and (a1, y, a4, . . . , ak, w)\nin Λ({1, 3, . . . , k+1}). Applying p1 to these tuples and the tuple (a1, a3, a4, . . . , ak, v)\n(in the second variable) produces the tuple (x·a1, a3, . . . , ak, ak+1) ∈Λ({1, 3, . . . , k+\n1}). Since a1 ∈J and J is a J ́onsson ideal, then x · a1 ∈J and so this tuple belongs\nto ΛJ({1, 3, . . . , k + 1}), as required.\n• If i = 3 or 3 < i < k + 1 then small variations of the previous argument will work.\nTo complete the proof of this lemma we need to establish the compatibility of ΛJ on\noverlapping elements of its domain. Let I and L be distinct members of the domain of ΛJ\nwith non-empty intersection N and let i ∈I \\ L and l ∈L \\ I.\nLet ⃗a ∈ΛJ(I) and let ⃗c be the projection of ⃗a onto the coordinates in N. The restriction\nof ⃗a to I \\ {i} extends to an element ⃗a′ ∈ΛJ({1} ∪(I \\ {i})). Since Λ is the k-system for\nP, the restriction of ⃗a′ to {1} ∪N extends to an element ⃗b′ of Λ({1} ∪(L \\ {l})). Note that\n⃗b′(1) ∈J and the restriction of ⃗b′ to N is ⃗c. By the first part of this proof, it follows that\nthe restriction of ⃗b′ to L \\ {l} extends to an element ⃗b of ΛJ(L) as required.\nCorollary 3.15. If all of the constraints of P have scopes of size k then there is a k-\nminimal instance PJ of the constraint satisfaction problem over the domains J and the\nAi, for 2 ≤i ≤n, whose constraint relations are all non-empty and whose solution set is\ncontained in the solution set of P.\nProof. It follows from our assumptions on the sizes of the scopes of the constraints of P\nthat the constraints can be indexed by the k-element subsets of {1, 2, . . . , n} and that for\nsuch a subset I, the constraint CI is of the form (I, RI) where RI is a subdirect product of\nthe algebras Ai, for i ∈I.\nWe set PJ to be the instance of the CSP over the domains J and the Ai, for 2 ≤i ≤n,\nthat has, for each k-element subset I of {1, 2, . . . , n}, the constraint C′\nI = (I, R′\nI), where\nR′\nI = ΛJ(I). It follows by construction and from the previous lemma that PJ is a k-minimal\n\n14\nE. KISS AND M. VALERIOTE\ninstance of the CSP whose constraint relations are all non-empty and whose solutions are\nalso solutions of P.\nThe previous corollary can be used to establish the tractability of the constraint lan-\nguages arising from finite members of V3, while the following lemma will be used to prove\nthat these languages are in fact globally tractable.\nLemma 3.16. Assume that k ≥M2 and let C = (S, R) be a constraint of P. Then there is\na subuniverse RJ of R such that for all k-element subsets I of S, the projection of R onto\nI is equal to ΛJ(I).\nProof. For K a subset of S and ⃗a ∈R, we will say that ⃗a is reduced over K if for all\n(k −1)-element subsets I of K, the restriction of ⃗a to I can be extended to an element of\nΛJ({1} ∪I). We define RJ to be the set of all tuples ⃗a ∈R that are reduced over S. RJ is\nalso equal to all elements ⃗a of R such that for all k-element subsets I of S, the restriction\nof ⃗a to I is in ΛJ(I). RJ is naturally a subuniverse of R and so the challenge is to show\nthat it satisfies the conditions of the lemma. Our proof breaks into two cases, depending\non whether or not the coordinate 1 is in S.\nSuppose that 1 ∈S. We may assume that S = {1, 2, . . . , m} for some m ≤n. We need\nto show that if I is a k element subset of S and ⃗a ∈ΛJ(I) then there is some ⃗b ∈RJ whose\nrestriction to I is ⃗a.\nFirst consider the sub-case where 1 ∈I. If ⃗a ∈ΛJ(I) then by the k-minimality of P\nthere is some ⃗b ∈R whose restriction to I is ⃗a. Since ⃗b(1) = ⃗a(1) ∈J it follows that ⃗b is in\nRJ, as required.\nNow, suppose that 1 /∈I and assume that I = {2, 3, . . . , k + 1}. By the k-minimality\nof P there is some ⃗c ∈R whose restriction to I is ⃗a. For each 2 ≤i ≤k + 1 there is some\nji ∈J and some ⃗ci ∈R such that ⃗ci(1) = ji and such that the restrictions of ⃗ci and ⃗a to\nI \\ {i} are the same.\nSince k > |J| it follows from the Pigeonhole principle that there are i ̸= l with ji = jl.\nWe may assume that i = 2 and l = 3 and set j = ji. Define ⃗b to be p1(⃗c,⃗c2,⃗c3). This\nelement belongs to R and satisfies: ⃗b(1) = ⃗c(1) · j ∈J and the restriction of ⃗b to I is ⃗a.\nTo establish this equality over coordinate 2 we make use of the identity p1(x, y, x) = x and\nover coordinate 3 p1(x, x, y) = x. Finally, ⃗b is in RJ since ⃗b(1) ∈J.\nFor the remaining case, assume that 1 /∈S, say S = {2, 3, . . . , m + 1}. We will show by\ninduction on s that if k −1 ≤s ≤m −1, K is a subset of {2, 3, . . . , m + 1} of size s and\n⃗a ∈R is reduced over K then if i ∈S \\ K there is some ⃗b ∈R that is reduced over K ∪{i}\nand such that projK(⃗a) = projK(⃗b). A consequence of this claim is that for any k-element\nsubset I of S, any element of ΛJ(I) can be extended to a member of RJ. From this, the\nlemma follows.\nLemma 3.14 establishes the base of this induction. Assume the induction hypothesis\nholds for k −1 ≤s < m −1 and let K be a subset of {2, 3, . . . , m + 1} of size s + 1. By\nsymmetry, we may assume that K = {2, 3, . . . , s + 2}. Let ⃗a ∈R be reduced over K. We\nwill show that there is some ⃗a′ ∈R which equals ⃗a over K and is reduced over K ∪{s + 3}.\nBy the induction hypothesis, for each 2 ≤i ≤s + 2 there is some ⃗ai ∈R such that the\nprojections of ⃗a and ⃗ai onto K \\ {i} are the same and ⃗ai is reduced over (K ∪{s + 3}) \\ {i}.\nBy the Pigeonhole principle it follows that there is some a ∈As+3 and a set Q contained\nin K of size at least M such that for i ∈Q, ⃗ai(s + 3) = a.\n\nON TRACTABILITY AND CONGRUENCE DISTRIBUTIVITY ∗\n15\nLet i and l be distinct members of Q and let ⃗a′ be the element p1(⃗a,⃗ai,⃗al) of R. Note\nthat over the coordinates in K, ⃗a′ and ⃗a are equal and that at s + 3, ⃗a′ equals b · a, where\nb = ⃗a(s + 3).\nWe claim that ⃗a′ is reduced over K ∪{s + 3}. To establish this we need to show that\nover any subset U of K ∪{s + 3} of size k −1, the restriction to U of ⃗a′ can be extended\nto a member of ΛJ({1} ∪U). When U avoids the coordinate s + 3 there is nothing to do,\nsince ⃗a is reduced over K.\nSo, assume that U contains s + 3 and let ⃗d be an extension to some element in Λ({1} ∪\nU) of the restriction of ⃗a to U.\nSince for each v ∈Q the element ⃗av is reduced over\n(K ∪{s + 3}) \\ {v} then there is a member ⃗cv of ΛJ({1} ∪U) whose restriction to U \\ {v}\nis equal to the restriction of ⃗av over this set. If there is some v ∈Q \\ U then the element\np1(⃗d,⃗cv,⃗cv) ∈ΛJ({1} ∪U) witnesses that the restriction of ⃗a′ to U can be extended as\ndesired.\nIf, on the other hand, Q ⊆U then choose two elements u and v of Q such that\n⃗cu(1) = ⃗cv(1) ∈J. An application of the Pigeonhole principle ensures the existence of these\nelements since |Q| > |J|. Then, the element p1(⃗d,⃗cu,⃗cv) ∈ΛJ({1} ∪U) and its restriction\nto U is equal the restriction of ⃗a′ on U.\nCorollary 3.17. If k ≥M2 then there is a k-minimal instance PJ of the constraint sat-\nisfaction problem over J and the Ai, for 2 ≤i ≤n, whose constraint relations are all\nnon-empty and whose solution set is contained in the solution set of P.\nProof. From the preceding lemma it follows that the instance PJ over the domains J and\nthe Ai, for 2 ≤i ≤n, with constraints C′ = (S, RJ), for each constraint C = (S, R) of P, is\nk-minimal and has all of its constraint relations non-empty. Since the constraint relations\nof PJ are subsets of the corresponding constraint relations of P then the result follows.\nTheorem 3.18. Let A = (A1, . . . , An) be a sequence of finite algebras from V3 and let\nP = (A, C) be a k-minimal instance of the CSP whose constraint relations are non-empty.\nIf k ≥3 and the sizes of the scopes of the constraints of P are bounded by k or if k ≥M2,\nwhere M = max{|Ai| : 1 ≤i ≤n}, then there is a subdirect k-minimal instance P ′ of the\nCSP over J ́onsson trivial subalgebras of the Ai such that the constraint relations of P ′ are\nnon-empty and the solution set of P ′ is contained in the solution set of P.\nProof. This theorem is proved by repeated application of Corollaries 3.15 and 3.17.\n3.3. The reduction to simple algebras. In this subsection we show, for k ≥3, how to\nreduce a k-minimal instance of the CSP whose domains are J ́onsson trivial members of V3\nand whose constraint relations are all non-empty to one which has in addition, domains\nthat are simple algebras. Our development closely follows parts of the proof of Theorem\n3.1 in [3].\nDefinition 3.19. Let Ai, 1 ≤i ≤m, be similar algebras and let Θ = (θ1, . . . , θm) be a\nsequence of congruences θi ∈Con (Ai).\n(1) Qm\ni=1 θi denotes the congruence on Qm\ni=1 Ai that identifies two m-tuples ⃗a and ⃗b if\nand only if (ai, bi) ∈θi for all i.\n(2) If I is a subset of {1, 2, . . . , m} and R is a subalgebra of Q\ni∈I Ai then R/Θ denotes\nthe quotient of R by the restriction of the congruence Q\ni∈I θi to R.\n\n16\nE. KISS AND M. VALERIOTE\nLet A = (A1, . . . , An) be a sequence of finite, J ́onsson trivial members of V3 and let\nP = (A, C) be a subdirect, k-minimal instance of the CSP whose constraint relations are all\nnon-empty. Let C = {C1, C2, . . . , Cm} where, for 1 ≤i ≤m, Ci = (Si, Ri) for some subset\nSi of {1, 2, . . . , n} and some subuniverse Ri of Q\ni∈Si Ai. Suppose that one of the Ai is not\nsimple, say for i = 1, and let θ1 be a maximal proper congruence of A1.\nRecall that for I ⊆{1, 2, . . . , n}, PI denotes the set of partial solutions of P over the\nvariables I.\nIf |I| ≤k then since P is k-minimal, PI is non-empty and is a subdirect\nsubuniverse of Q\ni∈I Ai.\nSince the algebra A1/θ1 is a simple, J ́onsson trivial algebra then it follows by Lemma\n3.8 that for 2 ≤i ≤n, P{1,i}/(θ1 × 0Ai) is either the graph of a homomorphism πi from\nAi onto A1/θ1 or is equal to A1/θ1 × Ai. Let W consist of 1 along with the set of all i for\nwhich the former holds. For 2 ≤i ≤n, let θi be the kernel of the map πi if i ∈W, and 0Ai\notherwise.\nLet Θ = (θ1, . . . , θn) and set P/Θ = (A/Θ, C/Θ) where A/Θ = (A1/θ1, . . . , An/θn)\nand C/Θ consists of the constraints Ci/Θ = (Si, Ri/Θ), for 1 ≤i ≤m.\nNote that since P is subdirect and k-minimal then so is P/Θ and that each Ai/θi is\nJ ́onsson trivial, since this property is preserved by taking quotients.\nLemma 3.20. If the instance P/Θ has a solution, then there is some k-minimal instance\nP ′ = (A′, C′) such that\n• A′ = (A′\n1, . . . , A′\nn), where for each 1 ≤i ≤n, A′\ni a subalgebra of Ai.\n• A′\n1 is a proper subset of A1,\n• C′ = {C′\n1, . . . , C′\nm} where, for each 1 ≤i ≤m, C′\ni = (Si, R′\ni) for some non-empty\nsubuniverse R′\ni of Ri.\nHence, any solution of P ′ is a solution of P.\nProof. Let (s1, . . . , sn) be a solution of P/Θ. We can regard each si as a congruence block\nof θi and hence as a subuniverse of Ai. For i ∈W, define A′\ni to be the subalgebra of Ai\nwith universe si and for i /∈W, set A′\ni = Ai. For 1 ≤j ≤m, let\nR′\nj = Rj ∩\nY\ni∈Sj\nA′\ni.\nWe now set out to prove that the instance P ′ = (A′, C′) has the desired properties.\nSince θ1 is a proper congruence of A1 then s1 is a proper subset of A1 and so A′\n1 is properly\ncontained in A1. Since (s1, . . . , sn) is a solution to P/Θ it follows that for 1 ≤j ≤m, R′\nj is\na non-empty subuniverse of Rj.\nWe need only verify that P ′ is k-minimal, so let 1 ≤a < b ≤m and I be some subset\nof Sa ∩Sb of size at most k. To establish that projI(R′\na) = projI(R′\nb) it will suffice to show\nthat\nprojI(R′\ni) = projI(Ri) ∩\nY\nl∈I\nA′\nl.\nfor all i, since P is k-minimal.\nBy the definition of R′\ni it is immediate that the relation on the left of the equality sign\nis contained in that on the right. In the case that W ∩Si = ∅the other inclusion is also\nclear.\nIf W ∩Si ̸= ∅we have that projW ∩Si(Ri/Θ) is a subdirect product of simple, J ́onsson\ntrivial algebras that are all isomorphic to A1/θ1. Since the projection of this subdirect\nproduct onto any two coordinates in W ∩Si is equal to the graph of a bijection then in fact,\n\nON TRACTABILITY AND CONGRUENCE DISTRIBUTIVITY ∗\n17\nthe entire subdirect product is isomorphic to A1/θ1 in a natural way (using the bijections\nπi from the definition of W). Then, using Lemma 3.9 and the definition of W (or more\nprecisely, the complement of W), we conclude that Ri/Θ is isomorphic to A1/θ1 ×D, where\nD = proj(Si\\W )(Ri).\nNow, suppose that ⃗a ∈projI(Ri)∩Q\nl∈I A′\nl. Then there is some⃗b ∈Ri with projI(⃗b) = ⃗a.\nIf W ∩I = ∅then, by the concluding remark of the previous paragraph, proj(Si\\W )(⃗b) and\nhence projI(⃗b) can be extended to an element of Ri that lies in Q\nl∈Si A′\nl (here we use the\nfact that we have a solution of P/Θ to work with). This establishes that, in this case,\n⃗a ∈projI(R′\ni).\nFinally, suppose that for some w we have w ∈W ∩I. The vector ⃗b from Ri that projects\nonto ⃗a over I has the property that ⃗b(w) ∈sw (since ⃗a does). The structure of Ri/Θ worked\nout earlier implies that ⃗b(l) ∈sl for all l ∈W ∩Si since (s1, . . . , sn) is a solution to P/Θ.\nFrom this we conclude that ⃗b ∈R′\ni, as required.\n4. Proof of the main result\nIn the preceding section we established techniques for reducing k-minimal instances\nof the CSP over domains from V3 to more manageable instances. The following theorem\nemploys these techniques to establish the finite relational width of constraint languages\narising from finite algebras in CD(3).\nLet A be a finite algebra in CD(3).\nThen A has term operations p1(x, y, z) and\np2(x, y, z) that satisfy the equations:\npi(x, y, x)\n=\nx , i = 1, 2\np1(x, x, y)\n=\nx\np1(x, y, y)\n=\np2(x, y, y)\np2(x, x, y)\n=\ny\nRecall that associated with A is the constraint language ΓA = Inv(A), consisting of all\nrelations invariant under the basic operations of A.\nTheorem 4.1. If Γ is a subset of ΓA whose relations all have arity k or less, for some\nk ≥3, then Γ has relational width k. In any case, if M = |A|2 then ΓA has relational width\nM.\nCorollary 4.2. If Γ is a finite subset of ΓA then Γ is tractable and is of bounded width in\nthe sense of Feder-Vardi. Furthermore, ΓA is globally tractable.\nProof. (of the Theorem) We may assume that A = (A, p0, p1, p2, p3), where p0(x, y, z) = x\nand p3(x, y, z) = z for all x, y, z ∈A since if we can establish the theorem for this sort\nof algebra, it will then apply to all algebras with universe A that have the pi as term\noperations.\nOur assumption on A places it in the variety V3 and so the results from the previous\nsection apply. Let Γ be a subset of ΓA. If Γ is finite, let k be the maximum of 3 and the\narities of the relations in Γ and replace Γ by Γk, the set of all relations in ΓA of arity k or\nless. Establishing relational width k for this enlarged Γ will, of course, be a stronger result.\nIf Γ is not finite, replace it by ΓA and set k = |A|2. We will show that in either case, Γ has\nrelational width k.\n\n18\nE. KISS AND M. VALERIOTE\nFrom statements (5) or (6) of Proposition 2.23 it will suffice to show that if P is a\nk-minimal instance of CSP(Γ) whose constraint relations are all non-empty then P has a\nsolution. We may express P in the form (A, C) where A = (A, A, . . . , A) is a sequence of\nlength n, for some n > 0, and where C is a set of constraints of the form C = (S, R), for\nsome non-empty subset S of {1, 2, . . . , n} and some non-empty subuniverse R of A|S|.\nIn order to apply the results from the previous section as seamlessly as possible, we\nenlarge our language Γ to a closely related, but larger, multi-sorted language. Let H be the\nset of all quotients of subalgebras of A. Note that H is finite and all algebras in it have\nsize at most |A|. If Γ = Γk, replace it with the set of all subuniverses of l-fold products of\nalgebras from H, for all 1 ≤l ≤k, and otherwise, replace it by the set of all subuniverses of\nfinite products of algebras from H. In both cases, we have extended our original constraint\nlanguage. P can now be viewed as a k-minimal instance of CSP(Γ), the class of multi-\nsorted CSPs whose instances have domains from H and whose constraint relations are from\nΓ.\nWe now prove that every k-minimal instance of CSP(Γ) whose constraint relations are\nnon-empty has a solution. If this is not so, let Q be a counter-example such that the sum\nof the sizes of the domains of Q is as small as possible. Note that independent of this size,\nno domain of Q is bigger than |A| since they all come from H. Also note that Q must be\nsubdirect.\nFrom Theorem 3.18 it follows that all of the domains of Q are J ́onsson trivial. Then,\nfrom Lemma 3.20 we can deduce that all of the domains of Q are simple. If not, then\neither there is a proper quotient of Q that is k-minimal and that does not have a solution,\nor the k-minimal instance produced by the lemma cannot have a solution. In either case,\nwe contradict the minimality of Q. Thus Q is a subdirect, k-minimal instance of CSP(Γ)\nwhose domains are all simple and J ́onsson trivial and whose constraint relations are all non-\nempty. From Theorem 3.13 we conclude that in fact Q has a solution. This contradiction\ncompletes the proof of the theorem.\n5. Conclusion\nThe main result of this paper establishes that for certain constraint languages Γ that\narise from finite algebras that generate congruence distributive varieties, the problem class\nCSP(Γ) is tractable. This class of constraint languages includes those that are compatible\nwith a majority operation but also includes some languages that were not previously known\nto be tractable.\nWe feel that the proof techniques employed in this paper may be useful in extending\nour results to include all constraint languages that arise from finite algebras that generate\ncongruence distributive varieties and perhaps beyond.\nProblem 1: Extend the algebraic tools developed to handle algebras in CD(3) to algebras\nin CD(n) for any n > 3. In particular, generalize the notion of a J ́onsson ideal to this wider\nsetting.\nWe note that in [19] some initial success at extending the notion of a J ́onsson ideal has\nbeen obtained.\nThe bound on relational width established for the languages addressed in this paper\nseems to depend on the size of the underlying domain of the language. Nevertheless, we are\n\nON TRACTABILITY AND CONGRUENCE DISTRIBUTIVITY ∗\n19\nnot aware of any constraint language that has finite relational width that is not of relational\nwidth 3.\nProblem 2: For each n > 3, produce a constraint language Γn that has relational width n\nand not n−1. As a strengthening of this problem, find Γn that in addition have compatible\nnear unanimity operations.\n6. Acknowledgments\nThe first author acknowledges the support of the Hungarian National Foundation for\nScientific Research (OTKA), grants no. T043671 and T043034, while the second, the sup-\nport of the Natural Sciences and Engineering Research Council of Canada.\nSupport of\nthe Isaac Newton Institute for Mathematical Sciences and the organizers of the Logic and\nAlgorithms programme is also gratefully acknowledged.\nReferences\n[1] Andrei Bulatov. Tractable conservative constraint satisfaction problems. In Phokion G. Kolaitis, editor,\nProceedings of the Eighteenth Annual IEEE Symp. on Logic in Computer Science, LICS 2003, pages\n321–330. IEEE Computer Society Press, June 2003.\n[2] Andrei Bulatov. A graph of a relational structure and constraint satisfaction problems. In Proceedings\nof the 19th Annual IEEE Symposium on Logic in Computer Science, 2004, pages 448–457. IEEE, 2004.\n[3] Andrei Bulatov. Combinatorial problems raised from 2-semilattices. Journal of Algebra, 298(2):321–339,\n2006.\n[4] Andrei Bulatov and Peter Jeavons. Algebraic structures in combinatorial problems. submitted for pub-\nlication.\n[5] Andrei Bulatov, Peter Jeavons, and Andrei Krokhin. Classifying the complexity of constraints using\nfinite algebras. SIAM J. Comput., 34(3):720–742 (electronic), 2005.\n[6] Andrei A. Bulatov. A dichotomy theorem for constraint satisfaction problems on a 3-element set. J.\nACM, 53(1):66–120, 2006.\n[7] Stanley Burris and H. P. Sankappanavar. A course in universal algebra, volume 78 of Graduate Texts\nin Mathematics. Springer-Verlag, New York, 1981.\n[8] Matthias Clasen and Matthew Valeriote. Tame congruence theory. In Lectures on algebraic model theory,\nvolume 15 of Fields Inst. Monogr., pages 67–111. Amer. Math. Soc., Providence, RI, 2002.\n[9] Victor Dalmau. Generalized majority-minority operations are tractable. In Prakash Panangaden, editor,\nProceedings of the Twentieth Annual IEEE Symp. on Logic in Computer Science, LICS 2005, pages\n438–447. IEEE Computer Society Press, June 2005.\n[10] Tom ́as Feder and Moshe Y. Vardi. Monotone monadic snp and constraint satisfaction. In STOC ’93:\nProceedings of the twenty-fifth annual ACM symposium on Theory of computing, pages 612–622, New\nYork, NY, USA, 1993. ACM Press.\n[11] Tom ́as Feder and Moshe Y. Vardi. The computational structure of monotone monadic SNP and con-\nstraint satisfaction: a study through Datalog and group theory. SIAM J. Comput., 28(1):57–104 (elec-\ntronic), 1999.\n[12] David Hobby and Ralph McKenzie. The structure of finite algebras, volume 76 of Contemporary Math-\nematics. American Mathematical Society, Providence, RI, 1988. Revised edition: 1996.\n[13] Peter Jeavons. On the algebraic structure of combinatorial problems. Theoret. Comput. Sci., 200(1-\n2):185–204, 1998.\n[14] Peter Jeavons, David Cohen, and Martin C. Cooper. Constraints, consistency and closure. Artificial\nIntelligence, 101(1-2):251–265, 1998.\n[15] Benoit Larose. Some notes on bounded widths. unpublished, 2004.\n[16] Benoit Larose and L ́aszl ́o Z ́adori. Bounded width problems and algebras. Accepted by Algebra Univer-\nsalis, 2006.\n\n20\nE. KISS AND M. VALERIOTE\n[17] R. McKenzie, G. McNulty, and W. Taylor. Algebras, Lattices, Varieties Volume 1. Wadsworth and\nBrooks/Cole, Monterey, California, 1987.\n[18] Thomas J. Schaefer. The complexity of satisfiability problems. In Conference Record of the Tenth Annual\nACM Symposium on Theory of Computing (San Diego, Calif., 1978), pages 216–226. ACM, New York,\n1978.\n[19] Matthew Valeriote. A subalgebra intersection property for congruence distributive varieties. Canadian\nJournal of Mathematics, accepted for publication, 2006.\nThis work is licensed under the Creative Commons Attribution-NoDerivs License. To view\na copy of this license, visit http://creativecommons.org/licenses/by-nd/2.0/ or send a\nletter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.","paragraphs":[{"paragraph_id":"p1","order":1,"text":"Logical Methods in Computer Science\nVol. 3 (2:6) 2007, pp. 1–1–20\nwww.lmcs-online.org\nSubmitted\nOct. 18, 2006\nPublished\nJun.\n8, 2007\nON TRACTABILITY AND CONGRUENCE DISTRIBUTIVITY ∗\nEMIL KISS a AND MATTHEW VALERIOTE b\na Department of Algebra and Number Theory, E ̈otv ̈os University, 1117 Budapest, P ́azm ́any P ́eter\ns ́et ́any 1/c, Hungary\ne-mail address: ewkiss@cs.elte.hu\nb Department of Mathematics and Statistics, McMaster University, Hamilton, Ontario, L8S 4K1,\nCanada\ne-mail address: matt@math.mcmaster.ca\nAbstract. Constraint languages that arise from finite algebras have recently been an\nobject of study, especially in connection with the Dichotomy Conjecture of Feder and\nVardi.\nAn important class of algebras are those that generate congruence distributive\nvarieties and included among this class are lattices, and more generally, those algebras that\nhave near-unanimity term operations. An algebra will generate a congruence distributive\nvariety if and only if it has a sequence of ternary term operations, called J ́onsson terms,\nthat satisfy certain equations.\nWe prove that constraint languages consisting of relations that are invariant under\na short sequence of J ́onsson terms are tractable by showing that such languages have\nbounded relational width.\n1. Introduction\nThe Constraint Satisfaction Problem (CSP) provides a framework for expressing a wide\nclass of combinatorial problems. Given an instance of the CSP, the aim is to determine if\nthere is a way to assign values from a fixed domain to the variables of the instance so\nthat each of its constraints is satisfied. While the entire collection of CSPs forms an NP-\ncomplete class of problems, a number of subclasses have been shown to be tractable (i.e., to\nlie in P). A major focus of research in this area is to determine the subclasses of the CSP\nthat are tractable.\nOne way to define a subclass of the CSP is to restrict the constraint relations that occur\nin an instance to a given finite set of relations over a fixed, finite domain, called a constraint\nlanguage. A central problem is to classify the constraint languages that give rise to tractable\nsubclasses of the CSP. Currently, all constraint languages that have been investigated have\nbeen shown to give rise to a subclass of the CSP that is either NP-complete or in P. It is\n2000 ACM Subject Classification: F.1.3, F.4.1.\nKey words and phrases: constraint satisfaction problem, tractability, universal algebra, congruence\ndistributivity.\n∗An extended abstract of this paper has appeared in the Proceedings of the Twenty-First Annual IEEE\nSymposium on Logic in Computer Science.\nLOGICAL METHODS\nl IN COMPUTER SCIENCE\nDOI:10.2168/LMCS-3 (2:6) 2007\nc\n⃝\nE. Kiss and M. Valeriote\nCC\n⃝\nCreative Commons"},{"paragraph_id":"p2","order":2,"text":"2\nE. KISS AND M. VALERIOTE\nconjectured in [10] that this dichotomy holds for all subclasses arising from finite constraint\nlanguages.\nIn some special cases, the conjectured dichotomy has been verified. For example, the\nwork of Schaefer [18] and of Bulatov [6] establish this over domains of sizes 2 and 3 respec-\ntively. For constraint languages over larger domains a number of significant results have\nbeen obtained [5, 1, 9].\nOne method for establishing that the subclass of the CSP associated with a finite\nconstraint language is tractable is to establish a type of local consistency property for\nthe instances in the subclass.\nIn [11] Feder and Vardi introduce a notion of the width\nof a constraint language and show that languages of bounded width give rise to tractable\nsubclasses of the CSP. There is a natural connection between these subclasses of the CSP\nand definability within Datalog.\nIn work by Jeavons and his co-authors an approach to classifying the tractable con-\nstraint languages via algebraic methods has been proposed and applied with great success\n[5]. In essence, their work allows one to associate a finite algebraic structure to each con-\nstraint language and then to analyze the complexity of the corresponding subclass of the\nCSP in purely algebraic terms.\nIn this paper, we employ the algebraic approach to analyzing constraint languages\nand with it are able to identify a new, general class of tractable constraint languages.\nThese languages arise from finite algebras that generate congruence distributive varieties,\nor equivalently, that have a sequence of special term operations, called J ́onsson terms, that\nsatisfy certain equations. Theorem 4.1 establishes the tractability of these languages by\nshowing that they are of bounded width. Related to our result is the theorem of Jeavons,\nCohen, and Cooper in [14] that establishes the tractability of constraint languages that arise\nfrom another class of finite algebras that generate congruence distributive varieties. These\nalgebras are equipped with a special term operation called a near unanimity operation.\nDalmau [9] provides an alternate proof of their result.\n2. Preliminaries\nIn this section we introduce the necessary terminology and results on the CSP and from\nuniversal algebra that will be needed to prove the main result (Theorem 4.1) of this paper.\nIn the following discussion we will employ standard terminology and notation when\ndealing with n-tuples and relations over sets. In particular, if ⃗a is a tuple over the sequence\nof domains Ai, 1 ≤i ≤n, (i.e., is a member of Q\n1≤i≤n Ai) and I is a subset of {1, 2, . . . , n}\nthen projI(⃗a) denotes the tuple (ai : i ∈I) ∈Q\ni∈I Ai over the sequence of domains\n(Ai : i ∈I) and is called the restriction (or the projection) of ⃗a to I. We extend this\nprojection function to arbitrary relations over the Ai. The ith element of the tuple ⃗a will\nbe denoted by ⃗a(i).\nFor R and S binary relations on a set A, we define the relational product of R and S,\ndenoted R ◦S, to be the binary relation consisting of all pairs (a, b) for which there is some\nc with (a, c) ∈R and (c, b) ∈S.\n2.1. The Constraint Satisfaction Problem.\nDefinition 2.1. An instance of the constraint satisfaction problem is a triple P = (V, A, C)\nwith"},{"paragraph_id":"p3","order":3,"text":"ON TRACTABILITY AND CONGRUENCE DISTRIBUTIVITY ∗\n3\n• V a non-empty, finite set of variables,\n• A a non-empty, finite set (or domain),\n• C a set of constraints {C1, . . . , Cq} where each Ci is a pair (⃗si, Ri) with\n– ⃗si a tuple of variables of length mi, called the scope of Ci, and\n– Ri an mi-ary relation over A, called the constraint relation of Ci.\nGiven an instance P of the CSP we wish to answer the following question:\nIs there a solution to P, i.e., is there a function f : V →A such that for\neach i ≤q, the mi-tuple f(⃗si) ∈Ri?\nWe say that two instances of the CSP having the same set of variables and the same\ndomain are equivalent if they have the same set of solutions.\nIn general, the class of CSPs is NP-complete (see [14]), but by restricting the nature of\nthe constraint relations that are allowed to appear in an instance of the CSP, it is possible\nto find natural subclasses of the CSP that are tractable.\nDefinition 2.2. Let A be a domain and Γ a set of finitary relations over A. CSP(Γ) denotes\nthe collection of all instances of the CSP with domain A and with constraint relations coming\nfrom Γ. Γ is called the constraint language of the class CSP(Γ).\nDefinition 2.3. Call a finite constraint language Γ tractable if the class of problems CSP(Γ)\nis tractable (i.e., lies in P). If Γ is infinite and each finite subset Γ′ of Γ is tractable then\nwe say that Γ is tractable. If the entire class CSP(Γ) is in P then we say that Γ is globally\ntractable.\nΓ is said to be NP-complete if for some finite subset Γ′ of Γ, the class of problems\nCSP(Γ′) is NP-complete.\nA key problem in this area is to classify the (globally) tractable constraint languages.\nNote that in this paper we will assume that P ̸= NP. Feder and Vardi [11] conjecture that\nevery finite constraint language is either tractable or is NP-complete.\nWe will find it convenient to extend the above notions of instances of the CSP and\nconstraint languages to a multi-sorted setting. This approach has been used on a number\nof occasions, in particular in [3].\nDefinition 2.4. A multi-sorted instance of the constraint satisfaction problem is a pair\nP = (A, C) where\n• A = (A1, A2, . . . , An) is a sequence of finite, non-empty sets, called the domains of\nP, and\n• C is a set of constraints {C1, . . . , Cq} where each Ci is a pair (Si, Ri) with\n– Si a non-empty subset of {1, 2, . . . , n} called the scope of Ci, and\n– Ri an |Si|-ary relation over (Aj : j ∈Si), called the constraint relation of Ci.\nIn this case, a solution to P is an n-tuple ⃗a over the sequence (Ai : 1 ≤i ≤n) such\nthat projSj(⃗a) ∈Rj for each 1 ≤j ≤q. Clearly, each standard instance of the CSP can\nbe expressed as an equivalent multi-sorted instance. While the given definition of a multi-\nsorted instance of the CSP does not allow for the repetition of variables within the scope\nof any constraint, there is a natural extension of Definition 2.1 that allows this. Note that\nthere is a very straightforward procedure to transform such an instance to an equivalent\none that conforms to Definition 2.4."},{"paragraph_id":"p4","order":4,"text":"4\nE. KISS AND M. VALERIOTE\nDefinition 2.5. A relation R over the sets Ai, 1 ≤i ≤n, is subdirect if for all 1 ≤i ≤n,\nproj{i}(R) = Ai. We call a multi-sorted instance P of the CSP subdirect if each of its\nconstraint relations is.\nIn addition to the set of solutions of an instance of the CSP, one can also consider\npartial solutions of the instance.\nDefinition 2.6. For P as in Definition 2.4 and I a subset of {1, 2, . . . , n}, the set of partial\nsolutions of P over I, denoted PI, is the set of solutions of the instance P ′ = (A′, C′) where\nA′ = (Ai : i ∈I) and C = {C′\n1, . . . , C′\nq} with C′\nj = (I ∩Sj, proj(I∩Sj)(Rj)) for 1 ≤j ≤q.\nClearly if the set of partial solutions of an instance over some subset of coordinates is\nempty then the instance has no solutions.\nDefinition 2.7. Let C be a finite set (or sequence) of finite, non-empty sets. A (multi-\nsorted) constraint language over C is a collection of finitary relations over the sets in C.\nGiven a multi-sorted constraint language Γ over C, the class CSP(Γ) consists of all multi-\nsorted instances of the CSP whose domains come from C and whose constraint relations\ncome from Γ. ΓC denotes the set of all finitary relations over the members of C.\nIn a natural way, the notions of tractability and NP-completeness can be extended to\nmulti-sorted constraint languages.\n2.2. Algebras. There are a number of standard sources for the basics of universal algebra,\nfor example [7] and [17]. The books [12, 8] provide details on the more specialized aspects\nof the subject that we will use in this paper.\nDefinition 2.8. An algebra A is a pair (A, F) where A is a non-empty set and F is a\n(possibly infinite) collection of finitary operations on A. The operations in F are called the\nbasic operations of A. A term operation of an algebra A is a finitary operation on A that\ncan be obtained by repeated compositions of the basic operations of A.\nWe assume some familiarity with the standard algebraic operations of taking subalge-\nbras, homomorphic images and cartesian products. Note that in order to sensibly take a\nhomomorphic image of an algebra, or the cartesian product of a set of algebras or to speak\nof terms and equations of an algebra we need to have some indexing of the basic operations\nof the algebras. Algebras that have the same indexing are said to be similar (or of the same\nsimilarity type).\nWhen necessary, we distinguish between an algebra and its underlying set, or universe.\nA subuniverse of an algebra (A, F) is a subset of A that is invariant under F. Note that we\nallow empty subuniverses but not algebras with empty universes.\nDefinition 2.9. A variety of algebras is a collection of similar algebras that is closed under\nthe taking of cartesian products, subalgebras and homomorphic images. If K is a class of\nsimilar algebras then V(K) denotes the smallest variety that contains K.\nTheorem 2.10 (Birkhoff). A class V of similar algebras is a variety if and only if V can\nbe axiomatized by a set of equations.\nIt turns out that for a class K of similar algebras, V(K) = HSP(K), i.e., the class of\nhomomorphic images of subalgebras of cartesian products of members of K.\nDefinition 2.11. Let A be an algebra."},{"paragraph_id":"p5","order":5,"text":"ON TRACTABILITY AND CONGRUENCE DISTRIBUTIVITY ∗\n5\n(1) An equivalence relation θ on A is a congruence of A if it is invariant under the\nbasic operations of A.\n(2) The congruence lattice of A, denoted Con (A), is the lattice of all congruences of\nA, ordered by inclusion.\n(3) 0A denotes the congruence relation {(a, a) : a ∈A} and 1A denotes the congruence\nrelation {(a, b) : a, b ∈A}, the smallest and largest congruences of the algebra A,\nrespectively.\n(4) An algebra A is simple if 0A and 1A are its only congruences.\nThe congruence lattice of an algebra is a very useful invariant and the types of con-\ngruence lattices that can appear in a variety govern many properties of the algebras in the\nvariety. One particularly relevant and important property of congruence lattices is that of\ndistributivity.\nDefinition 2.12. An algebra A is said to be congruence distributive if its congruence lattice\nsatisfies the distributive law for congruence meet and join. A class of algebras is congruence\ndistributive if all of its members are.\nDefinition 2.13. For k > 0, we define CD(k) to be the class of all algebras A that have a\nsequence of ternary term operations pi(x, y, z), 0 ≤i ≤k, that satisfies the identities:\np0(x, y, z)\n=\nx\npk(x, y, z)\n=\nz\npi(x, y, x)\n=\nx for all i\npi(x, x, y)\n=\npi+1(x, x, y) for all i even\npi(x, y, y)\n=\npi+1(x, y, y) for all i odd\nA sequence of term operations of an algebra A that satisfies the above equations will\nbe referred to as J ́onsson terms of A. The following celebrated theorem of J ́onsson relates\ncongruence distributivity to the existence of J ́onsson terms.\nTheorem 2.14 (J ́onsson). An algebra A generates a congruence distributive variety if and\nonly if there is some k > 0 such that A is in CD(k). In this case, all algebras in V(A) lie\nin CD(k).\nDefinition 2.15. For k > 1, define Vk to be the variety of all algebras that have as basic\noperations a sequence of k + 1 ternary operations pi(x, y, z), for 0 ≤i ≤k, that satisfy the\nequations from Definition 2.13.\nNote that an algebra is in CD(1) if and only if it has size 1 and is in CD(2) if and\nonly if it has a majority term operation (i.e., a term operation m(x, y, z) that satisfies the\nequations m(x, x, y) = m(x, y, x) = m(y, x, x) = x).\nSome of the main results and conjectures dealing with the CSP can be expressed in\nterms of Tame Congruence Theory, a deep theory of the local structure of finite algebras\ndeveloped by Hobby and McKenzie. Details of this theory may be found in [12] or [8]. The\nconnection between the CSP and Tame Congruence Theory was made by Bulatov, Jeavons,\nand Krokhin [5] and we will touch on it in the next subsection. In this paper we will only\nintroduce some of the basic terminology of the theory and will omit most details.\nIn Tame Congruence Theory, five local types of behaviour of finite algebras are identified\nand studied. The five types are, in order:"},{"paragraph_id":"p6","order":6,"text":"6\nE. KISS AND M. VALERIOTE\n(1) the unary type,\n(2) the affine or vector-space type,\n(3) the 2 element Boolean type,\n(4) the 2 element lattice type,\n(5) the 2 element semi-lattice type.\nWe say that an algebra A omits a particular type if, locally, the corresponding type of\nbehaviour does not occur in A. A class of algebras C is said to omit a particular type if all\nfinite members of C omit that type.\nIn [12], chapter 9, characterizations of finite algebras that generate varieties that omit\nthe unary type or both the unary and affine type are given. The characterizations are similar\nto that given by J ́onsson of the congruence distributive varieties. It easily follows from the\ncharacterizations that if A is a finite algebra that generates a congruence distributive variety\nthen the variety omits both the unary and affine types.\nTo close this subsection we note a special property of the term operations of the algebras\nin Vk for all k > 1.\nDefinition 2.16. An n-ary operation f(x1, . . . , xn) on a set A is idempotent if for all a ∈A,\nf(a, a, . . . , a) = a . An algebra is idempotent if all of its term operations are idempotent.\nNote that idempotency is hereditary in the sense that if a function is the composition of\nsome idempotent operations then it too is idempotent. In another sense, if A is idempotent\nthen all algebras in V(A) are idempotent, since this condition can be described equationally.\nFinally, note that J ́onsson terms are idempotent and so all algebras in Vk for k > 1 are\nidempotent.\n2.3. Algebras and the CSP. The natural duality between sets of relations (constraint\nlanguages) over a set A and sets of operations (algebras) on A has been studied by algebraists\nfor some time. Jeavons and his co-authors [13] have shown how this link between constraint\nlanguages and algebras can be used to transfer questions about tractability into equivalent\nquestions about algebras. In this subsection we present a concise overview of this connection.\nDefinition 2.17. Let A be a non-empty set.\n(1) Let R be an n-ary relation over A and f( ̄x) an m-ary function over A for some n,\nm ≥0. We say that R is invariant under f and that f is a polymorphism of R if\nfor all ⃗ai ∈R, for 1 ≤i ≤m, the n-tuple f(⃗a1, . . . ,⃗am), whose i-th coordinate is\nequal to f(⃗a1(i), . . . ,⃗am(i)), belongs to R.\n(2) For Γ a set of relations over A, Pol (Γ) denotes the set of functions on A that are\npolymorphisms of all the relations in Γ.\n(3) For F a set of finitary operations on A, Inv(F) denotes the set of all finitary relations\non A that are invariant under all operations in F.\n(4) For Γ a constraint language over A, ⟨Γ⟩denotes Inv(Pol (Γ)) and AΓ denotes the\nalgebra (A, Pol (Γ)).\n(5) For A = (A, F), an algebra over A, ΓA denotes the constraint language Inv(F).\n(6) We call a finite algebra A tractable (NP-complete) if the constraint language ΓA\nis.\nNote that if A is an algebra, then Inv(A) coincides with the set of all subuniverses of\nfinite cartesian powers of A. Sets of relations of the form Inv(Γ) for a set of relations Γ\nare known as relational clones. Equivalently, a set of relations Λ over a finite set A is a"},{"paragraph_id":"p7","order":7,"text":"ON TRACTABILITY AND CONGRUENCE DISTRIBUTIVITY ∗\n7\nrelational clone if and only if it is closed under definition by primitive positive formulas (or\nconjunctive queries).\nTheorem 2.18. ([13]) Let Γ be a constraint language on a finite set. If Γ is tractable then\nso is ⟨Γ⟩. If ⟨Γ⟩is NP-complete then so is Γ.\nIn algebraic terms, Theorem 2.18 states that a constraint language Γ is tractable (or\nNP-complete) if and only if the algebra AΓ is.\nSo, the problem of characterizing the\ntractable constraint languages can be reduced to the problem of characterizing the tractable\nfinite algebras. In a further step, Bulatov, Jeavons and Krokhin [5] provide a reduction down\nto idempotent algebras. For this class of algebras, they propose the following characteriza-\ntion of tractability.\nConjecture 2.19. Let A be a finite idempotent algebra. Then A is tractable if and only\nif the variety V(A) omits the unary type.\nThey show that when this condition fails, the algebra is NP-complete [5]. They also\nshow that if A is a finite, idempotent algebra then V(A) omits the unary type if and only\nif the class HS(A) does. This conjecture has been verified for a number of large classes of\nalgebras. For example, results of Schaefer [18] and Bulatov [6] provide a verification for\nalgebras whose universes have size 2 and 3 respectively.\nAs noted in the introduction, one approach to proving the tractability of a constraint\nlanguage Γ is to apply a notion of local consistency to the instances in CSP(Γ) to determine\nif the instances have solutions.\nWe present a notion of width, called relational width,\ndeveloped by Bulatov and Jeavons [4] that, for finite constraint languages, is closely related\nto the notion of width defined by Feder and Vardi (see [15, 16]). In this paper we will closely\nfollow the presentation of relational width found in [3].\nDefinition 2.20. Let A = (A1, . . . , An) be a sequence of finite, non-empty sets, let P =\n(A, C) be an instance of the CSP and let k > 0. We say that P is k-minimal if:\n(1) For each subset I of {1, 2, . . . , n} of size at most k, there is some constraint (S, R)\nin C such that I ⊆S, and\n(2) If (S1, R1) and (S2, R2) are constraints in C and I ⊆S1 ∩S2 has size at most k then\nprojI(R1) = projI(R2).\nIt is not hard to show that the second condition of this definition is equivalent to having\nthe set of partial solutions PI of P equal to projI(Ri) for all subsets I of size at most k and\nall i with I ⊆Si.\nProposition 2.21. Let Γ be a constraint language and k > 0. There is a polynomial time\nalgorithm (the k-minimality algorithm) that converts a given instance P from CSP(Γ) into\nan equivalent k-minimal instance P ′ from CSP(⟨Γ⟩). In fact, if the arities of the constraint\nrelations of P are bounded by an integer m ≥k then the arities of the constraint relations\nof P ′ are also bounded by m.\nProof. See the discussion in Section 3.1 of [3].\nDefinition 2.22. Let Γ be a constraint language and k > 0. We say that Γ has relational\nwidth k if for every instance P from CSP(Γ), P has a solution if and only if the constraint\nrelations of P ′, the equivalent k-minimal instance produced by the k-minimality algorithm,\nare all non-empty."},{"paragraph_id":"p8","order":8,"text":"8\nE. KISS AND M. VALERIOTE\nProposition 2.23. Let Γ be a constraint language and k > 0.\n(1) If an instance P of the CSP has a solution then the constraint relations of all\nequivalent instances are non-empty.\n(2) If Γ has relational width k and ∆⊆Γ then ∆also has relational width k.\n(3) If Γ has relational width k then every k-minimal instance P from CSP(Γ) whose\nconstraint relations are non-empty has a solution.\n(4) If Γ is of finite relational width then it is globally tractable.\n(5) If every k-minimal instance from CSP(⟨Γ⟩) whose constraint relations are non-\nempty has a solution then Γ has relational width k and hence is globally tractable.\n(6) If Γ is finite and m ≥k is an upper bound on the arities of the relations in Γ then Γ\nhas relational width k if every k-minimal instance from CSP(⟨Γ⟩) whose constraint\nrelations are non-empty and have arity ≤m has a solution.\nProof. Statement (4) follows from Proposition 2.21, since if Γ has relational width k and\nP is an instance from CSP(Γ) then in order to determine if P has a solution, it suffices to\ntest if P ′, the equivalent k-minimal instance produced by the k-minimality algorithm, has\nnon-empty constraint relations. Statements (5) and (6) also follows from Proposition 2.21\nsince the constraint relations of P ′ belong to ⟨Γ⟩and their arities are no bigger than the\nmaximum of k and the arities of the constraint relations of P.\nIn the case where Γ happens to be a relational clone (i.e., Γ = ⟨Γ⟩) it follows from\nstatements (3) and (5) of the previous proposition that Γ has relational width k if and only\nif every k-minimal instance of CSP(Γ) whose constraint relations are all non-empty has a\nsolution. For the most part, we are interested in this type of constraint language in this\npaper.\nWe note that in [15, 16] it is shown that a finite constraint language has bounded\nrelational width if and only if it has bounded width in the sense of Feder-Vardi.\nThe\nfollowing conjecture is similar to Conjecture 2.19 and was proposed by Larose and Z ́adori\n[16] for constraint languages of bounded width.\nConjecture 2.24. Let A be a finite idempotent algebra. Then A is of bounded width if\nand only if V(A) omits the unary and affine types.\nIn [16] Larose and Z ́adori verify one direction of this conjecture, namely that if V(A)\nfails to omit the unary or affine types then A is not of bounded width. Note that in [2],\nBulatov proposes a conjecture that is parallel to 2.24. Larose and the second author have\nnoted that, as with the unary type, one need only check in HS(A) to determine if V(A)\nomits the unary and affine types when A is finite and idempotent (see Corollary 3.2 of [19]\nfor a more general version of this).\nThe main result of this paper can be regarded as providing some evidence in support of\nConjecture 2.24. Theorem 4.1 establishes that if A is a finite member of CD(3) then any\nfinite constraint language contained in ΓA is of bounded width and hence tractable.\n3. Algebras in CD(3)\nRecall that the variety V3 consists of all algebras A having four basic operations\npi(x, y, z), 0 ≤i ≤3 that satisfy the equations of Definition 2.13. Since the equations\ndictate that p0 and p3 are projections onto x and z respectively, they will play no role in\nthe analysis of algebras in CD(3)."},{"paragraph_id":"p9","order":9,"text":"ON TRACTABILITY AND CONGRUENCE DISTRIBUTIVITY ∗\n9\n3.1. J ́onsson ideals. For A an algebra in V3, define x · y to be the binary term operation\np1(x, y, y) of A. Note that the J ́onsson equations imply that x · y = p2(x, y, y) as well. This\n“multiplication” will play a crucial role in the proof of the main theorem of this paper.\nDefinition 3.1. For X a subset of an algebra B ∈V3 let J(X) be the smallest subuniverse\nY of B containing X and satisfying the following closure property: if x is in Y and u ∈B\nthen u · x is also in Y .\nWe will call J(X) the J ́onsson ideal of B generated by X. The concept of a J ́onsson\nideal was developed in [19] for any algebra that generates a congruence distributive variety\nand was used in that paper to establish some intersection properties of subalgebras that are\nrelated to relational width.\nDefinition 3.2. A finite algebra B ∈V3 will be called J ́onsson trivial if it has no proper\nnon-empty J ́onsson ideals.\nNote that B is J ́onsson trivial if and only if J({b}) = B for all b ∈B. Also note that\nif B is J ́onsson trivial then every homomorphic image of it is, as well.\nWe now define a notion of distance in an algebra that will be applied to J ́onsson trivial\nalgebras to establish some useful features of the subalgebras of their cartesian products.\nDefinition 3.3. Let A and B be arbitrary similar algebras and S a subdirect subalgebra of\nA × B.\n(1) Let S0 = 0A and S1 be the relation on A defined by:\n(a, c) ∈S1 ⇐⇒(a, b), (c, b) ∈S for some b ∈B.\n(2) For k > 0, let Sk+1 = Sk ◦S1.\n(3) For a, b ∈A, we write d(a, b) = k if the pair (a, b) is in Sk and not in Sk−1 and will\nsay that the distance between a and b relative to S is k. If no such k exists, d(a, b)\nis said to be undefined.\n(4) If d(a, b) is defined for all a and b ∈A we say that A is connected with respect to S.\nProposition 3.4. Let A, B and S be as in the definition.\n(1) For each k ≥0, the relation Sk is a reflexive, symmetric subuniverse of A2.\n(2) If A is an idempotent algebra and c ∈A then for any k ≥0, the set of all elements\na with d(a, c) ≤k is a subuniverse of A.\n(3) If A is a simple algebra then either d(a, b) is undefined for all a ̸= b ∈A (equivalently\nS1 = 0A) or A is connected with respect to S.\nProof. The symmetry of S1 is immediate from its definition and its reflexivity follows from S\nbeing subdirect. To see that it is a subuniverse of A2, let t(x1, . . . , xn) be a term operation of\nA and (ai, bi) ∈S1 for 1 ≤i ≤n. Then for all i there are ci ∈B with (ai, ci) and (bi, ci) ∈S.\nApplying t to these pairs shows that (t( ̄a), t( ̄c)) and (t( ̄b), t( ̄c)) ∈S and so (t( ̄a), t( ̄b)) ∈S1.\nThis establishes that S1 is a subuniverse of A2. Since the relational product operation\npreserves the properties of symmetry, reflexivity and being a subuniverse, it follows that Sk\nhas all three properties, for k ≥0.\nSuppose that A is idempotent, c ∈A, and k ≥0. If t(x1, . . . , xn) is a term operation\nof A and ai ∈A with d(ai, c) ≤k, for 1 ≤i ≤n, then (ai, c) ∈Sk for all i. By the\nfirst claim of this proposition, it follows that (t(a1, . . . , an), t(c, . . . , c)) ∈Sk since Sk is a\nsubuniverse of A2. By idempotency we have t(c, . . . , c) = c and so (t(a1, . . . , an), c) ∈Sk,\nor d(t(a1, . . . , an), c) ≤k. This establishes the second claim of the proposition."},{"paragraph_id":"p10","order":10,"text":"10\nE. KISS AND M. VALERIOTE\nFor the last claim, note that since S1 is a symmetric, reflexive subuniverse of A2 then\nits transitive closure is a congruence on A that is equal to the union of the Sk, k ≥0. Since\nA is assumed to be simple then this congruence is either 0A or 1A. In the former case we\nconclude that d(a, b) is undefined for all a ̸= b ∈A and in the latter case that for all a,\nb ∈A, (a, b) ∈Sk for some k ≥0 and so d(a, b) is defined.\nLemma 3.5. Let A and B be finite algebras in V3 and S a subdirect subalgebra of A × B.\nSuppose that A is connected with respect to S. Then for every x, y, z ∈A we have\nd(x · y, z) ≤max\n d(x, y) + 1\n2"},{"paragraph_id":"p11","order":11,"text":", d(y, z)"},{"paragraph_id":"p12","order":12,"text":".\nProof. Let d(y, z) = m, d(x, y) = n and choose elements ai ∈A for 0 ≤i ≤n with x = a0,\nan = y and (ai, ai+1) ∈S1 for 0 ≤i < n. For k the largest integer below [(n + 1)/2] we get\nthat d(x, ak) and d(ak, y) are both at most k. Therefore if d = max(k, m), then the pairs\n(x, ak), (y, ak), (y, z) are in Sd, and so\n(p2(x, y, y), p2(ak, ak, z)) ∈Sd .\nBut p2(x, y, y) = x · y and p2(ak, ak, z) = z, proving the lemma.\nCorollary 3.6. For A, B and S as in the previous lemma, suppose that d(a, b) ≤n for all\na, b ∈A. Let m ≥[(n + 1)/2] be any integer and c ∈A. Then the set of all elements of A\nwhose distance from c is at most m is a J ́onsson ideal of A.\nProof. As noted earlier the set I = {a ∈A : d(a, c) ≤m} is a subuniverse of A since A\nis idempotent. We need only show that I is closed under multiplication on the left. So,\nsuppose that a ∈I and u ∈A. Since d(u, c) ≤n, we have d(u · a, c) ≤max(m, d(a, c)) ≤m\nby the previous lemma.\nCorollary 3.7. Let A and B be finite members of V3 such that A is J ́onsson trivial and\nconnected with respect to some subdirect subalgebra S of A × B. Then d(a, b) ≤1 for all a,\nb ∈A (or equivalently, S1 = A2).\nProof. Suppose that the maximum distance n between the points of A is at least 2 and\nthat a, b ∈A with d(a, b) = n. Then m, the largest integer below [(n + 1)/2] is less than\nn. From the previous lemma, the set of all elements u ∈A with d(a, u) ≤m is a proper\nJ ́onsson ideal of A, contradicting that A is J ́onsson trivial.\nLemma 3.8. Let A, B be finite members of V3 with A J ́onsson trivial and simple and let\nS be a subdirect subalgebra of A × B. Then either S = A × B, or S is the graph of an onto\nhomomorphism from B to A.\nProof. As A is simple, then either S1 = 0A or A is connected with respect to S. In the\nformer case, we conclude that S is the graph of an onto homomorphism from B to A and\nin the latter, it follows from the previous corollary that S1 = A2.\nFor a ∈A, let Ba = {b ∈B : (a, b) ∈S} and choose a with |Ba| maximal. Let I denote\nthe set of those elements x of A for which Bx = Ba. To complete the proof we will need to\ndemonstrate that I = A and Ba = B. To show that I = A it will suffice to prove that it is\na J ́onsson ideal of A.\nIndeed, let u ∈A and c ∈I be arbitrary. Then (u, c) ∈S1 (since S1 = A2) and therefore\nthere is a b ∈B such that (u, b) and (c, b) are in S. Note that since c ∈I then b ∈Ba. If d\nis any element of Ba then c ∈I implies that (c, d) ∈S, so we get that\n(p2(u, c, c), p2(b, b, d)) = (u · c, d) ∈S."},{"paragraph_id":"p13","order":13,"text":"ON TRACTABILITY AND CONGRUENCE DISTRIBUTIVITY ∗\n11\nSince this holds for every d ∈Ba, we conclude that u · c ∈I. Finally, since S is subdirect\nit follows that Ba = B.\nWe apply this lemma to obtain a simple description of subdirect products of finite,\nsimple, J ́onsson trivial members of V3 and then show how to use this description to prove\nthat certain k-minimal instances of the CSP have solutions, when k ≥3.\nLemma 3.9. Let Ai, for 1 ≤i ≤n, be finite members of V3 with A1 J ́onsson trivial. Let\nS be a subdirect product of the Ai’s such that for all 1 < i ≤n, the projection of S onto\ncoordinates 1 and i is equal to A1 × Ai. Then S = A1 × D, where D = proj{2≤i≤n}(S).\nProof. We prove this by induction on n. For n = 2, the result follows by our hypotheses.\nConsider the case n = 3 and let D be the projection of S onto A2 × A3. Let (u, v) ∈D\nand let I(u,v) = {a ∈A1 : (a, u, v) ∈S}. Our goal is to show that I(u,v) = A1 and we\ncan accomplish this by showing that it is a non-empty J ́onsson ideal. Clearly I(u,v) is a\nnon-empty subuniverse of A1 since all algebras involved are idempotent.\nLet a ∈I(u,v), b ∈A1 and choose elements y ∈A3 and x ∈A2 with (b, u, y) and\n(a, x, y) ∈S. By our hypotheses, these elements exist. Applying p2 to these elements, along\nwith (a, u, v), we get the element (b · a, u, v), showing that b · a ∈I(u,v). Thus I(u,v) is a\nJ ́onsson ideal.\nNow, consider the general case and suppose that the result holds for products of fewer\nthan n factors. Let S1 = proj{1≤i<n}(S) and S2 = proj{2≤i<n}(S). Then S is isomorphic\nto a subdirect product of A1, S2 and An and, by induction, S1 = A1 × S2. Then, applying\nthe result with n = 3 to this situation, we conclude that S = A1 × D, as required.\nCorollary 3.10. Let Ai be finite, simple, J ́onsson trivial members of V3, for 1 ≤i ≤n,\nand let S be a subdirect product of the Ai’s. If, for all 1 ≤i < j ≤n, the projection of S\nonto Ai × Aj is not the graph of a bijection then S = Q\n1≤i≤n Ai.\nProof. For 1 ≤i < j ≤n, we have, by Lemma 3.8 that either the projection of S onto\nAi × Aj is the graph of a bijection between the two factors (since they are both simple) or\nis the full product. The former case is ruled out by assumption and so we are in a position\nto apply the previous lemma inductively to reach the desired conclusion.\nDefinition 3.11. A subdirect product S of the algebras Ai, 1 ≤i ≤n, is said to be almost\ntrivial if, after suitably rearranging the coordinates, there is a partition of {1, 2, . . . , n} into\nintervals Ij, 1 ≤j ≤p, such that S = projI1(S) × · · · × projIp(S) and, for each j, if\nIj = {i : u ≤i ≤v} then there are bijections πi : Au →Ai, for i ∈Ij such that\nprojIj(S) = {(a, πu+1(a), . . . , πv(a)) : a ∈Au}.\nCorollary 3.12. Let Ai be finite, simple, J ́onsson trivial members of V3, for 1 ≤i ≤n,\nand let S be a subdirect product of the Ai’s. Then S is almost trivial.\nProof. For 1 ≤i, j ≤n, set i ∼j if i = j or the projection of S onto Ai and Aj is equal to\nthe graph of a bijection between these two factors. In this case, let πi,j denote this bijection.\nIt is not hard to see that ∼is an equivalence relation on the set {1, 2, . . . , n} and, by\napplying Lemma 3.8, if i ̸∼j then the projection of S onto Ai and Aj is equal to Ai × Aj.\nBy using the bijections πi,j and Corollary 3.10 it is elementary to show that S is indeed\nalmost trivial."},{"paragraph_id":"p14","order":14,"text":"12\nE. KISS AND M. VALERIOTE\nFor A a finite sequence of finite algebras, P = (A, C) denotes a multi-sorted instance\nof the CSP whose domains are the universes of the algebras in A and whose constraint\nrelations are subuniverses of cartesian products of members from A.\nTheorem 3.13. Let A be a finite sequence of finite, simple, J ́onsson trivial members of V3\nand let P = (A, C) be a subdirect, k-minimal instance of the CSP for some k ≥3. If the\nconstraint relations of P are all non-empty then P has a solution.\nDefinition 3.11 and analogs of Corollary 3.12 and Theorem 3.13 can be found at the\nend of Section 3.3 in [3]. The proof of Corollary 3.4 given in that paper can be used to\nprove our Theorem 3.13. As we shall see, this theorem will form the base of the inductive\nproof of our main result.\n3.2. The reduction to J ́onsson trivial algebras. The goal of this subsection is to show\nhow to reduce a k-minimal instance P of the CSP whose domains all lie in V3 and whose\nconstraint relations are all non-empty to another k-minimal, subdirect instance P ′ whose\ndomains are all J ́onsson trivial and whose constraint relations are non-empty. In order to\naccomplish this, we will need to work with a suitably large k ≥3.\nTo start, let A = (A1, . . . , An) be a sequence of finite algebras from V3 and let M =\nmax{|Ai| : 1 ≤i ≤n}. Let k > 0 and P = (A, C) be a k-minimal instance of the CSP with\nC consisting of the constraints Ci = (Si, Ri), 1 ≤i ≤m. By taking suitable subalgebras\nof the Ai we may assume that P is subdirect and, of course, we also assume that the Ri\nare all non-empty. In addition, k-minimality assures that we may assume that the scope of\neach constraint of P consists of at least k variables and that no two constraints have the\nsame k-element set as their scopes.\nSince P is k-minimal then its system of partial solutions over k-element sets satisfies\nan important compatibility property. Namely, if I and K are k-element sets of coordinates\nthen proj(I∩K)(PI) = proj(I∩K)(PK). In this section we will denote PI by Λ(I) and call this\nfunction the k-system (of partial solutions) determined by P. Since P is subdirect then for\nall I, Λ(I) will be a subdirect product of the algebras Ai, for i ∈I.\nWe wish to consider the situation in which some Ai, say A1, has a proper J ́onsson ideal\nJ. The main result of this subsection is that if the scopes of the constraints of P all have\nsize at most k (and hence exactly k), or if k ≥M2 then we can reduce the question of the\nsolvability of P to the solvability of a k-minimal instance with A1 replaced by J. Doing\nso will allow us to proceed by induction to reduce our original instance down to one whose\ndomains are all J ́onsson trivial.\nSo, let J be a proper non-empty J ́onsson ideal of A1 and define ΛJ to be the following\nfunction on the set of k-element subsets of {1, 2, . . . , n}:\n• If I is a k-element set that includes 1 then define ΛJ(I) to be {⃗a ∈Λ(I) : ⃗a(1) ∈J}.\n• If 1 /∈I, define ΛJ(I) to be the set of all ⃗a ∈Λ(I) such that for all i ∈I the\nrestriction of ⃗a to I \\ {i} can be extended to an element of ΛJ({1} ∪(I \\ {i})).\nLemma 3.14. If k ≥3 then\n(1) ΛJ(I) is non-empty for all I and if 1 ∈I then the projection of ΛJ(I) onto the first\ncoordinate is equal to J.\n(2) For I, K, k-element subsets of {1, 2, . . . , n}, proj(I∩K)(ΛJ(I)) = proj(I∩K)(ΛJ(K))."},{"paragraph_id":"p15","order":15,"text":"ON TRACTABILITY AND CONGRUENCE DISTRIBUTIVITY ∗\n13\nProof. Since P is subdirect then for any k-element set I with 1 ∈I we have that ΛJ(I) is\nnon-empty and projects onto J in the first coordinate.\nLet I be some k-element set of coordinates with 1 /∈I.\nFor ease of notation, we\nmay assume that I = {2, 3, . . . , k, k + 1}. Let ⃗a = (a1, a2, a3, . . . , ak) be any member of\nΛJ({1, 2, . . . , k}). We will show that there is some ak+1 ∈Ak+1 such that (a2, a3, . . . , ak+1) ∈\nΛJ(I). This will not only show that ΛJ(I) is non-empty, but will also allow us to easily\nestablish condition (2) of the lemma.\nWe construct the element ak+1 as follows. Since Λ is the k-system for P then there\nis some element u ∈Ak+1 such that (a2, . . . , ak, u) ∈Λ(I). Furthermore, there is some\nv ∈Ak+1 such that (a1, a3, . . . , ak, v) ∈Λ({1, 3, . . . , k + 1}) and then some v′ ∈A2\nwith (v′, a3, . . . , ak, v) ∈Λ(I). Similarly, there are w and w′ with (a1, a2, a4, . . . , ak, w) ∈\nΛ{1, 2, 4, . . . , k + 1}) and (a2, w′, a4, . . . , ak, w) ∈Λ(I). Let ak+1 = p1(u, v, w) ∈Ak+1. By\napplying p1 to the tuples (a2, . . . , ak, u), (v′, a3, . . . , ak, v) and (a2, w′, a4, . . . , ak, w) we see\nthat the tuple (a2, a3, . . . , ak+1) ∈Λ(I).\nWe now need to show that for all 2 ≤i ≤k + 1 there is some b ∈J with\n(b, a2, . . . , ai−1, ai+1, . . . , ak+1) ∈ΛJ({1, 2, . . . , i −1, i + 1, . . . , k + 1}).\nThere are a number of cases to consider.\n• If i = k + 1 then the tuple (a2, . . . , ak) extends to (a1, a2, . . . , ak), a member of\nΛJ({1, 2, . . . , k}), as required.\n• If i = 2: There are x ∈A1 and y ∈A3 with (x, a3, . . . , ak, u) and (a1, y, a4, . . . , ak, w)\nin Λ({1, 3, . . . , k+1}). Applying p1 to these tuples and the tuple (a1, a3, a4, . . . , ak, v)\n(in the second variable) produces the tuple (x·a1, a3, . . . , ak, ak+1) ∈Λ({1, 3, . . . , k+\n1}). Since a1 ∈J and J is a J ́onsson ideal, then x · a1 ∈J and so this tuple belongs\nto ΛJ({1, 3, . . . , k + 1}), as required.\n• If i = 3 or 3 < i < k + 1 then small variations of the previous argument will work.\nTo complete the proof of this lemma we need to establish the compatibility of ΛJ on\noverlapping elements of its domain. Let I and L be distinct members of the domain of ΛJ\nwith non-empty intersection N and let i ∈I \\ L and l ∈L \\ I.\nLet ⃗a ∈ΛJ(I) and let ⃗c be the projection of ⃗a onto the coordinates in N. The restriction\nof ⃗a to I \\ {i} extends to an element ⃗a′ ∈ΛJ({1} ∪(I \\ {i})). Since Λ is the k-system for\nP, the restriction of ⃗a′ to {1} ∪N extends to an element ⃗b′ of Λ({1} ∪(L \\ {l})). Note that\n⃗b′(1) ∈J and the restriction of ⃗b′ to N is ⃗c. By the first part of this proof, it follows that\nthe restriction of ⃗b′ to L \\ {l} extends to an element ⃗b of ΛJ(L) as required.\nCorollary 3.15. If all of the constraints of P have scopes of size k then there is a k-\nminimal instance PJ of the constraint satisfaction problem over the domains J and the\nAi, for 2 ≤i ≤n, whose constraint relations are all non-empty and whose solution set is\ncontained in the solution set of P.\nProof. It follows from our assumptions on the sizes of the scopes of the constraints of P\nthat the constraints can be indexed by the k-element subsets of {1, 2, . . . , n} and that for\nsuch a subset I, the constraint CI is of the form (I, RI) where RI is a subdirect product of\nthe algebras Ai, for i ∈I.\nWe set PJ to be the instance of the CSP over the domains J and the Ai, for 2 ≤i ≤n,\nthat has, for each k-element subset I of {1, 2, . . . , n}, the constraint C′\nI = (I, R′\nI), where\nR′\nI = ΛJ(I). It follows by construction and from the previous lemma that PJ is a k-minimal"},{"paragraph_id":"p16","order":16,"text":"14\nE. KISS AND M. VALERIOTE\ninstance of the CSP whose constraint relations are all non-empty and whose solutions are\nalso solutions of P.\nThe previous corollary can be used to establish the tractability of the constraint lan-\nguages arising from finite members of V3, while the following lemma will be used to prove\nthat these languages are in fact globally tractable.\nLemma 3.16. Assume that k ≥M2 and let C = (S, R) be a constraint of P. Then there is\na subuniverse RJ of R such that for all k-element subsets I of S, the projection of R onto\nI is equal to ΛJ(I).\nProof. For K a subset of S and ⃗a ∈R, we will say that ⃗a is reduced over K if for all\n(k −1)-element subsets I of K, the restriction of ⃗a to I can be extended to an element of\nΛJ({1} ∪I). We define RJ to be the set of all tuples ⃗a ∈R that are reduced over S. RJ is\nalso equal to all elements ⃗a of R such that for all k-element subsets I of S, the restriction\nof ⃗a to I is in ΛJ(I). RJ is naturally a subuniverse of R and so the challenge is to show\nthat it satisfies the conditions of the lemma. Our proof breaks into two cases, depending\non whether or not the coordinate 1 is in S.\nSuppose that 1 ∈S. We may assume that S = {1, 2, . . . , m} for some m ≤n. We need\nto show that if I is a k element subset of S and ⃗a ∈ΛJ(I) then there is some ⃗b ∈RJ whose\nrestriction to I is ⃗a.\nFirst consider the sub-case where 1 ∈I. If ⃗a ∈ΛJ(I) then by the k-minimality of P\nthere is some ⃗b ∈R whose restriction to I is ⃗a. Since ⃗b(1) = ⃗a(1) ∈J it follows that ⃗b is in\nRJ, as required.\nNow, suppose that 1 /∈I and assume that I = {2, 3, . . . , k + 1}. By the k-minimality\nof P there is some ⃗c ∈R whose restriction to I is ⃗a. For each 2 ≤i ≤k + 1 there is some\nji ∈J and some ⃗ci ∈R such that ⃗ci(1) = ji and such that the restrictions of ⃗ci and ⃗a to\nI \\ {i} are the same.\nSince k > |J| it follows from the Pigeonhole principle that there are i ̸= l with ji = jl.\nWe may assume that i = 2 and l = 3 and set j = ji. Define ⃗b to be p1(⃗c,⃗c2,⃗c3). This\nelement belongs to R and satisfies: ⃗b(1) = ⃗c(1) · j ∈J and the restriction of ⃗b to I is ⃗a.\nTo establish this equality over coordinate 2 we make use of the identity p1(x, y, x) = x and\nover coordinate 3 p1(x, x, y) = x. Finally, ⃗b is in RJ since ⃗b(1) ∈J.\nFor the remaining case, assume that 1 /∈S, say S = {2, 3, . . . , m + 1}. We will show by\ninduction on s that if k −1 ≤s ≤m −1, K is a subset of {2, 3, . . . , m + 1} of size s and\n⃗a ∈R is reduced over K then if i ∈S \\ K there is some ⃗b ∈R that is reduced over K ∪{i}\nand such that projK(⃗a) = projK(⃗b). A consequence of this claim is that for any k-element\nsubset I of S, any element of ΛJ(I) can be extended to a member of RJ. From this, the\nlemma follows.\nLemma 3.14 establishes the base of this induction. Assume the induction hypothesis\nholds for k −1 ≤s < m −1 and let K be a subset of {2, 3, . . . , m + 1} of size s + 1. By\nsymmetry, we may assume that K = {2, 3, . . . , s + 2}. Let ⃗a ∈R be reduced over K. We\nwill show that there is some ⃗a′ ∈R which equals ⃗a over K and is reduced over K ∪{s + 3}.\nBy the induction hypothesis, for each 2 ≤i ≤s + 2 there is some ⃗ai ∈R such that the\nprojections of ⃗a and ⃗ai onto K \\ {i} are the same and ⃗ai is reduced over (K ∪{s + 3}) \\ {i}.\nBy the Pigeonhole principle it follows that there is some a ∈As+3 and a set Q contained\nin K of size at least M such that for i ∈Q, ⃗ai(s + 3) = a."},{"paragraph_id":"p17","order":17,"text":"ON TRACTABILITY AND CONGRUENCE DISTRIBUTIVITY ∗\n15\nLet i and l be distinct members of Q and let ⃗a′ be the element p1(⃗a,⃗ai,⃗al) of R. Note\nthat over the coordinates in K, ⃗a′ and ⃗a are equal and that at s + 3, ⃗a′ equals b · a, where\nb = ⃗a(s + 3).\nWe claim that ⃗a′ is reduced over K ∪{s + 3}. To establish this we need to show that\nover any subset U of K ∪{s + 3} of size k −1, the restriction to U of ⃗a′ can be extended\nto a member of ΛJ({1} ∪U). When U avoids the coordinate s + 3 there is nothing to do,\nsince ⃗a is reduced over K.\nSo, assume that U contains s + 3 and let ⃗d be an extension to some element in Λ({1} ∪\nU) of the restriction of ⃗a to U.\nSince for each v ∈Q the element ⃗av is reduced over\n(K ∪{s + 3}) \\ {v} then there is a member ⃗cv of ΛJ({1} ∪U) whose restriction to U \\ {v}\nis equal to the restriction of ⃗av over this set. If there is some v ∈Q \\ U then the element\np1(⃗d,⃗cv,⃗cv) ∈ΛJ({1} ∪U) witnesses that the restriction of ⃗a′ to U can be extended as\ndesired.\nIf, on the other hand, Q ⊆U then choose two elements u and v of Q such that\n⃗cu(1) = ⃗cv(1) ∈J. An application of the Pigeonhole principle ensures the existence of these\nelements since |Q| > |J|. Then, the element p1(⃗d,⃗cu,⃗cv) ∈ΛJ({1} ∪U) and its restriction\nto U is equal the restriction of ⃗a′ on U.\nCorollary 3.17. If k ≥M2 then there is a k-minimal instance PJ of the constraint sat-\nisfaction problem over J and the Ai, for 2 ≤i ≤n, whose constraint relations are all\nnon-empty and whose solution set is contained in the solution set of P.\nProof. From the preceding lemma it follows that the instance PJ over the domains J and\nthe Ai, for 2 ≤i ≤n, with constraints C′ = (S, RJ), for each constraint C = (S, R) of P, is\nk-minimal and has all of its constraint relations non-empty. Since the constraint relations\nof PJ are subsets of the corresponding constraint relations of P then the result follows.\nTheorem 3.18. Let A = (A1, . . . , An) be a sequence of finite algebras from V3 and let\nP = (A, C) be a k-minimal instance of the CSP whose constraint relations are non-empty.\nIf k ≥3 and the sizes of the scopes of the constraints of P are bounded by k or if k ≥M2,\nwhere M = max{|Ai| : 1 ≤i ≤n}, then there is a subdirect k-minimal instance P ′ of the\nCSP over J ́onsson trivial subalgebras of the Ai such that the constraint relations of P ′ are\nnon-empty and the solution set of P ′ is contained in the solution set of P.\nProof. This theorem is proved by repeated application of Corollaries 3.15 and 3.17.\n3.3. The reduction to simple algebras. In this subsection we show, for k ≥3, how to\nreduce a k-minimal instance of the CSP whose domains are J ́onsson trivial members of V3\nand whose constraint relations are all non-empty to one which has in addition, domains\nthat are simple algebras. Our development closely follows parts of the proof of Theorem\n3.1 in [3].\nDefinition 3.19. Let Ai, 1 ≤i ≤m, be similar algebras and let Θ = (θ1, . . . , θm) be a\nsequence of congruences θi ∈Con (Ai).\n(1) Qm\ni=1 θi denotes the congruence on Qm\ni=1 Ai that identifies two m-tuples ⃗a and ⃗b if\nand only if (ai, bi) ∈θi for all i.\n(2) If I is a subset of {1, 2, . . . , m} and R is a subalgebra of Q\ni∈I Ai then R/Θ denotes\nthe quotient of R by the restriction of the congruence Q\ni∈I θi to R."},{"paragraph_id":"p18","order":18,"text":"16\nE. KISS AND M. VALERIOTE\nLet A = (A1, . . . , An) be a sequence of finite, J ́onsson trivial members of V3 and let\nP = (A, C) be a subdirect, k-minimal instance of the CSP whose constraint relations are all\nnon-empty. Let C = {C1, C2, . . . , Cm} where, for 1 ≤i ≤m, Ci = (Si, Ri) for some subset\nSi of {1, 2, . . . , n} and some subuniverse Ri of Q\ni∈Si Ai. Suppose that one of the Ai is not\nsimple, say for i = 1, and let θ1 be a maximal proper congruence of A1.\nRecall that for I ⊆{1, 2, . . . , n}, PI denotes the set of partial solutions of P over the\nvariables I.\nIf |I| ≤k then since P is k-minimal, PI is non-empty and is a subdirect\nsubuniverse of Q\ni∈I Ai.\nSince the algebra A1/θ1 is a simple, J ́onsson trivial algebra then it follows by Lemma\n3.8 that for 2 ≤i ≤n, P{1,i}/(θ1 × 0Ai) is either the graph of a homomorphism πi from\nAi onto A1/θ1 or is equal to A1/θ1 × Ai. Let W consist of 1 along with the set of all i for\nwhich the former holds. For 2 ≤i ≤n, let θi be the kernel of the map πi if i ∈W, and 0Ai\notherwise.\nLet Θ = (θ1, . . . , θn) and set P/Θ = (A/Θ, C/Θ) where A/Θ = (A1/θ1, . . . , An/θn)\nand C/Θ consists of the constraints Ci/Θ = (Si, Ri/Θ), for 1 ≤i ≤m.\nNote that since P is subdirect and k-minimal then so is P/Θ and that each Ai/θi is\nJ ́onsson trivial, since this property is preserved by taking quotients.\nLemma 3.20. If the instance P/Θ has a solution, then there is some k-minimal instance\nP ′ = (A′, C′) such that\n• A′ = (A′\n1, . . . , A′\nn), where for each 1 ≤i ≤n, A′\ni a subalgebra of Ai.\n• A′\n1 is a proper subset of A1,\n• C′ = {C′\n1, . . . , C′\nm} where, for each 1 ≤i ≤m, C′\ni = (Si, R′\ni) for some non-empty\nsubuniverse R′\ni of Ri.\nHence, any solution of P ′ is a solution of P.\nProof. Let (s1, . . . , sn) be a solution of P/Θ. We can regard each si as a congruence block\nof θi and hence as a subuniverse of Ai. For i ∈W, define A′\ni to be the subalgebra of Ai\nwith universe si and for i /∈W, set A′\ni = Ai. For 1 ≤j ≤m, let\nR′\nj = Rj ∩\nY\ni∈Sj\nA′\ni.\nWe now set out to prove that the instance P ′ = (A′, C′) has the desired properties.\nSince θ1 is a proper congruence of A1 then s1 is a proper subset of A1 and so A′\n1 is properly\ncontained in A1. Since (s1, . . . , sn) is a solution to P/Θ it follows that for 1 ≤j ≤m, R′\nj is\na non-empty subuniverse of Rj.\nWe need only verify that P ′ is k-minimal, so let 1 ≤a < b ≤m and I be some subset\nof Sa ∩Sb of size at most k. To establish that projI(R′\na) = projI(R′\nb) it will suffice to show\nthat\nprojI(R′\ni) = projI(Ri) ∩\nY\nl∈I\nA′\nl.\nfor all i, since P is k-minimal.\nBy the definition of R′\ni it is immediate that the relation on the left of the equality sign\nis contained in that on the right. In the case that W ∩Si = ∅the other inclusion is also\nclear.\nIf W ∩Si ̸= ∅we have that projW ∩Si(Ri/Θ) is a subdirect product of simple, J ́onsson\ntrivial algebras that are all isomorphic to A1/θ1. Since the projection of this subdirect\nproduct onto any two coordinates in W ∩Si is equal to the graph of a bijection then in fact,"},{"paragraph_id":"p19","order":19,"text":"ON TRACTABILITY AND CONGRUENCE DISTRIBUTIVITY ∗\n17\nthe entire subdirect product is isomorphic to A1/θ1 in a natural way (using the bijections\nπi from the definition of W). Then, using Lemma 3.9 and the definition of W (or more\nprecisely, the complement of W), we conclude that Ri/Θ is isomorphic to A1/θ1 ×D, where\nD = proj(Si\\W )(Ri).\nNow, suppose that ⃗a ∈projI(Ri)∩Q\nl∈I A′\nl. Then there is some⃗b ∈Ri with projI(⃗b) = ⃗a.\nIf W ∩I = ∅then, by the concluding remark of the previous paragraph, proj(Si\\W )(⃗b) and\nhence projI(⃗b) can be extended to an element of Ri that lies in Q\nl∈Si A′\nl (here we use the\nfact that we have a solution of P/Θ to work with). This establishes that, in this case,\n⃗a ∈projI(R′\ni).\nFinally, suppose that for some w we have w ∈W ∩I. The vector ⃗b from Ri that projects\nonto ⃗a over I has the property that ⃗b(w) ∈sw (since ⃗a does). The structure of Ri/Θ worked\nout earlier implies that ⃗b(l) ∈sl for all l ∈W ∩Si since (s1, . . . , sn) is a solution to P/Θ.\nFrom this we conclude that ⃗b ∈R′\ni, as required.\n4. Proof of the main result\nIn the preceding section we established techniques for reducing k-minimal instances\nof the CSP over domains from V3 to more manageable instances. The following theorem\nemploys these techniques to establish the finite relational width of constraint languages\narising from finite algebras in CD(3).\nLet A be a finite algebra in CD(3).\nThen A has term operations p1(x, y, z) and\np2(x, y, z) that satisfy the equations:\npi(x, y, x)\n=\nx , i = 1, 2\np1(x, x, y)\n=\nx\np1(x, y, y)\n=\np2(x, y, y)\np2(x, x, y)\n=\ny\nRecall that associated with A is the constraint language ΓA = Inv(A), consisting of all\nrelations invariant under the basic operations of A.\nTheorem 4.1. If Γ is a subset of ΓA whose relations all have arity k or less, for some\nk ≥3, then Γ has relational width k. In any case, if M = |A|2 then ΓA has relational width\nM.\nCorollary 4.2. If Γ is a finite subset of ΓA then Γ is tractable and is of bounded width in\nthe sense of Feder-Vardi. Furthermore, ΓA is globally tractable.\nProof. (of the Theorem) We may assume that A = (A, p0, p1, p2, p3), where p0(x, y, z) = x\nand p3(x, y, z) = z for all x, y, z ∈A since if we can establish the theorem for this sort\nof algebra, it will then apply to all algebras with universe A that have the pi as term\noperations.\nOur assumption on A places it in the variety V3 and so the results from the previous\nsection apply. Let Γ be a subset of ΓA. If Γ is finite, let k be the maximum of 3 and the\narities of the relations in Γ and replace Γ by Γk, the set of all relations in ΓA of arity k or\nless. Establishing relational width k for this enlarged Γ will, of course, be a stronger result.\nIf Γ is not finite, replace it by ΓA and set k = |A|2. We will show that in either case, Γ has\nrelational width k."},{"paragraph_id":"p20","order":20,"text":"18\nE. KISS AND M. VALERIOTE\nFrom statements (5) or (6) of Proposition 2.23 it will suffice to show that if P is a\nk-minimal instance of CSP(Γ) whose constraint relations are all non-empty then P has a\nsolution. We may express P in the form (A, C) where A = (A, A, . . . , A) is a sequence of\nlength n, for some n > 0, and where C is a set of constraints of the form C = (S, R), for\nsome non-empty subset S of {1, 2, . . . , n} and some non-empty subuniverse R of A|S|.\nIn order to apply the results from the previous section as seamlessly as possible, we\nenlarge our language Γ to a closely related, but larger, multi-sorted language. Let H be the\nset of all quotients of subalgebras of A. Note that H is finite and all algebras in it have\nsize at most |A|. If Γ = Γk, replace it with the set of all subuniverses of l-fold products of\nalgebras from H, for all 1 ≤l ≤k, and otherwise, replace it by the set of all subuniverses of\nfinite products of algebras from H. In both cases, we have extended our original constraint\nlanguage. P can now be viewed as a k-minimal instance of CSP(Γ), the class of multi-\nsorted CSPs whose instances have domains from H and whose constraint relations are from\nΓ.\nWe now prove that every k-minimal instance of CSP(Γ) whose constraint relations are\nnon-empty has a solution. If this is not so, let Q be a counter-example such that the sum\nof the sizes of the domains of Q is as small as possible. Note that independent of this size,\nno domain of Q is bigger than |A| since they all come from H. Also note that Q must be\nsubdirect.\nFrom Theorem 3.18 it follows that all of the domains of Q are J ́onsson trivial. Then,\nfrom Lemma 3.20 we can deduce that all of the domains of Q are simple. If not, then\neither there is a proper quotient of Q that is k-minimal and that does not have a solution,\nor the k-minimal instance produced by the lemma cannot have a solution. In either case,\nwe contradict the minimality of Q. Thus Q is a subdirect, k-minimal instance of CSP(Γ)\nwhose domains are all simple and J ́onsson trivial and whose constraint relations are all non-\nempty. From Theorem 3.13 we conclude that in fact Q has a solution. This contradiction\ncompletes the proof of the theorem.\n5. Conclusion\nThe main result of this paper establishes that for certain constraint languages Γ that\narise from finite algebras that generate congruence distributive varieties, the problem class\nCSP(Γ) is tractable. This class of constraint languages includes those that are compatible\nwith a majority operation but also includes some languages that were not previously known\nto be tractable.\nWe feel that the proof techniques employed in this paper may be useful in extending\nour results to include all constraint languages that arise from finite algebras that generate\ncongruence distributive varieties and perhaps beyond.\nProblem 1: Extend the algebraic tools developed to handle algebras in CD(3) to algebras\nin CD(n) for any n > 3. In particular, generalize the notion of a J ́onsson ideal to this wider\nsetting.\nWe note that in [19] some initial success at extending the notion of a J ́onsson ideal has\nbeen obtained.\nThe bound on relational width established for the languages addressed in this paper\nseems to depend on the size of the underlying domain of the language. Nevertheless, we are"},{"paragraph_id":"p21","order":21,"text":"ON TRACTABILITY AND CONGRUENCE DISTRIBUTIVITY ∗\n19\nnot aware of any constraint language that has finite relational width that is not of relational\nwidth 3.\nProblem 2: For each n > 3, produce a constraint language Γn that has relational width n\nand not n−1. As a strengthening of this problem, find Γn that in addition have compatible\nnear unanimity operations.\n6. Acknowledgments\nThe first author acknowledges the support of the Hungarian National Foundation for\nScientific Research (OTKA), grants no. T043671 and T043034, while the second, the sup-\nport of the Natural Sciences and Engineering Research Council of Canada.\nSupport of\nthe Isaac Newton Institute for Mathematical Sciences and the organizers of the Logic and\nAlgorithms programme is also gratefully acknowledged.\nReferences\n[1] Andrei Bulatov. Tractable conservative constraint satisfaction problems. In Phokion G. Kolaitis, editor,\nProceedings of the Eighteenth Annual IEEE Symp. on Logic in Computer Science, LICS 2003, pages\n321–330. IEEE Computer Society Press, June 2003.\n[2] Andrei Bulatov. A graph of a relational structure and constraint satisfaction problems. In Proceedings\nof the 19th Annual IEEE Symposium on Logic in Computer Science, 2004, pages 448–457. IEEE, 2004.\n[3] Andrei Bulatov. Combinatorial problems raised from 2-semilattices. Journal of Algebra, 298(2):321–339,\n2006.\n[4] Andrei Bulatov and Peter Jeavons. Algebraic structures in combinatorial problems. submitted for pub-\nlication.\n[5] Andrei Bulatov, Peter Jeavons, and Andrei Krokhin. Classifying the complexity of constraints using\nfinite algebras. SIAM J. Comput., 34(3):720–742 (electronic), 2005.\n[6] Andrei A. Bulatov. A dichotomy theorem for constraint satisfaction problems on a 3-element set. J.\nACM, 53(1):66–120, 2006.\n[7] Stanley Burris and H. P. Sankappanavar. A course in universal algebra, volume 78 of Graduate Texts\nin Mathematics. Springer-Verlag, New York, 1981.\n[8] Matthias Clasen and Matthew Valeriote. Tame congruence theory. In Lectures on algebraic model theory,\nvolume 15 of Fields Inst. Monogr., pages 67–111. Amer. Math. Soc., Providence, RI, 2002.\n[9] Victor Dalmau. Generalized majority-minority operations are tractable. In Prakash Panangaden, editor,\nProceedings of the Twentieth Annual IEEE Symp. on Logic in Computer Science, LICS 2005, pages\n438–447. IEEE Computer Society Press, June 2005.\n[10] Tom ́as Feder and Moshe Y. Vardi. Monotone monadic snp and constraint satisfaction. In STOC ’93:\nProceedings of the twenty-fifth annual ACM symposium on Theory of computing, pages 612–622, New\nYork, NY, USA, 1993. ACM Press.\n[11] Tom ́as Feder and Moshe Y. Vardi. The computational structure of monotone monadic SNP and con-\nstraint satisfaction: a study through Datalog and group theory. SIAM J. Comput., 28(1):57–104 (elec-\ntronic), 1999.\n[12] David Hobby and Ralph McKenzie. The structure of finite algebras, volume 76 of Contemporary Math-\nematics. American Mathematical Society, Providence, RI, 1988. Revised edition: 1996.\n[13] Peter Jeavons. On the algebraic structure of combinatorial problems. Theoret. Comput. Sci., 200(1-\n2):185–204, 1998.\n[14] Peter Jeavons, David Cohen, and Martin C. Cooper. Constraints, consistency and closure. Artificial\nIntelligence, 101(1-2):251–265, 1998.\n[15] Benoit Larose. Some notes on bounded widths. unpublished, 2004.\n[16] Benoit Larose and L ́aszl ́o Z ́adori. Bounded width problems and algebras. Accepted by Algebra Univer-\nsalis, 2006."},{"paragraph_id":"p22","order":22,"text":"20\nE. KISS AND M. VALERIOTE\n[17] R. McKenzie, G. McNulty, and W. Taylor. Algebras, Lattices, Varieties Volume 1. Wadsworth and\nBrooks/Cole, Monterey, California, 1987.\n[18] Thomas J. Schaefer. The complexity of satisfiability problems. In Conference Record of the Tenth Annual\nACM Symposium on Theory of Computing (San Diego, Calif., 1978), pages 216–226. ACM, New York,\n1978.\n[19] Matthew Valeriote. A subalgebra intersection property for congruence distributive varieties. Canadian\nJournal of Mathematics, accepted for publication, 2006.\nThis work is licensed under the Creative Commons Attribution-NoDerivs License. To view\na copy of this license, visit http://creativecommons.org/licenses/by-nd/2.0/ or send a\nletter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA."}],"pages":[{"page":1,"text":"Logical Methods in Computer Science\nVol. 3 (2:6) 2007, pp. 1–1–20\nwww.lmcs-online.org\nSubmitted\nOct. 18, 2006\nPublished\nJun.\n8, 2007\nON TRACTABILITY AND CONGRUENCE DISTRIBUTIVITY ∗\nEMIL KISS a AND MATTHEW VALERIOTE b\na Department of Algebra and Number Theory, E ̈otv ̈os University, 1117 Budapest, P ́azm ́any P ́eter\ns ́et ́any 1/c, Hungary\ne-mail address: ewkiss@cs.elte.hu\nb Department of Mathematics and Statistics, McMaster University, Hamilton, Ontario, L8S 4K1,\nCanada\ne-mail address: matt@math.mcmaster.ca\nAbstract. Constraint languages that arise from finite algebras have recently been an\nobject of study, especially in connection with the Dichotomy Conjecture of Feder and\nVardi.\nAn important class of algebras are those that generate congruence distributive\nvarieties and included among this class are lattices, and more generally, those algebras that\nhave near-unanimity term operations. An algebra will generate a congruence distributive\nvariety if and only if it has a sequence of ternary term operations, called J ́onsson terms,\nthat satisfy certain equations.\nWe prove that constraint languages consisting of relations that are invariant under\na short sequence of J ́onsson terms are tractable by showing that such languages have\nbounded relational width.\n1. Introduction\nThe Constraint Satisfaction Problem (CSP) provides a framework for expressing a wide\nclass of combinatorial problems. Given an instance of the CSP, the aim is to determine if\nthere is a way to assign values from a fixed domain to the variables of the instance so\nthat each of its constraints is satisfied. While the entire collection of CSPs forms an NP-\ncomplete class of problems, a number of subclasses have been shown to be tractable (i.e., to\nlie in P). A major focus of research in this area is to determine the subclasses of the CSP\nthat are tractable.\nOne way to define a subclass of the CSP is to restrict the constraint relations that occur\nin an instance to a given finite set of relations over a fixed, finite domain, called a constraint\nlanguage. A central problem is to classify the constraint languages that give rise to tractable\nsubclasses of the CSP. Currently, all constraint languages that have been investigated have\nbeen shown to give rise to a subclass of the CSP that is either NP-complete or in P. It is\n2000 ACM Subject Classification: F.1.3, F.4.1.\nKey words and phrases: constraint satisfaction problem, tractability, universal algebra, congruence\ndistributivity.\n∗An extended abstract of this paper has appeared in the Proceedings of the Twenty-First Annual IEEE\nSymposium on Logic in Computer Science.\nLOGICAL METHODS\nl IN COMPUTER SCIENCE\nDOI:10.2168/LMCS-3 (2:6) 2007\nc\n⃝\nE. Kiss and M. Valeriote\nCC\n⃝\nCreative Commons"},{"page":2,"text":"2\nE. KISS AND M. VALERIOTE\nconjectured in [10] that this dichotomy holds for all subclasses arising from finite constraint\nlanguages.\nIn some special cases, the conjectured dichotomy has been verified. For example, the\nwork of Schaefer [18] and of Bulatov [6] establish this over domains of sizes 2 and 3 respec-\ntively. For constraint languages over larger domains a number of significant results have\nbeen obtained [5, 1, 9].\nOne method for establishing that the subclass of the CSP associated with a finite\nconstraint language is tractable is to establish a type of local consistency property for\nthe instances in the subclass.\nIn [11] Feder and Vardi introduce a notion of the width\nof a constraint language and show that languages of bounded width give rise to tractable\nsubclasses of the CSP. There is a natural connection between these subclasses of the CSP\nand definability within Datalog.\nIn work by Jeavons and his co-authors an approach to classifying the tractable con-\nstraint languages via algebraic methods has been proposed and applied with great success\n[5]. In essence, their work allows one to associate a finite algebraic structure to each con-\nstraint language and then to analyze the complexity of the corresponding subclass of the\nCSP in purely algebraic terms.\nIn this paper, we employ the algebraic approach to analyzing constraint languages\nand with it are able to identify a new, general class of tractable constraint languages.\nThese languages arise from finite algebras that generate congruence distributive varieties,\nor equivalently, that have a sequence of special term operations, called J ́onsson terms, that\nsatisfy certain equations. Theorem 4.1 establishes the tractability of these languages by\nshowing that they are of bounded width. Related to our result is the theorem of Jeavons,\nCohen, and Cooper in [14] that establishes the tractability of constraint languages that arise\nfrom another class of finite algebras that generate congruence distributive varieties. These\nalgebras are equipped with a special term operation called a near unanimity operation.\nDalmau [9] provides an alternate proof of their result.\n2. Preliminaries\nIn this section we introduce the necessary terminology and results on the CSP and from\nuniversal algebra that will be needed to prove the main result (Theorem 4.1) of this paper.\nIn the following discussion we will employ standard terminology and notation when\ndealing with n-tuples and relations over sets. In particular, if ⃗a is a tuple over the sequence\nof domains Ai, 1 ≤i ≤n, (i.e., is a member of Q\n1≤i≤n Ai) and I is a subset of {1, 2, . . . , n}\nthen projI(⃗a) denotes the tuple (ai : i ∈I) ∈Q\ni∈I Ai over the sequence of domains\n(Ai : i ∈I) and is called the restriction (or the projection) of ⃗a to I. We extend this\nprojection function to arbitrary relations over the Ai. The ith element of the tuple ⃗a will\nbe denoted by ⃗a(i).\nFor R and S binary relations on a set A, we define the relational product of R and S,\ndenoted R ◦S, to be the binary relation consisting of all pairs (a, b) for which there is some\nc with (a, c) ∈R and (c, b) ∈S.\n2.1. The Constraint Satisfaction Problem.\nDefinition 2.1. An instance of the constraint satisfaction problem is a triple P = (V, A, C)\nwith"},{"page":3,"text":"ON TRACTABILITY AND CONGRUENCE DISTRIBUTIVITY ∗\n3\n• V a non-empty, finite set of variables,\n• A a non-empty, finite set (or domain),\n• C a set of constraints {C1, . . . , Cq} where each Ci is a pair (⃗si, Ri) with\n– ⃗si a tuple of variables of length mi, called the scope of Ci, and\n– Ri an mi-ary relation over A, called the constraint relation of Ci.\nGiven an instance P of the CSP we wish to answer the following question:\nIs there a solution to P, i.e., is there a function f : V →A such that for\neach i ≤q, the mi-tuple f(⃗si) ∈Ri?\nWe say that two instances of the CSP having the same set of variables and the same\ndomain are equivalent if they have the same set of solutions.\nIn general, the class of CSPs is NP-complete (see [14]), but by restricting the nature of\nthe constraint relations that are allowed to appear in an instance of the CSP, it is possible\nto find natural subclasses of the CSP that are tractable.\nDefinition 2.2. Let A be a domain and Γ a set of finitary relations over A. CSP(Γ) denotes\nthe collection of all instances of the CSP with domain A and with constraint relations coming\nfrom Γ. Γ is called the constraint language of the class CSP(Γ).\nDefinition 2.3. Call a finite constraint language Γ tractable if the class of problems CSP(Γ)\nis tractable (i.e., lies in P). If Γ is infinite and each finite subset Γ′ of Γ is tractable then\nwe say that Γ is tractable. If the entire class CSP(Γ) is in P then we say that Γ is globally\ntractable.\nΓ is said to be NP-complete if for some finite subset Γ′ of Γ, the class of problems\nCSP(Γ′) is NP-complete.\nA key problem in this area is to classify the (globally) tractable constraint languages.\nNote that in this paper we will assume that P ̸= NP. Feder and Vardi [11] conjecture that\nevery finite constraint language is either tractable or is NP-complete.\nWe will find it convenient to extend the above notions of instances of the CSP and\nconstraint languages to a multi-sorted setting. This approach has been used on a number\nof occasions, in particular in [3].\nDefinition 2.4. A multi-sorted instance of the constraint satisfaction problem is a pair\nP = (A, C) where\n• A = (A1, A2, . . . , An) is a sequence of finite, non-empty sets, called the domains of\nP, and\n• C is a set of constraints {C1, . . . , Cq} where each Ci is a pair (Si, Ri) with\n– Si a non-empty subset of {1, 2, . . . , n} called the scope of Ci, and\n– Ri an |Si|-ary relation over (Aj : j ∈Si), called the constraint relation of Ci.\nIn this case, a solution to P is an n-tuple ⃗a over the sequence (Ai : 1 ≤i ≤n) such\nthat projSj(⃗a) ∈Rj for each 1 ≤j ≤q. Clearly, each standard instance of the CSP can\nbe expressed as an equivalent multi-sorted instance. While the given definition of a multi-\nsorted instance of the CSP does not allow for the repetition of variables within the scope\nof any constraint, there is a natural extension of Definition 2.1 that allows this. Note that\nthere is a very straightforward procedure to transform such an instance to an equivalent\none that conforms to Definition 2.4."},{"page":4,"text":"4\nE. KISS AND M. VALERIOTE\nDefinition 2.5. A relation R over the sets Ai, 1 ≤i ≤n, is subdirect if for all 1 ≤i ≤n,\nproj{i}(R) = Ai. We call a multi-sorted instance P of the CSP subdirect if each of its\nconstraint relations is.\nIn addition to the set of solutions of an instance of the CSP, one can also consider\npartial solutions of the instance.\nDefinition 2.6. For P as in Definition 2.4 and I a subset of {1, 2, . . . , n}, the set of partial\nsolutions of P over I, denoted PI, is the set of solutions of the instance P ′ = (A′, C′) where\nA′ = (Ai : i ∈I) and C = {C′\n1, . . . , C′\nq} with C′\nj = (I ∩Sj, proj(I∩Sj)(Rj)) for 1 ≤j ≤q.\nClearly if the set of partial solutions of an instance over some subset of coordinates is\nempty then the instance has no solutions.\nDefinition 2.7. Let C be a finite set (or sequence) of finite, non-empty sets. A (multi-\nsorted) constraint language over C is a collection of finitary relations over the sets in C.\nGiven a multi-sorted constraint language Γ over C, the class CSP(Γ) consists of all multi-\nsorted instances of the CSP whose domains come from C and whose constraint relations\ncome from Γ. ΓC denotes the set of all finitary relations over the members of C.\nIn a natural way, the notions of tractability and NP-completeness can be extended to\nmulti-sorted constraint languages.\n2.2. Algebras. There are a number of standard sources for the basics of universal algebra,\nfor example [7] and [17]. The books [12, 8] provide details on the more specialized aspects\nof the subject that we will use in this paper.\nDefinition 2.8. An algebra A is a pair (A, F) where A is a non-empty set and F is a\n(possibly infinite) collection of finitary operations on A. The operations in F are called the\nbasic operations of A. A term operation of an algebra A is a finitary operation on A that\ncan be obtained by repeated compositions of the basic operations of A.\nWe assume some familiarity with the standard algebraic operations of taking subalge-\nbras, homomorphic images and cartesian products. Note that in order to sensibly take a\nhomomorphic image of an algebra, or the cartesian product of a set of algebras or to speak\nof terms and equations of an algebra we need to have some indexing of the basic operations\nof the algebras. Algebras that have the same indexing are said to be similar (or of the same\nsimilarity type).\nWhen necessary, we distinguish between an algebra and its underlying set, or universe.\nA subuniverse of an algebra (A, F) is a subset of A that is invariant under F. Note that we\nallow empty subuniverses but not algebras with empty universes.\nDefinition 2.9. A variety of algebras is a collection of similar algebras that is closed under\nthe taking of cartesian products, subalgebras and homomorphic images. If K is a class of\nsimilar algebras then V(K) denotes the smallest variety that contains K.\nTheorem 2.10 (Birkhoff). A class V of similar algebras is a variety if and only if V can\nbe axiomatized by a set of equations.\nIt turns out that for a class K of similar algebras, V(K) = HSP(K), i.e., the class of\nhomomorphic images of subalgebras of cartesian products of members of K.\nDefinition 2.11. Let A be an algebra."},{"page":5,"text":"ON TRACTABILITY AND CONGRUENCE DISTRIBUTIVITY ∗\n5\n(1) An equivalence relation θ on A is a congruence of A if it is invariant under the\nbasic operations of A.\n(2) The congruence lattice of A, denoted Con (A), is the lattice of all congruences of\nA, ordered by inclusion.\n(3) 0A denotes the congruence relation {(a, a) : a ∈A} and 1A denotes the congruence\nrelation {(a, b) : a, b ∈A}, the smallest and largest congruences of the algebra A,\nrespectively.\n(4) An algebra A is simple if 0A and 1A are its only congruences.\nThe congruence lattice of an algebra is a very useful invariant and the types of con-\ngruence lattices that can appear in a variety govern many properties of the algebras in the\nvariety. One particularly relevant and important property of congruence lattices is that of\ndistributivity.\nDefinition 2.12. An algebra A is said to be congruence distributive if its congruence lattice\nsatisfies the distributive law for congruence meet and join. A class of algebras is congruence\ndistributive if all of its members are.\nDefinition 2.13. For k > 0, we define CD(k) to be the class of all algebras A that have a\nsequence of ternary term operations pi(x, y, z), 0 ≤i ≤k, that satisfies the identities:\np0(x, y, z)\n=\nx\npk(x, y, z)\n=\nz\npi(x, y, x)\n=\nx for all i\npi(x, x, y)\n=\npi+1(x, x, y) for all i even\npi(x, y, y)\n=\npi+1(x, y, y) for all i odd\nA sequence of term operations of an algebra A that satisfies the above equations will\nbe referred to as J ́onsson terms of A. The following celebrated theorem of J ́onsson relates\ncongruence distributivity to the existence of J ́onsson terms.\nTheorem 2.14 (J ́onsson). An algebra A generates a congruence distributive variety if and\nonly if there is some k > 0 such that A is in CD(k). In this case, all algebras in V(A) lie\nin CD(k).\nDefinition 2.15. For k > 1, define Vk to be the variety of all algebras that have as basic\noperations a sequence of k + 1 ternary operations pi(x, y, z), for 0 ≤i ≤k, that satisfy the\nequations from Definition 2.13.\nNote that an algebra is in CD(1) if and only if it has size 1 and is in CD(2) if and\nonly if it has a majority term operation (i.e., a term operation m(x, y, z) that satisfies the\nequations m(x, x, y) = m(x, y, x) = m(y, x, x) = x).\nSome of the main results and conjectures dealing with the CSP can be expressed in\nterms of Tame Congruence Theory, a deep theory of the local structure of finite algebras\ndeveloped by Hobby and McKenzie. Details of this theory may be found in [12] or [8]. The\nconnection between the CSP and Tame Congruence Theory was made by Bulatov, Jeavons,\nand Krokhin [5] and we will touch on it in the next subsection. In this paper we will only\nintroduce some of the basic terminology of the theory and will omit most details.\nIn Tame Congruence Theory, five local types of behaviour of finite algebras are identified\nand studied. The five types are, in order:"},{"page":6,"text":"6\nE. KISS AND M. VALERIOTE\n(1) the unary type,\n(2) the affine or vector-space type,\n(3) the 2 element Boolean type,\n(4) the 2 element lattice type,\n(5) the 2 element semi-lattice type.\nWe say that an algebra A omits a particular type if, locally, the corresponding type of\nbehaviour does not occur in A. A class of algebras C is said to omit a particular type if all\nfinite members of C omit that type.\nIn [12], chapter 9, characterizations of finite algebras that generate varieties that omit\nthe unary type or both the unary and affine type are given. The characterizations are similar\nto that given by J ́onsson of the congruence distributive varieties. It easily follows from the\ncharacterizations that if A is a finite algebra that generates a congruence distributive variety\nthen the variety omits both the unary and affine types.\nTo close this subsection we note a special property of the term operations of the algebras\nin Vk for all k > 1.\nDefinition 2.16. An n-ary operation f(x1, . . . , xn) on a set A is idempotent if for all a ∈A,\nf(a, a, . . . , a) = a . An algebra is idempotent if all of its term operations are idempotent.\nNote that idempotency is hereditary in the sense that if a function is the composition of\nsome idempotent operations then it too is idempotent. In another sense, if A is idempotent\nthen all algebras in V(A) are idempotent, since this condition can be described equationally.\nFinally, note that J ́onsson terms are idempotent and so all algebras in Vk for k > 1 are\nidempotent.\n2.3. Algebras and the CSP. The natural duality between sets of relations (constraint\nlanguages) over a set A and sets of operations (algebras) on A has been studied by algebraists\nfor some time. Jeavons and his co-authors [13] have shown how this link between constraint\nlanguages and algebras can be used to transfer questions about tractability into equivalent\nquestions about algebras. In this subsection we present a concise overview of this connection.\nDefinition 2.17. Let A be a non-empty set.\n(1) Let R be an n-ary relation over A and f( ̄x) an m-ary function over A for some n,\nm ≥0. We say that R is invariant under f and that f is a polymorphism of R if\nfor all ⃗ai ∈R, for 1 ≤i ≤m, the n-tuple f(⃗a1, . . . ,⃗am), whose i-th coordinate is\nequal to f(⃗a1(i), . . . ,⃗am(i)), belongs to R.\n(2) For Γ a set of relations over A, Pol (Γ) denotes the set of functions on A that are\npolymorphisms of all the relations in Γ.\n(3) For F a set of finitary operations on A, Inv(F) denotes the set of all finitary relations\non A that are invariant under all operations in F.\n(4) For Γ a constraint language over A, ⟨Γ⟩denotes Inv(Pol (Γ)) and AΓ denotes the\nalgebra (A, Pol (Γ)).\n(5) For A = (A, F), an algebra over A, ΓA denotes the constraint language Inv(F).\n(6) We call a finite algebra A tractable (NP-complete) if the constraint language ΓA\nis.\nNote that if A is an algebra, then Inv(A) coincides with the set of all subuniverses of\nfinite cartesian powers of A. Sets of relations of the form Inv(Γ) for a set of relations Γ\nare known as relational clones. Equivalently, a set of relations Λ over a finite set A is a"},{"page":7,"text":"ON TRACTABILITY AND CONGRUENCE DISTRIBUTIVITY ∗\n7\nrelational clone if and only if it is closed under definition by primitive positive formulas (or\nconjunctive queries).\nTheorem 2.18. ([13]) Let Γ be a constraint language on a finite set. If Γ is tractable then\nso is ⟨Γ⟩. If ⟨Γ⟩is NP-complete then so is Γ.\nIn algebraic terms, Theorem 2.18 states that a constraint language Γ is tractable (or\nNP-complete) if and only if the algebra AΓ is.\nSo, the problem of characterizing the\ntractable constraint languages can be reduced to the problem of characterizing the tractable\nfinite algebras. In a further step, Bulatov, Jeavons and Krokhin [5] provide a reduction down\nto idempotent algebras. For this class of algebras, they propose the following characteriza-\ntion of tractability.\nConjecture 2.19. Let A be a finite idempotent algebra. Then A is tractable if and only\nif the variety V(A) omits the unary type.\nThey show that when this condition fails, the algebra is NP-complete [5]. They also\nshow that if A is a finite, idempotent algebra then V(A) omits the unary type if and only\nif the class HS(A) does. This conjecture has been verified for a number of large classes of\nalgebras. For example, results of Schaefer [18] and Bulatov [6] provide a verification for\nalgebras whose universes have size 2 and 3 respectively.\nAs noted in the introduction, one approach to proving the tractability of a constraint\nlanguage Γ is to apply a notion of local consistency to the instances in CSP(Γ) to determine\nif the instances have solutions.\nWe present a notion of width, called relational width,\ndeveloped by Bulatov and Jeavons [4] that, for finite constraint languages, is closely related\nto the notion of width defined by Feder and Vardi (see [15, 16]). In this paper we will closely\nfollow the presentation of relational width found in [3].\nDefinition 2.20. Let A = (A1, . . . , An) be a sequence of finite, non-empty sets, let P =\n(A, C) be an instance of the CSP and let k > 0. We say that P is k-minimal if:\n(1) For each subset I of {1, 2, . . . , n} of size at most k, there is some constraint (S, R)\nin C such that I ⊆S, and\n(2) If (S1, R1) and (S2, R2) are constraints in C and I ⊆S1 ∩S2 has size at most k then\nprojI(R1) = projI(R2).\nIt is not hard to show that the second condition of this definition is equivalent to having\nthe set of partial solutions PI of P equal to projI(Ri) for all subsets I of size at most k and\nall i with I ⊆Si.\nProposition 2.21. Let Γ be a constraint language and k > 0. There is a polynomial time\nalgorithm (the k-minimality algorithm) that converts a given instance P from CSP(Γ) into\nan equivalent k-minimal instance P ′ from CSP(⟨Γ⟩). In fact, if the arities of the constraint\nrelations of P are bounded by an integer m ≥k then the arities of the constraint relations\nof P ′ are also bounded by m.\nProof. See the discussion in Section 3.1 of [3].\nDefinition 2.22. Let Γ be a constraint language and k > 0. We say that Γ has relational\nwidth k if for every instance P from CSP(Γ), P has a solution if and only if the constraint\nrelations of P ′, the equivalent k-minimal instance produced by the k-minimality algorithm,\nare all non-empty."},{"page":8,"text":"8\nE. KISS AND M. VALERIOTE\nProposition 2.23. Let Γ be a constraint language and k > 0.\n(1) If an instance P of the CSP has a solution then the constraint relations of all\nequivalent instances are non-empty.\n(2) If Γ has relational width k and ∆⊆Γ then ∆also has relational width k.\n(3) If Γ has relational width k then every k-minimal instance P from CSP(Γ) whose\nconstraint relations are non-empty has a solution.\n(4) If Γ is of finite relational width then it is globally tractable.\n(5) If every k-minimal instance from CSP(⟨Γ⟩) whose constraint relations are non-\nempty has a solution then Γ has relational width k and hence is globally tractable.\n(6) If Γ is finite and m ≥k is an upper bound on the arities of the relations in Γ then Γ\nhas relational width k if every k-minimal instance from CSP(⟨Γ⟩) whose constraint\nrelations are non-empty and have arity ≤m has a solution.\nProof. Statement (4) follows from Proposition 2.21, since if Γ has relational width k and\nP is an instance from CSP(Γ) then in order to determine if P has a solution, it suffices to\ntest if P ′, the equivalent k-minimal instance produced by the k-minimality algorithm, has\nnon-empty constraint relations. Statements (5) and (6) also follows from Proposition 2.21\nsince the constraint relations of P ′ belong to ⟨Γ⟩and their arities are no bigger than the\nmaximum of k and the arities of the constraint relations of P.\nIn the case where Γ happens to be a relational clone (i.e., Γ = ⟨Γ⟩) it follows from\nstatements (3) and (5) of the previous proposition that Γ has relational width k if and only\nif every k-minimal instance of CSP(Γ) whose constraint relations are all non-empty has a\nsolution. For the most part, we are interested in this type of constraint language in this\npaper.\nWe note that in [15, 16] it is shown that a finite constraint language has bounded\nrelational width if and only if it has bounded width in the sense of Feder-Vardi.\nThe\nfollowing conjecture is similar to Conjecture 2.19 and was proposed by Larose and Z ́adori\n[16] for constraint languages of bounded width.\nConjecture 2.24. Let A be a finite idempotent algebra. Then A is of bounded width if\nand only if V(A) omits the unary and affine types.\nIn [16] Larose and Z ́adori verify one direction of this conjecture, namely that if V(A)\nfails to omit the unary or affine types then A is not of bounded width. Note that in [2],\nBulatov proposes a conjecture that is parallel to 2.24. Larose and the second author have\nnoted that, as with the unary type, one need only check in HS(A) to determine if V(A)\nomits the unary and affine types when A is finite and idempotent (see Corollary 3.2 of [19]\nfor a more general version of this).\nThe main result of this paper can be regarded as providing some evidence in support of\nConjecture 2.24. Theorem 4.1 establishes that if A is a finite member of CD(3) then any\nfinite constraint language contained in ΓA is of bounded width and hence tractable.\n3. Algebras in CD(3)\nRecall that the variety V3 consists of all algebras A having four basic operations\npi(x, y, z), 0 ≤i ≤3 that satisfy the equations of Definition 2.13. Since the equations\ndictate that p0 and p3 are projections onto x and z respectively, they will play no role in\nthe analysis of algebras in CD(3)."},{"page":9,"text":"ON TRACTABILITY AND CONGRUENCE DISTRIBUTIVITY ∗\n9\n3.1. J ́onsson ideals. For A an algebra in V3, define x · y to be the binary term operation\np1(x, y, y) of A. Note that the J ́onsson equations imply that x · y = p2(x, y, y) as well. This\n“multiplication” will play a crucial role in the proof of the main theorem of this paper.\nDefinition 3.1. For X a subset of an algebra B ∈V3 let J(X) be the smallest subuniverse\nY of B containing X and satisfying the following closure property: if x is in Y and u ∈B\nthen u · x is also in Y .\nWe will call J(X) the J ́onsson ideal of B generated by X. The concept of a J ́onsson\nideal was developed in [19] for any algebra that generates a congruence distributive variety\nand was used in that paper to establish some intersection properties of subalgebras that are\nrelated to relational width.\nDefinition 3.2. A finite algebra B ∈V3 will be called J ́onsson trivial if it has no proper\nnon-empty J ́onsson ideals.\nNote that B is J ́onsson trivial if and only if J({b}) = B for all b ∈B. Also note that\nif B is J ́onsson trivial then every homomorphic image of it is, as well.\nWe now define a notion of distance in an algebra that will be applied to J ́onsson trivial\nalgebras to establish some useful features of the subalgebras of their cartesian products.\nDefinition 3.3. Let A and B be arbitrary similar algebras and S a subdirect subalgebra of\nA × B.\n(1) Let S0 = 0A and S1 be the relation on A defined by:\n(a, c) ∈S1 ⇐⇒(a, b), (c, b) ∈S for some b ∈B.\n(2) For k > 0, let Sk+1 = Sk ◦S1.\n(3) For a, b ∈A, we write d(a, b) = k if the pair (a, b) is in Sk and not in Sk−1 and will\nsay that the distance between a and b relative to S is k. If no such k exists, d(a, b)\nis said to be undefined.\n(4) If d(a, b) is defined for all a and b ∈A we say that A is connected with respect to S.\nProposition 3.4. Let A, B and S be as in the definition.\n(1) For each k ≥0, the relation Sk is a reflexive, symmetric subuniverse of A2.\n(2) If A is an idempotent algebra and c ∈A then for any k ≥0, the set of all elements\na with d(a, c) ≤k is a subuniverse of A.\n(3) If A is a simple algebra then either d(a, b) is undefined for all a ̸= b ∈A (equivalently\nS1 = 0A) or A is connected with respect to S.\nProof. The symmetry of S1 is immediate from its definition and its reflexivity follows from S\nbeing subdirect. To see that it is a subuniverse of A2, let t(x1, . . . , xn) be a term operation of\nA and (ai, bi) ∈S1 for 1 ≤i ≤n. Then for all i there are ci ∈B with (ai, ci) and (bi, ci) ∈S.\nApplying t to these pairs shows that (t( ̄a), t( ̄c)) and (t( ̄b), t( ̄c)) ∈S and so (t( ̄a), t( ̄b)) ∈S1.\nThis establishes that S1 is a subuniverse of A2. Since the relational product operation\npreserves the properties of symmetry, reflexivity and being a subuniverse, it follows that Sk\nhas all three properties, for k ≥0.\nSuppose that A is idempotent, c ∈A, and k ≥0. If t(x1, . . . , xn) is a term operation\nof A and ai ∈A with d(ai, c) ≤k, for 1 ≤i ≤n, then (ai, c) ∈Sk for all i. By the\nfirst claim of this proposition, it follows that (t(a1, . . . , an), t(c, . . . , c)) ∈Sk since Sk is a\nsubuniverse of A2. By idempotency we have t(c, . . . , c) = c and so (t(a1, . . . , an), c) ∈Sk,\nor d(t(a1, . . . , an), c) ≤k. This establishes the second claim of the proposition."},{"page":10,"text":"10\nE. KISS AND M. VALERIOTE\nFor the last claim, note that since S1 is a symmetric, reflexive subuniverse of A2 then\nits transitive closure is a congruence on A that is equal to the union of the Sk, k ≥0. Since\nA is assumed to be simple then this congruence is either 0A or 1A. In the former case we\nconclude that d(a, b) is undefined for all a ̸= b ∈A and in the latter case that for all a,\nb ∈A, (a, b) ∈Sk for some k ≥0 and so d(a, b) is defined.\nLemma 3.5. Let A and B be finite algebras in V3 and S a subdirect subalgebra of A × B.\nSuppose that A is connected with respect to S. Then for every x, y, z ∈A we have\nd(x · y, z) ≤max\n d(x, y) + 1\n2\n \n, d(y, z)\n \n.\nProof. Let d(y, z) = m, d(x, y) = n and choose elements ai ∈A for 0 ≤i ≤n with x = a0,\nan = y and (ai, ai+1) ∈S1 for 0 ≤i < n. For k the largest integer below [(n + 1)/2] we get\nthat d(x, ak) and d(ak, y) are both at most k. Therefore if d = max(k, m), then the pairs\n(x, ak), (y, ak), (y, z) are in Sd, and so\n(p2(x, y, y), p2(ak, ak, z)) ∈Sd .\nBut p2(x, y, y) = x · y and p2(ak, ak, z) = z, proving the lemma.\nCorollary 3.6. For A, B and S as in the previous lemma, suppose that d(a, b) ≤n for all\na, b ∈A. Let m ≥[(n + 1)/2] be any integer and c ∈A. Then the set of all elements of A\nwhose distance from c is at most m is a J ́onsson ideal of A.\nProof. As noted earlier the set I = {a ∈A : d(a, c) ≤m} is a subuniverse of A since A\nis idempotent. We need only show that I is closed under multiplication on the left. So,\nsuppose that a ∈I and u ∈A. Since d(u, c) ≤n, we have d(u · a, c) ≤max(m, d(a, c)) ≤m\nby the previous lemma.\nCorollary 3.7. Let A and B be finite members of V3 such that A is J ́onsson trivial and\nconnected with respect to some subdirect subalgebra S of A × B. Then d(a, b) ≤1 for all a,\nb ∈A (or equivalently, S1 = A2).\nProof. Suppose that the maximum distance n between the points of A is at least 2 and\nthat a, b ∈A with d(a, b) = n. Then m, the largest integer below [(n + 1)/2] is less than\nn. From the previous lemma, the set of all elements u ∈A with d(a, u) ≤m is a proper\nJ ́onsson ideal of A, contradicting that A is J ́onsson trivial.\nLemma 3.8. Let A, B be finite members of V3 with A J ́onsson trivial and simple and let\nS be a subdirect subalgebra of A × B. Then either S = A × B, or S is the graph of an onto\nhomomorphism from B to A.\nProof. As A is simple, then either S1 = 0A or A is connected with respect to S. In the\nformer case, we conclude that S is the graph of an onto homomorphism from B to A and\nin the latter, it follows from the previous corollary that S1 = A2.\nFor a ∈A, let Ba = {b ∈B : (a, b) ∈S} and choose a with |Ba| maximal. Let I denote\nthe set of those elements x of A for which Bx = Ba. To complete the proof we will need to\ndemonstrate that I = A and Ba = B. To show that I = A it will suffice to prove that it is\na J ́onsson ideal of A.\nIndeed, let u ∈A and c ∈I be arbitrary. Then (u, c) ∈S1 (since S1 = A2) and therefore\nthere is a b ∈B such that (u, b) and (c, b) are in S. Note that since c ∈I then b ∈Ba. If d\nis any element of Ba then c ∈I implies that (c, d) ∈S, so we get that\n(p2(u, c, c), p2(b, b, d)) = (u · c, d) ∈S."},{"page":11,"text":"ON TRACTABILITY AND CONGRUENCE DISTRIBUTIVITY ∗\n11\nSince this holds for every d ∈Ba, we conclude that u · c ∈I. Finally, since S is subdirect\nit follows that Ba = B.\nWe apply this lemma to obtain a simple description of subdirect products of finite,\nsimple, J ́onsson trivial members of V3 and then show how to use this description to prove\nthat certain k-minimal instances of the CSP have solutions, when k ≥3.\nLemma 3.9. Let Ai, for 1 ≤i ≤n, be finite members of V3 with A1 J ́onsson trivial. Let\nS be a subdirect product of the Ai’s such that for all 1 < i ≤n, the projection of S onto\ncoordinates 1 and i is equal to A1 × Ai. Then S = A1 × D, where D = proj{2≤i≤n}(S).\nProof. We prove this by induction on n. For n = 2, the result follows by our hypotheses.\nConsider the case n = 3 and let D be the projection of S onto A2 × A3. Let (u, v) ∈D\nand let I(u,v) = {a ∈A1 : (a, u, v) ∈S}. Our goal is to show that I(u,v) = A1 and we\ncan accomplish this by showing that it is a non-empty J ́onsson ideal. Clearly I(u,v) is a\nnon-empty subuniverse of A1 since all algebras involved are idempotent.\nLet a ∈I(u,v), b ∈A1 and choose elements y ∈A3 and x ∈A2 with (b, u, y) and\n(a, x, y) ∈S. By our hypotheses, these elements exist. Applying p2 to these elements, along\nwith (a, u, v), we get the element (b · a, u, v), showing that b · a ∈I(u,v). Thus I(u,v) is a\nJ ́onsson ideal.\nNow, consider the general case and suppose that the result holds for products of fewer\nthan n factors. Let S1 = proj{1≤i<n}(S) and S2 = proj{2≤i<n}(S). Then S is isomorphic\nto a subdirect product of A1, S2 and An and, by induction, S1 = A1 × S2. Then, applying\nthe result with n = 3 to this situation, we conclude that S = A1 × D, as required.\nCorollary 3.10. Let Ai be finite, simple, J ́onsson trivial members of V3, for 1 ≤i ≤n,\nand let S be a subdirect product of the Ai’s. If, for all 1 ≤i < j ≤n, the projection of S\nonto Ai × Aj is not the graph of a bijection then S = Q\n1≤i≤n Ai.\nProof. For 1 ≤i < j ≤n, we have, by Lemma 3.8 that either the projection of S onto\nAi × Aj is the graph of a bijection between the two factors (since they are both simple) or\nis the full product. The former case is ruled out by assumption and so we are in a position\nto apply the previous lemma inductively to reach the desired conclusion.\nDefinition 3.11. A subdirect product S of the algebras Ai, 1 ≤i ≤n, is said to be almost\ntrivial if, after suitably rearranging the coordinates, there is a partition of {1, 2, . . . , n} into\nintervals Ij, 1 ≤j ≤p, such that S = projI1(S) × · · · × projIp(S) and, for each j, if\nIj = {i : u ≤i ≤v} then there are bijections πi : Au →Ai, for i ∈Ij such that\nprojIj(S) = {(a, πu+1(a), . . . , πv(a)) : a ∈Au}.\nCorollary 3.12. Let Ai be finite, simple, J ́onsson trivial members of V3, for 1 ≤i ≤n,\nand let S be a subdirect product of the Ai’s. Then S is almost trivial.\nProof. For 1 ≤i, j ≤n, set i ∼j if i = j or the projection of S onto Ai and Aj is equal to\nthe graph of a bijection between these two factors. In this case, let πi,j denote this bijection.\nIt is not hard to see that ∼is an equivalence relation on the set {1, 2, . . . , n} and, by\napplying Lemma 3.8, if i ̸∼j then the projection of S onto Ai and Aj is equal to Ai × Aj.\nBy using the bijections πi,j and Corollary 3.10 it is elementary to show that S is indeed\nalmost trivial."},{"page":12,"text":"12\nE. KISS AND M. VALERIOTE\nFor A a finite sequence of finite algebras, P = (A, C) denotes a multi-sorted instance\nof the CSP whose domains are the universes of the algebras in A and whose constraint\nrelations are subuniverses of cartesian products of members from A.\nTheorem 3.13. Let A be a finite sequence of finite, simple, J ́onsson trivial members of V3\nand let P = (A, C) be a subdirect, k-minimal instance of the CSP for some k ≥3. If the\nconstraint relations of P are all non-empty then P has a solution.\nDefinition 3.11 and analogs of Corollary 3.12 and Theorem 3.13 can be found at the\nend of Section 3.3 in [3]. The proof of Corollary 3.4 given in that paper can be used to\nprove our Theorem 3.13. As we shall see, this theorem will form the base of the inductive\nproof of our main result.\n3.2. The reduction to J ́onsson trivial algebras. The goal of this subsection is to show\nhow to reduce a k-minimal instance P of the CSP whose domains all lie in V3 and whose\nconstraint relations are all non-empty to another k-minimal, subdirect instance P ′ whose\ndomains are all J ́onsson trivial and whose constraint relations are non-empty. In order to\naccomplish this, we will need to work with a suitably large k ≥3.\nTo start, let A = (A1, . . . , An) be a sequence of finite algebras from V3 and let M =\nmax{|Ai| : 1 ≤i ≤n}. Let k > 0 and P = (A, C) be a k-minimal instance of the CSP with\nC consisting of the constraints Ci = (Si, Ri), 1 ≤i ≤m. By taking suitable subalgebras\nof the Ai we may assume that P is subdirect and, of course, we also assume that the Ri\nare all non-empty. In addition, k-minimality assures that we may assume that the scope of\neach constraint of P consists of at least k variables and that no two constraints have the\nsame k-element set as their scopes.\nSince P is k-minimal then its system of partial solutions over k-element sets satisfies\nan important compatibility property. Namely, if I and K are k-element sets of coordinates\nthen proj(I∩K)(PI) = proj(I∩K)(PK). In this section we will denote PI by Λ(I) and call this\nfunction the k-system (of partial solutions) determined by P. Since P is subdirect then for\nall I, Λ(I) will be a subdirect product of the algebras Ai, for i ∈I.\nWe wish to consider the situation in which some Ai, say A1, has a proper J ́onsson ideal\nJ. The main result of this subsection is that if the scopes of the constraints of P all have\nsize at most k (and hence exactly k), or if k ≥M2 then we can reduce the question of the\nsolvability of P to the solvability of a k-minimal instance with A1 replaced by J. Doing\nso will allow us to proceed by induction to reduce our original instance down to one whose\ndomains are all J ́onsson trivial.\nSo, let J be a proper non-empty J ́onsson ideal of A1 and define ΛJ to be the following\nfunction on the set of k-element subsets of {1, 2, . . . , n}:\n• If I is a k-element set that includes 1 then define ΛJ(I) to be {⃗a ∈Λ(I) : ⃗a(1) ∈J}.\n• If 1 /∈I, define ΛJ(I) to be the set of all ⃗a ∈Λ(I) such that for all i ∈I the\nrestriction of ⃗a to I \\ {i} can be extended to an element of ΛJ({1} ∪(I \\ {i})).\nLemma 3.14. If k ≥3 then\n(1) ΛJ(I) is non-empty for all I and if 1 ∈I then the projection of ΛJ(I) onto the first\ncoordinate is equal to J.\n(2) For I, K, k-element subsets of {1, 2, . . . , n}, proj(I∩K)(ΛJ(I)) = proj(I∩K)(ΛJ(K))."},{"page":13,"text":"ON TRACTABILITY AND CONGRUENCE DISTRIBUTIVITY ∗\n13\nProof. Since P is subdirect then for any k-element set I with 1 ∈I we have that ΛJ(I) is\nnon-empty and projects onto J in the first coordinate.\nLet I be some k-element set of coordinates with 1 /∈I.\nFor ease of notation, we\nmay assume that I = {2, 3, . . . , k, k + 1}. Let ⃗a = (a1, a2, a3, . . . , ak) be any member of\nΛJ({1, 2, . . . , k}). We will show that there is some ak+1 ∈Ak+1 such that (a2, a3, . . . , ak+1) ∈\nΛJ(I). This will not only show that ΛJ(I) is non-empty, but will also allow us to easily\nestablish condition (2) of the lemma.\nWe construct the element ak+1 as follows. Since Λ is the k-system for P then there\nis some element u ∈Ak+1 such that (a2, . . . , ak, u) ∈Λ(I). Furthermore, there is some\nv ∈Ak+1 such that (a1, a3, . . . , ak, v) ∈Λ({1, 3, . . . , k + 1}) and then some v′ ∈A2\nwith (v′, a3, . . . , ak, v) ∈Λ(I). Similarly, there are w and w′ with (a1, a2, a4, . . . , ak, w) ∈\nΛ{1, 2, 4, . . . , k + 1}) and (a2, w′, a4, . . . , ak, w) ∈Λ(I). Let ak+1 = p1(u, v, w) ∈Ak+1. By\napplying p1 to the tuples (a2, . . . , ak, u), (v′, a3, . . . , ak, v) and (a2, w′, a4, . . . , ak, w) we see\nthat the tuple (a2, a3, . . . , ak+1) ∈Λ(I).\nWe now need to show that for all 2 ≤i ≤k + 1 there is some b ∈J with\n(b, a2, . . . , ai−1, ai+1, . . . , ak+1) ∈ΛJ({1, 2, . . . , i −1, i + 1, . . . , k + 1}).\nThere are a number of cases to consider.\n• If i = k + 1 then the tuple (a2, . . . , ak) extends to (a1, a2, . . . , ak), a member of\nΛJ({1, 2, . . . , k}), as required.\n• If i = 2: There are x ∈A1 and y ∈A3 with (x, a3, . . . , ak, u) and (a1, y, a4, . . . , ak, w)\nin Λ({1, 3, . . . , k+1}). Applying p1 to these tuples and the tuple (a1, a3, a4, . . . , ak, v)\n(in the second variable) produces the tuple (x·a1, a3, . . . , ak, ak+1) ∈Λ({1, 3, . . . , k+\n1}). Since a1 ∈J and J is a J ́onsson ideal, then x · a1 ∈J and so this tuple belongs\nto ΛJ({1, 3, . . . , k + 1}), as required.\n• If i = 3 or 3 < i < k + 1 then small variations of the previous argument will work.\nTo complete the proof of this lemma we need to establish the compatibility of ΛJ on\noverlapping elements of its domain. Let I and L be distinct members of the domain of ΛJ\nwith non-empty intersection N and let i ∈I \\ L and l ∈L \\ I.\nLet ⃗a ∈ΛJ(I) and let ⃗c be the projection of ⃗a onto the coordinates in N. The restriction\nof ⃗a to I \\ {i} extends to an element ⃗a′ ∈ΛJ({1} ∪(I \\ {i})). Since Λ is the k-system for\nP, the restriction of ⃗a′ to {1} ∪N extends to an element ⃗b′ of Λ({1} ∪(L \\ {l})). Note that\n⃗b′(1) ∈J and the restriction of ⃗b′ to N is ⃗c. By the first part of this proof, it follows that\nthe restriction of ⃗b′ to L \\ {l} extends to an element ⃗b of ΛJ(L) as required.\nCorollary 3.15. If all of the constraints of P have scopes of size k then there is a k-\nminimal instance PJ of the constraint satisfaction problem over the domains J and the\nAi, for 2 ≤i ≤n, whose constraint relations are all non-empty and whose solution set is\ncontained in the solution set of P.\nProof. It follows from our assumptions on the sizes of the scopes of the constraints of P\nthat the constraints can be indexed by the k-element subsets of {1, 2, . . . , n} and that for\nsuch a subset I, the constraint CI is of the form (I, RI) where RI is a subdirect product of\nthe algebras Ai, for i ∈I.\nWe set PJ to be the instance of the CSP over the domains J and the Ai, for 2 ≤i ≤n,\nthat has, for each k-element subset I of {1, 2, . . . , n}, the constraint C′\nI = (I, R′\nI), where\nR′\nI = ΛJ(I). It follows by construction and from the previous lemma that PJ is a k-minimal"},{"page":14,"text":"14\nE. KISS AND M. VALERIOTE\ninstance of the CSP whose constraint relations are all non-empty and whose solutions are\nalso solutions of P.\nThe previous corollary can be used to establish the tractability of the constraint lan-\nguages arising from finite members of V3, while the following lemma will be used to prove\nthat these languages are in fact globally tractable.\nLemma 3.16. Assume that k ≥M2 and let C = (S, R) be a constraint of P. Then there is\na subuniverse RJ of R such that for all k-element subsets I of S, the projection of R onto\nI is equal to ΛJ(I).\nProof. For K a subset of S and ⃗a ∈R, we will say that ⃗a is reduced over K if for all\n(k −1)-element subsets I of K, the restriction of ⃗a to I can be extended to an element of\nΛJ({1} ∪I). We define RJ to be the set of all tuples ⃗a ∈R that are reduced over S. RJ is\nalso equal to all elements ⃗a of R such that for all k-element subsets I of S, the restriction\nof ⃗a to I is in ΛJ(I). RJ is naturally a subuniverse of R and so the challenge is to show\nthat it satisfies the conditions of the lemma. Our proof breaks into two cases, depending\non whether or not the coordinate 1 is in S.\nSuppose that 1 ∈S. We may assume that S = {1, 2, . . . , m} for some m ≤n. We need\nto show that if I is a k element subset of S and ⃗a ∈ΛJ(I) then there is some ⃗b ∈RJ whose\nrestriction to I is ⃗a.\nFirst consider the sub-case where 1 ∈I. If ⃗a ∈ΛJ(I) then by the k-minimality of P\nthere is some ⃗b ∈R whose restriction to I is ⃗a. Since ⃗b(1) = ⃗a(1) ∈J it follows that ⃗b is in\nRJ, as required.\nNow, suppose that 1 /∈I and assume that I = {2, 3, . . . , k + 1}. By the k-minimality\nof P there is some ⃗c ∈R whose restriction to I is ⃗a. For each 2 ≤i ≤k + 1 there is some\nji ∈J and some ⃗ci ∈R such that ⃗ci(1) = ji and such that the restrictions of ⃗ci and ⃗a to\nI \\ {i} are the same.\nSince k > |J| it follows from the Pigeonhole principle that there are i ̸= l with ji = jl.\nWe may assume that i = 2 and l = 3 and set j = ji. Define ⃗b to be p1(⃗c,⃗c2,⃗c3). This\nelement belongs to R and satisfies: ⃗b(1) = ⃗c(1) · j ∈J and the restriction of ⃗b to I is ⃗a.\nTo establish this equality over coordinate 2 we make use of the identity p1(x, y, x) = x and\nover coordinate 3 p1(x, x, y) = x. Finally, ⃗b is in RJ since ⃗b(1) ∈J.\nFor the remaining case, assume that 1 /∈S, say S = {2, 3, . . . , m + 1}. We will show by\ninduction on s that if k −1 ≤s ≤m −1, K is a subset of {2, 3, . . . , m + 1} of size s and\n⃗a ∈R is reduced over K then if i ∈S \\ K there is some ⃗b ∈R that is reduced over K ∪{i}\nand such that projK(⃗a) = projK(⃗b). A consequence of this claim is that for any k-element\nsubset I of S, any element of ΛJ(I) can be extended to a member of RJ. From this, the\nlemma follows.\nLemma 3.14 establishes the base of this induction. Assume the induction hypothesis\nholds for k −1 ≤s < m −1 and let K be a subset of {2, 3, . . . , m + 1} of size s + 1. By\nsymmetry, we may assume that K = {2, 3, . . . , s + 2}. Let ⃗a ∈R be reduced over K. We\nwill show that there is some ⃗a′ ∈R which equals ⃗a over K and is reduced over K ∪{s + 3}.\nBy the induction hypothesis, for each 2 ≤i ≤s + 2 there is some ⃗ai ∈R such that the\nprojections of ⃗a and ⃗ai onto K \\ {i} are the same and ⃗ai is reduced over (K ∪{s + 3}) \\ {i}.\nBy the Pigeonhole principle it follows that there is some a ∈As+3 and a set Q contained\nin K of size at least M such that for i ∈Q, ⃗ai(s + 3) = a."},{"page":15,"text":"ON TRACTABILITY AND CONGRUENCE DISTRIBUTIVITY ∗\n15\nLet i and l be distinct members of Q and let ⃗a′ be the element p1(⃗a,⃗ai,⃗al) of R. Note\nthat over the coordinates in K, ⃗a′ and ⃗a are equal and that at s + 3, ⃗a′ equals b · a, where\nb = ⃗a(s + 3).\nWe claim that ⃗a′ is reduced over K ∪{s + 3}. To establish this we need to show that\nover any subset U of K ∪{s + 3} of size k −1, the restriction to U of ⃗a′ can be extended\nto a member of ΛJ({1} ∪U). When U avoids the coordinate s + 3 there is nothing to do,\nsince ⃗a is reduced over K.\nSo, assume that U contains s + 3 and let ⃗d be an extension to some element in Λ({1} ∪\nU) of the restriction of ⃗a to U.\nSince for each v ∈Q the element ⃗av is reduced over\n(K ∪{s + 3}) \\ {v} then there is a member ⃗cv of ΛJ({1} ∪U) whose restriction to U \\ {v}\nis equal to the restriction of ⃗av over this set. If there is some v ∈Q \\ U then the element\np1(⃗d,⃗cv,⃗cv) ∈ΛJ({1} ∪U) witnesses that the restriction of ⃗a′ to U can be extended as\ndesired.\nIf, on the other hand, Q ⊆U then choose two elements u and v of Q such that\n⃗cu(1) = ⃗cv(1) ∈J. An application of the Pigeonhole principle ensures the existence of these\nelements since |Q| > |J|. Then, the element p1(⃗d,⃗cu,⃗cv) ∈ΛJ({1} ∪U) and its restriction\nto U is equal the restriction of ⃗a′ on U.\nCorollary 3.17. If k ≥M2 then there is a k-minimal instance PJ of the constraint sat-\nisfaction problem over J and the Ai, for 2 ≤i ≤n, whose constraint relations are all\nnon-empty and whose solution set is contained in the solution set of P.\nProof. From the preceding lemma it follows that the instance PJ over the domains J and\nthe Ai, for 2 ≤i ≤n, with constraints C′ = (S, RJ), for each constraint C = (S, R) of P, is\nk-minimal and has all of its constraint relations non-empty. Since the constraint relations\nof PJ are subsets of the corresponding constraint relations of P then the result follows.\nTheorem 3.18. Let A = (A1, . . . , An) be a sequence of finite algebras from V3 and let\nP = (A, C) be a k-minimal instance of the CSP whose constraint relations are non-empty.\nIf k ≥3 and the sizes of the scopes of the constraints of P are bounded by k or if k ≥M2,\nwhere M = max{|Ai| : 1 ≤i ≤n}, then there is a subdirect k-minimal instance P ′ of the\nCSP over J ́onsson trivial subalgebras of the Ai such that the constraint relations of P ′ are\nnon-empty and the solution set of P ′ is contained in the solution set of P.\nProof. This theorem is proved by repeated application of Corollaries 3.15 and 3.17.\n3.3. The reduction to simple algebras. In this subsection we show, for k ≥3, how to\nreduce a k-minimal instance of the CSP whose domains are J ́onsson trivial members of V3\nand whose constraint relations are all non-empty to one which has in addition, domains\nthat are simple algebras. Our development closely follows parts of the proof of Theorem\n3.1 in [3].\nDefinition 3.19. Let Ai, 1 ≤i ≤m, be similar algebras and let Θ = (θ1, . . . , θm) be a\nsequence of congruences θi ∈Con (Ai).\n(1) Qm\ni=1 θi denotes the congruence on Qm\ni=1 Ai that identifies two m-tuples ⃗a and ⃗b if\nand only if (ai, bi) ∈θi for all i.\n(2) If I is a subset of {1, 2, . . . , m} and R is a subalgebra of Q\ni∈I Ai then R/Θ denotes\nthe quotient of R by the restriction of the congruence Q\ni∈I θi to R."},{"page":16,"text":"16\nE. KISS AND M. VALERIOTE\nLet A = (A1, . . . , An) be a sequence of finite, J ́onsson trivial members of V3 and let\nP = (A, C) be a subdirect, k-minimal instance of the CSP whose constraint relations are all\nnon-empty. Let C = {C1, C2, . . . , Cm} where, for 1 ≤i ≤m, Ci = (Si, Ri) for some subset\nSi of {1, 2, . . . , n} and some subuniverse Ri of Q\ni∈Si Ai. Suppose that one of the Ai is not\nsimple, say for i = 1, and let θ1 be a maximal proper congruence of A1.\nRecall that for I ⊆{1, 2, . . . , n}, PI denotes the set of partial solutions of P over the\nvariables I.\nIf |I| ≤k then since P is k-minimal, PI is non-empty and is a subdirect\nsubuniverse of Q\ni∈I Ai.\nSince the algebra A1/θ1 is a simple, J ́onsson trivial algebra then it follows by Lemma\n3.8 that for 2 ≤i ≤n, P{1,i}/(θ1 × 0Ai) is either the graph of a homomorphism πi from\nAi onto A1/θ1 or is equal to A1/θ1 × Ai. Let W consist of 1 along with the set of all i for\nwhich the former holds. For 2 ≤i ≤n, let θi be the kernel of the map πi if i ∈W, and 0Ai\notherwise.\nLet Θ = (θ1, . . . , θn) and set P/Θ = (A/Θ, C/Θ) where A/Θ = (A1/θ1, . . . , An/θn)\nand C/Θ consists of the constraints Ci/Θ = (Si, Ri/Θ), for 1 ≤i ≤m.\nNote that since P is subdirect and k-minimal then so is P/Θ and that each Ai/θi is\nJ ́onsson trivial, since this property is preserved by taking quotients.\nLemma 3.20. If the instance P/Θ has a solution, then there is some k-minimal instance\nP ′ = (A′, C′) such that\n• A′ = (A′\n1, . . . , A′\nn), where for each 1 ≤i ≤n, A′\ni a subalgebra of Ai.\n• A′\n1 is a proper subset of A1,\n• C′ = {C′\n1, . . . , C′\nm} where, for each 1 ≤i ≤m, C′\ni = (Si, R′\ni) for some non-empty\nsubuniverse R′\ni of Ri.\nHence, any solution of P ′ is a solution of P.\nProof. Let (s1, . . . , sn) be a solution of P/Θ. We can regard each si as a congruence block\nof θi and hence as a subuniverse of Ai. For i ∈W, define A′\ni to be the subalgebra of Ai\nwith universe si and for i /∈W, set A′\ni = Ai. For 1 ≤j ≤m, let\nR′\nj = Rj ∩\nY\ni∈Sj\nA′\ni.\nWe now set out to prove that the instance P ′ = (A′, C′) has the desired properties.\nSince θ1 is a proper congruence of A1 then s1 is a proper subset of A1 and so A′\n1 is properly\ncontained in A1. Since (s1, . . . , sn) is a solution to P/Θ it follows that for 1 ≤j ≤m, R′\nj is\na non-empty subuniverse of Rj.\nWe need only verify that P ′ is k-minimal, so let 1 ≤a < b ≤m and I be some subset\nof Sa ∩Sb of size at most k. To establish that projI(R′\na) = projI(R′\nb) it will suffice to show\nthat\nprojI(R′\ni) = projI(Ri) ∩\nY\nl∈I\nA′\nl.\nfor all i, since P is k-minimal.\nBy the definition of R′\ni it is immediate that the relation on the left of the equality sign\nis contained in that on the right. In the case that W ∩Si = ∅the other inclusion is also\nclear.\nIf W ∩Si ̸= ∅we have that projW ∩Si(Ri/Θ) is a subdirect product of simple, J ́onsson\ntrivial algebras that are all isomorphic to A1/θ1. Since the projection of this subdirect\nproduct onto any two coordinates in W ∩Si is equal to the graph of a bijection then in fact,"},{"page":17,"text":"ON TRACTABILITY AND CONGRUENCE DISTRIBUTIVITY ∗\n17\nthe entire subdirect product is isomorphic to A1/θ1 in a natural way (using the bijections\nπi from the definition of W). Then, using Lemma 3.9 and the definition of W (or more\nprecisely, the complement of W), we conclude that Ri/Θ is isomorphic to A1/θ1 ×D, where\nD = proj(Si\\W )(Ri).\nNow, suppose that ⃗a ∈projI(Ri)∩Q\nl∈I A′\nl. Then there is some⃗b ∈Ri with projI(⃗b) = ⃗a.\nIf W ∩I = ∅then, by the concluding remark of the previous paragraph, proj(Si\\W )(⃗b) and\nhence projI(⃗b) can be extended to an element of Ri that lies in Q\nl∈Si A′\nl (here we use the\nfact that we have a solution of P/Θ to work with). This establishes that, in this case,\n⃗a ∈projI(R′\ni).\nFinally, suppose that for some w we have w ∈W ∩I. The vector ⃗b from Ri that projects\nonto ⃗a over I has the property that ⃗b(w) ∈sw (since ⃗a does). The structure of Ri/Θ worked\nout earlier implies that ⃗b(l) ∈sl for all l ∈W ∩Si since (s1, . . . , sn) is a solution to P/Θ.\nFrom this we conclude that ⃗b ∈R′\ni, as required.\n4. Proof of the main result\nIn the preceding section we established techniques for reducing k-minimal instances\nof the CSP over domains from V3 to more manageable instances. The following theorem\nemploys these techniques to establish the finite relational width of constraint languages\narising from finite algebras in CD(3).\nLet A be a finite algebra in CD(3).\nThen A has term operations p1(x, y, z) and\np2(x, y, z) that satisfy the equations:\npi(x, y, x)\n=\nx , i = 1, 2\np1(x, x, y)\n=\nx\np1(x, y, y)\n=\np2(x, y, y)\np2(x, x, y)\n=\ny\nRecall that associated with A is the constraint language ΓA = Inv(A), consisting of all\nrelations invariant under the basic operations of A.\nTheorem 4.1. If Γ is a subset of ΓA whose relations all have arity k or less, for some\nk ≥3, then Γ has relational width k. In any case, if M = |A|2 then ΓA has relational width\nM.\nCorollary 4.2. If Γ is a finite subset of ΓA then Γ is tractable and is of bounded width in\nthe sense of Feder-Vardi. Furthermore, ΓA is globally tractable.\nProof. (of the Theorem) We may assume that A = (A, p0, p1, p2, p3), where p0(x, y, z) = x\nand p3(x, y, z) = z for all x, y, z ∈A since if we can establish the theorem for this sort\nof algebra, it will then apply to all algebras with universe A that have the pi as term\noperations.\nOur assumption on A places it in the variety V3 and so the results from the previous\nsection apply. Let Γ be a subset of ΓA. If Γ is finite, let k be the maximum of 3 and the\narities of the relations in Γ and replace Γ by Γk, the set of all relations in ΓA of arity k or\nless. Establishing relational width k for this enlarged Γ will, of course, be a stronger result.\nIf Γ is not finite, replace it by ΓA and set k = |A|2. We will show that in either case, Γ has\nrelational width k."},{"page":18,"text":"18\nE. KISS AND M. VALERIOTE\nFrom statements (5) or (6) of Proposition 2.23 it will suffice to show that if P is a\nk-minimal instance of CSP(Γ) whose constraint relations are all non-empty then P has a\nsolution. We may express P in the form (A, C) where A = (A, A, . . . , A) is a sequence of\nlength n, for some n > 0, and where C is a set of constraints of the form C = (S, R), for\nsome non-empty subset S of {1, 2, . . . , n} and some non-empty subuniverse R of A|S|.\nIn order to apply the results from the previous section as seamlessly as possible, we\nenlarge our language Γ to a closely related, but larger, multi-sorted language. Let H be the\nset of all quotients of subalgebras of A. Note that H is finite and all algebras in it have\nsize at most |A|. If Γ = Γk, replace it with the set of all subuniverses of l-fold products of\nalgebras from H, for all 1 ≤l ≤k, and otherwise, replace it by the set of all subuniverses of\nfinite products of algebras from H. In both cases, we have extended our original constraint\nlanguage. P can now be viewed as a k-minimal instance of CSP(Γ), the class of multi-\nsorted CSPs whose instances have domains from H and whose constraint relations are from\nΓ.\nWe now prove that every k-minimal instance of CSP(Γ) whose constraint relations are\nnon-empty has a solution. If this is not so, let Q be a counter-example such that the sum\nof the sizes of the domains of Q is as small as possible. Note that independent of this size,\nno domain of Q is bigger than |A| since they all come from H. Also note that Q must be\nsubdirect.\nFrom Theorem 3.18 it follows that all of the domains of Q are J ́onsson trivial. Then,\nfrom Lemma 3.20 we can deduce that all of the domains of Q are simple. If not, then\neither there is a proper quotient of Q that is k-minimal and that does not have a solution,\nor the k-minimal instance produced by the lemma cannot have a solution. In either case,\nwe contradict the minimality of Q. Thus Q is a subdirect, k-minimal instance of CSP(Γ)\nwhose domains are all simple and J ́onsson trivial and whose constraint relations are all non-\nempty. From Theorem 3.13 we conclude that in fact Q has a solution. This contradiction\ncompletes the proof of the theorem.\n5. Conclusion\nThe main result of this paper establishes that for certain constraint languages Γ that\narise from finite algebras that generate congruence distributive varieties, the problem class\nCSP(Γ) is tractable. This class of constraint languages includes those that are compatible\nwith a majority operation but also includes some languages that were not previously known\nto be tractable.\nWe feel that the proof techniques employed in this paper may be useful in extending\nour results to include all constraint languages that arise from finite algebras that generate\ncongruence distributive varieties and perhaps beyond.\nProblem 1: Extend the algebraic tools developed to handle algebras in CD(3) to algebras\nin CD(n) for any n > 3. In particular, generalize the notion of a J ́onsson ideal to this wider\nsetting.\nWe note that in [19] some initial success at extending the notion of a J ́onsson ideal has\nbeen obtained.\nThe bound on relational width established for the languages addressed in this paper\nseems to depend on the size of the underlying domain of the language. Nevertheless, we are"},{"page":19,"text":"ON TRACTABILITY AND CONGRUENCE DISTRIBUTIVITY ∗\n19\nnot aware of any constraint language that has finite relational width that is not of relational\nwidth 3.\nProblem 2: For each n > 3, produce a constraint language Γn that has relational width n\nand not n−1. As a strengthening of this problem, find Γn that in addition have compatible\nnear unanimity operations.\n6. Acknowledgments\nThe first author acknowledges the support of the Hungarian National Foundation for\nScientific Research (OTKA), grants no. T043671 and T043034, while the second, the sup-\nport of the Natural Sciences and Engineering Research Council of Canada.\nSupport of\nthe Isaac Newton Institute for Mathematical Sciences and the organizers of the Logic and\nAlgorithms programme is also gratefully acknowledged.\nReferences\n[1] Andrei Bulatov. Tractable conservative constraint satisfaction problems. In Phokion G. Kolaitis, editor,\nProceedings of the Eighteenth Annual IEEE Symp. on Logic in Computer Science, LICS 2003, pages\n321–330. IEEE Computer Society Press, June 2003.\n[2] Andrei Bulatov. A graph of a relational structure and constraint satisfaction problems. In Proceedings\nof the 19th Annual IEEE Symposium on Logic in Computer Science, 2004, pages 448–457. IEEE, 2004.\n[3] Andrei Bulatov. Combinatorial problems raised from 2-semilattices. Journal of Algebra, 298(2):321–339,\n2006.\n[4] Andrei Bulatov and Peter Jeavons. Algebraic structures in combinatorial problems. submitted for pub-\nlication.\n[5] Andrei Bulatov, Peter Jeavons, and Andrei Krokhin. Classifying the complexity of constraints using\nfinite algebras. SIAM J. Comput., 34(3):720–742 (electronic), 2005.\n[6] Andrei A. Bulatov. A dichotomy theorem for constraint satisfaction problems on a 3-element set. J.\nACM, 53(1):66–120, 2006.\n[7] Stanley Burris and H. P. Sankappanavar. A course in universal algebra, volume 78 of Graduate Texts\nin Mathematics. Springer-Verlag, New York, 1981.\n[8] Matthias Clasen and Matthew Valeriote. Tame congruence theory. In Lectures on algebraic model theory,\nvolume 15 of Fields Inst. Monogr., pages 67–111. Amer. Math. Soc., Providence, RI, 2002.\n[9] Victor Dalmau. Generalized majority-minority operations are tractable. In Prakash Panangaden, editor,\nProceedings of the Twentieth Annual IEEE Symp. on Logic in Computer Science, LICS 2005, pages\n438–447. IEEE Computer Society Press, June 2005.\n[10] Tom ́as Feder and Moshe Y. Vardi. Monotone monadic snp and constraint satisfaction. In STOC ’93:\nProceedings of the twenty-fifth annual ACM symposium on Theory of computing, pages 612–622, New\nYork, NY, USA, 1993. ACM Press.\n[11] Tom ́as Feder and Moshe Y. Vardi. The computational structure of monotone monadic SNP and con-\nstraint satisfaction: a study through Datalog and group theory. SIAM J. Comput., 28(1):57–104 (elec-\ntronic), 1999.\n[12] David Hobby and Ralph McKenzie. The structure of finite algebras, volume 76 of Contemporary Math-\nematics. American Mathematical Society, Providence, RI, 1988. Revised edition: 1996.\n[13] Peter Jeavons. On the algebraic structure of combinatorial problems. Theoret. Comput. Sci., 200(1-\n2):185–204, 1998.\n[14] Peter Jeavons, David Cohen, and Martin C. Cooper. Constraints, consistency and closure. Artificial\nIntelligence, 101(1-2):251–265, 1998.\n[15] Benoit Larose. Some notes on bounded widths. unpublished, 2004.\n[16] Benoit Larose and L ́aszl ́o Z ́adori. Bounded width problems and algebras. Accepted by Algebra Univer-\nsalis, 2006."},{"page":20,"text":"20\nE. KISS AND M. VALERIOTE\n[17] R. McKenzie, G. McNulty, and W. Taylor. Algebras, Lattices, Varieties Volume 1. Wadsworth and\nBrooks/Cole, Monterey, California, 1987.\n[18] Thomas J. Schaefer. The complexity of satisfiability problems. In Conference Record of the Tenth Annual\nACM Symposium on Theory of Computing (San Diego, Calif., 1978), pages 216–226. ACM, New York,\n1978.\n[19] Matthew Valeriote. A subalgebra intersection property for congruence distributive varieties. Canadian\nJournal of Mathematics, accepted for publication, 2006.\nThis work is licensed under the Creative Commons Attribution-NoDerivs License. To view\na copy of this license, visit http://creativecommons.org/licenses/by-nd/2.0/ or send a\nletter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA."}]},"section_tree":[],"assets":{"figures":[],"tables":[],"images":[]},"math_expressions":{"inline":[],"block":[{"equation_id":"eq1","equation_number":null,"raw_text":"Definition 2.1. An instance of the constraint satisfaction problem is a triple P = (V, A, C)","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq2","equation_number":null,"raw_text":"Note that in this paper we will assume that P ̸= NP. Feder and Vardi [11] conjecture that","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq3","equation_number":null,"raw_text":"P = (A, C) where","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq4","equation_number":null,"raw_text":"• A = (A1, A2, . . . , An) is a sequence of finite, non-empty sets, called the domains of","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq5","equation_number":null,"raw_text":"proj{i}(R) = Ai. We call a multi-sorted instance P of the CSP subdirect if each of its","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq6","equation_number":null,"raw_text":"solutions of P over I, denoted PI, is the set of solutions of the instance P ′ = (A′, C′) where","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq7","equation_number":null,"raw_text":"A′ = (Ai : i ∈I) and C = {C′","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq8","equation_number":null,"raw_text":"j = (I ∩Sj, proj(I∩Sj)(Rj)) for 1 ≤j ≤q.","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq9","equation_number":null,"raw_text":"It turns out that for a class K of similar algebras, V(K) = HSP(K), i.e., the class of","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq10","equation_number":null,"raw_text":"equations m(x, x, y) = m(x, y, x) = m(y, x, x) = x).","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq11","equation_number":null,"raw_text":"f(a, a, . . . , a) = a . An algebra is idempotent if all of its term operations are idempotent.","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq12","equation_number":null,"raw_text":"(5) For A = (A, F), an algebra over A, ΓA denotes the constraint language Inv(F).","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq13","equation_number":null,"raw_text":"Definition 2.20. Let A = (A1, . . . , An) be a sequence of finite, non-empty sets, let P =","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq14","equation_number":null,"raw_text":"projI(R1) = projI(R2).","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq15","equation_number":null,"raw_text":"In the case where Γ happens to be a relational clone (i.e., Γ = ⟨Γ⟩) it follows from","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq16","equation_number":null,"raw_text":"p1(x, y, y) of A. Note that the J ́onsson equations imply that x · y = p2(x, y, y) as well. This","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq17","equation_number":null,"raw_text":"Note that B is J ́onsson trivial if and only if J({b}) = B for all b ∈B. Also note that","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq18","equation_number":null,"raw_text":"(1) Let S0 = 0A and S1 be the relation on A defined by:","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq19","equation_number":null,"raw_text":"(2) For k > 0, let Sk+1 = Sk ◦S1.","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq20","equation_number":null,"raw_text":"(3) For a, b ∈A, we write d(a, b) = k if the pair (a, b) is in Sk and not in Sk−1 and will","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq21","equation_number":null,"raw_text":"(3) If A is a simple algebra then either d(a, b) is undefined for all a ̸= b ∈A (equivalently","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq22","equation_number":null,"raw_text":"S1 = 0A) or A is connected with respect to S.","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq23","equation_number":null,"raw_text":"subuniverse of A2. By idempotency we have t(c, . . . , c) = c and so (t(a1, . . . , an), c) ∈Sk,","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq24","equation_number":null,"raw_text":"conclude that d(a, b) is undefined for all a ̸= b ∈A and in the latter case that for all a,","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq25","equation_number":null,"raw_text":"Proof. Let d(y, z) = m, d(x, y) = n and choose elements ai ∈A for 0 ≤i ≤n with x = a0,","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq26","equation_number":null,"raw_text":"an = y and (ai, ai+1) ∈S1 for 0 ≤i < n. For k the largest integer below [(n + 1)/2] we get","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq27","equation_number":null,"raw_text":"that d(x, ak) and d(ak, y) are both at most k. Therefore if d = max(k, m), then the pairs","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq28","equation_number":null,"raw_text":"But p2(x, y, y) = x · y and p2(ak, ak, z) = z, proving the lemma.","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq29","equation_number":null,"raw_text":"Proof. As noted earlier the set I = {a ∈A : d(a, c) ≤m} is a subuniverse of A since A","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq30","equation_number":null,"raw_text":"b ∈A (or equivalently, S1 = A2).","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq31","equation_number":null,"raw_text":"that a, b ∈A with d(a, b) = n. Then m, the largest integer below [(n + 1)/2] is less than","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq32","equation_number":null,"raw_text":"S be a subdirect subalgebra of A × B. Then either S = A × B, or S is the graph of an onto","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq33","equation_number":null,"raw_text":"Proof. As A is simple, then either S1 = 0A or A is connected with respect to S. In the","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq34","equation_number":null,"raw_text":"in the latter, it follows from the previous corollary that S1 = A2.","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq35","equation_number":null,"raw_text":"For a ∈A, let Ba = {b ∈B : (a, b) ∈S} and choose a with |Ba| maximal. Let I denote","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq36","equation_number":null,"raw_text":"the set of those elements x of A for which Bx = Ba. To complete the proof we will need to","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq37","equation_number":null,"raw_text":"demonstrate that I = A and Ba = B. To show that I = A it will suffice to prove that it is","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq38","equation_number":null,"raw_text":"Indeed, let u ∈A and c ∈I be arbitrary. Then (u, c) ∈S1 (since S1 = A2) and therefore","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq39","equation_number":null,"raw_text":"(p2(u, c, c), p2(b, b, d)) = (u · c, d) ∈S.","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq40","equation_number":null,"raw_text":"it follows that Ba = B.","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq41","equation_number":null,"raw_text":"coordinates 1 and i is equal to A1 × Ai. Then S = A1 × D, where D = proj{2≤i≤n}(S).","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq42","equation_number":null,"raw_text":"Proof. We prove this by induction on n. For n = 2, the result follows by our hypotheses.","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq43","equation_number":null,"raw_text":"Consider the case n = 3 and let D be the projection of S onto A2 × A3. Let (u, v) ∈D","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq44","equation_number":null,"raw_text":"and let I(u,v) = {a ∈A1 : (a, u, v) ∈S}. Our goal is to show that I(u,v) = A1 and we","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq45","equation_number":null,"raw_text":"than n factors. Let S1 = proj{1≤i<n}(S) and S2 = proj{2≤i<n}(S). Then S is isomorphic","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq46","equation_number":null,"raw_text":"to a subdirect product of A1, S2 and An and, by induction, S1 = A1 × S2. Then, applying","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq47","equation_number":null,"raw_text":"the result with n = 3 to this situation, we conclude that S = A1 × D, as required.","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq48","equation_number":null,"raw_text":"onto Ai × Aj is not the graph of a bijection then S = Q","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq49","equation_number":null,"raw_text":"intervals Ij, 1 ≤j ≤p, such that S = projI1(S) × · · · × projIp(S) and, for each j, if","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq50","equation_number":null,"raw_text":"Ij = {i : u ≤i ≤v} then there are bijections πi : Au →Ai, for i ∈Ij such that","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq51","equation_number":null,"raw_text":"projIj(S) = {(a, πu+1(a), . . . , πv(a)) : a ∈Au}.","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq52","equation_number":null,"raw_text":"Proof. For 1 ≤i, j ≤n, set i ∼j if i = j or the projection of S onto Ai and Aj is equal to","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq53","equation_number":null,"raw_text":"For A a finite sequence of finite algebras, P = (A, C) denotes a multi-sorted instance","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq54","equation_number":null,"raw_text":"and let P = (A, C) be a subdirect, k-minimal instance of the CSP for some k ≥3. If the","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq55","equation_number":null,"raw_text":"To start, let A = (A1, . . . , An) be a sequence of finite algebras from V3 and let M =","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq56","equation_number":null,"raw_text":"max{|Ai| : 1 ≤i ≤n}. Let k > 0 and P = (A, C) be a k-minimal instance of the CSP with","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq57","equation_number":null,"raw_text":"C consisting of the constraints Ci = (Si, Ri), 1 ≤i ≤m. By taking suitable subalgebras","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq58","equation_number":null,"raw_text":"then proj(I∩K)(PI) = proj(I∩K)(PK). In this section we will denote PI by Λ(I) and call this","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq59","equation_number":null,"raw_text":"(2) For I, K, k-element subsets of {1, 2, . . . , n}, proj(I∩K)(ΛJ(I)) = proj(I∩K)(ΛJ(K)).","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq60","equation_number":null,"raw_text":"may assume that I = {2, 3, . . . , k, k + 1}. Let ⃗a = (a1, a2, a3, . . . , ak) be any member of","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq61","equation_number":null,"raw_text":"Λ{1, 2, 4, . . . , k + 1}) and (a2, w′, a4, . . . , ak, w) ∈Λ(I). Let ak+1 = p1(u, v, w) ∈Ak+1. By","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq62","equation_number":null,"raw_text":"• If i = k + 1 then the tuple (a2, . . . , ak) extends to (a1, a2, . . . , ak), a member of","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq63","equation_number":null,"raw_text":"• If i = 2: There are x ∈A1 and y ∈A3 with (x, a3, . . . , ak, u) and (a1, y, a4, . . . , ak, w)","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq64","equation_number":null,"raw_text":"• If i = 3 or 3 < i < k + 1 then small variations of the previous argument will work.","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq65","equation_number":null,"raw_text":"I = (I, R′","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq66","equation_number":null,"raw_text":"I = ΛJ(I). It follows by construction and from the previous lemma that PJ is a k-minimal","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq67","equation_number":null,"raw_text":"Lemma 3.16. Assume that k ≥M2 and let C = (S, R) be a constraint of P. Then there is","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq68","equation_number":null,"raw_text":"Suppose that 1 ∈S. We may assume that S = {1, 2, . . . , m} for some m ≤n. We need","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq69","equation_number":null,"raw_text":"there is some ⃗b ∈R whose restriction to I is ⃗a. Since ⃗b(1) = ⃗a(1) ∈J it follows that ⃗b is in","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq70","equation_number":null,"raw_text":"Now, suppose that 1 /∈I and assume that I = {2, 3, . . . , k + 1}. By the k-minimality","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq71","equation_number":null,"raw_text":"ji ∈J and some ⃗ci ∈R such that ⃗ci(1) = ji and such that the restrictions of ⃗ci and ⃗a to","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq72","equation_number":null,"raw_text":"Since k > |J| it follows from the Pigeonhole principle that there are i ̸= l with ji = jl.","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq73","equation_number":null,"raw_text":"We may assume that i = 2 and l = 3 and set j = ji. Define ⃗b to be p1(⃗c,⃗c2,⃗c3). This","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq74","equation_number":null,"raw_text":"element belongs to R and satisfies: ⃗b(1) = ⃗c(1) · j ∈J and the restriction of ⃗b to I is ⃗a.","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq75","equation_number":null,"raw_text":"To establish this equality over coordinate 2 we make use of the identity p1(x, y, x) = x and","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq76","equation_number":null,"raw_text":"over coordinate 3 p1(x, x, y) = x. Finally, ⃗b is in RJ since ⃗b(1) ∈J.","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq77","equation_number":null,"raw_text":"For the remaining case, assume that 1 /∈S, say S = {2, 3, . . . , m + 1}. We will show by","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq78","equation_number":null,"raw_text":"and such that projK(⃗a) = projK(⃗b). A consequence of this claim is that for any k-element","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq79","equation_number":null,"raw_text":"symmetry, we may assume that K = {2, 3, . . . , s + 2}. Let ⃗a ∈R be reduced over K. We","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq80","equation_number":null,"raw_text":"in K of size at least M such that for i ∈Q, ⃗ai(s + 3) = a.","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq81","equation_number":null,"raw_text":"b = ⃗a(s + 3).","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq82","equation_number":null,"raw_text":"⃗cu(1) = ⃗cv(1) ∈J. An application of the Pigeonhole principle ensures the existence of these","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq83","equation_number":null,"raw_text":"the Ai, for 2 ≤i ≤n, with constraints C′ = (S, RJ), for each constraint C = (S, R) of P, is","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq84","equation_number":null,"raw_text":"Theorem 3.18. Let A = (A1, . . . , An) be a sequence of finite algebras from V3 and let","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq85","equation_number":null,"raw_text":"P = (A, C) be a k-minimal instance of the CSP whose constraint relations are non-empty.","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq86","equation_number":null,"raw_text":"where M = max{|Ai| : 1 ≤i ≤n}, then there is a subdirect k-minimal instance P ′ of the","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq87","equation_number":null,"raw_text":"Definition 3.19. Let Ai, 1 ≤i ≤m, be similar algebras and let Θ = (θ1, . . . , θm) be a","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq88","equation_number":null,"raw_text":"i=1 θi denotes the congruence on Qm","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq89","equation_number":null,"raw_text":"i=1 Ai that identifies two m-tuples ⃗a and ⃗b if","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq90","equation_number":null,"raw_text":"Let A = (A1, . . . , An) be a sequence of finite, J ́onsson trivial members of V3 and let","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq91","equation_number":null,"raw_text":"P = (A, C) be a subdirect, k-minimal instance of the CSP whose constraint relations are all","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq92","equation_number":null,"raw_text":"non-empty. Let C = {C1, C2, . . . , Cm} where, for 1 ≤i ≤m, Ci = (Si, Ri) for some subset","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq93","equation_number":null,"raw_text":"simple, say for i = 1, and let θ1 be a maximal proper congruence of A1.","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq94","equation_number":null,"raw_text":"Let Θ = (θ1, . . . , θn) and set P/Θ = (A/Θ, C/Θ) where A/Θ = (A1/θ1, . . . , An/θn)","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq95","equation_number":null,"raw_text":"and C/Θ consists of the constraints Ci/Θ = (Si, Ri/Θ), for 1 ≤i ≤m.","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq96","equation_number":null,"raw_text":"P ′ = (A′, C′) such that","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq97","equation_number":null,"raw_text":"• A′ = (A′","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq98","equation_number":null,"raw_text":"• C′ = {C′","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq99","equation_number":null,"raw_text":"i = (Si, R′","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq100","equation_number":null,"raw_text":"i = Ai. For 1 ≤j ≤m, let","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq101","equation_number":null,"raw_text":"j = Rj ∩","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq102","equation_number":null,"raw_text":"We now set out to prove that the instance P ′ = (A′, C′) has the desired properties.","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq103","equation_number":null,"raw_text":"a) = projI(R′","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq104","equation_number":null,"raw_text":"i) = projI(Ri) ∩","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq105","equation_number":null,"raw_text":"is contained in that on the right. In the case that W ∩Si = ∅the other inclusion is also","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq106","equation_number":null,"raw_text":"If W ∩Si ̸= ∅we have that projW ∩Si(Ri/Θ) is a subdirect product of simple, J ́onsson","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq107","equation_number":null,"raw_text":"D = proj(Si\\W )(Ri).","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq108","equation_number":null,"raw_text":"l. Then there is some⃗b ∈Ri with projI(⃗b) = ⃗a.","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq109","equation_number":null,"raw_text":"If W ∩I = ∅then, by the concluding remark of the previous paragraph, proj(Si\\W )(⃗b) and","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq110","equation_number":null,"raw_text":"x , i = 1, 2","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq111","equation_number":null,"raw_text":"Recall that associated with A is the constraint language ΓA = Inv(A), consisting of all","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq112","equation_number":null,"raw_text":"k ≥3, then Γ has relational width k. In any case, if M = |A|2 then ΓA has relational width","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq113","equation_number":null,"raw_text":"Proof. (of the Theorem) We may assume that A = (A, p0, p1, p2, p3), where p0(x, y, z) = x","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq114","equation_number":null,"raw_text":"and p3(x, y, z) = z for all x, y, z ∈A since if we can establish the theorem for this sort","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq115","equation_number":null,"raw_text":"If Γ is not finite, replace it by ΓA and set k = |A|2. We will show that in either case, Γ has","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq116","equation_number":null,"raw_text":"solution. We may express P in the form (A, C) where A = (A, A, . . . , A) is a sequence of","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq117","equation_number":null,"raw_text":"length n, for some n > 0, and where C is a set of constraints of the form C = (S, R), for","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq118","equation_number":null,"raw_text":"size at most |A|. If Γ = Γk, replace it with the set of all subuniverses of l-fold products of","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"}],"equation_refs":[]},"symbol_table":[],"references":{"in_text_markers":[],"bibliography":[]},"claims":[],"flow_graph":{"nodes":[],"edges":[]},"quality":{"text_char_count":61622,"parse_confidence":0.5,"equation_parse_rate_proxy":1.0,"citation_resolution_rate_proxy":0.0,"structure_coverage_proxy":0.0,"asset_coverage_proxy":0.0,"accepted_for_training":true}}