Distinct Shortest Walk Enumeration for RPQs
Abstract
We consider the Distinct Shortest Walks problem. Given two vertices s and t of a graph database D and a regular path query, enumerate all walks of minimal length from s to t that carry a label that conforms to the query. Usual theoretical solutions turn out to be inefficient when applied to graph models that are closer to real-life systems, in particular because edges may carry multiple labels. Indeed, known algorithms may repeat the same answer exponentially many times. We propose an efficient algorithm for multi-labelled graph databases. The preprocessing runs in O|D|×|A| and the delay between two consecutive outputs is in O(λ×|A|), where A is a nondeterministic automaton representing the query and λ is the minimal length. The algorithm can handle -transitions in A or queries given as regular expressions at no additional cost.
Turn this paper into a full lesson
ArcXiv compiles a staged curriculum from this paper: 8-12 lessons across beginner → advanced, synthesised section guides, visuals, flashcards, a quiz, exercises, and on-demand deep dives per section. Grounded in the abstract, never invented.