New Limits for Knowledge Compilation and Applications to Exact Model Counting

# New Limits for Knowledge Compilation and Applications to Exact Model Counting

Paul Beame
Computer Science and Engineering
University of Washington
Seattle, WA 98195
beame@cs.washington.edu
Research supported by NSF grant CCF-1217099.
Vincent Liew
Computer Science and Engineering
University of Washington
Seattle, WA 98195
vliew@cs.washington.edu
###### Abstract

We show new limits on the efficiency of using current techniques to make exact probabilistic inference for large classes of natural problems. In particular we show new lower bounds on knowledge compilation to SDD and DNNF forms. We give strong lower bounds on the complexity of SDD representations by relating SDD size to best-partition communication complexity. We use this relationship to prove exponential lower bounds on the SDD size for representing a large class of problems that occur naturally as queries over probabilistic databases. A consequence is that for representing unions of conjunctive queries, SDDs are not qualitatively more concise than OBDDs. We also derive simple examples for which SDDs must be exponentially less concise than FBDDs. Finally, we derive exponential lower bounds on the sizes of DNNF representations using a new quasipolynomial simulation of DNNFs by nondeterministic FBDDs.

## 1 Introduction

Weighted model counting is a fundamental problem in probabilistic inference that captures the computation of probabilities of complex predicates over independent random events (Boolean variables). Although the problem is -hard in general, there are a number of practical algorithms for model counting based on DPLL algorithms and on knowledge compilation techniques. The knowledge compilation approach, though more space intensive, can be much more convenient since it builds a representation for an input predicate independent of its weights that allows the count to evaluated easily given a particular choice of weights; that representation also can be re-used to analyze more complicated predicates. Moreover, with only a constant-factor increase in time, the methods using DPLL algorithms can be easily extended to be knowledge compilation algorithms [Huang and Darwiche, 2007]. (See [Gomes et al., 2009] for a survey.)

The representation to be used for knowledge compilation is an important key to the utility of these methods in practice; the best methods are based on restricted classes of circuits and on decision diagrams. All of the ones considered to date can be seen as natural sub-classes of the class of Decomposable Negation Normal Form (DNNF) formulas/circuits introduced in [Darwiche, 2001], though it is not known how to do model counting efficiently for the full class of DNNF formulas/circuits. One sub-class for which model counting is efficient given the representation is that of d-DNNF formulas, though there is no efficient algorithm known to recognize whether a DNNF formula is d-DNNF.

A special case of d-DNNF formulas (with a minor change of syntax) that is easy to recognize is that of decision-DNNF formulas. This class of representations captures all of the practical model counting algorithms discussed in [Gomes et al., 2009] including those based on DPLL algorithms. Decision-DNNFs include Ordered Binary Decision Diagrams (OBDDs), which are canonical and have been highly effective representations for verification, and also Free BDDs (FBDDs), which are also known as read-once branching programs. Using a quasi-polynomial simulation of decision-DNNFs by FBDDs, [Beame et al., 2013, Beame et al., 2014] showed that the best decision-DNNF representations must be exponential even for many very simple 2-DNF predicates that arise in probabilistic databases.

Recently, [Darwiche, 2011] introduced another subclass of d-DNNF formulas called Sentential Decision Diagrams (SDDs). This class is strictly more general than OBDDs and (in its basic form) is similarly canonical. (OBDDs use a fixed ordering of variables, while SDDs use a fixed binary tree of variables, known as a vtree.) There has been substantial development and growing application of SDDs to knowledge representation problems, including a recently released SDD software package [SDD, 2014]. Indeed, SDDs hold potential to be more concise than OBDDs. [Van den Broeck and Darwiche, 2015] showed that compressing an SDD with a fixed vtree so that it is canonical can lead to an exponential blow-up in size, but much regarding the complexity of SDD representations has remained open.

In this paper we show the limitations both of general DNNFs and especially of SDDs. We show that the simulation of decision-DNNFs by FBDDs from [Beame et al., 2013] can be extended to yield a simulation of general DNNFs by OR-FBDDs, the nondeterministic extension of FBDDs, from which we can derive exponential lower bounds for DNNF representations of some simple functions. This latter simulation, as well as that of [Beame et al., 2013], is tight, since [Razgon, 2015a] (see also [Razgon, 2014]) shows a quasipolynomial separation between DNNF and OR-FBDD size using parameterized complexity.

For SDDs we obtain much stronger results. In particular, we relate the SDD size required to represent predicate to the ”best-case partition” communication complexity [Kushilevitz and Nisan, 1997] of . Using this, together with reductions to the communication complexity of disjointness (set intersection), we derive the following results:
(1) There are simple predicates given by 2-DNF formulas for which FBDD size is polynomial but for which SDD size must be exponential.
(2) For a natural, widely-studied class of database queries known as Unions of Conjunctive Queries (UCQ), the SDD size is linear iff the OBDD size is linear and is exponential otherwise (which corresponds to a query that contains an inversion [Jha and Suciu, 2013]).
(3) Similar lower bounds apply to the dual of UCQ, which consists of universal, positive queries.

