Structural Tractability of Counting of Solutions to Conjunctive Queries
Abstract
In this paper we explore the problem of counting solutions to conjunctive queries. We consider a parameter called the \emph{quantified star size} of a formula $\varphi$ which measures how the free variables are spread in $\varphi$. We show that for conjunctive queries that admit nice decomposition properties (such as being of bounded treewidth or generalized hypertree width) bounded quantified star size exactly characterizes the classes of queries for which counting the number of solutions is tractable. This also allows us to fully characterize the conjunctive queries for which counting the solutions is tractable in the case of bounded arity. To illustrate the applicability of our results, we also show that computing the quantified star size of a formula is possible in time $n^{O(k)}$ for queries of generalized hypertree width $k$. Furthermore, quantified star size is even fixed parameter tractable parameterized by some other width measures, while it is $\W{1}$-hard for generalized hypertree width and thus unlikely to be fixed parameter tractable. We finally show how to compute an approximation of quantified star size in polynomial time where the approximation ratio depends on the width of the input.
- Publication:
-
arXiv e-prints
- Pub Date:
- March 2013
- DOI:
- 10.48550/arXiv.1303.2059
- arXiv:
- arXiv:1303.2059
- Bibcode:
- 2013arXiv1303.2059D
- Keywords:
-
- Computer Science - Logic in Computer Science
- E-Print:
- 29 pages, 3 figures Preliminary version appeared in ICDT'2013