Temporal Valued Constraint Satisfaction Problems
Abstract
We study the computational complexity of the valued constraint satisfaction problem (VCSP) for every valued structure over that is preserved by all order-preserving bijections. Such VCSPs will be called temporal, in analogy to the (classical) constraint satisfaction problem: a relational structure is preserved by all order-preserving bijections if and only if all its relations have a first-order definition in , and the CSPs for such structures are called temporal CSPs. Many optimization problems that have been studied intensively in the literature can be phrased as a temporal VCSP. We prove that a temporal VCSP is in P, or NP-complete. Our analysis uses the concept of fractional polymorphisms. This is the first dichotomy result for VCSPs over infinite domains which is complete in the sense that it treats all valued structures that contain a given automorphism group.
Keywords and phrases:
Constraint Satisfaction Problems, valued CSPs, temporal CSPs, fractional polymorphisms, complexity dichotomy, min CSPsFunding:
Manuel Bodirsky: The author has been funded by the European Research Council (Project POCOCOP, ERC Synergy Grant 101071674) and by the DFG (Project FinHom, Grant 467967530). Views and opinions expressed are however those of the authors only and do not necessarily reflect those of the European Union or the European Research Council Executive Agency. Neither the European Union nor the granting authority can be held responsible for them.Copyright and License:
2012 ACM Subject Classification:
Theory of computation Complexity theory and logicEditors:
Paweł Gawrychowski, Filip Mazowiecki, and Michał SkrzypczakSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
Valued constraint satisfaction problems (VCSPs) form a large class of computational optimization problems. A VCSP is parameterized by a valued structure (called the template), which consists of a domain and cost functions, each defined on for some . The input to the VCSP consists of a finite set of variables, a finite sum of cost functions applied to these variables, and a threshold , and the task is to find an assignment to the variables so that the sum of the costs is at most . The computational complexity of such problems has been studied depending on the valued structure that parameterizes the problem. VCSPs generalize constraint satisfaction problems (CSPs), which can be viewed as a variant of VCSPs with costs from the set : every constraint is either satisfied or surpasses every finite threshold. VCSPs also generalize min-CSPs, which are the natural variant of CSPs where, instead of asking whether all constraints can be satisfied at once, we search for an assignment that minimizes the number of unsatisfied constraints. Such problems can be modeled as VCSPs with costs from the set .
A major achievement of the field is that if the domain of the valued structure is finite, then the computational complexity of is in P, or NP-complete. This result has an interesting history. The classification task was first considered in [20] with important first results that indicated that we might expect a good systematic theory for such VCSPs. A milestone was reached by Thapper and Živný with the proof of a complexity dichotomy for the case where the cost functions never take value [38]. On the hardness side, Kozik and Ochremiak [29] formulated a condition that implies hardness for and found equivalent characterisations that suggested that this condition characterises NP-hardness (unless P=NP, of course). Kolmogorov, Krokhin, and Rolínek [28] then showed that if the hardness condition from [29] does not apply, linear programming relaxation in combination with algorithms for classical CSPs can be used to solve , conditional on the tractability conjecture for (classical) CSPs. Finally, this conjecture about CSPs has been confirmed independently by Bulatov [16] and by Zhuk [42, 43], thus completing the complexity dichotomy for for finite-domain templates as well. A key tool for distinguishing the tractable VCSPs from the NP-hard ones are fractional polymorphisms, which, in some sense, capture the symmetries of the VCSP template.
Many important optimization problems in the literature cannot be modeled as VCSPs if we restrict to valued structures on a finite domain; VCSPs that require an infinite domain are, for example, the min-correlation-clustering problem with partial information [1, 39], ordering min-CSPs [27], phylogeny min-CSPs [18], VCSPs with semilinear constraints [8], and the class of resilience problems from database theory [24, 25, 30, 13].
For VCSPs with infinite templates we cannot hope for general classification results, since this is already out of reach for the special case of CSPs over infinite domains [4]. However, a powerful algebraic machinery was developed to study CSPs of structures with a rich automorphism group, which has led to classification results for many concrete automorphism groups: we list [7, 10, 9, 3, 31] as a representative sample. Some part of this machinery has also been developed for VCSPs in [13], inspired by the concepts from infinite-domain CSPs and finite-domain VCSPs [26, 29]. Nevertheless, no complexity classification for VCSPs such as for the classes of CSPs discussed above was obtained so far.
In this article we provide the first VCSP dichotomy result for a class of templates which consists of all valued structures preserved by some fixed permutation group. Concretely, we prove that the VCSP for every valued structure with the domain that is preserved by all order-preserving bijections is in P or NP-complete. We call such valued structures temporal, in analogy to temporal relational structures, i.e., structures with the domain preserved by all order-preserving bijections – these are precisely the structures with a first-order definition over . We also provide disjoint algebraic conditions that characterize the tractable and the NP-complete case, in analogy to similar classifications for classes of (V)CSPs. The result confirms the dichotomy conjecture from [13, Conjecture 9.3] for the special case of temporal valued structures. Note that our classification result is incomparable with the result of [8] which shows that that submodular PLH functions form a maximally tractable class of PLH cost functions, because the class of temporal valued structures is a proper subclass of PLH and contains structures with tractable VCSPs that are not submodular.
Apart from the relevance of temporal VCSPs as a test case for understanding VCSPs on infinite domains, they constitute an important class for several reasons:
-
Temporal VCSPs encompass many natural optimization problems111It should be mentioned that these problems come in two flavours: one is where the input is a graph, or more generally a structure; the other, which we adopt here, is that the input consists of a finite sum of cost functions, which in particular allows that the sum contains identical summands. In the setting of Min-CSPs for graphs, this corresponds to considering multigraphs in the input. However, often (but not always, see Theorems 8.6 and 8.7 in [30]) the two variants of the problem have the same complexity (see, e.g., [22, Section 2.3] for relevant techniques in this context). such as Directed Feedback Arc Set, Directed Subset Feedback Arc Set, Edge Multicut (aka Min-Correlation-Clustering with Partial Information), Symmetric Directed Multicut, Steiner Multicut, Disjunctive Multicut, and many more [15, 23, 32, 34, 33].
-
The complete classification for temporal CSPs has been the basis to obtain other complexity classifications in temporal and spatial reasoning via complexity classification transfer techniques [5]; we expect that temporal valued CSPs play a similar role for the corresponding optimisation problems.
-
Temporal VCSPs contain interesting polynomial-time tractable cases with some non-trivial interaction between the “soft” (i.e., finite-valued) and the “crisp” constraints (i.e., -valued) in the input (Lemma 38).
Our tractability condition for temporal VCSPs is phrased in terms of fractional polymorphisms, that is, probability distributions on operations with particular properties. Surprisingly, the fractional polymorphisms that appear in this classification are of a very particular shape: there is always a single operation with probability 1. It is known that in general, such fractional polymorphisms are not sufficient to capture the border between polynomial-time tractable and NP-hard VCSPs [21], and we therefore present fractional polymorphisms in full generality for consistency with the literature. The concrete operations that appear in this context are the same operations that were already essential for classification of temporal CSPs. The hardness condition is based on the notion of expressibility, which generalizes primitive positive definitions, and on the notion of generalized pp-constructions [13], which provide polynomial-time reductions between VCSPs. Interestingly enough, it is not known whether preservation by fractional polymorphisms characterises expressibility in our setting; this is known for valued structures with a finite domain [19, 26]. Our classification proof, however, does not rely on such a characterisation.
1.1 Related work
VCSPs on infinite domains have been studied in [39, 37, 40]. However, the valued structures considered in these articles typically do not have an oligomorphic automorphism group, a property that is essential for applying our techniques for classifying the complexity of VCSPs. The foundations of the theory for VCSPs of valued structures with an oligomorphic automorphism group were laid in [13] with the motivation to study resilience problems from database theory. Concrete subclasses of temporal VCSPs have been studied in the context of min-CSPs from the parameterized complexity perspective: the complexity of equality min-CSPs has been classified in [35] and parameterized complexity of min-CSPs over the Point Algebra has been classified in [33]. The authors mention a classification of first-order generalizations of the Point Algebra as a natural continuation of their research [33, Section 5]. The present paper contains a classification of VCSPs over all temporal structures and thus provides the foundations for classifying the parameterized complexity of min-CSPs for such structures, including algebraic techniques that we expect to be useful in this context as well.
1.2 Outline
The article is organized as follows. Section 2 contains preliminaries on VCSPs in general, with some notation and properties specific to temporal VCSPs. Section 3 contains several new facts about VCSPs that have been used in the classification. Section 4 contains the classification of equality VCSPs, that is, VCSPs of valued structures with an automorphism group equal to the full symmetric group; on the one hand, this serves as a warm-up, on the other hand it is a building block for the general case. Section 5 contains the full classification of temporal VCSPs, which is the main contribution of the paper.
2 Preliminaries
Let be the set of natural numbers. For the set will be denoted by . The set of rational numbers is denoted by and the standard strict linear order of by . We also need an additional value ; all we need to know about is that
-
for every ,
-
for all , and
-
and for .
If is a set, then denotes the group of all permutations of . If , then we implicitly assume that , where . For an operation and , we use the following notation for applying componentwise:
2.1 Valued structures
Let be a set and let . A valued relation of arity over is a function . We write for the set of all valued relations over of arity , and define
A valued relation is called finite-valued if it takes values only in .
Usual relations will also be called crisp relations. A valued relation that only takes values from will be identified with the crisp relation A valued relation is called essentially crisp if there exists such that for every . For the feasibility relation of is defined as For and , we denote by the valued relation such that if , and otherwise. We write to stress that is a crisp relation viewed as a valued relation. The unary empty relation on , where every element of evaluates to , is denoted by .
Example 1.
On the domain , the valued relation denotes the crisp equality relation, while denotes the valued relation if and if .
A (relational) signature is a set of relation symbols, each of them equipped with an arity from . A valued -structure consists of a set , which is also called the domain of , and a valued relation for each relation symbol of arity . All valued structures in this article have countable domains. We often write instead of if the valued structure is clear from the context. When not specified, we assume that the domains of valued structures are denoted , respectively. If is a set of valued relations over a common domain , we write for a valued structure whose relations are precisely the relations from ; we only use this notation if the precise choice of the signature does not matter. A valued -structure where all valued relations only take values from may then be viewed as a relational or crisp -structure in the classical sense. A valued structure is called essentially crisp if all of its valued relations are essentially crisp. If is a valued -structure on the domain , then denotes the relational -structure on the domain where for every . If and is a valued -structure such that for every , then we call a reduct of .
2.2 Valued constraint satisfaction problems
Let be a relational signature. An atomic -expression is an expression of the form for , , or where are (not necessarily distinct) variable symbols. A -expression is an expression of the form where and for is an atomic -expression. Note that the same atomic -expression might appear several times in the sum. We write for a -expression where all the variables are from the set . If is a valued -structure, then a -expression defines over a member of in the usual way, which we denote by (for example, if and is an -structure, then for all ). If is the empty sum, then is constant .
Let be a valued structure over a finite signature . The valued constraint satisfaction problem for , denoted by , is the computational problem to decide for a given -expression and a given whether there exists such that . We refer to as an instance of , and to as the threshold. We also refer to the pair as a (positive or negative) instance of . A tuple such that is called a solution for . The cost of (with respect to ) is defined to be In some contexts, it will be beneficial to consider only a given -expression to be the input of (rather than and the threshold ) and a tuple will then be called a solution for if the cost of equals . In general, there might not be any solution. If there exists such that then is called satisfiable. To give an example of a VCSP, note that is the minimum feedback arc set problem for directed multigraphs.
If is a relational -structure, then is the problem of deciding satisfiability of conjunctions of atomic -formulas in . Therefore, if is a relational structure then and are essentially the same problem.
2.3 Automorphisms
Let , let , and let be a permutation of . Then preserves if for all we have . If is a valued structure with domain , then an automorphism of is a permutation of that preserves all valued relations of . The set of all automorphisms of is denoted by , and forms a group with respect to composition. If is a valued structure and we write or , we implicitly assume that and have the same domain.
Let . An orbit of -tuples of a permutation group on a set is a set of the form for some . A permutation group on a countable set is called oligomorphic if for every there are finitely many orbits of -tuples in [17]. For example, and therefore every permutation group on that contains is oligomorphic. If is a relational structure with an oligomorphic automorphism group and , then is first-order definable over if and only if is preserved by (this theorem, including the definition of first-order logic, is treated, e.g., in [2] (Theorem 4.2.9)).
Let be a valued -structure and a relational structure. Suppose that is oligomorphic and (and hence is oligomorphic). Let be of arity . Then attains only finitely many values by the oligomorphicity of . Moreover, if for some we have , then and lie in a different orbit of . Therefore, for every value , there is a union of orbits of -tuples under the action of such that if and only if . Since is preserved by , it is first-order definable over by a formula . Hence, can be given by a list of values in the range of and first-order formulas over . Such a collection will be called a first-order definition of in . Clearly, if a valued structure has a first-order definition in a relational structure , then . Note that for some structures such as and , the formulas can be chosen to be quantifier-free, and hence as disjunctions of conjunctions of atomic formulas over (in fact, this is the case for every homogeneous structure with a finite relational signature). We will use first-order definitions of valued structures to be able to give valued structures as an input to decision problems (see Proposition 41).
The structure is known to be finitely bounded and homogeneous, which yields the following theorem as a special case of [13, Theorem 3.4].
Theorem 2.
Let be a valued structure over a finite signature such that . Then is in NP.
2.4 Expressive power
We define generalizations of the concepts of primitive positive definitions and relational clones. The motivation is that relations with a primitive positive definition can be added to the structure without changing the complexity of the respective CSP.
Definition 3.
Let be a set and . We say that can be obtained from by
-
1.
projecting if is of arity , is of arity and for all , .
-
2.
non-negative scaling if there exists such that ;
-
3.
shifting if there exists such that .
If is of arity , then the relation that contains all minimal-value tuples of is
Note that in item 1 might be irrational or . If this is the case, then does not express a valued relation because valued relations must have weights from . However, if is preserved by all permutations of an oligomorphic automorphism group, then attains only finitely many values and therefore this is never the case.
If , then an atomic expression over is an atomic -expression where . We say that is closed under forming sums of atomic expressions if for every , of arity , respectively, and for , the set also contains the valued relation of arity defined by
Definition 4 (valued relational clone).
A valued relational clone (over ) is a subset of that is closed under forming sums of atomic expressions, projecting, shifting, non-negative scaling, , and . For a valued structure with the domain , we write for the smallest valued relational clone that contains the valued relations of . If , we say that expresses .
Note that every relation which is primitively positively definable from a set of crisp relations lies in . Moreover, if is a relational structure and , then is essentially crisp and is primitively positively definable from ; this is easily verified by induction.
The following lemma is the main motivation for the concept of expressibility.
Lemma 5 (Lemma 4.6 in [13]).
Let be a valued structure on a countable domain with an oligomorphic automorphism group and a finite signature. Suppose that is a valued structure with a finite signature over the same domain such that every valued relation of is from . Then there is a polynomial-time reduction from to .
We now introduce notation that enables us to talk about the crisp relations expressible in a valued structure, which turn out to be essential to understanding temporal VCSPs.
Definition 6.
Let be a valued structure. Then denotes the set of valued relations
In words, contains all crisp relations that can be expressed in . If is essentially crisp, then and consists of precisely those relations that are primitively positively definable in . In this case we obtain a polynomial-time reduction from to and vice versa by Lemma 5.
2.5 Pp-constructions
Next, we introduce a concept of pp-constructions which give rise to polynomial-time reductions between VCSPs. The acronym “pp” stands for primitive positive, since the concept of pp-constructions for relational structures is a generalization of primitive positive definitions used for reductions between CSPs.
Definition 7 (pp-power).
Let be a valued structure with domain and let . Then a (-th) pp-power of is a valued structure with domain such that for every valued relation of of arity there exists a valued relation of arity in such that
Let and be sets and . If and , then by we mean the tuple We equip the space of functions from to with the topology of pointwise convergence, where is taken to be discrete. In this topology, a basis of open sets is given by
for and for some . For any topological space , we denote by the Borel -algebra on , i.e., the smallest subset of the powerset which contains all open sets and is closed under countable intersection and complement. We write for the set .
Definition 8 (fractional map).
Let and be sets. A fractional map from to is a probability distribution that is, and is countably additive: if are disjoint, then
We often use for both the entire fractional map and for the map .
The set carries the topology inherited from the standard topology on . We also view as a topological space with a basis of open sets given by all open intervals for , and additionally all sets of the form (thus, is equipped with its order topology when ordered in the natural way).
A (real-valued) random variable is a measurable function , i.e., pre-images of elements of under are in . If is a real-valued random variable, then the expected value of (with respect to a probability distribution ) is denoted by and is defined via the Lebesgue integral
Let and be sets. In the rest of the paper, we will work exclusively on a topological space and the special case where for some and is the set of -ary operations on , we denote this set by .
Definition 9 (fractional homomorphism).
Let and be valued -structures with domains and , respectively. A fractional homomorphism from to is a fractional map from to such that for every of arity and every tuple it holds for the random variable given by that exists and that
We refer to [13] for a detailed introduction to fractional homomorphisms in full generality. All concrete fractional homomorphisms that appear in this paper are of a very special form, namely, there is a single such that . In this case, we also write instead of . If is of this form, then for every of arity and , the expected value in Definition 9 always exists and is equal to . If additionally and are crisp structures, then we call a homomorphism. It is easy to see that there are valued structures and with a fractional homomorphism from to , but no fractional homomorphism from to of the form (see, e.g. [41, Example 2.6 and 3.15]).
Lemma 10.
Let and be valued -structures on countable domains such that is oligomorphic. If there exists a fractional homomorphism from to , then there also exists a homomorphism from to . In particular, if and are crisp, then there is a fractional homomorphism from to if and only if there is a homomorphism from to .
We say that two valued -structures and are fractionally homomorphically equivalent if there exists a fractional homomorphisms from to and from to . Since fractional homomorphisms compose [13], fractional homomorphic equivalence is indeed an equivalence relation on valued structures of the same signature.
Definition 11 (pp-construction).
Let be valued structures. Then has a pp-construction in if is fractionally homomorphically equivalent to a structure which is a pp-power of .
The relation of pp-constructability is transitive: if , , and are valued structures such that pp-constructs and pp-constructs , then pp-constructs [13, Lemma 5.14].
By we denote the complete graph on vertices. The following is a direct consequence of [13, Corollary 5.13] and [2, Corollary 6.7.13].
Lemma 12.
Let be a valued structure such that is oligomorphic. If pp-constructs , then has a reduct over a finite signature such that is NP-hard.
It is well-known that pp-constructs all finite relational structures (see, e.g, [2, Corollary 6.4.4]). Hence, by the transitivity of pp-constructability, every valued structure that pp-constructs pp-constructs all finite relational structures.
2.6 Fractional polymorphisms
Let be a set and . An operation on the set preserves if for every . If is a relational structure and preserves all relations of , then is called a polymorphism of . The set of all polymorphisms of is denoted by and is closed under composition. We write for the set , . Unary polymorphisms are called endomorphisms and is also denoted by .
Let be a relational structure and . An operation is called a pseudo weak near unanimity (pwnu) polymorphism if there exist such that for every , We now introduce fractional polymorphisms of valued structures, which generalize polymorphisms of relational structures. Similarly to polymorphisms, fractional polymorphisms are an important tool for formulating tractability results and complexity classifications of VCSPs. For valued structures with a finite domain, our definition specialises to the established notion of a fractional polymorphism which has been used to study the complexity of VCSPs for valued structures over finite domains (see, e.g. [38]). Our definition is taken from [13] and allows arbitrary probability spaces in contrast to [39, 37, 40].
Definition 13 (fractional operation).
Let . A fractional operation on of arity is a fractional map from to . The set of all fractional operations on of arity is denoted by .
Definition 14.
A fractional operation improves a valued relation if for all
| (1) |
Note that (1) has the interpretation that the expected value of is at most the average of the values , .
Definition 15 (fractional polymorphism).
If a fractional operation improves every valued relation in a valued structure , then is called a fractional polymorphism of ; the set of all fractional polymorphisms of is denoted by .
Remark 16.
A fractional polymorphism of arity of a valued -structure might also be viewed as a fractional homomorphism from a specific -th pp-power of , which we denote by , to : the domain of is , and for every of arity we have
Example 17.
Let be a set and be the -th projection of arity , which is given by . The fractional operation of arity such that for every is a fractional polymorphism of every valued structure with domain .
As mentioned above, all concrete fractional polymorphisms that we need in this article are such that there exists an operation such that .
Lemma 18 (Lemma 6.8 in [13]).
Let be a valued -structure over a countable domain . Then every valued relation is improved by all fractional polymorphisms of .
Remark 19.
Observe that for every crisp structure . More concretely, for every we have that consists of precisely the fractional operations of arity such that . Also recall that, for essentially crisp valued structures , . Therefore, Lemma 18 implies that .
3 General facts
In this section we formulate some relatively easy, but very general and useful facts for analysing the computational complexity of VCSPs.
Lemma 20.
Let be a valued structure with domain and finite relational signature such that there exists a unary constant operation . Then is in P.
The following proposition relates pp-constructability in a valued structure with pp-constructability in the relational structure .
Proposition 21.
Let be a valued structure and let be a relational -structure on countable domains and , respectively. Then pp-constructs if and only if pp-constructs .
Let be a set, , and . It is easy to see that the -ary -th projection for every , , and every relational structure on the domain .
Lemma 22.
Let be a valued structure. Then contains if and only if is essentially crisp.
4 Equality VCSPs
An equality structure is a relational structure whose automorphism group is the group of all permutations of its domain [6]; we define an equality valued structure analogously. In this section, we prove that for every equality valued structure , is in P or NP-complete. This generalises the P versus NP-complete dichotomy for equality min-CSPs from [34].
If the domain of is finite, then this is already known (see the discussion in the introduction). It is easy to see that classifying the general infinite case reduces to the countably infinite case. For notationally convenient use in the later sections, we work with the domain , but we could have used any other countably infinite set instead. We will need the following relation:
| (2) |
It is known that pp-constructs , see, e.g., Theorem 7.4.1 and Corollary 6.1.23 in [2]. Let be the constant zero operation, given by for all . Let be injective. A tuple is called injective if it has pairwise distinct entries.
Theorem 23 ([2, 6]).
If is a relational structure such that , then exactly one of the following cases applies.
-
or . In this case, for every reduct of with a finite signature, is in P.
-
The relation has a primitive positive definition in . In this case, pp-constructs and has a reduct with a finite signature such that is NP-complete.
The complexity classification of equality VCSPs is a consequence of several lemmas.
Theorem 24.
Let be a valued structure with a countably infinite domain over a finite relational signature such that Then exactly one of the following two cases applies.
-
1.
and . In this case, pp-constructs , and is NP-complete.
-
2.
or . In both of these cases, is in P.
Proof sketch.
If , then Lemma 20 implies that is in P. So we suppose that in the following; one can then show that . If , then is in P (a generalization of the algorithm is presented in Algorithm 1). So we also suppose that in the following; one can then show that . In this case, pp-constructs and is NP-complete by Theorem 23. Note that neither nor improves . Therefore, the two cases in the statement of the theorem are disjoint.
Remark 25.
The complexity classification of equality minCSPs from [35], which can be viewed as VCSPs of valued structures where each relation attains only values and , can be obtained as a special case of Theorem 24. Suppose that is such a valued structure. If , then is constant (in the terminology of [35]) and is in P. If , then it is immediate that is Horn (in the terminology of [35]) and even strictly negative: otherwise, by [35, Lemma 16] we have . But this is in contradiction to the assumption that , since applied to a pair of equal elements and pair of distinct elements yields a pair of distinct elements, increasing the cost to compared to the average cost of the input tuples. Otherwise, it follows from Theorem 24 that is NP-hard.
5 Temporal VCSPs
In this section we generalise the classification result from equality VCSPs to temporal VCSPs, which is the main result of this paper.
5.1 Preliminaries on temporal CSPs
We first define several important relations on that already played a role in the classification of temporal CSPs [7]; in this paper, we treat these relations in a black-box fashion.
Definition 26.
Let
Theorem 27 (Theorem 20 in [7]).
Let be a relational structure with a finite signature such that . Then it satisfies at least one of the following:
-
primitively positively defines , , or .
-
.
-
.
-
There is a primitive positive definition of in .
To build on the results on temporal CSPs, we need the following operations on ; they will be used in a black-box fashion as well. By and we refer to the binary minimum and maximum operation on the set , respectively.
Definition 28.
Let be any endomorphisms of satisfying and for every . The operation is any binary operation on satisfying iff , or and for all . We denote by the operation on defined by
Definition 29.
Let , and be any endomorphisms of satisfying for all , , We denote by the binary operation on defined by
Definition 30.
Let and be any endomorphisms of satisfying for all , , We denote by the binary operation on defined by
The construction of endomorphisms that appear in Definitions 29 and 30 can be found for example in [2, Section 12.5]. The following was observed and used in [7].
Lemma 31.
If is a relational structure such that and is preserved by a binary injective operation , then it is also preserved by the operation defined by one of , , , or . In particular, if preserves (for example, ), then is preserved by .
Definition 32.
The dual of an operation is the operation The dual of a relation is the relation
Note that and the relation is equal to . Statements about operations and relations on can be naturally dualised and we may refer to the dual version of a statement.
By combining results from [7] (Theorem 50, Corollary 51, Corollary 52, and the accompanying remarks), we obtain the following; also see Theorem 12.10.1 in [2].
Theorem 33.
Let be a relational structure such that . Then exactly one of the following is true.
-
1.
At least one of the operations , , , , , or one of their duals lies in . In this case, for every reduct of with a finite signature, is P.
-
2.
primitively positively defines one of the relations , , , , , or . In this case, has a reduct with a finite signature such that is NP-complete.
Moreover, if has a finite signature, then it is decidable whether item 1 or item 2 holds.
We also need an alternative version of the classification theorem above.
Theorem 34 (Theorem 12.0.1 in [2]; see also Theorem 7.24 in [12]).
Let be a relational structure such that . Then exactly one of the following is true:
-
1.
contains a pwnu polymorphism. In this case, for every reduct of with a finite signature, is in P.
-
2.
pp-constructs . In this case, there exists a reduct of with a finite signature such that is NP-complete.
The following proposition relates hardness of temporal CSPs to pp-constructing ; it is essentially proven in [2, Theorem 12.0.1].
Proposition 35.
Each of the relational structures , and pp-constructs .
5.2 Classification
In Lemma 38 below we present a polynomial-time algorithm for VCSPs of valued structures improved by where a certain finite-signature reduct of is preserved by or ; we define below.
Definition 36.
Let be a set and let be a valued relation on of arity . Let , , and let be a map. Then is the valued relation on of arity defined by for all . If is a valued relation of some arity such that there exists and , we call a minor of .
Let be a valued -structure such that . Then denotes the relational structure with domain which contains the relations and for every of arity , , and .
Note that for every valued relation of arity and every .
Remark 37.
Note that we do not need to include relations of the form in , because for every valued relation on of arity and , we have and therefore .
Lemma 38.
Let be a valued structure over a finite signature such that . Suppose that and that is preserved by or . Then is in P.
In Algorithm 1 we provide a polynomial-time algorithm for the proof of Lemma 38. We can now state the complexity dichotomy for temporal VCSPs. We first phrase the classification with 4 cases, where we distinguish between the tractable cases that are based on different algorithms. As a next step, we formulate two corollaries each of which provides two concise mutually disjoint conditions that correspond to NP-completeness and polynomial-time tractability, respectively.
Theorem 39.
Let be a valued structure such that . Then at least one of the following holds:
- 1.
-
2.
.
-
3.
and contains , , , , or one of their duals.
-
4.
and contains , , , , or one of their duals.
In cases 2–4, for every reduct of over a finite signature, is in P.
Proof sketch.
Note that for every reduct of , the automorphism group contains and hence is oligomorphic. If contains one of the relations , , , , , or , then there is a reduct of with a finite signature such that is NP-hard by Lemma 5 and Theorem 33. By Theorem 2, is in NP, therefore it is NP-complete. If , then for every reduct of over a finite signature, and is in P by Lemma 20. Suppose therefore that and that does not contain any of the relations , , , , , or . One can show that implies that contains or , and hence . By Theorem 33, (and thus ) contains , , , , or one of their duals.
Let be a reduct of with a finite signature. If , then and by Theorem 24, or , and is in P. In the former case, item 2 holds. In the latter case, since contains , we have by Lemma 31 that and therefore satisfy item 3.
Suppose now that . In that case one can show that , and hence . Moreover, one can show that is essentially crisp or . A particularly interesting part is the proof222We believe that proving an analogous statement for other classification projects, e.g., the one presented in Section 6, might be challenging. that if is not essentially crisp, then , and even . By Lemma 18 and Remark 19 we have . Combined with the fact that contains one of the operations , , , , or one of their duals, one can show that or preserves . By Lemma 38, is in P and item 3 holds.
Finally, suppose that is essentially crisp. Then by Lemma 22 we have . Since , we have (see Remark 19). Since does not contain any of the relations , , , , , or , none of these relations are primitively positively definable in . By Theorem 33, contains , , , , or one of their duals and is in P. Thus is in P. By Remark 19, contains , , , , or one of their duals. Therefore, item 4 holds.
Recall from Section 2.3 that a valued structure with has a (quantifier-free) first-order definition in with the defining formulas being disjunctions of conjunctions of atomic formulas over . Using this representation of , we obtain the decidability of the complexity dichotomy from Theorem 39.
Remark 40.
We also obtain decidability if arbitrary first-order formulas may be used for defining the valued relations, because every first-order formula can be effectively transformed into such a formula. This holds more generally over so-called finitely bounded homogeneous structures; see, e.g., [36, Proposition 7]. Without the finite boundedness assumption, the problem can become undecidable [11].
Proposition 41.
Given a first-order definition of a valued structure with a finite signature in , it is decidable whether is in P or NP-complete.
We reformulate Theorem 39 with two mutually exclusive cases that capture the respective complexities of the VCSPs.
Corollary 42.
Let be a valued structure with a finite signature such that . Then exactly one of the following holds.
-
1.
contains one of the relations , , , , , or . In this case, is NP-complete.
-
2.
is preserved by one of the operations , , , , , or one of their duals. In this case, is in P.
Note that the corollary above implies that if , then the complexity of is up to polynomial-time reductions determined by the complexity of the crisp relations can express. Loosely speaking, the complexity of such a VCSP is determined solely by the CSPs that can be encoded in this VCSP. We formulate an alternative and more concise variant of the previous result in the style of Theorem 34.
Corollary 43.
Let be a valued structure with a finite signature such that . Then exactly one of the following holds.
-
1.
pp-constructs . In this case, is NP-complete.
-
2.
contains a pwnu operation. In this case, is in P.
Conjecture 9.3 in [13] states that, under some structural assumptions on , is in P whenever does not pp-construct (and is NP-hard otherwise)333The original formulation uses the structure , but it is well-known that this structure pp-constructs and vice versa [2].. All temporal structures satisfy the assumptions of the conjecture and hence Corollary 43 confirms the conjecture for the class of temporal VCSPs.
6 Future work
In analogy to the development of the results on infinite-domain CSPs, we propose the class of valued structures that are preserved by all automorphisms of the countable random graph as a natural next step in the complexity classification of VCSPs on infinite domains.
Question 44.
Does the class of VCSPs of all valued structures over a finite signature such that contains the automorphism group of the countable random graph exhibit a P vs. NP-complete dichotomy? In particular, is in P whenever does not pp-construct ?
References
- [1] Nikhil Bansal, Avrim Blum, and Shuchi Chawla. Correlation clustering. Machine Learning, 56(1-3):89–113, 2004. doi:10.1023/B:MACH.0000033116.57574.95.
- [2] Manuel Bodirsky. Complexity of Infinite-Domain Constraint Satisfaction. Lecture Notes in Logic (52). Cambridge University Press, 2021. doi:10.1017/9781107337534.
- [3] Manuel Bodirsky and Bertalan Bodor. A complexity dichotomy in spatial reasoning via Ramsey theory. ACM Trans. Comput. Theory, 16(2), June 2024. doi:10.1145/3649445.
- [4] Manuel Bodirsky and Martin Grohe. Non-dichotomies in constraint satisfaction complexity. In Luca Aceto, Ivan Damgard, Leslie Ann Goldberg, Magnús M. Halldórsson, Anna Ingólfsdóttir, and Igor Walukiewicz, editors, Proceedings of the International Colloquium on Automata, Languages and Programming (ICALP), Lecture Notes in Computer Science, pages 184–196. Springer Verlag, July 2008. doi:10.1007/978-3-540-70583-3_16.
- [5] Manuel Bodirsky, Peter Jonsson, Barnaby Martin, Antoine Mottet, and Žaneta Semanišinová. Complexity classification transfer for CSPs via algebraic products. SIAM Journal on Computing, 53(5):1293–1353, 2024. doi:10.1137/22M1534304.
- [6] Manuel Bodirsky and Jan Kára. The complexity of equality constraint languages. Theory of Computing Systems, 3(2):136–158, 2008. A conference version appeared in the proceedings of Computer Science Russia (CSR’06). doi:10.1007/s00224-007-9083-9.
- [7] Manuel Bodirsky and Jan Kára. The complexity of temporal constraint satisfaction problems. Journal of the ACM, 57(2):1–41, 2009. An extended abstract appeared in the Proceedings of the Symposium on Theory of Computing (STOC). doi:10.1145/1667053.1667058.
- [8] Manuel Bodirsky, Marcello Mamino, and Caterina Viola. Piecewise linear valued CSPs solvable by linear programming relaxation. ACM Transactions of Computational Logic, 23(1):1–35, 2022. Preprint arXiv:1912.09298. doi:10.1145/3488721.
- [9] Manuel Bodirsky and Jens K. Mueller. Rooted phylogeny problems. Logical Methods in Computer Science, 7(4), 2011. An extended abstract appeared in the proceedings of ICDT’10.
- [10] Manuel Bodirsky and Michael Pinsker. Schaefer’s theorem for graphs. Journal of the ACM, 62(3):52 pages (article number 19), 2015. A conference version appeared in the Proceedings of STOC 2011, pages 655-664. doi:10.1145/2764899.
- [11] Manuel Bodirsky, Michael Pinsker, and Todor Tsankov. Decidability of definability. Journal of Symbolic Logic, 78(4):1036–1054, 2013. A conference version appeared in the Proceedings of the Twenty-Sixth Annual IEEE Symposium on. Logic in Computer Science (LICS 2011), pages 321-328. doi:10.2178/JSL.7804020.
- [12] Manuel Bodirsky and Jakub Rydval. On the descriptive complexity of temporal constraint satisfaction problems. J. ACM, 70(1), December 2022. doi:10.1145/3566051.
- [13] Manuel Bodirsky, Žaneta Semanišinová, and Carsten Lutz. The complexity of resilience problems via valued constraint satisfaction problems. In Proceedings of the 39th Annual ACM/IEEE Symposium on Logic in Computer Science, LICS ’24. Association for Computing Machinery, 2024. doi:10.1145/3661814.3662071.
- [14] Manuel Bodirsky, Édouard Bonnet, and Žaneta Semanišinová. Temporal valued constraint satisfaction problems, 2024. doi:10.48550/arXiv.2409.07285.
- [15] Nicolas Bousquet, Jean Daligault, and Stéphan Thomassé. Multicut is FPT. SIAM J. Comput., 47(1):166–207, 2018. doi:10.1137/140961808.
- [16] Andrei A. Bulatov. A dichotomy theorem for nonuniform CSPs. In 58th IEEE Annual Symposium on Foundations of Computer Science, FOCS 2017, Berkeley, CA, USA, October 15-17, pages 319–330, 2017. doi:10.1109/FOCS.2017.37.
- [17] Peter J. Cameron. Oligomorphic permutation groups. Cambridge University Press, Cambridge, 1990.
- [18] Vaggos Chatziafratis and Konstantin Makarychev. Triplet reconstruction and all other phylogenetic CSPs are approximation resistant. In 64th IEEE Annual Symposium on Foundations of Computer Science, FOCS 2023, Santa Cruz, CA, USA, November 6-9, 2023, pages 253–284. IEEE, 2023. doi:10.1109/FOCS57990.2023.00024.
- [19] David A. Cohen, Martin C. Cooper, Páidí Creed, Peter G. Jeavons, and Stanislav Živný. An algebraic theory of complexity for discrete optimization. SIAM J. Comput., 42(5):1915–1939, 2013. doi:10.1137/130906398.
- [20] David A. Cohen, Martin C. Cooper, and Peter Jeavons. An algebraic characterisation of complexity for valued constraints. In Principles and Practice of Constraint Programming - CP 2006, 12th International Conference, CP 2006, Nantes, France, September 25-29, 2006, Proceedings, pages 107–121, 2006. doi:10.1007/11889205_10.
- [21] David A Cohen, Martin C Cooper, Peter G Jeavons, and Andrei A Krokhin. The complexity of soft constraint satisfaction. Artificial Intelligence, 170(11):983–1016, 2006. doi:10.1016/J.ARTINT.2006.04.002.
- [22] Konrad K. Dabrowski, Peter Jonsson, Sebastian Ordyniak, George Osipov, Marcin Pilipczuk, and Roohani Sharma. Parameterized complexity classification for interval constraints. CoRR, abs/2305.13889, 2023. doi:10.48550/arXiv.2305.13889.
- [23] Eduard Eiben, Clément Rambaud, and Magnus Wahlström. On the parameterized complexity of symmetric directed multicut. In Holger Dell and Jesper Nederlof, editors, 17th International Symposium on Parameterized and Exact Computation, IPEC 2022, September 7-9, 2022, Potsdam, Germany, volume 249 of LIPIcs, pages 11:1–11:17. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2022. doi:10.4230/LIPICS.IPEC.2022.11.
- [24] Cibele Freire, Wolfgang Gatterbauer, Neil Immerman, and Alexandra Meliou. The complexity of resilience and responsibility for self-join-free conjunctive queries. Proc. VLDB Endow., 9(3):180–191, 2015. doi:10.14778/2850583.2850592.
- [25] Cibele Freire, Wolfgang Gatterbauer, Neil Immerman, and Alexandra Meliou. New results for the complexity of resilience for binary conjunctive queries with self-joins. In Proceedings of the 39th ACM SIGMOD-SIGACT-SIGAI Symposium on Principles of Database Systems, PODS 2020, Portland, OR, USA, June 14-19, 2020, pages 271–284, 2020. doi:10.1145/3375395.3387647.
- [26] Peter Fulla and Stanislav Živný. A Galois connection for weighted (relational) clones of infinite size. TOCT, 8(3):9:1–9:21, 2016. doi:10.1145/2898438.
- [27] Venkatesan Guruswami, Johan Håstad, Rajsekar Manokaran, Prasad Raghavendra, and Moses Charikar. Beating the random ordering is hard: Every ordering CSP is approximation resistant. SIAM Journal on Computing, 40(3):878–914, 2011. doi:10.1137/090756144.
- [28] Vladimir Kolmogorov, Andrei A. Krokhin, and Michal Rolínek. The complexity of general-valued CSPs. SIAM J. Comput., 46(3):1087–1110, 2017. doi:10.1137/16M1091836.
- [29] Marcin Kozik and Joanna Ochremiak. Algebraic properties of valued constraint satisfaction problem. In Automata, Languages, and Programming - 42nd International Colloquium, ICALP 2015, Kyoto, Japan, July 6-10, 2015, Proceedings, Part I, pages 846–858, 2015. doi:10.1007/978-3-662-47672-7_69.
- [30] Neha Makhija and Wolfgang Gatterbauer. A unified approach for resilience and causal responsibility with integer linear programming (ILP) and LP relaxations. Proc. ACM Manag. Data, 1(4), December 2023. doi:10.1145/3626715.
- [31] Antoine Mottet, Tomáš Nagy, and Michael Pinsker. An Order out of Nowhere: A New Algorithm for Infinite-Domain CSPs. In 51st International Colloquium on Automata, Languages, and Programming (ICALP 2024), volume 297 of Leibniz International Proceedings in Informatics (LIPIcs), pages 148:1–148:18, Dagstuhl, Germany, 2024. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.ICALP.2024.148.
- [32] George Osipov and Marcin Pilipczuk. Directed symmetric multicut is W[1]-hard. CoRR, abs/2310.05839, 2023. doi:10.48550/arXiv.2310.05839.
- [33] George Osipov, Marcin Pilipczuk, and Magnus Wahlström. Parameterized complexity of MinCSP over the Point Algebra. In Proceedings of ESA 2024, June 2024.
- [34] George Osipov and Magnus Wahlström. Parameterized complexity of equality mincsp. In Inge Li Gørtz, Martin Farach-Colton, Simon J. Puglisi, and Grzegorz Herman, editors, 31st Annual European Symposium on Algorithms, ESA 2023, September 4-6, 2023, Amsterdam, The Netherlands, volume 274 of LIPIcs, pages 86:1–86:17. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2023. doi:10.4230/LIPICS.ESA.2023.86.
- [35] George Osipov and Magnus Wahlström. Parameterized complexity of equality MinCSP. In 31st Annual European Symposium on Algorithms (ESA 2023), volume 274 of Leibniz International Proceedings in Informatics (LIPIcs), pages 86:1–86:17, Dagstuhl, Germany, 2023. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.ESA.2023.86.
- [36] Jakub Rydval. Using Model Theory to Find Decidable and Tractable Description Logics with Concrete Domains. PhD thesis, Dresden University of Technology, Germany, 2022. URL: https://nbn-resolving.org/urn:nbn:de:bsz:14-qucosa2-799074.
- [37] Friedrich Martin Schneider and Caterina Viola. An application of Farkas’ lemma to finite-valued constraint satisfaction problems over infinite domains. Journal of Mathematical Analysis and Applications, 517(1):126591, 2023. doi:10.1016/j.jmaa.2022.126591.
- [38] Johan Thapper and Stanislav Živný. The complexity of finite-valued CSPs. In Proceedings of the Symposium on Theory of Computing Conference (STOC), Palo Alto, CA, USA, June 1-4, 2013, pages 695–704, 2013.
- [39] Caterina Viola. Valued Constraint Satisfaction Problems over Infinite Domains. PhD thesis, TU Dresden, 2020.
- [40] Caterina Viola and Stanislav Živný. The combined basic LP and affine IP relaxation for promise VCSPs on infinite domains. ACM Trans. Algorithms, 17(3):21:1–21:23, 2021. doi:10.1145/3458041.
- [41] Žaneta Semanišinová. Valued Constraint Satisfaction in Structures with an Oligomorphic Automorphism Group. Dissertation, TU Dresden, Dresden, Germany, 2025. Available at https://nbn-resolving.org/urn:nbn:de:bsz:14-qucosa2-974737.
- [42] Dmitriy Zhuk. A proof of CSP dichotomy conjecture. In 58th IEEE Annual Symposium on Foundations of Computer Science, FOCS 2017, Berkeley, CA, USA, October 15-17, pages 331–342, 2017. https://arxiv.org/abs/1704.01914.
- [43] Dmitriy Zhuk. A proof of the CSP dichotomy conjecture. J. ACM, 67(5):30:1–30:78, 2020. doi:10.1145/3402029.
