<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Towards Deterministic Decomposable Circuits for Safe Queries</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Mikael Monet</string-name>
          <email>mikael.monet@telecom-paristech.fr</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Dan Olteanu</string-name>
          <email>dan.olteanu@cs.ox.ac.uk</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>LTCI</institution>
          ,
          <addr-line>Telecom ParisTech</addr-line>
          ,
          <institution>Universite Paris-Saclay, France</institution>
          ,
          <addr-line>Inria Paris; Paris</addr-line>
          ,
          <country country="FR">France</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>University of Oxford</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>There exist two approaches for exact probabilistic inference of UCQs on tuple-independent databases. In the extensional approach, query evaluation is performed within a DBMS by exploiting the structure of the query. In the intensional approach, one rst builds a representation of the lineage of the query on the database, then computes the probability of the lineage. In this paper we propose a new technique to construct lineage representations as deterministic decomposable circuits in PTIME. The technique can apply to a class of UCQs that has been conjectured to separate the complexity of the two approaches. We test our technique experimentally, and show that it succeeds on all the queries of this class up to a certain size parameter, i.e., over 20 million queries.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        Probabilistic databases [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] have been introduced in answer to the need to
capture data uncertainty and reasoning about it. This uncertainty can come from
various angles: imperfect sensor precision of scienti c data, imprecise automatic
processes (e.g., natural language processing, rule mining in knowledge bases),
untrusted data sources (e.g., web crawling), etc. In their simplest and most
common form, probabilistic databases consist of a relational database where each
tuple is annotated with a probability value that is supposed to represent how
con dent we are about having this tuple in the database. While a traditional
(deterministic) database can only satisfy or violate a Boolean query, a
probabilistic database has a certain probability of satisfying it. Given a Boolean query
Q the probabilistic query evaluation problem for Q (PQE(Q)) then asks for the
probability that the query holds on an input probabilistic database. We measure
the complexity of PQE(Q) as a function of the input database, hence
considering that the Boolean query Q is xed. This is known as data complexity, and is
motivated by the fact that the queries are usually much smaller than the data.
      </p>
      <p>
        Unfortunately, even for very simple queries, PQE(Q) can be intractable.
When Q is a union of conjunctive queries (UCQ), a dichotomy result is provided
by the work of Dalvi and Suciu [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]: either Q is safe and PQE(Q) is PTIME, or Q
is not safe and PQE(Q) is #P-hard. The algorithm to compute the probability
of a safe UCQ exploits the rst order structure of the query to nd a so called
safe query plan (using extended relational operators that can manipulate
probabilities) and can be implemented within a DBMS. This approach is referred to
as extensional query evaluation, or lifted inference.
      </p>
      <p>A second approach to PQE is intensional query evaluation or grounded
inference, and consists of two steps. First, compute a representation of the lineage
of the query Q on the database D, which is a Boolean formula intuitively
representing which tuples of D su ce to satisfy Q. Second, perform weighted model
counting on the lineage to obtain the probability. To ensure that model counting
is tractable, we use the structure of the query to represent the lineage in tractable
formalisms from the eld of knowledge compilation, such as read once Boolean
formulas, free or ordered binary decision diagrams (OBDDs, FBDDs),
deterministic decomposable normal forms (d-DNNFs), decision decomposable normal
forms (dec-DNNFs), deterministic decomposable circuits (d-Ds), etc. The main
advantage of this approach compared to lifted inference is that the lineage can
help explain the query answer. Moreover, having the lineage in a good knowledge
compilation formalism can be useful for other applications: we could for instance
change the tuples' probabilities and compute the new result easily, or compute
the most probable state of the database that satis es the query.</p>
      <p>
        What we call the q9 conjecture, formulated by Dalvi, Jha, and Suciu [
        <xref ref-type="bibr" rid="ref2 ref3">2, 3</xref>
        ],
