Skip to main content
Springer logoLink to Springer
. 2018 Aug 13;81(4):1699–1727. doi: 10.1007/s00453-018-0498-2

On Singleton Arc Consistency for CSPs Defined by Monotone Patterns

Clément Carbonnel 1, David A Cohen 2, Martin C Cooper 3, Stanislav Živný 1,
PMCID: PMC6449328  PMID: 31007327

Abstract

Singleton arc consistency is an important type of local consistency which has been recently shown to solve all constraint satisfaction problems (CSPs) over constraint languages of bounded width. We aim to characterise all classes of CSPs defined by a forbidden pattern that are solved by singleton arc consistency and closed under removing constraints. We identify five new patterns whose absence ensures solvability by singleton arc consistency, four of which are provably maximal and three of which generalise 2-SAT. Combined with simple counter-examples for other patterns, we make significant progress towards a complete classification.

Keywords: Constraint satisfaction problems, Forbidden patterns, Singleton arc consistency

Introduction

The constraint satisfaction problem (CSP) is a declarative paradigm for expressing computational problems. An instance of the CSP consists of a number of variables to which we need to assign values from some domain. Some subsets of the variables are constrained in that they are not permitted to take all values in the product of their domains. The scope of a constraint is the set of variables whose values are limited by the constraint, and the constraint relation is the set of permitted assignments to the variables of the scope. A solution to a CSP instance is an assignment of values to variables in such a way that every constraint is satisfied, i.e. every scope is assigned to an element of the constraint relation.

The CSP has proved to be a useful technique for modelling in many important application areas from manufacturing to process optimisation, for example planning and scheduling optimisation [31], resource allocation [29], job shop problems [14] and workflow management [33]. Hence much work has been done on describing useful classes of constraints [3] and implementing efficient algorithms for processing constraints [7]. Many constraint solvers use a form of backtracking where successive variables are assigned values that satisfy all constraints. In order to mitigate the exponential complexity of backtracking some form of pre-processing is always performed. These pre-processing techniques identify values that cannot be part of any solution in an effective way and then propagate the effects of removing these values throughout the problem instance. Of key importance amongst these pre-processing algorithms are the relatives of arc consistency propagation including generalised arc consistency (GAC) and singleton arc consistency (SAC). Surprisingly there are large classes [13, 16, 23, 28] of the CSP for which GAC or SAC are decision procedures: after establishing consistency if every variable still has a non-empty domain then the instance has a solution.

More generally, these results fit into the wider area of research aiming to identify sub-problems of the CSP for which certain polynomial-time algorithms are decision procedures. Perhaps the most natural ways to restrict the CSP is to limit the constraint relations that we allow or to limit the structure of (the hypergraph of) interactions of the constraint scopes. A set of allowed constraint relations is called a constraint language. A subset of the CSP defined by limiting the scope interactions is called a structural class.

There has been considerable success in identifying tractable constraint languages, recently yielding a full classification of the complexity of finite constraint languages [11, 34]. Techniques from universal algebra have been essential in this work as the complexity of a constraint language is characterised by a particular algebraic structure [10]. The two most important algorithms for solving the CSP over tractable constraint languages are local consistency and the few subpowers algorithm [9, 27], which generalises ideas from group theory. A necessary and sufficient condition for solvability by the few subpowers algorithm was identified in [4, 27]. The set of all constraint languages decided by local consistency was later described by Barto and Kozik [2] and independently by Bulatov [8]. Surprisingly, all such languages are in fact decided by establishing singleton arc consistency [28].

A necessary condition for the tractability of a structural class with bounded arity is that it has bounded treewidth modulo homomorphic equivalence [26]. In all such cases we decide an instance by establishing k-consistency, where k is the treewidth of the core. It was later shown that the converse holds: if a class of structures does not have treewidth k modulo homomorphic equivalence then it is not solved by k-consistency [1], thus fully characterising the strength of consistency algorithms for structural restrictions. Both language-restricted CSPs and CSPs of bounded treewidth are monotone in the sense that we can relax (remove constraints from) any CSP instance without affecting its membership in such a class.

Since our understanding of consistency algorithms for language and structural classes is so well advanced there is now much interest in so called hybrid classes, which are neither definable by restricting the language nor by limiting the structure. For the binary CSP, one popular mechanism for defining hybrid classes follows the considerable success of mapping the complexity landscape for graph problems in the absence of certain induced subgraphs or graph minors. Here, hybrid (binary) CSP problems are defined by forbidding a fixed set of substructures (patterns) from occurring in the instance [17]. This framework is particularly useful in algorithm analysis, since it allows us to identify precisely the local properties of a CSP instance that make it impossible to solve via a given polynomial-time algorithm. This approach has recently been used to obtain a pattern-based characterisation of solvability by arc consistency [23], a detailed analysis of variable elimination rules [15] and various novel tractable classes of CSP [19, 20].

Singleton arc consistency is a prime candidate to study in this framework since it is one of the most prominent incomplete polynomial-time algorithms for CSP and the highest level of consistency (among commonly studied consistencies) that operates only by removing values from domains. This property ensures that enforcing SAC cannot introduce new patterns, which greatly facilitates the analysis. It is therefore natural to ask for which patterns, forbidding their occurrence ensures that SAC is a sound decision procedure. In this paper we make a significant contribution towards this objective by identifying five patterns which define classes of CSPs decidable by SAC. All five classes are monotone, and we show that only a handful of open cases separates us from an essentially full characterisation of monotone CSP classes decidable by SAC and definable by a forbidden pattern. Some of our results rely on a novel proof technique which follows the trace of a successful run of the SAC algorithm to dynamically identify redundant substructures in the instance and construct a solution.

The structure of the paper is as follows. In Sect. 2 we provide essential definitions and background theory. In Sect. 3 we state the main results. In Sect. 4 we introduce the trace technique, which is then used in Sects. 5 and 6 to establish the tractability of three patterns from our main result. The tractability of the remaining two patterns from the main result is shown in Sect. 7. In Sect. 8 we give a necessary condition for the solvability by SAC. Finally, we conclude the paper in Sect. 9 with some open problems.

Preliminaries

CSP A binary CSP instance is a triple I=(X,D,C), where X is a finite set of variables, D is a finite domain, each variable xX has its own domain of possible values D(x)D, and C={R(x,y)x,yX,xy}, where R(x,y)D2, is the set of constraints. We assume, without loss of generality, that each pair of variables x,yX is constrained by a constraint R(xy). (Otherwise we set R(x,y)=D(x)×D(y).) We also assume that (a,b)R(x,y) if and only if (b,a)R(y,x). A constraint is trivial if it contains the Cartesian product of the domains of the two variables. By deleting a constraint we mean replacing it with a trivial constraint. The projectionI[X] of a binary CSP instance I on XX is obtained by removing all variables in X\X and all constraints R(xy) with {x,y}X. A partial solution to a binary CSP instance on XX is an assignment s of values to variables in X such that s(x)D(x) for all xX and (s(x),s(y))R(x,y) for all constraints R(xy) with x,yX. A solution to a binary CSP instance is a partial solution on X.

An assignment (xa) is called a point. For simplicity of notation we can assume that variable domains are disjoint, so that using a as a shorthand for (xa) is unambiguous. If (a,b)R(x,y), we say that the assignments (xa), (yb) (or more simply ab) are compatible and that ab is a positive edge, otherwise ab are incompatible and ab is a negative edge. We say that aD(x) has a support at variable y if bD(y) such that ab is a positive edge.

The constraint graph of a CSP instance with variables X is the graph G=(X,E) such that (x,y)E if R(xy) is non-trivial. The degree of a variable x in a CSP instance is the degree of x in the constraint graph of the instance.

Arc Consistency A domain value aD(x) is arc consistent if it has a support at every other variable. A CSP instance is arc consistent (AC) if every domain value is arc consistent.

Singleton Arc Consistency Singleton arc consistency is stronger than arc consistency (but weaker than strong path consistency [30]). A domain value aD(x) in a CSP instance I is singleton arc consistent if the instance obtained from I by removing all domain values bD(x) with ab can be made arc consistent without emptying any domain. A CSP instance is singleton arc consistent (SAC) if every domain value is singleton arc consistent.

Establishing Consistency Domain values that are not arc consistent or not singleton arc consistent cannot be part of a solution so can safely be removed. The closure of a CSP instance under the removal of values that are not (singleton) arc consistent is unique, and the process of reducing an instance to its closure is called establishing (singleton) arc consistency [32]. For a binary CSP instance with domain size d, n variables and e non-trivial constraints there are O(ed2) algorithms for establishing arc consistency [6] and O(ned3) algorithms for establishing singleton arc consistency [5].

SAC decides a CSP instance if, after establishing singleton arc consistency, non-empty domains for all variables guarantee the existence of a solution. SAC decides a class of CSP instances if SAC decides every instance from the class.

