Lossless Derandomization for Undirected Single-Source Shortest Paths and Approximate Distance Oracles
Yan
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.
academic
Lossless Derandomization for Undirected Single-Source Shortest Paths and Approximate Distance Oracles
This paper investigates a fundamental problem in shortest path algorithms on undirected graphs: how to select a subset of vertices as centers and grow balls from each vertex until reaching a center, with the goal of minimizing the total ball size. While randomized algorithms can achieve optimal expected ball size Θ(n/r) by uniformly sampling r centers, traditional derandomization methods introduce an additional O(log n) factor, which is prohibitively expensive in certain applications. By exploiting the fact that ball sizes can be adaptively chosen by the algorithm, this paper proposes a simple deterministic algorithm that achieves optimal ball size Θ(n/r) in expectation and extends to arbitrary polynomial-sized cost functions. The technique successfully derandomizes the O(m√(log n log log n)) single-source shortest path algorithm of DMSY23 and the classical Thorup-Zwick approximate distance oracle without loss in time/space complexity.
The core problem addressed in this paper is the Hitting Growable Balls problem. Many graph algorithms, particularly those for shortest paths, distance oracles, and sparse subgraph construction, encounter the following pattern:
Select a subset R of vertices as centers
Grow a ball B(v) from each vertex v until reaching some center
Algorithm performance depends on |R| and the total size of all balls
Traditional derandomization approaches have critical shortcomings:
Cost of Folk Methods: Using the O(log n)-approximation algorithm for set cover to derandomize introduces an additional O(log n) factor
Severe Performance Loss: For the DMSY23 algorithm, this additional factor degrades the time complexity from O(m√(log n log log n)) to O(m log n √(log log n)), being surpassed again by Dijkstra's algorithm
Fixed Ball Size Assumption: Traditional methods assume ball sizes are fixed by the input, failing to exploit algorithmic adaptivity
The key insight of this paper is: ball sizes can be adaptively chosen by the algorithm rather than being fixed by the input. This provides new possibilities for designing superior derandomization algorithms.
Proposes a deterministic algorithm for hitting growable balls: Designs Algorithm 1 that achieves optimal ball size Θ(n/r) in expectation without introducing additional logarithmic factors
Achieves lossless derandomization of DMSY23: Transforms the randomized O(m√(log n log log n)) single-source shortest path algorithm into a deterministic algorithm with identical complexity
Derandomizes the Thorup-Zwick distance oracle: Removes the O(log n) factor from previous derandomization methods, achieving O(kn^(1/k)(m + n log n)) preprocessing time identical to the randomized version
Provides a general theoretical framework: The method extends to arbitrary polynomial-sized cost functions with broad applicability
Algorithm 1 is the central contribution of this paper:
Algorithm 1: Hitting Growable Balls
Input: number of vertices n, number of balls m, target number of centers r, cost parameter p
Output: at most r centers hitting all balls
1: Initialize all balls as empty, no centers selected
2: b ← ⌈2^(p+2)n/r⌉
3: Grow each ball to size min{b, n}
4: while not all balls are hit do
5: m' ← number of unhit balls
6: Repeatedly select new centers hitting the most unhit balls,
until number of unhit balls ≤ m'/2^(p+1)
7: b ← 2b
8: Grow each unhit ball to size min{b, n}
9: return all selected centers
This paper makes important contributions to theoretical computer science, particularly in derandomization of graph algorithms. While lacking experimental verification, its theoretical value and potential applications make it a significant advance in the field.