Semantic Width and the Fixed-Parameter Tractability of Constraint Satisfaction Problems

07/28/2020 ∙ by Hubie Chen, et al. ∙ University of Oxford TU Wien Birkbeck, University of London 0

Constraint satisfaction problems (CSPs) are an important formal framework for the uniform treatment of various prominent AI tasks, e.g., coloring or scheduling problems. Solving CSPs is, in general, known to be NP-complete and fixed-parameter intractable when parameterized by their constraint scopes. We give a characterization of those classes of CSPs for which the problem becomes fixed-parameter tractable. Our characterization significantly increases the utility of the CSP framework by making it possible to decide the fixed-parameter tractability of problems via their CSP formulations. We further extend our characterization to the evaluation of unions of conjunctive queries, a fundamental problem in databases. Furthermore, we provide some new insight on the frontier of PTIME solvability of CSPs. In particular, we observe that bounded fractional hypertree width is more general than bounded hypertree width only for classes that exhibit a certain type of exponential growth. The presented work resolves a long-standing open problem and yields powerful new tools for complexity research in AI and database theory.



There are no comments yet.


page 1

page 2

page 3

page 4

This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1 Introduction

CSPs are a fundamental problem of artificial intelligence. As a unifying formal framework, they play a foundational role in many areas of AI research, see e.g., 

[Kumar1992, Narváez2018]. However, the unifying aspect of CSPs has not yet reached its full potential. While a CSP formulation of a problem allows for reuse of common algorithmic strategies and implementations [Gottlob et al.2000, Do and Kambhampati2001], results in computational complexity still often require individual investigation, with little help from the framework. A complexity characterization for CSP would allow researchers to finally leverage the CSP framework also for strong computational complexity results, hence greatly simplifying the study of all problems that can be formulated as CSPs. The consequences and wide-reaching applications of such a characterization motivate our central research question. Note that throughout this paper, the parameterized complexity of CSPs always refers to the problem parameterized by the size of its constraint scopes.

  • Research Challenge: Is there a natural characterization of the fixed-parameter tractable classes of CSPs?

To be precise, we study what is referred to as the uniform CSP problem in the literature. In the uniform problem, we are interested in how the structure of constraint scopes affects the complexity of the problem, i.e., we characterize restrictions to the structure of constraint scopes. In the nonuniform problem, one considers restrictions to the constraint relations. Here, in a classic result, [Hell and Nesetril1990] gave an elegant characterization of PTIME solvability. More recently, [Bulatov2017] and [Zhuk2017] were able to independently establish a powerful dichotomy theorem. However, results for the nonuniform case do not translate to the uniform problem.

There is a long line of research devoted to the (parameterized) computational complexity of solving CSPs based on structural parameters of their associated hypergraphs. In a landmark result, [Grohe2007] resolved the question for a restricted class of CSPs; namely those with bounded arity. There, PTIME decidability is fully characterized by bounded treewidth modulo homomorphic equivalence. Moreover, for bounded arity, we have fixed-parameter tractability if and only if the problem is solvable in PTIME.

To tackle the problem beyond bounded arity, a number of generalizations of treewidth have been developed that provide sufficient conditions for tractably solving CSPs, the most important of which are hypertree width [Gottlob et al.2002] and fractional hypertree width [Grohe and Marx2014a]. Yet, bounding these parameters yields only sufficient conditions for tractability. A necessary condition for unbounded arity remains elusive. In the parameterized space, a highly impressive result by [Marx2013] was able to characterize those hypergraphs, i.e., problem structures, that always allow for fixed-parameter tractable evaluation by the submodular width of the hypergraphs. However, while this result is closely related to our goal, the fact that the characterization is on the hypergraph level significantly limits its applicability in our setting: When we consider the CSP formulation of a problem, then the complexity of our problem does not depend on the complexity of other, unrelated, CSPs that happen to have the same underlying hypergraphs. Hence, characterizing on the hypergraph level restricts us to a worst-case that may not be connected to the problem we want to study (this point is discussed in detail in Section 3.1).

Despite their unquestionable importance, Grohe’s and Marx’s characterizations do not answer our research question. Instead, we introduce a new parameter – semantic submodular width () – to capture the minimal submodular width over the (infinite) equivalence class of semantically equivalent CSPs. We show that it is still possible to decide and find the minimal semantically equivalent CSP in time that depends only on the size of the parameter. Following that, we give a reduction from Marx’s setting to ours, which allows us to prove the necessary lower bound. Akin to Marx’s characterization, our result assumes the Exponential Time Hypothesis [Impagliazzo et al.2001]; a standard assumption of parameterized complexity.

  • Main Result 1: Assuming the Exponential Time Hypothesis, a class of CSPs is fixed-parameter tractable if and only if it has bounded semantic submodular width.

Through the well-known equivalence of CSP to the homomorphism problem as well as conjunctive query containment [Kolaitis and Vardi2000] and evaluation [Maier1983], our main result also applies to those important problem families. By adapting our notion of from CSPs to the more general notion of unions of conjunctive queries (UCQs) accordingly, we can also extend our characterization result to UCQs, an important and widely studied class of query languages in database theory [Sagiv and Yannakakis1980, Atserias et al.2006].

  • Main Result 2: Assuming the Exponential Time Hypothesis, a class of UCQs is fixed-parameter tractable if and only if it has bounded semantic submodular width.

