All-Pairs Shortest Paths in O(n²) Time with High Probability

We present an all-pairs shortest path algorithm whose running time on a complete directed graph on $n$ vertices whose edge weights are chosen independently and uniformly at random from $[0,1]$ is~$O(n^2)$, in expectation and with high probability. This resolves a long standing open problem. The algorithm is a variant of the dynamic all-pairs shortest paths algorithm of Demetrescu and Italiano. The analysis relies on a proof that the number of \emph{locally shortest paths} in such randomly weighted graphs is $O(n^2)$, in expectation and with high probability. We also present a dynamic version of the algorithm that recomputes all shortest paths after a random edge update in $O(\log^{2}n)$ expected time.

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

[2]  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.

[3]  Dan Suciu,et al.  Journal of the ACM , 2006 .

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

[5]  Mikkel Thorup,et al.  Does Path Cleaning Help in Dynamic All-Pairs Shortest Paths? , 2006, ESA.

[6]  Catherine C. McGeoch All-pairs shortest paths and the essential subgraph , 2005, Algorithmica.

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

[8]  Luc Devroye,et al.  Branching processes in the analysis of the heights of trees , 1987, Acta Informatica.

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

[10]  Alan M. Frieze,et al.  Average-case complexity of shortest-paths problems in the vertex-potential model , 1997, Random Struct. Algorithms.

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

[12]  Giuseppe F. Italiano,et al.  A new approach to dynamic all pairs shortest paths , 2004, JACM.

[13]  Mikkel Thorup,et al.  Worst-case update times for fully-dynamic all-pairs shortest paths , 2005, STOC '05.

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

[15]  Mikkel Thorup,et al.  Fully-Dynamic All-Pairs Shortest Paths: Faster and Allowing Negative Cycles , 2004, SWAT.

[16]  Alan M. Frieze,et al.  Average-Case Complexity of Shortest-Paths Problems in the Vertex-Potential Model , 1997, RANDOM.

[17]  David R. Karger,et al.  Finding the Hidden Path: Time Bounds for All-Pairs Shortest Paths , 1993, SIAM J. Comput..

[18]  Harald Niederreiter,et al.  Probability and computing: randomized algorithms and probabilistic analysis , 2006, Math. Comput..

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

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

[21]  J. Moon,et al.  Combinatorics: The distance between nodes in recursive trees , 1974 .

[22]  Gábor Lugosi,et al.  Concentration Inequalities , 2008, COLT.

[23]  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..

[24]  Alan M. Frieze,et al.  Algorithmic theory of random graphs , 1997, Random Struct. Algorithms.

[25]  Tobias Friedrich,et al.  Average Update Times for Fully-Dynamic All-Pairs Shortest Paths , 2008, ISAAC.

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

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

[28]  Gábor Lugosi,et al.  The Longest Minimum-Weight Path in a Complete Graph , 2010, Comb. Probab. Comput..

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

[30]  Andreas Maurer A bound on the deviation probability for sums of non-negative random variables. , 2003 .

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

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

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

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