All-Pairs Almost Shortest Paths

Let G=(V,E) be an unweighted undirected graph on n vertices. A simple argument shows that computing all distances in G with an additive one-sided error of at most 1 is as hard as Boolean matrix multiplication. Building on recent work of Aingworth et al. [SIAM J. Comput., 28 (1999), pp. 1167--1181], we describe an $\Ot(\min\{n^{3/2}m^{1/2},n^{7/3}\})$-time algorithm APASP2 for computing all distances in G with an additive one-sided error of at most 2. Algorithm APASP2 is simple, easy to implement, and faster than the fastest known matrix-multiplication algorithm. Furthermore, for every even k>2, we describe an ${\tilde{O}}(\min\{n^{2-{2}/{(k+2)}}m^{{2}/{(k+2)}}, n^{2+{2}/{(3k-2)}}\})$-time algorithm APASPk for computing all distances in G with an additive one-sided error of at most k. We also give an ${\tilde{O}}(n^2)$-time algorithm ${\bf APASP}_\infty$ for producing stretch 3 estimated distances in an unweighted and undirected graph on n vertices. No constant stretch factor was previously achieved in ${\tilde{O}}(n^2)$ time. We say that a weighted graph F=(V,E') k-emulates an unweighted graph G=(V,E) if for every $u,v\in V$ we have $\delta_G(u,v)\le \delta_F(u,v)\le \delta_G(u,v)+k$. We show that every unweighted graph on n vertices has a 2-emulator with ${\tilde{O}}(n^{3/2})$ edges and a 4-emulator with ${\tilde{O}}(n^{4/3})$ edges. These results are asymptotically tight. Finally, we show that any weighted undirected graph on n vertices has a 3-spanner with ${\tilde{O}}(n^{3/2})$ edges and that such a 3-spanner can be built in ${\tilde{O}}(mn^{1/2})$ time. We also describe an ${\tilde{O}}(n(m^{2/3}+n))$-time algorithm for estimating all distances in a weighted undirected graph on n vertices with a stretch factor of at most 3.

[1]  Raimund Seidel,et al.  On the all-pairs-shortest-path problem , 1992, STOC '92.

[2]  Lenore Cowen,et al.  Near-linear cost sequential and distributed constructions of sparse neighborhood covers , 1993, Proceedings of 1993 IEEE 34th Annual Foundations of Computer Science.

[3]  Michael L. Fredman,et al.  New Bounds on the Complexity of the Shortest Path Problem , 1976, SIAM J. Comput..

[4]  Arthur L. Liestman,et al.  Additive graph spanners , 1993, Networks.

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

[6]  Noga Alon,et al.  On the Exponent of the All Pairs Shortest Path Problem , 1991, J. Comput. Syst. Sci..

[7]  Rephael Wenger,et al.  Extremal graphs with no C4's, C6's, or C10's , 1991, J. Comb. Theory, Ser. B.

[8]  R. Motwani,et al.  On Diameter Verification and Boolean Matrix Multiplication. , 1995 .

[9]  Edith Cohen,et al.  All-pairs small-stretch paths , 1997, SODA '97.

[10]  R. K. Shyamasundar,et al.  Introduction to algorithms , 1996 .

[11]  Raimund Seidel,et al.  On the All-Pairs-Shortest-Path Problem in Unweighted Undirected Graphs , 1995, J. Comput. Syst. Sci..

[12]  Alejandro A. Schäffer,et al.  Graph spanners , 1989, J. Graph Theory.

[13]  Noga Alon,et al.  Witnesses for Boolean matrix multiplication and for shortest paths , 1992, Proceedings., 33rd Annual Symposium on Foundations of Computer Science.

[14]  Noga Alon,et al.  The Probabilistic Method , 2015, Fundamentals of Ramsey Theory.

[15]  Tadao Takaoka A New Upper Bound on the Complexity of the All Pairs Shortest Path Problem , 1991, WG.

[16]  David R. Karger,et al.  Finding the hidden path: time bounds for all-pairs shortest paths , 1991, [1991] Proceedings 32nd Annual Symposium of Foundations of Computer Science.

[17]  Mihalis Yannakakis,et al.  High-Probability Parallel Transitive-Closure Algorithms , 1991, SIAM J. Comput..

[18]  Alfred V. Aho,et al.  The Design and Analysis of Computer Algorithms , 1974 .

[19]  Piotr Indyk,et al.  Fast estimation of diameter and shortest paths (without matrix multiplication) , 1996, SODA '96.

[20]  Edith Cohen,et al.  Polylog-time and near-linear work approximation scheme for undirected shortest paths , 1994, STOC '94.

[21]  Giri Narasimhan,et al.  New sparseness results on graph spanners , 1995, Int. J. Comput. Geom. Appl..

[22]  Zvi Galil,et al.  All Pairs Shortest Paths for Graphs with Small Integer Length Edges , 1997, J. Comput. Syst. Sci..

[23]  David P. Dobkin,et al.  On sparse spanners of weighted graphs , 1993, Discret. Comput. Geom..

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

[25]  Rajeev Motwani,et al.  Clique partitions, graph compression and speeding-up algorithms , 1991, STOC '91.

[26]  Giri Narasimhan,et al.  Fast algorithms for constructing t-spanners and paths with stretch t , 1993, Proceedings of 1993 IEEE 34th Annual Foundations of Computer Science.

[27]  Baruch Awerbuch,et al.  Complexity of network synchronization , 1985, JACM.

[28]  Don Coppersmith,et al.  Matrix multiplication via arithmetic progressions , 1987, STOC.