A Faster Computation of All the Best Swap Edges of a Shortest Paths Tree
We consider a two-edge connected, non-negatively real-weighted graph G with n vertices and m edges, and a single-source shortest paths tree (SPT) of G rooted at an arbitrary vertex. If an edge of the SPT is temporarily removed, a widely recognized approach to reconnect the vertices disconnected from the root consists of joining the two resulting subtrees by means of a single non-tree edge, called a swap edge. This allows to reduce consistently the set-up and computational costs which are incurred if one instead rebuilds a new optimal SPT from scratch. In the past, several optimality criteria have been considered to select a best possible swap edge, and here we restrict our attention to arguably the two most significant measures: the minimization of either the maximum or the average distance between the root and the disconnected vertices. For the former criteria, we present an \(O(m \log \alpha (m,n))\) time algorithm—where \(\alpha \) is the inverse of the Ackermann function—to find a best swap edge for every edge of the SPT, thus improving onto the previous \(O(m \log n)\) time algorithm. Concerning the latter criteria, we provide an \(O(m+n \log n)\) time algorithm for the special but important case where G is unweighted, which compares favourably with the \(O\left( m+n \, \alpha (n,n)\log ^2n\right) \) time bound that one would get by using the fastest algorithm known for the weighted case—once this is suitably adapted to the unweighted case.
KeywordsSingle-source shortest paths tree Edge fault tolerance Swap algorithms
This work was partially supported by the Research Grant PRIN 2010 “ARS TechnoMedia” (Algorithms for Techno-Mediated Social Networks), funded by the Italian Ministry of Education, University, and Research.
- 3.Bilò, D., Gualà, L., Proietti, G.: A faster computation of all the best swap edges of a shortest paths tree, Proceedings of the 21st Annual European Symposium on Algorithms (ESA’13), Sophia Antipolis, France, vol. 8125. Lecture Notes in Computer Science, pp. 157–168. Springer, Berlin (2013)Google Scholar
- 4.Brodal, G.S., Lagogiannis, G., Tarjan, R.E.: Strict Fibonacci heaps. Proceedings of the 44th Symposium on Theory of Computing (STOC’12), pp. 1177–1184. ACM Press (2012)Google Scholar
- 5.Brodal, G.S., Jacob, R.: Dynamic planar convex hull. Proceedings of the 43rd Symposium on Foundations of Computer Science (FOCS’02), pp. 617–626 . IEEE Computer Society (2002)Google Scholar
- 12.Ito, H., Iwama, K., Okabe, Y., Yoshihiro, T.: Polynomial-time computable backup tables for shortest-path routing. Proceedings of the 10th International Colloquium on Structural Information and Communication Complexity (SIROCCO’03), vol. 17. Proceedings in Informatics, Carleton Scientific, pp. 163–177 (2003)Google Scholar
- 13.Nardelli, E., Proietti, G., Widmayer, P.: How to swap a failing edge of a single source shortest paths tree. Proceedings of the 5th International Computing and Combinatorics Conference (COCOON’99), vol. 1627. Lecture Notes in Computer Science, pp. 144–153 . Springer, Berlin, (1999)Google Scholar
- 16.Pettie, S.: Sensitivity analysis of minimum spanning trees in sub-inverse-Ackermann time. Proceedings of the 16th International Symposium on Algorithms and Computation (ISAAC’05), vol. 3827. Lecture Notes in Computer Science, pp. 964–973. Springer, Berlin (2005)Google Scholar
- 17.Proietti, G.: Dynamic maintenance versus swapping: an experimental study on shortest paths trees, Proceedings of the 3rd Workshop on Algorithm Engineering (WAE 2000), vol. 1982. Lecture Notes in Computer Science, pp. 207–217. Springer, Berlin (2000)Google Scholar