TL;DR
This paper establishes the precise computational complexity of answering nested regular path queries over incomplete data described by Description Logic (DL) ontologies. The authors reveal a fascinating dichotomy: while adding nesting features leaves the worst-case data complexity completely unaffected, it triggers a dramatic jump in combined complexity—from P-complete to EXP-complete—for lightweight ontology languages.
What Problem Does This Paper Address?
Graph-structured data is everywhere, from social networks to the Semantic Web. To navigate these graphs, query languages like SPARQL 1.1 and XPath use Regular Path Queries (RPQs) to find pairs of objects connected by paths matching regular expressions. A powerful feature in these languages is nesting (or existential tests), which allows a query to check branching conditions along a path—for example, "find all academic ancestors connected via a chain of advisors, where every advisor in the chain has published a paper on Databases."
While evaluating these queries on complete databases is well-understood, modern knowledge systems often deal with incomplete data paired with an ontology (expressed via Description Logics, or DLs) that provides domain rules. In this setting, query answering becomes a task of finding "certain answers"—results that hold true across all possible worlds that satisfy the ontology. This paper tackles a major open question: What happens to the computational complexity of query answering when you add nesting to regular path queries under different families of Description Logics?
Methods
The authors analyze the problem across a spectrum of DLs, ranging from lightweight languages ($DL-Lite$, $\mathcal{EL}$) to highly expressive ones ($\mathcal{SHIQ}$, $\mathcal{ZOI}$). They employ three core technical approaches:
- Encoding Away Nesting (For Expressive DLs): For DLs that support inverse roles and qualified existential restrictions (specifically those containing $\mathcal{ELI}$), the authors demonstrate that nested queries can be polynomially reduced to non-nested queries by compiling the nesting conditions directly into temporary ontology axioms.
- Hardness Reductions (For Lightweight DLs): To prove how difficult the problem can get, they design a sophisticated reduction from the word problem of Alternating Turing Machines (ATMs) to nested query answering in $DL-Lite$ and $\mathcal{EL}$, establishing a lower bound of EXP-time hardness.
- Automata-Based Query Rewriting: For Horn DLs ($\mathcal{ELHI}_\bot$), they introduce a direct, practical query-rewriting algorithm. This technique represents nested queries as nested non-deterministic finite automata (n-NFAs) and computes specialized "jump" and "final" transitions. This allows the algorithm to navigate the anonymous, tree-like structures generated by ontologies without blowing up the data complexity.
Datasets
Not discussed in the paper. As a purely theoretical study focused on computational complexity and algorithmic upper/lower bounds, no empirical datasets or experimental benchmarks were used.
Key Insights and Ideas
- The Combined Complexity Jump: The most surprising "aha moment" is that for lightweight DLs ($DL-Lite$ and $\mathcal{EL}$), adding nesting causes the combined complexity (the complexity relative to the size of both the query and the ontology) to skyrocket from P-complete to EXP-complete. This means that even very simple ontologies become exponentially harder to reason with if the query contains nested paths.
- Data Complexity Immunity: Remarkably, this complexity penalty does not apply to data complexity (the complexity relative only to the size of the underlying data facts). For all studied DLs, the worst-case data complexity remains exactly the same as it is for non-nested queries. Nesting essentially comes "for free" as data scales.
- Expressive DL Equivalence: In highly expressive logics like $\mathcal{ZIQ}$ and $\mathcal{ZOI}$, nesting adds no extra complexity because these description logics are already powerful enough to natively express regular expressions within the ontology itself.
Key Results
The paper maps out a complete landscape of tight complexity bounds for nested regular path queries (N2RPQs) and conjunctive nested regular path queries (CN2RPQs), as summarized in their comprehensive complexity table:
- DL-Lite: Data complexity is NL-complete; combined complexity is EXP-complete (a significant jump from the P-complete baseline of non-nested queries).
- Horn DLs ($\mathcal{EL}$, Horn-$\mathcal{SHIQ}$): Data complexity is P-complete; combined complexity is EXP-complete.
- Expressive DLs ($\mathcal{ALC}$, $\mathcal{SHIQ}$): Data complexity is coNP-hard; combined complexity ranges from EXP-complete to 2EXP-complete.
Limitations and Future Work
- Data Complexity Gap for Expressive DLs: The authors note that it remains an open question whether the coNP lower bound for data complexity in expressive DLs is tight. The standard automata-theoretic tools used to find combined complexity bounds fall short when trying to isolate data complexity in these heavy logics.
- Finding Tractable Subclasses: Because EXP-complete combined complexity poses a challenge for practical implementations, the authors highlight the need to identify specific, restricted subclasses of nested queries that retain low combined complexity.
- Advanced Query Features: Future work includes extending the n-NFA rewriting framework to handle even more complex query features, such as existential "loop-tests" or role-value maps.
Summary updated