Charles University in Prague, Czech Republic
11email: kolman@kam.mff.cuni.cz, koutecky@kam.mff.cuni.cz
Extended Formulation for CSP that is Compact
for Instances of Bounded Treewidth††thanks: This research
was partially supported by the project 14-10003S of GA ČR.
Abstract
In this paper we provide an extended formulation for the class of constraint satisfaction problems and prove that its size is polynomial for instances whose constraint graph has bounded treewidth. This implies new upper bounds on extension complexity of several important NP-hard problems on graphs of bounded treewidth.
1 Introduction
Many important combinatorial optimization problems belong to the class of constraint satisfaction problems (CSP). Naturally, a lot of effort has been given to design efficient approximation algorithms for CSP, to prove complexity lower bounds for CSP, and to identify tractable instances of CSP (e.g., from the point of view of parameterized complexity). It has been shown that CSP is solvable in polynomial time for instances whose constraint graph has bounded treewidth [7].
In recent years, a lot of attention has been given to study extension complexity of problems [5]: what is the minimum number of inequalities representing a polytope whose (suitably chosen) linear projection coincides with the convex hull of all integral solutions of ? Such a polytope is called the extended formulation of . Note that membership of a problem in the class P of polynomially solvable problems does not necessarily imply the existence of an extended formulation of polynomial size [16]. In this work, we present an extended formulation for CSP and show that its size is polynomial for instances of CSP whose constraint graph has bounded treewidth.
1.1 Notation and Terminology
An instance of CSP consists of
-
•
a set of variables , one for each ; without loss of generality we assume that ,
-
•
a set of finite domains (also denoted ), one for each ,
-
•
a set of hard constraints where each hard constraint with and , is a -ary relation ,
-
•
a set of soft constraints where each soft constraint with and , is a -ary relation .
The constraint graph of is defined as where . We say that a CSP instance has bounded treewidth if the constraint graph of has bounded treewidth. In binary CSP, every hard and soft relation is a unary or binary relation, and in boolean CSP, the domain of every variable is . We use to denote the maximal size of all domains, that is, .
For a vector and with , we define the projection of on as . A vector satisfies the constraint if and only if . We say that a vector is a feasible assignment for if and satisfies every hard constraint . For a given feasible assignment we define an extended feasible assignment ex as follows: the coordinates of are indexed by the soft constraints from (to be more precise: by the subsets of used as lower indices of the soft constraints) and for each , we have if and only if , and otherwise. We denote by the set of all feasible assignments for , by ex the set of all extended feasible assignments for . For every instance we define two polytopes: is the convex hull of and the convex hull of . We also define three trivial linear projections:
-
•
, ,
where and , and observe that .
In the decision version of CSP, the set of soft constraints is empty and the task is to decide whether there exists a feasible assignment. In the maximization (minimization, resp.) version of the problem, the task is to find a feasible assignment that maximizes (minimizes, resp.) the number of satisfied (unsatisfied, resp.) soft constraints. Note that there is no difference between maximization and minimization versions of the problem with respect to optimal solutions but the two versions differ significantly from an approximation perspective.
In the weighted version of CSP we are also given a weight function that specifies for each soft constraint its weight . The goal is to find a feasible assignment that maximizes (minimizes, resp.) the total weight of satisfied (unsatisfied, resp.) constraints. The unweighted version of CSP is equivalent to the weighted version with for all .
Even more generally, the relations in the soft constraints can be replaced by bounded real valued payoff functions: a soft constraint with is not a -ary relation but a function and the payoff of the soft constraint for a feasible assignment is ; the objective is to maximize (minimize, resp.) the total payoff. For the sake of simplicity of the presentation we do not consider the problem in this generality although the techniques used in this paper apply in the general setting as well.
For notions related to the treewidth of a graph, we stick to the standard terminology as given in the book by Kloks [10]).
1.2 Related Work
CSP for graphs of bounded treewidth.
As CSP captures many NP-hard problems, it is a natural problem to identify tractable special cases of CSP. Freuder [7] showed that CSP instances with treewidth bounded by can be solved in time . Later, Grohe et al. [8] proved that, assuming , this is essentially the only nontrivial class of graphs for which CSP is solvable in polynomial time (cf. Marx [12]).
Describing the polytope of CSP solutions by the means of linear programming, for instances of bounded treewidth, is not a new idea. In 2007, Sellmann et al. published a paper [18] in which they described a linear program that was supposed to define the convex hull of all feasible solutions of a binary CSP when the constraint graph is a tree. They also provided a procedure to convert a given CSP instance with bounded treewidth into one whose constraint graph is a tree, at the cost of blowing up the number of variables and constraints by a function of the treewidth. Unfortunately, there was a substantial bug in their proof and one of the main theorems in the paper does not even hold [17].
The paper [18] also implicitely includes this folklore result: if the constraint graph has treewidth at most , then CSP can be solved by levels of the Sherali-Adams hierarchy. The resulting formulation is of size while our approach yields size .
CSP for general graphs.
Chan et al. [4] study the extent to which linear programming relaxation can be used in dealing with approximating CSP. They show that polynomial-sized LPs are exactly as powerful as LPs obtained from a constant number of rounds of the Sherali-Adams hierarchy. They also prove integrality gaps for polynomial-sized LPs for some CSP.
Raghavendra [13] shows that under the Unique Games Conjecture, a certain simple SDP relaxation achieves the best approximation ratio for every CSP. In a follow up paper, Raghavendra and Steurer [14] describe an efficient rounding scheme that achieves the integrality gap of the simple SDP relaxation, and, in another paper [15], they show unconditionally that the integrality gap of this SDP relaxation cannot be reduced by Sherali-Adams hierarchies.
Other related results.
Buchanan and Butenko [3] provide an extended formulation for the independent set problem, a special case of CSP, that has size where denotes the treewidth of the given graph. Our results can be viewed as a generalization of this result: the size of our formulation, when applied to the independent set problem, is also .
In a recent work, Bienstock and Munoz [2] define a class of so called general binary optimization problems which are essentially weighted boolean CSP problems, and for instances of treewidth provide an LP formulation of size . Again, this is a special case of our result in this paper. It is worth mentioning at this point that every CSP instance can be transformed into a boolean CSP instance; however, the standard transformation results in a substantial increase (in some cases even ) of the treewidth of the constraint graph.
1.3 New Results
Our main result is summarized as the following theorem.
Theorem 1.1
For every instance of CSP, there exists an extended formulation of and of size where is the treewidth of ; moreover, the corresponding LP can be constructed in time .
As a corollary we obtain upper bounds on the extension complexity for several NP-hard problems on the class of graphs with bounded treewidth; as far as we know, these results have not been known.
2 CSP Polytope
2.1 Integer Linear Programming Formulation
We start by introducing the terms and notation that we use throughout this section. We assume that is a given instance of CSP. For every subset we define the set of all configurations of as
where is a symbol not appearing in any of the domains , . For a configuration and , we use the notation to refer to the -th element of . Also, for a configuration , and , we use the notation to denote the configuration such that and for every .
For an -dimensional vector and a subset of variables we denote by the restriction of to that is defined as an -dimensional vector with for and for (i.e., we set to all coordinates of outside of ). We denote by the configuration ; note that for , is the configuration from with exactly one non- element, namely the -th element, equaling .
In our linear program, for every index and every , we introduce a binary variable . The task of the variable is to encode the value of the CSP-variable : the variable is set to one if and only if . Since in every solution each variable assumes a unique value, we enforce the constraint for each .
For every configuration we introduce a binary variable . The intended meaning of the variable , for and , is to provide information about the values of the CSP-variables for in the following way: if and only if for every , . To ensure consistency between the and variables, for every and for every , we enforce the constraint . Note that for binary CSP, the variables capture the values of CSP-variables for pairs of elements from that correspond to edges of the constraint graph.
Relaxing the integrality constraints we obtain the following initial LP relaxation of the CSP problem :
(1) | |||||
(2) | |||||
(3) |
Note that there is a one to one correspondence between the (extended) feasible assignments of and integral solutions of (1) - (3); from now on we denote by the linear projection of the convex hull of integral solutions of (1) - (3) to . Also observe that the total weight of CSP-constraints satisfied by an integral vector satisfying (1) - (3) is111In the case of general payoff functions, the total weight is given by
Unfortunately, even for CSP problems whose constraint graph is series-parallel, the polytope given by the LP (1) - (3) is not integral (consider, e.g., the instance of CSP corresponding to the independent set problem on ). The weakness of the formulation is that no global consistency among the variables is guaranteed. To strengthen the relaxation, we introduce new variables and constraints derived from a tree decomposition of the constraint graph of .
2.2 Extended Formulation
Here we describe, for every CSP instance , a polytope , and in the next subsection we prove that is an extended formulation of and . The set of variables in the given LP description of is substantially different from the set of variables used in the LP (1) - (3), and the set of new constraints is completely different from the the set of constraints in the LP (1) - (3). Whereas in the previous subsection, there is (roughly) a variable for every feasible assignment of every subset of CSP variables corresponding to a soft or hard constraint, here we have a variable for every feasible assignment of every subset of CSP variables corresponding to a bag in a given tree decomposition of the constraint graph. Nevertheless, as we show after defining , there exists a simple linear projection of to the convex hull of all integral points in the polytope given by the LP (1) - (3).
Let be a fixed nice tree decomposition [10] of the constraint graph of and for every node , let denote the corresponding bag. Let denote the set of all bags of . Let be the set of all configurations of all bags in . We use to denote the subset of all introduce nodes in and to denote the subset of all forget nodes in .
For every configuration we introduce a binary variable . As in the previous subsection, the intended meaning of the variable , for , is to provide information about the values of the CSP-variables for in the following way: if and only if for every , . To ensure consistency among variables indexed by the configurations of the same bag, namely to ensure that for every there exists exactly one configuration with , we introduce for every the LP constraint .
For every introduce node with a child and for every configuration we have the constraint , and symmetrically, for every forget node with a child and for every configuration we have the constraint .
Relaxing the integrality constraints and putting all these additional constraints together, we obtain:
(4) | |||||
(5) | |||||
the only child of | |||||
(6) | |||||
the only child of | |||||
(7) |
For the given binary CSP instance , we denote the polytope associated with the LP (4) - (7), as .
Consider now a vector and the following set of linear equations:
(8) | |||||
(9) |
It is just a technical exercise to check that for a given , there always exists a unique solution of this LP and that the unique is a linear projection of . Moreover, such a vector also satisfies the LP constraints (1) - (3). The point is that there exists a linear projection of into the polytope defined by the LP (1) - (3); moreover, an integral point from is mapped on an integral point. From now on we denote this projection .
2.3 Proof of Theorem 1.1
As in the previous subsections, we assume that is a given instance of CSP, is the constraint graph of and a fixed nice tree decomposition of . We start by introducing several notions that will help us dealing with tree decompositions and our linear program.
For a node , let be the subtree of rooted in ; the configurations relevant to are those in the set , and the variables relevant to are those for which . For succinctness of notation, we denote the projection of the vector on the set of variables relevant to also by . The constraints relevant to are those containing only the variables relevant to . We say that a vector agrees with the configuration if .
Let be a fixed solution of the LP (4) - (7) that corresponds to a vertex of the polytope . Our main tool is the following lemma.
Lemma 1
For every node , there exist a positive integer and binary vectors , some possibly identical, such that
-
every satisfies the constraints relevant to ,
-
.
Proof
By induction. We start in the leaves of and proceed in a bottom-up fashion.
Base case.
Assume that is a leaf of the nice decomposition tree . By definition of a nice tree decomposition, the bag consists of a single vertex, say a vertex . The only variables relevant to are for all , and the only relevant constraints are those of the type (4) and (7).
Let be such that an -multiple of every relevant variable is integral; as is a solution corresponding to a vertex of the polytope , all the variables are rational which guarantees that such an exists. For every we define an integral vector such that and for every .
The vector will appear with multiplicity among the integral solutions for . Then, obviously, both properties and are satisfied.
Inductive step.
Consider an internal node of the nice decomposition tree . We distinguish three cases: is a join node, is an introduce node and is a forget node.
Join node. Assume that the two children of the join node are and . Recall that . By the inductive assumption, there exist integers and and integral vectors , each of them satisfying the relevant constraints for and such that , and integral vectors , each of them satisfying the relevant constraints for and such that .
Two vectors and that agree with a given configuration can be easily merged into an integral vector that satisfies and ; as the set of all constraints relevant to is the union of the constraints relevant to and the constraints relevant to , the vector satisfies also all the constraints relevant to .
For simplicity we assume, without loss of generality, that . Then, by the property and since , for every configuration , the number of vectors that agree with is equal to the number of vectors that agree with , namely . Thus, it is possible to match the vectors and one to one in such a way that both vectors in each pair agree with the same configuration; let denote the result of their merging as described above. Then the vectors satisfy the property as explained in the previous paragraph, and by construction they also satisfy the property .
Introduce node. Assume that the only child of the introduce node is a node and . By the inductive assumption, there exists integer and integral vectors , each of them satisfying the relevant constraints for and such that . Without loss of generality we assume that for every variable relevant to , its -multiple is integral. We partition the vectors into several groups indexed by the configurations from : the group , for , consists exactly of those vectors that agree with .
Consider a fixed configuration and the corresponding group . Note that the size of this group is . We further partition the group into at most subgroups , where , for every satisfying , in such a way that contains exactly vectors (it does not matter which ones); the LP constraint (5) makes this possible. Then, for every , we create from every vector a new integral vector in the following way:
-
•
for every , ; this guarantees ,
-
•
,
-
•
for every , , .
Obviously, the new vectors satisfy all constraints relevant to , and it is easy to check that they satisfy all constraints relevant to as well, given the definitions above. Moreover, the definitions above imply that the vectors satisfy the property .
Forget node. Assume that the only child of the forget node is a node , . This case is symmetric to the previous one in that instead of splitting the groups into smaller groups , we merge them into bigger .
By the inductive assumption, there exists an integer and integral vectors , each of them satisfying the relevant constraints for and such that . Without loss of generality we assume that for every variable relevant to , its -multiple is integral. We partition the vectors into several groups indexed by the configurations from : the group , for , consists exactly of those vectors that agree with . Note that the size of is .
For every we create a bigger group group by merging of the groups , namely those satisfying . By the LP constraint (6), the new group contains exactly vectors. For every , we create from every vector a new integral vector in the following way:
-
•
for every , .
If , there is nothing more to do. Otherwise we further define
-
•
, and for every , , .
We have to check that the vectors satisfy all constraints relevant to . The only possibly new constraints are those using variables for and it is easily seen that they are satisfied, given the definitions above. Also, the definitions above imply that the vectors satisfy the property . ∎
By applying Lemma 1 to the whole tree , that is, to the subtree rooted in the root of , we immediately obtain that is an integral vector, and, thus, also the corresponding vertex of is integral. As this holds for every vertex of , we conclude that is an integral polytope.
Considering the notes at the ends of the previous two subsections, we also conclude that and .
3 Applications
The purpose of this section is to make explicit the extension complexity upper bounds given in Theorem 1.1 for several well known graph problems. We find it interesting that the attained extension complexity upper bounds meet the best possible (assuming Strong ETH) time complexity lower bounds, given by Lokshtanov et al. [11]; the only exception is the Multiway Cut problem. To state our results, we use for each problem the following template:
Problem name
Projection
Extension complexity
Time complexity
Instance: …
Solution: …
CSP formulation: , , , . CSP version: Decision / Max / Min
where Projection is the name of the linear projection that yields the natural polytope of the problem from the polytope (or from the polytope, in case of the OCT problem). We use the notation .
Coloring / Chromatic Number [1]
Instance: Graph , set of colors
Solution: A coloring of with colors with no monochromatic edges.
CSP formulation: , for every , for every , . Decision
Comment: Note that Chromatic Number of is always upper bounded by since graphs of bounded treewidth are -degenerate and thus -colorable. Thus, if the goal is to determine , it suffice to find the smallest such that is non-empty.
List--Coloring / List Homomorphism [6]
Instance: Graph , graph possibly containing loops, and for every vertex a set . (We denote )
Solution: A mapping such that it holds that and for every .
CSP formulation: , for every , for every , . Decision
Comment: Note that the problems List Coloring, Precoloring Extension and -Coloring (or Graph Homomorphism) are all special cases of this problem. The lower bound given by Lokshtanov et al. [11] applies to all of them since Coloring is a special case of each of them.
Unique Games [9]
—
Instance: Graph , an integer , a permutation of order for every edge .
Solution: A mapping such that the number of edges with is maximized.
CSP formulation: , for every , , for every edge . Max
Comment: The decision variant of this problem is not interesting as it is trivially solvable in polynomial time.
Multiway Cut [1]
Instance: Graph , an integer and vertices
Solution: A partition of into sets such that for every we have and the total number of edges between and for is minimized.
CSP formulation: , for every , , for every edge . Min
Comment: Setting models vertex belonging to the set . Not satisfying the constraint means that the edge belongs to the multiway cut.
Max Cut [1]
Instance: Graph
Solution: A partition of vertices into two sets such that the number of edges between and is maximized.
CSP formulation: , for every , , for every edge . Max
Comment: The values model the vertex belonging to the set or . If we replace maximization by minimization, the problem becomes Edge Bipartization (aka Edge OCT) problem which is a parametric dual of Max Cut.
Vertex Cover [1]
Instance: Graph
Solution: A set of vertices of minimal size such that every edge contains a vertex as at least one of its endpoints.
CSP formulation: , for every , for every edge , . Min
Comment: The values model the vertex belonging to or . If we replace maximization by minimization, the problem becomes Independent Set problem which is a parametric dual of Vertex Cover.
Odd Cycle Transversal [11]
Instance: Graph
Solution: A subset of vertices of minimal size such that is a bipartite graph.
CSP formulation: , for every , for every edge , for every . Min
Comment: The values model the vertex belonging to either the first or the second partite of a bipartite graph, or the deletion set . Satisfying the constraint corresponds to not putting in the deletion set . Also known as Vertex Bipartization. The projection is defined as follows: .
4 Open problems
A natural research direction is to examine more closely the extension complexity for CSP and the specific graph problems on graphs with bounded treewidth, in particular, what are the best possible upper bounds?
Acknowledgments.
The authors thank Hans Raj Tiwary and Jiří Sgall for stimulating discussions.
References
- [1] G. Ausiello, P. Creczenzi, G. Gambosi, V. Kann, A. Marchetti-Spaccamela, and M. Protasi. Complexity and Approximation; Combinatorial Optimization Problems and Their Approximability Properties. Springer, 1999.
- [2] D. Bienstock and G. Munoz. LP approximations to mixed-integer polynomial optimization problems. ArXiv e-prints, Jan. 2015.
- [3] A. Buchanan and S. Butenko. Tight extended formulations for independent set, 2014. Available on Optimization Online.
- [4] S. O. Chan, J. R. Lee, P. Raghavendra, and D. Steurer. Approximate constraint satisfaction requires large LP relaxations. In Proc. of the 54th Annual IEEE Symposium on Foundations of Computer Science, (FOCS), pages 350–359, 2013.
- [5] M. Conforti, G. Cornuéjols, and G. Zambelli. Extended formulations in combinatorial optimization. Annals OR, 204(1):97–143, 2013.
- [6] T. Feder and P. Hell. List homomorphisms to reflexive graphs. J. Comb. Theory, Ser. B, 72(2):236–250, 1998.
- [7] E. C. Freuder. Complexity of -tree structured constraint satisfaction problems. In Proc. of the 8th National Conference on Artificial Intelligence, pages 4–9, 1990.
- [8] M. Grohe, T. Schwentick, and L. Segoufin. When is the evaluation of conjunctive queries tractable? In Proc. of the 33rd Annual ACM Symposium on Theory of Computing (STOC), pages 657–666, 2001.
- [9] S. Khot. On the power of unique 2-Prover 1-Round games. In Proc. of the 34th Annual ACM Symposium on Theory of Computing (STOC), pages 767–775, 2002.
- [10] T. Kloks. Treewidth: Computations and Approximations, volume 842 of Lecture Notes in Computer Science. Springer, 1994.
- [11] D. Lokshtanov, D. Marx, and S. Saurabh. Known algorithms on graphs on bounded treewidth are probably optimal. In Proc. of the 22nd Annual ACM-SIAM Symposium on Discrete Algorithms, (SODA), pages 777–789, 2011.
- [12] D. Marx. Can you beat treewidth? Theory of Computing, 6(1):85–112, 2010.
- [13] P. Raghavendra. Optimal algorithms and inapproximability results for every CSP? In Proc. of the 40th Annual ACM Symposium on Theory of Computing (STOC), pages 245–254, 2008.
- [14] P. Raghavendra and D. Steurer. How to round any CSP. In Proc. of the 50th Annual IEEE Symposium on Foundations of Computer Science, (FOCS), pages 586–594, 2009.
- [15] P. Raghavendra and D. Steurer. Integrality gaps for strong SDP relaxations of unique games. In Proc. of the 50th Annual IEEE Symposium on Foundations of Computer Science, (FOCS), pages 575–585, 2009.
- [16] T. Rothvoß. The matching polytope has exponential extension complexity. In Proc. of the 46th ACM Symposium on Theory of Computing, (STOC), pages 263–272, 2014.
- [17] M. Sellmann. The polytope of tree-structured binary constraint satisfaction problems. In Proc. of Integration of AI and OR Techniques in Constraint Programming for Combinatorial Optimization Problems (CPAIOR), volume 5015 of Lecture Notes in Computer Science, pages 367–371. Springer, 2008.
- [18] M. Sellmann, L. Mercier, and D. H. Leventhal. The linear programming polytope of binary constraint problems with bounded tree-width. In Proc. of Integration of AI and OR Techniques in Constraint Programming for Combinatorial Optimization Problems (CPAIOR), volume 4510 of Lecture Notes in Computer Science, pages 275–287. Springer, 2007.