Neighbourhood Substitutability If a,bD(x), then a is neighbourhood substitutable (or is dominated) by b if there is no c such that ac is a positive edge and bc a negative edge: such values a can be deleted from D(x) without changing the satisfiability of the instance since a can be replaced by b in any solution [25]. Similarly, removing neighbourhood substitutable values cannot destroy (singleton) arc consistency.

Patterns In a binary CSP instance each constraint decides, for each pair of values in D, whether it is allowed. Hence a binary CSP can also be defined as a set of points X×D together with a compatibility function that maps each edge, (xa)(yb) with xy, into the set {negative,positive}. A pattern extends the notion of a binary CSP instance by allowing the compatibility function to be partial. A pattern Poccurs (as a subpattern) in an instance I if there is mapping from the points of P to the points of I which respects variables (two points are mapped to points of the same variable in I if and only if they belong to the same variable in P) and maps negative edges to negative edges, and positive edges to positive edges. A set of patterns occurs in an instance I if at least one pattern in the set occurs in I.

We use the notation CSP(P¯) for the set of binary instances in which P does not occur as a subpattern. A pattern P is SAC-solvable if SAC decides CSP(P¯). It is worth observing that CSP(P¯) is closed under the operation of establishing (singleton) arc consistency. A pattern P is tractable if CSP(P¯) can be solved in polynomial time.

Points (xa) and (xb) in a pattern are mergeable if there is no point (yc) such that ac is positive and bc is negative or vice versa. For each set of patterns there exists a set of patterns without mergeable points which occur in the same set of instances.

A point (xa) in a pattern is called dangling if there is at most one b such that ab is a positive edge and no c such that ac is a negative edge. Dangling points are redundant when considering the occurrence of a pattern in an arc consistent CSP instance.

A pattern is called irreducible if it has no dangling points and no mergeable points [20]. When studying algorithms that are at least as strong as arc consistency, a classification with respect to forbidden sets of irreducible patterns is equivalent to a classification with respect to all forbidden sets of patterns. For this reason classifications are often established with respect to irreducible patterns even if only classes definable by forbidding a single pattern are considered [20, 23], as we do in the present paper.

Results

Call a class C of CSP instances monotone if deleting any constraint from an instance IC produces another instance in C. For example, language classes and bounded treewidth classes are monotone. An interesting research direction is to study those monotone classes defined by a forbidden pattern which are solved by singleton arc consistency, both in order to uncover new tractable classes and to better understand the strength of SAC.

We call a pattern monotone if when forbidden it defines a monotone class. Monotone patterns can easily be seen to correspond to exactly those patterns in which positive edges only occur in constraints which have at least one negative edge. To see this, firstly let P be a pattern in which positive edges only occur in constraints which have at least one negative edge. Note that deleting a constraint in an instance I cannot introduce P, so CSP(P¯) is monotone. To see the converse, let Q be a pattern in which a positive edge e occurs in a constraint c with no negative edges. Let Q be equivalent to Q but with e replaced by a negative edge. Let I be the instance obtained by completing Q with negative edges (i.e. joining by negative edges all pairs of points at different variables whose compatibility is unspecified in Q). Let I[-c] be the instance I in which the constraint (corresponding to) c has been deleted. Now Q occurs in I[-c] (since the positive edge e has been reintroduced by deleting c) but not in I (which can be seen by simply counting the number of constraints containing positive edges). Thus CSP(Q¯) is not monotone.

Consider the monotone patterns Q1 and Q2 shown in Fig. 1, patterns R5, R8 shown in Fig. 2, and pattern R7- shown in Fig. 3.

Fig. 1.

Fig. 1

All degree-3 irreducible monotone patterns solved by SAC must occur in at least one of these patterns

Fig. 2.

Fig. 2

All degree-2 irreducible monotone patterns solved by SAC must occur in at least one of these patterns

Fig. 3.

Fig. 3

The pattern R7-, a subpattern of R7

Theorem

(Main) The patterns Q1, Q2, R5, R8, and R7- are SAC-solvable.

In order to prove the SAC-solvability of Q1, R8 and R7- we use the same idea of following the trace of arc consistency and argue that the resulting instance is not too complicated. While the same idea is behind the proofs of all three patterns, the technical details differ.

In the remaining two cases we identify an operation that preserves SAC and satisfiability, does not introduce the pattern and after repeated application necessarily produces an equivalent instance which is solved by SAC. In the case of R5, the operation is simply removing any constraint. In the case of Q2, the operation is BTP-merging [19].

Remark 1

By Proposition 2 from Sect. 8, any monotone and irreducible pattern solvable by SAC must occur in at least one of the patterns shown in Figs. 1 and 2. By this analysis, we have managed to reduce the number of remaining cases to a handful. Our main result shows that some of these are SAC-solvable. In particular, the patterns Q1, Q2, R5, and R8 are maximal in the sense that adding anything to them would give a pattern that is either non-monotone or not solved by SAC.

Remark 2

We point out that certain interesting forbidden patterns, such as BTP [21], NegTrans [22], and EMC [23] are not monotone. On the other hand, the patterns T1,,T5 shown in Fig. 4are monotone. Patterns T1,,T5 were identified in [20] as the maximal irreducible tractable patterns on two connected constraints. We show in Sect. 8 that T1 is not solved by SAC. Our main result implies (since R8 contains T4 and T5) that both T4 and T5 are solved by SAC. It can easily be shown, from Lemma 9 and [20, Lemma 25], that T2 is solved by SAC, and we provide, in “Appendix”, a simple proof that T3 is solved by SAC as well. Hence, we have characterised all 2-constraint irreducible patterns solvable by SAC.

Fig. 4.

Fig. 4

The set of tractable 2-constraint irreducible patterns

Remark 3

Observe that Q1 does not occur in any binary CSP instance in which all degree 3 or more variables are Boolean. This shows that 2-SAT is a strict subset of CSP(Q1¯). This class is incomparable with language-based generalisations of 2-SAT, such as the class ZOA [18] (the language of “zero-one-all” relations, that is, of all relations that admit the dual discriminator polymorphism) since in CSP(Q1¯) degree-2 variables can be constrained by arbitrary constraints. Indeed, instances in CSP(Q1¯) can have an arbitrary constraint on the pair of variables xy, where x is of arbitrary degree and of arbitrary domain size if for all variables z{x,y}, the constraint on the pair of variables xz is of the form (xS)(zTz) where S is fixed (i.e. independent of z) but Tz is arbitrary. R8 and R7- generalise T4 and CSP(T4¯) generalises ZOA [20], so CSP(R8¯) and CSP(R7-¯) are strict generalisations of ZOA.

Notation for the Trace Technique

Given a singleton arc consistent instance I, a variable x and a value vD(x), we denote by Ixv the instance obtained by assigning x to v (that is, setting D(x)={v}) and enforcing arc consistency. To avoid confusion with the original domains, we will use Dxv(y) to denote the domain of the variable y in Ixv. For our proofs we will assume that arc consistency has been enforced using a straightforward algorithm that examines the constraints one at a time and removes the points that do not have a support until a fixed point is reached. We will be interested in the trace of this algorithm, given as a chain of propagations:

(Pxv):(xy0),(x1y1),(x2y2),,(xpyp)

where xiyi means that the algorithm has inferred a change in the domain of yi when examining the constraint R(xi,yi). We define a map ρ:(Pxv)2D that maps each (xiyi)(Pxv) to the set of values that were removed from Dxv(yi) at this step. Without loss of generality, we assume that the steps (xiyi) such that the pruning of ρ(xiyi) from Dxv(yi) does not incur further propagation are performed last.

We denote by S(Pxv) the set of variables that appear in (Pxv). Because I was (singleton) arc consistent before x was assigned, we have S(Pxv)={x}{yii0}. We rename the elements of S(Pxv) as {pii0} where the index i denotes the order of first appearance in (Pxv). Finally, we use S(Pxv)I to denote the set of inner variables, that is, the set of all variables pjS(Pxv) for which there exists prS(Pxv) such that (pjpr)(Pxv).

Tractability of Q1

Consider the pattern Q1 shown in Fig. 1. Let I CSP(Q1¯) be a singleton arc consistent instance, x be any variable and v be any value in the domain of x. Our proof of the SAC-decidability of CSP(Q1¯) uses the trace of the arc consistency algorithm to determine a subset of variables in the vicinity of x such that (i) the projection of Ixv to this particular subset is satisfiable, (ii) those variables do not interact too much with the rest of the instance and (iii) the projections of Ixv and I on the other variables are almost the same. We then use these three properties to show that the satisfiability of I is equivalent to that of an instance with fewer variables, and we repeat the operation until the smaller instance is trivially satisfiable.

The following lemma describes the particular structure of Ixv around the variables whose domain has been reduced by arc consistency. Note that a non-trivial constraint in I can be trivial in Ixv because of domain changes; unless otherwise stated the triviality/non-triviality of constraints is always discussed with respect to Ixv.

