Connecting Width and Structure in Knowledge Compilation

Several query evaluation tasks can be done via knowledge compilation : the query result is compiled as a lineage circuit from which the answer can be determined. For such tasks, it is important to leverage some width parameters of the circuit, such as bounded treewidth or pathwidth, to convert the circuit to structured classes, e.g., deterministic structured NNFs (d-SDNNFs) or OBDDs. In this work, we show how to connect the width of circuits to the size of their structured representation, through upper and lower bounds. For the upper bound, we show how bounded-treewidth circuits can be converted to a d-SDNNF, in time linear in the circuit size. Our bound, unlike existing results, is constructive and only singly exponential in the treewidth. We show a related lower bound on monotone DNF or CNF formulas, assuming a constant bound on the arity (size of clauses) and degree (number of occurrences of each variable). Speciﬁcally, any d-SDNNF (resp., SDNNF) for such a DNF (resp., CNF) must be of exponential size in its treewidth; and the same holds for pathwidth when compiling to OBDDs. Our lower bounds, in contrast with most previous work, apply to any formula of this class, not just a well-chosen family. Hence, for our language of DNF and CNF, pathwidth and treewidth respectively characterize the eﬃciency of compiling to OBDDs and (d)SDNNFs, that is, compilation is singly exponential in the width parameter. We conclude by applying our lower bound results to the task of query evaluation.


Introduction
Uncertainty and errors in data can be modeled using probabilistic databases [39], annotating every tuple with a probability of existence.Query evaluation on probabilistic databases must then handle the uncertainty by computing the probability that each query result holds.A common technique to evaluate queries on probabilistic databases is the intensional approach: first compute a representation of the lineage of the query on the database, which intuitively describes how the query depends on the possible database facts; then use this lineage to compute probabilities efficiently.Specifically, the lineage can be computed as a circuit [32], and efficient probability computation can be achieved by restricting to tractable circuit classes via knowledge compilation.Thus, to evaluate queries on probabilistic databases, we can use knowledge compilation algorithms to translate circuits to tractable classes; conversely, lower bounds in knowledge compilation can identify the limits of the intensional approach.
In this paper, we study the relationship between two kinds of tractable circuit classes in knowledge compilation: width-based classes, specifically, bounded-treewidth and boundedpathwidth circuits; and structure-based classes, specifically, OBDDs (ordered binary decision diagrams [17], following a variable order) and d-SDNNFs (structured deterministic decomposable negation normal forms [35], following a v-tree).Circuits of bounded treewidth can be obtained as a result of practical query evaluation [3,6,30], whereas OBDDs and d-DNNFs have been studied to show theoretical characterizations of the query lineages they can represent [31].Both classes enjoy tractable probabilistic computation: for width-based classes, using message passing [33], in time linear in the circuit and exponential in the treewidth; for This result generalizes several existing lower bounds in knowledge compilation that exponentially separate CNFs from OBDDs, such as [25] and [15,Theorem 19].
Our third contribution (Section 6) is to show an analogue for treewidth and (d-)SDNNFs: Result 3 (Theorem 25).Let ϕ be a monotone DNF (resp., monotone CNF), let a := arity(ϕ) and d := degree(ϕ).Then any d-SDNNF (resp., SDNNF) for ϕ has size 2 Our two lower bounds contribute to a vast landscape of knowledge compilation results giving lower bounds on compiling specific Boolean functions to restricted circuits classes, e.g., [15,25,37] to OBDDs, [18] to decision structured DNNF, [9] to sentential decision diagrams (SDDs), [13,36] to d-SDNNF, [13,19,20] to d-DNNFs and DNNFs.However, all those lower bounds (with the exception of some results in [19,20] discussed in Section 6) apply to well-chosen families of Boolean functions (usually CNF), whereas Result 2 and 3 apply to any monotone CNF and DNF.Together with Result 1, these generic lower bounds point to a strong relationship between width parameters and structure representations, on monotone CNFs and DNFs of constant arity and degree.Specifically, the smallest width of OBDD representations of any such formula ϕ is in 2 Θ(pw(ϕ)) , i.e., precisely singly exponential in the pathwidth; and an analogous bound applies to d-SDNNF size and treewidth of DNFs.
To prove our lower bounds, we rephrase pathwidth and treewidth to new notions of pathsplitwidth and treesplitwidth, which intuitively measure the performance of a variable ordering or v-tree.We also use the disjoint non-covering prime implicant sets (dncpi-sets), a tool introduced in [1,7] by some of the present authors, and generalizing subfunction width [15].These dncpi-sets allow us to derive lower bounds on OBDD width directly using [1].We show how they can also imply lower bounds on d-SDNNF size, using the recent communication complexity approach of Bova, Capelli, Mengel and Slivovsky [13].
Our fourth contribution (Section 7) applies our lower bounds to intensional query evaluation on relational databases.We reuse the notion of intricate queries of [7], and show that d-SDNNF representations of the lineage of these queries have size exponential in the treewidth of any input instance.This extends the result of [7] from OBDDs to d-SDNNFs:

Result 4 (Theorem 33).
There is a constant d ∈ N such that the following is true.Let σ be an arity-2 signature, and Q be a connected UCQ = which is intricate on σ.For any instance I on σ, any d-SDNNF representing the lineage of Q on I has size 2 Ω(tw(I) 1/d ) .
1. it is a full binary tree, i.e., each node has exactly zero or two children; Boolean circuits and functions.A (Boolean) valuation of a set V is a function ν : V → {0, 1}.A Boolean function ϕ on variables V is a mapping that associates to each valuation ν of V a Boolean value in {0, 1} called the evaluation of ϕ according to ν.
A (Boolean) circuit C = (G, W, g output , µ) is a directed acyclic graph (G, W ) whose vertices G are called gates, whose edges W are called wires, where g output ∈ G is the output gate, and where each gate g ∈ G has a type µ(g) among var (a variable gate), not, or, and.The inputs of a gate g ∈ G are the gates g ∈ G such that (g , g) ∈ W ; the fan-in of g is its number of inputs.We require not-gates to have fan-in 1 and var-gates to have fan-in 0. The treewidth of C, and its size, are those of the graph (G, W ). The set C var of variable gates of C are those of type var.Given a valuation ν of C var , we extend it to an evaluation of C by mapping each variable g ∈ C var to ν(g), and evaluating the other gates according to their type.The Boolean function on C var captured by the circuit is the one that maps ν to the evaluation of g output under ν.Two circuits are equivalent if they capture the same function.
We recall restricted circuit classes from knowledge compilation.We say that C is in negation normal form (NNF) if the inputs of not-gates are always variable gates.For a gate g in a Boolean circuit C, we write Vars(g) for the set of variable gates of C var that have a directed path to g in C.An and-gate g of C is decomposable if for every two input gates g 1 = g 2 of g we have Vars(g 1 ) ∩ Vars(g 2 ) = ∅.We call C decomposable if each and-gate is.
A stronger requirement than decomposability is structuredness.A v-tree [35] over a set V is a rooted ordered binary tree T whose leaves are in bijection with V ; we identify each leaf with the associated element of V .For n ∈ T , we denote by T n the subtree of T rooted at n, and for a subset U ⊆ T of nodes of T , we denote by Leaves(U ) the leaves that are in U , i.e., U ∩ V .We say that T structures a Boolean circuit C (and call it a v-tree for C) if T is over the set C var and if, for every and-gate g of C with inputs g 1 , . . ., g m and m > 0, there is a node n ∈ T that structures g, i.e., n has m children n 1 , . . ., n m and we have Vars(g i ) ⊆ Leaves(T ni ) for all 1 i m.We call C structured if some v-tree structures it.Note that structured Boolean circuits are always decomposable, and their and-gates have at most two inputs because T is binary.
A last requirement on circuits is determinism.An or-gate g of C is deterministic if there is no pair g 1 = g 2 of input gates of g and valuation ν of C var such that g 1 and g 2 both evaluate to 1 under ν.A Boolean circuit is deterministic if each or-gate is.
The main structured class of circuits that we study in this work are deterministic structured decomposable NNFs, which we denote d-SDNNF for brevity as in [35].

DNFs and CNFs.
We also study other representations of Boolean functions, namely, Boolean formulas in conjunctive normal form (CNFs) and in disjunctive normal form (DNFs).A DNF (resp., CNF) ϕ on a set of variables V is a disjunction (resp., conjunction) of clauses, each of which is a conjunction (resp., disjunction) of literals on V , i.e., variables of V (a positive literal) or their negation (a negative literal).A monotone DNF (resp., monotone CNF) is one where all literals are positive, in which case we often identify a clause to the XX:5 set of variables that it contains.We always assume that monotone DNFs and monotone CNFs are minimized, i.e., no clause is a subset of another.This ensures that every monotone Boolean function has a unique representation as a monotone DNF (the disjunction of its prime implicants), and likewise for CNF.We assume that CNFs and DNFs always contain at least one non-empty clause (in particular, they cannot represent constant functions).Monotone DNFs and CNFs ϕ are isomorphic to hypergraphs: the vertices are the variables of ϕ, and the hyperedges are the clauses of ϕ.We often identify ϕ to its hypergraph.In particular, the pathwidth and treewidth of ϕ, and its arity and degree, are defined as that of its hypergraph.

