abhilasha seth csce 669

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

Upload: zelig

Post on 14-Feb-2016

41 views

Category:

Documents


0 download

DESCRIPTION

A Nearly Optimal Algorithm for Approximating Replacement Paths and k Shortest Simple Paths in General Graphs. Abhilasha Seth CSCE 669. Replacement Paths. G = (V,E) - directed graph with positive edge weights ‘s’, ‘t’ - specified vertices π (s, t) - shortest path between them - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Abhilasha Seth CSCE 669

A Nearly Optimal Algorithm for Approximating Replacement Paths and k Shortest Simple Paths in General Graphs

Abhilasha SethCSCE 669

Page 2: Abhilasha Seth CSCE 669

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 + n2 log n)• Recently improved to - O(mn+n2 log log n)

Page 3: Abhilasha Seth CSCE 669

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

Page 4: Abhilasha Seth CSCE 669

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 = v1; v2; :::; vq = t), q = 2b 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)

Page 5: Abhilasha Seth CSCE 669

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

Page 6: Abhilasha Seth CSCE 669

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

Page 7: Abhilasha Seth CSCE 669

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/2i , q/2i-1]• Compute shortest s-t path

Page 8: Abhilasha Seth CSCE 669

Approach

• Wi be the length of shortest path s-t for phase i

• Ui be the length of shortest path s-t with detour span >= q/2i

• If q = 16

i Detour 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]

Page 9: Abhilasha Seth CSCE 669

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 R1… Rlogq that satisfy the properties:

Page 10: Abhilasha Seth CSCE 669

Approach

• Letting R = mini { Ri }, we have

• R is a suitable approximation to the second shortest path

• Aim – find an algorithm which outputs a value of Ri for (log q) phases which satisfy the three properties.

Page 11: Abhilasha Seth CSCE 669

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)

Page 12: Abhilasha Seth CSCE 669

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 vertexb. vk is an end vertex

Page 13: Abhilasha Seth CSCE 669

Computing Ri

• ‘i’ th phase – compute shortest path with detour span [q/2i, q/2i-1]

• Split π(s, t) into intervals of size q/2i.• Let I1, I2,…. I2^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

Page 14: Abhilasha Seth CSCE 669

Computing Ri

• 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 + ε )

Page 15: Abhilasha Seth CSCE 669

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 ](vg)be the value of c(vg) at the end of stage k of progressive Dijikstra’s algorithm.

Page 16: Abhilasha Seth CSCE 669

Conclusion• Second Shortest Path Approximation• Final approximation to δ2(s,t) = mini,j{ R[i, j] }

• Replacement Paths• Final approximation to δ(s,t,vi) = mini,j{ m[i, j] (vi) }

• Replacement Algorithm - O(mlog(nC/c)/ ε) time • Hope – get rid of log(nC/c) in the approximation replacement

paths