Abstract

Given an arbitrary directed graph G=(V,E) with non-negative edge lengths, we present an algorithm that computes all pairs shortest paths in time O(m∗n+mlgn+nTψ(m∗,n)), where m∗ is the number of different edges contained in shortest paths and Tψ(m∗,n) is the running time of an algorithm ψ solving the single-source shortest path problem (SSSP). This is a substantial improvement over a trivial n times application of ψ that runs in O(nTψ(m,n)). In our algorithm we use ψ as a black box and hence any improvement on ψ results also in improvement of our algorithm. A combination of our method, Johnson’s reweighting technique and topological sorting results in an O(m∗n+mlgn) all-pairs shortest path algorithm for directed acyclic graphs with arbitrary edge lengths. We also point out a connection between the complexity of a certain sorting problem defined on shortest paths and SSSP. Finally, we show how to improve the performance of the proposed algorithm in practice. We then empirically measure the running times of various all-pairs shortest path algorithms on randomly generated graph instances and obtain very promising results.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call