Upper Bounds
Our upper bound result studies how to compile a Boolean circuit to a d-SDNNF, parametrized by the treewidth of the input circuit.To present it, we first review the independent result that was recently shown by Bova and Szeider [16] about these circuit classes: Theorem 3 [16, Theorem 3 and Equation ( 22)].Given a Boolean circuit C with n variables and of treewidth k, there exists an equivalent d-SDNNF of size O(f (k) × n), where f is doubly exponential.
An advantage of their result is that it depends only on the number of variables of the circuit (and on the width parameter), not on the size of the circuit.None of our results will have this advantage, and we will always measure complexity as a function of the size of the input circuit.In exchange for this advantage, their result has two drawbacks: (i) the doubly exponential dependency on the width; and (ii) its nonconstructive aspect, because [16] gives no time bound on the computation, leaving open the question of effectively compiling bounded-treewidth circuits to d-SDNNFs.
Naive constructive bound.We first address the second drawback by showing an easy constructive result.The argument is very simple and appeals to techniques from our earlier works on provenance circuits [6,7]; it is independent from the techniques of [16].Proof sketch.We encode in linear time the input circuit C to a relational instance I with same treewidth.We use [7,Theorem 6.11] to construct in linear time a provenance representation C on I of a fixed MSO formula that describes Boolean circuit evaluation.This allows us to obtain in linear time from C the desired equivalent d-SDNNF representation.
This result shows that we can effectively compile in linear time parametrized by the treewidth k, but does not address the first drawback, namely, the dependency in k.

Improved bound.
Our main upper bound result subsumes the naive bound above, with a more elaborate proof, again independent of the techniques of [16].It addresses both drawbacks and shows that we can effectively compile in time singly exponential in k; formally: Theorem 5. Given as input a Boolean circuit C and tree decomposition T of width k, we can compute a d-SDNNF equivalent to C with its v-tree, in O |T | × 2 (4+ε)k for any ε > 0.
We prove Theorem 5 in the next section.Observe how we assume the tree decomposition to be given as part of the input.If it is not, we can compute one with Theorem 1, but this becomes the bottleneck: the complexity becomes O |C| × 2 (32+ε)k 3 for any ε > 0.

XX:6
Connecting Width and Structure in Knowledge Compilation (Extended Version) Applications.Theorem 5 implies several consequences for bounded-treewidth circuits.The first one deals with probability computation: we are given a probability valuation π mapping each variable g ∈ C var to a probability that g is true (independently from other variables), and we wish to compute the probability π(C) that C evaluates to true under π, assuming that arithmetic operations (sum and product) take unit time.This problem is #P-hard for arbitrary circuits, but it is tractable for d-SDNNF [22].Hence, our result implies the following, where |π| denotes the size of writing the probability valuation π: This improves the bound obtained when applying message passing techniques [33] directly on the bounded-treewidth input circuit (as presented, e.g., in [5,Theorem D.2]).Indeed, message passing applies to moralized representations of the input: for each gate, the tree decomposition must contain a bag containing all inputs of this gate simultaneously, which is problematic for circuits of large fan-in.Indeed, if the original circuit has a tree decomposition of width k, rewriting it to make it moralized results in a tree decomposition of width 3k 2 (see [4,Lemmas 53 and 55]), and the bound of [5,Theorem D.2] then yields an overall complexity of O |π| + |T | × 2 3k 2 for message passing.Our Corollary 6 achieves a more favorable bound because Theorem 5 uses directly the associativity of and and or.We note that the connection between message-passing techniques and structured circuits has also been investigated by Darwiche, but his result [23,Theorem 6] produces arithmetic circuits rather than d-DNNFs, and it also needs the input to be moralized.
A second consequence concerns the task of enumerating the accepting valuations of circuits, i.e., producing them one after the other, with small delay between each accepting valuation.The valuations are concisely represented as assignments, i.e., as a set of variables that are set to true, omitting those that are set to false.This task is of course NP-hard on arbitrary circuits (as it implies that we can check whether an accepting valuation exists), but was recently shown in [2] to be feasible on d-SDNNFs with linear-time preprocessing and delay linear in the Hamming weight of each produced assignment.Hence, we have: Other applications of Theorem 5 include counting the number of satisfying valuations of the circuit (a special case of probability computation), MAP inference [27] or random sampling of possible worlds (which can be done on the d-SDNNF in an easy manner).

Proof of the Main Upper Bound Result
In this section, we present the construction used to prove Theorem 5. We start with prerequisites, and then describe how to build the d-SDNNF equivalent to the input boundedtreewidth circuit.Last, we sketch the correctness proof.
Prerequisites.Let C be the input circuit, and T the input tree decomposition.By Lemma 2, we assume that T is nice.Further, up to adding a constant number of bags and re-rooting T , we can assume that the root bag of T contains only the output gate g output .For any bag b of T , we define VarT(b) to be the set of variable gates such that b is the topmost bag in which they appear; as T is nice, VarT(b) is either empty or is a singleton {g}, in which case we call b responsible for the variable gate g.We can explicitly compute the function VarT in O(|T |), i.e., compute VarT(b) for each b ∈ T ; see for instance [28,Lemma 3.1].
To abstract away the type of gates and their values in the construction, we will talk of strong and weak values.Intuitively, a value is strong for a gate g if any input g of g which carries this value determines the value of g; and weak otherwise.Formally: Definition 8. Let g be a gate and c ∈ {0, 1}: If g is an and-gate, we say that c = 0 is strong for g and c = 1 is weak for g; If g is an or-gate, we say that c = 1 is strong for g and c = 0 is weak for g; If g is a not-gate, c = 0 and c = 1 are both strong for g; For technical convenience, if g is a var-gate, c = 0 and c = 1 are both weak for g.
If we take any valuation ν : C var → {0, 1} of the circuit C = (G, W, g output , µ), and extend it to an evaluation ν : G → {0, 1}, then ν will respect the semantics of gates.In particular, it will respect strong values: for any gate g of C, if g has an input g for which ν(g ) is a strong value, then ν(g) is determined by ν(g ), specifically, it is ν(g ) if g is an oror an and-gate, and 1 − ν(g ) if g is a not-gate.In our construction, we will need to guess how gates of the circuit are evaluated, focusing on a subset of the gates (as given by a bag of T ); we will then call almost-evaluation an assignment of these gates that respects strong values.Formally: Definition 9. Let U be a set of gates of C. We call ν : U → {0, 1} a (C, U )-almostevaluation if it respects strong values, i.e., for every gate g ∈ U , if there is an input g of g in U and ν(g ) is a strong value for g, then ν(g) is determined from ν(g ) in the sense above.
Respecting strong values is a necessary condition for such an assignment to be extensible to a valuation of the entire circuit.However, it is not sufficient: an almost-evaluation ν may map a gate g to a strong value even though g has no input that can justify this value.This is hard to avoid: when we focus on the set U , we do not know about other inputs of g.For now, let us call unjustified the gates of U that carry a strong value that is not justified by ν: Definition 10.Let U be a set of gates of a circuit C and ν a (C, U )-almost-evaluation.We call g ∈ U unjustified if ν(g) is a strong value for g, but, for every input g of g in U , the value ν(g ) is weak for g; otherwise, g is justified.The set of unjustified gates is written Unj(ν).
Let us start to explain how to construct the d-SDNNF circuit D equivalent to the input circuit C. We do so by traversing T bottom-up, and for each bag b of T we create gates G ν,S b in D, where ν is a (C, b)-almost-evaluation and S is a subset of Unj(ν) which we call the suspicious gates of G ν,s b .We will connect the gates of D created for each internal bag b with the gates created for its children in T , in a way that we will explain later.Intuitively, for a gate G ν,S b of D, the suspicious gates g in the set S are gates of b whose strong value is not justified by ν (i.e., g ∈ Unj(ν)), and is not justified either by any of the almost-evaluations at descendant bags of b to which G ν,S b is connected.We call innocent the other gates of b; they are the gates that are justified in ν (in particular, those who carry weak values), and the gates that are unjustified in ν but have been justified by an almost-evaluation at a descendant bag b of b.Crucially, in the latter case, the gate g justifying the strong value in b may no longer appear in b, making g unjustified for ν; this is why we remember the set S.
We still have to explain how we connect the gates G ν is such that (ν, S) is not connectible to the parent bag b , then this gate will not be used as input to any other gate (but we do not try to preemptively remove these useless gates in the construction).We are now ready to give the formal definition that will be used to explain how gates are connected: Definition 12. Let b be an internal bag with children b l and b r , let ν l and ν r be respectively (C, b l ) and (C, b r )-almost-evaluations that mutually agree, and S l ⊆ Unj(ν l ) and S r ⊆ Unj(ν r ) be sets of suspicious gates such that both (ν l , S l ) and (ν r , S r ) are connectible to b.The result of (ν l , S l ) and (ν r , S r ) is then defined as the pair (ν, S) where: Construction.We now use these definitions to present the construction formally.For every variable gate g of C, we create a corresponding variable gate G g,1 of D, and we create G g,0 := not(G g,1 ).For every ) and make it an input of G ν,S b,children .Last, for each bag b which is responsible for a variable gate g (i.e., VarT(b) = {g}), for each (C, b)-almost-evaluation ν and set of suspicious gates S ⊆ Unj(ν), we set the gate G g,ν(g) to be the second input of G ν,S b .The output gate of D is the gate G ν,∅ broot where b root is the root of T and ν maps g output to 1 (remember that b root contains only g output ).
Correctness.We have formally described the construction of our d-SDNNF D. The construction clearly works in linear time, and we can prove that the dependency on k of the running time is as stated.Further, we easily see that D is structured by a v-tree constructed from the tree decomposition T .To show that D is equivalent to C, one direction is easier: any valuation χ that satisfies C also satisfies D, because we can construct an accepting trace in D using the gates G ν,S b for ν the restriction of the evaluation χ to b, and for S := Unj(χ |T b ) where T b denotes the gates of C occurring in the bags of the subtree of T rooted at b.The converse is trickier: we show that any accepting trace of D describes an evaluation of C that respects strong values by definition of almost-evaluations, and eventually justifies every gate which is given a strong value thanks to our bookkeeping of suspicious gates.Last, we show that D is deterministic: this is unexpected because we freely guess the values of gates of C at leaf bags, but it holds because, when we know the valuation of the variable gates, knowing Lower Bounds on OBDDs We now move to lower bounds on the size of structured representations of Boolean functions, in terms of the width of a circuit for that function.Our end goal is to obtain a lower bound for (d-)SDNNFs, that will form a counterpart to the upper bound of Theorem 5. We will do so in Section 6.For now, in this section, we consider a weaker class of lineage representations than (d-)SDNNFs, namely, OBDDs.Definition 13.An ordered binary decision diagram (or OBDD) on a set of variables V = {v 1 , . . ., v n } is a rooted DAG O whose leaves are labeled by 0 or 1, and whose internal nodes are labeled with a variable of V and have two outgoing edges labeled 0 and 1.We require that there exists a total order v = v i1 , . . ., v in on the variables such that, for every path from the root to a leaf, the sequence of variables which labels the internal nodes of the path is a subsequence of v and does not contain duplicate variables.The OBDD O captures a Boolean function on V defined by mapping each valuation ν to the value of the leaf reached from the root by following the path given by ν.The size |O| of O is its number of nodes, and the width w of O is the maximum number of nodes at every level, where a level is defined for a prefix of v as the set of nodes reached by enumerating all possible valuations of this prefix.

