English

Speeding up shortest path algorithms

Data Structures and Algorithms 2013-01-01 v1 Computational Complexity

Abstract

Given an arbitrary, non-negatively weighted, directed graph G=(V,E)G=(V,E) we present an algorithm that computes all pairs shortest paths in time O(mn+mlgn+nTψ(m,n))\mathcal{O}(m^* n + m \lg n + nT_\psi(m^*, n)), where mm^* is the number of different edges contained in shortest paths and Tψ(m,n)T_\psi(m^*, n) is a running time of an algorithm to solve a single-source shortest path problem (SSSP). This is a substantial improvement over a trivial nn times application of ψ\psi that runs in O(nTψ(m,n))\mathcal{O}(nT_\psi(m,n)). In our algorithm we use ψ\psi as a black box and hence any improvement on ψ\psi results also in improvement of our algorithm. Furthermore, a combination of our method, Johnson's reweighting technique and topological sorting results in an O(mn+mlgn)\mathcal{O}(m^*n + m \lg n) all-pairs shortest path algorithm for arbitrarily-weighted directed acyclic graphs. In addition, we also point out a connection between the complexity of a certain sorting problem defined on shortest paths and SSSP.

Keywords

Cite

@article{arxiv.1212.6327,
  title  = {Speeding up shortest path algorithms},
  author = {Andrej Brodnik and Marko Grgurovič},
  journal= {arXiv preprint arXiv:1212.6327},
  year   = {2013}
}

Comments

10 pages

R2 v1 2026-06-21T23:00:42.036Z