Presentation is loading. Please wait.

Presentation is loading. Please wait.

A Nearly Optimal Algorithm for Approximating Replacement Paths and k Shortest Simple Paths in General Graphs Abhilasha Seth CSCE 669.

Similar presentations


Presentation on theme: "A Nearly Optimal Algorithm for Approximating Replacement Paths and k Shortest Simple Paths in General Graphs Abhilasha Seth CSCE 669."— Presentation transcript:

1 A Nearly Optimal Algorithm for Approximating Replacement Paths and k Shortest Simple Paths in General Graphs Abhilasha Seth CSCE 669

2 Replacement Paths G = (V,E) - directed graph with positive edge weights ‘s’, ‘t’ - specified vertices π(s, t) - shortest path between them Replacement Paths: For every edge ‘e’ on π(s, t) Find shortest path from ‘s’ to ‘t’ that avoids ‘e’. Motivation Finding shortest path considering edge failures. Naïve Solution Remove each edge ‘e’ one at a time, calculate shortest s-t path O(mn + n 2 log n) Recently improved to - O(mn+n 2 log log n)

3 Approximation (1 + ε ) approximate replacement paths, ε = [0,1) For positive weighted, directed graphs O(mlog(nC/c)/ ε) time C- largest edge weight c – smallest edge weight α-approximate O(T(n)) algorithm for replacement paths: α –approximate O(T(n)) algorithm for computing second shortest simple path Just take the shortest replacement path

4 Notations G = (V, E) is directed graph with positive weights n = |V|, m = |E| ‘s’ and ‘t’ are arbitrary vertices For any path P, w(P) - length of P π(s, t) – shortest path π(s, t) = (s = v 1 ; v 2 ; :::; v q = t), q = 2 b for some b δ(x, y) = w (π(s, t)) π 2 (s, t) – second shortest path from s to t δ 2 (s,t) – analogous Aim – compute (1+ ε) approximation of π 2 (s, t)

5 Definitions Detour of P P is a simple path D(u,v) is a u-v simple path is a detour of P if: D(u,v) ∩ P = {u, v} u precedes v on P

6 Definitions The second shortest path from ‘s’ to ‘t’ is of the form: π(s, vi) o D(vi, vk) o π(vk, t) D(vi, vk) is a detour of π(s, t) Span of a detour D(vi, vk) = k – i

7 Approach Find s-t path with sufficiently large detour span Use it as an upper bound on δ 2 (s,t) Progressively improve upper bound – O(log q ) phases ‘i'th phase – Detour span in [q/2 i, q/2 i-1 ] Compute shortest s-t path

8 Approach W i be the length of shortest path s-t for phase i U i be the length of shortest path s-t with detour span >= q/2 i If q = 16 iDetour Span 1[q/2, q][8, 16] 2[q/4, q/2][4,8] 3[q/8, q/4][2,4] 4[q/16, q/8][1,2]

9 Approach Concept Either we can efficiently compute exact shortest path of ‘i’th phase. Shortest path of some phase j < i is (1 + ε ) approximation of shortest path of ‘i’th phase. Construct an algorithm which returns O(log q) values R 1 … R logq that satisfy the properties:

10 Approach Letting R = min i { R i }, we have R is a suitable approximation to the second shortest path Aim – find an algorithm which outputs a value of R i for (log q) phases which satisfy the three properties.

11 Algorithm Label some vertices as ‘start’ vertices Other vertices as ‘end’ vertices To find simple shortest path s-t, find shortest path whose detour: Starts at a ‘start’ vertex Ends at an ‘end’ vertex Modify the edges of G such that Remove incoming edges to start vertices Remove outgoing edges from end vertices Remove all edges on π(s, t) For every start vertex, add edge (s, v) with weight δ(s, v) For every end vertex, add edge (v, t) with weight δ(v, t)

12 Algorithm Any path of the form: π(s, vi) o D(vi, vk) o π(vk, t) is represented in the modified graph if a. vi is a start vertex b. vk is an end vertex

13 Computing R i ‘i’ th phase – compute shortest path with detour span [q/2 i, q/2 i-1 ] Split π(s, t) into intervals of size q/2 i. Let I 1, I 2,…. I 2^i be the intervals Split the phase into four sub phases. Label every fourth interval with start vertex For each subphase ‘j’, calculate R[i][j] R[i][j] is the length of the shortest path in i’th phase and j’th subphase

14 Computing R i Calculating Shortest distance Use Modified Dijikstra’s algorithm Progressive Dijikstra’s algorithm For every stage, do not start from scratch Use information from previous stages Since we are looking for approximation Explore a vertex ‘u’ only if the distance is significantly lower than previous stages Relax an edge (u’, u): Set c[u] = c[u’] + w(u’, u) Only if c[u’] + w(u’, u) < c[u]/ (1 + ε )

15 Calculating Replacement Paths Avoid vertices instead of edges. Extending the algorithm to avoid edges is easy: Insert a vertex in the middle of an edge Re-run the algorithm to avoid that vertex Le c[i, j, k ](v g )be the value of c(v g ) at the end of stage k of progressive Dijikstra’s algorithm.

16 Conclusion Second Shortest Path Approximation Final approximation to δ 2 (s,t) = min i,j { R[i, j] } Replacement Paths Final approximation to δ(s,t,v i ) = min i,j { m[i, j] (v i ) } Replacement Algorithm - O(mlog(nC/c)/ ε) time Hope – get rid of log(nC/c) in the approximation replacement paths


Download ppt "A Nearly Optimal Algorithm for Approximating Replacement Paths and k Shortest Simple Paths in General Graphs Abhilasha Seth CSCE 669."

Similar presentations


Ads by Google