Note that we clearly have |O| |V | × w.
Our upper bound in the previous section applied to arbitrary Boolean circuits; however, our lower bounds in this section and the next one will already apply to much weaker formalisms for Boolean functions, namely, monotone DNFs and monotone CNFs (recall their definition from Section 2).Some lower bounds are already known for the compilation of monotone CNFs into OBDDs: Bova and Slivovsky have constructed a family of CNFs of bounded degree whose OBDD width is exponential in their number of variable occurrences [15,Theorem 19], following an earlier result of this type by Razgon [37, Corollary 1].The result is as follows:

Theorem 14 [15, Theorem 19].
There is a class of monotone CNF formulas of bounded degree and arity such that every formula ϕ in this class has OBDD size at least 2 Ω(|ϕ|) .
We adapt some of these techniques to show a more general result: our lower bound applies to any monotone DNF or monotone CNF, not to one specific family.Specifically, we show: From our Theorem 15, we can easily derive Theorem 14 using the fact (also used in the proof of [15,Theorem 19]) that there exists a family of monotone CNFs of bounded degree and arity whose treewidth (hence pathwidth) is linear in their size, namely, the CNFs built from expander graphs (see [29,Theorem 5 and Proposition 1]).Note that expander graphs can also be used to show lower bounds for (non-deterministic and non-structured) DNNFs for a CNF formula [12]; our lower bound on SDNNFs of Section 6 does not capture this result (because we need structuredness).
We observe that, for a family of formulas with bounded arity and degree, the bound of Theorem 15 is optimal, up to constant factors in the exponent.Indeed, following earlier work [26,37], Bova and Slivovsky have shown that any CNF ϕ can be compiled to OBDDs of width 2 pw(ϕ)+2 [15, Theorem 4 and Lemma 9].(Their upper bound result also applies to DNFs, and does not assume monotonicity nor a bound on the arity or degree.)In other words, for any monotone DNF or monotone CNF of bounded arity and degree, pathwidth characterizes the width of an OBDD for the formula, in the following sense: Corollary 16.For any constant c, for any monotone DNF (or monotone CNF) ϕ with arity and degree bounded by c, the smallest width of an OBDD for ϕ is 2 Θ(pw(ϕ)) .
This corollary talks about the pathwidth of ϕ measured as that of its hypergraph, but note that the same result would hold when measuring the pathwidth of the incidence graph or dual hypergraph of ϕ.Indeed, all these pathwidths are within a constant factor of one another when the degree and arity are bounded by a constant.
We prove Theorem 15 in the rest of this section.We present the proof in the case of monotone DNFs to reuse existing lower bound techniques from [1,7], but explain at the end of this section how the proof adapts to monotone CNFs.We first present pathsplitwidth, a new notion which intuitively measures the performance of a variable ordering for an OBDD on the monotone DNF ϕ, and connect it to the pathwidth of ϕ.Second, we recall the definition of dncpi-sets introduced in [1,7] to show lower bounds from the structure of Boolean functions.Last, we conclude the proof by connecting pathsplitwidth to the size of dncpi-sets.
Pathsplitwidth.The first step of the proof is to rephrase the bound on pathwidth, arity, and degree, in terms of a bound on the performance of variable orderings.Intuitively, a good variable ordering is one which does not split too many clauses.Formally: Definition 17.Let H = (V, E) be a hypergraph, and v = v 1 , . . ., v |V | be an ordering on the variables of V .For 1 i |V |, we define Split i (v, H) as the set of hyperedges e of H that contain both a variable at or before v i , and a variable strictly after v i , formally: In other words, psw(H) is the smallest integer n ∈ N such that, for any variable ordering v of the nodes of H, there is a moment at which n hyperedges of H are split, i.e., for n hyperedges e, we have begun enumerating the nodes of e but we have not enumerated all of them yet.We note that the pathsplitwidth of H is exactly the linear branch-width [34] of the dual hypergraph of H, but we introduced pathsplitwidth because it fits our proofs better.
For a monotone DNF ϕ with hypergraph H, the quantity psw(H) is intuitively connected to the quantity of information that an OBDD will have to remember when evaluating ϕ following any variable ordering, which we will formalize via dncpi-sets.This being said, the definition of pathsplitwidth is also reminiscent of that of pathwidth, and we can indeed connect the two (up to a factor of the arity):

Lemma 18. For any hypergraph H = (V, E), we have pw(H) arity(H) × psw(H).
Proof sketch.From a variable ordering v, we construct a path decomposition of H by creating |V | bags in sequence, each of which containing v i plus Split i (v, H).The width is arity(H) × psw(H), and we check the two conditions of path decompositions.First, each hyperedge of H is contained in a bag where it is split.Second, each vertex v i occurs in the corresponding bag b i and at all positions where the edges containing v are split, which forms a segment of v: thus, the connectedness condition of tree decompositions is respected.
Thanks to Lemma 18, it suffices to show that an OBDD for ϕ has width 2 psw(ϕ) (a×d) 2 , which we will do in the rest of this section.dncpi-sets.To show this lower bound, we use the technical tool of dncpi-sets [1,7].We recall the definitions here, adapting the notation slightly.Remember that our monotone DNFs are assumed to be minimized.Note that dncpi-sets are reminiscent of subfunction width in [15] (see Theorem 17 in [15]), but the latter notion is only defined for graph CNFs.Given a variable ordering v of V , we say that v shatters a dncpi-set S if there exists Observe the analogy between shattering and splitting, which we will substantiate below.We recall the main result on dncpi-sets: Lemma 20 [1, Lemma 6.4.7].Let ϕ be a monotone DNF on variables V and n ∈ N. Assume that, for every variable ordering v of V , there is some dncpi-set S of ϕ with |S| n, such that v shatters S. Then any OBDD for ϕ has width 2 n .Proof sketch.Considering the point at which the dncpi-set is shattered, the OBDD must remember exactly the status of each clause of the set: any valuation that satisfies a subset of these clauses gives rise to a different continuation function.This is where we use the fact that the DNF is monotone: it ensures that we can freely choose a valuation of the variables that do not occur in the dncpi-set without making the formula true.
Concluding the proof.We conclude the proof of Theorem 15 by showing that any variable ordering of the variables of a monotone DNF ϕ shatters a dncpi-set of the right size.The formal statement is as follows, and it is the last result to prove: Lemma 21.Let ϕ be a monotone DNF, H its hypergraph, and v an enumeration of its variables.Then there is a dncpi-set S of ϕ shattered by v such that |S| psw(H) (arity(H)×degree(H)) 2 .
We prove this result in the rest of the section.Our goal is to construct a dncpi-set, which intuitively consists of clauses that are disjoint and which do not cover another clause.We can do so by picking clauses sufficiently "far apart".Let the exclusion graph of H = (V, E) be the graph on E where two edges e = e are adjacent if there is an edge e of E with which they both share a node: this is in particular the case when e and e intersect as we can take e := e. Formally, the exclusion graph is In other words, two hyperedges are adjacent in G H iff they are different and are at distance at most 4 in the incidence graph of H.
Remember that an independent set in the graph G H is a subset S of E such that no two elements of S are adjacent in G H .The definition of G H then ensures: Lemma 22.For any monotone DNF ϕ, letting H be its hypergraph, any independent set of the exclusion graph G H is a dncpi-set of ϕ.
In other words, our goal is to compute a large independent set of the exclusion graph.To do this, we will use the following straightforward lemma about independent sets: Lemma 23.Let G = (V, E) be a graph and let V ⊆ V .Then G has an independent set S ⊆ V of size at least |V | degree(G)+1 .