To prove our SDD results, we show that for any predicate given by an SDD of size , using its associated vtree we can partition the variables of between two players, Alice and Bob, in a nearly balanced way so that they only need to send bits of communication to compute . The characterization goes through an intermediate step involving unambiguous communication protocols and a clever deterministic simulation of such protocols from [Yannakakis, 1991].

#### Related work:

The quasi-polynomial simulation of DNNFs by OR-FBDDs that we give was also shown independently in [Razgon, 2015b]. Beyond the lower bounds for decision-DNNFs in [Beame et al., 2013, Beame et al., 2014] which give related analyses for decision-DNNFs, the work of [Pipatsrisawat and Darwiche, 2010] on structured DNNFs is particularly relevant to this paper111We thank the conference reviewers for bringing this work to our attention.. [Pipatsrisawat and Darwiche, 2010] show how sizes of what they term (deterministic) -decompositions can yield lower bounds on the sizes of structured (deterministic) DNNFs, which include SDDs as a special case. [Pipatsrisawat, 2010] contains the full details of how this can be applied to prove lower bounds for specific predicates. These bounds are actually equivalent to lower bounds exponential in the best-partition nondeterministic (respectively, unambiguous) communication complexity of the given predicates. Our paper derives this lower bound for SDDs directly but, more importantly, provides the connection to best-partition deterministic communication complexity, which allows us to have a much wider range of application; this strengthening is necessary for our applications. Finally, we note that [Razgon, 2014] showed that SDDs can be powerful by finding examples where OBDDs using any order are quasipolynomially less concise than SDDs.

#### Roadmap:

We give the background and some formal definitions including some generalization required for this work in Section 2. We prove our characterization of SDDs in terms of best-partition communication complexity in Section 3 and derive the resulting bounds for SDDs for natural predicates in Section 4. We describe the simulation of DNNFs by OR-FBDDs, and its consequences, in Section 5.

## 2 Background and Definitions

We first give some basic definitions of DNNFs and decision diagrams.

###### Definition 2.0.

A Negation Normal Form (NNF) circuit is a Boolean circuit with gates, which may only be applied to inputs, and and gates. Further, it is Decomposable (DNNF) iff the children of each gate are reachable from disjoint sets of input variables. (Following convention, we call this circuit a “DNNF formula”, though it is not a Boolean formula in the usual sense of circuit complexity.) A DNNF formula is deterministic (d-DNNF) iff the functions computed at the children of each gate are not simultaneously satisfiable.

###### Definition 2.0.

A Free Binary Decision Diagram (FBDD) is a directed acyclic graph with a single source (the root) and two specified sink nodes, one labeled 0 and the other 1. Every non-sink node is labeled by a Boolean variable and has two out-edges, one labeled 0 and the other 1. No path from the root to either sink is labeled by the same variable more than once. It is an OBDD if the order of variable labels is the same on every path. The Boolean function computed by an FBDD is 1 on input iff there is a path from the root to the sink labeled 1 so that for every node label on the path, is the label of the out-edge taken by the path. An OR-FBDD is an FBDD augmented with additional nodes of arbitrary fan-out labeled . The function value for the OR-FBDD follows the same definition as for FBDDs; the -nodes simply make more than one path possible for a given input. (See [Wegener, 2000].)

We now define sentential decision diagrams as well as a small generalization that we will find useful.

###### Definition 2.0.

For a set , let and denote the constant function and constant function, respectively.

###### Definition 2.0.

We say that a set of Boolean functions , where each has domain , is disjoint if for each , . We call a partition if it is disjoint and .

###### Definition 2.0.

A vtree for variables is a full binary tree whose leaves are in one-to-one correspondence with the variables in .

We define Sentential Decision Diagrams (SDDs) together with the Boolean functions they represent and use to denote the mapping from SDDs into Boolean functions. (This notation is extended to sets of SDDs yielding sets of Boolean functions.) At the same time, we also define a directed acyclic graph (DAG) representation of the SDD.

###### Definition 2.0.

is an SDD that respects vtree rooted at iff:

• or .
Semantics: and .
consists of a single leaf node labeled with .

• or and is a leaf with variable .
Semantics: and
consists of a single leaf node labeled with .

• , is an internal vertex with children and , are SDDs that respect the subtree rooted at , are SDDs that respect the subtree rooted at , and is a partition.
Semantics:
has a circle node for labeled with child box nodes labeled by the pairs . A box node labeled has a left child that is the root of and and a right child that is the root of . The rest of is the (non-disjoint) union of graphs and with common sub-DAGs merged. (See Figure 1.)

