Abstract

We obtain three new dynamic algorithms for the approximate all-pairs shortest paths problem in unweighted undirected graphs: (i) For any fixed $\varepsilon>0$, a decremental algorithm with an expected total running time of $\tilde{O}(mn)$, where $m$ is the number of edges and $n$ is the number of vertices in the initial graph. Each distance query is answered in $O(1)$ worst-case time, and the stretch of the returned distances is at most $1+\varepsilon$. The algorithm uses $\tilde{O}(n^2)$ space. (ii) For any fixed integer $k\geq1$, a decremental algorithm with an expected total running time of $\tilde{O}(mn)$. Each query is answered in $O(1)$ worst-case time, and the stretch of the returned distances is at most $2k-1$. This algorithm, however, uses only $O(m+n^{1+1/k})$ space. It is obtained by dynamizing techniques of Thorup and Zwick. In addition to being more space efficient, this algorithm is also one of the building blocks used to obtain the first algorithm. (iii) For any fixed $\varepsilon,\delta>0$ and every $t\leq m^{1/2-\delta}$, a fully dynamic algorithm with an expected amortized update time of $\tilde{O}(mn/t)$ and worst-case query time of $O(t)$. The stretch of the returned distances is at most $1+\varepsilon$. All algorithms can also be made to work on undirected graphs with small integer edge weights. If the largest edge weight is $b$, then all bounds on the running times are multiplied by $b$.

Keywords

  1. dynamic algorithms
  2. transitive closure
  3. strongly connected components

MSC codes

  1. 68W40
  2. 68W20
  3. 68W05
  4. 68Q25

Get full access to this article

View all available purchase options and get full access to this article.

References

1.
D. Aingworth, C. Chekuri, P. Indyk, and R. Motwani, Fast estimation of diameter and shortest paths (without matrix multiplication), SIAM J. Comput., 28 (1999), pp. 1167--1181.
2.
G. Ausiello, G. F. Italiano, A. Marchetti-Spaccamela, and U. Nanni, Incremental algorithms for minimal length paths, J. Algorithms, 12 (1991), pp. 615--638.
3.
G. Ausiello, G. F. Italiano, A. Marchetti-Spaccamela, and U. Nanni, On-line computation of minimal and maximal length paths, Theoret. Comput. Sci., 95 (1992), pp. 245--261.
4.
B. Awerbuch, B. Berger, L. Cowen, and D. Peleg, Near-linear time construction of sparse neighborhood covers, SIAM J. Comput., 28 (1998), pp. 263--277.
5.
S. Baswana, R. Hariharan, and S. Sen, Maintaining all-pairs approximate shortest paths under deletion of edges, in Proceedings of the 14th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), 2003, pp. 394--403.
6.
S. Baswana, R. Hariharan, and S. Sen, Improved decremental algorithm for maintaining transitive closure and all-pairs shortest paths, J. Algorithms, 62 (2007), pp. 74--92.
7.
E. Cohen, Fast algorithms for constructing $t$-spanners and paths with stretch $t$, SIAM J. Comput., 28 (1998), pp. 210--236.
8.
E. Cohen and U. Zwick, All-pairs small-stretch paths, J. Algorithms, 38 (2001), pp. 335--353.
9.
T. H. Cormen, C. E. Leiserson, R. L. Rivest, and C. Stein, Introduction to Algorithms, 2nd ed., The MIT Press, Cambridge, MA, 2001.
10.
C. Demetrescu and G. F. Italiano, A new approach to dynamic all pairs shortest paths, J. ACM, 51 (2004), pp. 968--992.
11.
C. Demetrescu and G. F. Italiano, Experimental analysis of dynamic all pairs shortest path algorithms, ACM Trans. Algorithms, 2 (2006), pp. 578--601.
12.
M. Dietzfelbinger, A. Karlin, K. Mehlhorn, F. Meyer auf der Heide, H. Rohnert, and R. E. Tarjan, Dynamic perfect hashing: Upper and lower bounds, SIAM J. Comput., 23 (1994), pp. 738--761.
13.
D. Dor, S. Halperin, and U. Zwick, All-pairs almost shortest paths, SIAM J. Comput., 29 (2000), pp. 1740--1759.
14.
M. Elkin, Computing almost shortest paths, ACM Trans. Algorithms, 1 (2005), pp. 283--323.
15.
M. Elkin and D. Peleg, \em$(1+\epsilon,\beta)$-spanner constructions for general graphs, SIAM J. Comput., 33 (2004), pp. 608--631.
16.
S. Even and Y. Shiloach, An on-line edge-deletion problem, J. ACM, 28 (1981), pp. 1--4.
17.
Z. Galil and O. Margalit, All pairs shortest paths for graphs with small integer length edges, J. Comput. System Sci., 54 (1997), pp. 243--254.
18.
M. Henzinger and V. King, Fully dynamic biconnectivity and transitive closure, in Proceedings of the 36th Annual Symposium on Foundations of Computer Science (FOCS), 1995, IEEE, pp. 664--672.
19.
V. King, Fully dynamic algorithms for maintaining all-pairs shortest paths and transitive closure in digraphs, in Proceedings of the 40th Annual Symposium on Foundations of Computer Science (FOCS), 1999, IEEE, pp. 81--91.
20.
R. Pagh and F. F. Rodler, Cuckoo hashing, J. Algorithms, 51 (2004), pp. 122--144.
21.
R. Seidel, On the all-pairs-shortest-path problem in unweighted undirected graphs, J. Comput. System Sci., 51 (1995), pp. 400--403.
22.
A. Shoshan and U. Zwick, All pairs shortest paths in undirected graphs with integer weights, in Proceedings of the 40th Annual Symposium on Foundations of Computer Science (FOCS), 1999, IEEE, pp. 605--614.
23.
M. Thorup, Fully-dynamic all-pairs shortest paths: Faster and allowing negative cycles, in SWAT: Scandinavian Workshop on Algorithm Theory, Lecture Notes in Comput. Sci. 3111, Springer, Berlin, 2004, pp. 384--396.
24.
M. Thorup and U. Zwick, Approximate distance oracles, J. ACM, 52 (2005), pp. 1--24.
25.
J. D. Ullman and M. Yannakakis, High-probability parallel transitive-closure algorithms, SIAM J. Comput., 20 (1991), pp. 100--125.
26.
U. Zwick, All-pairs shortest paths using bridging sets and rectangular matrix multiplication, J. ACM, 49 (2002), pp. 289--317.

Information & Authors

Information

Published In

cover image SIAM Journal on Computing
SIAM Journal on Computing
Pages: 670 - 683
ISSN (online): 1095-7111

History

Submitted: 9 November 2009
Accepted: 27 March 2012
Published online: 26 June 2012

Keywords

  1. dynamic algorithms
  2. transitive closure
  3. strongly connected components

MSC codes

  1. 68W40
  2. 68W20
  3. 68W05
  4. 68Q25

Authors

Affiliations

Metrics & Citations

Metrics

Citations

If you have the appropriate software installed, you can download article citation data to the citation manager of your choice. Simply select your manager software from the list below and click Download.

Cited By

Media

Figures

Other

Tables

Share

Share

Copy the content Link

Share with email

Email a colleague

Share on social media

The SIAM Publications Library now uses SIAM Single Sign-On for individuals. If you do not have existing SIAM credentials, create your SIAM account https://my.siam.org.