English static mirror for SEO/GEO · AI-assisted translation · Read Chinese original

Breaking the Sorting Barrier for Single-Source Shortest Paths in Directed Graphs: A Paper Deep Dive

Forum topic · ✨步子哥 · 2025-12-11

Summary

This post explains a recent deterministic algorithm that breaks the long-standing sorting barrier for single-source shortest paths (SSSP) on directed graphs. Classic Dijkstra's algorithm runs in O(m + n log n), with the n log n term caused by priority-queue ordering; this bound had resisted improvement for directed graphs despite advances on undirected or randomized settings. The new algorithm achieves O(m log^{2/3} n) using three core ideas: (1) a divide-and-conquer scheme (BMSSP) that recursively partitions vertices, sorting only 'unfinished' vertices locally instead of globally; (2) a FindPivots subroutine that identifies key vertices whose shortest paths pass through a source set, splitting problems into smaller subproblems; and (3) a custom block-list data structure supporting BatchPrepend and Pull operations without full sorting. For sparse graphs (m ≈ n), complexity drops from O(n log n) to O(n log^{2/3} n), a notable theoretical improvement with practical relevance for routing and network analysis.

1. Problem Background and Limitations of Existing Methods

Single-source shortest path (SSSP) is a fundamental graph problem: given a source vertex, find shortest paths to all other vertices. The classic Dijkstra's algorithm (1959) runs in \(O(m + n \log n)\), where \(m\) is the number of edges and \(n\) the number of vertices; the \(n \log n\) term comes from the sorting performed by the priority queue (e.g., a heap). For sparse graphs (\(m \approx n\)), this complexity is bounded by the "sorting barrier" — the unavoidable cost of ordering vertices.

Despite later data-structure refinements (Fibonacci heaps, relaxed heaps), Dijkstra's \(O(m + n \log n)\) bound on directed graphs remained unbroken for decades. Prior progress came from randomized algorithms or undirected graphs (e.g., \(O(m \log \log n)\)); the core contribution here is the first deterministic breakthrough on directed graphs.

2. Core Idea: Divide-and-Conquer with Pivots

The paper proposes a deterministic divide-and-conquer algorithm that recursively partitions the vertex set, reducing the number of vertices that must be sorted and thereby breaking the sorting barrier:

  • Dynamic frontier management: split the vertex set \(U\) into "finished" (distances known) and "unfinished" (distances pending) subsets, sorting only unfinished vertices locally rather than globally.
  • Pivot partitioning: a FindPivots subroutine finds key vertices that divide the problem into smaller subproblems, avoiding global sorting.
  • Recursion: each subproblem is handled by a recursive call to the core algorithm (BMSSP), shrinking problem size step by step.
  • 3. The Core Algorithm: Bounded Multi-Source Shortest Paths (BMSSP)

    BMSSP takes a distance upper bound \(B\) and a source set \(S\), and outputs a new boundary \(B'\) plus a set \(U\) of unfinished vertices. The flow (per Algorithm 3):

    1. Base case: at recursion depth 0, solve the small subproblem directly with Dijkstra. 2. Find pivots: call FindPivots(B, S) to obtain a pivot set \(P\) (vertices whose shortest paths pass through \(S\)). 3. Initialize data structure: a dynamic structure \(D\) supporting BatchPrepend and Pull manages vertex distances. 4. Recursive calls: recursively invoke BMSSP on subsets \(S_i\), handling vertices with distances in \([B_i, B_{i+1})\). 5. Edge relaxation: update distances and insert updated vertices into \(D\). 6. Batch prepend: merge subproblem results back via BatchPrepend.

    4. The FindPivots Subroutine

    FindPivots(B, S) finds pivots — unfinished vertices whose shortest paths must pass through vertices in \(S\) (Algorithm 1):

  • Starting from \(S\), expand the vertex set \(W\) via \(k\) rounds of relaxation.
  • If \(|W|\) exceeds \(k|S|\), the vertices of \(W\) become pivots \(P\).
  • Return the pivots \(P\) and the expanded set \(W\).
  • Pivots are the linchpin of the divide-and-conquer strategy: they split the large problem into smaller subproblems while avoiding global sorting.

    5. The Supporting Data Structure

    To support BMSSP's recursion, the paper designs a block-list data structure supporting:

  • BatchPrepend: insert multiple key-value (vertex, distance) pairs in amortized \(O(\max(1, \log(N/M)))\) time (\(N\) total pairs, \(M\) block size).
  • Pull: extract the \(M\) smallest key-value pairs in \(O(M)\) time.
  • Maintained via blocking and binary search trees, the structure avoids per-operation sorting, lowering overall complexity.

    6. Time Complexity Analysis

    The new algorithm runs in \(O(m \log^{2/3} n)\), breaking Dijkstra's \(O(m + n \log n)\) barrier:

  • Recursion depth: controlled by \(k = \log^{1/3} n\), giving \(O(\log^{1/3} n)\) levels.
  • Per level: \(O(m)\) edge relaxations, with data-structure operations costing \(O(\log^{2/3} n)\).
  • For sparse graphs (\(m \approx n\)), complexity improves from \(O(n \log n)\) to \(O(n \log^{2/3} n)\) — a significant gain.

    7. Significance and Contributions

  • First deterministic breakthrough: the first deterministic algorithm to beat \(O(m + n \log n)\) on directed graphs.
  • Sparse-graph optimization: roughly a \(\log^{1/3} n\) speedup for sparse graphs, relevant in practice (routing, social network analysis).
  • Technical inspiration: combining divide-and-conquer with tailored dynamic data structures offers new ideas for other graph algorithms (minimum spanning trees, bottleneck paths).

Summary

Through divide-and-conquer, pivot partitioning, and a custom data structure, the paper delivers a deterministic algorithm that overcomes the sorting barrier for directed-graph SSSP. The key innovation is replacing global sorting with local sorting, recursively shrinking the problem to achieve the complexity breakthrough — advancing both the theoretical frontier of graph algorithms and practical efficiency.

> Note: the "distinct path lengths" assumption simplifies path comparison; generality is preserved by breaking ties via lexicographic order of path sequences.

Tags

#algorithms#graph-theory#shortest-paths#dijkstras-algorithm#divide-and-conquer#data-structures#complexity-theory

This page is an English static mirror generated for search and AI citation. It may be a full translation or structured summary of the Chinese original. Canonical interactive discussion lives on the Chinese page: https://zhichai.net/topic/176415109