Presentation is loading. Please wait.

Presentation is loading. Please wait.

Diverse Routing Algorithms

Similar presentations


Presentation on theme: "Diverse Routing Algorithms"— Presentation transcript:

1 Diverse Routing Algorithms
CSC/ECE 772: Survivable Networks Spring, 2009, Rudra Dutta

2 Disjoint Paths Algorithms
Simple approach (two-step) fails with trap topologies Remedy - “remember” first path found by link reversal As in flow problems Must be able to find shortest paths in presence of negative-cost arcs Remedy - modify Dijkstra’s algorithm Can also use general purpose shortest path algorithm for negative-cost arcs Can also use graph transformation to eliminate negative-cost arcs Copyright Rudra Dutta, NCSU, Spring, 2009

3 Dijkstra’s Algorithm Given: Use: Undirected graph G with vertices V,
Source node A, Destination node Z Edge costs l(ij) Use: N(i) = set of neighbors of i, d(i) = distance from A to i, S = set of nodes to which shortest distance has NOT been found, P(i) = predecessor of i in path from A Copyright Rudra Dutta, NCSU, Spring, 2009

4 Dijkstra’s Algorithm Initialize Select new vertex to label permanently
l(ij) cost of edge ij N(i) = neighbors of i d(i) = distance A to i S = nodes not found P(i) = predecessor of i Dijkstra’s Algorithm Initialize d(A) = 0; d(i) = l(Ai) for all i in N(A),  for all other i S = all vertices except A P(i) = A for all i in S Select new vertex to label permanently Choose j from S such that d(j) = min d(i), for i in S Remove j from S If j = Z, then stop; otherwise go to Step 3 Update distances For all i in N(j) such that i is also in S If d(j) + l(ij) < d(i), update d(i) to d(j) + l(ij) and set P(i) to j Back to Step 2 Copyright Rudra Dutta, NCSU, Spring, 2009

5 Dijkstra’s Algorithm - Example
Copyright Rudra Dutta, NCSU, Spring, 2009

6 Negative Cost Arcs Many reasonable cost metrics are positive-only
However, sometimes negatives costs can turn up Sometimes introduced by specific desired transformations of graphs Graph may have cycles Cycles with negative total costs exist Concept of shortest path? If negative cost arcs, but not cycles? Specific family of such graphs generated by useful diverse routing algorithms Dijkstra’s algorithm fails with negative arc costs Copyright Rudra Dutta, NCSU, Spring, 2009

7 Failure of Dijkstra - Example
Copyright Rudra Dutta, NCSU, Spring, 2009

8 Dijkstra’s Algorithm - Modified
l(ij) cost of edge ij N(i) = neighbors of i d(i) = distance A to i S = nodes not found P(i) = predecessor of i Dijkstra’s Algorithm - Modified Initialize d(A) = 0; d(i) = l(Ai) for all i in N(A),  for all other i S = all vertices except A P(i) = A for all i in S Select new vertex to label permanently Choose j from S such that d(j) = min d(i), for i in S Remove j from S If j = Z, then stop; otherwise go to Step 3 Update distances For all i in N(j) such that i is also in S If d(j) + l(ij) < d(i), update d(i) to d(j) + l(ij) and set P(i) to j Back to Step 2 S =  Also add i back to S Copyright Rudra Dutta, NCSU, Spring, 2009

9 Modified Dijkstra - Example
Copyright Rudra Dutta, NCSU, Spring, 2009

10 Shortest Disjoint Path Pair
Objective: find a pair of paths between a source a destination that are: Edge-disjoint, or Vertex-disjoint Sum of their lengths is minimum Observations: Vertex-disjointness implies edge-disjointedness For graph of vertices with degrees 3 or less: Edge-disjointedness implies Vertex-disjointedness Length of vertex-disjoint pair ≥ length of edge-disjoint pair Copyright Rudra Dutta, NCSU, Spring, 2009

11 Simple Two-step Approach Fails
Obvious approach - find one, then other May not find shortest pair May not find pair at all even when one exists Trap topology A B D Z E C 1 2 Copyright Rudra Dutta, NCSU, Spring, 2009

12 Shortest Disjoint Path Algorithms
Various types Most based on flow canceling approaches (like flow maximization) One early approach by Bhandari Other early approach by Suurballe (and with Tarjan) Bhandari’s algorithm Simpler to state on undirected graphs Assumes original graph has non-negative edge costs Creates intermediate mixed graphs with negative directed arc costs Only specific family of such graphs - arcs form s-d path Modified Dijkstra’s algorithm works correctly on such graphs Can be used in lieu of more complicated negative cost algorithms Copyright Rudra Dutta, NCSU, Spring, 2009

13 Bhandari’s Algorithm Find the shortest path from A to Z with the modified Dijkstra algorithm Replace each edge of the shortest path by a single arc directed towards the source vertex Make the length of each of the above arcs negative Find the shortest path from A to Z in the modified graph with the modified Dijkstra algorithm Transform to the original graph, and erase any interlacing edges of the two paths found Group the remaining edges to obtain the shortest pair of edge-disjoint paths Copyright Rudra Dutta, NCSU, Spring, 2009

14 Bhandari’s Algorithm - Example
Copyright Rudra Dutta, NCSU, Spring, 2009

15 k Disjoint Paths Can be generalized to obtain more disjoint paths
Edge-disjoint shortest triplet algorithm: Find the shortest edge-disjoint pair of paths between A and Z Replace the edges of the disjoint paths by arcs directed towards the source Make the length of the arcs negative Find the shortest path from A to Z in the modified graph using the modified Dijkstra algorithm Transform to the original graph, and erase any edges of this shortest path interlacing with the shortest edge-disjoint pair of paths Straightforward generalization to k > 3 Copyright Rudra Dutta, NCSU, Spring, 2009

16 Edge Disjoint Triple - Example
Copyright Rudra Dutta, NCSU, Spring, 2009

17 Vertex Disjoint Paths Builds on the edge disjoint path algorithm
Simple graph transformation Separate “source” nature of “destination” nature of each vertex into two fictitious vertices Directed arc from “destination” to “source” for each, zero cost Path, flow etc. preserved in magnitude and cost Use of fictitious vertices/arcs can be limited to “as needed” basis Edge disjoint paths in transformed graph are clearly vertex disjoint in original Can be generalized to k > 2 as before Copyright Rudra Dutta, NCSU, Spring, 2009

18 Vertex Disjoint Pair Algorithm
Find the shortest path from A to Z with the modified Dijkstra algorithm Replace each edge on the shortest path by an arc directed towards the destination vertex Split each vertex on the shortest path into two co-located subvertices joined by an arc of length zero direct the arc of length zero towards the destination replace each external edge connected to a vertex on the shortest path by its two component arcs (of the same length) let one arc terminate on one subvertex, the other emanate from the other subvertex - forming cycle along zero-length arc Reverse the direction of the arcs on the shortest path, and make their length negative Find the shortest path from A to Z in the modified graph with the modified Dijkstra algorithm Remove zero-length arcs; coalesce subvertices into parent vertices; replace arcs on first shortest path with original edges of positive length; remove interlacing edges of the two paths Copyright Rudra Dutta, NCSU, Spring, 2009

19 Vertex Disjoint Pair - Example
Copyright Rudra Dutta, NCSU, Spring, 2009

20 Use for Multiple Source/Destinations
Z1 Z2 Z A Z1 Z2 A1 A2 Z A Z1 Z2 A1 A2 Z A Z1 Z2 Copyright Rudra Dutta, NCSU, Spring, 2009


Download ppt "Diverse Routing Algorithms"

Similar presentations


Ads by Google