Akademska digitalna zbirka SLovenije - logo
E-resources
Full text
Peer reviewed
  • Approximate distance oracle...
    Roditty, Liam; Tov, Roei

    Theoretical computer science, 01/2023, Volume: 943
    Journal Article

    Thorup and Zwick 1 introduced the notion of approximate distance oracles, a data structure that produces for an n-vertex, m-edge 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 (2k−1)d(u,v), i.e., a (2k−1)-multiplicative approximation (stretch). Thorup and Zwick 1 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 2 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. 3 presented infinitely 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 (2k−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˜(km1+1/k) that produces in O(k) time an estimation d⁎(u,v) that satisfies d(u,v)≤d⁎(u,v)≤(2k−1)d(u,v)−4, for k>2, and d(u,v)≤d⁎(u,v)≤3d(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 characterize the exact scenarios in which every query that involves w produces an estimation of stretch strictly better than 2k−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. •Graph sparsity can help to get space-stretch tradeoffs for Distance Oracle which are strictly better than Thorup and Zwick space-stretch tradeoffs for general undirected graphs.•A refined stretch analysis of Thorup and Zwick Distance Oracle that characterizes several cases in which the stretch is strictly better than 2k−1.•An experiment on real world graphs shows that the cases characterized in the refined stretch analysis are quite frequent, and thus, in many real world graphs, the actual stretch is much better than the worst case stretch bound.