Each circle node in itself represents an SDD that respects a subtree of rooted at some vertex of ; We say that is in and use to denote the collection of in that respect the subtree rooted at . The size of an SDD is the number of nodes in .

Circle nodes in may be interpreted as OR gates and paired box nodes may be interpreted as AND gates. In the rest of this paper, we will view SDDs as a class of Boolean circuit. The vtree property and partition property of SDDs together ensure that this resulting circuit is a d-DNNF.

We define a small generalization of vtrees which will be useful for describing SDDs with respect to a partial assignment of variables.

###### Definition 2.0.

A pruned vtree for variables is a full binary tree whose leaves are either marked stub or by a variable in , and whose leaves marked by variables are in one-to-one correspondence with the variables in .

We generalize SDDs so that they can respect pruned vtrees. The definition is almost identical to that for regular SDDs so we only point out the differences.

###### Definition 2.0.

The definition of a pruned SDD respecting a pruned vtree , its semantics, and its graph , are identical to those of an SDD except that

• if the root vertex of is a stub then must be or , and

• if the root vertex of is internal then we only require that are disjoint but not necessarily that they form a partition.

We now sketch a very brief overview of the communication complexity we will need. Many more details may be found in [Kushilevitz and Nisan, 1997]. Given a Boolean function on , one can define two-party protocols in which two players, Alice, who receives and Bob, who receives exchange a sequence of messages to compute . (After each bit, the player to send the next bit must be determined from previous messages.) The (deterministic) communication complexity of , , is the minimum value over all protocols computing such that all message sequences are of length at most . The one-way deterministic communication complexity of , is the minimum value of over all protocols where Alice may send messages to Bob, but Bob cannot send messages to Alice.

For nondeterministic protocols, Alice simply guesses a string based on her input and sends the resulting message to Bob, who uses together with to verify whether or not . The communication complexity in this case is the minimum over all protocols. Such a protocol is unambiguous iff for each pair such that there is precisely one message that will cause Bob to output 1. A set of the form for , is called a rectangle. The minimum of over all unambiguous protocols is the unambiguous communication complexity of ; it is known to be the logarithm base 2 of the minimum number of rectangles into which one can partition the set of inputs on which is 1.

A canonical hard problem for communication complexity is the two-party disjointness (set intersection) problem, where and are indicator vectors of sets in . It has deterministic communication complexity (and requires bits be sent even with randomness, but that is beyond what we need). We will need a variant of the “best partition” version of communication complexity in which the protocol includes a choice of the best split of input indices and between Alice and Bob.

A typical method for proving lower bounds on OBDD size for a Boolean function begins by observing that a size OBDD may be simulated by a -bit one-way communication protocol where Alice holds the first half of the variables read by the OBDD and Bob holds the second half. In this protocol, Alice starts at the root of the OBDD and follows the (unique) OBDD path determined by her half of the input until she reaches a node querying a variable held by Bob. She then sends the identity of the node to Bob, who can finish the computation starting from . Thus, if we show that has one-way communication complexity at least in the best split of its input variables, then any OBDD computing must have at least nodes.

Our lower bound for SDDs uses related ideas but in a more sophisticated way, and instead of providing a one-way deterministic protocol, we give an unambiguous protocol that simulates the SDD computation. In particular, the conversion to deterministic protocols requires two-way communication.

## 3 SDDs and Best-Partition Communication Complexity

In this section, we show how we can use any small SDD representing a function to build an efficient communication protocol for given an approximately balanced partition of input variables that is determined by its associated vtree. As a consequence, any function requiring large communication complexity under all such partitions requires large SDDs. To begin this analysis, we consider how an SDD simplifies under a partial assignment to its input variables.

### 3.1 Pruning SDDs Using Restrictions

###### Definition 3.0.

Suppose that is a pruned vtree for a set of variables , and that is a vertex in . Let denote the set of variables that are descendants of in and . Also let denote the (unique) vertex in that has as a child.

We define a construction to capture what happens to an SDD under a partial assignment of its variables.

###### Definition 3.0.

Let be an SDD that respects , a vtree for the variables , and suppose that computes the function . Let and and let be an assignment to the variables in . Let be Boolean circuit remaining after plugging the partial assignment into the SDD and making the following simplifications:

1. If a gate computes a constant under the partial assignment , we can replace that gate and its outgoing edges with .

2. Remove any children of OR-gates that compute .

3. Remove any nodes disconnected from the root.

For each vtree vertex that was not removed in this process, we denote its counterpart in the pruned vtree by .