Lemma 1

Consider the instance Ixv. Every variable piS(Pxv)I is in the scope of at most two non-trivial constraints, which must be of the form R(pj,pi) and R(pi,pr) with j<i, (pjpi)(Pxv) and (pipr)(Pxv).

Proof

The claim is true for p0=x as every constraint incident to x is trivial. Otherwise, let piS(Pxv)I be such that pix. Let pj, j<i be such that (pjpi) occurs first in (Pxv). Because piS(Pxv)I and we assumed that the arc consistency algorithm performs the pruning that do not incur further propagation last, we know that there exists ciρ(pjpi) and prS(Pxv) with (pipr)(Pxv) such that the pruning of ci from D(pi) allows the pruning of some arρ(pipr) from the domain of pr. It follows that (ci,ar)R(pi,pr), (vi,ar)R(pi,pr) for any viDxv(pi) and (vj,ci)R(pj,pi) for any vjDxv(pj). Moreover, ar was a support for ci at pr when ci was pruned so we know that pjpr.

For the sake of contradiction, let us assume that there exists a constraint R(pi,l) with l{pj,pr} that is not trivial. In particular, there exist ai,biDxv(pi) and alDxv(l) such that (ai,al)R(pi,l) but (bi,al)R(pi,l). Since ai is in Dxv(pi) and ar was removed by arc consistency when inspecting the constraint R(pi,pr), we have (ai,ar)R(pi,pr). Ixv is arc consistent so there exists some ajDxv(pj) such that (aj,bi)R(pj,pi), and since ciρ(pjpi) we have (aj,ci)R(pj,pi). At this point we have reached the desired contradiction as Q1 occurs on (pi,pj,pr,l) with pi being the middle variable (see Fig. 5).

Fig. 5.

Fig. 5

The occurence of Q1 in the proof of Lemma 1

Given a subset S of variables, an S-path between two variables y1 and y2 is a path R(y1,x2),R(x2,x3),,R(xk,y2) of non-trivial constraints with k2 and x2,,xkS.

Lemma 2

Consider the instance Ixv. There is no (S(Pxv)I)-path between two variables in X\S(Pxv)I and there is no cycle of non-trivial constraints in Ixv[S(Pxv)I].

Proof

Let y1,y2X\S(Pxv)I and assume for the sake of contradiction that a (S(Pxv)I)-path R(y1,x2),R(x2,x3),,R(xk-1,y2) exists. Let pi{x2,,xk-1} be such that i is minimum. Since pi is in the scope of two non-trivial constraints in this path, it follows from Lemma 1 that pi is in the scope of exactly two non-trivial constraints, one of which is of the form R(pj,pi) with j<i and (pjpi)(Pxv). It follows from (pjpi)(Pxv) that pjS(Pxv)I and hence pj is not an endpoint of the path, and then j<i contradicts the minimality of i. The second part of the claim follows from the same argument, by considering a cycle as a (S(Pxv)I)-path R(x1,x2),R(x2,x3),,R(xk-1,x1) with x1(S(Pxv)I) and defining pi as the variable among {x1,,xk-1} with minimum index.

Lemma 3

Ixv has a solution if and only if Ixv[X\S(Pxv)I] has a solution.

Proof

The “only if” implication is trivial, so we focus on the other direction. Suppose that there exists a solution ϕ to Ixv[X\S(Pxv)I]. Let Y be a set of variables initialized to X\S(Pxv)I. We will grow Y with the invariants that (i) we know a solution ϕ to Ixv[Y], and (ii) there is no (X\Y)-path between two variables in Y (which is true at the initial state by Lemma 2).

If there is no non-trivial constraint between X\Y and Y then Ixv is satisfiable if and only if Ixv[X\Y] is. By construction X\YS(Pxv)I and by Lemma 2 we know that Ixv[X\Y] has no cycle of non-trivial constraints. Because Ixv[X\Y] is arc consistent and acyclic it has a solution [24], and we can conclude that in this case Ixv has a solution.

Otherwise, let piX\Y be such that there exists a non-trivial constraint between pi and some variable yY. By (ii), this non-trivial constraint must be unique (with respect to pi) as otherwise we would have a (X\Y)-path between two variables in Y. By arc consistency, there exists aiDxv(pi) such that (ai,ϕ(y))R(pi,y); because this non-trivial constraint is unique, setting ϕ(pi)=ai yields a solution to Ixv[Y{pi}]. Because any (X\(Y{pi}))-path between two variables in Y{pi} would extend to a (X\Y)-path between Y variables by going through pi, we know that no such path exists. Then YY{pi} satisfies both invariants, so we can repeat the operation until we have a solution to the whole instance or all constraints between Y and X\Y are trivial. In both cases Ixv has a solution.

Lemma 4

I has a solution if and only if I[X\S(Pxv)I] has a solution.

Proof

Again the “only if” implication is trivial so we focus on the other direction. Let us assume for the sake of contradiction that I[X\S(Pxv)I] has a solution but I does not. In particular this implies that Ixv does not have a solution, and then by Lemma 3 we know that Ixv[X\S(Pxv)I] has no solution either. We define Z as a subset of X\S(Pxv)I of minimum size such that Ixv[Z] has no solution. Observe that Ixv[Z] can only differ from I[Z] by having fewer values in the domain of the variables in S(Pxv). Let ϕ be a solution to I[Z] such that ϕ(y)Dxv(y) for as many variables y as possible. Because ϕ is not a solution to Ixv[Z], there exists prZS(Pxv) and pjS(Pxv)I such that (pjpr)(Pxv) and ϕ(pr)ρ(pjpr) (recall that ρ(pjpr) is the set of points removed by the AC algorithm in the domain of pr at step (pjpr)). By construction, pjZ.

First, let us assume that there exists a variable yZ, ypr such that there is no arDxv(pr) with (ϕ(y),ar)R(y,pr). This implies, in particular, that ϕ(y)Dxv(y). We first prove that R(y,pr) and R(pj,pr) are the only possible non-trivial constraints involving pr in Ixv. If there exists a fourth variable z such that R(pr,z) is non-trivial in Ixv, then there exist ar,brDxv(pr) and azDxv(z) such that (ar,az)R(pr,z) but (br,az)R(pr,z). By assumption we have (ϕ(y),ar)R(y,pr) and (ϕ(y),ϕ(pr))R(y,pr). Finally, br has a support ajDxv(pj) and ϕ(pr)ρ(pjpr) so we have (aj,ar)R(pj,pr) but (aj,ϕ(pr))R(pj,pr). This produces Q1 on (pr,y,pj,z) with pr being the middle variable. Therefore, we know that R(y,pr) and R(pj,pr) are the only possible non-trivial constraints involving pr in Ixv. However, in this case the variable pr has only one incident non-trivial constraint in Ixv[Z], and hence Ixv[Z] has a solution if and only if Ixv[Z\pr] has one. This contradicts the minimality of Z, and for the rest of the proof we can assume that for every yZ there exists some arϕ(pr) such that arDxv(pr) and (ϕ(y),ar)R(y,pr).

Now, let yZ be such that ypr and |{bDxv(pr)(ϕ(y),b)R(y,pr)}| is minimum. By the argument above, there exists arDxv(pr) such that (ϕ(y),ar)R(y,pr) and arϕ(pr). By the choice of ϕ and pr, setting ϕ(pr)=ar would violate at least one constraint in I[Z], so there exists some variable zZ, zy such that (ϕ(z),ar)R(z,pr). Furthermore, by arc consistency of Ixv there exists ajDxv(pj) such that (aj,ar)R(pj,pr). Recall that we picked pj in such a way that ϕ(pr)ρ(pjpr), and so we have (aj,ϕ(pr))R(pj,pr). We summarize what we have in Fig. 6.

Fig. 6.

Fig. 6

Some positive and negative edges between y, z, pj and pr. The positive edges ϕ(y)ar and ϕ(z)ϕ(pr) are omitted for clarity; br is any value in Dxv(pr) that is not compatible with ϕ(y)

Observe that unless Q1 occurs, for every brDxv(pr) such that (ϕ(y),br)R(y,pr) we also have (ϕ(z),br)R(z,pr). However, recall that (ϕ(y),ar)R(y,pr) so ϕ(z) is compatible with strictly fewer values in Dxv(pr) than ϕ(y). This contradicts the choice of y. It follows that setting ϕ(pr)=ar cannot violate any constraint in I[Z], which is impossible by our choice of ϕ - a final contradiction.

Theorem 1

CSP(Q1¯) is solved by singleton arc consistency.

Proof