With the question of fixed-parameter tractability resolved, we shift our attention to PTIME solvable classes of CSPs. Here, a characterization of tractable restrictions for the uniform CSP problem remains an open question. We briefly discuss how our parameterized results relate to the non-parameterized case. Furthermore, we utilize some recent results on the connection of hypergraph width parameters and Vapnik-Chervonenkis dimension to derive new insight on the frontier of tractability of the uniform CSP problem. In particular, we show that the two most important sufficient conditions for tractable CSP solving – bounded fractional hypertree width and bounded hypertree width – actually collapses for classes of CSPs as long as they do not exhibit a certain kind of, seemingly unnatural, exponential growth.

The rest of the paper is structured as follows. Section 2 recalls necessary definitions for constraint satisfaction problems, unions of conjunctive queries, and relevant hypergraph width parameters. We expand on the differences to Marx’s characterization in Section 3.1 before we present our two main results in Sections 3.2 and 3.3. Section 4 presents some new insights regarding the PTIME solvability of CSPs. We end with concluding remarks in Section 5. Moreover, we include an appendix that includes full proofs of all statements that are not already shown in the main body of text. In Appendix C we show that semantic hypertree width behaves differently than the other widths investigated in our setting and prove a characterization in terms of semantic generalized hypertree width.

2 Preliminaries

2.1 Parameterized Complexity

Parameterized complexity enables a more fine-grained study of computational complexity. Here, we give an abridged definition of the notions necessary for this paper. For full definitions and details we refer to [Flum and Grohe2006].

For an alphabet of symbols , a parameterized problem is given as a pair of a problem and its parameterization that maps each string in to a parameter.

We say that a parameterized problem is fixed-parameter tractable if there exists an algorithm that decides whether a given string is in in time , where is a computable function and is a polynomial.

Let and be two parameterized problems. A fpt-reduction from to is a mapping with the following properties:

  1. [topsep=0pt,noitemsep,label=(0)]

  2. for every ,

  3. is computable in time ( is computable), and

  4. there is a computable function such that for all .

We say is fpt-reducible to , denoted . The class of fixed-parameter tractable problems is closed under fpt-reductions.

Our main results assume the Exponential Time Hypothesis, which states that 3-SAT with variables can not be decided in time [Impagliazzo et al.2001]. This is a standard assumption of parameterized complexity theory.

2.2 Constraint Satisfaction Problems

We formalize CSPs as a relational homomorphism problem. A signature is a finite set of relation symbols with associated arities. A (relational) structure (over signature ) consists of a domain and an interpretation for each relation symbol in the signature. Let be relational structures, we call a function a homomorphism from into , if for every relation symbol and all also , where is the arity of . We write for the size of structure .

We call an ordered pair

of structures a constraint satisfaction problem instance. Intuitively, expresses the constraint scopes and the permitted assignments for each constraint scope. For a class of structures, the corresponding constraint satisfaction problem, denoted , is the following decision problem. [framed] Instance: & A CSP instance where .
Question: & Is there a homomorphism from into ? By slight abuse of notation, we also call a class of constraint satisfaction problems. Note that what we call is sometimes denoted as to emphasize that we are dealing with the uniform CSP problem (cf., [Grohe2007]). Furthermore, constants play no role in our considerations since they can be eliminated by straightforward preprocessing.

A hypergraph is a tuple , where is the set of vertices and the set of hyperedges. For a set , we define the subhypergraph induced by as where . The hypergraph of a structure is the hypergraph where the vertices equal and if and only if there exists some relation symbol such that some permutation of is contained in . The hypergraph of a CSP instance is the hypergraph of , i.e., the hypergraph of a CSP instance represents only the structure of its constraint scopes. We are interested in how this structure affects the complexity of the decision problem. We thus consider the CSP decision problem parameterized by its constraint scope structure: [framed] Instance: & A CSP instance where .
Parameter: &
Question: & Is there a homomorphism from into ?

For a class of hypergraphs, let denote all structures whose hypergraphs are in . We will abbreviate the problem to , i.e., CSP restricted to those instances whose hypergraphs are in . The analogue applies to .

For two structures and , we say is homomorphically equivalent to , or , if there exists a homomorphism from into and vice versa. The core of a structure , denoted , is the minimal structure (with regards to the number of tuples) that is homomorphically equivalent to . It is not hard to verify that every structure has a unique (up to isomorphism) core. For a class of structures , we write for the class of cores of structures in .

In the context of CSPs, we say a structure is contained in structure if for every we have that if has a solution, then also has a solution. It is easy to see that is contained in if and only if there exists a homomorphism from to . If two structures and are contained within each other, we say that they are semantically equivalent (we write ). Hence, if then for every we have that has a solution if and only if has a solution. Furthermore, note that if and only if , i.e., homomorphic equivalence equals semantic equivalence. In particular, is always equivalent to .

2.3 Unions of Conjunctive Queries

Please note that, for consistency and brevity, we will define unions of conjunctive queries via CSPs. This does not match the standard presentations of the problem but is equivalent to them.