Construct the pruned vtree from as follows: for each vertex , if and , replace and its subtree by a stub. We say that we have pruned the subtree rooted at . (See Figure 2 for an example of an SDD and its vtree both before and after pruning.)

For , we call a shell partition for if there is a vtree vertex such that . We call the shell. If, for a restriction , there exists a vtree vertex such that , we call a shell restriction.

###### Proposition 3.0.

Let be an SDD that respects , a vtree for the variables , and suppose that computes the function . Let and be a partial assignment of the variables in . The pruned SDD has the following properties:
(a) .
(b) is a pruned SDD respecting .
(c) is a subgraph of .

###### Proof.

(a): An SDD may be equivalently described as a Boolean circuit of alternating OR and AND gates. For any Boolean circuit in the variables that computes , plugging in the values for the restriction yields a circuit computing . Furthermore, the simplification steps do not change the function computed.

(b): For each such that and , we have replaced the subtree rooted at by a stub and replaced the SDDs in respecting by either or . Thus respects .

We now check that is a pruned SDD. In particular we need to ensure that for each SDD in , the corresponding pruned SDDs that remain from in its pruned counterpart represent a collection of disjoint functions. From the first part of this proposition, these are for some , where we have only included those SDDs that are consistent under . Since the original set of SDDs was a partition and thus disjoint, this set of restricted (pruned) SDDs is also disjoint.

(c): The process in Definition 3.1 only removes nodes from to construct . Further, it does not change the label of any SDD that was not removed. ∎

### 3.2 Unambiguous Communication Protocol for SDDs

The way that we will partition the input variables to an SDD between the parties Alice and Bob in the communication protocol will respect the structure of its associated vtree. The restrictions will correspond to assignments that reflect Alice’s knowledge of the input and will similarly respect that structure.

Notice that a vtree cut along an edge (where is the parent of ) induces a shell partition for consisting of the set , and the shell .

###### Proposition 3.0.

Let be an SDD of size computing a function that respects a vtree . Suppose that is a shell partition for and that is its shell. Let be the vertex in for which and .

For any shell restriction , the set is a disjoint collection of functions.

###### Proof.

For non-shell restrictions , the collection of functions for a vtree node is not disjoint; we need to use the specific properties of and . Since was a shell restriction, the pruned vtree takes the form of a path of internal vertices, where is the root of , and , with the other child of each of being a stub, together with a vtree for the variables rooted at . We will show that if is disjoint then so is . This will prove the proposition since only contains the function and is therefore trivially disjoint.

We will use the fact that every pruned-SDD from is contained in some SDD from . We have two cases to check: is either a left child or a right child of .

If was a right child then each pruned-SDD contained in takes the form . Then and is therefore disjoint by assumption.

Otherwise suppose that is the left child of . Let . Let where and , being a collection of primes for , is disjoint. By assumption is disjoint, so for any other distinct from , we have . Then for any and , we have . Thus is disjoint. ∎

###### Theorem 3.1.

Let be an SDD of size that respects a vtree and suppose that it computes the function Suppose that is a shell partition for and that is the shell. Let be the vertex in for which and .

Consider the communication game where Alice has the variables , Bob has the variables , and they are trying to compute . There is a -bit unambiguous communication protocol computing .

###### Proof.

Suppose that Alice and Bob both know the SDD . Let be the partial assignment corresponding to Alice’s input. This is a shell restriction. Alice may then privately construct the pruned SDD , which computes by Proposition 3.1. Further, evaluates to under Bob’s input if and only if there exists a pruned-SDD such that .

By Proposition 3.2, is disjoint. Also, since is a shell restriction with shell , and , every SDD in was unchanged by . In particular, this means that and any pruned-SDD can be viewed as some that is also in .

For the protocol Alice nondeterministically selects an from and then sends its identity as a member of to Bob. This requires at most bits. Bob will output 1 on his input if and only if , which he can test since he knows and . This protocol is unambiguous since the fact that is disjoint means means that for any input to Bob there is at most one such that . Since Bob knows , he also knows and can therefore compute . Since computes , if then . Otherwise all of the functions in evaluate to on input so . ∎

We can relate the deterministic and unambiguous communication complexities of a function using the following result from [Yannakakis, 1991]. We include a proof of this result in the appendix for completeness.

###### Theorem 3.2 (Yannakakis).

If there is an -bit unambiguous communication protocol for a function , then there is a -bit deterministic protocol for .

The following - lemma is standard.

###### Lemma 3.2.

For a vtree for variables, if a vertex satisfies , we call it a vertex. Every vtree contains a vertex.

###### Definition 3.2.

Let be a set of variables and a partition of . We call the partition a -partition for if . That is, the minimum size of one side of the partition is at least a -fraction of the total number of variables.

The best -partition communication complexity of a Boolean function is where the minimum is taken over all -partitions .

###### Theorem 3.3.

