Abstract 1 Introduction 2 Preliminaries 3 Homomorphisms and {,×}-Circuits 4 Lower Bounds for {,×}-Circuits via Rectangle Covers 5 Tight Lower Bounds for the Bounded Arity Case 6 Submodular Width Lower Bound 7 Conclusions References

Factorised Representations of Join Queries:
Tight Bounds and a New Dichotomy

Christoph Berkholz ORCID Technische Universität Ilmenau, Germany Harry Vinall-Smeeth ORCID RWTH Aachen University, Germany
Abstract

A common theme in factorised databases and knowledge compilation is the representation of solution sets in a useful yet succinct data structure. In this paper, we study the representation of the result of join queries (or, equivalently, the set of homomorphisms between two relational structures). We focus on the very general format of {,×}-circuits – also known as d-representations or DNNF circuits – and aim to find the limits of this approach.

In prior work, it has been shown that there always exists a {,×}-circuit of size NO(𝗌𝗎𝖻𝗐) representing the query result, where N is the size of the database and 𝗌𝗎𝖻𝗐 the submodular width of the query. If the arity of all relations is bounded by a constant, then 𝗌𝗎𝖻𝗐 is linear in the treewidth 𝗍𝗐 of the query. In this setting, the authors of this paper proved a lower bound of NΩ(𝗍𝗐ε) on the circuit size (ICALP 2023), where ε>0 depends on the excluded grid theorem.

Our first main contribution is to improve this lower bound to NΩ(𝗍𝗐), which is tight up to a constant factor in the exponent. Our second contribution is a NΩ(𝗌𝗎𝖻𝗐1/4) lower bound on the circuit size for join queries over relations of unbounded arity. Both lower bounds are unconditional lower bounds on the circuit size for well-chosen database instances. Their proofs use a combination of structural (hyper)graph theory with communication complexity in a simple yet novel way. While the second lower bound is asymptotically equivalent to Marx’s conditional bound on the decision complexity (JACM 2013), our NΘ(𝗍𝗐) bound in the bounded arity setting is tight, while the best conditional bound on the decision complexity is NΩ(𝗍𝗐/log𝗍𝗐). Note that removing this logarithmic factor in the decision setting is a major open problem.

Keywords and phrases:
join queries, homomorphisms, factorised databases, succinct representation, knowledge compilation, lower bounds
Funding:
Harry Vinall-Smeeth: Funded by the European Union (ERC, SymSim, 101054974). Views and opinions expressed are however those of the author(s) only and do not necessarily reflect those of the European Union or the European Research Council. Neither the European Union nor the granting authority can be held responsible for them.
Copyright and License:
[Uncaptioned image] © Christoph Berkholz and Harry Vinall-Smeeth; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Database theory
Related Version:
Full Version: https://arxiv.org/abs/2503.20438
Funding:
This work was funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) project number 414325841.
Editors:
Balder ten Cate and Maurice Funk

1 Introduction

A central topic in factorised databases is the succinct representation of query results in a data structure that enables efficient access, ranging from counting, sampling or enumerating the result tuples to complex analytical tasks. We study the question: how succinctly can the result of a join query be represented? Of course, the answer depends on the representation format under consideration. For the flat representation (listing all result tuples), the answer is given by the AGM-bound [5]: in the worst case a join query produces Θ(Nρ) tuples, where ρ is the fractional edge cover number of the query and N the size of the database. However, using suitable data structures, much more efficient representations are possible.

In this paper, we consider {,×}-circuits (originally called d-representations), which are the most general representation format studied so far and lead to the most succinct representations. In a nutshell, the idea is to decompose the result relation using union and Cartesian product, where representations of intermediate relations may also be re-used. The representation can be viewed as a circuit consisting of - and ×-gates, where each gate “computes” a relation and the output gate produces the query result. These {,×}-circuits are closely related to DNNF circuits from the field of knowledge compilation, which primarily deals with succinct representations of Boolean functions. The interaction between database theory and knowledge compilation has already been quite fruitful and we invite the reader to consult the recent exposition of Amarilli and Capelli [2] for an overview. Our main results emerge from this connection as we use structural properties of join queries as well as methods from knowledge compilation to obtain bounds on the representation size.

Example 1.

Evaluating φ(x,y,z,w)=R(x,y,z)E(x,w)E(w,y) on a database D with

RD:= {a,b,c,d}×{r}×{a,b,c,d}{s,t}×{a,b,c,d}×{s,t}
ED:= {a,b,c,d}×{r,t}{r,s}×{a,b,c,d}{t}×{e,f,g,h}{e,f,g,h}×{s}.

D consists of N=56 tuples and the query result Q(D) consists of 48 tuples, as follows.

x y z w x y z w x y z w x y z w x y z w x y z w x y z w x y z w x y z w x y z w x y z w x y z w
a r a r b r a r c r a r d r a r s a t a s b t a s c t a s d t a t a s e t b s e t c s e t d s e
a r b r b r b r c r b r d r b r s a t b s b t b s c t b s d t b t a s f t b s f t c s f t d s f
a r c r b r c r c r c r d r c r s a t c s b t c s c t c s d t c t a s g t b s g t c s g t d s g
a r d r b r d r c r d r d r d r s a t d s b t d s c t d s d t d t a s h t b s h t c s h t d s h

Q(D) can be succinctly represented by the following {,×}-circuit with 9 internal gates and 26 inputs.111For simplicity the gates have fan-in larger than 2 in this example, see Remark 6. The three ×-gates correspond to the three blocks from the table.

It will be convenient to view join query evaluation as a homomorphism problem, where the goal is to compute/represent the set Hom(𝒜,) of homomorphisms between a left-hand-side structure 𝒜, corresponding to a join query, and a right-hand-side structure , modelling a relational database. Moreover, we are interested in the classical data complexity setting, where 𝒜 is considered to be fixed and we measure the complexity in terms of the size N of . The investigation of this setting was initiated by Olteanu and Závodný [42], who showed that Hom(𝒜,) admits {,×}-circuits of size O(N𝖿𝗁𝗍𝗐(𝒜)), where 𝖿𝗁𝗍𝗐(𝒜) is the fractional hypertree width of 𝒜. It turns out that the obtained circuits have the additional properties of being structured and deterministic,222We use established terminology from knowledge compilation here, the original name is deterministic d-representations respecting a d-tree; these are a special case of deterministic, structured {,×}-circuits. which in particular allows us to exactly count the number of result tuples. It also follows from [37, 10] that for arbitrary small δ>0, there always exist general {,×}-circuits of size O(N(1+δ)𝗌𝗎𝖻𝗐(𝒜)) that represent all homomorphisms, where 𝗌𝗎𝖻𝗐(𝒜) is the submodular width of 𝒜. These representations can in particular be used for constant delay enumeration [10] and approximate counting [39].

The authors of this paper recently made progress on lower bounds [12], by showing that if the arity of all relations is bounded by some global constant, then there is an ε>0 such that for every 𝒜 and N there are structures of size N such that any {,×}-circuit representing Hom(𝒜,) has size NΩ(𝗍𝗐(𝒜)ε), where 𝗍𝗐(𝒜) is the treewidth of 𝒜. Note that in this bounded-arity-setting (one may also just think of graphs) we have 𝗍𝗐(𝒜)𝖿𝗁𝗍𝗐(𝒜)𝗌𝗎𝖻𝗐(𝒜), whereas in general one may have 𝗍𝗐(𝒜)𝖿𝗁𝗍𝗐(𝒜)𝗌𝗎𝖻𝗐(𝒜).333More precisely, they disagree only by a factor of r on r-ary structures. In general, structures can have constant 𝗌𝗎𝖻𝗐 (𝖿𝗁𝗍𝗐) and unbounded 𝖿𝗁𝗍𝗐 (𝗍𝗐) [36].

Theorem 2.

Let r be an integer. Then there is an ε>0 such that for every structure 𝒜 of arity at most r there exist arbitrarily large structures such that any {,×}-circuit for Hom(𝒜,) has size at least Bε𝗍𝗐(𝒜).

Our second main result provides the first lower bound when the arity is unrestricted. Here we show that the submodular width bound is almost optimal.

Theorem 3.

There is an ε>0 such that for every structure 𝒜 there exist arbitrarily large structures such that any {,×}-circuit for Hom(𝒜,) has size at least Bε𝗌𝗎𝖻𝗐(𝒜)1/4.

Techniques.

