Path-Reporting Distance Oracles for Vertex-Labeled Graphs
Abstract
Let be a weighted undirected graph, with vertices. A distance oracle is a data structure that can quickly answer distance queries, with some stretch factor. A seminal work of \cite{TZ01}, given an integer , provides such an oracle with stretch , query time , and size . Furthermore, this oracle can also report a path in corresponding to the returned distance. In this paper we focus on vertex-labeled graphs, in which each vertex is given a label from a set of size . A {\em vertex-label distance oracle} answers queries of the form , where and , by reporting (an approximation to) the distance from to the closest vertex of label . Following \cite{HLWY11}, it was shown in \cite{C12} that for any integer , there exists a vertex-label distance oracle with stretch , query time , and size . This state-of-the-art result suffers from two main drawbacks: The stretch is roughly a factor of 2 larger than in \cite{TZ01}, and it is not path-reporting. We address these concerns in this work, and provide the following results: First, we devise a {\em path-reporting} vertex-label distance oracle, at the cost of a slight increase in stretch and size. For any constant , our oracle has stretch , query time , and size . Second, we show how to improve the stretch to the optimal , at the cost of mildly increasing the query time. Specifically, we devise a vertex-label distance oracle with stretch , query time , and size . \end{itemize}
Cite
@article{arxiv.2604.26451,
title = {Path-Reporting Distance Oracles for Vertex-Labeled Graphs},
author = {Ofer Neiman and Alon Spector},
journal= {arXiv preprint arXiv:2604.26451},
year = {2026}
}
Comments
To appear in SWAT 2026