[Paper Review] Enumeration Problems for Regular Path Queries
This paper investigates the enumeration of regular path query (RPQ) results under various semantics—arbitrary, shortest, simple paths, and trails—focusing on polynomial delay and parameterized complexity. It establishes that for a broad class of practical RPQs (simple transitive expressions), both simple path and trail enumeration can be achieved in FPT delay, resolving long-standing complexity challenges for real-world query workloads.
Evaluation of regular path queries (RPQs) is a central problem in graph databases. We investigate the corresponding enumeration problem, that is, given a graph and an RPQ, enumerate all paths in the graph that match the RPQ. We consider several versions of this problem, corresponding to different semantics of RPQs that have recently been considered: arbitrary paths, shortest paths, simple paths, and trails. Whereas arbitrary and shortest paths can be enumerated in polynomial delay, the situation is much more intricate for simple paths and trails. For instance, already the question if a given graph contains a simple path or trail of a certain length has cases with highly non-trivial solutions and cases that are long-standing open problems. In this setting, we study RPQ evaluation from a parameterized complexity perspective. We define a class of simple transitive expressions that is prominent in practice and for which we can prove two dichotomy-like results: one for simple paths and one for trails paths. We observe that, even though simple path semantics and trail semantics are intractable for RPQs in general, they are feasible for the vast majority of the kinds of RPQs that users use in practice. At the heart of this study is a result of independent interest on the parameterized complexity of finding disjoint paths in graphs: the two disjoint paths problem is W[1]-hard if parameterized by the length of one of the two paths.
Motivation & Objective
- To analyze the complexity of enumerating paths matching regular path queries (RPQs) under different semantics: arbitrary, shortest, simple paths, and trails.
- To address the challenge that simple path and trail enumeration are generally intractable, yet common in practice.
- To identify tractable subclasses of RPQs where enumeration can be performed efficiently, particularly focusing on simple transitive expressions.
- To establish parameterized tractability (FPT delay) for these subclasses under both simple path and trail semantics.
- To demonstrate that practical RPQs—common in real-world SPARQL and Cypher workloads—admit efficient enumeration despite theoretical intractability in general cases.
Proposed method
- Proposes a parameterized complexity analysis of RPQ enumeration, focusing on combined complexity with respect to query and data size.
- Uses Yen's algorithm as a core subroutine for shortest path computation, adapted for path enumeration with polynomial delay.
- Introduces a reduction from trail enumeration to simple path enumeration via edge relabeling and structural transformation of graphs and regular expressions.
- Applies the color-coding technique and derivative-based analysis of regular expressions to handle subpath constraints and conflict-free label handling.
- Employs a modified version of Ackermann and Shallit's algorithm to compute lexicographically smallest paths for A* subexpressions.
- Leverages the concept of 'cuttable' and 'almost conflict-free' regular expressions to ensure bounded parameterized complexity.
Experimental results
Research questions
- RQ1Can regular path query enumeration under simple path and trail semantics be performed in polynomial delay?
- RQ2Are there practical subclasses of RPQs for which simple path and trail enumeration are fixed-parameter tractable (FPT) with respect to query structure?
- RQ3What is the parameterized complexity of finding disjoint paths in directed graphs, and how does it relate to RPQ enumeration?
- RQ4To what extent do real-world RPQs (from SPARQL logs) exhibit structural simplicity that enables efficient enumeration?
- RQ5How do the semantics of arbitrary, shortest, simple, and trail paths affect the tractability of enumeration in practice?
Key findings
- Enumeration of arbitrary and shortest path matches for RPQs can be achieved in polynomial delay.
- For simple transitive expressions (STE), both simple path and trail enumeration are in FPT delay, indicating tractability for a broad class of practical queries.
- The two disjoint paths problem is W[1]-hard when parameterized by the length of one path, highlighting a core intractability in path-finding subroutines.
- A reduction from trail enumeration to simple path enumeration preserves path correspondence and enables reuse of efficient algorithms.
- For STEs that are almost conflict-free and with bounded label sets, enumeration can be performed in FPT delay with radix order.
- The results show that despite NP- and #P-completeness in general, practical RPQs—common in real-world workloads—admit efficient enumeration under simple path and trail semantics.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.