Structural Tractability of Counting of Solutions to Conjunctive Queries

We explore the complexity of counting solutions to conjunctive queries, a basic class of queries from database theory. We introduce a parameter, called the quantified star size of a query ϕ, which measures how the free variables are spread in ϕ. As usual in database theory, we associate a hypergraph to a query ϕ. We show that for classes of queries for which these associated hypergraphs admit good decompositions, e.g., bounded width generalized hypertree decompositions, bounded quantified star size exactly characterizes the subclasses of hypergraphs for which counting the number of solutions is tractable. In the case of bounded arity, this allows us to fully characterize the classes of hypergraphs for which counting the solutions is tractable. Finally, we also analyze the complexity of computing the quantified star size of a conjunctive query.

[1]  Zoltán Miklós,et al.  Understanding Tractable Decompositions for Constraint Satisfaction , 2008 .

[2]  Arnaud Durand,et al.  On Acyclic Conjunctive Queries and Constant Delay Enumeration , 2007, CSL.

[3]  Leonid Libkin,et al.  Elements of Finite Model Theory , 2004, Texts in Theoretical Computer Science.

[4]  Hans L. Bodlaender,et al.  A Partial k-Arboretum of Graphs with Bounded Treewidth , 1998, Theor. Comput. Sci..

[5]  Marc Gyssens,et al.  A unified theory of structural tractability for constraint satisfaction problems , 2008, J. Comput. Syst. Sci..

[6]  Leonid Libkin,et al.  Elements Of Finite Model Theory (Texts in Theoretical Computer Science. An Eatcs Series) , 2004 .

[7]  Jörg Flum,et al.  Parameterized Complexity Theory (Texts in Theoretical Computer Science. An EATCS Series) , 2006 .

[8]  Thomas Schwentick,et al.  When is the evaluation of conjunctive queries tractable? , 2001, STOC '01.

[9]  Marc Gyssens,et al.  Decomposing Constraint Satisfaction Problems Using Database Techniques , 1994, Artif. Intell..

[10]  Bruno Courcelle,et al.  Graph Rewriting: An Algebraic and Logic Approach , 1991, Handbook of Theoretical Computer Science, Volume B: Formal Models and Sematics.

[11]  Georg Gottlob,et al.  A Comparison of Structural CSP Decomposition Methods , 1999, IJCAI.

[12]  Reinhard Pichler,et al.  Tractable Counting of the Answers to Conjunctive Queries , 2013, AMW.

[13]  Jörg Flum,et al.  Query evaluation via tree-decompositions , 2001, JACM.

[14]  Hans L. Bodlaender A linear time algorithm for finding tree-decompositions of small treewidth , 1993, STOC '93.

[15]  Francesco Scarcello,et al.  Structural tractability of enumerating CSP solutions , 2010, Constraints.

[16]  Dániel Marx,et al.  Constraint solving via fractional edge covers , 2006, SODA '06.

[17]  Frank Harary,et al.  Graph Theory , 2016 .

[18]  Michael R. Fellows,et al.  Parameterized Complexity , 1998 .

[19]  Martin Grohe The complexity of homomorphism and constraint satisfaction problems seen from the other side , 2007, JACM.

[20]  Stefan Mengel Conjunctive queries, arithmetic circuits and counting complexity , 2013 .

[21]  Paul D. Seymour,et al.  Graph Minors. II. Algorithmic Aspects of Tree-Width , 1986, J. Algorithms.

[22]  Serge Abiteboul,et al.  Foundations of Databases , 1994 .

[23]  Georg Gottlob,et al.  Hypertree decompositions and tractable queries , 1998, J. Comput. Syst. Sci..

[24]  Hubie Chen,et al.  Beyond Hypertree Width: Decomposition Methods Without Decompositions , 2005, CP.

[25]  Dániel Marx,et al.  Enumerating homomorphisms , 2012, J. Comput. Syst. Sci..

[26]  Thomas Schwentick,et al.  Generalized hypertree decompositions: np-hardness and tractable variants , 2007, PODS '07.

[27]  Jörg Flum,et al.  Parameterized Complexity Theory , 2006, Texts in Theoretical Computer Science. An EATCS Series.

[28]  Peter Jonsson,et al.  The complexity of counting homomorphisms seen from the other side , 2004, Theor. Comput. Sci..

[29]  Hubie Chen,et al.  Decomposing Quantified Conjunctive (or Disjunctive) Formulas , 2012, 2012 27th Annual IEEE Symposium on Logic in Computer Science.

[30]  Dániel Marx,et al.  Approximating fractional hypertree width , 2009, TALG.

[31]  Georg Gottlob,et al.  Hypertree width and related hypergraph invariants , 2007, Eur. J. Comb..

[32]  Hubie Chen,et al.  On the complexity of existential positive queries , 2012, ACM Trans. Comput. Log..

[33]  Phokion G. Kolaitis,et al.  Conjunctive-query containment and constraint satisfaction , 1998, PODS.

[34]  Arnaud Durand,et al.  The complexity of weighted counting for acyclic conjunctive queries , 2011, J. Comput. Syst. Sci..

[35]  Mihalis Yannakakis,et al.  Algorithms for Acyclic Database Schemes , 1981, VLDB.