We deploy a similar “recipe” for proving both of our main results. We begin with a known characterisation of what it means for a structure 𝒜 to have high x-width, for x{tree, submodular}. In both cases, the characterisation is of the form “there is a subset of the universe of 𝒜 which is highly connected”. What highly connected means depends on the notion of width but the idea is that this subset is hard to disconnect, for instance by removing vertices or edges. Next we have to define some bad instance: that is some structure such that there is no small {,×}-circuit for Hom(𝒜,). We do this by using randomness. This is relatively straightforward for Theorem 2; we first describe this proof on a high level.

For this we use the characterisation of treewidth in terms of a highly connected set from [43, 44]. This characterisation is also used by Marx to prove a conditional lower bound in the decision setting [35]. He showed that every graph with high treewidth has high “embedding power” and can therefore efficiently simulate a 3-SAT instance. Thus, under an assumption about how quickly 3-SAT can be solved, Marx obtains conditional lower bounds on the decision problem which are tight up to a logarithmic factor in the exponent. As we do not need to use embeddings we obtain lower bounds in our setting which are tight up to a constant in the exponent.

Since the arity is bounded, it turns out that the main step reduces to the special case where 𝒜 is a graph. Here we can set to be a random graph where each edge is included independently with probability a half. There are two key ideas. First, the set Hom(𝒜,) is big; this is essential otherwise we can get a small representation with a trivial circuit which lists every homomorphism. Second, contains (with high probability) no big bicliques. Intuitively, this makes it hard for a {,×}-circuit to significantly “compress” Hom(𝒜,).

We deployed a similar idea in [12] to prove a lower bound where the left-hand structure is a complete graph. The reason we can in general improve the dependence on the treewidth compared with [12] is that we use a different method to lower bound the size of circuits; we deploy a framework based on tools from communication complexity that has been successfully deployed in knowledge compilation, see e.g. [6, 17, 14, 24, 47], since its introduction in [15]. Using this framework we do not directly reason about circuits – as is done in [12] – but instead about sets of combinatorial rectangles (see Section 4). This allows us to directly reason about each left-hand-side instance 𝒜; in contrast in our previous work we only directly reason about the case where 𝒜 is a k-clique and then perform a series of reductions which crucially rely on the Excluded Grid Theorem of Robertson and Seymour [45]. We show that if we partition the vertices of a high treewidth graph 𝒜, such that the highly connected set is evenly split between the two sides of the partition, then there must be a large number of edges crossing the partition. This is the key to us proving our lower bound.

The proof of Theorem 3 follows a similar pattern but we have to be more careful about defining our “bad instances”, since we are now working with higher arity structures. In particular, we have to control the size of each relation in since if they get too big compared to |Hom(𝒜,)| it will destroy the lower bound. To do this we exploit the existence of a highly connected set in 𝒜 and use this explicitly in our construction of . Here we use the same characterisation of highly connectedness used in [37] to reason about the decision setting.

Further related work.

Knowledge compilation originally emerged as a sub-field of artificial intelligence concerned with the efficient representation of Boolean functions [23]. Within recent years, concepts from this area have been applied more widely, particularly within database theory (again see the survey [2]) and the related area of constraint satisfaction [12, 9, 34, 38, 3]. An advantage of this approach is that if we can represent our query answer as a (particular type of) {,×}-circuit, then we can leverage known results to perform e.g. enumeration [42, 1], sampling [46], direct access [18] or (approximate) (weighted) counting [32, 4, 39] efficiently.444Note that while some of these results are only shown for circuits computing sets of Boolean functions, as is observed in the survey [2], it is straightforward to adapt them to our more general setting. These circuits (and variants) have proved useful for many other aspects of database theory: for instance for MSO queries [1], incremental view maintenance [7, 40], probabilistic databases [31] and representing query provenance [41].

Recent work [33, 25, 26, 13] studies the algebraic circuit size for sum-product polynomials over some semiring. While algebraic circuits are generally incomparable to {,×}-circuits, it turns out that multilinear circuits over the Boolean semiring considered in [25, 26] can be translated to {,×}-circuits with only a polynomial blow-up, but not vice versa. In this sense, our lower bounds hold in a strictly more general model and also imply lower bounds for these algebraic circuits, see the full version.

As observed by Feder and Vardi [27] the problem of deciding if there is a homomorphism between two relational structures 𝒜 and is a generalisation of the constraint satisfaction problem. Given the generality of this problem it is unsurprisingly NP-complete. Therefore, research has focused on finding tractable restrictions, where we demand 𝒜𝖠 and 𝖡 for classes of structures 𝖠,𝖡; we denote this problem by 𝖧𝖮𝖬(𝖠,𝖡). If we set 𝖠 to be the class of all structures _ then we have a complete (conditional) understanding of when we have polynomial time tractability for 𝖧𝖮𝖬(_,𝖡) [16, 48].

However, for left-hand-side restrictions, where we set 𝖡=_ and ask for what 𝖠 we have polynomial time solvability, no dichotomy is known. Still, a lot of work has been done on such restrictions. If 𝖠 has bounded arity we know that 𝖧𝖮𝖬(𝖠,_) is in polynomial time iff there is a constant bounding the treewidth of the homomorphic core of every structure in 𝖠 [28, 35]. Moreover, for the counting variant the criterion is that 𝖠 has bounded treewidth [20]. In the general case, we do have a conditional dichotomy in the parametrised setting: there the correct criterion is that 𝖠 has bounded submodular width [37]. Our main results imply comparable dichotomy results for the problem of representing Hom(𝒜,) by a {,×}-circuit; see Section 3.1 for more details.

2 Preliminaries

Functions and Sets.

For n, we write [n]:={1,,n}. Given a set S we write 𝒫(S) to denote the power set of S. Whenever writing a¯ to denote a k-tuple, we write ai to denote its i-th component; i.e., a¯=(a1,,ak). Moreover, we write a~ to denote the set {a1,,ak}. For a function f:XY and XX we write fX to denote the restriction of f to X, i.e. fX:XY is defined by xf(x) for all xX. We extend this operation to a set of such functions F by setting FX:={fXfF}. Given disjoint sets X,X and two functions f:XY,g:XY we define f×g:XXYY by:

