Table of Contents
Fetching ...

Answer Counting under Guarded TGDs

Cristina Feier, Carsten Lutz, Marcin Przybyłko

TL;DR

The paper provides a comprehensive classification of the parameterized complexity of counting answers for ontology-mediated queries and constraint queries under guarded TGDs, extending the known UCQ-only results to settings with ontologies and constraints. The central idea is to reduce counting for OMQs/CQSs to counting for carefully transformed CQs via the Chen–Mengel closure and chase-based rewritings, thereby connecting counting complexity to structural measures such as $TW$, $CTW$, $SS$, and $LMN$ through a unifying class $ extsf{Q}^igstar$. The authors establish a five-way dichotomy (exactly the same five complexity levels as in the classical case) and show how ontologies interact with all measures, sometimes reducing to equivalent, bounded-measure forms. They also develop approximation results (FPTRAS/FPRAS) and meta-problems for recognizing and constructing small-measure equivalents, with decidability results under full schema assumptions and guarded TGDs. The work advances practical counting capabilities in ontology-enabled data management and highlights rich interactions between logical constraints and combinatorial graph-structure properties in query evaluation and counting.

Abstract

We study the complexity of answer counting for ontology-mediated queries and for querying under constraints, considering conjunctive queries and unions thereof (UCQs) as the query language and guarded TGDs as the ontology and constraint language, respectively. Our main result is a classification according to whether answer counting is fixed-parameter tractable (FPT), W[1]-equivalent, #W[1]-equivalent, #W[2]-hard, or #A[2]-equivalent, lifting a recent classification for UCQs without ontologies and constraints due to Dell et al. The classification pertains to various structural measures, namely treewidth, contract treewidth, starsize, and linked matching number. Our results rest on the assumption that the arity of relation symbols is bounded by a constant and, in the case of ontology-mediated querying, that all symbols from the ontology and query can occur in the data (so-called full data schema). We also study the meta-problems for the mentioned structural measures, that is, to decide whether a given ontology-mediated query or constraint-query specification is equivalent to one for which the structural measure is bounded.

Answer Counting under Guarded TGDs

TL;DR

The paper provides a comprehensive classification of the parameterized complexity of counting answers for ontology-mediated queries and constraint queries under guarded TGDs, extending the known UCQ-only results to settings with ontologies and constraints. The central idea is to reduce counting for OMQs/CQSs to counting for carefully transformed CQs via the Chen–Mengel closure and chase-based rewritings, thereby connecting counting complexity to structural measures such as , , , and through a unifying class . The authors establish a five-way dichotomy (exactly the same five complexity levels as in the classical case) and show how ontologies interact with all measures, sometimes reducing to equivalent, bounded-measure forms. They also develop approximation results (FPTRAS/FPRAS) and meta-problems for recognizing and constructing small-measure equivalents, with decidability results under full schema assumptions and guarded TGDs. The work advances practical counting capabilities in ontology-enabled data management and highlights rich interactions between logical constraints and combinatorial graph-structure properties in query evaluation and counting.

Abstract

We study the complexity of answer counting for ontology-mediated queries and for querying under constraints, considering conjunctive queries and unions thereof (UCQs) as the query language and guarded TGDs as the ontology and constraint language, respectively. Our main result is a classification according to whether answer counting is fixed-parameter tractable (FPT), W[1]-equivalent, #W[1]-equivalent, #W[2]-hard, or #A[2]-equivalent, lifting a recent classification for UCQs without ontologies and constraints due to Dell et al. The classification pertains to various structural measures, namely treewidth, contract treewidth, starsize, and linked matching number. Our results rest on the assumption that the arity of relation symbols is bounded by a constant and, in the case of ontology-mediated querying, that all symbols from the ontology and query can occur in the data (so-called full data schema). We also study the meta-problems for the mentioned structural measures, that is, to decide whether a given ontology-mediated query or constraint-query specification is equivalent to one for which the structural measure is bounded.

Paper Structure

This paper contains 21 sections, 44 theorems, 40 equations, 6 figures.

Key Result

Lemma 2.2

Figures (6)

  • Figure 1: An example for Gaifman graphs and their contracts.
  • Figure 2: Examples for structural measures: Example (\ref{['fig:example-TW']}) is the (3,3)/̄complete bipartite graph, the contract of Example (\ref{['fig:example-CTW']}) is the 4/̄clique, Example (\ref{['fig:example-SS']}) is a 4/̄star, and Example (\ref{['fig:example-LMN']}) is a 4/̄star with the 4/̄clique in the centre.
  • Figure 3: CQ $q_4$ from Example \ref{['ex:lowering-measures']}. Filled circles indicate answer variables.
  • Figure 4: A CQ $q$ and its self-join free counterpart $q^{s}$.
  • Figure 5: Proof strategy of Lemma \ref{['lemma:marked-CQ-to-plainCQ-redux']}.
  • ...and 1 more figures

Theorems & Definitions (73)

  • Example 2.1
  • Lemma 2.2
  • Lemma 2.3
  • Lemma 2.4
  • Lemma 3.1
  • Example 3.2: countingPositiveQueries
  • Theorem 3.3: countingTrichotomycountingPositiveQueriesDBLP:conf/icalp/DellRW19
  • Example 4.1
  • Theorem 4.2: BDFLP-PODS20
  • Theorem 4.3
  • ...and 63 more