Distinct Shortest Walk Enumeration for RPQs - Archive ouverte HAL Accéder directement au contenu
Pré-Publication, Document De Travail Année : 2024

Distinct Shortest Walk Enumeration for RPQs

Claire David
Nadime Francis
Victor Marsault

Résumé

We consider the Distinct Shortest Walks problem. Given two vertices $s$ and $t$ of a graph database $\mathcal{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{|\mathcal{D}|\times|\mathcal{A}|}$ and the delay between two consecutive outputs is in $O(\lambda\times|\mathcal{A}|)$, where $\mathcal{A}$ is a nondeterministic automaton representing the query and $\lambda$ is the minimal length. The algorithm can handle $\varepsilon$-transitions in $\mathcal{A}$ or queries given as regular expressions at no additional cost.

Dates et versions

hal-04495051 , version 1 (08-03-2024)

Identifiants

Citer

Claire David, Nadime Francis, Victor Marsault. Distinct Shortest Walk Enumeration for RPQs. 2024. ⟨hal-04495051⟩
18 Consultations
0 Téléchargements

Altmetric

Partager

Gmail Mastodon Facebook X LinkedIn More