Approximate Distance Oracles with Improved Stretch for Sparse Graphs

Liam Roditty, Roei Tov

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

1 Scopus citations


Thorup and Zwick [19] introduced the notion of approximate distance oracles, a data structure that produces for an n-vertices, m-edges weighted undirected graph G= (V, E), distance estimations in constant query time. They presented a distance oracle of size O(kn1+1/k) that given a pair of vertices u, v∈ V at distance d(u, v) produces in O(k) time an estimation that is bounded by (2 k- 1 ) d(u, v), i.e., a (2 k- 1 ) -multiplicative approximation (stretch). Thorup and Zwick [19] presented also a lower bound based on the girth conjecture of Erdős. For sparse unweighted graphs (i.e., m= O~ (n) ) the lower bound does not apply. Pǎtraşcu and Roditty [10] used the sparsity of the graph and obtained a distance oracle that uses O~ (n5 / 3) space, has O(1) query time and a stretch of 2. Pǎtraşcu et al. [11] presented infinity many distance oracles with fractional stretch factors that for graphs with m= O~ (n) converge exactly to the integral stretch factors and the corresponding space bound of Thorup and Zwick. It is not known, however, whether graph sparsity can help to get a stretch which is better than (2 k- 1 ) using only O~ (kn1+1/k) space. In this paper we answer this open question and prove a separation between sparse and dense graphs by showing that using sparsity it is possible to obtain better stretch/space tradeoffs than those of Thorup and Zwick. We show that for every k≥ 2 there is a distance oracle of size O(knm1/klog n) that produces in O(k) time an estimation d(u, v) that satisfies d(u, v) ≤ d(u, v) ≤ (2 k- 1 ) d(u, v) - 4, for k> 2, and d(u, v) ≤ d(u, v) ≤ 3 d(u, v) - 2, for k= 2. Another contribution of this paper is a refined stretch analysis of Thorup and Zwick distance oracles that allows us to obtain a better understanding of this important data structure. We present simple conditions for every w∈ V that characterizes the exact scenarios in which every query that involves w produces an estimation of stretch strictly better than 2 k- 1, even in the case of dense graphs. We complement this contribution with an experiment on real world graphs. The main finding in the experiment is that different real world graphs are likely to satisfy the required conditions and hence the stretch of Thorup and Zwick distance oracles is much better than its worst case bound in these real world graphs.

Original languageEnglish
Title of host publicationComputing and Combinatorics - 27th International Conference, COCOON 2021, Proceedings
EditorsChi-Yeh Chen, Wing-Kai Hon, Ling-Ju Hung, Chia-Wei Lee
PublisherSpringer Science and Business Media Deutschland GmbH
Number of pages12
ISBN (Print)9783030895426
StatePublished - 2021
Event27th International Conference on Computing and Combinatorics, COCOON 2021 - Tainan, Taiwan, Province of China
Duration: 24 Oct 202126 Oct 2021

Publication series

NameLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
Volume13025 LNCS
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349


Conference27th International Conference on Computing and Combinatorics, COCOON 2021
Country/TerritoryTaiwan, Province of China

Bibliographical note

Publisher Copyright:
© 2021, Springer Nature Switzerland AG.


  • Approximate distance oracles
  • Approximate shortest paths
  • Graph algorithms


Dive into the research topics of 'Approximate Distance Oracles with Improved Stretch for Sparse Graphs'. Together they form a unique fingerprint.

Cite this