Table of Contents
Fetching ...

Counting Solutions to Conjunctive Queries: Structural and Hybrid Tractability

Hubie Chen, Gianluigi Greco, Stefan Mengel, Francesco Scarcello

TL;DR

A negative answer is given to the question in the general case, by exhibiting a more powerful structural method based on the novel concept of #-generalized hypertree decomposition, which is shown to be feasible in polynomial time.

Abstract

Counting the number of answers to conjunctive queries is a fundamental problem in databases that, under standard assumptions, does not have an efficient solution. The issue is inherently #P-hard, extending even to classes of acyclic instances. To address this, we pinpoint tractable classes by examining the structural properties of instances and introducing the novel concept of #-hypertree decomposition. We establish the feasibility of counting answers in polynomial time for classes of queries featuring bounded #-hypertree width. Additionally, employing novel techniques from the realm of fixed-parameter computational complexity, we prove that, for bounded arity queries, the bounded #-hypertree width property precisely delineates the frontier of tractability for the counting problem. This result closes an important gap in our understanding of the complexity of such a basic problem for conjunctive queries and, equivalently, for constraint satisfaction problems (CSPs). Drawing upon #-hypertree decompositions, a ''hybrid'' decomposition method emerges. This approach leverages both the structural characteristics of the query and properties intrinsic to the input database, including keys or other (weaker) degree constraints that limit the permissible combinations of values. Intuitively, these features may introduce distinct structural properties that elude identification through the ''worst-possible database'' perspective inherent in purely structural methods.

Counting Solutions to Conjunctive Queries: Structural and Hybrid Tractability

TL;DR

A negative answer is given to the question in the general case, by exhibiting a more powerful structural method based on the novel concept of #-generalized hypertree decomposition, which is shown to be feasible in polynomial time.

Abstract

Counting the number of answers to conjunctive queries is a fundamental problem in databases that, under standard assumptions, does not have an efficient solution. The issue is inherently #P-hard, extending even to classes of acyclic instances. To address this, we pinpoint tractable classes by examining the structural properties of instances and introducing the novel concept of #-hypertree decomposition. We establish the feasibility of counting answers in polynomial time for classes of queries featuring bounded #-hypertree width. Additionally, employing novel techniques from the realm of fixed-parameter computational complexity, we prove that, for bounded arity queries, the bounded #-hypertree width property precisely delineates the frontier of tractability for the counting problem. This result closes an important gap in our understanding of the complexity of such a basic problem for conjunctive queries and, equivalently, for constraint satisfaction problems (CSPs). Drawing upon #-hypertree decompositions, a ''hybrid'' decomposition method emerges. This approach leverages both the structural characteristics of the query and properties intrinsic to the input database, including keys or other (weaker) degree constraints that limit the permissible combinations of values. Intuitively, these features may introduce distinct structural properties that elude identification through the ''worst-possible database'' perspective inherent in purely structural methods.
Paper Structure (22 sections, 20 equations, 13 figures)

This paper contains 22 sections, 20 equations, 13 figures.

Figures (13)

  • Figure 1: (a) Hypergraph ${\mathcal{H}}_{Q_0}$ from Example \ref{['ex:esempio1']}; and (b) its Frontier Hypergraph ${\mathcal{F}H}(Q_0,\{A,B,C\})$.
  • Figure 2: A width-2 hypertree decompositions of Hypergraph ${\mathcal{H}}_{Q_0}$ in Example \ref{['ex:esempio1']}.
  • Figure 3: (a) Hypergraph ${\mathcal{H}}_{Q_0'}$; (b) its Frontier Hypergraph ${\mathcal{F}H}(Q_0',\{A,B,C\})$; and (c) a width-2 $\#$-hypertree decomposition of the query in Example \ref{['ex:esempio1']}.
  • Figure 4: (a) The hypergraph ${\mathcal{H}}_{Q_0'}$; (b) A #-decomposition of $Q_0$ w.r.t. $\mathcal{V}_0$; (c) The hypergraph ${\mathcal{H}}_{\mathcal{V}_0}$.
  • Figure 5: (a) Hypergraph ${\mathcal{H}}_{Q_0}$ with the pseudo-free variable $D$; and (b) its Frontier Hypergraph ${\mathcal{F}H}(Q_0,\{A,B,C,D\})$.
  • ...and 8 more figures

Theorems & Definitions (32)

  • proof
  • proof
  • proof
  • proof
  • proof
  • proof
  • Claim 3
  • proof
  • Claim 4
  • proof
  • ...and 22 more