An instance of the (boolean) unions of conjunctive queries (UCQ) problem is a set of structures , we write , and a structure which is usually referred to as the database. We say an instance of the UCQ problem has a solution if any of the CSP instances , for , has a solution. Hence, the accompanying parameterized decision problem for a class of UCQs is the following

[framed] Instance: & A UCQ where and a database .
Parameter: &
Question: & Does have a solution?

Analogue to CSPs, the equivalence of UCQs will be important. We say that two UCQs and are semantically equivalent (we write ) if for every structure , has a solution if and only if has a solution.

A UCQ is non-redundant if there are no and () such that is contained in . Note that every UCQ can be transformed into an equivalent non-redundant UCQ by repeated deletion of structures that are contained by other structure in the UCQ [Sagiv and Yannakakis1980]). We write for the UCQ obtained by applying this procedure to make an UCQ non-redundant. Importantly, as the procedure only deletes structures we have .

2.4 Decompositions and Their Widths

In this work we will only consider width notions that are based on tree decompositions. A tuple is a tree decomposition of a hypergraph if is a tree, every is a subset of and the following two conditions are satisfied:

  1. [topsep=0pt, noitemsep,label=(0)]

  2. For every there is a node s.t. , and

  3. for every vertex , is connected in .

For functions , the -width of a tree decomposition is and the -width of a hypergraph is the minimal -width over all its tree decompositions. Let be a class of functions from subsets of to the non-negative reals, then the -width of is . All such widths are implicitly extended to structures and CSP instances by taking the width of their respective hypergraphs.

The following properties of functions are important:

  • [topsep=0pt,noitemsep]

  • is monotone if implies .

  • is called edge-dominated if for every .

  • is called submodular if holds for every .

We say a weight function is a fractional edge cover of a set if for every we have where is the set of all edges incident to . If we restrict the co-domain to , we obtain the definition of an integral edge cover. We refer to the total weight of an edge cover as the size of the edge cover.

For , let be the size of the smallest integral edge cover of by edges in and the size of the smallest fractional edge cover of by edges in . This framework now allows us to define many of the important widths in the current literature.


(Primal) Treewidth of  [Robertson and Seymour1986]:

-width, where .

Generalized hypertree width of  [Gottlob et al.2002]:


Fractional hypertree width of  [Grohe and Marx2014a]:


Submodular width of  [Marx2013]:

-width, where is the set of all monotone, edge-dominated, submodular functions on with .

A notable omission, that is not expressible through this notion of -width, is hypertree width (hw) [Gottlob et al.2002], which uses the same width function as but imposes an additional restriction on the tree decomposition. Details of hypertree width are not important for the main part of this paper. We formally introduce them in Appendix C where we present some novel results on the behaviour of hypertree width in homomorphically equivalent structures. Note that these widths spawn a hierarchy in the sense that the following inequality holds for all hypergraphs :

For a class of structures , we say has bounded width if there exists a constant such that every structure in has width . The computational complexity of CSP is tightly linked to this hierarchy of parameters. This connection is summarized by the following two propositions.

Proposition 1 ([Grohe and Marx2014a]).

Let be a class of CSP instances of bounded . Then is tractable.

Proposition 2 ([Marx2013]).

Let be a recursively enumerable class of hypergraphs. Assuming the Exponential Time Hypothesis, is fixed-parameter tractable if and only if has bounded submodular width.

3 Main Results

3.1 Characterization of Hypergraph Classes vs. Classes of CSP Instances

Recall the motivation given in the introduction. Many AI problems have natural CSP formulations and we wish to determine the computational complexity of all such problems through a characterization of the complexity of CSP. In this section we argue why a characterization on the hypergraph level (which ignores relation symbols), as in Proposition 2, is not enough for this goal. The main issue with the hypergraph characterization is that even though a CSP instance may have a highly complex hypergraph structure, it can still be easy to solve. Yet, the complexity of expresses only the complexity of the worst-case CSP instances of the given structure. We illustrate this issue in the following example.

Consider the following problem: Given a directed graph , can we embed (by a homomorphism) a bidirected -grid into ? The corresponding CSP instance has a single relation symbol and . As domain of we take and contains exactly the following tuples specifying the -grid: for and , for .

We now consider the class of all CSP instances for and all graphs . The hypergraphs of are, by definition, exactly the class of -grid graphs , which is well-known to have unbounded treewidth [Robertson and Seymour1986]. In general, it is difficult to determine the submodular width of graphs since the definition depends on a supremum over an infinite class of functions. However, Lemma 1 below provides us with a convenient way to recognize that certain classes have unbounded submodular width.

Lemma 1.

Let be an arbitrary hypergraph and let be the maximum edge size in , then


Let be a function on the subsets of . It is easy to verify that is submodular, edge-dominated and monotone. For any node of any tree decomposition of we clearly have and therefore also -width. Since is submodular, edge-dominated and monotone we also have -width and the statement follows immediately. ∎

From Lemma 1 we can conclude that also has unbounded submodular width. From Proposition 2 we can thus only deduce that is not fixed-parameter tractable.

