# Computing all best swaps for Minimum-Stretch tree spanners

## Abstract

In a densely connected communication network, represented by a graph G with non-negative edge weights, it is often advantageous to route all communication on a sparse spanning subnetwork, typically a spanning tree of G.We consider a tree spanner T of G which guarantees that for any two nodes, their distance in T is at most k times their distance in G, where k, called the stretch, is as small as possible. When an edge of the communi-cation tree T fails, network functionality may be restored by re-connecting the two separated parts of the tree with a swap edge. In situations where the failure can be repaired rapidly, such a quick fix is preferred over the re-computation of an entirely new minimum-stretch tree, because it is much closer to the previous solution and hence requires far fewer adjustments in the routing scheme. We are therefore interested in the problem of finding for any possibly failing edge in the spanner T, a best swap edge that min-imizes the stretch of the new tree. We show how all these best swap edges can be computed in total time O(m2 log n) in graphs with arbitrary non-negative edge weights. For graphs with unit weight edges, we present an O(n3) time algorithm. Furthermore, we present a distributed algorithm for computing the best swap for each edge in the tree spanner.