Skip to main content
QUICK REVIEW

[Paper Review] The complexity of acyclic conjunctive queries revisited

Arnaud Durand, Étienne Grandjean|arXiv (Cornell University)|May 2, 2006
Advanced Graph Theory ResearchComputer Science22 references5 citations
TL;DR

This paper introduces a functional query framework based on first-order logic over unary functions to analyze the complexity of acyclic conjunctive queries. It proves that a wide range of query variants—including those with inequalities, comparisons, and Boolean or non-Boolean forms—are fixed-parameter linear, with evaluation time bounded by $ f(|Q|) \cdot |\text{db}| \cdot |Q(\text{db})| $, significantly improving prior bounds and extending tractability to previously intractable cases.

ABSTRACT

In this paper, we consider first-order logic over unary functions and study the complexity of the evaluation problem for conjunctive queries described by such kind of formulas. A natural notion of query acyclicity for this language is introduced and we study the complexity of a large number of variants or generalizations of acyclic query problems in that context (Boolean or not Boolean, with or without inequalities, comparisons, etc...). Our main results show that all those problems are extit{fixed-parameter linear} i.e. they can be evaluated in time $f(|Q|).| extbf{db}|.|Q( extbf{db})|$ where $|Q|$ is the size of the query $Q$, $| extbf{db}|$ the database size, $|Q( extbf{db})|$ is the size of the output and $f$ is some function whose value depends on the specific variant of the query problem (in some cases, $f$ is the identity function). Our results have two kinds of consequences. First, they can be easily translated in the relational (i.e., classical) setting. Previously known bounds for some query problems are improved and new tractable cases are then exhibited. Among others, as an immediate corollary, we improve a result of \~\cite{PapadimitriouY-99} by showing that any (relational) acyclic conjunctive query with inequalities can be evaluated in time $f(|Q|).| extbf{db}|.|Q( extbf{db})|$. A second consequence of our method is that it provides a very natural descriptive approach to the complexity of well-known algorithmic problems. A number of examples (such as acyclic subgraph problems, multidimensional matching, etc...) are considered for which new insights of their complexity are given.

Motivation & Objective

  • To establish a unified framework for analyzing the complexity of acyclic conjunctive queries by translating relational queries into functional queries over unary functions.
  • To extend tractability results from standard acyclic conjunctive queries (ACQ) to broader classes, including those with inequalities ($\neq$) and comparisons ($<$).
  • To demonstrate that these extended query classes are fixed-parameter linear, improving on previous exponential or polynomial bounds.
  • To provide a descriptive logic-based approach that naturally captures the complexity of well-known algorithmic problems such as multidimensional matching and hitting set.
  • To identify the frontier of tractability for tree-like queries and explore applications to constraint satisfaction and tree-structured data.

Proposed method

  • Introduces a new class of unary functional queries based on first-order logic over unary functions, defining a graph-based notion of acyclicity that preserves query structure across translations.
  • Develops a linear-time translation from relational conjunctive queries to equivalent functional queries, preserving acyclicity and query semantics.
  • Applies the functional query framework to prove fixed-parameter linear complexity: $ f(|Q|) \cdot |\text{db}| \cdot |Q(\text{db})| $, where $ f $ depends on query structure.
  • Uses minimal sample constructions and structural analysis to bound the complexity of query evaluation and enumeration.
  • Applies the framework to known NP-hard problems (e.g., multidimensional matching, unique hitting set) to show they are fixed-parameter linear under the new characterization.
  • Leverages the correspondence between conjunctive queries and constraint satisfaction problems to extend results to CSPs and tree-structured data.

Experimental results

Research questions

  • RQ1Can the complexity of acyclic conjunctive queries with inequalities be improved beyond existing exponential or polynomial bounds?
  • RQ2Is there a uniform logical framework that captures the tractability of diverse query variants, including those with comparisons and inequalities?
  • RQ3Can the fixed-parameter linear complexity of acyclic queries be extended to more general classes of queries, such as those of bounded tree-width?
  • RQ4How do standard algorithmic problems like multidimensional matching and unique hitting set relate to the complexity of functional conjunctive queries?
  • RQ5Can the functional query model be used to derive efficient, parallelizable algorithms for query evaluation and enumeration?

Key findings

  • All considered variants of acyclic conjunctive queries—Boolean or not, with or without inequalities or comparisons—are fixed-parameter linear, with evaluation time $ f(|Q|) \cdot |\text{db}| \cdot |Q(\text{db})| $.
  • The bound for $ \text{ACQ}^\neq $ (acyclic queries with inequalities) is improved from $ g(|Q|) \cdot |\text{db}| \cdot |Q(\text{db})| \cdot \log^2|\text{db}| $ to $ f(|Q|) \cdot |\text{db}| \cdot |Q(\text{db})| $, where $ f $ is the identity in some cases.
  • Multidimensional matching, unique hitting set, and antichain problems are shown to be solvable in time $ O_{r,k}(|M|) $, improving prior bounds based on perfect hashing.
  • The method enables linear-delay enumeration of query results for all considered query classes.
  • The functional query framework provides a natural descriptive logic approach to the complexity of algorithmic problems, offering new insights into their tractability.
  • The translation from relational to functional queries preserves acyclicity and allows transfer of complexity results between models, enabling new tractable cases in relational databases.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.