Let I CSP(Q1¯) be singleton arc consistent. Pick any variable x and value vD(x). By singleton arc consistency the instance Ixv does not have any empty domains. If S(Pxv)I is empty then I has a solution if and only if I[X\{x}] has one. Otherwise, by Lemma 4, I has a solution if and only if I[X\S(Pxv)I] has one. In the latter case we must have xS(Pxv)I, so overall we can conclude that I has a solution if and only if I[X\(S(Pxv)I{x})] has one. Because I[X\(S(Pxv)I{x})] is singleton arc consistent as well and S(Pxv)I{x} we can repeat the procedure until X\(S(Pxv)I{x}) is empty, at which point we may conclude that I has a solution.

Tractability of R8 and R7-

Q1 and R8 (Fig. 2) are structurally dissimilar, but the idea of using Ixv and the trace of the arc consistency algorithm to extract variables from I without altering satisfiability works in the case of R8 as well. We define a star to be a non-empty set of constraints whose scopes all intersect. The centers of a star are its variables of highest degree (every star with three or more variables has a unique center). The following lemma is the R8 analog of Lemma 1; the main differences are a slightly stronger prerequisite (no neighbourhood substitutable values) and that arc consistency leaves stars of non-trivial constraints instead of paths.

Lemma 5

Let I=(X,D,C) CSP(R8¯) be singleton arc consistent. Let xX, vD(x) and consider the instance Ixv. After the removal of every neighbourhood substitutable value, every connected component of non-trivial constraints that intersect with S(Pxv) is a star with a center in S(Pxv).

Proof

We proceed by induction. Suppose that all neighbourhood substitutable values have been removed. First, no connected component of non-trivial constraints may contain p0=x. Then, let k0 and suppose that every connected component of non-trivial constraints that intersect {piik} is a star centered on S(Pxv). Suppose also, for the sake of contradiction, that there exists a connected component G of non-trivial constraints that contains pk+1 and that is not a star centered on S(Pxv).

Let pj, jk be such that (pjpk+1)(Pxv). By the induction hypothesis, pj cannot be part of G and hence R(pj,pk+1) must be trivial. Furthermore, if every simple path of non-trivial constraints starting at pk+1 had length 1 then G would be a star centered on pk+1, which would contradict our assumption. Therefore, there exist two distinct variables z1,z2{pj,pk+1} such that neither R(pk+1,z1) nor R(z1,z2) is trivial (again, the claim z1,z2pj comes from the fact that pj is not part of G).

Because R(pk+1,z1) is not trivial, there exist two distinct values ak+1,bk+1Dxv(pk+1) and a1Dxv(z1) such that (ak+1,a1)R(pk+1,z1) but (bk+1,a1)R(pk+1,z1). Furthermore, R(pj,pk+1) is trivial and hence there exists ajDxv(pj) such that (aj,ak+1),(aj,bk+1)R(pj,pk+1). Finally, since (pjpk+1)(Pxv) some propagation must have taken place in the domain of pk+1, and hence there exists ck+1 such that (aj,ck+1)R(pj,pk+1). We can summarize what we have in the following picture (the tuple (a1,a2) comes from the fact that a1 must have a support in R(z1,z2)). graphic file with name 453_2018_498_Figa_HTML.jpg

First Case: There Exists  b1Dxv(z1) Such That  (b1,a2)R(z1,z2) For R8 not to occur, (bk+1,b1) must not belong to R(pk+1,z1). By arc consistency, b1 must be connected to some dk+1Dxv(pk+1). If there exists one such dk+1 such that (dk+1,a1)R(pk+1,z1), then R8 occurs again, so a1 dominates b1 in the constraint R(pk+1,z1). However, recall that all neighbourhood substitutable values have been removed, so there must exist a variable z3 (potentially equal to z2, but different from pj,pk+1,z1) and a3Dxv(z3) such that (b1,a3)R(z1,z3) but (a1,a3)R(z1,z3). Finally, because bk+1 is arc consistent, there exists c1D(z1) such that (bk+1,c1)R(pk+1,z1). We obtain the following two structures, which may only differ on the last constraint. graphic file with name 453_2018_498_Figb_HTML.jpggraphic file with name 453_2018_498_Figc_HTML.jpg

The key observation here is that whenever a1 or b1 is compatible with any value v of a fourth variable y{pj,pk+1,z1}, then c1 is compatible with v as well unless R8 occurs. Thus, the only constraint on which c1 may not dominate both a1 and b1 is R(pk+1,z1). However, if (dk+1,c1)R(pk+1,z1) then R8 occurs in (pj,pk+1,z1,z2), and if (ak+1,c1)R(pk+1,z1) then R8 occurs in (pj,pk+1,z1,z3); this is true for any choice of ak+1 and dk+1 so c1 dominates both a1 and b1 in R(pk+1,z1) - a contradiction, since it means that a1 and b1 should have been removed by neighbourhood substitution.

Second Case: There Does not Exist b1Dxv(z1)  Such That (b1,a2)R(z1,z2) for any Choice of  z2 This means that we must have (v1,v2)R(z1,z2) for all v1Dxv(z1) and v2Dxv(z2) such that (a1,v2)R(z1,z2). Putting this together with the fact that by hypothesis R(z1,z2) is not trivial, there exists b2Dxv(z2) such that (a1,b2)R(z1,z2). Then b2 must have a support (b1,b2) in R(z1,z2), and b1 must have a support (dk+1,b1) in R(pk+1,z1). Because R(pj,pk+1) is trivial, (aj,dk+1)R(pj,pk+1). Let us update our picture: graphic file with name 453_2018_498_Figd_HTML.jpg

Observe that ak+1 is an arbitrary value of Dxv(pk+1) that is compatible with a1. If (ak+1,b1)R(pk+1,z1), then R8 occurs. Hence, every value compatible with a1 in every constraint involving z1 is also compatible with b1. This means that a1 should have been removed by neighbourhood substitution - a final contradiction.

In the proof of SAC-solvability of Q1, only inner variables are extracted from the instance. The above lemma suggests that in the case of R8 it is more convenient to extract all variables in S(Pxv), plus any variable that can be reached from those via a non-trivial constraint.

Lemma 6

Let I=(X,D,C) CSP(R8¯) be singleton arc consistent. Let xX, vD(x) and consider the instance Ixv. After the removal of every neighbourhood substitutable value, there exists a partition (X1,X2) of X such that

  • S(Pxv)X1;

  • (x,y)X1×X2, R(xy) is trivial;

  • Every connected component of non-trivial constraints with scopes subsets of X1 is a star.

Proof

Let X1=S(Pxv){zXyS(Pxv):Dxv(y)×Dxv(z)R(y,z)}. We have S(Pxv)X1, and by construction every non-trivial constraint between yX1 and zX1 must be such that yS(Pxv) and y is adjacent to a variable in S(Pxv) via a non-trivial constraint. By Lemma 5 this is impossible, and hence there is no non-trivial constraint between X1 and X\X1. The last property is immediate by Lemma 5.

Theorem 2

CSP(R8¯) is solved by singleton arc consistency.

Proof

Let I CSP(R8¯) and suppose that I is singleton arc consistent. Let xX and vD(x). Because of singleton arc consistency the instance Ixv has no empty domains. We remove all neighbourhood substitutable values from Ixv. By Lemma 6, the variable set of Ixv can be divided into two parts X1,X2 such that Ixv has a solution if and only if both Ixv[X1] and Ixv[X2] are satisfiable. Ixv[X1] is an arc consistent instance with no cycle of non-trivial constraints, and hence is satisfiable. Ixv[X2] is exactly I[X2] with some neighbourhood substitutable values removed because no variable in X2 was affected by propagation after x was assigned. Call this new instance I[X2]. Because I[X2] is singleton arc consistent as well (being singleton arc consistent is invariant under projection and removal of neighbourhood substitutable values), we can repeat the same reasoning on I[X2]. At each step the set X1 cannot be empty (it contains x) so this procedure will always terminate, and because each I[X1] has a solution I has a solution as well.

Our proof of the SAC-solvability of R7- (Fig. 3) follows a similar reasoning, with two main differences. First, branching on just any variable-value pair (as we did for Q1 and R8) may lead to a subproblem that is not solved by arc consistency. However, once the right assignment is made the reward is much greater as all constraints involving a variable whose domain has been reduced by arc consistency must become trivial except at most one.

Finding out which variable-value pair (xv) we should branch on is tricky. We first show that the above property is guaranteed to hold if (xv) is the meet point of the positive edges in a particular pattern M^ (Fig. 7). However, M^ is an NP-hard pattern [17] so it might happen that M^ does not occur at all in the instance. To handle this problem we define a weaker pattern V2 (Fig. 7), whose absence is known to imply SAC-solvability (because it is a sub-pattern of R8) and hence can be safely assumed to occur somewhere. Our strategy is to branch on the assignment that corresponds to the meet point of the positive edges in V2 and attempt to prove that the above property holds by induction, following the trace of the AC algorithm. We then show that if the induction started from V2 breaks then M^ must occur somewhere - a win-win situation.

Fig. 7.