XX:12 Connecting Width and Structure in Knowledge Compilation (Extended Version)
Moreover, we can bound the degree of G H using the degree and arity of H: Lemma 24.Let H be a hypergraph.Then degree(G H ) (arity(H) × degree(H)) 2 − 1.
Proof sketch.The bound on the arity and degree of H implies a bound on the number of edges that can be at distance 4 of another edge in the incidence graph of H, hence bounding the degree of the exclusion graph.
We are now ready to conclude the proof of Lemma 21: Proof of Lemma 21.Let ϕ be a monotone DNF, H = (V, E) its hypergraph, and v an enumeration of its variables.By definition of pathsplitwidth, there is v i ∈ V such that, for Hence, S is a dncpi-set by Lemma 22, has the desired size, and is shattered since S ⊆ E .
Combining this result with Lemma 18 and Lemma 20 concludes the proof of Theorem 15.
From DNFs to CNFs.We now argue that Theorem 15 also holds for monotone CNFs.Let ϕ be a monotone CNF, a := arity(ϕ) and d := degree(ϕ), and suppose for a contradiction that there is an OBDD O for ϕ of width < 2

Lower Bounds on d-SDNNFs
In the previous section, we have shown that pathwidth measures how concisely an OBDD can represent a monotone DNF or CNF formula with bounded degree and arity.In this section, we move from OBDDs to (d-)SDNNFs, and show that treewidth plays a similar role to pathwidth in this setting.Formally, we show the following analogue of Theorem 15: Theorem 25.Let ϕ be a monotone DNF (resp., monotone CNF), let a := arity(ϕ) and d := degree(ϕ).Then any d-SDNNF (resp., SDNNF) for ϕ has size 2 Combined with Theorem 5 (or with existing results specific to CNF formulas such as [14, Corollary 1]), this yields an analogue of Corollary 16.However, its statement is less neat: unlike OBDDs, (d-)SDNNFs have no obvious notion of width, so the lower bound above refers to size rather than width, and it does not exactly match our upper bound.We obtain: Corollary 26.For any constant c, for any monotone DNF (resp., monotone CNF) ϕ with arity and degree bounded by c, there is a d-SDNNF for ϕ having size |ϕ| × 2 O(tw(ϕ)) , and any d-SDNNF (resp., SDNNF) for ϕ has size 2 Ω(tw(ϕ)) .
Our proof of Theorem 25 will follow the same overall structure as in the previous section.We present the proof for monotone DNFs and d-DNNFs: see Appendix E.2 for the extension to monotone CNFs and SDNNFs.Recall that d-SDNNFs are structured by v-trees, which generalize variable orders.We first introduce treesplitwidth, a width notion that measures the performance of a v-tree by counting how many clauses it splits; and we connect treesplitwidth to treewidth.We use again dncpi-sets, and argue that a d-SDNNF structured by a v-tree must shatter a dncpi-set whose size follows the treesplitwidth of the v-tree.We then show that shattering a dncpi-set forces d-SDNNFs to be large: instead of the easy OBDD result of the previous section (Lemma 20), we will need a much deeper result of Pipatsrisawat and Darwiche [36,Theorem 3], rephrased in the setting of communication complexity by Bova, Capelli, Mengel, and Slivovsky [13].
Note that [13], by a similar approach, shows an exponential lower bound on the size of d-SDNNF which is reminiscent of ours.However, their bound again applies to one well-chosen family of Boolean functions; our contribution is to show a general lower bound.In essence, our result is shown by observing that the family of functions used in their lower bound occurs "within" any bounded-degree, bounded-arity monotone DNF.Also note that a result similar to the lower bound of Corollary 26 is proven by Capelli [19,Corollary 6.35] as an auxiliary statement to separate structured DNNFs and FBDDs.The result uses MIM-width, but Theorem 4.2.5 of [40], as degree and arity are bounded, implies that we could rephrase it to treewidth; further, the result assumes arity-2 formulas, but it could be extended to arbitrary arity as in [20,Theorem 12].More importantly, the result applies only to monotone CNFs and not to DNFs .
Treesplitwidth.Informally, treesplitwidth is to v-trees what pathsplitwidth is to variable orders: it bounds the "best performance" of any v-tree.Definition 27.Let H = (V, E) be a hypergraph, and T be a v-tree over V .For any node n of T , we define Split n (T, H) as the set of hyperedges e of H that contain both a variable in T n and one outside T n (recall that T n denotes the subtree of T rooted at n). Formally: The treesplitwidth of T relative to H is tsw(T, H) := max n∈T |Split n (T, H)|.The treesplitwidth tsw(H) of H is then the minimum of tsw(T, H) over all v-trees T of V .
Again, the treesplitwidth of H is exactly the branch-width [38] of the dual hypergraph of H, but treesplitwidth is more convenient for our proofs.As with pathsplitwidth and pathwidth (Lemma 18), we can bound the treewidth of a hypergraph by its treesplitwidth: Lemma 28.For any hypergraph H = (V, E), we have tw(H) 3 × arity(H) × tsw(H).
Proof sketch.We construct a tree decomposition from a v-tree T : it has same skeleton as T , its leaf bags contain the corresponding variable in the v-tree, and its internal bags contain the split at this v-tree node unioned with the split at the child nodes.This is indeed a tree decomposition because each non-singleton edge is split, and the nodes of the v-tree where a vertex of H occurs always form a connected subtree.
Moreover, using the same techniques that we used in the last section, we can show the analogue of Lemma 21.Specifically, given a monotone DNF ϕ on variables V , a v-tree T over V , and a dncpi-set S of ϕ, we say that T shatters S if there is a node n in T such that S ⊆ Split n (T, ϕ).We now show that any v-tree over V must shatter a large dncpi-set (depending on the treewidth, degree, and arity): Lemma 29.Let ϕ be a monotone DNF, H its hypergraph, and T be a v-tree over its variables.Then there is a dncpi-set S of ϕ shattered by T such that |S|

XX:14 Connecting Width and Structure in Knowledge Compilation (Extended Version)
Hence, to prove Theorem 25, the only missing ingredient is a lower bound on the size of d-SDNNFs that shatter large dncpi-sets.Specifically, we need an analogue of Lemma 20: Lemma 30.Let ϕ be a monotone DNF on variables V and n ∈ N. Assume that, for every v-tree T over V , there is some dncpi-set S of ϕ with |S| n, such that T shatters S. Then any d-SDNNF for ϕ has size 2 n − 1.
We will prove Lemma 30 in the rest of this section using a recent lower bound by Bova, Capelli, Mengel, and Slivovsky [13].They bound the size of any d-SDNNF for the set intersection function, defined as SINT n := (x 1 ∧ y 1 ) ∨ . . .∨ (x n ∧ y n ).This bound is useful for us: a dncpi-set intuitively isolates some variables on which ϕ computes exactly SINT n : Lemma 31.Let ϕ be a DNF with variables V , and let S = {D 1 , . . ., D n } be a dncpi-set of ϕ where every clause has size 2. Pick two variables x i = y i in D i for each 1 i n, and let V := {x 1 , y 1 , . . ., x n , y n }.Then there is a partial valuation ν of V with domain V \ V such that ν(ϕ) = SINT n .
Proof sketch.The valuation ν sets to 1 the variables V which are in S but not in V , and sets to 0 all remaining variables.This amounts to discarding the clauses not in the dncpi-set, and discarding the variables of V in the dncpi-set: what remains of the DNF is then precisely SINT n .Note that this result relies on monotonicity, and on the fact that ϕ is a DNF.(However, as we show in Appendix E.2, a dual result holds for monotone CNF.) This observation allows us to leverage the bound of [13] on the size of d-SDNNFs that compute SINT n , assuming that they are structured by an "inconvenient" v-tree: Proposition 32 [13, Proposition 14].Let X n = {x 1 , . . ., x n } and Y n = {y 1 , . . ., y n } for n ∈ N, and let T be a v-tree over X n Y n such that there exists a node n ∈ T with X n ⊆ Leaves(T n ) and Y n ⊆ Leaves(T \ T n ).Then any d-SDNNF structured by T computing SINT n has size 2 n − 1.
In our setting, an "inconvenient" v-tree for a dncpi-set is one that shatters it: each clause of the dncpi-set is then partitioned in two non-empty subsets where we can pick x i and y i for Lemma 31.Hence, when every v-tree shatters a large dncpi-set of ϕ, Proposition 32 allows us to deduce the lower bound on the size of every d-SDNNF for ϕ.We have thus shown Lemma 30, and this concludes the proof of Theorem 25 (in the DNF case).

