A multicast routing tree repair algorithm
3.2 Maximization of the resilience of a tree with a single backup path
3.2.1 Main algorithm
We suppose here that no backup path has been previously computed for tree T . Our algorithm (see Algorithm 1) proceeds as follows. We first compute the tdrop and adrop metrics for each link of the tree, and preprocess the tree so as to speed up further Least Common Ancestor (LCA) computations required to compute metrics Rd. Then, we compute in turn Rdfor all pairs of nodes constituted by a leaf of the tree and another node of the tree. We denote by (A, B) the pair of nodes of the tree which minimizes the set of the metrics Rdpreviously computed. A shortest path algorithm computes the backup path between A and B. If the shortest path algorithm fails to find a backup path, then no backup path achieves optimal path protection in tree T .
Claim 2 If Algorithm 1 returns a backup path then this backup path maximizes the resilience of T .
Proof:
Suppose that metrics adrop and tdrop are known for each link of the tree (lines 1 to 3). We first prove by contradiction that at least one end node of a backup path
3.2. Maximization of the resilience of a tree with a single backup path 65
which minimizes Rd is a leaf of T . Suppose the end nodes i and j of a backup path that minimizes Rd are known and that, by contradiction, i is not a leaf of T .
Let k ∈ childi (see Figure 3.5). Then:
Rd(i, j) = K + adropik
and:
Rd(k, j) = K + X
h∈childk
adropkh
where K is the part of metric Rd that is common to Rd(i, j) and Rd(k, j). More specifically, K takes into account all link failures except for link (i, k) and for all links downstream of node k with regards to root S. Since:
adropik = fik tdropik+ X
h∈childk
adropkh
then:
Rd(k, j) < Rd(i, j)
therefore the pair of nodes (i, j) does not minimize Rd, which contradicts the hypoth-esis. Therefore, at least one of the end nodes A and B of the backup path BPA,B which maximizes the resilience of T is a leaf. We call A the end node that is a leaf. The other end node B has no such restriction and may or may not be a leaf.
By construction of nodes A and B in lines 5 to 8, a backup path between A and B minimizes Rd and thus maximizes the resilience of the tree. The backup path is computed in line 9 using a shortest path algorithm between A and B over the graph
3.2. Maximization of the resilience of a tree with a single backup path 66
Algorithm 1 Computation of the optimal backup path that maximizes the resilience of a tree T in a graph G.
F IN D OP T IM AL BACKU P P AT H(tree T, graph G) 1. for each l ∈ ET do
2. compute tdropl and adropl; 3. endfor
4. Preprocess T (build auxiliary trees) to speed up the computations of Least Common Ancestors;
Definition 5 A near-optimal backup path BPA,B is a backup path such that:
Rd(A, B) = min
i,j∈VT BPi,j exists
Rd(i, j).
If no optimal backup path is found, then it is possible to extend Algorithm 1 to find a near-optimal backup path. The extended algorithm (see Algorithm 2) proceeds as follows. As in Algorithm 1, metrics tdrop and adrop are computed for all links of the tree and T is preprocessed to speed up LCA computations in lines 1 to 4.
3.2. Maximization of the resilience of a tree with a single backup path 67
j
k
BP(i, j)
BP(k, j) i
Link of tree ET
Node of VT
Tentative Backup Paths
Part of T between i and j (not fully represented)
Figure 3.5: Proof of the algorithm. It can be shown that Rd(j, k) < Rd(j, i).
Using a recursion, we show that at least one of the end nodes of the backup path must be a leaf.
For any pair of nodes nk ∈ VT × VT, the value of the metric Rd does not depend on the order of the nodes of the pair, and is zero if both nodes of the pair are the same. Therefore, in a graph which contains |VT| nodes, there is a total number of Npairs = |VT|(|V2T|−1) possible pairs of end nodes for a backup path.
In lines 5 to 7 of Algorithm 2, metrics Rd are computed for all Npairs pairs of nodes in the tree as defined above and the set of these metrics is ordered from the lowest to the highest in line 8. In lines 9 to 13, considering in turn each pair of nodes from the ordered set previously defined and starting from the pair of nodes which minimizes the set of metrics Rd, a shortest path algorithm computes the backup path between the two nodes of the pair until a backup path is found. As with optimal
3.2. Maximization of the resilience of a tree with a single backup path 68
Algorithm 2 Computation of the near-optimal backup path.
F IN D N EAR OP T IM AL BACKU P P AT H(tree T, graph G) 1. for each l ∈ ET do
2. compute tdropl and adropl; 3. endfor
4. Preprocess T (build auxiliary trees) to speed up the computations of Least Common Ancestors;
5. for each pair (Y, Z)∈ VT × VT|Y 6= Z do 6. compute Rd(Y, Z);
7. endfor
8. Define the sequence of pairs of nodes (n0, n1, . . . , nNpairs) such that
∀k ∈ [0..Npairs], nk ∈ VT × VT and ∀i ≤ j, Rd(ni)≤ Rd(nj);
9. i:=0;
10. repeat
11. Compute shortest path between the nodes of pair ni in graph G0 = ((V \ VT)∪ {A, B}, E \ ET);
12. i:=i+1;
13. until a backup path is found
backup paths, a near-optimal backup path is not guaranteed to exist. More precisely, since Algorithm 2 considers in turn all possible pairs of nodes of the tree and tries to find a backup path between these two nodes until a backup path is found, if no near-optimal backup path exists for tree then no backup path at all exists for the tree.
For instance, in the case where V = VT and E = ET, no optimal nor near-optimal backup path can be found for T .
3.2. Maximization of the resilience of a tree with a single backup path 69
Other node Receiver Link
S Node C leaves the
group
Node C joins the group S
C
D
Figure 3.6: Tree topology modification after a node leaves or joins a mul-ticast group. Links and nodes are removed or added downstream of node D with regards to S when node C leaves or joins the group.