Fig. 7

The patterns M^ (left) and V2 (right)

Lemma 7

Let I=(X,D,C) CSP(R7-¯) be singleton arc consistent. Let xX be such that M^ occurs on (yxz) with x the middle variable and v be the value in D(x) that is the meet point of the two positive edges. Then every constraint whose scope contains a variable in S(Pxv) is trivial in Ixv, except possibly R(yz).

Proof

We prove the claim by induction. Every constraint with p0=x in its scope is trivial. Let k0 and suppose that the claim holds for every constraint whose scope contains a variable in {piik}. Let wX\{piik} be a variable such that R(pk+1,w) is not trivial in Ixv and {pk+1,w}{y,z}. Let pj be such that (pjpk+1)(Pxv), with jk. Because R(pk+1,w) is not trivial and Ixv is arc consistent, there exist ak+1,bk+1Dxv(pk+1) and awDxv(w) such that (ak+1,aw)R(pk+1,w) and (bk+1,aw)R(pk+1,w).

If R(pj,pk+1) is trivial, then there exists ajDxv(pj) such that (aj,ak+1),(aj,bk+1)R(pj,pk+1) and ck+1 such that (aj,ck+1)R(pj,pk+1) (ck+1 is one of the values that were eliminated by arc consistency at step (pjpk+1)). Then, if pjx there exists pi, i<j such that (pipj)(Pxv). By arc consistency and because some propagation must have taken place in the domain of pj at step (pipj), there exists aiDxv(pi) and bj such that (ai,aj)R(pi,pj) and (ai,bj)R(pi,pj). It follows that R7- occurs on (pi,pj,pk+1,w), a contradiction. On the other hand, if pj=x then we obtain the same contradiction by using either y or z (the one which does not appear in {pk+1,w}) instead of pi.

By the induction hypothesis, if R(pj,pk+1) is not trivial then {pj,pk+1}={y,z}. By symmetry we can assume pk+1=z. R(xz) is trivial, so {(v,ak+1),(v,bk+1)}R(x,z). Furthermore, M^ occurs on (yxz) so there exist ck+1 such that (v,ck+1)R(x,z) and ay,bx such that (ay,v)R(y,z) but (ay,bx)R(y,z). Then, R7- occurs on (yxzw), a contradiction.

In both cases the induction holds, so the claim follows.

Lemma 8

Let I=(X,D,C)CSP(M^¯) CSP(R7-¯) be singleton arc consistent. Let xX be such that V2 occurs on (yxz) with x the middle variable and v be the value in D(x) that is the meet point of the two positive edges. Then every constraint whose scope contains a variable in S(Pxv) is trivial in Ixv, except possibly R(yz).

Proof

The proof follows the same idea as for Lemma 7. However, in this case the fact that M^ does not occur is critical in order to keep the induction going.

Again, every constraint with p0=x in its scope is trivial. Let k0 and suppose that the claim holds for every constraint whose scope contains a variable in {piik}. Let wX\{piik} be a variable such that R(pk+1,w)C is not trivial in Ixv and {pk+1,w}{y,z}. Let pj be such that (pjpk+1)(Pxv). Because R(pk+1,w) is not trivial and Ixv is arc consistent, there exist ak+1,bk+1Dxv(pk+1) and awDxv(w) such that (ak+1,aw)R(pk+1,w) and (bk+1,aw)R(pk+1,w).

If R(pj,pk+1) is trivial we can proceed exactly as in the proof of Lemma 7, so let us focus on the case where R(pj,pk+1) is not trivial. By induction we must have {pj,pk+1}={y,z}. We assume without loss of generality that pk+1=z. If (xz)(Pxv) then we can use x instead of y to bring us to the case where R(pj,pk+1) is trivial, so let us assume (xz)(Pxv). Then, if (xy)(Pxv) there exists pi,pl such that i,lk, (piy)(Pxv) and (plpi)(Pxv). However, by induction R(pi,y) is trivial and thus R(yz) should have been trivial as well (otherwise, the argument of Lemma 7 produces R7- on (pl,pi,y,z)). We can therefore assume that (xy)(Pxv) to work our way towards a contradiction. In particular, this means that there exists cy such that (v,cy)R(x,y) (cy being a value eliminated by arc consistency). Because V2 occurs on (yxz), there exists ayDxv(y) and ax such that (v,ay)R(x,y) and (ax,ay)R(x,y). The picture below summarises the structure derived from the arguments above. Observe that we can always assume that either (ay,ak+1)R(y,z) or (ay,bk+1)R(y,z) by replacing ak+1 or bk+1 with a support for ay in R(yz). graphic file with name 453_2018_498_Fige_HTML.jpg

If (ay,ak+1)R(y,z), then unless R7- occurs on (xyzw) we must have (ay,bk+1)R(y,z). By arc consistency of Ixv, there exists byDxv(y) such that (by,bk+1)R(y,z), (by,ck+1)R(y,z) (since ck+1 was eliminated by arc consistency) and because R(xy) is trivial we have (v,by)R(x,y). Again, unless R7- occurs on (xyzw) we have (by,ak+1)R(y,z). At this point one can observe in the picture below that the pattern M^ occurs on (xyz) with the meet point of the two solid lines being ay. This contradicts the assumption that ICSP(M^¯). graphic file with name 453_2018_498_Figf_HTML.jpg

The case where (ay,bk+1)R(y,z) is almost symmetric. Because R7- does not occur, we must have (ay,ak+1)R(y,z). By arc consistency, there exists some byDxv(y) such that (by,ak+1)R(y,z), (by,ck+1)R(y,z) and because R(xy) is trivial we have (v,by)R(x,y). It follows from the absence of R7- that (by,bk+1)R(y,z), which create the pattern M^ on (xyz) with its meet point being ay, as shown in the picture below. graphic file with name 453_2018_498_Figg_HTML.jpg

This final contradiction completes the proof.

Theorem 3

CSP(R7-¯) is solved by singleton arc consistency.

Proof

Let I=(X,D,C) CSP(R7-¯), and suppose that enforcing SAC did not lead to a wipeout of any variable domain. If V2 does not occur in I then it has a solution (recall that absence of V2 ensures solvability by SAC), so let us assume that V2 occurs. Let xX and vD(x) be such that v is the meet point of solid edges of M^ if M^ occurs in I, and the meet point of V2 otherwise. I is SAC so the instance Ixv has no empty domains. By Lemmas 7 and 8, there is at most one non-trivial constraint in Ixv[S(Pxv)] so by arc consistency for every x1S(Pxv) and v1Dxv(x1) there is a solution ϕ to Ixv[S(Pxv)] such that ϕ(x1)=v1. Furthermore, Ixv[X\S(Pxv)]=I[X\S(Pxv)] and there is at most one non-trivial constraint in Ixv with one endpoint in S(Pxv) and the other in X\S(Pxv). By combining the two properties we obtain that Ixv has a solution if and only if I[X\S(Pxv)] has one. Because I[X\S(Pxv)] is SAC and R7- still does not occur, we can repeat the operation until we have a solution to the whole instance.

Tractability of Q2 and R5

For our last two proofs of SAC-decidability, we depart from the trace technique. Our fundamental goal, however, remains the same: find an operation which shrinks the instance without altering satisfiability, introducing the pattern or losing singleton arc consistency. For Q2 this operation is BTP-merging [19] and for R5 it is removing constraints.

Consider the pattern V- shown in Fig. 8a. We say that V- occurs at point a or at variable x if aD(x) is the central point of the pattern in the instance. The pattern V- is known to be tractable since all instances in CSP(V-¯) satisfy the joint-winner property [22]. However, we show a slightly different result, namely that singleton arc consistency is sufficient to solve instances in which V- only occurs at degree-2 variables.

Fig. 8.

Fig. 8

a The pattern V- and b the associated broken-triangle pattern (BTP)

Lemma 9

Instances in which V- only occurs at degree-2 variables are solved by singleton arc consistency.

Proof

Singleton arc consistency only eliminates values from domains and thus cannot increase the degree of a variable nor introduce the pattern V-. Hence, singleton arc consistency cannot lead to the occurrence of the pattern V- at a variable of degree greater than two. Therefore it is sufficient to show that any SAC instance I in which V- only occurs at degree-2 variables is satisfiable.

We will show that it is always possible to find an independent partial solution, i.e. an assignment to a non-empty subset of the variables of I which is compatible with all possible assignments to the other variables. A solution can be found by repeatedly finding independent partial solutions. If I has only degree-2 variables, then it is folklore (and easy to show) that singleton arc consistency implies satisfiability. So we only need to consider the case in which I has at least one variable x1 of degree greater than or equal to three. Choose an arbitrary value a1D(x1). If this assignment is compatible with all assignments to all other variables, then this is the required independent partial solution, so suppose that there is a negative edge a1b where bD(x2) for some variable x2. By assumption, since x1 has degree greater than or equal to three, the pattern V- does not occur at x1 and hence the assignment (x1,a1) is compatible with all assignments to all variables other than x1,x2.