If the best -partition communication complexity of a Boolean function is , then an SDD computing has size at least .

###### Proof.

Suppose that is an SDD of size respecting the vtree for variables , and that computes . From Lemma 3.2 the vtree contains a vertex . This vertex induces a -partition of the variables where and . Further, this partition is a shell partition. By Theorem 3.1, there exists a -bit unambiguous communication protocol for . Then by Theorem 3.2, there exists a -bit deterministic communication protocol for . Since the best -partition communication complexity of is , we have that which implies that as stated. ∎

## 4 Lower Bounds for SDDs

There are a large number of predicates for which the -partition communication complexity is and by Theorem 3.3 each of these requires SDD size . The usual best-partition communication complexity is -partition communication complexity. For example, the function ShiftedEQ which takes as inputs and and tests whether or not where is the cyclic shift of by positions. However, as is typical of these functions, the same proof which shows that the -partition communication complexity of ShiftedEQ is also shows that its -partition communication complexity is . However, most of these functions are not typical of predicates to which one might want to apply weighted model counting. Instead we analyze SDDs for formulas derived from a natural class of database queries. We are able to characterize SDD size for these queries, proving exponential lower bounds for every such query that cannot already be represented in linear size by an OBDD. This includes an example of a query called for which FBDDs are polynomial size but the best SDD requires exponential size.

### 4.1 SDD Knowledge Compilation for Database Query Lineages

We analyze SDDs for a natural class of database queries called the union of conjunctive queries (UCQ). This includes all queries given by the grammar

 q::=R(x)∣∃xq∣q∧q∣q∨q

where is an elementary relation and is a variable. For each such query , given an input database , the query’s lineage, , is a Boolean expression for over Boolean variables that correspond to tuples in . In general, one thinks of the query size as fixed and considers the complexity of query evaluation as a function of the size of the database. The following formulas are lineages (or parts thereof) of well-known queries that that are fundamental for probabilistic databases [Dalvi and Suciu, 2012, Jha and Suciu, 2013] over a particular database (called the complete bipartite graph of size in [Jha and Suciu, 2013]):

 H0 =⋁i,j∈[m]RiSijTj QV =⋁i,j∈[m]RiSij∨SijTj∨RiTj H1 =⋁i,j∈[m]RiSij∨SijTj Hk0 =⋁i∈[m]RiS1ijfor k≥1 Hkℓ =⋁i,j∈[m]SℓijSℓ+1ijfor 0<ℓ

(The corresponding queries are represented using lower case letters and involve unary relations and , as well as binary relations and . For example, .) The following lemma will be useful in identifying subformulas of the above query lineages that can be used to compute the set disjointness function.

###### Proposition 4.0.

Let the elements of be partitioned into two sets and , each of size at least . Let denote and denote . Define . That is, for is split into two nonempty pieces by the partition. Similarly, define . Then

###### Proof.

Suppose that both and . By definition, if then one of or contains an entire row, , say without loss of generality. This implies that no column is entirely contained in . Since , there is some column that is entirely contained in . This in turn implies that does not contain any full row. In particular, we have that contains all rows in and all columns in and thus and so . By assumption, . Hence and so . ∎

###### Theorem 4.1.

For , the best -partition communication complexity of , , and of is at least .

###### Proof.

Let be the set of variables appearing in (or ) and let be a -partition of . Let be the partition of induced by and define and as in Proposition 4.1. Since and only elements of are relevant, for and hence . We complete the proof by showing that computing and each require at least bits of communication between Alice and Bob. We will do this by showing that for a particular subset of inputs, is equivalent to the disjointness function for a size set.

Suppose without loss of generality that . Set all and for each set . For each for which , set all to , let be minimal such that , and set to for all . (Such an index must exist since .) Similarly, For each for which , set all to , let be minimal such that , and set to for all . In particular, under this partial assignment, we have

 QV=H1=⋁i∈WRowRiSiji

and for each , Alice holds one of or and Bob holds the other. We can reduce to the same quantity by setting all . This is precisely the set disjointness problem on two sets of size where membership of in each player’s set is determined by the value of the unset bit indexed by that player holds. Therefore, computing or requires at least bits of communication, as desired. ∎

Combining this with Theorem 3.3, we immediately obtain the following:

###### Theorem 4.2.

For , any SDD representing or requires size at least .

As [Jha and Suciu, 2013] has shown that has FBDD size , we obtain the following separation.

###### Corollary 4.2.

FBDDs can be exponentially more succinct than SDDs. In particular, has FBDD size but every SDD for requires size for .

