Full Constraint Satisfaction Problems
Tomás Feder
268 Waverley St., Palo Alto, CA 94301, USA
[email protected],
Pavol Hell
School of Computing Science
Simon Fraser University
Burnaby, B.C., Canada V5A 1S6
[email protected]
Abstract
Feder and Vardi have conjectured that all constraint satisfaction problems to a fixed structure
(constraint language) are polynomial or NP-complete. This so-called Dichotomy Conjecture
remains open, although it has been proved in a number of special cases. Most recently, Bulatov
has verified the conjecture for conservative structures, i.e., structures which contain all possible
unary relations.
We explore three different implications of Bulatov’s result. Firstly, the above dichotomy
can be extended to so-called inclusive structures, corresponding to conservative constraint
satisfaction problems in which each variable comes with its own domain. (This has also been
independently observed by Bulatov.) We prove a more general version, extending the dichotomy
to so-called three-inclusive structures, i.e., structures which contain, with any unary relation R,
all unary relations R′ for subsets R′ ⊆ R with at most three elements.
For the constraint satisfaction problems in this generalization we must restrict the instances
to so-called 1-full structures, in which each variable is involved in a unary constraint. This leads
to our second focus, which is on restrictions to more general kinds of ‘full’ input structures.
For any set W of positive integers, we consider a restriction to W -full input structures, i.e.,
structures in which, for each w ∈ W , any w variables are involved in a w-ary constraint. We
identify a class of structures (the so-called W -set-full structures) for which the restriction to
W -full input structures does not change the complexity of the constraint satisfaction problem,
and hence the family of these restricted problems also exhibits dichotomy. The general family
of three-inclusive constraint satisfaction problems restricted to W -full input structures contains
examples which we cannot seem to prove either polynomial or NP-complete. Nevertheless, we
are able to use our result on the dichotomy for three-inclusive constraint satisfaction problems,
to deduce the fact that all three-inclusive constraint satisfaction problems restricted to W -full
input structures are NP-complete or ‘quasi-polynomial’ (of order nO(log n) ).
Our third focus deals with bounding the number of occurrences of a variable, which we
call the degree. We conjecture that the complexity classification of three-inclusive constraint
satisfaction problems extends to the case where all degrees are bounded by three. Using previous
results, we are able to verify this conjecture in a number of special cases.
Conservative, inclusive, and three-inclusive constraint satisfaction problems can be viewed
as problems in which each variable is restricted to a ‘list’ of allowed values. This point of view
of lists is frequently encountered in the study of graph colorings, graph homomorphisms, and
graph partitions. Our results presented here, in all three areas, were strongly motivated by these
results on graphs.
1
1
Introduction
A large class of problems in artificial intelligence and other areas of computer science can be
viewed as constraint-satisfaction problems [8, 31, 32, 33, 34, 40]. This includes problems in machine
vision, belief maintenance, scheduling, temporal reasoning, type reconstruction, graph theory, and
satisfiability.
The standard formulation of the constraint satisfaction problem goes back to Montanari [36] in
1974. This framework has proved its value over the years by its wide ranging applicability [8, 39].
The constraint satisfaction in its full generality is NP-complete. Thus constraint satisfaction
problems have been studied under various restrictions. The main model [20] considers constraint
satisfaction problems with a fixed template determining the size of the domain and the set of
allowed constraint types in an instance.
Formally, a vocabulary V is a set of pairs (Ri , ℓi ), where the Ri are relation names and the ℓi
are relation arities. A structure S over the vocabulary V consists of a set (called the domain) D,
together with a collection of relations Ri ⊆ D ℓi , one ℓi -ary relation Ri for each pair (Ri , ℓi ) in V .
We say that the structure S an interpretation of the vocabulary V , and emphasize this, if necessary,
by writing V S instead of S. We also write the domains and relations as D S and RiS , to indicate
the structure in which they are being interpreted.
The constraint satisfaction problem CSP (H) (or CSP (V H )) for a fixed structure H = V H
over a vocabulary V is given as follows. An instance of CSP (H) is a structure V G over
the same vocabulary V . The question asked by CSP (H) is whether or not there exists a
homomorphism f of G to H, that is, a mapping f : D G → D H such that (x1 , . . . , xℓi ) ∈ RiG ,
then (f (x1 ), . . . , f (xℓi )) ∈ RiH , for all choices of xi ∈ D G and (Ri , ℓi ) ∈ V . We shall speak of the
elements xi of D G as variables, constrained by the relations RiG to be assigned suitable values f (xi )
in D H , as allowed by the constraints RiH .
This model was studied in its full generality by Feder and Vardi [20], who found evidence
towards the following Dichotomy Conjecture:
Conjecture 1.1 For each fixed structure H, the problem CSP (H) is NP-complete or polynomial
time solvable.
(Recall that it is known that if P 6= NP, there are problems in NP that are neither NP-complete,
nor polynomial [30].) This conjecture was supported by earlier classifications that exhibited
dichotomies. Schaefer [38] classified the complexity of Boolean constraint satisfaction problems,
i.e., problems CSP (H) with a two-element domain D H = {0, 1}. In essence, the polynomial
cases consist of Horn or anti-Horn clauses, two-satisfiability, and linear equations modulo two.
The remaining constraint satisfaction problems CSP (H) for a two-element domain D H are all
NP-complete. Bulatov classified constraint satisfaction problems on a three-element domain [3].
Hell and Nešetřil [26] classified the complexity of constraint satisfaction problems CSP (H) where
H = V H is a graph (with loops allowed). In other words, V consists of one pair (R, 2), and the
relation RH is symmetric. They showed that this so-called H-coloring problem is polynomial if
H is bipartite, and is NP-complete for H non-bipartite. Such a result is not known for digraphs
(structures V H in which RH is not necessarily symmetric) [1, 20]. In fact, Feder and Vardi [20]
have shown that dichotomy for digraph H-coloring problems would imply the validity of the entire
Dichotomy Conjecture.
For this paper, the most relevant special case where the conjecture has been proved is the
following result. We say that a structure H is conservative if it contains a unary relation R for
each subset R of the domain D H . We shall denote the set of unary relation names (names R
2
involved in pairs (R, 1)) of a vocabulary V by U(V ), and also denote the set of the corresponding
relations RH in a structure H = V H by U(V H ) (or just U(H)). (Thus the vocabulary V of a
conservative structure V H with |D H | = n has |U(V )| = 2n , and U(V H ) is precisely the power
set of D H .) Bulatov [2] proved that dichotomy holds for all conservative structures, i.e., that for
every conservative structure H, the problem CSP (H) is NP-complete or polynomial time solvable.
His approach is based on tools and techniques of universal algebra [2, 3, 4, 5, 28, 29]. Problems
CSP (H), for conservative structures H, will be called conservative constraint satisfaction problems.
An alternative interpretation of Bulatov’s result is the following. Suppose H is a conservative
structure; we may restrict CSP (H) to those input structures G that contain each variable v ∈ D G
in some unary relation. Such structures G will be called 1-full. The restriction of CSP (H) to 1-full
instances G will be denoted by CSP1 (H). Since H is conservative this is not a real restriction, as
there exists in U(V ) a pair (R, 1) with the corresponding unary relation RH equal to D H . Thus the
relation RG can be imposed an any variable in D G without changing the problem, and so CSP (H)
and CSP1 (H) are equivalent problems. On the other hand, CSP1 (V H ) is easily seen equivalent
to the following list constraint satisfaction problem. The instance is a structure V G in which each
variable v ∈ D G is equipped with a list L(v) ⊆ D H , and the question is whether or not there exists
a homomorphism f of G to H such that each f (v) belongs to L(v). List constraint satisfaction
problems have been extensively studied in the case when H is a graph. The problem is polynomial
if H is a so-called bi-arc graph and is NP-complete otherwise [12, 13, 14, 15, 16]. Let C be a fixed
circle with two specified points p and q. A graph H (with loops allowed) is called a bi-arc graph
if there exist pairs of arcs (Nx , Sx ), x ∈ V (H), with each Nx being an arc on C containing p but
not q, and each Sx being an arc on C containing q but not p, so that for any x, y ∈ V (H), not
necessarily distinct, the following hold:
• either Nx intersects Sy and Ny intersects Sx , or Nx does not intersect Sy and Ny does not
intersect Sx ;
• Nx intersects Sy (and Ny intersects Sx ) if and only if x and y are not adjacent in H.
This class of graphs conveniently generalizes both the class of interval graphs, and the class of
(complements of) circular arc graphs of clique covering number two [14, 22].
List constraint satisfaction problems involving multiple binary relations were studied by Feder,
Madelaine, and Stewart [19].
Let us say that a structure H is inclusive if for any R ∈ U(H) and any R′ ⊆ R we also have
′
R ∈ U(H). Note that each conservative structure is inclusive. It was independently observed by
the present authors and by Bulatov, that the above result for conservative structures H extends
to all inclusive structures, in the following sense. For every inclusive structure H, the problem
CSP1 (H) is NP-complete or polynomial time solvable. Since for conservative structures H the
problems CSP1 (H) and CSP (H) are equivalent, this extends the original result of Bulatov [2]. It
is easy to interpret this result as the dichotomy of a list constraint satisfaction problem where the
variables range over multiple domains. In this context, Feder has previously classified a family of
list problems involving multiple Boolean domains [10].
We prove in this paper a more general version of the dichotomy for inclusive structures. We say
that a structure H is three-inclusive if for any R ∈ U(H) and all R′ ⊆ R with |R′ | ≤ 3 we also have
R′ ∈ U(H). Thus each inclusive (and hence each conservative) structure is also three-inclusive.
We shall prove that for any three-inclusive structure H, the problem CSP1 (H) is NP-complete
or polynomial time solvable. Problems CSP1 (H), for three-inclusive structures H, will be called
three-inclusive constraint satisfaction problems.
3
Three-inclusive structures H are the main focus of this paper. Note that a structure H without
unary relations is three-inclusive (in fact inclusive), and thus proving dichotomy for CSP (H)
would yield dichotomy for digraph H-coloring problems, and hence the entire dichotomy conjecture.
Therefore we restrict the instances G as well. The restriction CSP1 (H) mentioned above is one
natural way - restricting to 1-full instances G amounts to assuming the inputs are equipped with
lists, as described above. Thus requiring H to be three-inclusive and G to be 1-full gives the threeinclusive constraint satisfaction problem CSP1 (H) that is the connecting thread of our paper. (We
then consider further restrictions on both G and H.)
This suggests looking at other versions of ‘fullness’. Let W be a set of positive integers such
that 1 ∈ W , and let V be a vocabulary which contains at least one pair (R, w) for each w ∈ W .
We shall say that a structure G = V G is W -full if for each w ∈ W , and any distinct variables
x1 , x2 , . . . , xw in D G there exists a permutation σ of {1, 2, . . . , w} and a pair (R, w) in V , such
that (xσ(1) , . . . , xσ(k) ) ∈ RG . Note that the notion of a 1-full structure coincides with the notion
of W -full structure with W = {1}. We shall also focus on the next natural special case when
W = {1, 2}; in this case we simply say that a W -full structure is pairwise full (remembering that,
despite the suggestive name, it is assumed to be at the same time 1-full and 2-full). The problem
CSPW (H) is the restriction of CSP (H) to W -full instances G.
A W -full structure G = V G is strictly W -full, if the above permutation σ and relation R are
unique, for each w ∈ W, w ≥ 2, and any distinct variables x1 , x2 , . . . , xw in D G . The restriction
∗ (H). The notion of strictly
of CSP (H) to strictly W -full instances G, will be denoted by CSPW
pairwise full structure refers to, as would be expected, a strictly W -full structure with W = {1, 2}.
A graph G (with loops allowed) can be viewed as strictly pairwise full structure with two binary
relations, corresponding to the edges and the nonedges of G. (To conform to the definition as given,
we choose an arbitrary orientation of G, i.e., consider each edge uv of G as an oriented arc – either
∗
uv
~ or vu
~ – and similarly for each nonedge.) Under this interpretation, the problems CSP{1,2}
(H)
have been studied as list matrix partition problems [6, 18, 17, 23, 27]. (The structures H are usually
taken to be conservative structures with two binary relations whose union is (D H )2 .)
After Jeavons’ work [28, 29] it is usual, when studying the complexity of CSP (H), to consider
the relations ‘definable in H’ along with the relations of H. The properties of structures considered
in this paper are sort of fragile with respect to adding definable relations. Thus to convert a
CSP (H) problem to a full problem CSPW (H) one needs to add to H relations of the arities in W
that hold for all tuples of elements in D. To convert a full problem CSPW (H) further to a strict
∗ (H) one needs to further add to H relations of each arity in W corresponding to
problem CSPW
intersection of relations of this arity in H.
This family of (strictly) full problems is not directly under the scope of the Dichotomy
Conjecture, and many problems in this class resist attempts at classification [6, 18, 23]. Consider, for
instance, the following problem: the vocabulary V consists of eight unary relation names Ui (in other
words, V contains eight pairs (Ui , 1)), and three binary relation names R0 , R1 , R2 (additional pairs
(R0 , 2), (R1 , 2), (R2 , 2) in V ). Now consider the structure V H with domain D = D H = {0, 1, 2},
where the interpretations of the three binary relations are RjH = D 2 − (j, j), for j = 0, 1, 2, and the
eight unary relations correspond to the eight subsets of D. (Assume that U7 is the relation name
∗
(H) is not known. It will follow from Theorem
for which U7H = D H .) The complexity of CSP{1,2}
3.2 that the problem can be solved in quasi-polynomial time nO(log n) (where n = |D G |). We first
illustrate the idea of the recursive algorithm from the proof on Theorem 3.2. For simplicity, we
shall assume that the instance V G has all variables only in the unary relation U7G (having the lists
DH ) which does not restrict them in any way. (It is easy to argue that this version is equivalent to
the original problem.) Thus we want to solve the following combinatorial problem.
4
Given a complete graph G with edges colored 0, 1, 2, can the vertices also be colored by 0, 1, 2 so
that there is no monochromatic edge (an edge of color i whose both endpoints are also colored i) ?
For each vertex x of G we choose a majority color m(x) from 0, 1, 2, with the property that at
least a third of the edges incident to x have color m(x). Suppose G has n vertices. We reduce the
problem for G to n + 1 subproblems as follows. In the first subproblem we assume no vertex x
obtains its majority color. In the remaining n subproblems we assume, for each vertex x in turn,
that (at least) x obtains its majority color. The first subproblem leaves us with two choices of color
for each vertex, and all constraints expressible as clauses with two variables - and hence can be
solved by a two-satisfiability algorithm. Each of the other n problems yields a vertex that has been
colored, and hence can be removed from the graph; moreover, it implies, for all vertices y adjacent
to x along edges of the color m(x), that m(x) is not a legal choice of color for y. In the general
step, we have some vertices with lists (of allowed values) of size two and some with lists of size
three; we define the majority color m(x) to be the color of at least one third of the edges from x
to vertices with lists of size three. Therefore the time to solve a problem with p vertices with lists
of size three is
T (p) ≤ (1 + pT (2p/3)) · T2 (n),
where T2 (n) is the (polynomial) time to solve the two-satisfiablity problem arising from n vertices.
The recurrence implies that T (n) is quasi-poynomial nO(log n) . Despite the simplicity of this
algorithm we have not been able to find a polynomial time algorithm. We have, however, obtained
an algorithm of time complexity nO(log n/ log log n) [18].
The analogous problem with colors 0, 1 corresponds to the well-known graph problem of
recognition of split graphs, which has a simple polynomial time algorithm [22] (cf. also [24, 27]).
When there are more than three colors, the problem is easily seen to be NP-complete. (Our
problem can be shown to be no easier than the so-called stubborn problem from [6], which also
resists classification.)
We shall conclude, using the dichotomy of CSP (H) for three-inclusive structures, that for
∗ (H)) is NP-complete
a three-inclusive structure H, each problem CSPW (H) (respectively CSPW
or solvable in quasi-polynomial time nO(log n) . Thus we obtain a new kind of dichotomy - not
between problems that are NP-complete and those that are solvable in polynomial time, but
between problems that are NP-complete and those that are solvable in quasi-polynomial time.
For convenience and brevity we shall call such a result a quasi-dichotomy. Our interest in quasidichotomy is motivated by arguments similar to those for dichotomy. It is generally expected that
no NP-complete problem admits a quasi-polynomial algorithm, and if one NP-complete problem
admitted such an algorithm then so would all others. The relationship between the dichotomy
conjecture and quasi-dichotomies was previously studied in the case of list matrix partition problems
by Feder, Hell, Klein and Motwani [17].
Megiddo and Vishkin [35] studied a problem on tournaments that has a quasi-polynomial
algorithm. The problem asks for a minimum size dominating set in a tournament on n vertices. A
minimum size dominating set always has at most log n vertices, so the problem can be solved in time
nO(log n) . Megiddo and Vishkin showed that the problem of solving a satisfiability instance with
log2 n variables and n clauses reduces to the dominating set problem in tournaments. Papadimitriou
and Yannakakis [37] showed that the dominating set problem for tournaments is complete for the
class LOGSNP , with the containment of classes LOGSNP ⊆ LOGNP , and both classes reduce
in polynomial time to problems in NP [log2 n] ∩ DSPACE (log2 n). Here NP [log2 n] is the class
of problems that can be solved in nondeterministic polynomial time with only O(log2 n) bits of
nondeterminism.
The classes LOGN P and LOGSN P are classes of problems in N P involving guessing only
5
log n elements in an n-element input structure I. More formally, the classes are defined by
setting LOGN P 0 to be defined by a formula {I : ∃S ∈ [n]log n ∀x ∈ [n]p ∃y ∈ [n]q ∀j ∈
[log n]φ(I, sj , x, y, j)} and setting LOGSN P 0 to be defined by a formula {I : ∃S ∈ [n]log n ∀x ∈
[n]p ∃j ∈ [log n]φ(I, sj , x, j)}, where the S in LOGSN P 0 means strict, I is an input relation, x, y
are tuples of first order variables ranging over [n] = {1, . . . , n}, and φ is a quantifier-free first order
expression. We then define LOGN P to be the class of all languages that can be polynomially
reduced to a problem in LOGN P 0 , and similarly for LOGSN P and LOGSN P 0 .
All our quasi-polynomial algorithms involve guessing O(log n) vertices and O(log n) additional
bits of information, thus with O(log2 n) bits of nondeterminism, and then solving a resulting
problem in deterministic polynomial time. Our quasi-polynomial problems are thus in NP [log2 n].
However, some of these problems are complete for P , and are thus unlikely to be in DSPACE (log2 n).
We shall also observe that constraint satisfaction problems for three-inclusive H show an
interesting structure when the degree of the variables, i.e., the number of occurrences of each
variable, is bounded. With maximum degree two, Boolean constraint satisfaction can express
matching and delta-matroid intersection [7, 9, 11], while with maximum degree three it is the same
as with unbounded degree. Similar results on degree restrictions for the case of graphs can be found
in [15, 21, 25].
We conjecture that every three-inclusive list constraint satisfaction problem that is NP-complete
remains NP-complete when restricted to degree three instances. Using existing results we verify
this conjecture in four particular families of three-inclusive list constraint satisfaction problems.
A structure V H is W -set-full, if it is three-inclusive, and if for any w ∈ W and any (not
necessarily distinct) pairs (S1 , 1), . . . , (Sw , 1) in V such that each |SiH | ≤ 3 for 1 ≤ i ≤ w, there
H × · · · × SH
H
exists a pair (R, w) in in V and a permutation σ on {1, . . . , w}, such that Sσ(1)
σ(w) ⊆ R .
These W -set-full structures H define W -set-full constraint satisfaction problems CSPW (H) and
∗ (H), which will turn out to be equivalent to the corresponding constraint satisfaction problem
CSPW
CSP1 (H) and hence exhibit dichotomy just like the three-inclusive constraint satisfaction problems.
When W = {1, 2}, we call a W -set-full structure (and problem) pairwise-set-full.
The degree of x in a tuple t = (t1 , . . . , tk ) is the number of ti that are equal to x. The degree of
x in a relation Ri is the sum of the degrees of x in the tuples in Ri . The degree of x in a structure
G is the sum of the degrees of x in the relations Ri of arity ℓi ≥ 2 in G. The degree of a structure
G is the maximum degree of the elements of D G in G.
2
Three-Inclusive Constraint Satisfaction Problems
A polymorphism of a structure H with domain D = D H is a mapping g : D k → D such that for
all relations RiH and all tuples (x1j , . . . , xℓi j ) ∈ RiH , for 1 ≤ j ≤ k, we have (y1 , . . . , yℓi ) ∈ RiH for
yt = g(xt1 , . . . , xtk ). Jeavons [28] showed that the complexity of a constraint satisfaction problem
CSP (H) is characterized, up to polynomial time reductions, by the complete set of polymorphisms
that H has.
Bulatov [2] classified conservative constraint satisfaction problems CSP (H) as polynomial or
NP-complete. The polynomial cases are characterized by the existence of three polymorphisms of
H, namely g1 : D 2 → D, g2 : D 3 → D, and g3 : D 3 → D, satisfying the following properties:
(1) g1 , g2 , g3 are conservative, that is g1 (x, y) ∈ {x, y}, g2 (x, y, z) ∈ {x, y, z}, and g3 (x, y, z) ∈
{x, y, z}, for all x, y, z ∈ D.
For each a, b ∈ D with a 6= b, at least one of the following (2)-(4) holds:
(2) g1 is commutative on {a, b}, that is, g1 (a, b) = g1 (b, a) ∈ {a, b};
6
(3) g2 is majority on {a, b}, that is, g2 (a, a, a) = g2 (a, a, b) = g2 (a, b, a) = g2 (b, a, a) = a and
g2 (b, b, b) = g2 (b, b, a) = g2 (b, a, b) = g2 (a, b, b) = b; and
(4) g3 is minority on {a, b}, that is, g3 (a, a, a) = g3 (a, b, b) = g3 (b, a, b) = g3 (b, b, a) = a and
g3 (b, b, b) = g3 (b, a, a) = g3 (a, b, a) = g3 (a, a, b) = b.
Using this classification, we can now prove dichotomy of three-inclusive constraint satisfaction
problems CSP1 (H).
Theorem 2.1 If H is three-inclusive, then the constraint satisfaction problem CSP1 (H) is
polynomial time solvable or NP-complete.
Proof. Let H be a three-inclusive structure; we define three auxiliary structures H ∗ , H ′ , H ′′ on
′′
′
∗
the same domain D H = D H = D H = D H = D, as follows.
• The structure H ∗ is obtained from H by replacing each non-unary relation Ri of H by the
relations Ria = Ri ∩ (T1 × · · · × Tℓi ), for each choice a of unary relations T1 , . . . , Tℓi ∈ U(H).
• The structure H ′ is obtained from H by removing all unary relations S ∈ U(H) with |S| > 3,
and replacing each non-unary relation Ri of H by the relations Ria , for each choice a of unary
relations of the new structure H ′ (thus all |Ti | ≤ 3).
• The structure H ′′ is obtained from H ′ by adding all missing unary relations S, so that U(H ′′ )
is the power set of D.
We note that all these structures are three-inclusive, and that H ′′ is conservative. (Also observe
that the three structures are over different vocabularies.)
We first prove that CSP1 (H) and CSP (H ∗ ) are polynomially equivalent problems. To reduce
CSP1 (H) to CSP (H ∗ ), we transform an instance G of CSP1 (H) to an instance G∗ of CSP (H ∗ );
the structure G∗ is obtained from G in a similar way as H ∗ is obtained from H. (Each non-unary
relation Ri is replaced by the relations Ria .) It is easy to see that a homomorphism of G to H is also
a homomorphism of G∗ to H ∗ . On the other hand, it is also the case that a homomorphism of G∗
to H ∗ is a homomorphism of G to H, since G is 1-full. Thus G has a solution in CSP1 (H) if and
only if G∗ has a solution in CSP (H ∗ ). To reduce CSP (H ∗ ) to CSP1 (H), we transform an instance
G of CSP (H ∗ ) to an instance G′ of CSP1 (H) obtained from G as follows. If a variable x is not
constrained in G (does not appear in any relation), we remove it. For each (x1 , x2 , . . . , xℓi ) ∈ Ria
in G, we impose the constraint (x1 , x2 , . . . , xℓi ) ∈ Ri as well as the unary constraints xi ∈ Ti ,
i = 1, . . . , ℓi , in G′ . It follows that G′ is 1-full, i.e., an instance of CSP1 (H); it is again easy to
check that G has a solution in CSP (H ∗ ) if and only if G′ has a solution in CSP1 (H).
Since H ′′ is conservative, we know by [2] that the problem CSP (H ′′ ) is polynomial time solvable
(if there are polymorphisms g1 , g2 , g3 of H ′′ as described above) or NP-complete. If CSP (H ′′ ) is
polynomial, then the three polymorphisms g1 , g2 , g3 of H ′′ are also polymorphisms of H ′ , as all
relations in H ′ are in H ′′ . (In particular, CSP (H ′ ) is also polynomial.) Moreover, in this case,
g1 , g2 , g3 are also polymorphisms of H ∗ , and hence CSP (H ∗ ) is also polynomial. Indeed, consider
a relation Ria of H ∗ , where a is the choice of unary relations T1 , T2 , . . . , Tℓi ∈ U(H). Suppose
x = (x1 , . . . , xℓi ), y = (y1 , . . . , yℓi ), and z = (z1 , . . . , zℓi ) are in Ria . Let a′ be the choice of
unary relations T1′ , T2′ , . . . , Tℓ′i ∈ U(H) where each Ti′ = {xi , yi , zi }. Since each Ti′ ⊆ Ti and H
′
is three-inclusive, each Ti′ ∈ U(H) and hence also Ti′ ∈ U(H ′ ). Thus x, y, z are also in Ria , and,
′
since g1 , g2 , g3 are polymorphisms of H ′ , we must also have (g1 (x1 , y1 ), . . . , g1 (xℓi , yℓi )) ∈ Ria ,
′
′
(g2 (x1 , y1 , z1 ), . . . , g2 (xℓi , yℓi , zℓi )) ∈ Ria , and (g3 (x1 , y1 , z1 ), . . . , g3 (xℓi , yℓi , zℓi )) ∈ Ria . Since
′
Ria ⊆ Ria , g1 , g2 , g3 are also polymorphisms of H ∗ , whence CSP (H ∗ ) (and CSP1 (H)) is polynomial.
7
Suppose instead CSP (H ′′ ) is NP-complete. We will reduce CSP (H ′′ ) to CSP (H ′ ) and then
to CSP (H ∗ ), proving that CSP (H ∗ ) (and CSP1 (H)) is also NP-complete. Given an instance G
of CSP (H ′′ ), we may assume that each variable x is constrained by some non-unary relation of
G. (If a variable x is only in unary relations of G, then either the intersection of all the subsets
of H corresponding to these unary relations is empty, in which case there is no solution, or the
intersection is nonempty, and assigning any value from the intersection to x allows us to remove x
from the consideration.) Thus each variable x of G occurs in some jth position in some Ria in H ′ ,
where a is the choice of some unary relations T1 , T2 , . . . Tℓi with |Tj | ≤ 3. We form G1 from G by
replacing each unary relation T containing x which is in H ′′ but not in H ′ by the unary relation
T ′ = T ∩ Tj for x. Note that T ′ is a relation of H ′ , since T ′ ⊆ Tj . It is easy to see that G1 has
a solution for CSP (H ′ ) if and only if G has a solution for CSP (H ′′ ). Therefore CSP (H ′ ) is NPcomplete. The final reduction from CSP (H ′ ) to CSP (H ∗ ) is trivial, as each instance G of CSP (H ′ )
is also an instance of CSP (H ∗ ). Therefore CSP (H ∗ ) (and CSP1 (H)) is also NP-complete.
Let us call a structure H sub-unary if each non-unary relation Ri of H is included in some
product T1 × T2 × · · · × Tℓi of unary relations T1 , T2 , . . . , Tℓi ∈ U(H). The structure H ∗ in the above
proof is sub-unary, and this was the only property used in the proof. Thus we have also proved the
following fact.
Corollary 2.2 If H is a sub-unary three-inclusive structure, then CSP (H) is polynomial or NPcomplete.
The above proof also shows that two structures which only differ in their unary relations S with
|S| > 3 have the same behaviour for CSP1 .
Corollary 2.3 If H and K are three-inclusive structures on the same domain D H = D K , which
have the same non-unary relations and the same unary relations S with |S| ≤ 3, then CSP1 (H)
and CSP1 (K) are both NP-complete or both polynomial.
Proof. In the proof of Theorem 2.1, the problems CSP1 (H) and CSP1 (K) yield the same derived
problems CSP (H ′ ) = CSP (K ′ ) and CSP (H ′′ ) = CSP (K ′′ ).
We can apply the theorem to the following three-inclusive list H-coloring problem, where H is
a fixed graph (with loops allowed). An instance is a graph G, and with each vertex v a list L(v) of
vertices of H, such that |L(v)| ≤ 3. The question is whether or not there exists a homomorphism
f of G to H with each f (v) ∈ L(v).
Corollary 2.4 [15] Each three-inclusive list H-coloring problem is NP-complete or polynomial time
solvable.
In fact, in [15] we classify exactly which three-inclusive list H-coloring problems are polynomial
- they turn out to be the same bi-arc graphs defined above.
3
Restriction to Pairwise Full (and Strictly Pairwise Full) Instances
Our general goal is to study the restriction of three-inclusive constraint satisfaction problems to
W -full instances. For simplicity we shall first state and prove our results in the special case where
8
W = {1, 2}, i.e., for pairwise full instances G. The general case will be treated in the next section,
mostly just by pointing out the extra effort required.
We begin by observing that each three-inclusive constraint satisfaction problem CSP1 (H) can
be viewed as the restricted problem CSP{1,2} (H ′ ), where H ′ is obtained from H by adding the
binary relation D H × D H (and the binary relation D G × D G to any instance G, without changing
the problem). We prove a strong converse to this observation; in particular, this will show that
∗
CSP{1,2} (H) and CSP{1,2}
(H) enjoy dichotomy for pairwise-set-full structures H.
Theorem 3.1 Let H be a pairwise-set-full structure.
∗
The problems CSP{1,2} (H), CSP{1,2}
(H), and CSP1 (H) are all polynomial or all NP-complete.
Proof. The problem CSP1 (H) is polynomial or NP-complete by Theorem 2.1 because the pairwise∗
set-full structure H is by definition three-inclusive. Every instance of CSP{1,2}
(H) is an instance
of CSP{1,2} (H), and every instance of CSP{1,2} (H) is an instance of CSP1 (H), so if CSP1 (H) is
polynomial, then all three problems are polynomial.
If, on the other hand, CSP1 (H) is NP-complete, then by Corollary 2.3 so is CSP1 (K) where
K is obtained from H by deleting all unary relations S ∈ U(H) with |S| > 3. Since each instance
of CSP1 (K) is 1-full, we can prove along the lines of the first part of the proof of Theorem 2.1,
that CSP1 (K) is polynomially equivalent to CSP1 (K ′ ) where K ′ is sub-unary. To simplify the
notation, let us assume that K itself is sub-unary.
For every pair of variables x, y in an instance G of CSP1 (K), we have x and y constrained by
unary relations S G and T G respectively, such that |S K |, |T K | ≤ 3. Since H and hence also K is
pairwise-set-full, there is a binary relation RK such that S K × T K ⊆ RK . We may thus add the
pair (x, y) to RG without affecting the existence of a solution. Therefore, for every pair of variables
′
′
x, y in this modified instance G′ , there exists a binary relation RG such that (x, y) ∈ RG . Hence
G′ is an instance of CSP{1,2} (K), and also of CSP{1,2} (H), and thus CSP{1,2} (H) is NP-complete.
∗
We can transform the instance G of CSP{1,2} (H) into an instance G′ of CSP{1,2}
(H), in which
each pair (x, y) occurs in only one binary relation Ri , as one of (x, y) ∈ Ri or (y, x) ∈ Ri . Let
r be the number binary of relations in H. For the transformation we shall use an edge coloured
complete bipartite graph B with the following properties:
• B has s of vertices in each part;
• each edge of B has one of 2r colors;
• between any s/3 vertices in one part of B and any s/3 vertices in the other part of B, there
is an edge of each of the 2r colours.
Given B, we replace each variable x in the instance with s variables xi . Two variables x and y
are joined by some k ≤ 2r choices of binary relations out of the r binary relations with two possible
choices of orientation (from x to y or from y to x) for these binary relations. We may thus join
the xi to the yi with a bipartite graph obtained from B with edges of k colors, by replacing the
remaining 2r − k colors with some of the k chosen colors. A variable x is constrained by a unary
relation S ⊆ D H with |S| ≤ 3, and since H is pairwise-set-full, there exists a binary relation R in
H such that S × S ⊆ R. We add the pairs (xi , xj ) to R, for all the copies xi and xj of x. We now
∗
have an instance G′ of CSP{1,2}
(H). In a solution, out of the s variables xi , at least s/3 of them
will have the same value from S, which can then be used as a value for the original variable x.
The k binary relations involving x and y appear between the s/3 corresponding choices of xi and
9
the s/3 corresponding choices of yi , so a solution to G′ gives a solution to G. This completes the
∗
reduction and shows that CSP{1,2}
(H) is NP-complete as well.
It remains to show that such a bipartite graph B exists, for any r. (Note that we may choose s
as large as we want.) Given a complete bipartite graph with s vertices on each side, assign a color
out of 2r colors to each edge uniformly at random. The probability that two sets of size s/3 will
2
miss one of the 2r colors is at most 2r(1 − 1/(2r))(s/3) , and the number of choices of such subsets
2
s 2
s 2
is s/3
, so it suffices to choose s large enough so that 2r(1 − 1/(2r))(s/3) s/3
< 1/2 to guarantee
that with probability at least 1/2 the complete bipartite graph B will be assigned 2r edge colors
with the desired property. (The quantity on the left is easily seen to converge to 0 with increasing
s, for any constant r.)
Thus pairwise-set-full constraint satisfaction problems enjoy dichotomy when restricted to either
the pairwise full or the strictly pairwise full instances G. We have not succeeded in obtaining
a similar dichotomy for three-inclusive constraint satisfaction in general. We can, however, use
Theorem 3.1 to obtain a quasi-dichotomy, because of the following result.
Theorem 3.2 Let H be a three-inclusive structure, and let H be the set of all pairwise-set-full
structures H ′ with the same domain and the same non-unary relations as H, and such that each
S ∈ U(H ′ ) with |S| ≤ 3 is also in U(H).
∗
(H) are
If all CSP1 (H ′ ) for H ′ ∈ H are polynomial, then both CSP{1,2} (H) and CSP{1,2}
′
′
quasi-polynomial. If some CSP1 (H ) for H ∈ H is NP-complete, then both CSP{1,2} (H) and
∗
CSP{1,2}
(H) are NP-complete.
∗
Corollary 3.3 For each three-inclusive structure H, the problems CSP{1,2} (H) and CSP{1,2}
(H)
are both NP-complete or both quasi-polynomial.
∗
Proof. We shall focus on proving the theorem for CSP{1,2} (H); the proof for CSP{1,2}
(H) is
similar.
We shall transform CSP{1,2} (H) to problems CSP1 (H ′ ) for H ′ ∈ H, in such a way that if any
of these problems is NP-complete then so is CSP{1,2} (H). In the transformation, each instance G
of CSP{1,2} (H) with n variables gives rise to nO(log n) instances G′ of problems CSP1 (H ′ ), so that
if all these problems are polynomial then CSP{1,2} (H) is quasi-polynomial.
The problems CSP1 (H ′ ) will have a pairwise-set-full structure H ′ obtained from H by
repeatedly replacing certain unary relations S with all proper subsets T ⊂ S. In fact, each structure
H ′ ∈ H′ will be strongly pairwise-set-full, in the sense that it is three-inclusive and for any unary
relations S1 , S2 (not just those with |Si | ≤ 3) there is a binary relation R with S1 × S2 or S2 × S1
contained in R.
To obtain these nO(log n) instances G′ (and the problems CSP1 (H ′ ) they correspond to), we
proceed as follows. Let A and B be two subsets of D H such that no binary relation of H contains
A × B or B × A. Since we want to make our structure strongly pairwise-set-full, we shall ensure
that there is no S ∈ U(H) that contains A, or no T ∈ U(H) that contains B. (Later on, we shall
keep ensuring this property for other pairs A, B of sets, on structures H ′ previously obtained from
H.)
Let L be the set of variables (elements of D G ) which are in unary constraints S G such that
A ⊆ S H , and let M be the set of variables (elements of D G ) in unary constraints T G such that
B ⊆ T H . Let ℓ = |L|, m = |M |, and let r again denote the number of binary relations in H. For
every variable v ∈ L there exists a binary relation Ri such that (v, w) or (w, v) is in RiG for at least
m/(2r) variables w ∈ M . We now transform the instance G of CSP{1,2} (H) (later on, the instance
10
G′ of the current CSP{1,2} (H ′ )) into ℓ + 1 new problems. For each binary relation Ri we choose
variables ai , a′i ∈ A, bi , b′i ∈ B so that (ai , bi ) 6∈ RiH , (b′i , a′i ) 6∈ RiH . In the first derived problem
we change, for each variable v ∈ L, the unary constraint S G to the unary constraint S G − ai or
S G − a′i , depending on whether Ri was chosen above for pairs (v, w) or (w, v). In the remaining ℓ
derived problems, we change, for one variable v ∈ L, the constraint S G to the constraint {ai }G or
{a′i }G , depending on whether Ri was chosen above for pairs (v, w) or (w, v). We also change, for all
variables w ∈ M such that (v, w) (respectively (w, v)) is constrained by RiG , the constraint T G to
the constraint T G − bi (respectively T G − b′i ). Recall that for each choice of v, the number of such
variables w is at least m/(2r). Thus an instance with (|L|, |M |) = (ℓ, m) has been replaced with one
instance with (|L|, |M |) = (0, m) and ℓ instances with (|L|, |M |) = (ℓ− 1, m(1− 1/(2r))). Repeating
this process − log m/ log(1 − 1/(2r)) = O(log n) times, we obtain nO(log n) instances that each have
ℓ = 0 or m = 0, that is, either no unary constraint contains A or no unary constraint contains
B. The problem CSP{1,2} (H) is correspondingly replaced by problems CSP{1,2} (H ′ ). Note that
no unary constraint in H ′ contains A or no unary constraint in H ′ contains B, and all the unary
constraints in H ′ are subsets of unary constraints in H.
We repeat this process for each pair of sets (A, B) as above. In the end, we obtain nO(log n)
instances, and corresponding structures H ′ , such that H ′ is strongly pairwise-set-full. If all such
CSP1 (H ′ ) are polynomial, then we can solve each of these nO(log n) resulting problems, obtaining
a quasi-polynomial algorithm for CSP{1,2} (H). Otherwise, at least one such CSP1 (H ′ ) is NP′
′
complete. Let H ′′ be obtained from H ′ by removing all unary constraints S H with |S H | > 3. By
Corollary 2.3 the pairwise-set-full constraint satisfaction problem CSP1 (H ′′ ) is also NP-complete;
note that all the the unary constraints of H ′′ are in U(H). By Theorem 3.1 the problem
CSP{1,2} (H ′′ ) is also NP-complete, and its instances are also instances of the original problem
CSP{1,2} (H), so this problem is also NP-complete.
∗ (H) defined in the Introduction, and studied
Recall the list matrix partition problems CSP1,2
in [6, 17, 18, 24, 27]. We obtain the following corollaries. (The first corollary has been anticipated
in [17].)
Corollary 3.4 Each list matrix partition problem is NP-complete or quasi-polynomial.
∗ (H) three-inclusive, if the instances are graphs
We call a list matrix partition problem CSP1,2
G with lists of size at most three.
Corollary 3.5 Each three-inclusive list matrix partition problem is NP-complete or quasipolynomial.
The analogue of Corollary 2.3 follows from Theorems 3.1 and 3.2 by an application of
Corollary 2.3.
Corollary 3.6 If H and K are pairwise-set-full structures on the same domain D H = D K , which
have the same non-unary relations and the same unary relations S with |S| ≤ 3, then CSP{1,2} (H)
and CSP{1,2} (K) are both NP-complete or both polynomial.
If H and K are three-inclusive structures on the same domain D H = D K , which have the
same non-unary relations and the same unary relations S with |S| ≤ 3, then CSP{1,2} (H) and
CSP{1,2} (K) are both NP-complete or both quasi-polynomial.
∗
∗
The same conclusions hold for the strict versions CSP{1,2}
(H) and CSP{1,2}
(K).
11
4
Restriction to W -Full (and Strictly W -Full) Instances
Theorems 3.1 and 3.2 generalize to W -full structures, and the proofs are similar. Here we briefly
state the results, and describe the additional effort required to prove them.
Here is the generalization of Theorem 3.1.
Theorem 4.1 Let H be a W -set-full structure.
∗ (H), and CSP (H) are all polynomial or all NP-complete.
The problems CSPW (H), CSPW
1
Proof. We prove the theorem for W = {1, w} for a single w ≥ 2. For general W we can
carry out this proof for each value w ∈ W with w ≥ 2 in turn. Thus we assume W = {1, w}
∗ (H) and
and proceed as in Theorem 3.1. If CSP1 (H) is polynomial, then trivially both CSPW
CSPW (H) are polynomial. If CSP1 (H) is NP-complete, then by Corollary 2.3 we may restrict
CSP1 (H) to three possible values in H per variable (using the unary relations) and still obtain an
NP-complete problem. Again, for every collection of distinct variables x1 , . . . , xw in D G , where xi
has at most three possible values given by SiH , there exists a relation RH and a permutation σ such
H × · · · × SH
H (since H is W -set-full), so the instance G can be made W -full as
that Sσ(1)
σ(w) ⊆ R
before, and thus becomes an instance of the W -set-full problem CSPW (H). Therefore CSPW (H)
is also NP-complete.
∗ (H). As in Theorem 3.1, we
It remains to enforce strictness to obtain an instance of CSPW
make s copies of each variable, and use an auxiliary construction to define the relations on this
enlarged set of variables. Specifically, we apply Lemma 4.2 below, with t = w!r (corresponding to
the w! choices of permutations σ and r choices of relations RH in the definition of strictly W -full
∗ (H)
structures). We then obtain an instance equivalent to G that is strictly W -full, whence CSPW
is also NP-complete.
Lemma 4.2 Let Kws be the structure with ws elements xij , 1 ≤ i ≤ w, 1 ≤ j ≤ s and relation R
consisting of all ws tuples (x1i1 , . . . , xwiw ). For every pair of integers w ≥ 2 and t ≥ 1, there exists
an integer s ≥ 1 and a coloring of the tuples in Kws with t colors such that for every choice of
w subsets S1 , . . . , Sw with Si ⊆ {xi1 , . . . , xis } and |Si | ≥ s/3, we have that S1 × · · · × Sw contains
tuples of all w-colors.
Proof. Assign a color out of t colors to each tuple uniformly at random. The probability that
t
a choice of w sets Si with |Si | ≥ s/3 will miss one of the t colors is at most t(1 − 1/t)(s/3) , and
s t
the number of choices of such subsets is s/3
, so it suffices to choose s large enough so that
w
w
s
t(1 − 1/t)(s/3) s/3
< 1/2 to guarantee that with probability at least 1/2 the structure Kws will
be assigned t tuple colors with the desired property.
The generalization of Theorem 3.2 takes the following form.
Theorem 4.3 Let H be a three-inclusive structure, and let H be the set of all W -set-full structures
H ′ that have the same non-unary relations as H, and such that each S ∈ U(H ′ ) with |S| ≤ 3 is
also in U(H).
∗ (H) are quasiIf all CSP1 (H ′ ) for H ′ ∈ H are polynomial, then both CSPW (H) and CSPW
∗ (H)
polynomial. If some CSP1 (H ′ ) for H ′ ∈ H is NP-complete, then both CSPW (H) and CSPW
are NP-complete.
∗ (H) are
Corollary 4.4 For each three-inclusive structure H, the problems CSPW (H) and CSPW
both NP-complete or both quasi-polynomial.
12
In the proof of Theorem 4.3 we shall again treat each w ∈ W in turn, thus we shall assume that
W = {1, w}.
Let G be a W -full structure, let L1 , . . . , Lw be (not necessarily disjoint) nonempty subsets of
DG , and let α = 1/(w!r), where r is the number of w-ary relations RiG . Say that a rooted tree T
is a select-tree if the vertices of T at depth 1 ≤ i ≤ w correspond to the variables in Li , with the
root ρ at depth 0. For a w-ary relation RiG , a permutation σ of {1, . . . , w}, and 0 < β < 1, let a
(Ri , σ, β)-tree be a select-tree T such that each path (ρ, x1 , . . . , xw ) in T has (xσ(1) , . . . , xσ(w) ) ∈ RiG
or has xi = xj for some 1 ≤ i < j ≤ w, and each vertex of T at depth 0 ≤ i < w has at least
β|Li+1 | children.
Lemma 4.5 For every W -full structure G and sets L1 , . . . , Lw as above, there exist Ri and σ such
that G has a (Ri , σ, β)-tree for β = α/(4w).
Proof. Let z = ℓ1 · · · ℓw for ℓi = |Li |. There exists a relation RiG and a permutation σ of {1, . . . , w}
such that at least αz = z/(w!r) tuples (x1 , . . . , xw ) with xi ∈ Li have (xσ(1) , . . . , xσ(w) ) ∈ RiG or have
xi = xj for some 1 ≤ i < j ≤ w. By Markov’s inequality, there are at least βℓ1 elements x ∈ L1 such
that the number of w-tuples (x1 , . . . , xw ) with x = x1 and xi ∈ Li having (xσ(1) , . . . , xσ(w) ) ∈ RiG ,
or having xi = xj for some 1 ≤ i < j ≤ w, is at least α′ (z/ℓ1 ) for α′ = (α − β)/(1 − β), for any β
with 0 < β < α. (Markov’s inequality states that a nonnegative random variable X has value at
most tE(X) with probability at least 1 − 1t , for each choice of t > 1.) By our special choice of β,
we have α′′ (1 − 1/(2(w − 1))) ≥ (α′′ − β)/(1 − β), for each α′′ ≥ α/2. Thus repeatedly replacing α
by α′ a total of w − 1 times reduces α by a factor at least (1 − 1/(2(w − 1)))w−1 ≥ 1/2, so that at
any point in time the new value α′′ satisfies α′′ ≥ α/2. We therefore obtain at least βℓ1 children of
the root, and for each chosen child x, we have z replaced with z/ℓ1 and αz replaced with α′ (z/ℓ1 ),
giving again at least βℓ2 children of x, and by induction, each vertex of T at depth 0 ≤ i < w has
at least βℓi+1 children for β = α/(4w).
Proof of Theorem 4.3. We again focus on proving the statement for CSPW (H), the proof for
∗ (H) being similar. We proceed as in Theorem 3.2. Assume H is a three-inclusive structure,
CSPW
and transform CSPW (H) to problems CSP1 (H ′ ), for W -set-full structures H ′ ∈ H, such that if
any of these problems is NP-complete then CSPW (H) is also NP-complete. In the transformation,
each instance G of CSPW (H) gives rise to nO(log n) instances G′ of the problems CSP1 (H ′ ), so that
if all these problems are polynomial then CSPW (H) is quasi-polynomial. Recall that we assume
W = {1, w}. The problems CSP1 (H ′ ) will again have a W -set-full structure H ′ obtained from H
by repeatedly replacing certain unary relations S with all proper subsets T ⊂ S.
To obtain these nO(log n) instances G′ (and the problems CSP1 (H ′ ) they correspond to), we
shall ensure that if some elements aijσ ∈ D H , one for each of the r w-ary relations RiH , 1 ≤ j ≤ w
and each fixed permutation σ on {1, . . . , w}, are such that (aiσ(1)σ , . . . , aiσ(w)σ ) 6∈ RiH , and we let
Aj = {aijσ : 1 ≤ i ≤ r}, then for some 1 ≤ j ≤ w the unary constraints on the instances G′ (and
corresponding structures H ′ , both described below) do not contain Aj . This will guarantee that
we obtain a W -set-full problem.
Let Lj be the set of variables with unary constraints S G such that Aj ⊆ S H for 1 ≤ j ≤ w, and
let ℓj = |Lj |. By Lemma 4.5 G has an (Ri , σ, β) tree T for β = 1/(4w!wr). For every solution f to
the instance G, there must exist a path (ρ, x1 , . . . , xt−1 ) in T with 1 ≤ t ≤ w, with the tree vertices
xu corresponding to distinct elements of D G , that gives to xu value aiuσ for 1 ≤ u < t, but does
not give value aitσ to any child xt of xt−1 corresponding to an element distinct from the elements
for these xu , 1 ≤ u < t.
Since the number of such children of xt−1 is at least βℓt , and the solution f belongs to a family
of solutions that assigns the values aiuσ for 1 ≤ u < t and removes the value aitσ from the lists
13
of these children, we obtain a new instance with ℓt replaced by (1 − β)ℓt . This simplification
can be performed at most − log(ℓ1 · · · ℓw ) log(1 − β) ≤ −w log n log(1 − 1/(4w!wr)) = O(log n)
times, and the number of possible choices of paths (ρ, x1 , . . . , xt−1 ) for each iteration is at most
2ℓ1 · · · ℓw ≤ 2nw = nO(1) , so we obtain nO(log n) instances that have some ℓj = 0, thus satisfying the
condition for the corresponding Aj .
We repeat this process for each tuple of sets (A1 , . . . , Aw ) as above. In the end, we obtain
nO(log n) instances (and corresponding structures H ′ ) that satisfy the stated condition for each
tuple (A1 , . . . , Aw ). Thus for each resulting instance G′ of CSP1 (H ′ ), the structure H ′ is strongly
W -set-full. If all such CSP1 (H ′ ) are polynomial, then we can solve each of these nO(log n) resulting
problems. If one such CSP1 (H ′ ) is NP-complete, then by Corollary 2.3 the W -set-full structure H ′′ ,
obtained from H ′ by restricting all unary relations to subsets of size at most three, yields a problem
CSP1 (H ′′ ) that is also NP-complete, and all these subsets of size at most three are in the original
structure H. By Theorem 4.1 the problem CSPW (H ′′ ) is NP-complete, and since the instances of
CSPW (H ′′ ) are also instances of CSPW (H), the problem CSPW (H) is also NP-complete.
We also obtain the analogue of Corollary 3.6, which follows from Theorems 4.1 and 4.3 by an
application of Corollary 2.3.
Corollary 4.6 If H and K are W -set-full structures on the same domain D H = D K , which have
the same non-unary relations and the same unary relations S with |S| ≤ 3, then CSPW (H) and
CSPW (K) are both NP-complete or both polynomial.
If H and K are three-inclusive structures on the same domain D H = D K , which have the same
non-unary relations and the same unary relations S with |S| ≤ 3, then CSPW (H) and CSPW (K)
are both NP-complete or both quasi-polynomial.
∗ (H) and CSP ∗ (K).
The same conclusions hold for the strict versions CSPW
W
As in the proof of Theorem 4.1, every three-inclusive problem CSPW (H) can be transformed
∗ (H). However, it is not clear how to accomplish
into a polynomially equivalent problem CSPW
the converse transformation in general; so the latter family of problems may define a more general
family, up to polynomial time equivalence. But the two families of problems are the same, up to
quasi-polynomial time equivalence, since all problems considered are either quasipolynomial (hence
equivalent up to quasi-polynomial reductions) or NP-complete (hence equivalent up to polynomial
reductions).
5
Bounded Degree Problems
Here we consider restricting the three-inclusive constraint satisfaction problems CSP1 (H) to
instances G with bounded degree. We are lead to propose the following conjecture.
Conjecture 5.1 Every three-inclusive list constraint satisfaction problem CSP1 (H) that is NPcomplete, remains NP-complete when restricted to instances of degree three.
We denote by CSP13 (H) the restriction of CSP1 (H) to instances of degree three. We now
briefly explain four special cases in which the conjecture holds. All are based on existing results.
We shall say that a three-inclusive constraint satisfaction problem CSP1 (H) d-simulates a three′
inclusive constraint satisfaction problem CSP1 (H ′ ), if for every relation RiH , there is an instance
Gi of CSP1 (H) of degree at most d containing ℓi particular variables x1 , . . . , xℓi of degree at most
′
one, such that (a1 , . . . , aℓi ) ∈ RiH if and only if there exists a homomorphism f of Gi to H such
14
that each f (xi ) = ai . If CSP1 (H) d-simulates CSP1 (H ′ ) with d ≤ 3, then there is a polynomial
reduction of the problem CSP13 (H ′ ) to CSP13 (H), obtained by substituting each occurrence of a
′
relation RiH in an instance G′ of CSP13 (H ′ ) by a copy of the instance Gi corresponding to Ri , thus
obtaining an instance G of CSP13 (H). Therefore showing the conjecture for CSP13 (H ′ ) implies the
conjecture for CSP13 (H).
In the first case, we focus on the case of Boolean constraint satisfaction problems, i.e., CSP1 (H),
where D H has two elements (0, 1). The theorem stated below was first proved by Dalmau and
Ford [7], and by Feder and Ford [11], using a result of Feder [9]. We briefly explain the proof as it
is the basis for the other cases.
Theorem 5.2 [7, 11] Conjecture 5.1 holds for Boolean constraint satisfaction problems.
Proof. In other words, we claim that if for a three-inclusive H with D = D H = {0, 1} the problem
CSP1 (H) is NP-complete, then so is its restriction CSP13 (H) to instances of degree three. It is
shown in [9] that each NP-complete case of Boolean constraint satisfaction problems CSP1 (H) 2simulates the problem CSP1 (H ′ ) which contains the ternary relation D 3 −{(0, 0, 0)} (corresponding
to the disjunction x ∨ y ∨ z), the ternary relation D 3 − {(1, 1, 1)} (corresponding to the disjunction
x ∨ y ∨ z), and the binary relation D 2 − {(1, 0)} (corresponding to the implication x → y).
This simulation yields a reduction from the NP-complete problem of 3-satisfiability to the
problem CSP13 (H ′ ), as we may include a variable x in any number k of clauses by using k auxiliary
variables x1 , x2 , . . . , xk with implications x1 → x2 , x2 → x3 , . . . , xk−1 → xk , xk → x1 . These
implications involve two occurrences for each xi , and the third occurrence of each of these k variables
xi that all take the same value can be used for the k occurrences of x in clauses x ∨ y ∨ z or x ∨ y ∨ z.
In the second case, we focus on three-inclusive constraint satisfaction problems CSP1 (H) in
which all S ∈ U(H) have |S| ≤ 2. These problems correspond to list constraint satisfaction
problems with lists of size at most two, and we call these problems small-list constraint satisfaction
problems.
Theorem 5.3 Conjecture 5.1 holds for small-list constraint satisfaction problems.
Proof. It is shown in [10] that each NP-complete case of the small-list constraint satisfaction
problems 2-simulates a problem CSP1 (H ′ ) for a structure H ′ containing the unary relations {0i , 1i },
for 1 ≤ i ≤ r, and containing the binary relations ({0i , 1i } × {0j , 1j }) − {(1i , 0j )} (corresponding
to the implications xi → xj ) or the binary relations ({0i , 1i } × {0j , 1j }) − {(1i , 0j ), (0i , 1j )}
(corresponding to the equalities xi = xj ) for each 1 ≤ i, j ≤ r, i 6= j. It is also shown the
[10] that the problem CSP1 (H) with D H = {0, 1}, obtained from CSP1 (H ′ ) by identifying all sets
{0i , 1i } with {0, 1}, is NP-complete.
We may thus represent kr occurrences of a Boolean variable x, with k of these occurrences
having unary relation {0i , 1i } for each 1 ≤ i ≤ r, by a cycle of implications xi → xj or equalities
xi = xj , as in the proof of Theorem 5.2, involving variables xij having unary relation {0i , 1i }, for
1 ≤ i ≤ r and 1 ≤ j ≤ k. This completes the reduction from the NP-complete problem CSP1 (H)
obtained by identifying all {0i , 1i } with {0, 1} to CSP13 (H ′ ).
The third case concerns list homomorphism problems for graphs (with loops allowed). The
problem CSP1 (H), where H is three-inclusive and consists of a single symmetric binary relation,
will be called a graph list homomorphism problem. The following theorem has been proved in [15].
15
Theorem 5.4 [15] If H is a bi-arc graph, then CSP13 (H) is polynomial; otherwise, CSP13 (H) is
NP-complete.
Since this classification agrees exactly with that for CSP1 (H) from [14], we obtain the desired
corollary.
Corollary 5.5 Conjecture 5.1 holds for graph list homomorphism problems.
The last case deals with N -free binary relations. A binary relation B is called N -free if
(x, z), (y, z), (y, t) ∈ B imply either x = y or z = t. A binary N -free constraint satisfaction
problem is a three-inclusive problem CSP1 (H) where U(H) contains all S with |S| ≤ 3, all binary
relations of H are N -free, and H has no relations of higher arity.
Theorem 5.6 Conjecture 5.1 holds for binary N -free constraint satisfaction problems.
Proof. It is shown in [19] that each NP-complete binary N -free constraint satisfaction problem
3-simulates a problem CSP1 (H) containing the relation {(1A , 0B , 0C ), (0A , 1B , 0C ), (0A , 0B , 1C )},
with |{0A , 1A }| = |{0B , 1B }| = |{0C , 1C }| = 2.
This relation may further be used to 3-simulate a problem CSP1 (H ′ ) that also contains the
relation {(1A , 0B ), (0A , 1B )} (corresponding to the inequality xA 6= xB ), by setting xC to value 0C ,
and similarly {(1B , 0C ), (0B , 1C )} (corresponding to the inequality xB 6= xC ); and also contains
the relation {(0A , 0C ), (1A , 1C )} (corresponding to the equality xA = xC ), obtained by combining
xA 6= xB with xB 6= xC , and similarly the relation {(0A , 0B ), (1A , 1B )} (corresponding to the
equality xA = xB ). Thus we may set xA1 = · · · = xAk = xB1 · · · xBk = xC1 · · · xCk as a chain of
equalities that uses only two of the three allowed occurrences of each variable. This allows us to
identify the three unary relations {0i , 1i } with a single unary relation {0, 1}, with k occurrences
per variable, for the NP-complete Boolean constraint satisfaction problem one-in-three SAT, with
relation {(1, 0, 0), (0, 1, 0), (0, 0, 1)} (obtained from {(1A , 0B , 0C ), (0A , 1B , 0C ), (0A , 0B , 1C )} by the
identification xA = xB = xC ). Thus CSP13 (H ′ ) and CSP13 (H), with degree at most three, are also
NP-complete.
We are grateful to the referees for guiding us to present these results more clearly.
References
[1] J. Bang-Jensen, P. Hell and G. MacGillivray, “On the complexity of colouring by
superdigraphs of bipartite graphs,” Discrete Math. 109 (1992) 27–44.
[2] A.A. Bulatov, “Tractable conservative constraint satisfaction problems,” In Proceedings of
the 18th IEEE Annual Symposium on Logic in Computer Science (LICS 2003), 321–330.
[3] A.A. Bulatov, “A dichotomy constraint on a three-element set,” In Proceedings of the 43rd
IEEE Symposium on Theory of Computing (2002), 649–658.
[4] A.A. Bulatov and P. Jeavons, “Algebraic structures in combinatorial problems,” Technical
Report MATH-AL-4-2001m Technishe universität Dresden, Germany, 2001.
[5] A. Bulatov, A. Krokhin, and P. Jeavons, “Classifying complexity of constraints using finite
algebras,” SIAM J. on Computing 34 (2005) 720–742.
16
[6] K. Cameron, E. E. Eschen, C. T. Hoang and R. Sritharan, “The list partition problem for
graphs,” Proc. 15th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA) 2004,
391–399.
[7] V. Dalmau and D. Ford, “Generalized satisfiability with k occurrences per variable: a study
through delta-matroid parity,” Mathematical Foundations of Computer Science (MFCS 2003),
Lecture Notes in Computer Science 2747, Springer 2003, 358–367.
[8] R. Dechter, “Constraint networks,” In Encyclopedia of Artificial Intelligence, 1992, 276–285.
[9] T. Feder, “Fanout limitations on constraint systems,” Theoretical Computer Science 255
(2001) 281–293.
[10] T. Feder, “Homomorphisms to oriented cycles and k-partite satisfiability,” SIAM J. Discrete
Math. 14 (2001) 471–480.
[11] T. Feder and D. Ford, “Classification of bipartite Boolean constraint satisfaction through
delta-matroid intersection,” manuscript.
[12] T. Feder and P. Hell, “List homomorphisms to reflexive graphs,” J. Comb. Theory Series B
72 (1998) 236–250.
[13] T. Feder, P. Hell, and J. Huang, “List homomorphisms and circular arc graphs,”
Combinatorica 19 (1999) 487–505.
[14] T. Feder, P. Hell, and J. Huang, “Bi-arc graphs and the complexity of list homomorphisms,”
J. Graph Theory 42 (1999) 61–80.
[15] T. Feder, P. Hell, and J. Huang, “List homomorphisms of graphs with bounded degrees,” to
appear in Discrete Math.
[16] T. Feder, P. Hell, and J. Huang, “List homomorphisms to reflexive digraphs,” manuscript.
[17] T. Feder, P. Hell, S. Klein, and R. Motwani, “Complexity of list partitions,” SIAM J. Discrete
Mathematics 16 (2003) 449-478.
[18] T. Feder, P. Hell, D. Kral, and J. Sgall, “Two algorithms for list matrix partitions.” Proc.
16th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA) 2005, 870–876.
[19] T. Feder, F. Madelaine, and I.A. Stewart, “Dichotomies for classes of homomorphism
problems involving unary functions,” Theoretical Computer Science 314 (2004), 1–43.
[20] T. Feder and M.Y. Vardi, “The computational structure of monotone monadic SNP and
constraint satisfaction: a study through Datalog and group theory,” SIAM J. Comput. 28
(1998) 236–250.
[21] A. Galluccio, P. Hell, J. Nešetřil, “The complexity of H-colouring of bounded degree graphs”,
Discrete Math. 222 (2000) 101 - 109.
[22] M. C. Golumbic, Algorithmic Graph Theory and Perfect Graphs, Academic Press,
New York, 1980.
[23] P. Hell, “From graph colouring to constraint satisfaction - there and back again”, to appear.
17
[24] P. Hell, S. Klein, L. Tito Nogueira, and F. Protti, “Partitioning chordal graphs into
independent sets and cliques”, Discrete Applied Math. 141 (2004) 185-194.
[25] P. Hell and J. Nešetřil, “Counting list homomorphisms and graphs with bounded degrees”, in
Graphs, Morphisms and Statistical Physics (J. Nešetřil and P. Winkler, eds.) DIMACS
Series in Discrete Mathematics and Theoretical Computer Science, Volume 63 (2004) 105 –
112.
[26] P. Hell and J. Nešetřil, “On the complexity of H-coloring,” J. Comb. Theory, Series B 48
(1990), 92–110.
[27] P. Hell and J. Nešetřil, Graphs and Homomorphisms, Oxford University Press 2004.
[28] P. Jeavons, “On the algebraic structure of combinatorial problems,” Theoretical Computer
Science 200 (1998) 185–204.
[29] P. Jeavons, D. Cohen, and M. Gyssens, “Closure properties of constraints,” Journal of the
ACM 44 (1997) 527–548.
[30] R. E. Ladner, “On the structure of polynomial time reducibility”, J. Assoc. Comput. Mach.
22 (1975) 155 – 171.
[31] P. Lincoln and J. C. Mitchell, “Algorithmic aspects of type inference with subtypes,” in Conf.
Rec. 19th ACM Symp. on Principles of Programming Languages (1992), 293–304.
[32] V. Kumar, “Algorithms for constraint-satisfaction problems,” AI Magazine 13 (1992), 32–44.
[33] P. Meseguer, “Constraint satisfaction problem: an overview,” AICOM 2 (1989), 3–16.
[34] J. C. Mitchell, “Coercion and type inference (summary),” in Conf. Rec. 11th ACM Symp. on
Principles of Programming Languages (1984), 175–185.
[35] N. Megiddo and U. Vishkin, “On finding a minimum dominating set in a tournament”, Theor.
Comput. Sci. 61 (1988) 307–316.
[36] U. Montanari, “Networks of constraints: Fundamental properties and applications to picture
processing,” Information Sciences 7 (1974) 95–132.
[37] C.H. Papadimitriou and M. Yannakakis, “On limited nondeterminism and the complexity of
the V-C dimension”, J. Comput. Sys. Sci. 53 (1996) 161–170.
[38] T. J. Schaefer, “The complexity of satisfiability problems,” Proc. 10th ACM Symp. on Theory
of Computing (1978), 216–226.
[39] M.Y. Vardi, “Constraint satisfaction and database theory: a tutorial,” Proceedings of the
19th Symposium on Principles of Database Systems (PODS 2000), 76–85.
[40] M. Wand and P. M. O’Keefe, “On the complexity of type inference with coercion,” in Conf.
on Functional Programming Languages and Computer Architecture (1989), 293–298.
18