However, for every , we have that is the structure with domain and . This is easy to verify, e.g., by observing that an undirected -grid is 2-colorable. Clearly, is solvable in polynomial time and it is equivalent to . It follows that is in fact fixed-parameter tractable (and indeed tractable), despite the complexity of . We see that a hypergraph level characterization has inherent shortcomings in establishing lower bounds for specific problem classes.

3.2 Constraint Satisfaction Problems

In this section we prove our characterization theorem for CSPs. The discussion in Section 3.1 shows that unbounded submodular width can still allow for fixed-parameter tractable CSP solving. Hence, we require a new, more general, property to fully capture fixed-parameter tractability. We follow [Barceló et al.2017] who introduced the notion of semantic generalized hypertree width and define the following general notion of semantic widths of CSPs.

Definition 1.

Let be the class of all structures and be invariant under isomorphism. We define semantic as .

Using this definition, we are now ready to state our first main result. We show that the characterization from Proposition 2 can indeed be strengthened to the following characterization of the fixed-parameter tractability of CSP instances.

Theorem 1.

Let be a recursively enumerable class of CSPs. Assuming the Exponential Time Hypothesis, is fixed-parameter tractable if and only if has bounded semantic submodular width.

Our proof of the theorem relies on two central lemmas. First, we show how bounded semantic submodular width leads to fixed-parameter tractability. The basic idea is simple, instead of solving a CSP instance with possibly arbitrarily high submodular width, we want to solve an equivalent instance with low width. However, it is not clear how to find such an equivalent instance and whether finding it is decidable. For generalized hypertree width [Barceló et al.2017] have recently shown, that for any structure , is precisely . Indeed, we show in Lemma 2, that the same connection also holds for the more complex cases of fractional hypertree width and submodular width. Note that for treewidth this property is trivial since treewidth is hereditary, i.e., removing edges from a hypergraph can not increase its treewidth. The width functions considered here are not hereditary and involve additional technical considerations beyond those necessary for the case.

Lemma 2.

For every structure :

Proof (Sketch).

First, since call equivalent structures have isomorphic cores it is enough to show to establish that for any invariant .

Let be the hypergraph of and the hypergraph of . Note that there exists an homomorphism from to where for all elements in the domain of . From this we can then show that for every tree decomposition of , there exists a tree decomposition of where .

For the case we then use an observation on how fractional edge covers behave under homomorphisms to show that this transformation does not increase the -width. Hence, we can transform the tree decomposition for with minimal -width into a new tree decomposition for with less or equal -width, i.e., . The observation for edge covers under homomorphisms also leads to the result for .

The case requires additional considerations as the width is now defined over a whole class of functions . We show that for every edge-dominated, submodular function over there exists an edge-dominated submodular function over such that -width-width. In particular, for every this the function has the required properties. ∎

While and are less general than they will be of further interest in the discussion of PTIME solvability of CSPs in Section 4. In the context of our main result, the most important consequence of Lemma 2 is that we are always able to find the equivalent structure with minimal submodular width by simply computing the core. In principle, finding the core of a structure is intractable (formally, deciding if a structure is the core of a structure , is DP-complete [Fagin et al.2005]). However, in our parameterized setting the computation of the core of only depends on the parameter.

To establish a lower bound for classes with unbounded semantic submodular width we will make use of previous results from [Chen and Müller2015]. A step in our reduction will require an additional definition that helps us fix the domains of individual elements in the reduction. For a structure , let be the expansion of by a new fresh unary relation symbol with for every element of the domain . For a class of structures we write for . Our intention is to establish our lower bound by reduction from the hypergraph setting of Proposition 2. We will make use of the following two reductions.

Proposition 3 ([Chen and Müller2015]).

Let be a recursively enumerable class of structures. Then

Lemma 3.

Let be a recursively enumerable class of structures and let be the class of hypergraphs of .


Let be an instance of and let be the hypergraph of and be the domain of . Recall that edges can represent multiple constraint scopes, i.e., multiple tuples in . For each edge , we consider the sets of satisfying assignments for each of the tuples of that become edge in the hypergraph. We then produce the set of satisfying assignments over all the tuples for . Observe that computing for all is possible in polynomial time.

By definition there exists a structure in where has hypergraph . We can compute such a by enumeration of until we find an with a matching hypergraph and then computing from .

We will reduce to where is constructed as follows. As the domain of we take . For each we have a with . Let . For each other relation symbol of and each tuple , we add tuples to where and is the hyperedge .

We now show that has a solution iff has a solution. First, suppose is a homomorphism from to and note that and have the same domain since and have the same underlying hypergraph. It is then not difficult to see that is a homomorphism from to : For the unary relations , the image trivially exists in . For the other relations, it is enough to observe hat for every edge of , the assignment restricted to variables in must be in .

For the other side, observe that a homomorphism from to must be of the form . We argue that is a homomorphism from to . As and have the same domain, also applies to the domain of . By definition of we have that for every tuple in , maps to a tuple in as long as is covered by some edge of . Since the hypergraphs are the same, this holds for all the tuples in and therefore is a homomorphism. ∎

Proof of Theorem 1. Let be the class of hypergraphs of the structures in . We claim that the two problems and are fpt-reducible to each other. If the claim holds, is fixed-parameter tractable iff is fixed-parameter tractable. By Proposition 2 this is the case iff has bounded submodular width. By Lemma 2, this is equivalent to having bounded semantic submodular width.