Application to Query Lineages
In this section, we adapt the lower bound of the previous section to the computation of query lineages on relational instances.Like in [7], for technical reasons, we must assume a graph signature.We first recall some preliminaries and then state our result.
Preliminaries.We fix a graph signature σ of relation names and arities in {1, 2}, with at least one relation of arity 2.An instance I on σ is a finite set of facts of the form R(a 1 , . . ., a n ) for n the arity of R; we call a 1 , . . ., a n elements of I.An instance I is a subinstance of I if the facts of I are a subset of those of I.The Gaifman graph of I has the elements of I as vertices and has one edge between each pair of elements that co-occur in some fact of I.The treewidth tw(I) of I is that of its Gaifman graph.
A Boolean conjunctive query (CQ) is an existentially quantified conjunction of atoms of the form R(x 1 , . . ., x n ) where the x i are variables.A UCQ is a disjunction of CQs, and a XX:15 UCQ = also allows atoms of the form x = y.A UCQ = is connected if the Gaifman graph of each disjunct (seen as an instance, and ignoring =-atoms) is connected.For instance, letting σ R consist of one arity-2 relation R, the following connected UCQ = tests if there are two facts that share one element: (While Q p is not given as a disjunction of CQs, it can be rewritten to one using distributivity.) The lineage of a UCQ = Q over I is a Boolean formula ϕ(Q, I) on the facts of I that maps each Boolean valuation ν : I → {0, 1} to 1 or 0 depending on whether I ν satisfies Q or not, where I ν := {F ∈ I | ν(F ) = 1}.The lineage intuitively represents which facts of I suffice to satisfy Q. Lineages are useful to evaluate queries on probabilistic databases [39]: we can obtain the probability of the query from an OBDD or d-DNNF representing its lineage.
Problem statement.We study when query lineages can be computed efficiently in data complexity, i.e., as a function of the input instance, with the query being fixed.A first question asks which queries have tractable lineages on all instances: Jha and Suciu [32, Theorem 3.9] showed that inversion-free UCQ = queries admit OBDD representations in this sense, and Bova and Szeider [16,Theorem 5] have recently shown that UCQ = queries with inversions do not even have tractable d-SDNNF lineages.A second question asks which instance classes ensure that all queries have tractable lineages on them.This was studied for OBDD representations in [7]: bounded-treewidth instances have tractable OBDD lineage representations for any MSO query ([7, Theorem 6.5], using [32]); conversely there are intricate queries (a class of connected UCQ = queries) whose lineages never have tractable OBDD representations in the instance treewidth [7,Theorem 8.7].The query Q p above is an example of an intricate query on the signature σ R (refer to [7,Definition 8.5] for the formal definition of intricate queries).This result shows that we must bound instance treewidth for all queries to have tractable OBDDs, but leaves the question open for more expressive lineage representations.
Result.Our bound in the previous section allows us to extend Theorem 8.7 of [7] from OBDDs to d-SDNNFs, yielding the following: Theorem 33.There is a constant d ∈ N such that the following is true.Let σ be an arity-2 signature, and Q a connected UCQ = which is intricate on σ.For any instance I on σ, any d-SDNNF representing the lineage of Q on I has size 2 Ω(tw(I) 1/d ) .
Proof sketch.As in [7], we use a result of Chekuri and Chuzhoy [21] to show that the Gaifman graph of I has a degree-3 topological minor S of treewidth Ω(tw(I) 1/d ) for some constant d ∈ N; we also ensure that S has sufficiently high girth relative to Q.We focus on a subinstance I of I that corresponds to S: this suffices to show our lower bound, because we can always compute a tractable representation of ϕ(Q, I ) from one of ϕ(Q, I).Now, we can represent ϕ(Q, I ) as a minimized DNF ψ by enumerating its minimal matches: ψ has constant arity because the number of atoms of Q is fixed, and it has constant degree because S has constant degree and Q is connected.Further, as Q is intricate and I has high girth relative to Q, we can ensure that this DNF has treewidth Ω(tw(I )).We conclude by Theorem 25: d-SDNNFs representing ϕ(Q, I ), hence ϕ(Q, I), have size 2 Ω(tw(I) 1/d ) .
To summarize, given an instance family I satisfying the constructibility requirement of Theorem 8.1 of [7], there are two regimes: (i.)I has bounded treewidth and then all MSO queries have d-SDNNF lineages on instances of I that are computable in linear time; or (ii.) the treewidth is unbounded and then there are UCQ = queries (the intricate ones) whose lineages on instances of I have no d-SDNNF representations polynomial in the instance size.

Conclusion
We have shown tight connections between structured circuit classes and width measures on circuits.We constructively rewrite bounded-treewidth circuits to d-SDNNFs in time linear in the circuit and singly exponential in the treewidth, and show matching lower bounds for arbitrary monotone CNFs or DNFs under degree and arity assumptions; we also show a lower bound for pathwidth and OBDDs.Our results have applications to rich query evaluation: probabilistic query evaluation, computation of lineages, enumeration, etc.
Our work also raises a number of open questions.First, the d-SDNNF obtained in the proof of Theorem 5 does not respect the definition of a sentential decision diagram (SDD) [24].Can this be fixed, and Theorem 5 extended to SDDs?Or is it impossible, which could solve the open question [11] of separating SDDs and d-SDNNFs?Second, can we weaken the hypotheses of bounded degree and arity in Corollaries 16 and 26, and can we rephrase the latter to a notion of (d-)SDNNF width to match more closely the statement of the former?Last, Section 7 shows that d-SDNNF representations of the lineages of intricate queries are exponential in the treewidth; we conjecture a similar result for pathwidth and OBDDs, but this would require a pathwidth analogue of the minor extraction results of [21].We then ensure the second and third conditions, by applying a transformation to leaf bags and to internal bags.We modify every leaf bag b containing more than one vertex by a chain of at most k internal bags with leaves where the vertices are added one after the other.At the same time, we modify every internal bag b that contains elements v 1 , . . ., v n not present in the union D of its children: we replace b by a chain of at most k internal bags b 1 , . . ., b n containing respectively b, b \ {v n }, b \ {v n , v n−1 }, . . ., D, each bag having a child introducing the corresponding gate v i .This is in time O(kn), and again it does not change the width; further, the result of the process satisfies the second and third conditions and obviously it is still a binary tree.
We next ensure the fourth and fifth condition.To do this, whenever a non-root bag b and its parent b violate the condition, we create a chain of intermediate nodes where the gates in b \ b are removed one after the other; and we replace the root bag by a chain of bags where the elements of the root bag are removed one after the other.This does not affect the fact that the tree decomposition is binary, or the second and third conditions, it does not change the width, and it runs in time O(kn).Observe that the bound is O(kn) in the original tree decomposition (not in the output of the previous step), because the transformation never needs to be performed within the chains of nodes that we have introduced in the previous step; it only needs to be performed on interfaces between bags that correspond to interfaces between original bags in T .
The only missing part is to ensure that the tree decomposition is full, which we can simply ensure in linear time by adding bags with an empty label as a second children for internal nodes that have only one child.This is obviously in linear time, does not change the width, and does not affect the other conditions, concluding the proof.

B Proofs for Section 3 (Upper Bounds) Theorem 4. Given any circuit C of treewidth k, we can compute an equivalent d-SDNNF in linear time parametrized by k, i.e., in time O(|C| × f (k)) for some computable function f .
Proof.We first define a signature σ to encode circuits into relational instances: the elements of such an instance are gates, and σ features unary relations Or, And, Not, Variable to describe the type of each gate, a unary relation Output to identify the output gate, and a binary relation Wire to describe the wires.We also add a unary relation True to describe a valuation: the relation applies to variable gates to indicate whether they are true or not.Now, we write an MSO formula ϕ on σ which checks whether a circuit evaluates to true under the indicated valuation.The formula ϕ existentially guesses a set S of true gates: it asserts (i) that the variable gates of S are exactly the ones indicated as True in the input instance, (ii) that the output gate of the circuit is in S, and (iii) that S satisfies the semantics of internal gate, i.e., each or-gate is in S iff it has an input in S, each and-gate is in S iff it has all its inputs in S, and each not-gate is in S iff its input is not in S. Now, given an input circuit C with variable gates V , we encode it in linear time into a relational structure I on σ in the expected way.For any subset V of V , we let I V be I where we add a fact True(g) for each g ∈ V .In particular, the instance I V can be constructed in linear time, and its treewidth is the same as that of C. We now use [ABS16, Theorem 6.11] to compute in linear time in I V (hence in C) a d-SDNNF1 C capturing the provenance of ϕ on I V , i.e., for any Boolean valuation ν of I V , letting I := {F ∈ I V | ν(F ) = 1}, we have ν(C ) = 1 iff I |= ϕ.We fix to 1 the value of the inputs of C that stands for facts other than True-facts (i.e., those that describe the structure of the circuit).The result C is computed in linear time from C, it is still a d-SDNNF, and it ensures that for any Boolean valuation

C Proofs for Section 4 (Proof of the Main Upper Bound Result)
We now prove that the circuit D constructed in the main text is indeed a d-SDNNF equivalent to the initial circuit C, and that it can be constructed together with its v-tree in O |T | × 2 (4+ε)k for any ε > 0.

C.1 D is a Structured DNNF
Negations only apply to the input gates, so D is an NNF.To justify that D is structured, we will define an appropriate v-tree T .Consider the nice tree decomposition T of C that was used to construct D.