Now suppose that we have a partial assignment (x1,a1),,(xk,ak), as shown in Fig. 9, such that

  1. for i=1,,k, aiD(xi),

  2. for i=1,,k-1, bD(xi+1) such that aib is a negative edge.

  3. for i=1,,k-1, aiai+1 is a positive edge,

The assignments (xi,ai) (i=1,,k) are all compatible with each other, otherwise the pattern V- would occur at a variable of degree three or greater, as illustrated in Fig. 9. Furthermore, for the same reason, the assignments (xi,ai) (i=1,,k-1) are all compatible with all possible assignments to all variables other than x1,,xk. It only remains to consider the compatibility of ak with the assignments to variables other than x1,,xk.

Fig. 9.

Fig. 9

The edge aiaj must be positive, otherwise the pattern V- would occur at ai and variable xi would have degree at least three. In the special case i=1, this follows from our choice of x1 to be a variable of degree at least three

If the assignment (xk,ak) is compatible with all assignments to all variables other than x1,,xk, then we have an independent partial solution to x1,,xk. On the other hand, if for some xk+1{x1,,xk}, there is bD(xk+1) such that akb is a negative edge, then by (singleton) arc consistency there exists ak+1D(xk+1) such that akak+1 is a positive edge and we have a larger partial assignment with the above three properties. Therefore, we can always add another assignment until the resulting partial assignment is an independent partial solution (or we have assigned all variables).

Two values a,bD(x) are BTP-mergeable [19] if there are not two other distinct variables y,zx such that there exist cD(y) and dD(z) with adbccd positive edges and acbd negative edges as shown in Fig. 8b. The BTP-merging operation consists in merging two BTP-mergeable points a,bD(x): the points ab are replaced by a new point c in D(x) such that for all other variables wx and for all dD(w), cd is a positive edge if at least one of adbd was a positive edge (a negative edge otherwise). BTP-merging preserves satisfiability [19].

Lemma 10

Let P be a pattern in which no point occurs in more than one positive edge. Then the BTP-merging operation cannot introduce the pattern P in an instance I CSP(P¯).

Proof

Suppose that the pattern P occurs in an instance I obtained by BTP-merging of two points ab in I to create a new point c in I. From the assumptions about P, we know that c belongs to any number of negative edges ce1,,cer, but at most one positive edge cd in the occurrence of P in I. By the definition of merging, in I one of adbd must have been a positive edge and all of ae1,,aer and be1,,ber must have been negative. Without loss of generality, suppose that ad was a positive edge. But then the pattern P occurred in I (on a instead of c) which is a contradiction.

Since Q2 has no point which occurs in more than one positive edge, we can deduce from Lemma 10 that Q2 cannot be introduced by BTP-merging. We then combine this property with Lemma 9 by proving that V- can only occur at degree-2 variables in any instance of CSP(Q2¯) with no BTP-mergeable values.

Theorem 4

CSP(Q2¯) is solved by singleton arc consistency.

Proof

Let I CSP(Q2¯). Since establishing singleton arc consistency cannot introduce patterns, and hence in particular cannot introduce Q2, we can assume that I is SAC. Let I be the result of applying BTP-merging operations to I until convergence. By Lemma 10, we know that I CSP(Q2¯). Furthermore, since BTP-merging only weakens constraints (in the sense that the new value c is constrained less than either of the values ab it replaces), it cannot destroy singleton arc consistency; hence I is SAC. By Lemma 9, it suffices to show that V- cannot occur in I at variables of degree three or greater.

Consider an arbitrary point aD(x) at a variable x which is of degree three or greater. We will show that V- cannot occur at a, which will complete the proof. If a belongs to no negative edge then clearly V- cannot occur at a. The existence of a negative edge and the (singleton) arc consistency of I implies that there there is some other value bD(x). Since ab cannot be BTP-merged, there must be other variables yz and values cD(y), dD(z) with adbccd positive edges and acbd negative edges, as shown in Fig. 10. Now since Q2 does not occur in I, we can deduce that a and b are connected by positive edges to all points in D(v) for v{x,y,z}. Since x is of degree three or greater, there must therefore be another point eD(x)\{a,b} and a negative edge ef where fD(w) for some w{x,y,z} (as shown in Fig. 10). By applying the same argument as above, knowing that ae cannot be BTP-merged, we can deduce that a and e are connected by positive edges to all points in D(v) for v{x,y,w}. Hence, a can only be connected by negative edges to points in D(y). It follows that the pattern V- cannot occur at a, which completes the proof.

Fig. 10.

Fig. 10

The pattern V- cannot occur at a if Q2 does not occur in the instance

That only leaves R5. Removing constraints cannot introduce R5 because it is a monotone pattern, so we can apply repeatedly the following lemma to obtain our last result.

Lemma 11

If the pattern R5 does not occur in a singleton arc consistent binary CSP instance I, then removing any constraint leaves the satisfiability of I invariant.

Proof

Suppose that the pattern R5 does not occur in the instance I and that I is singleton arc consistent. Let I be the instance which results when we eliminate the constraint between an arbitrary pair of variables x and y. Suppose that s is a solution to I. It suffices to exhibit a solution to I. We use s[z] to denote the value assigned to variable z in s. Let a=s[x] and b=s[y]. If ab is a positive edge in I than s is also a solution to I, so we assume that ab is a negative edge.

By (singleton) arc consistency, there exists cD(x) such that bc is a positive edge. Either we can replace a in s by c to produce a solution to I, or there is some variable w{x,y} such that ce is a negative edge where e=s[w]. By singleton arc consistency, there exist dD(y) and gD(w) such that ad, ag and dg are positive edges. Consider any variable z{x,y,w}. We have the situation in I shown in Fig. 11a where f=s[z]. The positive edges ae and bf follow from the fact that s is a solution to I. Now, since R5 does not occur in I, we can deduce that df is a positive edge. Recall that the variable z was any variable other than xy or w.

Fig. 11.

Fig. 11

Since the pattern R5 does not occur in I, we can deduce that adf is a positive edge, and bgf is a positive edge

Since dD(y) is compatible with a=s[x], we have just shown that d can only be incompatible with s[z] when z=w. Thus, either we can replace b by d to produce a solution to I, or de is a negative edge. In this latter case, consider any variable z{x,y,w} and again denote s[z] by f. We have the situation in I shown in Fig. 11b. The positive edges be and ef follow from the fact that s is a solution to I. Since the pattern R5 does not occur in I, we can deduce that gf is a positive edge. But then we can replace b by d and e by g in s to produce a solution to I.

Note that Lemma 11 is technically true for all SAC-solvable patterns (not only R5); this is simply the only case where we are able to prove it directly.

Theorem 5

CSP(R5¯) is solved by singleton arc consistency.

Proof

Establishing singleton arc consistency preserves satisfiability and cannot introduce any pattern and, hence in particular, cannot introduce R5. Consider a SAC instance I CSP(R5¯) which has non-empty domains. By Lemma 11, we can eliminate any constraint. The resulting instance is still SAC. Furthermore, R5 has not been introduced since R5 is monotone. Therefore, we can keep on eliminating constraints until all constraints have been eliminated. The resulting instance is trivially satisfiable and hence so was the original instance I. It follows that singleton arc consistency decides all instances in CSP(R5¯).

A Necessary Condition for Solvability by SAC

In order to establish some basic properties of patterns solvable by SAC, we first show that several small patterns are not solvable by SAC. In order to do this, we consider the following instances:

  • I43COL: corresponds to 3-colouring the complete graph on 4 vertices, i.e. four variables x1,,x4 with domains D(xi)={1,2,3} (i=1,,4) and the six inequality constraints: xixj (1i<j4).

  • I3,4: corresponds to an alternative encoding of 3-colouring the complete graph on 4 vertices: three new variables y1,y2,y3 are introduced such that yj=i if variable xi is assigned colour j. There are now seven variables (x1, x2, x3, x4, y1, y2, y3) with domains D(xi)={1,2,3} (i=1,2,3,4), D(yi)={1,2,3,4} (i=1,2,3) and constraints (xi=j)(yj=i) (i=1,2,3,4; j=1,2,3). I3,4 is shown in Fig. 12a (in which only negative edges are shown so as not to clutter up the figure).

  • I5: five variables (x1,,x5) each with domain {1,2,3,4} and the constraints (xi=j-1)(xj=i) for all ij such that 1i<j5. One constraint of this instance is shown in Fig. 12b (again only negative edges are shown).

It is tedious but easy to verify that each of these instances has no solution and is singleton arc consistent. Any pattern which is solvable by SAC must therefore occur in each of these instances. Consider the patterns shown in Fig. 13. The patterns T1 and M3 do not occur in I3,4. The pattern Trestle does not occur in I5. It therefore follows that T1, M3 and Trestle are not solvable by SAC. Note that while M3 and Trestle are known to be NP-hard [17, 20], the pattern T1 is tractable (but not SAC-solvable, by the argument above) [20].