We now consider the formulas above. Though they seem somewhat specialized, these formulas are fundamental to UCQ queries: [Jha and Suciu, 2013] define the notion of an inversion in a UCQ query and use it to characterize the OBDD size of UCQ queries. In particular they show that if a query is inversion-free then the OBDD size of its lineage is linear and if has an minimum inversion length then it requires OBDD size where is the domain size of all attributes. Jha and Suciu obtain this lower bound by analyzing the we defined above. (We will not define the notion of inversions, or their lengths, and instead use the definition as a black box. However, as an example, the query associated with has an inversion of length 1 so its OBDD size is .)

###### Proposition 4.2.

[Jha and Suciu, 2013] Let be a query with a length inversion. Let be the complete bipartite graph of size . There exists a database for , along with variable restrictions for all , such that and

###### Theorem 4.3.

Let and assume that . Let be a query with a length inversion. Then there exists a database for which any SDD for has size at least .

###### Proof.

Given a query , let be the database for constructed in Proposition 4.1. Fix the vtree over respected by an SDD for . By Lemma 3.2, there exists a node in the vtree that gives a partition of . By Proposition 4.1, there are restrictions such that for all . Thus is a (pruned) SDD, of size that of , respecting and computing . Observe that the restriction of to the variables of is also shell partition of at node .

We will show that there must exist an for which and therefore by Theorem 3.2, this implies that the unambiguous communication complexity of is at least Then by Theorem 3.1, any SDD respecting that computes has size at least .

Let contain all pairs for which both and and Let . We will consider two cases: either or .

In the first case, since , there must exist at least tuples for which either and or vice-versa. Call the set of these tuples . Then, since there are choices of , there exists some such that the set contains at least elements. If we set all variables of outside of to , the function corresponds to solving a disjointness problem between Alice and Bob on the elements of . Thus the communication complexity of under the partition is at least .

In the second case, consider the largest square submatrix of that does not contain any member of . We mimic the argument of Theorem 4.1 on this submatrix . By definition, has side . For every in , either or contains all ; let be those such that these are in and be those for which they are in . Since and there are at most variables not in ,

 |A|,|B| ≥[(km2+2m)/3−2m+(γ2+2γ)km2]/k =[(1−γ)2−2/3−4/(3km)]m2>(m/18)2)

since . Applying Proposition 4.1, we see that . By the same argument presented in the proof of Theorem 4.1, we have both and so at least one of these is at least and the theorem follows. ∎

It follows that for inversion-free UCQ queries, both SDD and OBDD sizes of any lineage are linear, while UCQ queries with inversions (of length ) have worse-case lineage size that is exponential ( for OBDDs and for SDDs). Note that the same SDD size lower bound for UCQ query lineage applies to its dual as follows: Flipping the signs on the variables in yields a function equivalent to . So flipping the variable signs at the leaves of an SDD for we obtain an SDD of the same size for and hence a deteministic protocol that also can compute .

## 5 Simulating DNNFs by OR-FBDDs

In this section, we extend the simulation of decision-DNNFs by FBDDs from [Beame et al., 2013] to obtain a simulation of general DNNFs by OR-FBDDs with at most a quasipolynomial increase in size. This simulation yields lower bounds on DNNF size from OR-FBDD lower bounds. This simulation is also tight, since  [Razgon, 2015a, Razgon, 2014] has shown a quasipolynomial separation between the sizes of DNNFs and OR-FBDDs.

###### Definition 5.0.

For each AND node in a DNNF , let be the number of AND nodes in the subgraph . We call ’s left child and its right child . We will assume (otherwise we swap and ).

For each AND node , we classify the edge as a light edge and the edge a heavy edge. We classify every other edge in as a neutral edge.

For a DNNF or an OR-FBDD , we denote the functions that and compute as and .

### Constructing the OR-FBDD

For a DNNF , we will treat a leaf labeled by the variable as a decision node that points to a -sink node if and a -sink node if , and vice-versa for a leaf labeled by . We also assume that each AND node has just two children, which only affects the DNNF size by at most polynomially.

###### Definition 5.0.

Fix a DNNF . For a node in and a path from the root to , let be the set of light edges along and .

We will construct an OR-FBDD that computes the same boolean function as . Its nodes are pairs where is a node in and the set of light edges belongs to . Its root is The edges in are of three types:

Type 1: For each light edge in and , add the edge to .

Type 2: For each neutral edge in and , add the edge to .

Type 3: For each heavy edge , let be its sibling light edge. For each and 1-sink node in , add the edge to .

We label the nodes as follows: (1) if u is a decision node in for the variable then is a decision node in testing the same variable , (2) if is an AND-node, then is a no-op node, (3) if is an OR node it remains an OR node. (4) if is a 0-sink node, then is a 0-sink node, (5) if is a 1-sink node, then: if then is a 1-sink node, otherwise it is a no-op node.

We show an example of this construction in Figure 3.

### Size and Correctness

###### Lemma 5.0.

