English

Path-Reporting Distance Oracles with Linear Size

Data Structures and Algorithms 2024-05-24 v1

Abstract

Given an undirected weighted graph, an (approximate) distance oracle is a data structure that can (approximately) answer distance queries. A {\em Path-Reporting Distance Oracle}, or {\em PRDO}, is a distance oracle that must also return a path between the queried vertices. Given a graph on nn vertices and an integer parameter k1k\ge 1, Thorup and Zwick \cite{TZ01} showed a PRDO with stretch 2k12k-1, size O(kn1+1/k)O(k\cdot n^{1+1/k}) and query time O(k)O(k) (for the query time of PRDOs, we omit the time needed to report the path itself). Subsequent works \cite{MN06,C14,C15} improved the size to O(n1+1/k)O(n^{1+1/k}) and the query time to O(1)O(1). However, these improvements produce distance oracles which are not path-reporting. Several other works \cite{ENW16,EP15} focused on small size PRDO for general graphs, but all known results on distance oracles with linear size suffer from polynomial stretch, polynomial query time, or not being path-reporting. In this paper we devise the first linear size PRDO with poly-logarithmic stretch and low query time O(loglogn)O(\log\log n). More generally, for any integer k1k\ge 1, we obtain a PRDO with stretch at most O(k4.82)O(k^{4.82}), size O(n1+1/k)O(n^{1+1/k}), and query time O(logk)O(\log k). In addition, we can make the size of our PRDO as small as n+o(n)n+o(n), at the cost of increasing the query time to poly-logarithmic. For unweighted graphs, we improve the stretch to O(k2)O(k^2). We also consider {\em pairwise PRDO}, which is a PRDO that is only required to answer queries from a given set of pairs P{\cal P}. An exact PRDO of size O(n+P2)O(n+|{\cal P}|^2) and constant query time was provided in \cite{EP15}. In this work we dramatically improve the size, at the cost of slightly increasing the stretch. Specifically, given any ϵ>0\epsilon>0, we devise a pairwise PRDO with stretch 1+ϵ1+\epsilon, constant query time, and near optimal size no(1)(n+P)n^{o(1)}\cdot (n+|{\cal P}|).

Keywords

Cite

@article{arxiv.2405.14254,
  title  = {Path-Reporting Distance Oracles with Linear Size},
  author = {Ofer Neiman and Idan Shabat},
  journal= {arXiv preprint arXiv:2405.14254},
  year   = {2024}
}

Comments

27 pages, 2 figures

R2 v1 2026-06-28T16:36:45.114Z