The complexity of acyclic conjunctive queries revisited
Preprint
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 \textit{fixed-parameter linear} i.e. they can be evaluated in time $f(|Q|).|\textbf{db}|.|Q(\textbf{db})|$ where $|Q|$ is the size of the query $Q$, $|\textbf{db}|$ the database size, $|Q(\textbf{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|).|\textbf{db}|.|Q(\textbf{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.
Keywords
All Related Versions
This publication has 10 references indexed in Scilit:
- An algorithm for tree-query membership of a distributed query2005
- Graph properties checkable in linear time in the number of verticesJournal of Computer and System Sciences, 2004
- Query evaluation via tree-decompositionsJournal of the ACM, 2002
- Hypertree Decompositions and Tractable QueriesJournal of Computer and System Sciences, 2002
- Machine-Independent Characterizations and Complete Problems for Deterministic Linear TimeSIAM Journal on Computing, 2002
- The complexity of acyclic conjunctive queriesJournal of the ACM, 2001
- Conjunctive-Query Containment and Constraint SatisfactionJournal of Computer and System Sciences, 2000
- Conjunctive query containment revisitedTheoretical Computer Science, 2000
- On generating all maximal independent setsInformation Processing Letters, 1988
- Degrees of acyclicity for hypergraphs and relational database schemesJournal of the ACM, 1983