For the DNNF let denote the maximum number of light edges from the root to a leaf, the number of AND nodes and N the total number of nodes. Then has at most nodes. Further, this is .

###### Proof.

The nodes in are labeled . There are possible nodes and at most choices for the set , as each path to has at most light edges.

Consider a root to leaf path with light edges. As we traverse this path, every time we cross a light edge, we decrease the number of descendant AND nodes by more than half. Thus we must have begun with more than descendant AND nodes at the root so that . This implies that is quasipolynomial in ,

This upper bound is quasipolynomial in , we will show that . Then, since , . ∎

The proof of the following lemma is in the full paper.

###### Lemma 5.0.

is a correct OR-FBDD with no-op nodes that computes the same function as .

Using the quasipolynomial simulation of DNNFs by OR-FBDDs, we obtain DNNF lower bounds from OR-FBDD lower bounds.

###### Definition 5.0.

Function takes an boolean matrix as input and outputs if and only if is a permutation matrix. The function takes an boolean matrix as input and outputs if and only if has an all- row or an all- column.

###### Theorem 5.1.

Any OR-FBDD computing or , must have size  [Wegener, 2000].

###### Corollary 5.1.

Any DNNF computing or has size at least

## 6 Discussion

We have made the first significant progress in understanding the complexity of general DNNF representations. We have also provided a new connection between SDD representations and best-partition communication complexity. Best-partition communication complexity is a standard technique used to derive lower bounds on OBDD size, where it often yields asymptotically tight results. For communication lower bound , the lower bound for OBDD size is and the lower bound we have shown for SDD size is . This is a quasipolynomial difference and matches the quasipolynomial separation between OBDD and SDD size shown in [Razgon, 2014]. Is there always a quasipolynomial simulation of SDDs by OBDDs in general, matching the quasipolynomial simulation of decision-DNNFs by FBDDs? Our separation result shows an example for which SDDs are sometimes exponentially less concise than FBDDs, and hence decision-DNNFs also. Are SDDs ever more concise than decision-DNNFs?

By plugging in the arguments of [Pipatsrisawat and Darwiche, 2010, Pipatsrisawat, 2010] in place of Theorem 3.1, all of our lower bounds immediately extend to size lower bounds for structured deterministic DNNFs (d-DNNFs), of which SDDs are a special case. It remains open whether structured d-DNNFs are strictly more concise than SDDs. [Pipatsrisawat and Darwiche, 2008, Pipatsrisawat, 2010] have proved an exponential separation between structured d-DNNFs and OBDDs using the Indirect Storage Access (ISA) function [Breitbart et al., 1995], but the small structured d-DNNF for this function is very far from an SDD. It is immediate that, under any variable partition, the function has an -bit two-round deterministic communication protocol. On the other hand, efficient one-round (i.e., one-way) communication protocols yield small OBDDs so there are two possibilities if SDDs and structured d-DNNFs have different power. Either (1) communication complexity considerations on their own are not enough to derive a separation between SDDs and structured d-DNNFs, or (2) every SDD can be simulated by an efficient one-way communication protocol, in which case SDDs can be simulated efficiently by OBDDs (though the ordering cannot be the same as the natural traversal of the associated vtree, as shown by [Xue et al., 2012]).

## Acknowledgements

We thank Dan Suciu and Guy Van den Broeck for helpful comments and suggestions.

## References

