A Forward-Backward Single-Source Shortest Paths Algorithm

We describe a new forward-backward variant of Dijkstra's and Spira's Single-Source Shortest Paths (SSSP) algorithms. While essentially all SSSP algorithm only scan edges forward, the new algorithm scans some edges backward. The new algorithm assumes that edges in the out-going and incoming adjacency lists of the vertices appear in nondecreasing order of weight. (Spira's algorithm makes the same assumption about the out-going adjacency lists, but does not use incoming adjacency lists.) The running time of the algorithm on a complete directed graph on n vertices with independent exponential edge weights is O(n), with very high probability. This improves on the previously best result of O(n log n), which is best possible if only forward scans are allowed, exhibiting an interesting separation between forward-only and forward-backward SSSP algorithms. As a consequence, we also get a new all-pairs shortest paths algorithm. The expected running time of the algorithm on complete graphs with independent exponential edge weights is O(n2), matching a recent result of Peres et al. Furthermore, the probability that the new algorithm requires more than O(n2) time is exponentially small, improving on the polynomially small probability of Peres et al.

[1]  G. Dantzig On the Shortest Route Through a Network , 1960 .

[2]  Alan M. Frieze,et al.  The shortest-path problem for graphs with random arc-lengths , 1985, Discret. Appl. Math..

[3]  Seth Pettie,et al.  A new approach to all-pairs shortest paths on real-weighted graphs , 2004, Theor. Comput. Sci..

[4]  Alistair Moffat,et al.  An All Pairs Shortest Path Algorithm with Expected Time O(n² log n) , 1987, SIAM J. Comput..

[5]  Alistair Moffat,et al.  An O(n² log log log n) Expected Time Algorithm for the all Shortest Distance Problem , 1980, MFCS.

[6]  Ulrich Meyer,et al.  Average-case complexity of single-source shortest-paths algorithms: lower and upper bounds , 2003, J. Algorithms.

[7]  T. A. J. Nicholson,et al.  Finding the Shortest Route between Two Points in a Network , 1966, Comput. J..

[8]  Prabhakar Ragde,et al.  A bidirectional shortest-path algorithm with good average-case behavior , 1989, Algorithmica.

[9]  Philip M. Spira,et al.  A New Algorithm for Finding all Shortest Paths in a Graph of Positive Arcs in Average Time 0(n2 log2n) , 1973, SIAM J. Comput..

[10]  Robert Davis,et al.  The Expected Length of a Shortest Path , 1993, Inf. Process. Lett..

[11]  Robert B. Dial,et al.  Algorithm 360: shortest-path forest with topological ordering [H] , 1969, CACM.

[12]  Mikkel Thorup Equivalence between priority queues and sorting , 2007, JACM.

[13]  Robert E. Tarjan,et al.  Fibonacci heaps and their uses in improved network optimization algorithms , 1984, JACM.

[14]  Kurt Mehlhorn,et al.  Faster algorithms for the shortest path problem , 1990, JACM.

[15]  Giuseppe F. Italiano,et al.  A new approach to dynamic all pairs shortest paths , 2003, STOC '03.

[16]  Manuel Blum,et al.  Time Bounds for Selection , 1973, J. Comput. Syst. Sci..

[17]  Refael Hassin,et al.  On Shortest Paths in Graphs with Random Weights , 1985, Math. Oper. Res..

[18]  Torben Hagerup Simpler Computation of Single-Source Shortest Paths in Linear Average Time , 2005, Theory of Computing Systems.

[19]  Andrew V. Goldberg A Practical Shortest Path Algorithm with Linear Expected Time , 2008, SIAM J. Comput..

[20]  Mikkel Thorup,et al.  Undirected single-source shortest paths with positive integer weights in linear time , 1999, JACM.

[21]  Tadao Takaoka,et al.  A simplified algorithm for the all pairs shortest path problem with O(n2logn) expected time , 2012, Journal of Combinatorial Optimization.

[22]  Andrew V. Goldberg,et al.  Buckets, heaps, lists, and monotone priority queues , 1997, SODA '97.

[23]  Yuval Peres,et al.  All-Pairs Shortest Paths in O(n2) Time with High Probability , 2010, FOCS.

[24]  C. A. R. Hoare Algorithm 63: partition , 1961, CACM.

[25]  Giuseppe F. Italiano,et al.  Experimental analysis of dynamic all pairs shortest path algorithms , 2004, SODA '04.

[26]  Kurt Mehlhorn,et al.  On the All-Pairs Shortest Path Algorithm of Moffat and Takaoka , 1995, ESA.

[27]  Remco van der Hofstad,et al.  Weak disorder asymptotics in the stochastic mean-field model of distance , 2010, 1002.4362.

[28]  Edsger W. Dijkstra,et al.  A note on two problems in connexion with graphs , 1959, Numerische Mathematik.

[29]  Svante Janson,et al.  One, Two and Three Times log n/n for Paths in a Complete Graph with Random Weights , 1999, Combinatorics, Probability and Computing.

[30]  C. Fortuin,et al.  Correlation inequalities on some partially ordered sets , 1971 .

[31]  Tadao Takaoka,et al.  A Simpler Algorithm for the All Pairs Shortest Path Problem with O(n2logn) Expected Time , 2010, COCOA.

[32]  Peter A. Bloniarz A Shortest-Path Algorithm with Expected Time O(n2 log n log* n) , 1983, SIAM J. Comput..

[33]  Kurt Mehlhorn,et al.  On the all-pairs shortest-path algorithm of Moffat and Takaoka , 1997, Random Struct. Algorithms.