Fig. 12.

Fig. 12

a The instance I3,4 which is SAC but has no solution. b The constraint between variables x1 and x2 in instance I5

Fig. 13.

Fig. 13

Patterns not solved by SAC

The constraint graph of a patternP with variables X is the graph G=(X,E) such that (x,y)E if P has a negative edge between variables x,yX.

Proposition 1

A monotone irreducible pattern P solvable by SAC satisfies:

  1. None of the patterns T1, M3 and Trestle occur in P.

  2. P has at most four variables.

  3. P has at most one degree-3 variable and at most one non-trivial constraint in which the pattern V, shown in Fig. 14, occurs (with its centre point c at a variable with domain at size at most two), but does not have both a degree-3 variable and an occurrence of V. Furthermore, P has an acyclic constraint graph.

  4. P has at most one negative edge per constraint, at most one point at which two negative edges meet (a negative meet point) and no point at which three negative edges meet. If P has a negative meet point, then none of its variables has domain size greater than two.

Fig. 14.

Fig. 14

The pattern V

Proof

The first property follows from the above discussion and the fact that Q occurs in P implies that CSP(Q¯) CSP(P¯).

Since a pattern P which is solvable by SAC must occur in I43COL, P can have at most four variables. Since P is also a monotone pattern, no constraint of P contains only positive edges. Since P has at most four variables, either its constraint graph is connected or it is the union of two one-constraint patterns. In the latter case, by irreducibility and because Trestle cannot occur in P, P must be simply two negative edges between distinct variables (and hence all conditions of the proposition are trivially satisfied). So we assume in the rest of the proof that the constraint graph of P is connected. Since P has at most four variables, all of its variables are at a distance of at most three in its constraint graph.

We now consider the third property. By padding out I43COL with chains of equality constraints, it is easy to produce a SAC instance which has no solution and in which the pattern V does not occur in any non-trivial constraint at a distance of three or less from a degree-3 variable. It follows that no monotone irreducible pattern P with a degree-3 variable and in which the pattern V occurs is solvable by SAC. Using this same padding-with-equality argument, we can also deduce that in a monotone irreducible pattern P solvable by SAC: there is at most one degree-3 variable, there is at most one non-trivial constraint in which the pattern V occurs, and that P has no cycle in its constraint graph (the latter following from the fact that cycles of any fixed length can be eliminated from an instance by padding out with chains of equality constraints).

Finally, we consider the fourth property. Each inequality constraint xixj in I43COL can be replaced by equivalent gadgets in which all constraints have at most one negative edge [17]. The resulting instance is still SAC. To be concrete, for each i{1,2,3,4} and each a{1,2,3}, we create 21 new Boolean variables xiar (r=0,1,,20) linked to the xi variables and between themselves by the following constraints: (xi=a)xia0 and xiarxiar+1 (r=0,1,,19). If xi is assigned the value a, then all the variables xiar must be assigned true. Each constraint xixj (1i<j4) is then replaced by the chain of constraints xia4jyija1, yija1yija2, yija2yija3, yija3xja4i¯, where yijas (s=1,2,3; a=1,2,3) are new boolean variables. In the resulting instance I there are no points at which three negative edges meet, no two negative meet points at a distance of three or less and no negative meet point at a distance of three or less from a variable with domain size three. We do not change the semantics of I (nor its singleton arc consistency) by replacing the constraints (xi=a)xia0 by (xi=a)xia0. In the resulting instance I, no pattern V (Fig. 14) occurs with its centre point c at a variable with domain size greater than two. We can deduce that a monotone irreducible pattern P solvable by SAC (since it contains no 4-constraint path) has at most one negative edge per constraint, at most one negative meet point, no point at which three negative edges meet and the V pattern only occurs in P with its centre point c at a variable with domain of size at most two. Besides, P cannot have both a negative meet point and a variable with domain size three or more.

Proposition 1 allows us to narrow down monotone irreducible patterns solvable by SAC to a finite number, which we can summarize succinctly by the following proposition.

Proposition 2

If P is a monotone irreducible pattern solvable by SAC, then P must occur in at least one of the patterns Q1,Q2,R1,,R10 (shown in Figs. 1 and 2).

Proof

We saw in the proof of Proposition 1 that if P does not have a connected constraint graph, then P is simply the union of two negative edges: in this case P occurs in all the patterns R1,,R10. So we assume from now on that P has a connected constraint graph. From Proposition 1, we can deduce that the constraint graph of P is a either a star or a chain, with at most four vertices, and P has at most one negative edge per constraint. Such patterns must have one of the following four descriptions, which we analyse separately.

  • Phas a Single Degree-3 Variable The constraint graph of P is necessarily a star. By Proposition 1, the pattern V does not occur in P. From this and the fact that P contains no dangling points and no mergeable points, we can deduce that each of the three degree-1 variables must have domain size 1. If the central degree-3 variable has domain size 3, then the fact that none of the patterns V, T1 and M3 occur in P, and that there are no mergeable points, implies that P must be the pattern Q1. If, on the other hand, the central variable has domain size 2, then since V and T1 do not occur in P and no three negative edges meet at a point, we can deduce that P must be Q2 (or a subpattern).

  • Pis of Degree 2 and has a Negative Meet Point By Proposition 1, P has no domain of size greater than 2 and Trestle does not occur. It then follows by Proposition 1 and irreducibility of P that the pattern V cannot occur more than once (even in the same constraint). Since P has no dangling points, there are only four possible positions where V could occur. We can only add a limited number of positive edges without introducing T1, Trestle, dangling points or mergeable points. This gives rise to the four patterns R1,R2,R3,R4 (or subpatterns).

  • Pis of Degree 2, has no Negative Meet Point and All Domains Have Size 1 or 2 By the same argument as in the previous case, the pattern V can occur at most once. By the absence of Trestle and dangling points in P, and by symmetry, there are only two possible positions for the pattern V in P, if it occurs at all. Again, we can only add a limited number of positive edges without introducing T1, Trestle, dangling points or mergeable points. This gives rise to the three patterns R5,R6,R10 (or subpatterns).

  • Pis of Degree 2, has no Negative Meet Point and at Least One Size-3 Domain The fact that P has no mergeable points and all variables have degree at most 2 implies that no domain can be greater than size 3. Indeed, from the fact that P is irreducible and that, by Proposition 1, no V can occur centred at a variable of domain size 3, we can deduce that there is exactly one variable with domain size 3. Adding positive edges to ensure that no two points are mergeable at this variable v, necessarily creates a V pattern. No other V can occur either in a different constraint (by Proposition 1) or in the same constraint otherwise we would have a V centred at v or Trestle would occur. Adding other positive edges, while satisfying the properties of Proposition 1, produces patterns R7,R8,R9 (or subpatterns).

Conclusion

We have established SAC-solvability of five novel classes of binary CSPs defined by a forbidden pattern, three of which are generalisations of 2-SAT. For monotone patterns (defining classes of CSPs closed under removing constraints), there remains only a relatively small number of irreducible patterns whose SAC-solvability is still open. In addition to settling the remaining patterns, a possible line of future work is to study sets of patterns or partially-ordered patterns [23] that give rise to SAC-solvable (monotone) classes of CSPs.

Appendix: SAC-solvability of T3

Recall T3 from Fig. 4. This is the only maximal two-constraints tractable pattern whose SAC-solvability is not determined by our main theorem, Proposition 1 and the results of [20].

Theorem 6

CSP(T3¯) is solved by singleton arc consistency.

Proof

Let I CSP(T3¯) be a singleton arc consistent instance with no neighbourhood substitutable values. If T4 does not occur then I has a solution, so we examine the case where T4 occurs on variables (xyz) and values ax,ay,by,cy,az with axay,axby,byaz being positive edges and axcy,ayaz being negative edges. By arc consistency, cy has a support bx at x and because T3 does not occur bxby is a positive edge. Observe that by dominates cy in R(xy), and because neighbourhood substitutable values have been removed there must exist a variable w (possibly equal to z) and bwD(w) such that bybw is a negative edge and cybw is a positive edge. However, in this case T3 occurs on (xyw), so we obtain a contradiction. It follows that T4 cannot occur in the instance, and hence I has a solution.

Footnotes

An extended abstract of this work appeared in Proceedings of the 35th International Symposium on Theoretical Aspects of Computer Science (STACS) [12]. The authors were supported by EPSRC Grant EP/L021226/1 and ANR-11-LABX-0040-CIMI within the program ANR-11-IDEX-0002-02. Stanislav Živný was supported by a Royal Society University Research Fellowship. This project has received funding from the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (Grant Agreement No 714532). The paper reflects only the authors’ views and not the views of the ERC or the European Commission. The European Union is not liable for any use that may be made of the information contained therein.

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Contributor Information