What is left, is to show the claim. First, we observe:

The left reduction holds because is equivalent to and computing the core is feasible in time. The right reduction is trivial since all instances of are also instances of . For the other direction we get the intended reduction by straightforward combination of Lemma 3 and Proposition 3:

3.3 Unions of Conjunctive Queries

We now extend the characterization in Theorem 1 from CSPs to UCQs. To do so we first need to introduce a way to extend the relevant definitions to UCQs. For our width notions the natural extension to UCQs is through the maximum of its parts, i.e., for width function and UCQ let . Semantic width functions are defined the same as for CSPs, i.e., . However, equivalence of UCQs is more complex than equivalence in CSPs. In particular, the characterization by homomorphic equivalence is no longer applicable. Therefore, some additional effort is required to determine the analogue of Lemma 2. Using the following classic result by Sagiv and Yannakakis we can derive the fitting Lemma 4.

Proposition 4 ([Sagiv and Yannakakis1980]).

Let and be non-redundant UCQs. Then if and only if for every there is a unique such that .

Lemma 4.

Let be an UCQ, then


It is clear that the right side of the equality is the of an UCQ that is equivalent to . All that is to show is that this is in fact the minimal subw of an equivalent UCQ. For the sake of brevity we will write core- for in the rest of the argument.

Proof is by contradiction. Suppose there exist a UCQ with core-. Since , clearly also . Furthermore, since (recall the construction of ) we also have core-. Now, from Proposition 4 we have that for every , there is an equivalent . By Lemma 2 it follows that for all such combinations of and . From the definition of for UCQs this then gives an immediate contradiction of core-. ∎

From Lemma 4 it is now easy to see, that for a class of UCQs with bounded , the problem is fixed-parameter tractable. For every in we can simply compute and then solve the CSPs individually. In combination with Theorem 1 we see that this procedure is fixed-parameter tractable.

To establish the lower bound, we make use of previous work on the complexity of existential positive logic [Chen2014]. The result there is stated in a different setting but a translation is not difficult through the well-known equivalence of solving CSPs and model checking of primitive positive first-order formulas.

Proposition 5 (Theorem 3.2 in [Chen2014]).

Let be recursively enumerable class of non-redundant UCQs and let be the class of all individual structures that make up the UCQs in . Then .

Theorem 2.

Let be a recursively enumerable class of UCQs. Assuming the Exponential Time Hypothesis, is fixed-parameter tractable if and only if  has bounded semantic submodular width.


For the case where has bounded semantic submodular width we have already given a fixed-parameter tractable procedure for solving above. We will establish the lower bound by introducing the class as an intermediate.

Suppose has unbounded and let be the class of all individual structures that make up the UCQs in . From Lemma 4 it follows that and both also have unbounded . By Proposition 5 we have and therefore, by Theorem 1, can not be fixed-parameter tractable.

To finish the proof we show that . The reduction is straightforward, an instance of is reduced to the instance of where . Such an can be found by enumeration of in time that only depends on the parameter. Since , the reduction is trivially correct. ∎

4 On the Plain Tractability of CSPs

A characterization for the plain (non-parameterized) tractability of CSPs remains an open question. Here we wish to highlight two consequences of our work and recent developments regarding the connection of fractional hypertree width and the Vapnik-Chervonenkis (VC) dimension of a hypergraph presented in [Gottlob et al.2020].

Tractability in natural problem classes. Bounded hypertree width (), generalized hypertree width () and fractional hypertree width () all represent sufficient conditions for tractable CSP solving, with being the most general such property we know of. It is known that is bounded if and only if is bounded [Adler et al.2007]. Furthermore, there exist classes that exhibit bounded but unbounded  [Grohe and Marx2014a]. However, all known hypergraph classes with bounded and unbounded involve some form of exponential growth that is unlikely to be present in natural problems. It has remained an open question if this exponential growth is essential for the separation of the two width measures.

Below, we give an answer to this question. The technical details of VC dimension are not important here. Rather we introduce the notion of exotic hypergraph classes, a consequence of unbounded VC dimension, to focus on the exponential character of such classes. We are able to state that this property is indeed intrinsic to the separation of bounded and . Alternatively, in the contrapositive, we see that for non-exotic classes, a class has bounded if and only if it has bounded . In other words, bounded does not allow for additional tractable cases over bounded .

Definition 2.

Let be a class of hypergraphs. We say that is exotic if for every integer , there exists a with a set of vertices such that has at least distinct edges.

Theorem 3.

For any class of hypergraphs, if has unbounded hypertree width and bounded fractional hypertree width then is exotic.

Proof (Sketch).

As stated above, exoticness is a consequence of unbounded VC dimension, thus we also have that if is not exotic, then has bounded VC dimension.

The key observation is then that the integrality gap for fractional edge covers can be bounded by a function of the VC dimension. Hence, under bounded VC dimension the integrality gap is constant. By applying this observation to every bag of a tree decomposition with we can see that the tree decomposition will also have bounded by some function of and the VC dimension. Due to space restrictions we refer to the proof Theorem 7.8 in [Gottlob et al.2020] for details.

