## Abstract

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(kn^{1}^{+}^{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~ (n^{5 / 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~ (kn^{1}^{+}^{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(knm^{1}^{/}^{k}log 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 language | English |
---|---|

Title of host publication | Computing and Combinatorics - 27th International Conference, COCOON 2021, Proceedings |

Editors | Chi-Yeh Chen, Wing-Kai Hon, Ling-Ju Hung, Chia-Wei Lee |

Publisher | Springer Science and Business Media Deutschland GmbH |

Pages | 89-100 |

Number of pages | 12 |

ISBN (Print) | 9783030895426 |

DOIs | |

State | Published - 2021 |

Event | 27th International Conference on Computing and Combinatorics, COCOON 2021 - Tainan, Taiwan, Province of China Duration: 24 Oct 2021 → 26 Oct 2021 |

### Publication series

Name | Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) |
---|---|

Volume | 13025 LNCS |

ISSN (Print) | 0302-9743 |

ISSN (Electronic) | 1611-3349 |

### Conference

Conference | 27th International Conference on Computing and Combinatorics, COCOON 2021 |
---|---|

Country/Territory | Taiwan, Province of China |

City | Tainan |

Period | 24/10/21 → 26/10/21 |

### Bibliographical note

Publisher Copyright:© 2021, Springer Nature Switzerland AG.

## Keywords

- Approximate distance oracles
- Approximate shortest paths
- Graph algorithms