states that for safe queries, extensional query evaluation is strictly more powerful
than the knowledge compilation approach. Or in other words, that there exists
a query which is safe (i.e., can be handled by the extensional approach) whose
lineages on arbitrary databases cannot be computed in PTIME in a knowledge
compilation formalism that allows tractable weighted model counting (i.e.,
cannot be handled by the intensional approach). Note that the conjecture depends
on the tractable formalism that we consider. The conjecture has recently been
shown by Beame, Li, Roy, and Suciu [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] to hold for the formalism of dec-DNNFs
(including OBDDs and FBDDs), which captures the traces of modern model
counting algorithms. Another independent result by Bova and Szeider [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] shows
that the conjecture also holds when we consider the class of deterministic
structured negation normal forms (d-SDNNFs), which are d-DNNFs that follow the
structure of a v-tree [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. However the question is still open for more expressive
formalisms, namely, d-DNNFs and d-Ds. Maybe the conjecture fails for such
expressive formalisms, i.e., maybe the reason why PQE is PTIME for safe queries is
because we can build deterministic decomposable circuits in PTIME for them?
      </p>
      <p>
        In this paper we focus on a class of queries (the H-queries) that was
conjectured in [
        <xref ref-type="bibr" rid="ref2 ref3">2, 3</xref>
        ] to separate the two approaches and that was used to prove the
conjecture for dec-DNNFs [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] and d-SDNNFs [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. Our rst contribution is to
develop a new technique to build d-DNNFs and d-Ds in polynomial time for the
H-queries, based on what we call nice Boolean functions. Because we were not
able to prove that this technique works for all the safe H-queries, our second
contribution is to test this technique with the help of the SAT solver Glucose [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]
on all the H queries up to a certain size parameter, that we generated
automatically. We found no query on which it does not work. Interestingly, we found a
few queries for which we can build d-Ds with a single internal negation at the
very top, whereas we do not know if we can build d-DNNFs (could these queries
separate UCQ(d-DNNF) and UCQ(d-D)?). We conjecture that this technique
can build d-Ds for all safe H-queries.
      </p>
      <p>
        To do this analysis, we had to solve a task of independent interest, namely,
computing explicitly the list of all inequivalent monotone Boolean functions on
7 variables. This task had previously been undertaken by Caze, Humphries, and
Gutkin [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] and by Stephen and Yusun [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. We reused parts of the code from [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]
and con rmed the number of such functions: 490; 013; 148.
      </p>
      <p>
        Paper structure We start our presentation with preliminaries in Section 2. We
then de ne the H-queries in Section 3 and review what is known about them.
In Section 4 we introduce our technique, and we experimentally demonstrate its
e ectiveness in Section 5. Our code and all the functions are available online [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ].
2
      </p>
    </sec>
    <sec id="sec-2">
      <title>Preliminaries</title>
      <p>We will consider in this work the most commonly used model for probabilistic
databases: the tuple-independent model, where each tuple is annotated with a
probability of being present or absent, assuming independence across tuples:
De nition 1. A tuple-independent (TID) database is a pair (D; ) consisting
of a relational instance D and a function mapping each tuple t 2 D to a
rational probability (t) 2 [0; 1]. A TID instance (D; ) de nes a probability
distribution Pr on D0 D, where Pr(D0) := Qt2D0 (t) Qt2DnD0 (1 (t)). Given
a Boolean query Q, the probabilistic query evaluation problem for Q (PQE(Q))
asks, given as input a TID instance (D; ), the probability that Q is satis ed in
the distribution Pr. That is, formally, Pr(Q; (D; )) := PD0 D s.t. D0j=Q Pr(D0).</p>
      <p>
        Dalvi and Suciu [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] have shown a dichotomy result on UCQs for PQE: either
Q is safe and PQE(Q) is PTIME, or Q is not safe and PQE(Q) is #P-hard.
Moreover they show that all the safe queries can be handled by the extensional
approach, i.e., by using the structure of the query to compute the probability.
Due to space constraints, we point to [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] for a presentation of their algorithm
to compute the probability of a safe query, though it is not strictly necessary
to understand the current paper. We denote by UCQ(P) the set of safe UCQs
(hence which corresponds to the set of tractable UCQs if P 6= #P).
      </p>
      <p>By contrast, in the intentional approach, one rst computes a representation
of the lineage Lin(Q; D) of the query Q on the instance D:
De nition 2. The lineage of a Boolean query Q over D is a Boolean formula
Lin(Q; D) on the tuples of D mapping each Boolean valuation : D ! f0; 1g to 1
or 0 depending on whether D satis es Q or not, where D := ft 2 D j (t) = 1g.</p>
      <p>
        The lineage can be represented with any formalism that represents Boolean
functions (Boolean formulas, BDDs, Boolean circuits, etc), but the crucial idea
is to use a formalism that allows tractable probability computation. In this
work we will speci cally focus on deterministic decomposable circuits (d-Ds)
and deterministic decomposable normal forms [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] (d-DNNFs).
      </p>
      <p>De nition 3. Let C be a Boolean circuit (featuring and, or, not, and variable
gates). An and-gate g of C is decomposable if for every two input gates g1 6= g2
of g we have Vars(g1) \ Vars(g2) = ;, where Vars(g) denotes the set of variable
gates that have a directed path to g in C. We call C decomposable if each
andgate is. An or-gate g of C is deterministic if there is no pair g1 6= g2 of input
gates of g and valuation of the variables such that g1 and g2 both evaluate to 1
under . We call C deterministic if each or-gate is. A negation normal form
(NNF) is a circuit in which the inputs of not-gates are always variable gates.</p>
      <p>
        Probability computation is in linear time for d-Ds (hence, for d-DNNFs): to
compute the probability of a d-D, compute by a bottom-up pass the probability
of each gate, where and gates are evaluated using , or gates using +, and not
gates using 1 x. While there does not seem to be any interest in using d-DNNFs
rather that d-Ds for probabilistic databases, we are also interested by d-DNNFs
from a knowledge compilation point of view, as it is currently not known if
d-Ds are strictly more succinct than d-DNNFs. We write UCQ(d-DNNF) (resp.,
UCQ(d-D)) to denote the set of UCQs Q such that for any database instance D,
we can compute in polynomial time (in data complexity) a d-DNNF (resp., d-D)
representation of Lin(Q; D). For a study of the intensional approach using weaker
formalisms for Boolean functions (read once formulas, ordered and free binary
decision diagrams), see [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. Hence we have:
      </p>
      <p>UCQ(d-DNNF)</p>
      <p>UCQ(d-D)</p>
      <p>UCQ(P)
(1)</p>
      <p>
        Dalvi, Jha, and Suciu [
        <xref ref-type="bibr" rid="ref2 ref3">2, 3</xref>
        ] conjectured that the inclusion UCQ(d-D)
UCQ(P) is strict, i.e., that the extensional approach is strictly more
powerful than the intensional approach, and proposed a candidate query to separate
these classes (named q9 and that we de ne in the next section). The purpose of
this paper is to study this conjecture.
3
      </p>
      <p>The H-queries
We de ne in this section the H-queries and review what is known about them.
The building blocks of these queries are the queries hki, which were rst de ned
in the work of Dalvi and Suciu to show the hardness of UCQs that are not safe:
De nition 4. Let k 2 N, k
1. The queries hki for 0
i
k are de ned by:
{ hk0 = 9x9y R(x) ^ S1(x; y);
{ hki = 9x9y Si(x; y) ^ Si+1(x; y) for 1
{ hkk = 9x9y Sk(x; y) ^ T (y).
i &lt; k;</p>
      <p>
        We de ne the H-queries to be combinations of queries hki, as in [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]:
De nition 5. For k 1, we de ne the set of variables hki := f0; : : : ; kg. Given
a Boolean function on variables hki, we de ne the Boolean query Qk to be
the query represented by the rst order formula [0 7! hk0; : : : ; k 7! hkk], i.e.,
where we substituted each variable i 2 hki by the formula hki.
queries in H+ are in particular UCQs.
      </p>
      <p>The query class Hk (resp., Hk+) is then the set of queries Qk when ranges
over all Boolean functions (resp., monotone Boolean functions) on variables hki.</p>
      <p>
        1 1
We nally de ne H (resp., H+) to be S Hk (resp., S Hk+). Observe that the
k=1 k=1
Example 1. Let k = 3, and 9 be the monotone Boolean function (2 _ 3) ^ (0 _
3) ^ (1 _ 3) ^ (0 _ 1 _ 2). Then Q39 represents the query q9 = (h32 _ h33) ^ (h30 _
+
h33) ^ (h31 _ h33) ^ (h30 _ h31 _ h32) 2 H3 , which is safe and was conjectured
in [
        <xref ref-type="bibr" rid="ref2 ref3">2, 3</xref>
        ] not to be in UCQ(d-D).
      </p>
      <p>To study the H-queries, we need the following notions on Boolean functions:
De nition 6. Let be a Boolean function on variables hki. We will always
consider a valuation of hki simply as the set of variables that maps to 1.
We write SAT( ) the set of satisfying valuations of . We say that depends on
variable l 2 hki if there exists a valuation hki such that ( [flg) 6= ( nflg).
We write DEP( ) hki for the set of variables on which depends. We call
and Qk nondegenerate if DEP( ) = hki (and degenerate otherwise).</p>
      <p>
        Then, if is degenerate (i.e., does not depend on all its k + 1 variables), Qk
is safe and is in UCQ(d-DNNF) (in fact, even in UCQ(OBDD)):
Proposition 1 (Theorem 3.12 of [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], or Lemma 3.8 of [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]). Let k
and Qk 2 Hk with DEP( ) ( hki. Then Qk 2 UCQ(d-DNNF).
1,
      </p>
      <p>
        This is in contrast to when is nondegenerate. Indeed, Beame, Li, Roy, and
Suciu then show [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] that Qk do not admit polynomial sized decision
decomposable NNFs (dec-DNNF). A dec-DNNF is a d-DNNF in which the determinism
of or gates is restricted to simply choosing the value of a variable [
        <xref ref-type="bibr" rid="ref13 ref14">13, 14</xref>
        ]. That
is, each or gate is of the form (v ^ g) _ (:v ^ g0) for some variable v. In fact,
they show a lower bound for more general representations than dec-DNNFs,
namely, for what they called Decomposable Logic Decision Diagrams (DLDDs),
which generalise dec-DNNFs in that they allow negations at arbitrary places and
also allow decomposable binary operator gates. When is monotone, another
independent lower bound by Bova and Szeider [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] tells us than we cannot
impose structuredness either (i.e., use d-SDNNFs) when is nondegenerate. These
results mean that for such queries, one cannot restrict too much the
expressivity of determinism. The question is then: do the nondegenerate queries have
polynomial sized d-DNNFs (or d-Ds)?
      </p>
      <p>Let us rst see what the dichotomy theorem tells us about H-queries that are
nondegenerate. We shall restrict our attention to monotone functions now, i.e.,
to queries in H+, because the dichotomy theorem applies only to UCQs, and Qk
is not a UCQ when is not monotone. We need to de ne the CNF lattice of :
De nition 7. Let be a monotone Boolean function on variables hki such that
DEP( ) = hki, and let FCNF = C0 ^ : : : ^ Cn be the (unique) minimized CNF
representing , where we see each clause simply as the set of variables that it
contains. For s hni, we de ne ds := S Ci. Note that d; is ;, and that we can
i2s
have ds = ds0 for s 6= s0. The CNF lattice of is the lattice (L; ), where L
is fds j s hnig, and where is reversed set inclusion. In particular, the top
element 1^ of LCNF is ;, while its bottom element 0^ is hki (because depends on
all the variables, hence each variable is in at least one clause).</p>
      <p>Example 2. The Hasse diagram of the CNF lattice of 9 is shown in Figure 1
(ignore for now the values at the right inside the nodes).
1. If L(0^; ^1) 6= 0, then Qk is #P-hard. Hence, if P is di erent from #P, we
have Qk 2= UCQ(d-D).
2. If L(0^; ^1) = 0, then Qk is PTIME. We do not know if Qk 2 UCQ(d-DNNF)
or Qk 2 UCQ(d-D). But by what precedes, we know that Qk 2= UCQ(dec-DNNF)
and Qk 2= UCQ(d-SDNNF).</p>
      <p>Our goal is to investigate, when we are in the second case ( is monotone,
nondegenerate and safe), for which functions we can build d-DNNFs or d-Ds.
4</p>
    </sec>
    <sec id="sec-3">
      <title>Nice Boolean Functions</title>
      <p>In this section we present a technique to prove that some queries Qk 2 Hk are in
UCQ(d-DNNF). This will in particular apply to the query q9 (which, we recall,
was conjectured not to be in UCQ(d-D)). Our goal is to rewrite as 0 _: : : _ k,
where the i are mutually exclusive ( i ^ j ? for i 6= j) and depend on strict
subsets Si ( hki of hki. When such a rewriting exists, we say that is nice:
De nition 8. Let be a Boolean function on variables hki. We call nice if
there exist strict subsets Si of hki and mutually exclusive Boolean functions (not
k
necessarily monotone) i for 0 i k such that DEP( i) = Si and W i.
i=0</p>
      <p>Observe that allowing to have more (or less) than k + 1 functions i would
not change the de nition of being nice. Also, note that if is degenerate, then
is trivially nice.</p>
      <p>Example 3. The function 9 is equivalent to the mutually exclusive disjunction
0 _ 1 _ 2 _ 3, where 0 0 ^ :2 ^ 3; 1 :1 ^ 2 ^ 3; 2 :0 ^ 1 ^ 3; and
3 0 ^ 1 ^ 2. Moreover for 0 i 3 we have DEP( i) ( h3i, hence 9 is nice.
words, the following holds:</p>
      <p>be a Boolean function on variables hki. If</p>
      <p>Hence q9 2UCQ(d-DNNF). This result shows that, for all queries Qk where
is nice, we can compute a d-DNNF representation of their lineage in PTIME,
and hence compute their probability e ciently. We do not know to which queries
this technique can be applied. Moreover also we have the following corollary:
be a Boolean function on variables hki. If :
is
Corollary 1. Let k 2 N and
nice, then Qk 2 UCQ(d-D).
5</p>
    </sec>
    <sec id="sec-4">
      <title>Experiments</title>
      <p>We will call co-nice a function
such that :
is nice.</p>
      <p>We have presented a technique that can be used to show that some queries are
in UCQ(d-DNNF) or UCQ(d-D), but we have not characterized the queries to
which it applies. In this section, we present our experiments that show that for
all k 2 f1; : : : ; 6g, every nondegenerate monotone function for which Qk is safe
is either nice or co-nice. Hence all the safe queries in Hk+ for k 2 f1; : : : ; 6g are
in UCQ(d-D). This suggests that UCQ(d-D) = UCQ(P), or at least that any
counterexample query in H+ must be in Hk+ for k 7.</p>
      <p>
        We used a machine with 40 x86 64 CPUs of 2.6 GHz and 512 GB RAM.
The code was written in Python 2.7.12 and parallelized using Python's
multi+
processing library. We explain brie y how we generated all the functions in Hk
for k 2 f1; : : : ; 6g in Section 5.1, then explain how we tested niceness of these
functions in Section 5.2.
We started by generating the set R(k) of all monotone Boolean functions on
variables hki up to isomorphism, that is, up to renaming the variables. The
size of R(k) corresponds to the OEIS sequence A003182, which is only known
up to k = 6 (computed in [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] and in [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]). We used parts of the code from [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]
to generate all functions in R(k) for k in f1; : : : ; 6g. We then ltered R(k) to
obtain the set of functions that are nondegenerate. Then we tested whether Qk
is safe by computing the CNF lattice of and checking that (0^; ^1) = 0. Let us
call SND (k) the set of remaining functions (that is, the functions that are safe
and nondegenerate). It took about 2 weeks (using the 40 CPUs) to compute the
explicit lists of all the functions in R(k) and SND (k) for k 2 f1; : : : ; 6g, and the
sizes of these sets can be found in Table 1. We next explain how we tested the
niceness of each function in SND (k).
Let us call boxes the functions i used in De nition 8. That is, is nice if and
only if we can partition its satisfying valuations into k+1 ordered boxes (we allow
some boxes to be empty), where the i-th box has a symmetry around variable i:
De nition 9. Let hki be a valuation of hki, and l 2 hki be a variable. We
de ne the valuation Toggle( ; l) to be the valuation [ flg if l 2= and n flg if
l 2 . We say that a set B of valuations of hki has a symmetry around variable
l if for every valuation hki we have 2 B i Toggle( ; l) 2 B.
      </p>
      <p>To check if is nice, we build a CNF Nice( ) that expresses exactly that
SAT( ) can be partitioned nicely, i.e., Nice( ) is satis able if and only if is
nice. We can then use a SAT solver.</p>
      <p>De nition 10. Let k 1 and be a Boolean function on hki. We de ne the
CNF Nice( ) as follows. Its set of variables is fxl j 2 SAT( ) and l 2 hkig,
where xl intuitively expresses that is put in box l. Its set of clauses is:
1. For each</p>
      <p>k
2 SAT( ), the clause W xl , expressing the valuation
l=0
must be
put in at least one box;
2. For each 2 SAT( ) and l; l0 2 f0; : : : ; kg with l 6= l0, the clause :xl _ :xl0 ,
expressing that the valuation is in at most one box;
3. For each 2 SAT( ) and l 2 f0; : : : ; kg, then:
(a) If Toggle( ; l) 2= SAT( ), the clause :xl ;
(b) Else, the clause :xl _ xlToggle( ;l).</p>
      <p>This ensures that the box l has a symmetry around l.</p>
      <p>Proposition 3.</p>
      <p>is nice i Nice( ) is satis able.</p>
      <p>
        Now for each function in SND (k), we constructed the CNF formula Nice( ),
and used the SAT solver Glucose [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] to determine if it is satis able. If Nice( ) is
satis able then Qk 2 UCQ(d-DNNF) and we store in N (k). If it is not we give
the formula Nice(: ) to Glucose. If this formula is satis able then is co-nice
and Qk 2 UCQ(d-D) (but we do not know if it is in UCQ(d-DNNF)) and we
store in co-N (k). If Nice(: ) is not satis able then is in BAD (k) and we do
not know if Qk is in UCQ(d-D). The results of these experiments are displayed
in Table 1, and, as we found no function in BAD (k), imply:
Proposition 4. All the safe queries in Hk+ for k 2 f1; : : : ; 6g are in UCQ(d-D).
      </p>
      <p>We give here one of the 2 functions that are in co-N (5), co N1 := 24 ^ 034 ^
013 ^ 12 ^ 15 ^ 05 ^ 35 ^ 23 ^ 02 ^ 25 ^ 014 ^ 45 where we write, for instance, 014
to mean 0 _ 1 _ 4. Could co N1 separate UCQ(d-DNNF) from UCQ(d-D)?
6</p>
    </sec>
    <sec id="sec-5">
      <title>Conclusion</title>
      <p>
        We have introduced a new technique to construct deterministic decomposable
circuits for safe H-queries and have experimentally demonstrated its e ectiveness
on the rst 20 million such queries. We conjecture that this technique can build
d-Ds for all safe H-queries. We leave open many intriguing questions:
{ For the H-queries, can we use the DNF lattice instead of the CNF lattice to
decide if the query is safe [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ]?
{ Can we show (unconditionally to P 6= #P) that if Qk is not safe then is
not nice?
{ What is the link between our technique and the notion of d-safety de ned
in [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]?
{ Do the queries in co-N separate UCQ(d-DNNF) from UCQ(d-D)?
      </p>
      <p>We have put online our code, and the complete list of all the functions studied
in Section 5.2, which we believe could be useful for people studying the H-queries.
It can be used, for instance, to enter by hand a monotone Boolean function
and check if Qk is safe of not, draw its CNF lattice, check if is nice, etc.
Acknowledgements. We are grateful to Antoine Amarilli for careful proofreading
of the article (and for the many discussions about the code), to Romain Caze
for pointing out to us his code to generate monotone Boolean functions, and to
Stephen Tamon for referring us to Romain Caze. The second author would like
to acknowledge Guy van den Broeck for initial discussions on the q9 conjecture.
The fact that q9 is expressible as a succinct d-D has been already known to him
and has been mentioned in several of his presentations prior to this article. This
work was partly funded by the Telecom ParisTech Research Chair on Big Data
and Market Insights, and by the EPSRC platform grant DBOnto (L012138) that
funded Mikael's research visit at Oxford.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Suciu</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Olteanu</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Re</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Koch</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>Probabilistic Databases</article-title>
          . Morgan &amp;
          <string-name>
            <surname>Claypool</surname>
          </string-name>
          (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Dalvi</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Suciu</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>The dichotomy of probabilistic inference for unions of conjunctive queries</article-title>
          .
          <source>J. ACM</source>
          <volume>59</volume>
          (
          <issue>6</issue>
          ) (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Jha</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Suciu</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>Knowledge compilation meets database theory: Compiling queries to decision diagrams</article-title>
          .
          <source>Theory of Computing Systems</source>
          <volume>52</volume>
          (
          <issue>3</issue>
          ) (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Beame</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Li</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Roy</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Suciu</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>Exact model counting of query expressions: Limitations of propositional methods</article-title>
          .
          <source>ACM Trans. Database Syst</source>
          .
          <volume>42</volume>
          (
          <issue>1</issue>
          ) (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Bova</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Szeider</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>Circuit treewidth, sentential decision, and query compilation</article-title>
          .
          <source>In: PODS</source>
          . (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Pipatsrisawat</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Darwiche</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>New compilation languages based on structured decomposability</article-title>
          .
          <source>In: AAAI</source>
          . (
          <year>2008</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Audemard</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Simon</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          :
          <article-title>Predicting learnt clauses quality in modern SAT solvers</article-title>
          . In: IJCAI. (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Caze</surname>
          </string-name>
          , R.D.,
          <string-name>
            <surname>Humphries</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gutkin</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          :
          <article-title>Passive dendrites enable single neurons to compute linearly non-separable functions</article-title>
          .
          <source>PLOS Computational Biology</source>
          <volume>9</volume>
          (
          <issue>2</issue>
          ) (
          <year>2013</year>
          ) Code available at https://github.com/rcaze/PlosCB2013.
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Stephen</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Yusun</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>Counting inequivalent monotone boolean functions</article-title>
          .
          <source>Discrete Applied Mathematics</source>
          <volume>167</volume>
          (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Monet</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <article-title>: mikael-monet</article-title>
          .net/en/publications.html#monet2018towards
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Darwiche</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>On the tractable counting of theory models and its application to truth maintenance and belief revision</article-title>
          .
          <source>J. Applied Non-Classical Logics</source>
          <volume>11</volume>
          (
          <issue>1-2</issue>
          ) (
          <year>2001</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Fink</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Olteanu</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>Dichotomies for queries with negation in probabilistic databases</article-title>
          .
          <source>ACM Trans. Database Syst</source>
          .
          <volume>41</volume>
          (
          <issue>1</issue>
          ) (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Huang</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Darwiche</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>DPLL with a trace: From SAT to knowledge compilation</article-title>
          .
          <source>IJCAI'05</source>
          (
          <year>2005</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Huang</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Darwiche</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>The language of search</article-title>
          .
          <source>J. Artif. Int. Res</source>
          .
          <volume>29</volume>
          (
          <issue>1</issue>
          ) (
          <year>2007</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>Stanley</surname>
            ,
            <given-names>R.P.</given-names>
          </string-name>
          : Enumerative Combinatorics: Volume
          <volume>1</volume>
          . 2nd edn. (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <surname>Monet</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Mobius values of CNF and DNF lattices of a monotone boolean function</article-title>
          . http://cstheory.stackexchange.com/q/39754 (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>