In summary, if has bounded VC dimension, then has bounded iff has bounded . Recall from above, that also is bounded iff is bounded. Hence, the contrapositive of the implication in the theorem holds. ∎

We can extend the exotic property from hypergraphs to classes of CSPs in the usual way. Recall, that in the context of CSPs, incident edges in the hypergraph correspond to constraints that involve the variable. Hence, if vertices have distinct incident edges in the hypergraph, there exists at least one constraint for every possible combination of the corresponding variables in the CSP. We argue that this situation is highly unnatural and believe that this motivates further study of the complexity of non-exotic classes of CSP.

Semantic width and tractability. In the parameterized setting, it is easy to utilize low semantic width to establish upper-bounds as computing the core requires time only in the parameter. For tractability the situation is more problematic. As noted in Section 3.2, finding the core is intractable. Hence, if we have a class with bounded semantic fractional hypertree width, we know that the problem itself is not difficult, but an efficient solution depends on the hard problem of finding the core. We are caught in an unsatisfactory situation where the origin of the hardness is no longer the actual problem but the concrete formulation.

Part of the issue is that utilizing bounded for polynomial evaluation requires a concrete decomposition with low , which then guides the efficient solution of the CSP. Without knowing the core we cannot compute the appropriate decomposition. For bounded generalized hypertree width, Chen and Dalmau were able to show, that for classes of bounded , there exists an algorithm for solving CSPs in polynomial time without requiring the explicit computation of a decomposition [Chen and Dalmau2005]. Their method indeed remains polynomial if only the semantic generalized hypertree width is bounded. Thus, we are able to lift their result to bounded semantic fractional hypertree width for non-exotic classes.

Corollary 1.

Let be a non-exotic class of CSPs with bounded semantic fractional hypertree width. Then is tractable.

Any more general sufficient property for tractability would likely have to preserve this feature of making use of the width of the core without actually requiring the computation of the core. Hence, in light of Theorem 3 and Corollary 1 we conclude the section with the following conjecture.

Conjecture 1.

Let be a class of non-exotic CSPs. Then is tractable if and only if has bounded semantic hypertree width.

5 Conclusion & Outlook

We have given characterizations of the fixed-parameter tractable classes of CSPs and UCQs. This allows us to determine the parameterized complexity of problems that have CSP or UCQ formulations by determining if the class of these formulations has bounded . This motivates further work on theoretical tools that help to show whether a class has bounded . We believe that further study of adaptive width [Marx2011], which is bounded iff is bounded, can be a productive avenue of research here.

The characterization of polynomial time solvable CSPs remains open. We have motivated a new class of non-exotic problems that merits further research. In particular, we wish to resolve Conjecture 1, which we believe to be an important step towards the general problem. To expand on the ideas from Section 4 we show in Appendix C that , thus demonstrating that, in contrast to the other investigated widths, is not necessarily minimal in the core.

Recent work has proposed the use of hybrid width parameters for the study of the computational complexity of CSP, e.g., [Ganian et al.2019]. Such hybrid width parameters, which consider both the query structure and database content, are a natural avenue for further research.

Moreover, we are intrigued by the connections to VC dimension, which is an important parameter in learnability theory [Blumer et al.1989]. We plan to further investigate the nature of the relationship between decomposition methods and learnability theory.