C.2 D is Equivalent to C
In order to prove that D is equivalent to C, we introduce the standard notion of a trace in an NNF: XX:21 Definition 34.Let D be an NNF, χ a valuation of its variable gates, and g a gate that evaluates to 1 under χ.A trace of D starting at g according to χ is a set Ξ of gates of D that is minimal by inclusion and such that: g ∈ Ξ; If g ∈ Ξ and g is an and gate, then W (g ) ⊆ Ξ, where W (g) denotes the set of gates that are input to g; If g ∈ Ξ and g is an or gate, then exactly one input of g that evaluates to 1 is in Ξ.
The first step is then to prove that traces have exactly one almost-evaluation corresponding to each descendant bag, and that these almost-evaluations mutually agree.We now need to prove a few lemmas about the behavior of gates that are innocent (i.e., not suspicious).Lemma 37. Let χ be a valuation of the variable gates, G ν,S b a gate in D that evaluates to 1 under χ and Ξ be a trace of D starting at G ν,S b according to χ.Let g ∈ b be a gate that is innocent (g / ∈ S).Then the following holds: If ν(g) is a weak value of g, then for every input g of g that is in the domain of γ(Ξ) (i.e., g appears in a bag b b), we have that γ(Ξ) maps g to a weak value of g; If ν(g) is a strong value of g, then there exists an input g of g that is in the domain of γ(Ξ) such that γ(Ξ)(g ) is ν(g) if g is an and or or gate, and Proof.We prove the claim by bottom-up induction on b ∈ T .One can easily check that the claim is true when b is a leaf bag, remembering that in this case we must (crucially) have S = Unj(ν) by construction (that is, all the gates that are unjustified are suspicious).For the induction case, let b l , b r be the children of b.Suppose first that ν(g) is the weak value of g, and suppose for a contradiction that there is an input g of g in the domain of γ(Ξ) such that γ(Ξ)(g ) is a strong value of g.By the occurrence and connectedness properties of tree decompositions, there exists a bag b b in which both g and g occur.Consider the gate G ν ,S b that is in Ξ: by Lemma 35, this gate exists and is unique.By definition of γ(Ξ) we have ν (g ) = γ(Ξ)(g ).Because ν is a (C, b )-almost-evaluation that maps g to a strong value of g, we must have that ν (g) is also a strong value of g, thus contradicting our hypothesis that ν(g) = γ(Ξ)(g) = ν (g) is a weak value for g.
Suppose now that ν(g) is a strong value of g.We only treat the case when g is an or or an and gate, as the case of a not gate is similar.We distinguish two sub-cases: g is justified.Then clearly, because ν is a (C, b)-almost-evaluation, there must exist an input g of g that is also in b such that ν(g ) is a strong value of g, which proves the claim.
g is unjustified but innocent (g / ∈ S).By construction (precisely, by the second item of Definition 12), g must then be innocent for a child of b, and the claim clearly holds by induction hypothesis.
Lemma 37 allows us to show that for a gate g, letting b be the topmost bag in which g appears (hence, each input of g must occur in some bag b b), if g is innocent then for any trace Ξ starting at a gate for bag b, γ(Ξ) respects the semantics of g.Formally: where is the type of g.

Proof.
Clearly implied by Lemma 37.
We need one last lemma about the behavior of suspicious gates, which intuitively tells us that if we have already seen all the input gates of a gate g and g is still suspicious, then g can never escape: We now have all the results that we need to show that D =⇒ C, i.e., for every valuation χ of the variables of C, if χ(D) = 1 then χ(C) = 1.We prove a stronger result: Lemma 40.Let χ be a valuation of the variable gates, G ν,∅ root(T ) ∈ D a gate that evaluates to 1 under χ, and Ξ a trace of D starting at G ν,∅ root(T ) according to χ.Then γ(Ξ) corresponds to the evaluation χ of C.
Proof.We prove by induction on C (as its graph is a DAG) that for all g ∈ C, γ(Ξ)(g) = χ(g).When g is a variable gate, consider the bag b that is responsible of g, and consider the gate G ν ,S b that is in Ξ: this gate exists and is unique according to Lemma 35.This gate evaluates to 1 under χ (because it is in the trace), which is only possible if G g,ν (g) evaluates to 1 under χ, hence by construction we must have ν (g) = χ(g) and then γ(Ξ)(g) = χ(g).must in contrast be a weak value for g, so that we can take θ(g) to be g and conclude the proof.Indeed suppose by way of contradiction that γ(Ξ l )(g ) is a strong value for g.By the contrapositive of the second item of Lemma 42, we get that g / ∈ S l , which contradicts our assumption.Hence we proved that θ exists, which shows a contradiction, which means that in fact we must have G ν l ,S l ,νr,Sr b = G ν l ,S l ,ν r ,S r b , so that G ν,S b,children is deterministic, which proves that there is a unique trace of D starting at G ν,S b,children according to χ, which was our goal.
This concludes the proof that D is deterministic, and thus that D is a d-SDNNF equivalent to C.

C.4 Analysis of the Running Time
We last check that the construction can be performed in time Proof.Let H = (V, E) be a hypergraph, and let v be an enumeration of the nodes of H witnessing that H has pathsplitwidth psw(H).We will construct a path decomposition of H of width arity(H) × psw(H).Consider the path Let us show that (P, λ) is a path decomposition of H: once this is established, it is clear that its width will be arity(H) × psw(H).First, we verify the occurrence condition.Let e ∈ E. If e is a singleton {v i } then e is included in b i .Now, if |e| 2, then let v i be the first element of e enumerated by v.We have e ∈ Split i (v, H), and therefore e is included in b i .
Second, we verify the connectedness condition.Let v be a vertex of H, then by definition v ∈ b i iff v = v i or there exists e ∈ Split i (v, H) with v ∈ e.We must show that the set T v of the bags that contain v forms a connected subpath in P .To show this, first observe that for every e ∈ E, letting Split(e) = {v i | 1 i < |V | ∧ e ∈ Split i (v, H)}, then Split(e) is clearly a connected segment of v. Second, note that for every e with v ∈ e, then either v ∈ Split(e) or v and the connected subpath Split(e) are adjacent (in the case where v is the last vertex of e in the enumeration).Now, by definition T v is the union of the b v for v ∈ Split(e) with Lemma 31.Let ϕ be a DNF with variables V , and let S = {D 1 , . . ., D n } be a dncpi-set of ϕ where every clause has size 2. Pick two variables x i = y i in D i for each 1 i n, and let V := {x 1 , y 1 , . . ., x n , y n }.Then there is a partial valuation ν of V with domain V \ V such that ν(ϕ) = SINT n .
Proof.Define the following partial valuation ν : V \ V → {0, 1} that maps all the variables of i=1,...,n (D i \ {x i , y i }) to 1 and all the other variables of V \ S to 0. Let us show that for a clause D ∈ ϕ \ S we have ν(D) = 0. Otherwise, as all the variables that ν maps to 1 are in i=1,...,n X i ∪ Y i , we should have D ⊆ S, but because S is a dncpi-set we should have D ∈ S which is a contradiction.Now, ν maps all the variables of D i \ {x i , y i } to 1, hence ν(ϕ) indeed captures SINT n .
Proof of Lemma 30.Let C be a d-SDNNF structured by a v-tree T that captures ϕ.Consider the dncpi-set S = {D 1 , . . ., D m } of size n of ϕ that is shattered by T (note that this implies in particular that every clause contains at least two variables).Consider the node u of T which witnesses this.We can write each clause D i of S as X i Y i , where X i is D i ∩ Leaves(T \ T u ) and Y i is D i ∩ Leaves(T u ).Then according to Lemma 31, there exists a valuation ν of the variables of ϕ with domain V \ {x 1 , y 1 , . . ., x m , y m }, where x i ∈ X i and y i ∈ Y i for 1 i m, such that ν(ϕ) captures the Boolean function SINT m , hence we know that ν(C) also captures SINT m .But by Proposition 32, we have |ν

E.2 From DNFs to CNFs
We now argue that Theorem 25 also holds for monotone CNFs and SDNNFs.Note that we cannot use a dualization argument as we did in the previous section, as we are now working with DNNFs that are not necessarily deterministic.Observe that Definition 19 and Lemma 29 can also apply to monotone CNFs as these only use the hypergraph corresponding to the formula, not the semantics of the formula.Hence, in order to apply the same arguments as in the DNF case and prove an analogue of Lemma 30 in the CNF case, the only difference is that we would need to consider the function f n := (x 1 ∨ y 1 ) ∧ . . .∧ (x n ∨ y n ) and obtain analogues of Lemma 31 and Proposition 32 for that function.This is clear for Lemma 31, so we only need to check that the analogue of Proposition 32 holds.To understand why, we need to go deeper into the proof from [BCMS16].They paraphrase a result of Pipatsrisawat and Darwiche [PD10] in the following way: Theorem 45 ([BCMS16, Theorem 13] and [PD10, Theorem 3]).Let C be a SDNNF on variables V structured by a v-tree T , and let f be the function that it captures.For every node n ∈ T , the function f has a rectangle cover of size Here, a rectangle cover of a Boolean function f : equivalent to f such that g i (resp., h i ) is a Boolean function on variables X (resp., on variables Y ), and m is its size.This notion is a standard tool for showing lower bounds in communication complexity.Therefore, we are interested in the smallest size of a rectangle cover for the function f n : X Y → (x 1 ∨ y 1 ) ∧ . . .∧ (x n ∨ y n ) under partition (X, Y ).But it is known from communication complexity that any rectangle cover for the function set disjunction SDISJ n : X Y → (¬x 1 ∨ ¬y 1 ) ∧ . . .∧ (¬x n ∨ ¬y n ) has size 2 n (see paragraph "Fooling set method", page 5 of [She14]).Moreover, it is easy to see that we can turn any rectangle cover of size m for f n with partition (X, Y ) into a 1-3 or 6.Last, we subdivide each edge into a path of length 2 |Q| + 3 to ensure that the girth condition is respected: this satisfies requirement 5, does not affect requirements 1-2 or 4 or 6, and requirement 3 is still satisfied up to multiplying α by 3 × (2 |Q| + 2) + 1 (each path replacing an edge introduces (2 |Q| + 2) new vertices, and since the graph is degree-3, an upper bound on the number of edges is three times the number of vertices).
We now make explicit the function hidden in the Ω-notation in the exponent of the bound that we wish to show.This function will only depend on Q. Define the increasing function f : k → 1 α k 1/d , and let k 0 ∈ N be the smallest value of k such that f (k) 2. We will show that the size of a d-SDNNF for an input instance I is 2 βf (tw(I)) when tw(I) is large enough, for some constant β > 0 to be defined later, depending only on Q.This means indeed that it is a Ω(tw(I) 1/d ).We assume tw(I) k 0 (and thus f (k) 2) in what follows.
Let I be the input instance on σ, let G be the Gaifman graph of I, and let k := tw(I) = tw(G).Let k := f (k), and consider S k , which is well-defined because k is an integer which is 2. We know that the number n k of vertices of S k is such that n k αk 2 , i.e., n k k 1/c , so the treewidth k of G is n c k .Hence, we know by Lemma 46 that S k is a topological minor of G. Let G be the subgraph of G corresponding to this topological minor: it is a subgraph of G, and a subdivision of S k .
We will extract a corresponding subinstance I of I whose Gaifman graph is G .For simplicity, we will ensure that I is Gaifman-tight.An instance I 0 is Gaifman-tight if two conditions hold: first, letting G 0 be the Gaifman graph of I 0 , for each edge {a, b} of G 0 , there is exactly one fact of I 0 containing a and b (hence, of the form R(a, b) or R(b, a), with a = b); second, every fact of I 0 is a binary fact with two distinct elements (of the form R(c, d) with c = d).Intuitively, an instance is Gaifman-tight if it is exactly obtained from its Gaifman graph by choosing one relation name and orientation for each edge of the Gaifman graph.
We define a Gaifman-tight subinstance I of I with Gaifman graph G by keeping, for every edge {a, b} of G , exactly one binary fact of I containing the two elements a and b (which must exist by definition of the Gaifman graph).By construction, the Gaifman graph of I is then G .Hence, we know the following about the subinstance I of I and its Gaifman graph G (the numbering of this list follows the list of conditions on S): 1.For every element a of I , there are at most 3 facts where a occurs (because G has maximal degree 3). 2. The treewidth of I is k .

