English

Distances in Planar Graphs are Almost for Free!

Data Structures and Algorithms 2026-03-30 v1

Abstract

We prove that, up to subpolynomial or polylogarithmic factors, there is no tradeoff between preprocessing time, query time, and size of exact distance oracles for planar graphs. Namely, we show how given an nn-vertex weighted directed planar graph GG, one can compute in n1+o(1)n^{1+o(1)} time and space a representation of GG from which one can extract the exact distance between any two vertices of GG in log2+o(1)(n)\log^{2+o(1)}(n) time. Previously, it was only known how to construct oracles with these space and query time in n3/2+o(1)n^{3/2+o(1)} time [STOC 2019, SODA 2021, JACM 2023]. We show how to construct these oracles in n1+o(1)n^{1+o(1)} time.

Keywords

Cite

@article{arxiv.2603.26313,
  title  = {Distances in Planar Graphs are Almost for Free!},
  author = {Shay Mozes and Daniel Prigan},
  journal= {arXiv preprint arXiv:2603.26313},
  year   = {2026}
}
R2 v1 2026-07-01T11:40:36.469Z