This work was supported by the Austrian Science Fund (FWF):P30930. Georg Gottlob is a Royal Society Research Professor and acknowledges support by the Royal Society for the present work in the context of the project “RAISON DATA” (Project reference: RP\R1\201074).


  • [Adler et al.2007] Isolde Adler, Georg Gottlob, and Martin Grohe. Hypertree width and related hypergraph invariants. Eur. J. Comb., 28(8):2167–2181, 2007.
  • [Assouad1983] Patrick Assouad. Densité et dimension. Annales de l’Institut Fourier, 33(3):233–282, 1983.
  • [Atserias et al.2006] Albert Atserias, Anuj Dawar, and Phokion G. Kolaitis. On preservation under homomorphisms and unions of conjunctive queries. J. ACM, 53(2):208–237, 2006.
  • [Barceló et al.2017] Pablo Barceló, Andreas Pieris, and Miguel Romero. Semantic optimization in tractable classes of conjunctive queries. SIGMOD Record, 46(2):5–17, 2017.
  • [Blumer et al.1989] Anselm Blumer, Andrzej Ehrenfeucht, David Haussler, and Manfred K. Warmuth. Learnability and the Vapnik-Chervonenkis dimension. J. ACM, 36(4):929–965, 1989.
  • [Brönnimann and Goodrich1995] H. Brönnimann and M. T. Goodrich. Almost optimal set covers in finite vc-dimension. Discrete & Computational Geometry, 14(4):463–479, Dec 1995.
  • [Bulatov2017] 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, 2017, pages 319–330, 2017.
  • [Chandra and Merlin1977] Ashok K Chandra and Philip M Merlin. Optimal implementation of conjunctive queries in relational data bases. In

    Proceedings of the ninth annual ACM symposium on Theory of computing

    , pages 77–90. ACM, 1977.
  • [Chen and Dalmau2005] Hubie Chen and Víctor Dalmau. Beyond hypertree width: Decomposition methods without decompositions. In Principles and Practice of Constraint Programming - CP 2005, 11th International Conference, CP 2005, Sitges, Spain, October 1-5, 2005, Proceedings, pages 167–181, 2005.
  • [Chen and Müller2015] Hubie Chen and Moritz Müller. The fine classification of conjunctive queries and parameterized logarithmic space. TOCT, 7(2):7:1–7:27, 2015.
  • [Chen et al.2020] Hubie Chen, Georg Gottlob, Matthias Lanzinger, and Reinhard Pichler. Semantic width and the fixed-parameter tractability of constraint satisfaction problems. In Proceedings of the Twenty-Ninth International Joint Conference on Artificial Intelligence, IJCAI 2020 [scheduled for July 2020, Yokohama, Japan, postponed due to the Corona pandemic], pages 1726–1733, 2020.
  • [Chen2014] Hubie Chen. On the complexity of existential positive queries. ACM Trans. Comput. Log., 15(1):9:1–9:20, 2014.
  • [Ding et al.1994] Guo-Li Ding, Paul Seymour, and Peter Winkler. Bounding the vertex cover number of a hypergraph. Combinatorica, 14(1):23–34, 1994.
  • [Do and Kambhampati2001] Minh Binh Do and Subbarao Kambhampati. Planning as constraint satisfaction: Solving the planning graph by compiling it into CSP. Artif. Intell., 132(2):151–182, 2001.
  • [Duchet1996] Pierre Duchet. Hypergraphs. In Handbook of combinatorics (vol. 1), pages 381–432. MIT Press, 1996.
  • [Fagin et al.2005] Ronald Fagin, Phokion G. Kolaitis, and Lucian Popa. Data exchange: getting to the core. ACM Trans. Database Syst., 30(1):174–210, 2005.
  • [Flum and Grohe2006] Jörg Flum and Martin Grohe. Parameterized Complexity Theory. Texts in Theoretical Computer Science. An EATCS Series. Springer, 2006.
  • [Ganian et al.2019] Robert Ganian, Sebastian Ordyniak, and Stefan Szeider. A join-based hybrid parameter for constraint satisfaction. In Principles and Practice of Constraint Programming - 25th International Conference, CP 2019, Stamford, CT, USA, September 30 - October 4, 2019, Proceedings, pages 195–212, 2019.
  • [Gottlob et al.2000] Georg Gottlob, Nicola Leone, and Francesco Scarcello. A comparison of structural CSP decomposition methods. Artif. Intell., 124(2):243–282, 2000.
  • [Gottlob et al.2002] Georg Gottlob, Nicola Leone, and Francesco Scarcello. Hypertree decompositions and tractable queries. J. Comput. Syst. Sci., 64(3):579–627, 2002.
  • [Gottlob et al.2009a] Georg Gottlob, Gianluigi Greco, and Bruno Marnette. Hyperconsistency width for constraint satisfaction: Algorithms and complexity results. In Graph Theory, Computational Intelligence and Thought, Essays Dedicated to Martin Charles Golumbic on the Occasion of His 60th Birthday, pages 87–99, 2009.
  • [Gottlob et al.2009b] Georg Gottlob, Zoltán Miklós, and Thomas Schwentick. Generalized hypertree decompositions: NP-hardness and tractable variants. J. ACM, 56(6):30:1–30:32, 2009.
  • [Gottlob et al.2020] Georg Gottlob, Matthias Lanzinger, Reinhard Pichler, and Igor Razgon. Complexity analysis of generalized and fractional hypertree decompositions. CoRR, abs/2002.05239, 2020.
  • [Grohe and Marx2014a] Martin Grohe and Dániel Marx. Constraint solving via fractional edge covers. ACM Trans. Algorithms, 11(1):4:1–4:20, 2014.
  • [Grohe and Marx2014b] Martin Grohe and Dániel Marx. Constraint solving via fractional edge covers. ACM Trans. Algorithms, 11(1):4:1–4:20, 2014.
  • [Grohe2007] Martin Grohe. The complexity of homomorphism and constraint satisfaction problems seen from the other side. J. ACM, 54(1):1:1–1:24, 2007.
  • [Hell and Nesetril1990] Pavol Hell and Jaroslav Nesetril. On the complexity of H-coloring. J. Comb. Theory, Ser. B, 48(1):92–110, 1990.
  • [Impagliazzo et al.2001] Russell Impagliazzo, Ramamohan Paturi, and Francis Zane. Which problems have strongly exponential complexity? J. Comput. Syst. Sci., 63(4):512–530, 2001.
  • [Kolaitis and Vardi2000] Phokion G. Kolaitis and Moshe Y. Vardi. Conjunctive-query containment and constraint satisfaction. J. Comput. Syst. Sci., 61(2):302–332, 2000.
  • [Kumar1992] Vipin Kumar. Algorithms for constraint-satisfaction problems: A survey. AI Magazine, 13(1):32–44, 1992.
  • [Maier1983] David Maier. The Theory of Relational Databases. Computer Science Press, 1983.
  • [Marx2011] Dániel Marx. Tractable structures for constraint satisfaction with truth tables. Theory Comput. Syst., 48(3):444–464, 2011.
  • [Marx2013] Dániel Marx. Tractable hypergraph properties for constraint satisfaction and conjunctive queries. J. ACM, 60(6):42:1–42:51, 2013.
  • [Narváez2018] David E. Narváez. Constraint satisfaction techniques for combinatorial problems. In Proceedings of the Thirty-Second AAAI Conference on Artificial Intelligence, (AAAI-18), the 30th innovative Applications of Artificial Intelligence (IAAI-18), and the 8th AAAI Symposium on Educational Advances in Artificial Intelligence (EAAI-18), New Orleans, Louisiana, USA, February 2-7, 2018, pages 8028–8029, 2018.
  • [Robertson and Seymour1986] Neil Robertson and Paul D. Seymour. Graph minors. II. algorithmic aspects of tree-width. J. Algorithms, 7(3):309–322, 1986.
  • [Sagiv and Yannakakis1980] Yehoshua Sagiv and Mihalis Yannakakis. Equivalences among relational expressions with the union and difference operators. J. ACM, 27(4):633–655, 1980.
  • [Sauer1972] Norbert Sauer. On the density of families of sets. J. Combinatorial Theory (A), 13(1):145–147, 1972.
  • [Vapnik and Chervonenkis1971] Vladimir Vapnik and Alexey Chervonenkis.

    On the uniform convergence of relative frequencies of events to their probabilities.

    Theory Probab. Appl., 16:264–280, 1971.
  • [Zhuk2017] 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, 2017, pages 331–342, 2017.

