We study the \em generalized model counting problem, defined as follows: given a database, and a set of deterministic tuples, count the number of subsets of the database that include all deterministic tuples and satisfy the query. This problem is computationally equivalent to the evaluation of the query over a tuple-independent probabilistic database where all tuples have probabilities in $\set0,\frac1 2, 1 $. Previous work has established a dichotomy for Unions of Conjunctive Queries (UCQ) when the probabilities are arbitrary rational numbers, showing that, for each query, its complexity is either in polynomial time or \#P-hard. The query is called \em safe in the first case, and \em unsafe in the second case. Here, we strengthen the hardness proof, by proving that an unsafe UCQ query remains \#P-hard even if the probabilities are restricted to $\set0,\frac1 2, 1 $. This requires a complete redesign of the hardness proof, using new techniques. A related problem is the \em model counting problem, which asks for the probability of the query when the input probabilities are restricted to $\set0,\frac1 2 $. While our result does not extend to model counting for all unsafe UCQs, we prove that model counting is \#P-hard for a class of unsafe queries called Type-I forbidden queries.
[1]
Dan Suciu,et al.
The dichotomy of probabilistic inference for unions of conjunctive queries
,
2012,
JACM.
[2]
Prasoon Goyal,et al.
Probabilistic Databases
,
2009,
Encyclopedia of Database Systems.
[3]
R. Stanley.
Enumerative Combinatorics: Volume 1
,
2011
.
[4]
Pierre Senellart,et al.
Provenance Circuits for Trees and Treelike Instances
,
2015,
ICALP.
[5]
Guy Van den Broeck,et al.
Skolemization for Weighted First-Order Model Counting
,
2013,
KR.
[6]
J. Scott Provan,et al.
The Complexity of Counting Cuts and of Computing the Probability that a Graph is Connected
,
1983,
SIAM J. Comput..
[7]
Antoine Amarilli,et al.
Model Counting for Conjunctive Queries Without Self-Joins
,
2019,
ArXiv.
[8]
Guy Van den Broeck,et al.
Symmetric Weighted First-Order Model Counting
,
2014,
PODS.
[9]
C. Krattenthaler.
ADVANCED DETERMINANT CALCULUS
,
1999,
math/9902004.
[10]
Dan Geiger,et al.
Logical and algorithmic properties of independence and their application to Bayesian networks
,
1990,
Annals of Mathematics and Artificial Intelligence.