• [Beame et al., 2013] Beame, P., Li, J., Roy, S., and Suciu, D. (2013). Lower bounds for exact model counting and applications in probabilistic databases. In UAI, pages 157–162.
• [Beame et al., 2014] Beame, P., Li, J., Roy, S., and Suciu, D. (2014). Counting of query expressions: Limitations of propositional methods. In ICDT, pages 177–188.
• [Breitbart et al., 1995] Breitbart, Y., Hunt III, H. B., and Rosenkrantz, D. J. (1995). On the size of binary decision diagrams representing boolean functions. Theor. Comput. Sci., 145(1&2):45–69.
• [Dalvi and Suciu, 2012] Dalvi, N. N. and Suciu, D. (2012). The dichotomy of probabilistic inference for unions of conjunctive queries. J. ACM, 59(6):30.
• [Darwiche, 2001] Darwiche, A. (2001). Decomposable negation normal form. J. ACM, 48(4):608–647.
• [Darwiche, 2011] Darwiche, A. (2011). SDD: A new canonical representation of propositional knowledge bases. In IJCAI 2011, pages 819–826.
• [Gomes et al., 2009] Gomes, C. P., Sabharwal, A., and Selman, B. (2009). Model counting. In Handbook of Satisfiability, pages 633–654. IOS Press.
• [Huang and Darwiche, 2007] Huang, J. and Darwiche, A. (2007). The language of search. JAIR, 29:191–219.
• [Jha and Suciu, 2013] Jha, A. K. and Suciu, D. (2013). Knowledge compilation meets database theory: Compiling queries to decision diagrams. Theory Comput. Syst., 52(3):403–440.
• [Kushilevitz and Nisan, 1997] Kushilevitz, E. and Nisan, N. (1997). Communication Complexity. Cambridge University Press, Cambridge, England ; New York.
• [Pipatsrisawat and Darwiche, 2008] Pipatsrisawat, K. and Darwiche, A. (2008). New compilation languages based on structured decomposability. In AAAI, pages 517–522.
• [Pipatsrisawat and Darwiche, 2010] Pipatsrisawat, K. and Darwiche, A. (2010). A lower bound on the size of Decomposable Negation Normal Form. In AAAI, pages 345–350.
• [Pipatsrisawat, 2010] Pipatsrisawat, T. (2010). Reasoning with Propositional Knowledge: Frameworks for Boolean Satisfiability and Knowledge Compilation. PhD thesis, UCLA.
• [Razgon, 2014] Razgon, I. (2014). On obdds for cnfs of bounded treewidth. In Baral, C., Giacomo, G. D., and Eiter, T., editors, Principles of Knowledge Representation and Reasoning: Proceedings of the Fourteenth International Conference, KR 2014, Vienna, Austria, July 20-24, 2014. AAAI Press.
• [Razgon, 2015a] Razgon, I. (2015a). On the read-once property of branching programs and CNFs of bounded treewidth. CoRR, abs/1411.0264v3.
• [Razgon, 2015b] Razgon, I. (2015b). Quasipolynomial simulation of DNNF by a non-determinstic read-once branching program. In Pesant, G., editor, Principles and Practice of Constraint Programming - 21st International Conference, CP 2015, Cork, Ireland, August 31 - September 4, 2015, Proceedings, volume 9255 of Lecture Notes in Computer Science, pages 367–375. Springer.
• [SDD, 2014] SDD (2014). The SDD Package: Version 1.1.1.
• [Van den Broeck and Darwiche, 2015] Van den Broeck, G. and Darwiche, A. (2015). On the role of canonicity in knowledge compilation. In AAAI, pages 1641–1648.
• [Wegener, 2000] Wegener, I. (2000). Branching programs and binary decision diagrams: theory and applications. SIAM, Philadelphia, PA, USA.
• [Xue et al., 2012] Xue, Y., Choi, A., and Darwiche, A. (2012). Basing decisions on sentences in decision diagrams. In AAAI, pages 842–849.
• [Yannakakis, 1991] Yannakakis, M. (1991). Expressing combinatorial optimization problems by linear programs. Journal of Computer and System Sciences, 43(3):441–466.

## Appendix A Proof of Theorem 3.2

Let be a function with unambiguous communication complexity and let be its communication matrix. Then there exists a set of disjoint monochromatic rectangles that cover the ’s of .

Let be a graph whose nodes are the rectangles in and which has an edge connecting two rectangles if they share some row of . Then each row of corresponds to a clique containing the rectangles intersecting . Similarly, every column corresponds to an independent set containing the rectangles intersecting . For each row and column , the corresponding entry is if and only if . Thus for proving the theorem, it suffices to give a deterministic protocol for solving the Clique vs Independent set problem on a graph with vertices.

The protocol reduces the graph in each step. Suppose that Alice holds a clique of an vertex graph and Bob holds an independent set . In each round Alice sends a node that is adjacent to fewer than half the nodes of , or if no such node exists, she notifies Bob.

If Alice sent the node , then Bob responds with whether (i) , in which case , or (ii) that is not adjacent to any node of , in which case . If neither (i) nor (ii) occur then the nodes not adjacent to are removed from as they cannot be in and the protocol repeats.

Otherwise, if every is adjacent to over half the nodes of , Bob sends a node that is adjacent to at least half the nodes in if such a exists. In this case Alice tells Bob that (i) so that , or (ii) is adjacent to all nodes in so that . Otherwise, Bob says he has no such and the nodes adjacent to are removed from and the protocol repeats.

Each iteration of this protocol removes at least half the nodes so that there are at most iterations. The communication per iteration is at most (to either send one of nodes or that no good node exists).

## Appendix B Proof of Lemma 5

###### Lemma B.0.

is a correct OR-FBDD with no-op nodes.

###### Proof.

We need to show that is acyclic and that every path reads a variable at most once. These two properties follow from the lemma:

###### Lemma B.0.

If is a leaf node in labeled by the variable and there exists a non-trivial path (with at least one edge) between the nodes in , then the variable does not occur in .

This lemma implies that is acyclic: a cycle in implies a non-trivial path from some node to itself, but . It also implies that every path in is read-once: if a path tests a variable twice, first at and again at