Counting Solutions to Conjunctive Queries: Structural and Hybrid Tractability

Hubie Chen, Gianluigi Greco, Stefan Mengel, Francesco Scarcello
11/24/2023
cs.DBcs.AI

No confident code implementation found for this paper.

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{chen2023counting,
  title  = {Counting Solutions to Conjunctive Queries: Structural and Hybrid Tractability},
  author = {Hubie Chen and Gianluigi Greco and Stefan Mengel and Francesco Scarcello},
  year   = {2023},
  eprint = {2311.14579},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2311.14579v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2311.14579.svg)](https://codeofpaper.com/paper/2311.14579)

Discussion