Table of Contents
Fetching ...

Lossless Derandomization for Undirected Single-Source Shortest Paths and Approximate Distance Oracles

Shuyi Yan

TL;DR

This work tackles deterministic derandomization of center-ball techniques for undirected SSSP and distance oracles. It introduces hitting-growable-balls, a simple, adaptive framework that preserves the optimal average ball size $\Theta(n/r)$ and extends to polynomially large cost functions, enabling fully deterministic derandomization of prior randomized methods. As a result, it achieves a deterministic $O(m \sqrt{\log n \log\log n})$ SSSP algorithm in sparse graphs (matching the recent randomized bound) and deterministically constructs the Thorup–Zwick oracle with the same time/space complexity as the original randomized approach. The framework is modular and potentially applicable to other center-ball based randomized algorithms, offering practical deterministic alternatives for SSSP and distance queries in undirected graphs.

Abstract

A common step in algorithms related to shortest paths in undirected graphs is that, we select a subset of vertices as centers, then grow a ball around each vertex until a center is reached. We want the balls to be as small as possible. A randomized algorithm can uniformly sample $r$ centers to achieve the optimal (expected) ball size of $Θ(n/r)$. A folklore derandomization is to use the $O(\log n)$ approximation for the set cover problem in the hitting set version where we want to hit all the balls with the centers. However, the extra $O(\log n)$ factor is sometimes too expensive. For example, the recent $O(m\sqrt{\log n\log\log n})$ undirected single-source shortest path algorithm [DMSY23] beats Dijkstra's algorithm in sparse graphs, but the folklore derandomization would make it dominated by Dijkstra's. In this paper, we exploit the fact that the sizes of these balls can be adaptively chosen by the algorithm instead of fixed by the input. We propose a simple deterministic algorithm achieving the optimal ball size of $Θ(n/r)$ on average. Furthermore, given any polynomially large cost function of the ball size, we can still achieve the optimal cost on average. It allows us to derandomize [DMSY23], resulting in a deterministic $O(m\sqrt{\log n\log\log n})$ algorithm for undirected single-source shortest path. In addition, we show that the same technique can also be used to derandomize the seminal Thorup-Zwick approximate distance oracle [TZ05], also without any loss in the time/space complexity.

Lossless Derandomization for Undirected Single-Source Shortest Paths and Approximate Distance Oracles

TL;DR

This work tackles deterministic derandomization of center-ball techniques for undirected SSSP and distance oracles. It introduces hitting-growable-balls, a simple, adaptive framework that preserves the optimal average ball size and extends to polynomially large cost functions, enabling fully deterministic derandomization of prior randomized methods. As a result, it achieves a deterministic SSSP algorithm in sparse graphs (matching the recent randomized bound) and deterministically constructs the Thorup–Zwick oracle with the same time/space complexity as the original randomized approach. The framework is modular and potentially applicable to other center-ball based randomized algorithms, offering practical deterministic alternatives for SSSP and distance queries in undirected graphs.

Abstract

A common step in algorithms related to shortest paths in undirected graphs is that, we select a subset of vertices as centers, then grow a ball around each vertex until a center is reached. We want the balls to be as small as possible. A randomized algorithm can uniformly sample centers to achieve the optimal (expected) ball size of . A folklore derandomization is to use the approximation for the set cover problem in the hitting set version where we want to hit all the balls with the centers. However, the extra factor is sometimes too expensive. For example, the recent undirected single-source shortest path algorithm [DMSY23] beats Dijkstra's algorithm in sparse graphs, but the folklore derandomization would make it dominated by Dijkstra's. In this paper, we exploit the fact that the sizes of these balls can be adaptively chosen by the algorithm instead of fixed by the input. We propose a simple deterministic algorithm achieving the optimal ball size of on average. Furthermore, given any polynomially large cost function of the ball size, we can still achieve the optimal cost on average. It allows us to derandomize [DMSY23], resulting in a deterministic algorithm for undirected single-source shortest path. In addition, we show that the same technique can also be used to derandomize the seminal Thorup-Zwick approximate distance oracle [TZ05], also without any loss in the time/space complexity.
Paper Structure (19 sections, 7 theorems, 4 equations, 1 algorithm)

This paper contains 19 sections, 7 theorems, 4 equations, 1 algorithm.

Key Result

theorem 1

For any $1\le r\le n$, we can deterministically select the center set $R$ with size $|R|=r$, such that $\sum_v|B(v)|\log|B(v)|=O(n\cdot(n/r)\log(n/r))=O((n^2/r)\log(n/r))$, in $O(r+(n^2/r)\log(n/r))$ time.

Theorems & Definitions (10)

  • theorem 1: Informal
  • theorem 2
  • theorem 3
  • theorem 4
  • proof
  • corollary 5
  • proof
  • lemma 6: roditty2005deterministic Theorem 2
  • lemma 7
  • proof