Abstract
Given an n-node, undirected and 2-edge-connected graph G=(V,E) with positive real weights on its m edges, given a set of k source nodes S⊆V, and given a spanning tree T of G, the routing cost from S of T is the sum of the distances in T from every source s∈S to all the other nodes of G. If an edge e of T undergoes a transient failure, and one needs to promptly reestablish the connectivity, then to reduce set-up and rerouting costs it makes sense to temporarily replace e by means of a swap edge, i.e., an edge in G reconnecting the two subtrees of T induced by the removal of e. Then, a best swap edge for e is a swap edge which minimizes the routing cost from S of the tree obtained after the swapping. As a natural extension, the all-best swap edges problem is that of finding a best swap edge for every edge of T, and this has been recently solved in O(mn) time and linear space. In this paper, we focus our attention on the relevant cases in which k=O(1) and k=n, which model realistic communication paradigms. For these cases, we improve the above result by presenting an \(\widetilde{O}(m)\) time and linear space algorithm. Moreover, for the case k=n, we also provide an accurate analysis showing that the obtained swap tree is effective in terms of routing cost. Indeed, if the input tree T has a routing cost from V which is a constant-factor away from that of a minimum routing-cost spanning tree (whose computation is a problem known to be in APX), and if in addition nodes in T enjoys a suitable distance stretching property from a tree centroid (which can be constructively induced, as we show), then the tree obtained after the swapping has a routing cost from V which is still a constant-ratio approximation of that of a new (i.e., in the graph deprived of the failed edge) minimum routing-cost spanning tree.
Similar content being viewed by others
Notes
In the same paper, the authors define also several other swap criteria.
Notice that, to be more precise, our improvement holds for \(k 2^{O (\alpha(2m)^{k}\log \alpha(m) )}=o(n/\log^{2} n)\), which includes k=O(1).
Recall that for ℓ,t∈ℕ+, a sequence U=(u 1,…,u p ) of integers u i ∈[1,ℓ] is a Davenport-Schinzel sequence of order t with ℓ integers, if \(u_{i} \not= u_{i+1}, \forall i < p\), and there exists no subsequence \((u_{i_{1}},\ldots, u_{i_{t+2}})\) in U having two alternating values. If DS(ℓ,t) denotes the set of all Davenport-Schinzel sequences of order t with ℓ integers, then the complexity of DS(ℓ,t) is defined as the length of a longest sequence in DS(ℓ,t).
Notice that, if the same M is chosen for all functions, then the number of inversion points between pairs of functions remains unchanged.
For the case S=V, the second kind of potential inversion points are related to the two zeros of the function \(\Delta^{V}_{\chi(f),\chi(g)}\) seen as a quadratic function on the variable |T Y | with domain ℝ.
Observe that for k constant, the time complexity is \(\widetilde{O}(m)\).
Recall that a tree has at most 2 centroids.
References
Ackermann, W.: Zum hilbertschen Aufbau der reellen Zahlen. Math. Ann. 99, 118–133 (1928)
Bender, M.A., Farach-Colton, M.: The level ancestor problem simplified. In: Rajsbaum, S. (ed.) Theoretical Informatics, 5th Latin American Symposium (LATIN). Lecture Notes in Computer Science, vol. 2286, pp. 508–515. Springer, Berlin (2002)
Booth, H., Westbrook, J.: A linear algorithm for analysis of minimum spanning and shortest-path trees of planar graphs. Algorithmica 11(4), 341–352 (1994)
Das, S., Gfeller, B., Widmayer, P.: Computing best swaps in optimal tree spanners. In: Hong, S.-H., Nagamochi, H., Fukunaga, T. (eds.) 19th Int. Symposium on Algorithms and Computation (ISAAC). Lecture Notes in Computer Science, vol. 5369, pp. 716–727. Springer, Berlin (2008)
Di Salvo, A., Proietti, G.: Swapping a failing edge of a shortest paths tree by minimizing the average stretch factor. Theor. Comput. Sci. 383(1), 23–33 (2007)
Flocchini, P., Enriques, A.M., Pagli, L., Prencipe, G., Santoro, N.: Point-of-failure shortest-path rerouting: computing the optimal swap edges distributively. IEICE Trans. 89-D(2), 700–708 (2006)
Gfeller, B., Santoro, N., Widmayer, P.: A distributed algorithm for finding all best swap edges of a minimum diameter spanning tree. In: Pelc, A. (ed.) 21st Int. Symposium on Distributed Computing (DISC). Lecture Notes in Computer Science, vol. 4731, pp. 268–282. Springer, Berlin (2007)
Gfeller, B.: Faster swap edge computation in minimum diameter spanning trees. In: Halperin, D., Mehlhorn, K. (eds.) 16th Annual European Symposium on Algorithms (ESA). Lecture Notes in Computer Science, vol. 5193, pp. 454–465. Springer, Berlin (2008)
Harel, D., Tarjan, R.E.: Fast algorithms for finding nearest common ancestors. SIAM J. Comput. 13(2), 338–355 (1984)
Hershberger, J.: Finding the upper envelope of n line segments in O(nlogn) time. Inf. Process. Lett. 33(4), 169–174 (1989)
Johnson, D., Lenstra, J., Kan, A.R.: The complexity of the network design problem. Networks 8(4), 279–285 (1978)
Nardelli, E., Proietti, G., Widmayer, P.: Finding all the best swaps of a minimum diameter spanning tree under transient edge failures. J. Graph Algorithms Appl. 5(5), 39–57 (2001)
Nardelli, E., Proietti, G., Widmayer, P.: Swapping a failing edge of a single source shortest paths tree is good and fast. Algorithmica 35(1), 56–74 (2003)
Nivasch, G.: Improved bounds and new techniques for Davenport–Schinzel sequences and their generalizations. J. ACM 57(3), 1–44 (2010)
Pagli, L., Prencipe, G.: Brief announcement: distributed swap edges computation for minimum routing cost spanning trees. In: Abdelzaher, T.F., Raynal, M., Santoro, N. (eds.) Principles of Distributed Systems, 13th International Conference (OPODIS). Lecture Notes in Computer Science, vol. 5923, pp. 365–371. Springer, Berlin (2009)
Pettie, S.: Sensitivity analysis of minimum spanning trees in sub-inverse-Ackermann time. In: Deng, X., Du, D.-Z. (eds.) 16th Int. Symposium on Algorithms and Computation (ISAAC). Lecture Notes in Computer Science, vol. 3827, pp. 964–973. Springer, Berlin (2005)
Tarjan, R.E.: Sensitivity analysis of minimum spanning trees and shortest path trees. Inf. Process. Lett. 14(1), 30–33 (1982)
Wong, R.: Worst-case analysis of network design problem heuristics. SIAM J. Algebr. Discrete Methods 1, 51–63 (1980)
Wu, B.Y., Lancia, G., Bafna, V., Chao, K.-M., Ravi, R., Tang, C.Y.: A polynomial-time approximation scheme for minimum routing cost spanning trees. SIAM J. Comput. 29(3), 761–778 (1999)
Wu, B.Y., Chao, K.-M., Tang, C.Y.: Approximation algorithms for some optimum communication spanning tree problems. Discrete Appl. Math. 102(3), 245–266 (2000)
Wu, B.Y., Hsiao, C.-Y., Chao, K.-M.: The swap edges of a multiple-sources routing tree. Algorithmica 50(3), 299–311 (2008)
Acknowledgements
We wish to thank the anonymous reviewers for their helpful suggestions.
This work was partially supported by the PRIN 2008 research project COGENT (COmputational and GamE-theoretic aspects of uncoordinated NeTworks), funded by the Italian Ministry of Education, University, and Research.
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Bilò, D., Gualà, L. & Proietti, G. Finding Best Swap Edges Minimizing the Routing Cost of a Spanning Tree. Algorithmica 68, 337–357 (2014). https://doi.org/10.1007/s00453-012-9674-y
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00453-012-9674-y