(N/A:
There is no analogue of the requirement 3 imposed on S) 4.There are no vertices of degree 1 in G .

5.
The girth of G is > 2 |Q| + 2 (because as a subdivision of S k its girth is at least that of S k ). 6. G is planar.7. I is Gaifman-tight.
We will now construct a DNF representation of ϕ(Q, I ).Remember that Q is a UCQ = , so it is monotone, hence we can construct ϕ(Q, I ) to be a monotone DNF.As Q is not trivial, ϕ(Q, I ) will contain at least one nonempty clause.Further, the DNF can be computed as a minimized DNF by taking the disjunction of conjunctions that stand for each minimal match of Q in I .Specifically, a minimal match of Q in I is a subinstance M of I such that M |= Q and there is no M M such that M |= Q.The following is then easy to see (and this monotone DNF representation is clearly unique): Let H be the hypergraph of this DNF.To be able to usefully apply Theorem 25, we must show that the arity and degree of H are constant, and that tw(H) is Ω(tw(I )).We first show the first claim.The arity of H is clearly bounded from above by the size of a minimal match of Q in I , whose size is clearly bounded from above by |Q|, which is constant.As for the degree of H, as Q is a connected query, any minimal match of Q on I involving some fact F must be contained in the subinstance of I induced by the ball of radius |Q| centered around the elements of F in G : as the degree of G is at most 3, this ball has constant size, so, as σ is fixed, F can only occur in constantly many different matches, and the degree is constant.We now show that tw(H) is Ω(tw(I )): we show this in the following lemma, which captures the essence of intricate queries (namely: under some conditions, their lineage never has lower treewidth than the input instance): Lemma 47.Let σ be an arity-2 signature, let Q be a connected UCQ = which is intricate for σ, and let I be a Gaifman-tight instance on σ whose Gaifman graph has no degree-1 vertex and has girth > 2 |Q| + 2.Then, letting H be the hypergraph of the monotone DNF representing ϕ(Q, I ), we have tw(H) tw(I ) 2 .
Let us conclude the proof of Theorem 33 using Lemma 47, and show Lemma 47 afterwards.
As the arity and degree of H are bounded by constants, by Theorem 25, we know that any d-SDNNF for ϕ(Q, I ) has size 2 β tw(H) for some constant β > 0 (depending only on the arity and degree bounds on I given above, which depend only on Q), which by Lemma 47 is 2 βtw(I ) for a different constant β > 0 and tw(I ) large enough.By definition of S k , we obtain the lower bound of 2 βf (k) for k large enough.Now, to conclude, we must show that this lower bound also applies to any d-SDNNF for ϕ(Q, I).But it is clear that, from any d-SDNNF C for ϕ(Q, I), we can obtain a d-SDNNF C for ϕ(Q, I ) which is no larger than C (structured by a v-tree obtained from that of C), simply by evaluating to 0 all inputs corresponding to facts of I \ I .Hence, the lower bound also applies to a d-SDNNF for ϕ(Q, I), establishing the result of Theorem 33.
All that remains is to show Lemma 47.Let us fix the graph signature σ, the connected UCQ = Q which is intricate for σ, and the instance I on σ satisfying the conditions.We say that two different facts R(a, b) and S(c, d) of I touch if they share an element, formally, |{a, b} ∩ {c, d}| = 1: as I is Gaifman-tight, remember that we must have a = b, c = d, and {a, b} = {c, d}.The key for Lemma 47 is then captured in the following auxiliary claim: Claim 48.Let F and F be two facts of I that touch.Then there is a minimal match M of Q such that {F, F } ⊆ M .
Proof.Let G be the Gaifman graph of I .Consider the two edges e and e standing for F and F in G: these edges are incident in G, so we write without loss of generality e = {u, v} and e = {v, w}.Fix n := |Q|.Define a path π = uu 1 . . .u n in G of |Q| edges by exploring G from u: initially we are at u and call v the predecessor vertex, and whenever we reach some vertex x, we visit a neighbor of x which is different from the predecessor of x, and set x to be the new predecessor.Such a path exists, because this exploration can only get stuck on a vertex of degree 1 (i.e., a vertex that we cannot exit except by going back on its predecessor), and this cannot happen by our assumption that G has no vertex of degree 1.We define a path π = ww 1 . . .w n in G of |Q| edges by exploring from w with predecessor v in the same way.Now, we consider the path ρ obtained by concatenating the reverse of π, e, e , and π , namely: ρ : u n , . . ., u 1 , u, v, w, w 1 , . . ., w n .We claim that this path is a simple path, i.e., no two vertices in the path are the same.Indeed, by definition, no two consecutive vertices can be the same in π, in π , or in u, v, w.Further, two vertices separated by one single vertex cannot be the same: this is the case in π and π because we do not go back to the predecessor vertex in the exploration, and initially we do not go back on v: and for u and w we know that they are different because F and F touch and I is Gaifman-tight.Last, two vertices further apart in ρ cannot be equal, because otherwise the path ρ would contain a simple cycle of G, which would contradict the hypothesis on the girth of G.
Hence, ρ is a simple path of the Gaifman graph G of I .Consider the sequence of facts L of I that witness the existence of each edge of ρ, which is unique because I is Gaifman-tight; in particular we choose F and F as witnesses for e and e .Recall now the definition of a line instance, and of a UCQ = Q being intricate (Definitions 8.4 and 8.5 of [ABS16]).The sequence of facts L is a line instance, with |L| = 2 |Q| + 2, and the two facts incident to the middle element are F and F .Hence, the definition of intricate queries ensures that there is a minimal match M of Q on L that includes both F and F .As L is a subinstance of I , the match M is still a match of Q on I , and it is still minimal, because any match M ⊆ M would also satisfy M ⊆ L and contradict the minimality of M on L. Hence, M is the desired minimal match, which concludes the proof.
We are now ready to prove Lemma 47 from Claim 48, which is the only missing part of the proof of Theorem 33: Proof of Lemma 47. Fix σ, Q, and I , consider the monotone DNF representation of ϕ(Q, I ) and its hypergraph H.To show the desired inequality, it suffices to show that, from a tree decomposition T of H where the maximal bag size is k, we can construct a tree decomposition T of I whose maximal bag size is no greater than 2k.Let T be a tree decomposition of H, and construct T to have same skeleton as T .We define the labeling λ(b ) of every bag b of T to be the set of vertices occurring in the label λ(b) of the corresponding bag b of T (which consists of variables of ϕ(Q, I ), hence of facts of I ): this clearly satisfies the size requirements.We must now show that T is a tree decomposition of I .
To show the occurrence requirement, we must show that for every fact F of I , there is a bag of T containing its two elements.To show this, it suffices to show that there is a bag of T that contains F (as a vertex of H).As the Gaifman graph of I has no vertex of degree 1, there must be a fact F of I that touches F , and we can conclude using a consequence of Claim 48: F must occur in a minimal match of Q on I (together with F , but we do not use this), hence it occurs in a clause of ϕ(Q, I ), and the occurrence requirement on T ensures that F occurs in a bag of T .
To show the connectedness requirement, pick an element a of I .Its occurrences in T are the union of the occurrences in T of the facts that contain a, which are connected subtrees of T by the connectedness requirement of T .Hence, it suffices to show that their union is connected.To do this, let us show that for any two facts F and F that contain a, then the subtrees T F and T F of their occurrences in T necessarily intersect.This is trivial if F = F ; now, if F = F , since I is Gaifman-tight, the facts F and F must touch in I (they cannot share exactly the same elements).Now, we use Claim 48 to conclude that F and F occur together in a minimal match M of Q on I .Hence, there is a clause of ϕ(Q, I ) which contains both F and F , which ensures that F and F occur together in a bag of T , so T F and T F intersect.This shows that T is indeed a tree decomposition of I , which concludes the proof.This concludes the proof of Theorem 33.

2 .Lemma 2 .
for every internal bag b with children b l , b r we have b ⊆ b l ∪ b r ; 3. for every leaf bag b we have |b| 1; 4. for every non-root bag b with parent b , we have |b \ b | 1; 5. for the root bag b we have |b| 1.Given a tree decomposition T of width k having n nodes, we can compute in time O(k × n) a nice tree decomposition T of width k having O(k × n) nodes.

