Quantaloidal Approach to Constraint Satisfaction111Most of the work was done while Kei Kimura was at Saitama University.
Abstract
The constraint satisfaction problem (CSP) is a computational problem that includes a range of important problems in computer science. We point out that fundamental concepts of the CSP, such as the solution set of an instance and polymorphisms, can be formulated abstractly inside the 2-category of finite sets and sets of functions between them. The 2-category is a quantaloid, and the formulation relies mainly on structure available in any quantaloid. This observation suggests a formal development of generalisations of the CSP and concomitant notions of polymorphism in a large class of quantaloids. We extract a class of optimisation problems as a special case, and show that their computational complexity can be classified by the associated notion of polymorphism.
1 Introduction
1.1 Background
The constraint satisfaction problem (CSP) is a computational problem of determining whether it is possible to assign values to variables while satisfying all given constraints. The CSP provides a general framework capturing a variety of problems in diverse fields such as artificial intelligence (see, e.g., [39, 15, 34]), theoretical computer science (e.g., [14]) and operations research (e.g., [18]), and has been studied from both practical and theoretical points of view. Many heuristic algorithms have been developed and incorporated into CSP solvers, and these solvers are used for various purposes including corporate decision making (e.g., [34, 7, 25]). Generalisations of the CSP are also widely studied; these include optimisation problems (e.g., [42]) and counting problems (e.g., [11]).
Formally, a CSP instance is given by a finite set of variables, a finite set called the domain, and a finite set of constraints. Here, each constraint is a triple consisting of a natural number called the arity, a -tuple of variables called the constraint scope, and a -ary relation on called the constraint relation of the constraint. A solution of is a function satisfying all constraints, i.e., such that for each with , we have . The set of all solutions of is denoted by , and is called the solution set of . To solve the CSP instance is to output “yes” if there exists a solution of , and “no” otherwise.
The following are two typical problems that can be modelled as CSPs.
Example 1.1.
The Boolean satisfiability problem (SAT) is the problem of determining whether a given conjunctive normal form (CNF) propositional formula is satisfiable or not. Here, a CNF formula is a conjunction of clauses, a clause being a disjunction of literals, and a literal being a propositional variable or its negation. For example, is a CNF formula. A CNF formula can be thought of as a CSP instance with and ; each clause of gives rise to a constraint of expressing the condition for a truth value assignment to to make true. For example, the clause corresponds to the constraint .
A well-known subclass of SAT is 3-SAT, in which the input is restricted to a 3-CNF formula, i.e., a CNF formula such that every clause is a disjunction of three literals. SAT and 3-SAT are fundamental in computer science; for example they are among the first problems shown to be NP-complete [13, 29].
Example 1.2.
Let be a positive integer. In the graph -colouring problem, we are given a simple undirected graph, i.e., a pair consisting of a finite set of vertices and a symmetric and irreflexive binary relation on representing the adjacency relation. Our task is to determine whether it is possible to assign colours to the vertices so that adjacent vertices are assigned different colours. The graph -colouring problem is intensively studied in combinatorics (e.g., [17, 6]). It is known that the graph -colouring problem is in P (solvable in polynomial time) if , and is NP-complete if . To formulate the graph -colouring problem as a CSP, let be the -element set of colours and . An instance of the graph -colouring problem can be cast as the CSP instance , where .
A notable theoretical result in this field is the dichotomy theorem for CSPs [35, 9, 41]. To state the theorem, we need some definitions. A constraint language is a pair of a finite set and a finite family of relations on (i.e., is empty for all but finitely many ). Each constraint language determines the class consisting of all CSP instances such that and, for each constraint , we have . For example, reduces to 3-SAT when , and to the graph -colouring problem (for possibly directed graphs with loops) when . Roughly, the dichotomy theorem states that is in P if satisfies a certain property, and is NP-complete otherwise. Notice that this dichotomy result is highly nontrivial, given the fact that under the assumption P NP, there exists an infinite hierarchy of complexity classes (up to a polynomial time reduction) containing P and contained in NP [26]. An interesting aspect of the dichotomy theorem is the fact that the border between P and NP-completeness can be captured by a purely algebraic criterion based on the notion of polymorphism, to which we now turn.
In the long chain of research devoted to the analysis of computational complexity of (e.g., [35, 21, 20, 16, 10, 8, 9, 41]), special attention has been paid to the symmetry of problems. The idea is that a problem should be easy to solve if it admits enough symmetry. It is clear (at least intuitively) that if a CSP instance has certain symmetry, then so does its solution set. For example, the graph -colouring problem is invariant under an arbitrary permutation of colours, and thus it follows that so is the solution set of each of its instances. Although the symmetry of a mathematical object is often captured by its group of automorphisms, this is not sufficient for the analysis of CSPs; for example, while the graph -colouring problem admits the maximum automorphism group, it is NP-complete if . It turns out that we need to enlarge the group of automorphisms to the clone of polymorphisms; here, a polymorphism of a mathematical object refers to a homomorphism from its finite power to .222Our usage of the term “polymorphism” follows a tradition in universal algebra (see, e.g., [31]). In particular, it has nothing to do with polymorphism in type theory and programming language theory, nor with poly-morphism in the sense of [30], which incidentally refers to a morphism in the free quantaloid over a category (see Example 2.6).
The adequacy of polymorphisms in the current context is well-attested by their crucial use in a precise statement of the dichotomy theorem (Theorem 3.5): given a constraint language , is in P if the relational structure admits a Siggers operation (see Definition 3.4) as a polymorphism, and is NP-complete otherwise.
1.2 Our results
In this paper, we shed a new light on the CSP and its variants by formulating their fundamental concepts in suitable quantaloids. A quantaloid is a particularly well-behaved 2-category, in which right extensions and right liftings (right adjoints of precomposition and postcomposition by a morphism) always exist.
First we capture the ordinary CSP in the quantaloid whose objects are finite sets, whose morphisms are sets of functions , and whose 2-cells are given by the inclusion relation. Observe that a -ary relation on a finite set can be seen as a morphism in . Thus each constraint of a CSP instance gives rise to the solid arrows in the diagram below, from which we obtain the right extension :
As we shall see, is precisely the set of all functions satisfying the constraint . Thus the solution set can be seen as the morphism in expressed as
We also give a quantaloidal formulation of polymorphisms. An -ary polymorphism of a -ary relation on is a homomorphism of relational structures . The set of all -ary polymorphisms of can be seen as a morphism in , and is expressed as , where denotes right lifting and the morphism is the set of projections. This provides a novel view to the set of polymorphisms of as the “double dualisation” with respect to of the set of projections.
This quantaloidal reformulation of the ordinary CSP opens the way to a formal definition of the quantaloidal CSP and the associated notion of polymorphism in an abstract setting. We shall sketch such a definition in an arbitrary quantaloid of the form (see Example 2.7) generated by a quantale (one-object quantaloid) and a locally small category with finite products. In particular, we show in this generality the claim that the solution set inherits the symmetry of an instance , formulated suitably in terms of -valued polymorphisms (Proposition 4.2).
We then instantiate this general framework by setting or , where is a quantale of extended real numbers. In these cases, the quantaloidal CSP contains a certain class of optimisation problems which we call the tropical valued CSP (TVCSP). The TVCSP is different from the more widely studied optimisation variant of the CSP called the valued CSP (VCSP), but is able to formulate certain scheduling problems as well as (via its infinitary variant) important concepts in continuous optimisation, such as quasiconvex functions and piecewise-linear convex functions. We shall establish a dichotomy theorem for TVCSPs (satisfying suitable finiteness conditions) by reducing it to the dichotomy for CSPs. The border between P and NP-hardness for TVCSPs can be captured by the notion of -valued polymorphism, which is a special case of our general notion of -valued polymorphism.
Related work.
Interaction between category theory and the field of algorithms and computational complexity is rare, and to the best of our knowledge this is the first paper relating the CSP and 2-category theory. We cite [24] as a recent paper applying categorical ideas to a generalisation of the CSP called the promise CSP, although its approach and goal are entirely different from ours. A generalisation of the CSP valued in a certain class of idempotent semirings has been introduced in [4, 3]. Whereas quantales are an infinitary version of idempotent semirings, our definition of in the quantaloidal CSP is incomparable with the corresponding notion (called consistency level) in their framework. In a more recent work [19], polymorphisms in the context of the above semiring-based generalised CSP are considered. Over a fixed constraint language, their notion of instance can capture a wider class of problems than ours, but as a consequence, their computational complexity results rely on extra assumptions; as the valuation structure (corresponding to our ), they adopt totally ordered commutative monoids whose unit element is the largest element and satisfying certain finiteness conditions. We have not been able to find any clear relationship between their notion of polymorphism and ours.
Outline.
The remainder of this paper is organised as follows. In Section 2 we recall the notion of quantaloid. In Section 3 we give a quantaloidal formulation of the CSP, and then proceed in Section 4 to its generalisation in quantaloids of the form . Section 5 is devoted to the TVCSP; we introduce it as a special case of the quantaloidal CSP, analyse its computational complexity and explore examples.
Acknowledgements.
2 Quantaloids
In this section we review the definition and basic structure of quantaloids. See, e.g., [33, 38] for more information on quantaloids.
Definition 2.1.
A quantaloid is a locally small category equipped with a partial order on each hom-set such that
-
•
for each , is a complete lattice;
-
•
for each , the composition law preserves arbitrary suprema in each variable: for each set and , , and in , we have
A quantaloid whose set of objects is a singleton is called a quantale. Explicitly, a quantale is a tuple such that is a complete lattice, is a monoid, and the multiplication preserves arbitrary suprema in each variable.
Note that a quantaloid can be regarded as a 2-category, whose 2-cells are given by the partial order relation on each hom-set (that is, there exists a necessarily unique 2-cell between a parallel pair of morphisms precisely when ). Each quantaloid is a biclosed 2-category, meaning that right (Kan) extensions and right liftings always exist:
Proposition 2.2.
Let be a quantaloid. For each , and in , both
(1) |
have right adjoints.
The right adjoints of (1) are denoted by
respectively. If is a morphism in , then the morphism is called the right extension of along , and the right lifting of along . By the adjointness we have
(2) |
The following are formal properties of these operations in a quantaloid which we shall use later.
Proposition 2.3.
Let be a quantaloid.
-
1.
For each set and , , , , and in , we have
-
2.
For each , , and in , we have
Proof.
These are all straightforward consequences of the adjointness (2). As an example, we shall prove the last equation. For any in , we have
Since was arbitrary, we must have . ∎
We conclude this section with several examples of quantales and quantaloids.
Example 2.4.
The two-element quantale consists of the two-element chain (with ) equipped with the monoid structure given by infima (or conjunction). Since the multiplication is commutative, right extensions and right liftings coincide, and are given by implication.
Example 2.5 ([28]).
The quantale of extended real numbers consists of the totally ordered set of real numbers ordered by the opposite of the usual order , extended with the least element and the greatest element , and equipped with (an extension of) the usual addition. We have chosen the direction in order to match the standard setting of the VCSP, in which the goal is usually to minimise a certain quantity rather than to maximise it. To avoid confusion, we shall use the notations and to denote infima and suprema in with respect to the usual order (so that, e.g., ). As a consequence, when we specialise certain formulas for general quantales to the quantale , is translated to and to . The requirement that should preserve arbitrary ( ) in each variable determines its extension to uniquely [28]. The right extensions and right liftings coincide and are given by a suitable extension of subtraction; see Table 1.
Variants of may be obtained for example by restricting it to non-negative numbers [27] or to integers.
Example 2.6 ([32]).
For any locally small category , the free quantaloid on has the same objects as , and for each , is the powerset equipped with the inclusion order. An element is written as and as ; we shall adopt a similar convention throughout this paper. The composition of and is defined as . Any morphism in gives rise to a “singleton” morphism in . The identity on is . Given , and in , we have
(3) |
Example 2.7.
Given any quantale and any locally small category , we can define the quantaloid by setting and (the set of all functions ) equipped with the pointwise order. The composition of and maps each to
A morphism in gives rise to a “singleton” morphism which assigns to and the least element of to all morphisms different from . The identity on is . The following slight generalisation of singleton morphisms will be used later: for each in and , we define the morphism by assigning to and to all other morphisms in . Given , and in , we have
for each and , where and inside the curly braces denote the right extension and right lifting in , respectively. Observe that when , we recover Example 2.6.
Example 2.8.
As a special case of Example 2.7 with , we obtain the quantaloid for any locally small category . A morphism in is a function . The composition of and in maps each to
Given , and in , we have
3 CSPs and polymorphisms via
As mentioned in the Introduction, a CSP instance and its solution set can be formulated inside the quantaloid , where is the category of finite sets and functions. That is, we regard both and as objects of , and each constraint as a triple consisting of the object , the (singleton) morphism and the morphism in . The solution set can be regarded as a morphism in , and may be expressed as , in light of (3).
Let us fix a constraint language . Observe that a CSP instance in can be equivalently specified by giving for each and each , a -ary relation on ; is the set of all constraint scopes such that . As is well-known, one can view and as relational structures over a common relational signature, and the solutions are precisely the homomorphisms between these relational structures [16, 20]. An alternative, quantaloidal perspective is provided as follows. For each , can be thought of as a (not necessarily singleton) morphism in . With this notation, the solution set is
(4) |
Recall that to solve a CSP instance is to decide whether it has a solution or not. This amounts to deciding whether is empty or not. We can express this in the quantaloid as well. In Section 5 we shall see that formally the same construction captures the required output (the optimal value) for a certain class of optimisation problems. The set is the terminal object in (albeit not so in ), and thus there exists a unique function . This yields a canonical singleton morphism in . The composition (which can take two values, as ) is empty precisely when is empty, and is the singleton morphism otherwise. Therefore, to solve is to determine the morphism .
We now move on to polymorphisms, starting with a review of basic definitions. For any finite set and natural numbers and , an -ary operation on is a function , and a -ary relation on is a subset . We say that is a polymorphism of if for all we have
(5) |
We denote the set of all -ary polymorphisms of by .
We express the construction by means of basic operations in the quantaloid . First note that, as before, the relation can be seen as a morphism in . Similarly, the antecedent of (5), namely the -ary relation
on , can be regarded as a morphism in . We claim that is equal to the right lifting , where is the morphism in defined as the set of projections from the power . Indeed, if the tuple corresponds to the function (so that ), then the function corresponds to the tuple , hence the equality follows from (3). Now for each , the set of all -ary operations on preserving can be expressed as the right extension , since
thus recovering the condition (5). Hence the set of all -ary polymorphisms of can be written as the “double dualisation” of with respect to . Note that for each , we have
(6) |
because
Given a family of relations on , we define for each ,
Proposition 3.1.
Let be a finite set and .333Precisely speaking, the projection in clause 1 and the tupling in clause 2 must be taken with respect to the (chosen) set of projections used in the definition of . In particular, the property of being a polymorphism for is not invariant under composition of bijections. A similar remark applies to Proposition 4.1 below.
-
1.
For each and , the -th projection is in .
-
2.
For each , and , we have . (Here, is the tupling of .)
Proof.
One can easily show these using (5). We shall present an alternative proof making full use of quantaloidal structure ((2) and Proposition 2.3), as a warm-up for a similar proof of Proposition 4.1.
Clearly, it suffices to consider the case where consists of a single (say, -ary) relation . We shall use the criterion (6). Clause 1 is clear because is order-reversing. Under the assumption of clause 2, we have and . Hence,
Proposition 3.1 states that polymorphisms form a clone: recall that a (concrete) clone on a set is a family of operations on satisfying the following.
-
1.
For each and , the -th projection is in .
-
2.
For each , and , we have .
Let us now formalise the informal claim that if a problem has certain symmetry, then so does its solution.
Proposition 3.2.
Let be a finite set.
-
1.
If and is a family of -ary relations on , then for each we have .
-
2.
If , is a -ary relation on , and is a morphism in , then for each we have .
Proof.
Recall that the condition for an -ary operation to be a polymorphism can be expressed as (6).
-
1.
If , then we have for each . By Proposition 2.3,
-
2.
If , then we have . By Proposition 2.3,
In view of (4), we immediately have the following.
Corollary 3.3.
Let be a finite set, and . Then for each we have .
We conclude this section with a precise statement of the dichotomy theorem. There are several possible ways to phrase the theorem, the following being one of them (see [2, Theorem 41]).
Definition 3.4.
A -ary operation on a finite set is said to be Siggers if it satisfies
for all .
4 The quantaloidal CSP
The above reformulation of CSPs and polymorphisms in the quantaloid suggests that a certain part of the mathematical theory of the CSP can be developed in a much broader context. In this section we shall embark on such a development. Although the discussion below might look rather formal, we shall apply it to a certain class of optimisation problems in the next section (which can be read independently of this section). We remark that in the special case where (hence is the free quantaloid ), some of the notions introduced below appear in [22].
Let us take any quantale and any locally small category with finite products; we shall work within the quantaloid instead of . For objects , we define a -ary -valued relation on to be a morphism in . Given such a -valued relation and a natural number , we define the (totality of) -ary -valued polymorphisms for as , where is the morphism in defined as
for all . Notice that is a morphism in , i.e., it assigns to each morphism in an element of , which may be thought of as the degree to which is a polymorphism of .
Individual polymorphisms (as opposed to the totality of them) can then be defined as follows. An (individual) -ary -valued polymorphism for is a pair such that . Using a notation introduced in Example 2.7, the latter condition is equivalent to ; cf. (6). This in turn amounts to the following more explicit condition, generalising (5): for any in , we have .
For a set of -valued relations on (i.e., is a set of morphisms in with codomain ) and , we define . We say is an -ary -valued polymorphism of if .
The following propositions generalise Propositions 3.1 and 3.2, respectively.
Proposition 4.1.
Let be a quantale, a locally small category with finite products, and a set of -valued relations on .
-
1.
For each and , the -th projection satisfies .
-
2.
For each , and in , we have
Proof.
We consider the case where consists of a single morphism in . Clause 1 amounts to the claim that , and can be shown as in the proof of Proposition 3.1. For clause 2, it suffices to show that for any , and imply . Define as the join of (cf. Example 2.7); that is,
for all . The assumptions amount to and , i.e., and . Hence
showing . ∎
Proposition 4.2.
Let be a quantale, a locally small category with finite products and .
-
1.
If and is a family of -ary -valued relations on , then for each , we have .
-
2.
If , is a -ary -valued relation on , and is a morphism in , then for each , we have .
Proof.
One can show these by a straightforward modification of the proof of Proposition 3.2, along the lines of the proof of Proposition 4.1. ∎
In the remainder of this section, we shall sketch the quantaloidal CSP in . In order to render the following as a well-defined computational problem, we would have to specify suitable machine representations of the data involved. We shall omit such considerations in this section, and simplify the discussion by allowing infinitely many constraints as well as infinite constraint languages.
An instance consists of objects and a set of -valued constraints (in ). There seems to be a few possibilities concerning the detail of a definition of -valued constraint.
-
1.
A straightforward approach is to define a -valued constraint as a triple consisting of an object , a morphism in and a morphism in . We may then define the morphism by .
-
2.
The second possibility is to define a -valued constraint as a quadruple , adding a new component . is now given as . This latter formulation seems to be better suited for considerations involving -valued constraint languages. A -valued constraint language consists of a pair of an object and a set of morphisms in with codomain . Given an instance such that for each , we may define for each (say, -ary) the morphism as the supremum of all morphisms with . In view of the equation , we have . Notice that Proposition 4.2 implies that any -valued polymorphism for is a -valued polymorphism for .
-
3.
This suggests the third, most general definition of -valued constraint; it is a triple consisting of an object and morphisms and in . We now have . In the next section, we shall adopt (a finitary version of) this definition.
In each case, the goal is to determine the value , where is the terminal object of . Notice that since , we can naturally identify with an element of , the “optimal value” of .
5 Quantaloidal CSPs in and as optimisation problems
In this section, we consider a certain class of optimisation problems which we call the tropical valued CSP (TVCSP). The TVCSP is a subclass of the quantaloidal CSP in the quantaloid . A TVCSP instance consists of a finite set of variables, a (possibly infinite) set called the domain, and a finite set of -valued constraints. Here, we define an -valued constraint as a triple consisting of a natural number and morphisms and in . For a TVCSP instance , the morphism in maps each to
(7) |
where denotes the composite . To solve the TVCSP instance is to compute
Thus the TVCSP is a problem of computing a minimax value, and it can model scenarios in which we wish to “minimise the maximum loss” or “optimise the worst case”.
Example 5.1.
Consider a scheduling problem, in which we are given multiple activities , precedence relations among the activities of the form “activity cannot start until activity finishes”, the processing time of each activity (so that if activity starts at time , then it finishes at time ) and the due date of each activity . We are interested in a schedule of the activities (a function ) that minimises the maximum deviation from due dates (). We can model this as a TVCSP instance by setting and (or for a suitably large ), expressing the maximum deviation by an -valued relation, and encoding the precedence relations (and the processing time) using -valued constraints taking values in .
We explain our choice of the name “tropical valued CSP”. The valued CSP (VCSP) is a well-known optimisation variant of the CSP (see, e.g., [42]). The data of a VCSP instance is similar to that of a TVCSP instance, and the goal is to compute the infimum of
(8) |
over . (Precisely, we have to assume, e.g., that for each in the VCSP.) We can regard (7) as a variant of (8), in which addition is replaced by supremum and multiplication by subtraction. This is analogous to the transition from the field of real numbers to the quantale , which may be thought of as a variant of the tropical semiring (see, e.g., [37]); roughly, the latter is obtained from the former by replacing addition by infimum and multiplication by addition.444It is known that computational complexity of VCSPs can be captured by the notion of weighted polymorphism [12]. Weighted polymorphisms differ substantially from our -valued polymorphisms, and we have not been able to understand the former from a categorical perspective.
5.1 The dichotomy theorem for TVCSPs with finite domains
In this subsection, we consider TVCSPs in which the domains are also finite. Thus we may think of our problems as a subclass of the quantaloidal CSP in the quantaloid .
We shall classify TVCSPs in terms of computational complexity. In order to do so rigorously, we specify a representation of instances as follows. We assume that and in each -valued constraint take values in . Furthermore, is given by the lists of all pairs for and of all pairs for , where and . Hence the input size of an instance is . Let be a finite set of -valued relations on a finite set . denotes the class of all TVCSP instances such that and, for each -valued constraint , we have .
For a -ary -valued relation and with , we denote by the sublevel set of with respect to , i.e., . We define .
Proposition 5.2.
Let be a finite set and a finite set of -valued relations on . Then and are polynomial-time reducible to each other.
Proof.
We first give a polynomial-time reduction from to . Take an arbitrary TVCSP instance . For any , we obtain
Define the CSP instance by
Then we have
(9) |
Note that, since , and the input size of is bounded by a polynomial in that of . (Indeed, such a bound is provided by .) The relation (9) says that the computation of can be reduced to the problem of finding the minimum such that . Since
it suffices to solve the CSP instance only for
Since , we can compute by solving polynomially many instances in . Thus is polynomial-time reducible to .
We then give a polynomial-time reduction from to . For and , recall the morphism in defined in Example 2.7 as
From a CSP instance , we construct a TVCSP instance where . (Note that for each , there exist and such that , and we can find such a pair in polynomial time by inspecting all and .) Then
Thus we can solve by determining if . This gives a polynomial-time reduction from to . ∎
Hence the classification of TVCSPs is reduced to that of CSPs. In particular, the dichotomy theorem for CSPs (Theorem 3.5) implies the dichotomy for TVCSPs: is either in P or NP-hard. We note that a relation analogous to that between and described in Proposition 5.2 has already been observed in the context of the fuzzy CSP [34, Section 9.4.3], which can be seen as a special case of the TVCSP (see also [19]). However, the situation for the TVCSP is subtler due to the coexistence of and , and our proof of Proposition 5.2 relies heavily on the adjointness relation (2) in as well as the details of the operations and (Table 1).
The above dichotomy for TVCSPs can be captured by a suitable notion of polymorphism. Specialising the notion of -valued polymorphism in Section 4 to the quantaloid , we define an (-ary) -valued polymorphism of an -valued relation on a finite set to be a pair of a function and such that for all , we have
Given a set of -valued relations on , we say is an -valued polymorphism of if it is so for every element of .
Lemma 5.3.
Let be a finite set and a set of -valued relations on . For any function , is an -valued polymorphism of if and only if is a polymorphism of .
Proof.
We may assume that consists of a single (say, -ary) -valued relation .
First suppose that is an -valued polymorphism of . Our aim is to show that for every , is a polymorphism of , i.e., that for any we have
(10) |
Assume the antecedent of (10), i.e., that for every . Since is an -valued polymorphism of , we have
Thus it follows that , showing the consequent of (10).
Next suppose that is not an -valued polymorphism of . This means that there exists a tuple such that
Let be the value of the left-hand side. Then and is not a polymorphism of ; indeed, our choice of and implies that (10) is violated. ∎
As an easy consequence of Theorem 3.5, Proposition 5.2 and Lemma 5.3, we have the following criterion of computational complexity in terms of -valued polymorphisms. An analogous result has been obtained in [19], although in a different setting.
Theorem 5.4.
Let be a finite set and a finite set of -valued relations on . If is an -valued polymorphism of for some Siggers operation on , then is in P. Otherwise, it is NP-hard.
Remark 5.5.
Let be an -valued relation on a finite set . The -valued polymorphisms of give rise to the clone on consisting of all operations on such that is an -valued polymorphism of . By Lemma 5.3, this is the clone of polymorphisms of . In addition, we also have the (in general strictly larger) clone on which consists of all such that is an -valued polymorphism of for some . See Proposition 4.1.
5.2 TVCSPs and continuous optimisation
Finally, we consider TVCSPs in which the domains are equal to the set of real numbers. In this case, for a TVCSP instance amounts to a function and is the infimum of . Hence, it can be regarded as a continuous optimisation problem. In continuous optimisation, convexity of a function plays a key role in the design of efficient minimisation algorithms. We investigate the relationship between convexity and the TVCSP in what follows. We note that infinite numeric domains such as , , and have been studied in the ordinary CSP (see, e.g., [5]).
A function is called quasiconvex if for all and . In other words, a function is quasiconvex if and only if every sublevel set of it is convex. Quasiconvex functions generalise convex functions, and their minimisation algorithms have been studied (e.g., [23]). We can capture quasiconvexity by -valued polymorphisms. For each we define a binary operation as . It is then immediate from the definition of quasiconvexity that a function is quasiconvex if and only if is an -valued polymorphism of the corresponding -valued relation for all .
Next we consider a TVCSP associated with linear -valued relations, where is linear if there exists such that for all , we have . Given a TVCSP instance such that is linear for all , is the supremum of finitely many affine functions (or the constant function with the value ); hence it is a piecewise-linear convex function . Its minimisation can be reduced to linear optimisation, provided that each -valued constraint is given as follows: takes values in and is given by a list as in Section 5.1, and is specified by a list . Here, linear optimisation (also known as linear program) is the problem of minimising a linear function subject to a system of linear inequalities, and is one of the central problems in mathematical optimisation (e.g., [40]). We can see that is equal to the value of the following optimisation problem.
where the variables are and . This is an instance of linear optimisation. Accordingly, it is solvable in polynomial time by a suitable linear optimisation algorithm (e.g., [36]).
References
- [1]
- [2] Libor Barto, Andrei Krokhin & Ross Willard (2017): Polymorphisms, and how to use them. In Andrei Krokhin & Stanislav Živný, editors: The Constraint Satisfaction Problem: Complexity and Approximability, Dagstuhl Follow-Ups 7, Schloss Dagstuhl–Leibniz-Zentrum für Informatik, pp. 1–44, 10.4230/DFU.Vol7.15301.1.
- [3] S. Bistarelli, U. Montanari, F. Rossi, T. Schiex, G. Verfaillie & H. Fargier (1999): Semiring-based CSPs and valued CSPs: frameworks, properties, and comparison. Constraints 4, pp. 199–240, 10.1023/A:1026441215081.
- [4] Stefano Bistarelli, Ugo Montanari & Francesca Rossi (1997): Semiring-based constraint satisfaction and optimization. Journal of the ACM 44, pp. 201–236, 10.1145/256303.256306.
- [5] Manuel Bodirsky & Marcello Mamino (2017): Constraint satisfaction problems over numeric domains. In Andrei Krokhin & Stanislav Živný, editors: The Constraint Satisfaction Problem: Complexity and Approximability, 7, Schloss Dagstuhl–Leibniz-Zentrum für Informatik, pp. 79–111, 10.4230/DFU.Vol7.15301.79.
- [6] Adrian Bondy & U.S.R. Murty (2008): Graph Theory. Springer-Verlag London.
- [7] Lucas Bordeaux, Youssef Hamadi & Lintao Zhang (2006): Propositional satisfiability and constraint programming: a comparative survey. ACM Computing Surveys 38(4), 10.1145/1177352.1177354. Article 12.
- [8] Andrei A. Bulatov (2006): A dichotomy theorem for constraint satisfaction problems on a 3-element set. Journal of the ACM 53(1), pp. 66–120, 10.1145/1120582.1120584.
- [9] Andrei A. Bulatov (2017): A dichotomy theorem for nonuniform CSPs. In: Proceedings of the 58th IEEE Annual Symposium on Foundations of Computer Science, pp. 319–330, 10.1109/FOCS.2017.37.
- [10] Andrei A. Bulatov, Peter Jeavons & Andrei A. Krokhin (2005): Classifying the complexity of constraints using finite algebras. SIAM Journal on Computing 34(3), pp. 720–742, 10.1137/S0097539700376676.
- [11] Jin-Yi Cai & Xi Chen (2017): Complexity Dichotomies for Counting Problems. Cambridge University Press, 10.1017/9781107477063.
- [12] David A. Cohen, Martin C. Cooper, Páidí Creed, Peter G. Jeavons & Stanislav Živný (2013): An algebraic theory of complexity for discrete optimization. SIAM Journal on Computing 42, pp. 1915–1939, 10.1137/130906398.
- [13] Stephen A. Cook (1971): The complexity of theorem-proving procedures. In: Proceedings of the 3rd Annual ACM Symposium on Theory of Computing, pp. 151–158, 10.1145/800157.805047.
- [14] Nadia Creignou, Sanjeev Khanna & Madhu Sudan (2001): Complexity Classifications of Boolean Constraint Satisfaction Problems. Society for Industrial and Applied Mathematics, Pennsylvania, USA, 10.1137/1.9780898718546.
- [15] Rina Dechter (2003): Constraint Processing. Morgan Kaufmann, California, USA, 10.1016/B978-1-55860-890-0.X5000-2.
- [16] Tomás Feder & Moshe Y. Vardi (1998): The computational structure of monotone monadic SNP and constraint satisfaction: A study through Datalog and group theory. SIAM Journal on Computing 28(1), pp. 57–104, 10.1137/S0097539794266766.
- [17] Pavol Hell & Jaroslav Nesetril (2004): Graphs and Homomorphisms. Oxford University Press, 10.1093/acprof:oso/9780198528173.001.0001.
- [18] John N. Hooker & W.-J. van Hoeve (2018): Constraint programming and operations research. Constraints 23, pp. 172–195, 10.1007/s10601-017-9280-3.
- [19] Rostislav Horcík, Tommaso Moraschini & Amanda Vidal (2017): An algebraic approach to valued constraint satisfaction. In: 26th EACSL Annual Conference on Computer Science Logic (CSL 2017), Schloss Dagstuhl-Leibniz-Zentrum für Informatik, 10.4230/LIPIcs.CSL.2017.42.
- [20] Peter Jeavons (1998): On the algebraic structure of combinatorial problems. Theoretical Computer Science 200(1-2), pp. 185–204, 10.1016/S0304-3975(97)00230-2.
- [21] Peter Jeavons, David A. Cohen & Marc Gyssens (1997): Closure properties of constraints. Journal of the ACM 44(4), pp. 527–548, 10.1145/263867.263489.
- [22] Sebastian Kerkhoff (2012): A general Galois theory for operations and relations in arbitrary categories. Algebra Universalis 68(3), pp. 325–352, 10.1007/s00012-012-0209-9.
- [23] Krzysztof C. Kiwiel (2001): Convergence and efficiency of subgradient methods for quasiconvex minimization. Mathematical Programming 90, pp. 1–25, 10.1007/PL00011414.
- [24] Andrei Krokhin, Jakub Opršal, Marcin Wrochna & Stanislav Živný (2020): Topology and adjunction in promise constraint satisfaction. arXiv:2003.11351v2.
- [25] Philippe Laborie, Jérǒme Rogerie, Paul Shaw, & Petr Vilím (2018): IBM ILOG CP optimizer for scheduling. Constraints 23, pp. 210–250, 10.1007/s10601-018-9281-x.
- [26] Richard E. Ladner (1975): On the structure of polynomial time reducibility. Journal of the ACM 22(1), pp. 155–171, 10.1145/321864.321877.
- [27] F. William Lawvere (1973): Metric spaces, generalized logic, and closed categories. Rendiconti del seminario matématico e fisico di Milano XLIII, pp. 135–166, 10.1007/BF02924844. Also available online in Reprints in Theory and Applications of Categories, No. 1 (2001) pp. 1–37.
- [28] F. William Lawvere (1984): State categories, closed categories, and the existence of semi-continuous entropy functions. IMA Preprint Series 86.
- [29] Leonid Levin (1973): Universal search problems (in Russian). Problemy Peredachi Informatsii 9(3), pp. 115–116.
- [30] Shinichi Mochizuki (2021): Inter-universal Teichmüller theory I: construction of Hodge theaters. Publications of the Research Institute for Mathematical Sciences 57(1), pp. 3–207, 10.4171/PRIMS/57-1-1.
- [31] Reinhard Pöschel (1980): A General Galois Theory for Operations and Relations and Concrete Characterization of Related Algebraic Structures. Akademie der Wissenschaften der DDR Zentralinstitut für Mathematik und Mechanik. Report R-01/80.
- [32] Kimmo I. Rosenthal (1991): Free quantaloids. Journal of Pure and Applied Algebra 72(1), pp. 67–82, 10.1016/0022-4049(91)90130-T.
- [33] Kimmo I. Rosenthal (1996): The Theory of Quantaloids. Pitman Research Notes in Mathematics Series 348, CRC Press.
- [34] Francesca Rossi, Peter van Beek & Toby Walsh, editors (2006): Handbook of Constraint Programming. Elsevier Science, New York, USA.
- [35] Thomas J. Schaefer (1978): The complexity of satisfiability problems. In: Proceedings of the 10th annual ACM Symposium on Theory of Computing, pp. 216–226, 10.1145/800133.804350.
- [36] Alexander Schrijver (1998): Theory of Linear and Integer Programming. John Wiley & Sons.
- [37] David Speyer & Bernd Sturmfels (2009): Tropical mathematics. Mathematics Magazine 82(3), pp. 163–173, 10.1080/0025570X.2009.11953615.
- [38] Isar Stubbe (2005): Categorical structures enriched in a quantaloid: categories, distributors and functors. Theory and Applications of Categories 14(1), pp. 1–45.
- [39] Edward Tsang (1993): Foundations of Constraint Satisfaction. Academic Pr, London and San Diego.
- [40] Robert J. Vanderbei (2020): Linear Programming, 5th edition. Springer International Publishing, 10.1007/978-3-030-39415-8.
- [41] Dmitriy Zhuk (2020): A proof of the CSP dichotomy conjecture. Journal of the ACM 30, pp. 1–78, 10.1145/3402029.
- [42] Stanislav Živný (2012): The Complexity of Valued Constraint Satisfaction Problems. Springer-Verlag Berlin Heidelberg, 10.1007/978-3-642-33974-5.