1 / 35

Efficient Algorithms for Alternate Paths & Bridges in Networks and Geometric Graphs

Efficient Algorithms for Alternate Paths & Bridges in Networks and Geometric Graphs. Amit M Bhosle Department of Computer Science University of California, Santa Barbara. Overview. Transient failures and proactive recovery schemes Single link failure recovery: definition and solutions

delano
Download Presentation

Efficient Algorithms for Alternate Paths & Bridges in Networks and Geometric Graphs

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Efficient Algorithms for Alternate Paths & Bridges in Networks and Geometric Graphs Amit M Bhosle Department of Computer Science University of California, Santa Barbara

  2. Overview • Transient failures and proactive recovery schemes • Single link failure recovery: definition and solutions • Related link failure problems • Improvements for restricted graphs • Single node failure recovery: definition and solutions • Bridges connecting polygons • Open Problems

  3. Failures in IP Backbones • Five 9s availability (99.999% uptime) is highly desirable • VOIP, VPN, Banking, Multimedia Conferencing, Shopping, … • Failures occur quite frequently • Faulty interfaces, router/link failures, maintenance activity • Markopolu, et al. (2004) characterized the failures in IP backbones • About 20% failures due to planned activity (e.g. maintenance) • Most unplanned failures in communication networks are transient and affect a single element • 46% last less than 1 minute • 86% last less than 10 minutes • 85% of all failures affect a single link or node • Handling transient single node or link failures is key to ensuring high availability

  4. Proactive Recovery Schemes • Popular technique of handling transient failures • Precompute alternate paths that avoid the failed element • When a failure actually occurs • Suppress the failure, instead of the traditional approach of advertising it across the network (and hope that it is a transient issue) • Use the precomputed alternate paths to reroute traffic (and survive the failure)

  5. Single Link Failure Recovery (SLFR) • Given an edge weighted graph G (V,E), and the shortest paths tree Ts = {e1 , e2 ,…, en-1}of a node s, where ei= {xi , yi} and xi is the parent of yiin Ts • For 1 ≤ i ≤ n-1, find the shortest path from yi to s in the graph G-i = G \ ei • G-i is obtained from G by deleting the edge ei • G assumed to be 2-edge-connected, and undirected

  6. Single Node Failure Recovery (SNFR) • Given an edge weighted graph G(V,E), and the shortest paths tree Tsof a node s, where Cx= {x1 , x2 , x3 ,…, xk}denote the children of x in Ts • For each node x є G, and x ≠ s, find a path from each xiєCxto s in the graph G-x = (V \ x, E \ Ex) • G-x is obtained from G by deleting the node x and all its edges • G assumed to be 2-node-connected, and undirected

  7. SLFR SNFR s s x x xj y xi

  8. SLFR, SNFR: Naïve Algorithm • Recompute the shortest paths tree of s separately in each of the n-1 failure graphs (G-igraphs for SLFR problem, and G-xgraphs for SNFR problem) • Time Complexity: Since we have O(n)failure graphs, the naïve algorithm requires O(n(m+nlog n))time • Simple, but inefficient (at least for undirected graphs)

  9. SLFR, SNFR: Our Results • SLFR: O(m + nlog n)time for computing optimal alternate paths • Planar undirected graphs: linear time • Undirected, integer edge weights: O(m + Tsort(n)) • Currently Tsort(n) = O(n log log n) [Han ’02] • Some improvements for replacement-paths problem • Given an s-t shortest path, find alternate s-t paths if each edge of the original s-t shortest path fails, one at a time • SNFR: O(m log n)time algorithm • Computes good alternate paths – within 15% of optimal for randomly generated graph with 100 – 1000 nodes, and an average degree of 10 – 30

  10. SLFR: Key Properties s x y u v • (u, v) offers an alt path with weight p(u,v) = d(y,v) + w(v,u) + d(u,s) • Shortest alternate path minimizes p over all such escape edges • p’(u,v) = d(s,y) + p(u,v) = d(s,v) + w(v,u) + d(u,s) • does not changethe final answer • is independent of (x,y)

  11. SLFR: A Recursive Algorithm s x b2 b1 g1 g2 • g edges have exactly one end point inside the subtree of x, and are valid escape edges for x. • b edges have both end points within the subtree of x, and are not valid escape edges for x. • All these were valid escape edges for the children of x • How do we efficiently determine whether an edge is a valid escape edge or not?

  12. DFS Start / End Labels (1,14) (12,13) (2,11) u w (5,10) (3,4) (8,9) (6,7) v • Assign start and end labels to nodes as a depth-first-search traversal of the tree starts or ends at the node • A node v belongs to the subtree of u iff dfsStart(u) < dfsStart(v) < dfsEnd(v) < dfsEnd(u) • Valid escape edges have exactly one end point in the node’s subtree

  13. SLFR Algorithm • Organize escape edges in a heap H, with the p’ weights as the priority of the heap elements • For leaf nodes, H.findMin retrieves the best escape edge • Hx meld(Hx, Hx1, Hx2 ,…, Hxk) where xi is a child node of x • At this point, Hxmay contain some invalid edges • To find the escape edge for x: • while (Hx.findMin is invalid) Hx.deleteMin • x.escapeEdge = Hx.findMin

  14. SLFR Algorithm: Time Complexity • The previous algorithm has O(m) deleteMin, O(m+n) findMin and O(n) meld operations • F-heaps have O(log n) for deleteMin, and O(1) for findMin and meld operations. Thus, this algorithm has O(m log n) total time complexity • We can reduce the number of candidate escape edges from O(m) to O(n) in O(m + n log n)time using an MST property. • This improves time complexity to near-optimal O(m + n log n) • DAGs admit a linear time solution

  15. SLFR Algorithm: k-RE-MST • k-RE-MST: • For each edge of the MST, find the k least cost edges of G across the cut induced by deleting the edge • Sub-problem in Shen’s randomized algorithm [Shen ’99] for finding the k most vital edges of an MST • Shen’s algorithm has O(n2) time complexity, bottlenecked at the k-RE-MST solution • SLFR can be easily generalized to solve this problem in O(m + n log n)time, and achieve corresponding improvement in Shen’s algorithm • For each node, find not just 1, but k cheapest valid edges • Insert the valid edges thus found back after a node has been processed

  16. SNFR: Key Properties s G x xj x1 xi gj bq bp gi • Green edges (e.g. gi, gj) have one end point outside the subtree of x. • giand gjcan be used by xiand xj respectively to reach s. • Blue edges (e.g. bp, bq) run between subtrees of siblings. • Together with green edges, they can offer a valid alternate paths. • E.g. bpoffers an alternate path to x1(either bq gj, or directly using gi).

  17. SNFR: Constructing Rx s G x xj x1 xi gj bq bp gi sx sx yi yj y1 yi y1 yj Rx Tsx

  18. SNFR Algorithm • Recursive algorithm somewhat similar to the SLFR algorithm • Each node needs the following information • Cheapest green edge for each child node • Blue edges among the subtrees of the child nodes • An edge is green for a node if it has one end point in the node’s subtree, and the other outside the node’s parent’s subtree • An edge is blue in Rx if x is the nearest-common-ancestor of the two end points of the edge

  19. SNFR Algorithm (Contd.) • Using NCA data structures, precompute the set of blue edges in each Rx • Merge green edges heaps of child nodes to build the green edges heap for a parent node • At this point, parent node’s heap may contain some invalid edges • Use DFS start/end labels to check if edge is a valid green edge; discard if not • Using heaps with O(log n) time for deleteMin, findMin and meld operations, we have an O(m log n) solution • O(m) deleteMin, O(n) meld and O(m+n) findMin operations

  20. SNFR Algorithm: Empirical Evaluation

  21. A Proactive Recovery Scheme Using Paths Computed by SLFR/SNFR • SLFR/SNFR assign an escape edge to each node • The escape edge defines the alternate path that avoids the failed element • If (u,v) is the escape edge of node x, if x’s parent (or the parent link) is down, send message to u • Embed control information in the message so that intermediate nodes know how to handle the message • Message should be routed to u, and not s • Important to provide loop-free routing • u sends message to v along (u,v), after which it is v’s responsibility to send the message to s (u deletes the control information)

  22. SLFR/SNFR: Improvements to Related Problems • Anti-block vital edge [SXX ’07] • Very similar to the SLFR problem, except that the aim is to find the edge which results in the largest ratio PG-e(u,s) / PG(u,s) • Authors present an O(n3) algorithm for this problem • An O(n) post-processing of SLFR results suffices to solve this problem in near-optimal O(m + n log n) total time • Most Vital Node under Uncertainty [Yan ’06] • Given an s-t path, alternate paths are defined as those in SNFR problem (from child of failed node to t). • Find node u (nextHop = v) which produces longest path: PG(s,u) + PG-v(u,t) • Using our path weight functions, and techniques similar to those for the most-vital-node solution [NPW03], this problem can be solved in near-optimal O(m + n log n) total time

  23. Some Open Problems Related to SLFR/SNFR • Directed graphs • Our upper bounds are strictly for undirected graphs •  (m n) lower bound holds for directed graphs in path comparison model (as long as m = O(n n) ) • Recently, replacement paths problem solved in O(n log3n) time for directed planar graphs [EPR ’08] • Multiple link failures • Any two links in the network? We presented an O(n3) algorithm for computing alternate s-t paths when the 2 failed links are on the original s-t path • Trivial lower bound of  (n2) for 2-link version • Multiple node failures • Any two nodes in the network • Failure of related nodes • Two end points of an edge • A node and all of its k - hop neighbors

  24. Some Open Problems Related to SLFR/SNFR (Contd.) • Faster algorithm and/or better alternate paths for SNFR problem • Our solution runs in O(m log n) time, and does not compute optimal alternate paths • Naïve upper bound for computing optimal alt paths: O(n(m + n log n)) • Distributed algorithms for the SLFR/SNFR problems • All known algorithms are centralized, and need information of the entire network graph as input • Especially of interest if all other steps performed at setup time are distributed algorithms • A proactive recovery scheme that uses these efficient paths and doesn’t need to alter/wrap the original message • Enriching message headers (with escape edge information) not always desirable • Original message may need to be split into multiple messages if we wrap it in a new message along with the escape edge information

  25. Bridge Connecting Simple Polygons • P & Q are two simple, disjoint polygons • Bridge (p, q), with p єρ(P), qєρ(Q) • ρ() defines the region enclosed by the boundary of the polygon • Weight of the bridge (p,q)is: w (p,q) = gd(p, P) + d(p,q) + gd(q, Q) • gd(x, X): Geodesic distance between x and its geodesic furthest neighbor in X • d(a,b): Euclidean distance between points a and b • Problem is to find a bridge connecting P and Q which has minimum weight

  26. Bridge Illustration P Q p q gd(p,P) = gd(p,p’) gd(q,Q) = gd(q,q’) p’ q’ w(p,q) = d(p,q) + gd(p,p’) + gd(q,q’)

  27. Bridge Properties y y Q w(opt visible bridge) ~ 2x + 2y w(opt bridge) ~ x + 2y x P z Opt bridge’s end points may not be mutually visible: a restriction imposed/assumed in earlier results on the bridge problem x >> y >> z

  28. Opt Bridge has End Points on the Polygon Boundaries p q P q’ Q gd(q,Q) = gd(q,r) gd(q’,Q) = gd(q’,r’) r r’ • gd(q’,r’)≤d(q’,q) + gd(q,r’) ≤ d(q’,q) + gd(q,r) • gd(q’,Q) ≤ d(q’,q) + gd(q,Q) w(p,q) = gd(p,P) + d(p,q) + gd(q,Q) w(p,q’) = gd(p,P) + d(p,q’) + gd(q’,Q) ≤ gd(p,P) + d(p,q’) + d(q’,q) + gd(q,Q) = gd(p,P) + d(p,q) + gd(q,Q) • w(p,q’) ≤ w(p,q)

  29. O(n log n)Algorithm for Optimal Vertex Bridge • Vertex bridge is between the vertices of the 2 polygons • Additively weighted nearest-point Voronoi diagram • Each Voronoi point u has an associated weight wv • Query for point p returns a point v such that d(p, v) + wv = MIN u є V{d(p,u) + wu} • Can be built in O(n log n) time [Aurenhammer-Imai ’88] • Query can be answered in O(log n) time • Geodesic furthest neighbors of all vertices of a simple polygon can be found in O(n log n) time [Suri ’89]

  30. Optimal Vertex Bridge (Contd.) • For each vertex q є Q, assign weight wq = gd(q, Q) • O(n log n) total time • For each vertex p є P, find the vertex q є Q with minimum d(p, q) + wq • This would be the best vertex bridge with p as one end point • Each query in O(log n) time • Check all vertices of P for the optimal vertex bridge • Total time O(n log n)

  31. Approximately Optimal Bridge • Divide each edge into k uniform segments • Run the vertex bridge algorithm: O(kn log kn) time • Approximation ratio: 1 + 2/k Q P c a’ gd(p,P) = gd(p,p’) = x gd(a,P) = gd(a,a’) gd(q,Q) = y a q p x p’ d(a,p) = gd(a,p) ≤ x gd(a,P) = gd(a, a’) ≤ d(a,p) + gd(p,a’) ≤ 2x d(a,c) ≤d(a,p) + d(p,q) + d(q,c) ≤x + d(p,q) + y w(a,c) = gd(a,P) + d(a,c) + gd(c,Q) ≤ 2x + (x + d(p,q) + y) + 2y ≤3 (x + d(p, q) + y) Analysis can be extended to prove the ratio of 1 + 2/k

  32. Optimal Bridge • We narrow the set of points that can support an optimal bridge to O(n2) anchors on each polygon’s boundary • These O(n2) anchors can be found in O(n2 log n) time • The optimal vertex bridge algorithm takes an additional O(n2log n) time for finding the bridge • the polygons can be considered to have O(n2) vertices each

  33. Open Problems Related to Bridges • Faster algorithm for the optimal bridge and optimal vertex bridge connecting simple polygons • What if the bridge itself is geodesic (instead of Euclidean)? • Exact algorithm? • Approximation schemes?

  34. Thank You

  35. SLFR => RE-MST • RE-MST: • For each edge of the MST, find the least cost edge of G across the cut induced by deleting the edge • Has been exhaustively studied as the MST sensitivity problem • Efficient algorithms known • O(m α(m,n))for general graphs • Linear time for planar graphs • SLFR and the replacement paths problems can be reduced to the RE-MST problem in O(Tmst(m,n) + Tsssp(m,n)) time • Reduced graph has O(n) nodes and O(2n) edges • Linear time for planar graphs • O(m + n α(2n,n)) for integer edge weight graphs

More Related