(f×g)(x)={f(x)xXg(x)xX.

We will often combine two sets of functions pairwise in this way. Formally, for a set S of functions with domain X and a set T of functions with domain X we define S×T:={f×gfS,gT}. We also use × to denote Cartesian product in the normal sense; we can overcome this seeming mismatch by viewing a function f:XD as a tuple with coordinates in bijection with X such that the x-th coordinate is f(x).

Graphs and Hypergraphs.

A hypergraph =(V,E) is a pair, consisting of a finite set of vertices V and a finite set of edges E2V. If |e|=2, for every eE, we say that is a graph. Via this definition we are implicitly assuming that all graphs are undirected and simple, i.e., that they do not contain self-loops. We write 𝒦k for the complete graph on k vertices, which we also call the k-clique. Given a hypergraph =(V,E) and a subset XV, an edge cover of X is a set SE such that for all vX there is some eS with ve. A fractional edge cover of X is the natural fractional relaxation, i.e. a function s:E[0,1], such that for every vX, we have that evs(e)1. We write 𝗐𝖾𝗂𝗀𝗁𝗍(s):=eEs(e). Then ρ(X) – the fractional edge cover number of X – is defined to be the minimum of 𝗐𝖾𝗂𝗀𝗁𝗍(s) over all fractional edge covers of X.

We extend functions f:V0 to subsets of XV in the natural way, i.e.​ by setting f(X)=vXf(v). A fractional independent set of is a map μ:V[0,1], such that for every eE, veμ(v)1; or equivalently μ(e)1 for every eE. Note that by LP duality the weight μ(V) of a maximal fractional independent set μ agrees with the weight of a minimal fractional edge cover. Now let 𝐒() be the set of all functions f:𝒫(V)0 with f()=0 that satisfy the following properties:

  1. 1.

    Monotonicity: f(S)f(T) for all STV,

  2. 2.

    Edge dominatedness: f(e)1 for every eE, and

  3. 3.

    Submodularity: f(S)+f(T)f(ST)+f(ST) for every S,TV.

Observe that for every fractional independent set μ of we have μ𝐒().

Width Measures.

A tree decomposition of a hypergraph is a pair (𝒯,β) where 𝒯 is a tree and β:V𝒯𝒫(V) associates to every node tV𝒯 a bag β(t) such that:

  1. 1.

    for every vV the set {tV𝒯vβ(t)} is a non-empty connected subset of V𝒯 and

  2. 2.

    for every eE there is some tV𝒯 such that eβ(t).

We write 𝖳() for the set of all tree decompositions of . The width of a tree decomposition is maxtV𝒯|β(t)|1 and the treewidth of is the minimum width of all (𝒯,β)𝖳(). Note that the 1 in the definition of treewidth is there to ensure that trees have treewidth one.

From an algorithmic point of view, the idea of treewidth is that we can perform various bottom-up computations on the tree decomposition. Since we only consider one bag at a time, if the bags are small this can allow for efficient algorithms on small treewidth hypergraphs for problems which are in general intractable. For this, and other reasons, treewidth has become an incredibly influential concept and has inspired many more sophisticated notions of width, see [30] for a survey.

Two such measures are relevant in this paper: fractional hypertree width and submodular width. The fractional hypertree width of a tree decomposition (𝒯,β) is defined to be the maximum value of ρ(β(t)) over all tV𝒯. The fractional hypertree width of a hypergraph is the minimum fractional hypertree width over all tree decomposition of , in symbols

𝖿𝗁𝗍𝗐():=min(𝒯,β)𝖳()maxtV𝒯ρ(β(t)).

So if has low fractional hypertree width then there is a tree decomposition where every bag has small fractional edge cover number.

The definition of submodular width is slightly more involved: if has low submodular width then for every f𝐒() there is a tree decomposition where every bag evaluates to a small number under f. To be precise, the submodular width of is defined to be

𝗌𝗎𝖻𝗐():=supf𝐒()min(𝒯,β)𝖳()maxtV𝒯f(β(t)).

From the definitions, one can see that 𝗍𝗐()+1𝖿𝗁𝗍𝗐(). Moreover, Marx proved that 𝖿𝗁𝗍𝗐()𝗌𝗎𝖻𝗐() [37, Proposition 3.7.].

Structures and Homomorphisms.

A (relational) signature σ is a set of relation symbols R, each equipped with an arity r=r(R). We assume all signatures are finite. A (finite, relational) σ-structure 𝒜 consists of a finite set A (the universe of 𝒜) and relations R𝒜Ar for every r-ary relation symbol Rσ. The size of 𝒜 is defined to be 𝒜:=Rσ|R𝒜| and the arity of 𝒜 is the maximum arity of all relations in σ.

The Gaifman graph of 𝒜 is the graph with vertex set A and edges {u,v} for any distinct u,v that occur together in a tuple of a relation in 𝒜. We say 𝒜 is connected if its Gaifman graph is connected and we will henceforth assume that all structures are connected. All of our results can be easily extended to disconnected structures. The hypergraph of a σ-structure 𝒜 is a hypergraph with vertex set A such that eA is an edge iff there is a tuple e¯R𝒜 for some Rσ, such that e~=e.

For x{tree, fractional hypertree, submodular}, the x-width of a structure is the x-width of its hypergraph. For a class of structures 𝖠, we write 𝗍𝗐(𝖠):=sup𝒜𝖠𝗍𝗐(𝒜), which may be infinite. If 𝗍𝗐(𝖠) is finite we say that 𝖠 has bounded treewidth, otherwise we say it has unbounded treewidth. We define the analogous notions for fractional hypertree and submodular width. It is known that there are classes of structures with bounded fractional hypertree width but unbounded treewidth [29] and a class of structures with bounded submodular width but unbounded fractional hypertree width [36]. If there is some integer r such that every structure in 𝖠 has arity at most r, we say that 𝖠 has bounded arity. In this case, 𝖠 has bounded treewidth iff 𝖠 has bounded fractional hypertree width iff 𝖠 has bounded submodular width.

Finally, a homomorphism from 𝒜 to is a function h:AB that preserves all relations, i.e., for every r-ary Rσ and a¯=(a1,,ar)R𝒜 it holds that h(a¯):=(h(a1),,h(ar))R. We write Hom(𝒜,) for the set of all homomorphisms from 𝒜 to .

3 Homomorphisms and {,×}-Circuits

In this section, we define {,×}-circuits and explain how they can be used to represent sets of homomorphisms. We roughly follow the presentation of Amarilli and Capelli [2]. Let (X,D) be a pair of finite sets. Then a {,×}-labelled DAG over (X,D) is a vertex-labelled directed acyclic graph with a unique sink such that every internal (i.e.​ non-source) node has fan-in two and is labelled by either × or and every source is labelled with an expression of the form xd, where xX and dD. We call the set X the variables and the set D the domain. We call nodes labelled by {,×} -gates and sources input-gates or just inputs.

For 𝙲 a {,×}-labelled DAG over (X,D) and g a node of 𝙲, we say that a variable xX occurs below g if there is an input node g labelled with xd for some dD, such that there is a directed path from g to g in 𝙲. We write 𝗏𝖺𝗋(g) for the set of variables occurring below g and 𝗏𝖺𝗋(𝙲) for the set of all variables occurring in the DAG. With these notions in hand we can now define the main representation format studied in this paper.

Definition 4 ({,×}-circuit).

A {,×}-circuit over (X,D) is a {,×}-labelled DAG 𝙲 over (X,D) with 𝗏𝖺𝗋(𝙲)=X such that

  1. 1.

    for every ×-gate g in 𝙲 with children g1,g2 we have 𝗏𝖺𝗋(g1)𝗏𝖺𝗋(g2)=, and

  2. 2.

    for every -gate g in 𝙲 with children g1,g2 we have 𝗏𝖺𝗋(g1)=𝗏𝖺𝗋(g2).

Figure 1: A deterministic {,×}-circuit computing the set of all homomorphisms from 𝒢 to .

Such circuits compute a set of mappings from XD bottom up by taking unions at -gates and Cartesian products at ×-gates. Conditions (1) and (2), called decomposability [21] and smoothness respectively in the knowledge compilation literature, ensure this process is well-defined. Formally, we define the semantics of {,×}-circuit 𝙲 by associating with each gate g the set of functions computed by the subcircuit of 𝙲 rooted at g. We define this as follows.

S(g):={{xd}g is an input gate labelled with xd.S(g1)×S(g2)g is a ×-gate with children g1,g2.S(g1)S(g2)g is a -gate with children g1,g2.

Note that in the ×-gate case, S(g1)×S(g2)={f×gfS(g1),gS(g2)} is well-defined by (1). Moreover, by (2) we obtain that every function in S(g) has domain 𝗏𝖺𝗋(g). We write S(𝙲):=S(s) where s is the unique sink of 𝙲. This leads to the following.

Definition 5.

Let 𝒜, be structures and 𝙲 be a {,×}-circuit over (A,B). Then we say that 𝙲 computes Hom(𝒜,) if S(𝙲)=Hom(𝒜,).

As in the above definition, if a {,×}-circuit computes Hom(𝒜,) then we always assume that X=A and D=B. We define the size of 𝙲, a {,×}-circuit, to be the number of vertices in the underlying graph and denote this by |𝙲|.

A {,×}-circuit 𝙲 is deterministic if the subcircuits rooted at the children of every -gate compute disjoint sets of functions [22]. Formally, we require that for every -gate g𝙲, with children g1,g2, we have that S(g1)S(g2)=. Given a deterministic {,×}-circuit 𝙲 one can compute |S(𝙲)| in linear time by going bottom up in the circuit, adding at every -gate and multiplying at every ×-gate.

 Remark 6.

Our stipulation that {,×}-circuits are fan-in two is mainly a matter of taste since these circuits can simulate arbitrary fan-in circuits with only a quadratic size blow up. We make this choice since it is more convenient for proving lower bounds (see Section 4) but Theorems 2 and 3 also hold – via this quadratic simulation – for unbounded fan-in {,×}-circuits. Similarly smoothness – condition (2) in our definition of {,×}-circuits – is only enforced for convenience; one can get a sensible representation format without this condition, see e.g. [2]. Moreover, one can turn an “unsmooth” {,×}-circuit into an equivalent smooth one in quadratic time [23].

3.1 Upper Bounds On Representation Size

We now formally define the problem studied in this paper. Given a class of structures 𝖠 the problem {,×}-𝖧𝖮𝖬(𝖠,_) is, given 𝒜𝖠 and a second structure as input, to produce a {,×}-circuit computing Hom(𝒜,). In the rest of this section we lay out the state of the art for this problem starting with the following result by Olteanu and Závodný.

Theorem 7 ([42]).

If 𝖠 has bounded fractional hypertree width then {,×}-𝖧𝖮𝖬(𝖠,_) is polynomial time solvable. More precisely, given structures 𝒜, and 𝒯𝖳(𝒜) with fractional hypertree width w, we can construct a deterministic {,×}-circuit computing Hom(𝒜,) of size O(𝒜2w) in time O(𝗉𝗈𝗅𝗒(𝒜)wlog(B)).

Since the above algorithm outputs a deterministic {,×}-circuit this allows us to compute |Hom(𝒜,)| in polynomial time given that 𝒜 has bounded fractional hypertree width. Moreover, the output circuit also admits efficient algorithms for enumeration [42, 1], sampling [46] and direct access [18].

In the bounded arity setting, classes of bounded fractional hypertree width (= classes of bounded treewidth) are the only classes where {,×}-𝖧𝖮𝖬(𝖠,_) is polynomial time solvable. This follows from a lower bound proved in our previous work.

Theorem 8 ([12]).

Let r be an integer. Then there is an ε>0 such that for every structure 𝒜 of arity at most r there exist arbitrarily large structures such that any {,×}-circuit for Hom(𝒜,) has size at least B𝗍𝗐(𝒜)ε.

Our Theorem 2 improves the exponent to Ω(𝗍𝗐(𝒜)). This shows that – on classes of bounded arity structures – the algorithm from Olteanu and Závodný is optimal, in that we cannot improve the exponent by more than a constant factor.

 Remark 9.

The constant ε>0 in Theorem 8, satisfies ε<1/9. This is based on the tightest bounds we currently have for the Excluded Grid Theorem [45, 19]. Improved bound for the Excluded Grid Theorem would imply a higher value of ε. However, even if the current best lower bound [45] on the Excluded Grid Theorem turned out to be tight this would only imply that ε12. Thus to obtain the tight lower bounds of Theorem 2 we need to develop different techniques to circumvent the Excluded Grid Theorem.

When we do not impose a bound on the arity the situation is much less understood; we do not even have a good understanding of when 𝖧𝖮𝖬(𝖠,_) is polynomial time solvable. We have a better grasp if we allow FPT running times, i.e.​ one that may depend arbitrarily on 𝒜 but only polynomially on . In this setting, {,×}-𝖧𝖮𝖬(𝖠,_) is tractable for some classes of structures with unbounded fractional hypertree width.

Theorem 10 ([37, 10]).

If 𝖠 has bounded submodular width then {,×}-𝖧𝖮𝖬(𝖠,_) is FPT time solvable. More precisely, for all structures 𝒜 and we can construct a {,×}-circuit computing Hom(𝒜,) of size O(g(𝒜)(1+δ)𝗌𝗎𝖻𝗐(𝒜)) in time h(𝒜)O(𝗌𝗎𝖻𝗐(𝒜)), where g,h are computable functions and δ>0 can be arbitrary small.

Note that [37, 10] do not mention {,×}-circuits; they are instead concerned with enumeration and decision algorithms respectively. But it is easy to adapt their algorithm to output the required circuit, see Appendix A in the full version of [11] for more details.

Our Theorem 3 implies that if 𝖠 has unbounded submodular width then there is no FPT time algorithm for {,×}-𝖧𝖮𝖬(𝖠,_). However, there is still a w1/4 vs w gap in the exponents. Another thing to note is that since the {,×}-circuits from Theorem 10 are not deterministic, the resulting representations of Hom(𝒜,) are not as useful algorithmically. Despite this, they can still be used to achieve constant delay enumeration with FPT preprocessing [10] and approximate counting in FPT time [39].

4 Lower Bounds for {,×}-Circuits via Rectangle Covers

In this section, we introduce a by now standard framework – pioneered in [15] – for proving lower bounds on {,×}-circuits and their subclasses: analysing rectangle covers. This enables us to reduce reasoning about complicated objects ({,×}-circuits) to simple ones (combinatorial rectangles). For this we need the following definition.

Definition 11.

Let X be a finite set, (Y,Z) a partition of X, and a set of functions with domain X. Then is a (Y,Z)-rectangle iff =Y×Z.

Example 12.

Let X={y,z}, Y={y} and Z={z}. Further let 1={f,g}, where f(y)=f(z)=0 and g(y)=g(z)=1. Then 1 is not a (Y,Z)-rectangle. To see this note that Y×Z contains the map {y0,z1}. On the other hand, the set of functions 2={ff:{y,z}{0,1}} is a (Y,Z)-rectangle.

Note that trivially every set of functions with domain X is a (X,)-rectangle. To get a non-trivial notion we introduce the notion of a balanced partition; that is a partition (Y,Z) of X such that min(|Y|,|Z|)|X|/3. We then say a set is a balanced rectangle, if it is a (Y,Z)-rectangle for some balanced partition (Y,Z). We say that a set of balanced rectangles {i}i is a balanced rectangle cover for Hom(𝒜,) if ii=Hom(𝒜,). The size of the balanced rectangle cover {i}i is defined to be ||, i.e. the number of rectangles in the cover. The following lemma shows that if there is a small {,×}-circuit computing Hom(𝒜,), then there is a small balanced rectangle cover for Hom(𝒜,).

Lemma 13 ([15, 9]).

Let 𝒜, be structures and let 𝙲 be a {,×}-circuit of size s computing Hom(𝒜,). Then there is a balanced rectangle cover of Hom(𝒜,) of size s.

Therefore, to prove lower bounds on {,×}-circuits it suffices to prove lower bounds on the size of balanced rectangle covers. This result was proven for Boolean functions in [15, Theorem 6] and extended to general sets of functions in [8, Lemma 26].

In fact, we need a slight generalisation of Lemma 13 that allows us to balance rectangles with respect to some weighting function f:𝒫(A)0 defined on subsets of the universe of 𝒜. To be precise, we say that a partition (X,Y) of A is f-balanced if min(f(X),f(Y))f(A)/3. We define the notions of an f-balanced rectangle and an f-balanced cover in the obvious way. To ensure the proof goes through we need an f which is sufficiently small on singletons and which is subadditive on disjoint subsets. That is on disjoint sets S,TA, it holds that f(ST)f(S)+f(T). See the full version for a proof.

Lemma 14.

Let 𝒜, be structures, 𝙲 be a {,×}-circuit computing Hom(𝒜,) and f:𝒫(A)0 be a function which is subadditive on disjoint subsets and satisfying f({a})2f(A)/3 for all aA. Then there is a f-balanced rectangle cover of Hom(𝒜,) of size |𝙲|.

Therefore, to prove lower bounds we will define for each 𝒜 a structure such that Hom(𝒜,) is large but the size of each f-balanced rectangle is small, for some appropriate function f. To upper bound the size of rectangles we use the following simple observation.

Observation 15.

Let be a set of functions with domain X. Then ||xX|{x}|.

5 Tight Lower Bounds for the Bounded Arity Case

In this section, we prove Theorem 2. We first show the result for graphs and then lift it to relational structures of bounded arity. To be precise, the main part of this section is devoted to the proof of the following theorem.

Theorem 16.

Let 𝒢 be a graph. Then there exist arbitrarily large graphs with n vertices and at least n2/8 edges such that any {,×}-circuit computing Hom(𝒢,) has size Ω(n𝗍𝗐(𝒢)9(1+δ)) for arbitrarily small δ>0.

To prove this result we use that every graph with high treewidth contains a set with no small balanced separator.

Definition 17 (Balanced Separator).

Let 𝒢=(V𝒢,E𝒢) be a graph and WV𝒢 be a non-empty set of vertices. Then we say that SV𝒢 is a balanced separator with respect to W, if |WC||W|/2 for every connected component C of V𝒢S. Further, a balanced separator S with respect to W is a balanced k-separator with respect to W if |S|k.

Lemma 18 ([43, 44]).

Let k and let 𝒢 be a graph with 𝗍𝗐(𝒢)>3k. Then there is some WV𝒢 with |W|=2k+1 having no balanced k-separator.

This lemma is also used in [35] to prove conditional lower bounds via fairly elaborate reductions. We are able to deploy Lemma 18 more directly and follow a similar proof strategy to [12]. A key difference is that we reason about rectangle covers rather than directly about the circuit. Our bad instances are the graphs given to us by the following lemma.

Lemma 19 ([12, Lemma 8]).

For every t, there exists some ct+ such that for every sufficiently large integer n there is a graph =(t,n) with n vertices, such that

  1. 1.

    has at least 18n2 edges,

  2. 2.

    contains no complete bipartite subgraph 𝒦a,a for a3log(n), and

  3. 3.

    the number of t-cliques in is at least ctnt.

So fix some graph 𝒢=(V𝒢,E𝒢) with 𝗍𝗐(𝒢)=w, |V𝒢|=t and let =(t,n) be as in Lemma 19. Our aim is to show that any {,×}-circuit computing Hom(𝒢,) has size nΩ(w). The strategy is to show that any balanced rectangle Hom(𝒢,) must be small. We do this by using the existence of a highly connected set W given to us by Lemma 18. To be precise, we choose WV𝒢 to be a set of size 2k+1 having no balanced k-separator.

In fact, we need to use a slight variant of the above strategy. For if has underlying partition (X,Y) with WX, then it seems hard to use the properties of W in a lower bound proof. To get around this problem we use Lemma 14, which recall is a weighted version of Lemma 13. Using this result we only have to consider rectangles which are balanced with respect to W. Formally, we say a partition (X,Y) of V𝒢 is W-balanced if min(|XW|,|YW|)|W|/3. In turn, a rectangle is W-balanced if its underlying partition is W-balanced. By Lemma 14, to prove Theorem 16 it suffices to show that any W-balanced rectangle Hom(𝒢,) is small. The key is that there is a large matching between the two sides of any W-balanced partition. To formally state this we need the following notion: given disjoint subsets X,YV𝒢 an (X,Y)-matching (in 𝒢) is a set of disjoint edges each of which has one endpoint in X and the other in Y.

Lemma 20.

Let k, 𝒢=(V𝒢,E𝒢) be a graph and W be a set of 2k+1 vertices of 𝒢 with no balanced k-separator. Suppose (X,Y) is a W-balanced partition of V𝒢. Then there is an (X,Y)-matching in 𝒢 of size k/3.

Proof.

Since (X,Y) is W-balanced we may assume w.l.o.g.​ that

2k+13|XW|k<|YW|4k+23.

Further suppose, for a contradiction, that there exists a set SV𝒢 of size 2k/3 such that removing S from 𝒢 disconnects X from Y. Then pick arbitrarily a set T of k/3 elements of (YW)S and add these to S to form a set S. Then |S|=k. We claim that S is a balanced separator with respect to W.

To see this, let C be a connected component of 𝒢S. Then either CX or CYT, by the assumption on S. If CX then |CW||XW|k. On the other hand if CYT then

|CW| |(YT)W|=|YW||T|4k+23k3=k+23

Since |CW| is an integer it follows that |CW|k. Therefore, S is indeed a balanced k-separator, a contradiction. So there is no such set S.

To construct we first choose any edge between X and Y and delete the two endpoints. We then choose an edge between X and Y in this new graph and repeat until X and Y become disconnected. By the above this leads to an (X,Y)-matching of size at least k/3. By exploiting this matching it is now not too hard to show that every W-balanced rectangle is small; the key is that one endpoint of every edge in the matching must have small image.

Lemma 21.

Let 𝒢=(V𝒢,E𝒢) be a t-vertex graph and WV𝒢 be a set of vertices of size 2k+1 with no balanced k-separator. Further, let =(t,n) be the graph given by Lemma 19, for some sufficiently big n and let Hom(𝒢,) be a W-balanced rectangle. Then ||ntk3[3log(n)]k3.

Proof.

Let (X,Y) be the underlying partition of . By Lemma 20, there is an (X,Y)-matching of size k/3. Let {x,y} with xX,yY. Further define,

Px :={uVh(x)=u, for some h},
Py :={uVh(y)=u, for some h}.

Then for every uPx and vPy, there is an edge in between u and v. To see this, let h,g with h(x)=u and g(y)=v. Hence hX×gYHom(𝒢,), since is an (X,Y)-rectangle. Therefore, since {x,y}E𝒢, we have that {h(x),g(y)}={u,v}E. It follows that either |Px|3log(n) or |Py|3log(n), since contains no 𝒦3log(n),3log(n) subgraph by Lemma 19(2). Moreover, by definition |Px|=|{x}| and |Py|=|{y}|.

Since the above holds for every {x,y}, there are at least k/3 vertices vV𝒢 such that |{v}|3log(n). The result follows by Observation 15. To infer Theorem 16, first observe that by Lemma 19(3), |Hom(𝒢,)|=Ω(nt). Here we use the fact that any mapping h:V𝒢V whose image is a clique is a homomorphism. Therefore, by Lemmas 14 and 21 the result follows; see the full version for details.

We next lift this to relational structures. We could do this similarly to the above. However, it is convenient to instead use the following reduction result from [12].

Lemma 22 ([12, Lemmas 14-16]).

Let a,r and let 𝒜 be a σ-structure with arity at most r. Let 𝒢 be the Gaifman graph of 𝒜 and suppose that there exists a graph such that any {,×}-circuit computing Hom(𝒢,) has size at least a. Then there is a σ-structure with and a function g such that any {,×}-circuit computing Hom(𝒜,) has size at least g(𝒜)2a/r.

Proof of Theorem 2.

Let 𝒢 be the Gaifman graph of 𝒜 and let N be an integer. Then since the treewidth of 𝒢 is the same as the treewidth of 𝒜 we may apply Theorem 16, to obtain a graph with nN vertices and at least n2/8 many edges such that any {,×}-circuit computing Hom(𝒢,) has size Ω(nw92)=Ω(w). Therefore, by Lemma 22, there is a σ-structure with N such that any {,×}-circuit for Hom(𝒜,) has size Ω(w), since r is a constant and by choosing n (and hence ) to be sufficiently big. Note that some form of dependence on the arity is necessary since there are classes of structures 𝖠 of unbounded treewidth such that solving {,×}-Hom(𝖠) is in polynomial time, e.g. classes of unbounded treewidth but bounded fractional hypertree width. Such classes must have unbounded arity; we next turn to this setting.

6 Submodular Width Lower Bound

In this section we prove Theorem 3. Our strategy is analogous to the one used in Section 5: we use the fact that high submodular width implies the existence of a “highly connected set”. However, the exact notion of highly connectedness is more complicated and we need to define our bad instances more carefully. As such we first make some preparations.

6.1 Preliminaries to the Proof

Fix a σ-structure 𝒜 and let =(𝒜)=(V,E) be the hypergraph of 𝒜. We use similar notation to [37]. A path P in is a sequence of vertices forming a path in the Gaifman graph of . The endpoints of the path are the first and last vertex in this sequence. For A,BV we say a path is an (A,B)-path if it starts in A and ends in B. Let 𝒫 denote the set of paths in . A flow of H is an assignment F:𝒫0 such that for every eE,

P𝒫PeF(P)1.

If F(P)>0, then we say that P appears in F or is a path of F. The value of F is P𝒫F(P). For A,BV a flow F is an (A,B)-flow if only (A,B)-paths appear in F. If F1,,Fk are flows then their sum is the mapping which assigns weight i=1kFi(P) to each path P. If this mapping happens to also be a flow then we say that the Fi are compatible.

For the characterisation of submodular width we will deploy the following notion is crucial. Let X1,,Xk be subsets of V. Then a uniform concurrent flow of value ϵ on (X1,,Xk) is a collection of compatible flows Fi,j, with 1i<jk such that Fi,j is an (Xi,Xj) flow of value exactly ϵ. If Xi is connected in then by choosing one path connecting each pair (Xi,Xj) and assigning this path weight 1/(k2) we obtain a uniform concurrent flow with value Ω(k2). The next theorem says that if has high submodular width then there is a “large” set which can be partitioned into cliques admitting a uniform concurrent flow with value beating the trivial k2 lower bound. This characterisation is obtained and used by Marx in [37] and follows from Theorem 5.1 and Lemmas 6.5 and 6.6 in that paper.

Theorem 23 ([37]).

Let 𝒜 be a relational structure with 𝗌𝗎𝖻𝗐(𝒜)=w and hypergraph =(V,E). Then there exists a set WV which can be partitioned into (K1,,Kk) where each Kie for some eE and k=Ω(w), such that there is a uniform concurrent flow of value Ω(k3/2) on (K1,,Kk).

Marx uses these flows to show that hypergraphs of high submodular width have high “embedding power”. We argue differently and more directly.

6.2 Lower Bound

6.2.1 Simplifying the Structures

In this section we show that in order to prove Theorem 3 it suffices to prove lower bounds for left-hand-side structures 𝒜 of a simple form. This is straightforward so we just describe the simplification here. See the full version for a proof of correctness.

We first need some definitions. Let τ be a signature and 𝒳,𝒴 be τ-structures. We say that 𝒴 is coordinate respecting (relative to 𝒳) if for every h,hHom(𝒳,𝒴) and every distinct x,xX it holds that h(x)h(x). In this case we define

𝖽𝗈𝗆𝒴(x):={yYh(x)=y for some hHom(𝒳,𝒴)}.

Note that 𝖽𝗈𝗆𝒴(x)𝖽𝗈𝗆𝒴(x) is empty for all xx. Since 𝒴 is normally clear from the context we often write 𝖽𝗈𝗆(x) for 𝖽𝗈𝗆𝒴(x).

Next let 𝒳 be a τ-structure such that every relation contains exactly one tuple. Let be a total order on X and t¯ be some r-tuple with coordinates in X. Moreover, suppose t¯ has i distinct coordinates. Then we define t¯ to be the unique i-tuple with t~=t~ whose coordinates are ordered by . Then if t¯ is the unique tuple in R𝒳 and if t¯ is an i-tuple we define R to be a fresh i-ary relation symbol and define τ:={RRσ}. Now we define the τ-structure 𝒳 to have universe X and such that R𝒳={t¯} where t¯ is the unique tuple in R𝒳. Moreover, we say that 𝒳 is order respecting if 𝒳=𝒳 for some total order .

Let 𝒴 be a τ-structure which is coordinate respecting relative to 𝒳. Then induces a partial order Y on Y as follows. For y1,y2Y, y1Yy2 iff there are distinct x1,x2X with y1𝖽𝗈𝗆(x1), y2𝖽𝗈𝗆(x2) and x1x2. We say that 𝒴 is order respecting relative to 𝒳 if for every Rτ and every t¯R𝒴, we have that tiYtj for all i<j.

To prove Theorem 3 it suffices to prove the following result, see the full version for details.

Theorem 24.

Let 𝒜 be an order respecting structure where every relation contains exactly one tuple. Then there exist arbitrarily large structures which are coordinate and order respecting relative to 𝒜 and such that any {,×}-circuit computing Hom(𝒜,) has size Ω(𝗌𝗎𝖻𝗐(𝒜)1/4).

In our proof of Theorem 24, we often want to go between sets and tuples. Of course, for every tuple a¯=(a1,,ar) there is a naturally corresponding set a~:={a1,,ar}. But in the other direction given a set there are many possible corresponding tuples. This is why it is nice to work with (𝒜,) respecting an order on A. Now for any SA, we define S to be the unique tuple respecting the order whose coordinates are the elements of S. We can similarly deploy this notation for any subset of B which is “colourful”, in the sense that no two of its elements appear in the same 𝖽𝗈𝗆(a) set.

6.2.2 Defining the Bad Instances

Towards proving Theorem 24, let σ be a signature and let 𝒜 be an order respecting σ-structure such that every relation in 𝒜 contains exactly one tuple. Let =(V,E) be the hypergraph of 𝒜. Further suppose 𝗌𝗎𝖻𝗐(𝒜)=w so that, by Theorem 23, there exists some WV which can be partitioned into (K1,,Kk) for some k=Ω(w), where each Ki is a clique such that there is a uniform concurrent flow F={Fi,j 1i<jk} of value ε=Ω(k3/2) on (K1,,Kk). The aim of this subsection is to define appropriate bad instances . Analogously to in the treewidth case we will use random instances. However, we need to carefully control how each vertex contributes to the number of homomorphisms from 𝒜. A crucial idea is to use the flow F to do this. Essentially we use F to define a fractional independent set which then allows us to define an instance with relations bounded by some constant N. This is similar in spirit to the upper bound of the “AGM bound” [5, Lemma 4] but we also sprinkle in some randomness to ensure hardness.

Concretely, let N be a sufficiently big integer, =(V,E) be the hypergraph of 𝒜 and for vV, let 𝒫v be the set of paths in that contain the vertex v. Define a map μ:V[0,1] by μ(v):=12P𝒫vF(P). Then for each vV we define disjoint sets of elements 𝖽𝗈𝗆(v) such that |𝖽𝗈𝗆(v)|=Nμ(v). The idea is that the size of log(|𝖽𝗈𝗆(v)|) is proportional to the weight of paths in F passing through v. We define the random structure induced by F with relations bounded by N as follows. For each relation Rσ, let v¯=(v1,,vr) be the unique tuple in R𝒜. Then R is a random subset of ×i=1r𝖽𝗈𝗆(vi), where each tuple is included independently with probability a half. Note that,

|R|i=1r|𝖽𝗈𝗆(vi)|=Nα,where α:=i=1rμ(vi).

Moreover, v~ is an edge of by definition. Since F is a flow we obtain that

veμ(v)=12veP𝒫vF(P)P𝒫,PeF(P)1.

Here we assume w.l.o.g.​ that each path appearing in F is minimal and therefore intersects each edge at most twice. Using this (non-standard) model of a random structure we can obtain an analogue to Lemma 19. There we showed that our bad instances did not contain any large complete bipartite subgraphs. The natural suggestion would be to look at the Gaifman graph of and show that it (with high probability) has no large complete bipartite subgraphs. However, the Gaifman graph of is very dense so this does not work. Instead the following definition gives us the analogous “badness” property in the relational setting.

Definition 25.

Let N be a positive integer, a σ-structure and Rσ with R×i[r]𝖽𝗈𝗆(vi) for some v¯ an r-tuple of vertices of . Then we say that R is N-scattered if for every partition of v~ (U,V), the following holds. For every S×vU𝖽𝗈𝗆(v) and T×vV𝖽𝗈𝗆(v), such that

{(s~t~)sS,tT}R

either |S|3log(N) or |T|3log(N).

The following lemma shows that the bad instances we need exist; it is proved by a simple probabilistic argument, see the full version for details.

Lemma 26.

There exists a constant c=c(A) such that for every sufficiently large integer N there exists a σ-structure =(N) which is coordinate and order respecting relative to 𝒜. Moreover, has universe vV𝖽𝗈𝗆(v), size AN and satisfies the following properties:

  1. 1.

    |Hom(𝒜,)|cNt, where t:=vVμ(v) and

  2. 2.

    for every Rσ,R is N-scattered.

6.2.3 Analysis

To argue about these instances we – similarly to in the treewidth case – reason about combinatorial rectangles with partitions balanced relative to the highly connected nature of 𝒜. To do this we use Lemma 14, for some appropriately chosen f. The natural choice seems to be to set f=μ. However, for technical reasons we instead use a closely related function α which is defined by

α(v):={0vW12j[k]{i}P𝒫vFi,j(P)vKi for some i[k]

The idea is twofold. First, we only take vertices of W into account for our balancing since this is the part of we know is “highly connected”. And second, we weight each vertex vW according to the sum of the weights of paths in F for which v is an endpoint. Trivially, α(v)μ(v) for every vV. We next observe that every Ki has equal weight under α.

Observation 27.

For every i[k], α(Ki):=δ=ε/2(k1). Moreover, α(W)=kδ.

So let (X,Y) be an α-balanced partition. This means that globally the weight of W under α is (up to a constant factor) evenly split between X and Y. However, this is not necessarily the case for each Ki. It could, for instance, happen that every Ki is either a subset of X or a subset of Y. We first analyse the case where there are many values of i such that the weight of Ki under α is roughly evenly split between X and Y. To formalise this we say that Ki is α-balanced for (X,Y) if

min(α(KiX),α(KiY))α(Ki)10=δ10.

It turns out that if a lot of the Ki are balanced then we can argue very similarly to in the proof of Theorem 2, see the full version for details.

Lemma 28.

Let (X,Y) be an α-balanced partition of V and let λ>0. Suppose that Ki is α-balanced for at least λk values of i. Then there is a constant c=c(λ)>0, such that every rectangle Hom(𝒜,) with underlying partition (X,Y) has size at most Ntck.

To finish the proof we have to deal with the case where almost every Ki is not α-balanced relative to (X,Y). The key is to argue that then there are many paths in F which cross from X into Y (or vice-versa). This is the core of the argument as it is where the flow is deployed. Note that in the extreme case where every Ki is either a subset of X or a subset of Y the argument is simple. For suppose KiX and KjY, then in particular every path with non-zero weight under Fi,j must at some point cross from X into Y. Moreover, since α(Ki)=δ for every i and since the partition (X,Y) is α-balanced we know that the number of Ki contained in X differs only by a constant factor from the number of Ki contained in Y. Therefore, the total weight of the paths crossing from X into Y is Θ(kδ)=Θ(k1/2); the result then follows by a similar calculation to in Lemma 28. In the more general case, where Ki can intersect both X and Y, a similar (if slightly more involved) argument works. We give the details in the full version.

Lemma 29.

Let λ>0 be sufficiently small and (X,Y) be an α-balanced partition of V, such that the number of α-balanced Ki is less than λk. Then there is a constant d=d(λ)>0 such that every Hom(𝒜,) with underlying partition (X,Y) has size Ntdk.

Theorem 24 – and therefore also Theorem 3 – is immediate.

Proof of Theorem 24.

Take from Lemma 26. Then |Hom(𝒜,)|cNt, where N, c and t are defined as in the lemma. On the other hand, by Lemmas 28 and 29 we know that every α-balanced rectangle with Hom(𝒜,) has size at most Ntεk, for some positive constant ε and some k=Ω(w); the result follows by Lemma 14.

7 Conclusions

Our main results are both proved using a framework which combines tools from communication complexity with structural (hyper)graph theory. Theorem 2 – an unconditional NΩ(𝗍𝗐(𝒜)) lower bound on {,×}-𝖧𝖮𝖬(𝖠,_) for bounded arity 𝖠 – shows that this framework can yield tight lower bounds. Moreover, our methods yield a much simpler proof than that of our previous (inferior) N𝗍𝗐(𝒜)ε lower bound [12]. Additionally, Theorem 3 – an exact characterisation of when {,×}-𝖧𝖮𝖬(𝖠,_) is FPT-time solvable – shows that our methods are robust enough to tackle more challenging (higher arity) settings.

This opens up a number of future directions. Firstly, there is the obvious task of closing the gap between the lower bounds of Theorem 3 and the upper bounds of Theorem 10. Secondly, can we use our methods to shed light on the polynomial time solvability of {,×}-𝖧𝖮𝖬(𝖠,_)? We know this is possible if 𝖠 has bounded fractional hypertree width and impossible if 𝖠 has bounded submodular width: can we give an exact characterisation? Thirdly, it would be interesting to study this problem for other representation formats.

References

  • [1] Antoine Amarilli, Pierre Bourhis, Louis Jachiet, and Stefan Mengel. A circuit-based approach to efficient enumeration. In Ioannis Chatzigiannakis, Piotr Indyk, Fabian Kuhn, and Anca Muscholl, editors, 44th International Colloquium on Automata, Languages, and Programming, ICALP 2017, July 10-14, 2017, Warsaw, Poland, volume 80 of LIPIcs, pages 111:1–111:15. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2017. doi:10.4230/LIPIcs.ICALP.2017.111.
  • [2] Antoine Amarilli and Florent Capelli. Tractable circuits in database theory. SIGMOD Rec., 53(2):6–20, 2024. doi:10.1145/3685980.3685982.
  • [3] Jérôme Amilhastre, Hélène Fargier, Alexandre Niveau, and Cédric Pralet. Compiling csps: A complexity map of (non-deterministic) multivalued decision diagrams. Int. J. Artif. Intell. Tools, 23(4), 2014. doi:10.1142/S021821301460015X.
  • [4] Marcelo Arenas, Luis Alberto Croquevielle, Rajesh Jayaram, and Cristian Riveros. When is approximate counting for conjunctive queries tractable? In Samir Khuller and Virginia Vassilevska Williams, editors, STOC ’21: 53rd Annual ACM SIGACT Symposium on Theory of Computing, Virtual Event, Italy, June 21-25, 2021, pages 1015–1027. ACM, 2021. doi:10.1145/3406325.3451014.
  • [5] Albert Atserias, Martin Grohe, and Dániel Marx. Size bounds and query plans for relational joins. In 49th Annual IEEE Symposium on Foundations of Computer Science, FOCS 2008, October 25-28, 2008, Philadelphia, PA, USA, pages 739–748. IEEE Computer Society, 2008. doi:10.1109/FOCS.2008.43.
  • [6] Paul Beame and Vincent Liew. New limits for knowledge compilation and applications to exact model counting. In Marina Meila and Tom Heskes, editors, Proceedings of the Thirty-First Conference on Uncertainty in Artificial Intelligence, UAI 2015, July 12-16, 2015, Amsterdam, The Netherlands, pages 131–140. AUAI Press, 2015. URL: http://auai.org/uai2015/proceedings/papers/111.pdf.
  • [7] Christoph Berkholz, Jens Keppeler, and Nicole Schweikardt. Answering conjunctive queries under updates. In Emanuel Sallinger, Jan Van den Bussche, and Floris Geerts, editors, Proceedings of the 36th ACM SIGMOD-SIGACT-SIGAI Symposium on Principles of Database Systems, PODS 2017, Chicago, IL, USA, May 14-19, 2017, pages 303–318. ACM, 2017. doi:10.1145/3034786.3034789.
  • [8] Christoph Berkholz, Stefan Mengel, and Hermann Wilhelm. A characterization of efficiently compilable constraint languages. arXiv preprint arXiv:2311.10040, 2023. Full version of [9]. doi:10.48550/arXiv.2311.10040.
  • [9] Christoph Berkholz, Stefan Mengel, and Hermann Wilhelm. A characterization of efficiently compilable constraint languages. In Olaf Beyersdorff, Mamadou Moustapha Kanté, Orna Kupferman, and Daniel Lokshtanov, editors, 41st International Symposium on Theoretical Aspects of Computer Science, STACS 2024, March 12-14, 2024, Clermont-Ferrand, France, volume 289 of LIPIcs, pages 11:1–11:19. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2024. doi:10.4230/LIPIcs.STACS.2024.11.
  • [10] Christoph Berkholz and Nicole Schweikardt. Constant delay enumeration with fpt-preprocessing for conjunctive queries of bounded submodular width. In Peter Rossmanith, Pinar Heggernes, and Joost-Pieter Katoen, editors, 44th International Symposium on Mathematical Foundations of Computer Science, MFCS 2019, August 26-30, 2019, Aachen, Germany, volume 138 of LIPIcs, pages 58:1–58:15. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2019. doi:10.4230/LIPIcs.MFCS.2019.58.
  • [11] Christoph Berkholz and Harry Vinall-Smeeth. A dichotomy for succinct representations of homomorphisms. arXiv preprint arXiv:2209.14662, 2022. Full version of [12]. doi:10.48550/arXiv.2209.14662.
  • [12] Christoph Berkholz and Harry Vinall-Smeeth. A dichotomy for succinct representations of homomorphisms. In Kousha Etessami, Uriel Feige, and Gabriele Puppis, editors, 50th International Colloquium on Automata, Languages, and Programming, ICALP 2023, July 10-14, 2023, Paderborn, Germany, volume 261 of LIPIcs, pages 113:1–113:19. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2023. doi:10.4230/LIPIcs.ICALP.2023.113.
  • [13] C. S. Bhargav, Shiteng Chen, Radu Curticapean, and Prateek Dwivedi. Monotone bounded-depth complexity of homomorphism polynomials. In Pawel Gawrychowski, Filip Mazowiecki, and Michal Skrzypczak, editors, 50th International Symposium on Mathematical Foundations of Computer Science, MFCS 2025, August 25-29, 2025, Warsaw, Poland, volume 345 of LIPIcs, pages 19:1–19:18. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2025. doi:10.4230/LIPIcs.MFCS.2025.19.
  • [14] Beate Bollig and Martin Farenholtz. On the relation between structured d-dnnfs and sdds. Theory Comput. Syst., 65(2):274–295, 2021. doi:10.1007/S00224-020-10003-Y.
  • [15] Simone Bova, Florent Capelli, Stefan Mengel, and Friedrich Slivovsky. Knowledge compilation meets communication complexity. In Subbarao Kambhampati, editor, Proceedings of the Twenty-Fifth International Joint Conference on Artificial Intelligence, IJCAI 2016, New York, NY, USA, 9-15 July 2016, pages 1008–1014. IJCAI/AAAI Press, 2016. URL: http://www.ijcai.org/Abstract/16/147.
  • [16] Andrei A. Bulatov. A dichotomy theorem for nonuniform csps. In Chris Umans, editor, 58th IEEE Annual Symposium on Foundations of Computer Science, FOCS 2017, Berkeley, CA, USA, October 15-17, 2017, pages 319–330. IEEE Computer Society, 2017. doi:10.1109/FOCS.2017.37.
  • [17] Florent Capelli. Understanding the complexity of #sat using knowledge compilation. In 32nd Annual ACM/IEEE Symposium on Logic in Computer Science, LICS 2017, Reykjavik, Iceland, June 20-23, 2017, pages 1–10. IEEE Computer Society, 2017. doi:10.1109/LICS.2017.8005121.
  • [18] Florent Capelli and Oliver Irwin. Direct access for conjunctive queries with negations. In Graham Cormode and Michael Shekelyan, editors, 27th International Conference on Database Theory, ICDT 2024, March 25-28, 2024, Paestum, Italy, volume 290 of LIPIcs, pages 13:1–13:20. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2024. doi:10.4230/LIPIcs.ICDT.2024.13.
  • [19] Julia Chuzhoy and Zihan Tan. Towards tight(er) bounds for the excluded grid theorem. Journal of Combinatorial Theory, Series B, 146:219–265, 2021. doi:10.1016/j.jctb.2020.09.010.
  • [20] Víctor Dalmau and Peter Jonsson. The complexity of counting homomorphisms seen from the other side. Theor. Comput. Sci., 329(1-3):315–323, 2004. doi:10.1016/J.TCS.2004.08.008.
  • [21] Adnan Darwiche. Decomposable negation normal form. J. ACM, 48(4):608–647, 2001. doi:10.1145/502090.502091.
  • [22] Adnan Darwiche. On the Tractable Counting of Theory Models and its Application to Truth Maintenance and Belief Revision. J. Appl. Non Class. Logics, 11(1-2):11–34, 2001. doi:10.3166/JANCL.11.11-34.
  • [23] Adnan Darwiche and Pierre Marquis. A Knowledge Compilation Map. J. Artif. Intell. Res., 17:229–264, 2002. doi:10.1613/JAIR.989.
  • [24] Alexis de Colnet and Stefan Mengel. Characterizing tseitin-formulas with short regular resolution refutations. J. Artif. Intell. Res., 76:265–286, 2023. doi:10.1613/JAIR.1.13521.
  • [25] Austen Z. Fan, Paraschos Koutris, and Hangdong Zhao. Tight bounds of circuits for sum-product queries. Proc. ACM Manag. Data, 2(2):87, 2024. doi:10.1145/3651588.
  • [26] Austen Z. Fan, Paraschos Koutris, and Hangdong Zhao. Circuit bounds for conjunctive queries with self-joins. Proc. ACM Manag. Data, 3(2):92:1–92:24, 2025. doi:10.1145/3725229.
  • [27] Tomás Feder and Moshe Y. Vardi. Monotone monadic SNP and constraint satisfaction. In S. Rao Kosaraju, David S. Johnson, and Alok Aggarwal, editors, Proceedings of the Twenty-Fifth Annual ACM Symposium on Theory of Computing, May 16-18, 1993, San Diego, CA, USA, pages 612–622. ACM, 1993. doi:10.1145/167088.167245.
  • [28] Martin Grohe. The complexity of homomorphism and constraint satisfaction problems seen from the other side. J. ACM, 54(1):1:1–1:24, 2007. doi:10.1145/1206035.1206036.
  • [29] Martin Grohe and Dániel Marx. Constraint solving via fractional edge covers. ACM Trans. Algorithms, 11(1):4:1–4:20, 2014. doi:10.1145/2636918.
  • [30] Petr Hlinený, Sang-il Oum, Detlef Seese, and Georg Gottlob. Width parameters beyond tree-width and their applications. Comput. J., 51(3):326–362, 2008. doi:10.1093/COMJNL/BXM052.
  • [31] Abhay Kumar Jha and Dan Suciu. Knowledge compilation meets database theory: compiling queries to decision diagrams. In Tova Milo, editor, Database Theory - ICDT 2011, 14th International Conference, Uppsala, Sweden, March 21-24, 2011, Proceedings, pages 162–173. ACM, 2011 . doi:10.1145/1938551.1938574.
  • [32] Angelika Kimmig, Guy Van den Broeck, and Luc De Raedt. Algebraic model counting. J. Appl. Log., 22:46–62, 2017. doi:10.1016/J.JAL.2016.11.031.
  • [33] Balagopal Komarath, Anurag Pandey, and Chengot Sankaramenon Rahul. Monotone arithmetic complexity of graph homomorphism polynomials. In Mikolaj Bojanczyk, Emanuela Merelli, and David P. Woodruff, editors, 49th International Colloquium on Automata, Languages, and Programming, ICALP 2022, July 4-8, 2022, Paris, France, volume 229 of LIPIcs, pages 83:1–83:20. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2022. doi:10.4230/LIPIcs.ICALP.2022.83.
  • [34] Frédéric Koriche, Jean-Marie Lagniez, Pierre Marquis, and Samuel Thomas. Compiling constraint networks into multivalued decomposable decision graphs. In Qiang Yang and Michael J. Wooldridge, editors, Proceedings of the Twenty-Fourth International Joint Conference on Artificial Intelligence, IJCAI 2015, Buenos Aires, Argentina, July 25-31, 2015, pages 332–338. AAAI Press, 2015. URL: http://ijcai.org/Abstract/15/053.
  • [35] Dániel Marx. Can you beat treewidth? Theory Comput., 6(1):85–112, 2010. doi:10.4086/TOC.2010.V006A005.
  • [36] Dániel Marx. Tractable structures for constraint satisfaction with truth tables. Theory Comput. Syst., 48(3):444–464, 2011. doi:10.1007/S00224-009-9248-9.
  • [37] Dániel Marx. Tractable hypergraph properties for constraint satisfaction and conjunctive queries. J. ACM, 60(6):42:1–42:51, 2013. doi:10.1145/2535926.
  • [38] Robert Mateescu and Rina Dechter. Compiling constraint networks into AND/OR multi-valued decision diagrams (aomdds). In Frédéric Benhamou, editor, Principles and Practice of Constraint Programming - CP 2006, 12th International Conference, CP 2006, Nantes, France, September 25-29, 2006, Proceedings, volume 4204 of Lecture Notes in Computer Science, pages 329–343. Springer, 2006. doi:10.1007/11889205_25.
  • [39] Kuldeep S Meel and Alexis de Colnet. # CFG and# DNNF admit FPRAS. arXiv preprint arXiv:2406.18224, 2024. Accepted at SODA 2026.
  • [40] Dan Olteanu. Recent increments in incremental view maintenance. In Floris Geerts and Wim Martens, editors, Companion of the 43rd Symposium on Principles of Database Systems, PODS 2024, Santiago, Chile, June 9-15, 2024, pages 8–17. ACM, 2024. doi:10.1145/3635138.3654763.
  • [41] Dan Olteanu and Jakub Zavodny. Factorised representations of query results: size bounds and readability. In Alin Deutsch, editor, 15th International Conference on Database Theory, ICDT ’12, Berlin, Germany, March 26-29, 2012, pages 285–298. ACM, 2012. doi:10.1145/2274576.2274607.
  • [42] Dan Olteanu and Jakub Závodný. Size bounds for factorised representations of query results. ACM Trans. Database Syst., 40(1):2:1–2:44, 2015. doi:10.1145/2656335.
  • [43] Bruce Reed. Tree width and tangles: a new connectivity measure and some applications. Surveys in combinatorics, 241:87–162, 1997.
  • [44] Neil Robertson and Paul D Seymour. Graph minors. xiii. the disjoint paths problem. Journal of combinatorial theory, Series B, 63(1):65–110, 1995. doi:10.1006/JCTB.1995.1006.
  • [45] Neil Robertson and Paul D. Seymour. Graph minors. XVI. excluding a non-planar graph. J. Comb. Theory B, 89(1):43–76, 2003. doi:10.1016/S0095-8956(03)00042-X.
  • [46] Shubham Sharma, Rahul Gupta, Subhajit Roy, and Kuldeep S. Meel. Knowledge compilation meets uniform sampling. In Gilles Barthe, Geoff Sutcliffe, and Margus Veanes, editors, LPAR-22. 22nd International Conference on Logic for Programming, Artificial Intelligence and Reasoning, Awassa, Ethiopia, 16-21 November 2018, volume 57 of EPiC Series in Computing, pages 620–636. EasyChair, 2018. doi:10.29007/H4P9.
  • [47] Harry Vinall-Smeeth. Structured d-DNNF is not closed under negation. In Proceedings of the Thirty-Third International Joint Conference on Artificial Intelligence, IJCAI 2024, Jeju, South Korea, August 3-9, 2024, pages 3593–3601. ijcai.org, 2024. URL: https://www.ijcai.org/proceedings/2024/398.
  • [48] Dmitriy Zhuk. A proof of the CSP dichotomy conjecture. J. ACM, 67(5):30:1–30:78, 2020. doi:10.1145/3402029.