Appendix A Full Proofs for Section 3

Definition 3.

let be the class of all relational structures. We call a function core minimal if it is invariant under isomorphisms and for any : .

Lemma 5.

Fix , and let be a core minimal function. For each relational structure the following are equivalent:

  1. There exists a homomorphically equivalent to with .

  2. .


The core of is always homomorphically equivalent to and therefore the upward implication follows. For the downward implication we have by the virtue of being core minimal. If is homomorphically equivalent to , then their cores must be isomorphic, thus . ∎

Lemma 6.

A function is core minimal if and only if for all structures we have that .


The implication from left to right is immediate from Lemma 5. For the other direction we observe that for any structure where we have by definition. Thus, from we see . ∎

A homomorphism for hypergraphs is a mapping s.t. if , then . Function application is extended to hyperedges and sets of hyperedges in the usual, element-wise, fashion: for instance, for , we write to denote . Likewise, for , we write to denote . Note that if two structures are homomorphic, then also their associated hypergraphs are homomorphic, while the converse is, in general, not true.

Lemma 7.

Let and be two hypergraphs and let be a homomorphism from to . Given a fractional edge cover of , define s.t.

Then is a fractional edge cover of with the same total weight as .


We will write for the set of all incident edges of a vertex . We first show that is fractional edge cover. In an initial step we show that for every , the weight of edges in will always be greater or equal to the weight of . We will (briefly) abuse notation and write when we in fact refer to the union of all the preimages, i.e., the set of all the edges that map to edges in . It is then easy to observe and, therefore, we also have

Now, choose an arbitrary and any . In combination with our previous observation we can then conclude:

The leftmost inequality holds, because . The rightmost inequality holds, because we are assuming that is a fractional edge cover of . We have thus shown that covers . Since was arbitrarily chosen, we conclude that is a fractional edge cover of .

To see that the total weights of both covers are the same, observe:

The right equality follows from the fact that every edge of is present in exactly one set . ∎

Lemma 8.

The fractional edge cover number of a relational structure is core minimal.


Let be the hypergraph of and be the hypergraph of . Since there is a surjective homomorphism from to , there exists a surjective homomorphism from to . Then, by Lemma 7, for any fractional edge cover of there exists a cover of with equal weight. ∎

Lemma 9.

The functions , , and are core minimal.


Let be a relational structure and an endomorphism from to . W.l.o.g., we may assume for all . This can be seen as follows: suppose that does not hold for all . Clearly, restricted to must be a variable renaming. Hence, there exists the inverse variable renaming . Now set . Then is the desired endomorphism from to with for all .

Let denote the hypergraph of and the hypergraph of . Furthermore, let be a tree decomposition of . Then we create with the same structure as the original decomposition and . This gives us a tree decomposition of : for every edge with , also holds, because . Removing vertices completely from a decomposition cannot violate the connectedness condition. Actually, some bags might become empty but this is not problematic: either we simply allow empty bags in the definition of the various notions of width; or we transform by deleting all nodes with empty bag from and append every node with a non-empty bag as a (further) child of the nearest ancestor node with non-empty bag.



We show that if has -width , then has -width : By assumption, there is a fractional edge cover of every set with weight . By Lemma 7, there exists a cover of with weight . What is left to show is that also covers . Recall, that for any and therefore . It then becomes easy to see that

and in consequence clearly also covers .

subw (and adw):

Let and be the sets of monotone, edge-dominated, submodular functions on and respectively. We show that for every there exists , such that -width-width:

Consider an arbitrary monotone, edge-dominated, submodular function with . This function can be extended to a monotone, edge-dominated, submodular function on by setting