A Faster Undirected Single-Source Shortest Path Algorithm
Listen
Radio episode about this paper
Transcript
Introduction to the show: ident: Computer Science. The day in computer science: software, systems and theory on arXiv.
Tom: We're looking at the paper: "A Faster Undirected Single-Source Shortest Path Algorithm".
Title and authors: Tom: So we're looking at this paper called "A Faster Undirected Single-Source Shortest Path Algorithm". Jane, what's the main takeaway here in plain English?
Jane: Well, Tom, it’s about finding the shortest path from one starting point to every other point in a weighted undirected graph. The previous best time for that was Dijkstra’s algorithm with Fibonacci heaps, which was O m plus n log n Bel58. This paper says they found a way to do it faster than before.
Lu: It really targets the sorting barrier that Dijkstra's needs to overcome, which is why this is interesting. They are looking at how to compute these distances without having to sort all the distances in order, which usually costs n log n comparisons Bel58.
Meng: If it’s faster, that matters for deploying models on big graphs. We don't want an algorithm that takes too long when we have millions of nodes and edges. What is this new running time they claim?
Tom: They claim their new running time is O m log1/two n log log1/four n log loglog1/four n, which is faster than the previous best <ref:2609.15247#pg1,O m log1/2 n log log1/4 n log>. That's a significant improvement over the O m plus n log n bound Bel58.
Jane: And they achieve this by using a randomized approach to get an approximation of the distances, which seems to be the trick. They use a random sample of vertices instead of checking every single vertex for the shortest path.
Lu: That tool they introduce—computing the distance from every vertex to its nearest point in that random sample—is actually useful on its own, even if this paper is just about SSSP <ref:2609.15247#pg1>.
Meng: Useful for what? It sounds like a nice side result, but I need to know what it means for the actual pathfinding speed. Does that tool itself run fast enough at scale?
Tom: The paper suggests this distance-to-sample tool is a simple and efficient piece of machinery <ref:2609.15247#pg1>. It might be useful independently, but the main goal here is getting the SSSP computation down.
The paper's summary: Jane: So, what’s this whole process they described in "A Faster Undirected Single-Source Shortest Path Algorithm"? Essentially, how do they use that random sample to speed up finding all those shortest paths?
Lu: They start by saying that the main bottleneck in older methods was this preprocessing step where you had to run a bounded Dijkstra search from every vertex until you hit your first sample <ref:2609.15247#pg3>. That preprocessing cost O m k log k time over all vertices.
Tom: And they replace that complex construction with something called an ActiveBellmanFord algorithm, which they say computes everything in O m k time with high probability <ref:2609.15247#pg1>. That seems like a direct way to save the sorting cost.
Meng: But wait, if you’re running ActiveBellmanFord on every vertex until you hit a sample, how much memory or processing power is that? I need to know the actual cost in practice.
Jane: The analysis relies on some key properties of random samples that guarantee the total cost for calling BoundSSSP over all vertices is bounded by O m k <ref:2609.15247#pg1>. That keeps things under control probabilistically.
Lu: And then they show that the running time of BundleDijkstra, which is part of their overall algorithm, stays in a good spot, O m k plus m over k times log n <ref:2609.15247#pg1>. That’s what keeps the complexity manageable when you look at sparse graphs where m equals n.
Tom: So they are replacing the expensive construction cost with something that runs in O m k log one/two k loglog one/two k, which is a definite improvement over the O m k log k construction <ref:2609.15247#pg4>.
The paper's improvements: Jane: So what are the specific improvements they point out? It seems like they’re focusing on speeding up that initial setup phase, which is usually the slowest part of these algorithms.
Tom: Exactly. The biggest improvement is replacing the O m k log k construction from a previous paper with something that runs in O m k log one/two k loglog one/two k <ref:2609.15247#pg4>. That change alone gives them the factor of (log log n / log loglog n) to improve the running time by a quarter.
Lu: And they tie this improvement to how they use that random sample S, which is chosen by sampling each vertex independently with a probability of one over k <ref:2609.15247#pg15>. That sampling strategy is what drives the speed up.
Meng: I see the sampling part, but what about the other part? The paper mentions that their running time never gets worse than that of BundleDijkstra from a prior work <ref:2609.15247#pg16>. Does it actually improve over everything else?
Jane: They claim that for any m, the running time is never worse than the old algorithm, but it only actually shows its saving when the ball construction part becomes the dominant term in the overall cost <ref:2609.15247#pg16>.
Tom: And they found a way to make that ball construction bottleneck faster by adapting previous derandomization techniques so they grow those balls simultaneously instead of one at a time <ref:2609.15247#pg17>.
Lu: That simultaneous growth is what gets them the required running time bound of O m log one/two n log log one/four n log loglog one/four n <ref:2609.15247#pg9>. It balances out those terms nicely when you pick k to be around log one/two n times some other logarithmic factors <ref:2609.15247#pg9>.
Conclusion: Jane: So, to wrap up, what does this paper actually mean for someone who is trying to find shortest paths in a weighted undirected graph? What’s the big picture here?
Tom: It means we can now compute single source shortest paths with non-negative edge weights faster than before. The new running time of O m log1/two n log log1/four n log loglog1/four n gives us a real speedup over older methods <ref:2609.15247#pg3>.
Lu: It’s about finding that balance where you use a randomized sample to avoid the sorting barrier, and then using smart construction techniques to handle the resulting structures efficiently.
Meng: For production systems, if this speedup holds up under real traffic conditions—and I know it's not proven on real traffic—it could mean much faster routing decisions in large networks <ref:2609.15247#pg1>. But the authors admit that the construction of those balls is still a bottleneck for a faster deterministic algorithm <ref:2609.15247#pg8>.
Tom: They do say that achieving an even faster deterministic algorithm requires producing that sample set S in o m k log k time, which is where they’re still working on things <ref:2609.15247#pg17>. But for now, this randomized version gives us a solid result.
Jane: That's right. The paper "A Faster Undirected Single-Source Shortest Path Algorithm" shows that by using a carefully chosen random sample and smarter construction, we can achieve better complexity than before for this problem <ref:2609.15247#pg3>. It’s a solid step forward in the field of graph algorithms.
Lu: It really highlights that even when you look at randomized methods, the structure of how you build those auxiliary structures is what ultimately dictates whether you get a real speedup or not <ref:2609.15247#pg8>.
Meng: I just hope the next work tackles that ball construction issue hard because if we want to deploy this on massive infrastructure, we need something deterministic and solid <ref:2609.15247#pg17>. (End of Episode)
Department of Computer Science, Bar Ilan University
cs.DS
Submitted: 2026-09-14
Updated: 2026-12-01
License: http://creativecommons.org/licenses/by/4.0/
Importance score: 89/100
The gist: The paper presents a faster algorithm for single-source shortest paths in weighted undirected graphs by improving upon previous state-of-the-art running times.<ref:2609.15247#pg1…
Key concepts
- ActiveBellmanFord
- This is a technique used to compute distances to a sampled set of vertices. Instead of running the full Bellman-Ford algorithm, it efficiently computes these distances in O(mk) time with high probability, which is crucial for speeding up the overall shortest path calculation.
- Ball Construction
- The paper focuses on constructing 'balls' around each vertex. These balls represent a set of vertices close to a specific source vertex. Efficiently building these balls is a major bottleneck in previous methods, and this new approach speeds up this construction significantly.
- Random Sampling Strategy
- The algorithm relies on randomly selecting vertices to form a sample set S. This sampling strategy allows the researchers to prove that the total cost of using these samples remains bounded by O(mk), which is essential for controlling the overall running time.
Terminology
Summary
The paper presents a faster algorithm for single-source shortest paths in weighted undirected graphs by improving upon previous state-of-the-art running times. p. 7 Since δG′(r, v) is
the ≺-minimum, d[v] is never written again, so the equality persists. 3 Faster algorithm for SSSP in weighted undirected graphs
In this section we present the main result of this paper, an algorithm that is faster than the stateof-the-art algorithm of [DMSY23] for single-source shortest paths in sparse weighted undirected
graphs. A Faster Undirected Single-Source Shortest Path Algorithm
Avi Kadria∗ Liam Roditty†
Abstract
The single-source shortest paths (SSSP) problem in graphs with non-negative edge weights
is one of the most classic problems in algorithms. For decades, the best known running time
in the comparison-addition model was the O(m + n log n) bound of Dijkstra’s algorithm with
Fibonacci heaps.Where the paper says it
Where the paper says it
Main Contribution
The main contribution is a simple and efficient tool that computes, for every vertex, its distance to the nearest vertex in a random sample.<ref:2609.15247#pg1, Our main contribution is a simple and efficient tool that computes, for every vertex, its distance to the nearest vertex in a random sample>. p. 0 Our algorithm runs in O(m log1/2
n log log1/4
n log log log1/4
n) time, improving the
previous running time by a factor of ( log log n
log log log n
)
1/4
. Our main contribution is a simple and efficient tool that computes, for every vertex, its
distance to the nearest vertex in a random sample; this tool may be of independent interest. Our algorithm runs in O(m log1/2
n log log1/4
n log log log1/4
n) time, improving the
previous running time by a factor of ( log log n
log log log n
)
1/4
. Our main contribution is a simple and efficient tool that computes, for every vertex, its
distance to the nearest vertex in a random sample; this tool may be of independent interest. Our algorithm runs in O(m log1/2
n log log1/4
n log log log1/4
n) time, improving the
previous running time by a factor of ( log log n
log log log n
)
1/4
. Our main contribution is a simple and efficient tool that computes, for every vertex, its
distance to the nearest vertex in a random sample; this tool may be of independent interest.Where the paper says it
Where the paper says it
Where the paper says it
Algorithm Improvement
The proposed algorithm runs in O(m log1/2 n log log1/4 n log log log1/4 n) time, improving the previous running time by a factor of (log log n / log log log n)(1/4).<ref:2609.15247#pg3>. This improvement is achieved by replacing the O(mk log k) construction of [DMSY23] by O(mk log1/2 k loglog1/2 k), while BundleDijkstra and the rest of the algorithm are unchanged. p. 7 Notice that in the balanced case, given the bundles and balls, BundleDijkstra completes the
SSSP computation in O(mk + (m/k) log n) time, since |Ball(v)| = O(k) for every v ∈ V . Perhaps
surprisingly, the dominant cost of the algorithm of [DMSY23] is not BundleDijkstra but the
construction of bundles and balls. 2 Speeding up the ball and bundle construction
First, we present an algorithm that, under the balanced case assumption, computes the distances
δ(v, b(v)) and the bundles in O(mk) time, improving the O(mk log k) running time of [DMSY23]. The algorithm, BoundedBellmanFord (Algorithm 1), runs a fixed number t of Bellman–Ford
steps from an auxiliary super-source connected to all samples, maintaining for each vertex a tentative distance d[v] together with a label b[v] recording the sample that realizes it; the label is
carried along whenever d[v] is relaxed.Where the paper says it
Where the paper says it
Theoretical Foundations
The analysis relies on several key results concerning random samples.<ref:2609.15247#pg1>. These properties guarantee that the total cost of calling BoundSSSP over all vertices is bounded by O(mk). p. 9 In Section B we resolve both issues, by invoking
BMSSP with a doubling parameter t and an increasing level ℓ until a full execution is reached. By
geometric summation, the total cost of the unsuccessful calls is bounded by the same asymptotic
running-time bound as the successful phase. Perhaps
surprisingly, the dominant cost of the algorithm of [DMSY23] is not BundleDijkstra but the
construction of bundles and balls. To compute bundles and balls, [DMSY23] runs a separate
bounded Dijkstra from each v ∈ V , stopping when the first vertex of S is reached, thus computing
b(v) and Ball(v) in O(k log k) time per vertex and O(mk log k) time overall, which dominates
6The balanced case need not hold when S is randomly sampled; it is only used for clarity of presentation. Section 2 contains preliminaries. Section 3 presents the algorithm in two stages:
first under a simplifying balanced case assumption on the random sample (Section 3.Where the paper says it
Where the paper says it
Where the paper says it
Complexity Analysis
The total running time is derived by combining the costs of three steps: computing distances to a sampled set using ActiveBellmanFord (Algorithm 2) in O(mk) w.h.p. <ref:2609.15247#pg1> O m log 1/2 n log log 1/4 n log log log 1/4 n). p. 0 A Faster Undirected Single-Source Shortest Path Algorithm
Avi Kadria∗ Liam Roditty†
Abstract
The single-source shortest paths (SSSP) problem in graphs with non-negative edge weights
is one of the most classic problems in algorithms. For decades, the best known running time
in the comparison-addition model was the O(m + n log n) bound of Dijkstra’s algorithm with
Fibonacci heaps.Where the paper says it
Open Problems
The paper leaves open several questions regarding the scope of the result, including improving the construction of the balls.<ref:2609.15247#pg8>. The bottleneck in the current approach is the ball construction, which takes O(mk log1/2 k loglog1/2 k) time. p. 2 Using the computed distances to S as radii, the bounded-distance Dijkstra of [DMSY26] then
computes all balls {Ball(v)}v∈V in total time O(mk log1/2
k log log1/2
k), yielding Theorem 1. With
the bundle construction now costing only O(mk), the ball construction becomes the bottleneck of
the entire algorithm, and any further improvement to it immediately improves the overall running
time. Lemma 5 (BundleDijkstra [DMSY23]). Given a weighted undirected graph G, a source
u ∈ V , a set S ⊆ V with |S| = O(n/k), and δ(v, w) for every v ∈ V and w ∈ Ball(v),
algorithm BundleDijkstra computes the single-source shortest paths from u to every v ∈ V in
O
P
v∈V
|Ball(v)| +
m
k
log n
time. Reference Graph type Randomized? Running time
Dijkstra directed deterministic O(m + n log n)
[DMSY23] undirected randomized O(m log1/2 n log log1/2 n)
[DMM+25] directed deterministic O(m log2/3 n)
[Yan26] undirected deterministic O(m log1/2 n log log1/2 n)
[DMSY26] directed deterministic O(m log1/2 n log log1/2 n)
This paper undirected randomized O(m log1/2 n log log1/4 n log log log1/4 n)
Table 1: Comparison of algorithms for SSSP in sparse (m = O(n)) weighted graphs in the
comparison-addition model. Instead of n local bounded Dijkstra searches, each terminating when the nearest sample is
reached, we run a single global active-vertex Bellman–Ford algorithm [Moo59] from an auxiliary
super-source connected to all samples, which simultaneously computes all distances to S. One
might ask why such a simple change was not already made in [DMSY23]: the reason it appears
not to work is that a random sample leaves some balls of size Θ(k log n) w. Since δG′(r, v) is
the ≺-minimum, d[v] is never written again, so the equality persists. 3 Faster algorithm for SSSP in weighted undirected graphs
In this section we present the main result of this paper, an algorithm that is faster than the stateof-the-art algorithm of [DMSY23] for single-source shortest paths in sparse weighted undirected
graphs. Surprisingly, the dominant cost of [DMSY23] is this preprocessing step, and not the shortestpath computation that follows. The extra log k factor is precisely what produces the log log1/2 n
term in the running time, and improving this factor is the key to our result. Using the computed distances to S as radii, the bounded-distance Dijkstra of [DMSY26] then
computes all balls {Ball(v)}v∈V in total time O(mk log1/2
k log log1/2
k), yielding Theorem 1. With
the bundle construction now costing only O(mk), the ball construction becomes the bottleneck of
the entire algorithm, and any further improvement to it immediately improves the overall running
time. Using the computed distances to S as radii, the bounded-distance Dijkstra of [DMSY26] then
computes all balls {Ball(v)}v∈V in total time O(mk log1/2
k log log1/2
k), yielding Theorem 1. With
the bundle construction now costing only O(mk), the ball construction becomes the bottleneck of
the entire algorithm, and any further improvement to it immediately improves the overall running
time. Reference Graph type Randomized? Running time
Dijkstra directed deterministic O(m + n log n)
[DMSY23] undirected randomized O(m log1/2 n log log1/2 n)
[DMM+25] directed deterministic O(m log2/3 n)
[Yan26] undirected deterministic O(m log1/2 n log log1/2 n)
[DMSY26] directed deterministic O(m log1/2 n log log1/2 n)
This paper undirected randomized O(m log1/2 n log log1/4 n log log log1/4 n)
Table 1: Comparison of algorithms for SSSP in sparse (m = O(n)) weighted graphs in the
comparison-addition model. Reference Graph type Randomized? Running time
Dijkstra directed deterministic O(m + n log n)
[DMSY23] undirected randomized O(m log1/2 n log log1/2 n)
[DMM+25] directed deterministic O(m log2/3 n)
[Yan26] undirected deterministic O(m log1/2 n log log1/2 n)
[DMSY26] directed deterministic O(m log1/2 n log log1/2 n)
This paper undirected randomized O(m log1/2 n log log1/4 n log log log1/4 n)
Table 1: Comparison of algorithms for SSSP in sparse (m = O(n)) weighted graphs in the
comparison-addition model. A Faster Undirected Single-Source Shortest Path Algorithm
Avi Kadria∗ Liam Roditty†
Abstract
The single-source shortest paths (SSSP) problem in graphs with non-negative edge weights
is one of the most classic problems in algorithms. For decades, the best known running time
in the comparison-addition model was the O(m + n log n) bound of Dijkstra’s algorithm with
Fibonacci heaps. For a random sample, the sum of all ball sizes is O(nk) with high probability (Lemma 9), giving
the O(mk) running time. Using the computed distances to S as radii, the bounded-distance Dijkstra of [DMSY26] then
computes all balls {Ball(v)}v∈V in total time O(mk log1/2
k log log1/2
k), yielding Theorem 1.Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Bounding Ball Sizes w. p. 2 Active-vertex Bellman–Ford (Algorithm 2) computes δ(v, b(v)) and Bundle(s)
for every v ∈ V and s ∈ S in O
P
v∈V
|Ball(v)| · m
n
time. For a random sample, the sum of all ball sizes is O(nk) with high probability (Lemma 9), giving
the O(mk) running time.Where the paper says it
The proof for the second property of Lemma 9 shows that the weighted sum of ball sizes is bounded by O(nk log1/2 k loglog1/2 k). p. 2 For a random sample, the sum of all ball sizes is O(nk) with high probability (Lemma 9), giving
the O(mk) running time. Using the computed distances to S as radii, the bounded-distance Dijkstra of [DMSY26] then
computes all balls {Ball(v)}v∈V in total time O(mk log1/2
k log log1/2
k), yielding Theorem 1.Where the paper says it
From BMSSP to BoundSSSP
The algorithm BoundSSSP is derived from the recursive procedure BMSSP of [DMSY26].<ref:2609.15247#pg18>.
Correctness of BoundSSSP
Claim 11.3 proves that every call BMSSP(B, v, l) meets the preconditions of Lemma 11 and Ue(B, v) = U. p. 9 This requires some care, for two reasons. First, a call to BMSSP is allowed to end in a partial
execution: it may return a bound B′ ≺ B and complete only the vertices at distance smaller than
B′
, in which case it does not compute all of U. This requires some care, for two reasons. First, a call to BMSSP is allowed to end in a partial
execution: it may return a bound B′ ≺ B and complete only the vertices at distance smaller than
B′
, in which case it does not compute all of U.Where the paper says it
Where the paper says it
Running Time Bound Derivation
The running time bound in Lemma 7 is derived by combining the phase bounds and showing that the total running time is X J j=0 O U∆tj = O U∆tJ = O U∆ + U p ∆ log U log log U).<ref:2609.15247#pg23>.
Lemma 9 Proof Details
The proof of Lemma 9 involves bounding the size of S using the multiplicative Chernoff bound and showing that every vertex satisfies the radius event with probability at least 1 - n-c.<ref:2609.15247#pg18>.
Final Result Summary
The final result is that there is a randomized algorithm that w.h.p. runs in O(m log1/2 n log log1/4 n log log log1/4 n) time and computes single-source shortest paths in undirected graphs with non-negative edge weights. p. 1 There is a randomized algorithm that w. runs in O(m log1/2 n log log1/4 n log log log1/4 n)
time and computes single-source shortest paths in undirected graphs with non-negative edge weights. The first to break the sorting barrier were Duan, Mao, Shu, and Yin [DMSY23], who gave a randomized O(m log1/2 n log log1/2 n) time algorithm for sparse weighted undirected graphs. 2 Recently,
Yan [Yan26] derandomized this algorithm and achieved the same running time deterministically. 2 Speeding up the ball and bundle construction
First, we present an algorithm that, under the balanced case assumption, computes the distances
δ(v, b(v)) and the bundles in O(mk) time, improving the O(mk log k) running time of [DMSY23]. The algorithm, BoundedBellmanFord (Algorithm 1), runs a fixed number t of Bellman–Ford
steps from an auxiliary super-source connected to all samples, maintaining for each vertex a tentative distance d[v] together with a label b[v] recording the sample that realizes it; the label is
carried along whenever d[v] is relaxed. Having computed the distances δ(v, b(v)) and the bundles, it remains to construct Ball(v) for
every v ∈ V . We construct the balls using a bounded-distance search BoundSSSP(v, B), which
computes all distances smaller than B from a source v, and which we obtain from the recursive
procedure BMSSP of [DMSY26]. 6
The O(m log1/2 n log log1/2 n) time algorithm of [DMSY23] works as follows. First, it computes
the distances δ(v, b(v)) for every v ∈ V , the bundles Bundle(s) for every s ∈ S, and the balls
Ball(v) for every v ∈ V .Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
References
The references cited include [AMOT90] Ravindra K. Ahuja, Kurt Mehlhorn, James B. Orlin, and Robert E. Tarjan.<ref:2609.15247#pg18, [Bel58] Richard Bellman. p. 5 For a path P, we denote by |P| the number of edges of P. The classic Bellman–Ford algorithm [Bel58] computes δ
≤k
G
(u, v) from a fixed source u to every
vertex v ∈ V in O(mk) time. A Faster Undirected Single-Source Shortest Path Algorithm
Avi Kadria∗ Liam Roditty†
Abstract
The single-source shortest paths (SSSP) problem in graphs with non-negative edge weights
is one of the most classic problems in algorithms. For decades, the best known running time
in the comparison-addition model was the O(m + n log n) bound of Dijkstra’s algorithm with
Fibonacci heaps. A Faster Undirected Single-Source Shortest Path Algorithm
Avi Kadria∗ Liam Roditty†
Abstract
The single-source shortest paths (SSSP) problem in graphs with non-negative edge weights
is one of the most classic problems in algorithms. For decades, the best known running time
in the comparison-addition model was the O(m + n log n) bound of Dijkstra’s algorithm with
Fibonacci heaps. 1 Introduction
Computing single-source shortest paths (SSSP) in a weighted graph G = (V, E, ℓ) is one of the
most classic problems in algorithms, studied for over half a century [Bel58, Dij59, Moo59, Spi73]. Until recently, the best known running time, in the comparison-addition model, was O(m+n log n)
using Dijkstra’s famous algorithm with Fibonacci heaps [FT87]. 2 Recently,
Yan [Yan26] derandomized this algorithm and achieved the same running time deterministically. In a subsequent breakthrough, Duan, Mao, Mao, Shu, and Yin [DMM+25]3 broke the sorting
barrier for sparse directed graphs as well and presented a complex recursive algorithm for SSSP
that runs in O(m log2/3 n) time. Moreover, Haeupler, Hlad´ık, Rozhoˇn, Tarjan, and
Tˇetˇek [HHR+24] showed that Dijkstra’s algorithm (with a suitable heap) is universally optimal for
this ordering task. Thus, breaking the so-called sorting barrier requires a fundamentally different
approach: computing the distances without sorting them. Therefore, throughout the paper, we
assume m = O(n) and discuss general m in Section 4. The first to break the sorting barrier were Duan, Mao, Shu, and Yin [DMSY23], who gave a randomized O(m log1/2 n log log1/2 n) time algorithm for sparse weighted undirected graphs. For decades, the best known running time
in the comparison-addition model was the O(m + n log n) bound of Dijkstra’s algorithm with
Fibonacci heaps. Recently, Duan, Mao, Shu, and Yin (FOCS’23) gave a randomized O(m log1/2
n log log1/2
n)-
time algorithm for SSSP in weighted undirected graphs. A Faster Undirected Single-Source Shortest Path Algorithm
Avi Kadria∗ Liam Roditty†
Abstract
The single-source shortest paths (SSSP) problem in graphs with non-negative edge weights
is one of the most classic problems in algorithms. For decades, the best known running time
in the comparison-addition model was the O(m + n log n) bound of Dijkstra’s algorithm with
Fibonacci heaps. A sorting-free tool of independent interest. Active-vertex Bellman–Ford, the queue-based
variant of Bellman–Ford [Moo59] that is widely known as SPFA (Shortest Path Faster Algorithm) [Dua94], is not a fast algorithm in general: on arbitrary inputs it can take Θ(mn) time,
far more than Dijkstra’s algorithm. A sorting-free tool of independent interest. Active-vertex Bellman–Ford, the queue-based
variant of Bellman–Ford [Moo59] that is widely known as SPFA (Shortest Path Faster Algorithm) [Dua94], is not a fast algorithm in general: on arbitrary inputs it can take Θ(mn) time,
far more than Dijkstra’s algorithm. Techniques. The algorithm of Duan, Mao, Shu, and Yin [DMSY23] is built on two data structures with respect to a random sample S ⊆ V of size Θ(n/k), where k is a parameter of the
algorithm, eventually set to roughly log1/2 n. 1 Introduction
Computing single-source shortest paths (SSSP) in a weighted graph G = (V, E, ℓ) is one of the
most classic problems in algorithms, studied for over half a century [Bel58, Dij59, Moo59, Spi73]. Until recently, the best known running time, in the comparison-addition model, was O(m+n log n)
using Dijkstra’s famous algorithm with Fibonacci heaps [FT87]. 1
The n log n term in this bound seems hard to avoid: Dijkstra’s algorithm visits the vertices
in increasing order of distance, and hence produces a sorted ordering of the distances, a task that
requires Ω(n log n) comparisons in the worst case. Moreover, Haeupler, Hlad´ık, Rozhoˇn, Tarjan, and
Tˇetˇek [HHR+24] showed that Dijkstra’s algorithm (with a suitable heap) is universally optimal for
this ordering task. A Faster Undirected Single-Source Shortest Path Algorithm
Avi Kadria∗ Liam Roditty†
Abstract
The single-source shortest paths (SSSP) problem in graphs with non-negative edge weights
is one of the most classic problems in algorithms. For decades, the best known running time
in the comparison-addition model was the O(m + n log n) bound of Dijkstra’s algorithm with
Fibonacci heaps. The second data structure is the ball of a vertex v, consisting
of its nearest sample b(v) and all vertices closer to v than b(v) (see Figure 2 for an illustration). 1For bounded integer weights, faster algorithms have been known for more than two decades [Dia69, AMOT90,
Tho99, Hag00, Tho04, PR05]. 1
The n log n term in this bound seems hard to avoid: Dijkstra’s algorithm visits the vertices
in increasing order of distance, and hence produces a sorted ordering of the distances, a task that
requires Ω(n log n) comparisons in the worst case. Moreover, Haeupler, Hlad´ık, Rozhoˇn, Tarjan, and
Tˇetˇek [HHR+24] showed that Dijkstra’s algorithm (with a suitable heap) is universally optimal for
this ordering task. Until recently, the best known running time, in the comparison-addition model, was O(m+n log n)
using Dijkstra’s famous algorithm with Fibonacci heaps [FT87]. 1
The n log n term in this bound seems hard to avoid: Dijkstra’s algorithm visits the vertices
in increasing order of distance, and hence produces a sorted ordering of the distances, a task that
requires Ω(n log n) comparisons in the worst case. The second data structure is the ball of a vertex v, consisting
of its nearest sample b(v) and all vertices closer to v than b(v) (see Figure 2 for an illustration). 1For bounded integer weights, faster algorithms have been known for more than two decades [Dia69, AMOT90,
Tho99, Hag00, Tho04, PR05]. Since δG′(r, v) is
the ≺-minimum, d[v] is never written again, so the equality persists. 3 Faster algorithm for SSSP in weighted undirected graphs
In this section we present the main result of this paper, an algorithm that is faster than the stateof-the-art algorithm of [DMSY23] for single-source shortest paths in sparse weighted undirected
graphs. O(mk); to the best of our knowledge, this is the first instance-dependent bound under which this
algorithm provably outperforms a Dijkstra-based approach. Moreover, computing the distances
to a sampled set is a basic primitive that lies at the core of many algorithms, for example, the
constructions of approximate distance oracles [TZ05], compact routing schemes [TZ01], and spanners [RTZ05]; in particular, the balls essentially coincide with (one level of) the bunches of Thorup
and Zwick [TZ05]. O(mk); to the best of our knowledge, this is the first instance-dependent bound under which this
algorithm provably outperforms a Dijkstra-based approach. Moreover, computing the distances
to a sampled set is a basic primitive that lies at the core of many algorithms, for example, the
constructions of approximate distance oracles [TZ05], compact routing schemes [TZ01], and spanners [RTZ05]; in particular, the balls essentially coincide with (one level of) the bunches of Thorup
and Zwick [TZ05]. 1 Introduction
Computing single-source shortest paths (SSSP) in a weighted graph G = (V, E, ℓ) is one of the
most classic problems in algorithms, studied for over half a century [Bel58, Dij59, Moo59, Spi73]. Until recently, the best known running time, in the comparison-addition model, was O(m+n log n)
using Dijkstra’s famous algorithm with Fibonacci heaps [FT87]. 1 Introduction
Computing single-source shortest paths (SSSP) in a weighted graph G = (V, E, ℓ) is one of the
most classic problems in algorithms, studied for over half a century [Bel58, Dij59, Moo59, Spi73]. Until recently, the best known running time, in the comparison-addition model, was O(m+n log n)
using Dijkstra’s famous algorithm with Fibonacci heaps [FT87]. The second data structure is the ball of a vertex v, consisting
of its nearest sample b(v) and all vertices closer to v than b(v) (see Figure 2 for an illustration). 1For bounded integer weights, faster algorithms have been known for more than two decades [Dia69, AMOT90,
Tho99, Hag00, Tho04, PR05]. A Faster Undirected Single-Source Shortest Path Algorithm
Avi Kadria∗ Liam Roditty†
Abstract
The single-source shortest paths (SSSP) problem in graphs with non-negative edge weights
is one of the most classic problems in algorithms. For decades, the best known running time
in the comparison-addition model was the O(m + n log n) bound of Dijkstra’s algorithm with
Fibonacci heaps. The second data structure is the ball of a vertex v, consisting
of its nearest sample b(v) and all vertices closer to v than b(v) (see Figure 2 for an illustration). 1For bounded integer weights, faster algorithms have been known for more than two decades [Dia69, AMOT90,
Tho99, Hag00, Tho04, PR05]. A Faster Undirected Single-Source Shortest Path Algorithm
Avi Kadria∗ Liam Roditty†
Abstract
The single-source shortest paths (SSSP) problem in graphs with non-negative edge weights
is one of the most classic problems in algorithms. For decades, the best known running time
in the comparison-addition model was the O(m + n log n) bound of Dijkstra’s algorithm with
Fibonacci heaps. O(mk); to the best of our knowledge, this is the first instance-dependent bound under which this
algorithm provably outperforms a Dijkstra-based approach. Moreover, computing the distances
to a sampled set is a basic primitive that lies at the core of many algorithms, for example, the
constructions of approximate distance oracles [TZ05], compact routing schemes [TZ01], and spanners [RTZ05]; in particular, the balls essentially coincide with (one level of) the bunches of Thorup
and Zwick [TZ05]. O(mk); to the best of our knowledge, this is the first instance-dependent bound under which this
algorithm provably outperforms a Dijkstra-based approach. Moreover, computing the distances
to a sampled set is a basic primitive that lies at the core of many algorithms, for example, the
constructions of approximate distance oracles [TZ05], compact routing schemes [TZ01], and spanners [RTZ05]; in particular, the balls essentially coincide with (one level of) the bunches of Thorup
and Zwick [TZ05]. O(mk); to the best of our knowledge, this is the first instance-dependent bound under which this
algorithm provably outperforms a Dijkstra-based approach. Moreover, computing the distances
to a sampled set is a basic primitive that lies at the core of many algorithms, for example, the
constructions of approximate distance oracles [TZ05], compact routing schemes [TZ01], and spanners [RTZ05]; in particular, the balls essentially coincide with (one level of) the bunches of Thorup
and Zwick [TZ05]. O(mk); to the best of our knowledge, this is the first instance-dependent bound under which this
algorithm provably outperforms a Dijkstra-based approach. Moreover, computing the distances
to a sampled set is a basic primitive that lies at the core of many algorithms, for example, the
constructions of approximate distance oracles [TZ05], compact routing schemes [TZ01], and spanners [RTZ05]; in particular, the balls essentially coincide with (one level of) the bunches of Thorup
and Zwick [TZ05]. O(mk); to the best of our knowledge, this is the first instance-dependent bound under which this
algorithm provably outperforms a Dijkstra-based approach. Moreover, computing the distances
to a sampled set is a basic primitive that lies at the core of many algorithms, for example, the
constructions of approximate distance oracles [TZ05], compact routing schemes [TZ01], and spanners [RTZ05]; in particular, the balls essentially coincide with (one level of) the bunches of Thorup
and Zwick [TZ05]. O(mk); to the best of our knowledge, this is the first instance-dependent bound under which this
algorithm provably outperforms a Dijkstra-based approach. Moreover, computing the distances
to a sampled set is a basic primitive that lies at the core of many algorithms, for example, the
constructions of approximate distance oracles [TZ05], compact routing schemes [TZ01], and spanners [RTZ05]; in particular, the balls essentially coincide with (one level of) the bunches of Thorup
and Zwick [TZ05]. The first to break the sorting barrier were Duan, Mao, Shu, and Yin [DMSY23], who gave a randomized O(m log1/2 n log log1/2 n) time algorithm for sparse weighted undirected graphs. 2 Recently,
Yan [Yan26] derandomized this algorithm and achieved the same running time deterministically. O(mk); to the best of our knowledge, this is the first instance-dependent bound under which this
algorithm provably outperforms a Dijkstra-based approach. Moreover, computing the distances
to a sampled set is a basic primitive that lies at the core of many algorithms, for example, the
constructions of approximate distance oracles [TZ05], compact routing schemes [TZ01], and spanners [RTZ05]; in particular, the balls essentially coincide with (one level of) the bunches of Thorup
and Zwick [TZ05].Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Green — the paper says it, and the page is printed. Red — no passage carries it, so treat that sentence as unverified. The same check runs on your own text: check a summary against its source, $5.
Improvements for AI systems
-
Improved Single Source Shortest Path (SSSP) computation for weighted undirected graphs by achieving a running time of O(m log 1/2 n log log 1/4 n log log log 1/4 n). This improvement is achieved by replacing the construction of bundles and balls from the previous state-of-the-art algorithm, which cost O(mk log k), with an ActiveBellmanFord approach that computes these structures in O(mk) time.
-
Faster computation of single source shortest paths for general graphs by using a randomized sampling strategy to ensure that the total running time is bounded by O(m log 1/2 n log log 1/4 n log log log 1/4 n) with high probability. This allows the algorithm to be applied efficiently even when the graph structure does not meet the strict balanced case assumptions used in simpler algorithms.
-
Enhanced tool for approximate distance oracles and spanners by leveraging the core primitive of ActiveBellmanFord, which computes distances to a sampled set in O(Ball(v) m/n) time, leading to a sorting-free tool of independent interest with running time O(mk). This primitive can be used for constructing various graph algorithms.
-
Deterministic SSSP in undirected graphs by addressing the derandomization challenge by constructing a single random sample set S that satisfies the concentration bounds of Lemma 9, allowing the ImprovedSSSP algorithm to run deterministically within the same asymptotic time complexity.
Abstract
The single-source shortest paths (SSSP) problem in graphs with non-negative edge weights is one of the most classic problems in algorithms. For decades, the best known running time in the comparison-addition model was the O(m+n n) bound of Dijkstra's algorithm with Fibonacci heaps. Recently, Duan, Mao, Shu, and Yin (FOCS'23) gave a randomized O(m 1/2 n 1/2 n) -time algorithm for SSSP in weighted undirected graphs. For weighted directed graphs, Duan, Mao, Mao, Shu, and Yin (STOC'25) gave an O(m 2/3 n) -time algorithm for SSSP. Very recently, Duan, Mao, Shu, and Yin (ICALP'26) obtained an algorithm for directed graphs whose running time matches the O(m 1/2 n 1/2 n) time of the undirected case. In this paper, we present a faster algorithm for SSSP in weighted undirected graphs, giving the first improvement in running time since the FOCS'23 breakthrough of Duan, Mao, Shu, and Yin. Our algorithm runs in O(m 1/2 n 1/4 n 1/4 n) time, improving the previous running time by a factor of (n over n) 1/4. Our main contribution is a simple and efficient tool that computes, for every vertex, its distance to the nearest vertex in a random sample; this tool may be of independent interest.
Sources
Related papers
- Edge-Tilting Field Dynamics: Rapid Mixing at the Uniqueness Threshold and Optimal Mixing for Swendsen-Wang Dynamics
- The Price of Almost Navigability
- Directed k-Disjoint Shortest Paths in Polynomial Time
- Dynamic Tensor Product Regression
- Space-Efficient Interior Point Method, with applications to Linear Programming and Maximum Weight Bipartite Matching
- Exploiting Low Scanwidth to Resolve Soft Polytomies