Theorem 4 .
Given any circuit C of treewidth k, we can compute an equivalent d-SDNNF in linear time parametrized by k, i.e., in time O(|C| × f (k)) for some computable function f .

Corollary 6 .
Given a Boolean circuit C, a tree decomposition T of width k of C, and a probability valuation π of C, we can compute π(C) in O |π| + |T | × 2 (4+ε)k for any ε > 0.

Corollary 7 .
Given a Boolean circuit C and a tree decomposition T of width k of C, we can enumerate the accepting assignments of C with preprocessing in O |T | × 2 (4+ε)k and delay linear in the size of each produced assignment.

8 ConnectingDefinition 11 .
,S b of D to the gates G ν l ,S l b l and G νr,Sr br created for the children b l and b r of b in T .The first condition is that ν l and ν r must mutually agree, i.e., ν l (g) = ν r (g) for all g ∈ b l ∩ b r , and ν must then be the union of ν l and ν r , restricted to b. Remember that T is nice, so b is a subset of b l ∪ b r , and it is easy to verify that ν is then a (C, b)-almost-evaluation.We impose a second condition to prohibit suspicious XX:Width and Structure in Knowledge Compilation (Extended Version) gates from escaping before they have been justified, which we formalize as connectibility of a pair (ν, S) at bag b to the parent bag of b.Let b be a non-root bag, b its parent bag, and ν a (C, b)-almost-evaluation.For any set S ⊆ Unj(ν), we say that (ν, S) is connectible to b if S ⊆ b , i.e., the suspicious gates of ν must still appear in b .If a gate G ν,S b internal bag b of T , for each (C, b)-almost-evaluation ν and set S ⊆ Unj(ν) of suspicious gates of ν, we create one and-gate G ν,S b and one or-gate G ν,S b,children which is an input of G ν,S b .For every leaf bag b of T , we create one gate G ν,S b for every (C, b)-almost-evaluation ν, where we set S := Unj(ν); intuitively, in a leaf bag, an unjustified gate is always suspicious (it cannot have been justified at a descendant bag).Now, for each internal bag b of T with children b l , b r , for each pair of gates G ν l ,S l b l and G νr,Sr br that are both connectible to b and where ν l and ν r mutually agree, letting (ν, S) be the result of (ν l , S l ) and (ν r , S r ), we create a gate G ν l ,S l ,νr,Sr b = and(G ν l ,S l b l , G νr,Sr br
H) is always empty.The pathsplitwidth of v relative to H is the maximum size of the split, formally, psw(v, H) := max 1 i |V | |Split i (v, H)|.The pathsplitwidth psw(H) of H is then the minimum of psw(v, H) over all variable orderings v of V .

Definition 19 [ 1 ,
Definition 6.4.6].Given a monotone DNF ϕ on variables V , a disjoint non-covering prime implicant set (dncpi-set) of ϕ is a set S of clauses of ϕ which: are pairwise disjoint: for any D 1 = D 2 in S, we have D 1 ∩ D 2 = ∅.are non-covering in the following sense: for any clause D of ϕ, if D ⊆ S, then D ∈ S. The size of S is the number of clauses that it contains.

pw(ϕ) a 3 ×d 2 .
Consider the monotone DNF ϕ built from ϕ by replacing each ∧ by a ∨ and each ∨ by a ∧.Now, let O be the OBDD built from O by replacing the label b ∈ {0, 1} of each edge by 1 − b, and replacing the label b of each leaf by 1 − b.It is clear, by De Morgan's laws, that O is an OBDD for ϕ of size < 2 pw(ϕ) a 3 ×d 2 , which contradicts Theorem 15 applied to monotone DNFs.
tsw(H) (arity(H)×degree(H)) 2 .Proof sketch.The proof is just like that of Lemma 21, except with the new definition of split on v-trees.In particular, we useLemmas 22,23,and 24.

Lemma 2 .
Given a tree decomposition T of width k having n nodes, we can compute in time O(k × n) a nice tree decomposition T of width k having O(k × n) nodes.Proof.We first make the tree decomposition binary (but not necessarily full) by replacing each bag b with children b 1 , . . ., b n with n > 2 by a chain of bags with the same label as b to which we attach the children b 1 , . . ., b n .This process is in time O(n) and does not change the width.

Corollary 6 .Corollary 7 .
By construction, the latter holds iff ν(C) = 1.In other words, C is equivalent to C, which concludes the proof.Given a Boolean circuit C, a tree decomposition T of width k of C, and a probability valuation π of C, we can compute π(C) in O |π| + |T | × 2 (4+ε)k for any ε > 0. Proof.Use Theorem 5 to compute an equivalent d-SDNNF C ; as C and C are equivalent, it is clear that π(C) = π(C ).Now, compute the probability π(C ) in linear time in C and |π| by a simple bottom-up pass, using the fact that C is a d-DNNF [Dar01].Given a Boolean circuit C and a tree decomposition T of width k of C, we can enumerate the accepting assignments of C with preprocessing in O |T | × 2 (4+ε)k and delay linear in the size of each produced assignment.Proof.Use Theorem 5 to compute an equivalent d-SDNNF C , which has the same accepting valuations, along with a v-tree T of C .We now conclude using [ABJM17, Theorem 2.1].
For each bag b ∈ T , the v-tree T has a node b .For each internal bag b ∈ T with children b 1 , b 2 , T has a node b children , whose children are b 1 and b 2 , and whose parent is b .For every bag b ∈ T that is responsible of some variable gate g, T has a node G g,1 whose parent is b .Hence T is a tree, and one can check that any any G ν l ,I l ,νr,Ir b is structured by b children and any G ν,S b is structured by b , so that T structures D.

Lemma 35 .Definition 36 .
Let χ be a valuation of the variable gates, G ν,S b a gate in D that evaluates to 1 under χ and Ξ be a trace of D starting at G ν,S b according to χ.Then for any bag b b (meaning that b is b or a descendant of b), Ξ contains exactly one gate of the form G ν ,S b .Moreover, over all b b, all the almost-evaluations of the gates G ν ,S b that are in Ξ mutually agree.Proof.The fact that Ξ contains exactly one gate G ν ,S b for any bag b b is obvious by construction of D, as or-gates are assumed to have exactly one input evaluated to 1 in Ξ.For the second claim, suppose by contradiction that not all the almost-evaluations of the gates G ν ,S b that are in Ξ mutually agree.We would then have G ν1,S1 b1 and G ν2,S2 b2 in Ξ and g ∈ b 1 ∩ b 2 such that ν 1 (g) = ν 2 (g).But because T is a tree decomposition, g appears in all the bags on the path from b 1 and b 2 , and by construction the almost-evaluations of the G ν ,S b on this path that are in Ξ mutually agree, hence a contradiction.Therefore, Lemma 35 allows us to define the union of the almost-evaluations in such a trace: Let χ be a valuation of the variable gates, G ν b a gate in D that evaluates to 1 under χ and Ξ be a trace of D starting at G ν b according to χ.Then γ(Ξ) := G ν ,S b ∈Ξ ν (the union of the almost-evaluations in Ξ, which is a valuation from G ν ,S b ∈Ξ b to {0, 1}) is properly defined.

Lemma 38 .
Let χ be a valuation of the variable gates, G ν,S b a gate in D that evaluates to 1 under χ and Ξ be a trace of D starting at G ν,S b according to χ.Let g ∈ b be a gate such that b is the topmost bag in which g appears (hence

Lemma 39 .
Let χ be a valuation of the variable gates, G ν,S b a gate in D that evaluates to 1 under χ and Ξ be a trace of D starting at G ν,S b according to χ.Let g be a gate such that the topmost bag b in which g appears is b, and consider the unique gate of the form G ν ,S b that is in Ξ.If g ∈ S then b = b (hence G ν,S b = G ν ,S b by uniqueness).Proof.Let g ∈ S .Suppose by contradiction that b = b.Let p be the parent of b (which exists because b < b).It is clear that by construction (ν , S ) is connectible to p (recall Definition 11), hence g must be in p, contradicting the fact that b should have been the topmost bag in which g occurs.Hence b = b.

Lemma 18 .
where f is in O(2 (4+ε)k ) for any ε > 0: From the initial tree decomposition T of C, we paid O(k|T |) to compute the nice tree decomposition T nice of size O(k|T |); We computed the mapping VarT nice in linear time in T nice ; We can clearly compute the v-tree in linear time from T nice ; For each bag b of T nice we have 2 2|b| 2 2k+2 different pairs of a valuation ν of b and of a subset S of b, and checking if ν is a (C, b)-almost-evaluation and if S is a subset of the unjustified gates of ν can be done in polynomial time in |b| k + 1 (we access the inputs and the type of each gate in RAM, i.e., in constant time, from C), hence we pay O(|T nice | × p(k) × 2 2k ) to create the gates of the form G ν,S b , for p some polynomial; We pay an additional O(|T nice | × 2 4k ) to create the gates of the form G ν l ,S l ,νr,Sr b ; We pay an additional O(|T nice | × p (k) × 2 4k ) to connect the gates of the form G ν,S b,children to their inputs (p being again some polynomial).Hence the total cost is indeed in O(|T | × f (k)), where f is in O(2 (4+ε)k ) for any ε > 0. For any hypergraph H = (V, E), we have pw(H) arity(H) × psw(H).
H), we have |E | psw(H).Now, by Lemma 23, G H has an independent set S ⊆ E of size at least |E |