Clément Carbonnel, Email: clement.carbonnel@cs.ox.ac.uk.

David A. Cohen, Email: d.cohen@rhul.ac.uk

Martin C. Cooper, Email: cooper@irit.fr

Stanislav Živný, Email: standa.zivny@cs.ox.ac.uk.

References

  • 1.Atserias, A., Bulatov, A., Dalmau, V.: On the power of k-consistency. In: Proceedings of the 34th International Colloquium on Automata, Languages and Programming (ICALP’07), pp. 279–290 (2007). 10.1007/978-3-540-73420-8_26
  • 2.Barto L, Kozik M. Constraint satisfaction problems solvable by local consistency methods. J. ACM. 2014;61(1):3. doi: 10.1145/2556646. [DOI] [Google Scholar]
  • 3.Beldiceanu, N., Carlsson, M., Rampon, J.-X.: Global Constraint Catalog. http://sofdem.github.io/gccat/gccat/titlepage.html (2017)
  • 4.Berman J, Idziak P, Marković P, McKenzie R, Valeriote M, Willard R. Varieties with few subalgebras of powers. Trans. Am. Math. Soc. 2010;362(3):1445–1473. doi: 10.1090/S0002-9947-09-04874-0. [DOI] [Google Scholar]
  • 5.Bessiere C, Debruyne R. Theoretical analysis of singleton arc consistency and its extensions. Artif. Intell. 2008;172(1):29–41. doi: 10.1016/j.artint.2007.09.001. [DOI] [Google Scholar]
  • 6.Bessière C, Régin J, Yap RHC, Zhang Y. An optimal coarse-grained arc consistency algorithm. Artif. Intell. 2005;165(2):165–185. doi: 10.1016/j.artint.2005.02.004. [DOI] [Google Scholar]
  • 7.Brailsford SC, Potts CN, Smith BM. Constraint satisfaction problems: algorithms and applications. Eur. J. Oper. Res. 1999;119(3):557–581. doi: 10.1016/S0377-2217(98)00364-6. [DOI] [Google Scholar]
  • 8.Bulatov, A.: Bounded relational width. Unpublished manuscript (2009). http://www.cs.sfu.ca/~abulatov/papers/relwidth.pdf
  • 9.Bulatov A, Dalmau V. A simple algorithm for Mal’tsev constraints. SIAM J. Comput. 2006;36(1):16–27. doi: 10.1137/050628957. [DOI] [Google Scholar]
  • 10.Bulatov A, Jeavons P, Krokhin A. Classifying the complexity of constraints using finite algebras. SIAM J. Comput. 2005;34(3):720–742. doi: 10.1137/S0097539700376676. [DOI] [Google Scholar]
  • 11.Bulatov, A.A.: A dichotomy theorem for nonuniform CSPs. In: Proceedings of the 58th Annual IEEE Symposium on Foundations of Computer Science (FOCS’17), pp. 319–330 (2017). 10.1109/FOCS.2017.37
  • 12.Carbonnel, C., Cohen, D.A., Cooper, M.C., Živný, S.: On singleton arc consistency for CSPs defined by monotone patterns. In: Proceedings of the 35th Annual Symposium on Theoretical Aspects of Computer Science (STACS’18), pp. 19:1–19:15 (2018). 10.4230/LIPIcs.STACS.2018.19
  • 13.Chen H, Dalmau V, Gruien B. Arc consistency and friends. J. Log. Comput. 2013;23(1):87. doi: 10.1093/logcom/exr039. [DOI] [Google Scholar]
  • 14.Cheng C-C, Smith SF. Applying constraint satisfaction techniques to job shop scheduling. Ann. Oper. Res. 1997;70:327–357. doi: 10.1023/A:1018934507395. [DOI] [Google Scholar]
  • 15.Cohen DA, Cooper MC, Escamocher G, Živný S. Variable and value elimination in binary constraint satisfaction via forbidden patterns. J. Comput. Syst. Sci. 2015;81(7):1127–1143. doi: 10.1016/j.jcss.2015.02.001. [DOI] [Google Scholar]
  • 16.Cohen DA, Jeavons PG. The power of propagation: when GAC is enough. Constraints. 2017;22(1):3–23. doi: 10.1007/s10601-016-9251-0. [DOI] [Google Scholar]
  • 17.Cooper MC, Cohen DA, Creed P, Marx D, Salamon AZ. The tractability of CSP classes defined by forbidden patterns. J. Artif. Intell. Res. 2012;45:47–78. doi: 10.1613/jair.3651. [DOI] [Google Scholar]
  • 18.Cooper MC, Cohen DA, Jeavons PG. Characterising tractable constraints. Artif. Intell. 1994;65:347–361. doi: 10.1016/0004-3702(94)90021-3. [DOI] [Google Scholar]
  • 19.Cooper MC, Duchein A, Mouelhi AE, Escamocher G, Terrioux C, Zanuttini B. Broken triangles: from value merging to a tractable class of general-arity constraint satisfaction problems. Artif. Intell. 2016;234:196–218. doi: 10.1016/j.artint.2016.02.001. [DOI] [Google Scholar]
  • 20.Cooper MC, Escamocher G. Characterising the complexity of constraint satisfaction problems defined by 2-constraint forbidden patterns. Discrete Appl. Math. 2015;184:89–113. doi: 10.1016/j.dam.2014.10.035. [DOI] [Google Scholar]
  • 21.Cooper MC, Jeavons PG, Salamon AZ. Generalizing constraint satisfaction on trees: hybrid tractability and variable elimination. Artif. Intell. 2010;174(9–10):570–584. doi: 10.1016/j.artint.2010.03.002. [DOI] [Google Scholar]
  • 22.Cooper MC, Živný S. Hybrid tractability of valued constraint problems. Artif. Intell. 2011;175(9–10):1555–1569. doi: 10.1016/j.artint.2011.02.003. [DOI] [Google Scholar]
  • 23.Cooper, M.C., Živný, S.: The power of arc consistency for CSPs defined by partially-ordered forbidden patterns. Log. Methods Comput. Sci. 13(4) (2017). 10.23638/LMCS-13(4:26)2017
  • 24.Freuder EC. A sufficient condition for backtrack-free search. J. ACM. 1982;29(1):24–32. doi: 10.1145/322290.322292. [DOI] [Google Scholar]
  • 25.Freuder, E.C.: Eliminating interchangeable values in constraint satisfaction problems. In: Proceedings of AAAI-91, pp. 227–233 (1991). http://www.aaai.org/Library/AAAI/1991/aaai91-036.php
  • 26.Grohe M. The complexity of homomorphism and constraint satisfaction problems seen from the other side. J. ACM. 2007;54(1):1–24. doi: 10.1145/1206035.1206036. [DOI] [Google Scholar]
  • 27.Idziak P, Marković P, McKenzie R, Valeriote M, Willard R. Tractability and learnability arising from algebras with few subpowers. SIAM J. Comput. 2010;39(7):3023–3037. doi: 10.1137/090775646. [DOI] [Google Scholar]
  • 28.Kozik, M.: Weak consistency notions for all the CSPs of bounded width. In: Proceedings of the 31st Annual ACM/IEEE Symposium on Logic in Computer Science (LICS’16), ACM, pp. 633–641 (2016). 10.1145/2933575.2934510
  • 29.Lim, N., Majumdar, S., Ashwood-Smith, P.: A constraint programming-based resource management technique for processing MapReduce jobs with SLSs on clouds. In: Proceedings of the 43rd International Conference on Parallel Processing (ICPP’14), IEEE, pp. 411–421 (2014). 10.1109/ICPP.2014.50
  • 30.Mohr R, Henderson TC. Arc and path consistency revisited. Artif. Intell. 1986;28(2):225–233. doi: 10.1016/0004-3702(86)90083-4. [DOI] [Google Scholar]
  • 31.Ozturk C, Ornek MA. Optimisation and constraint based heuristic methods for advanced planning and scheduling systems. Int. J. Ind. Eng. Theory Appl. Pract. 2016;23(1):26–48. [Google Scholar]
  • 32.Rossi F, Van Beek P, Walsh T. Handbook of Constraint Programming. New York City: Elsevier; 2006. [Google Scholar]
  • 33.Senkul P, Toroslu IH. An architecture for workflow scheduling under resource allocation constraints. Inf. Syst. 2005;30(5):399–422. doi: 10.1016/j.is.2004.03.003. [DOI] [Google Scholar]
  • 34.Zhuk, D.: A proof of CSP dichotomy conjecture. In: Proceedings of the 58th Annual IEEE Symposium on Foundations of Computer Science (FOCS’17), pp. 331–342 (2017). 10.1109/FOCS.2017.38

Articles from Algorithmica are provided here courtesy of Springer

RESOURCES