Presentation is loading. Please wait.

Presentation is loading. Please wait.

PLANAR SHORTEST PATH & R-DIVISIONS Dwyane George March 10, 2015.

Similar presentations


Presentation on theme: "PLANAR SHORTEST PATH & R-DIVISIONS Dwyane George March 10, 2015."— Presentation transcript:

1 PLANAR SHORTEST PATH & R-DIVISIONS Dwyane George March 10, 2015

2 Outline  Definitions  Algorithm: Single-Source Shortest Path (SSSP)  r-Division (Clustering)  Runtime Analysis  Proof of Correctness

3 Planar Graphs  Definition: a graph G that can be embedded in a plane, such that the edges only intersect at the endpoints Figure 1: Example of Planar Graph, G

4 Problem: Single Source Shortest Path (SSSP)  Given planar graph G = (V, E) and a source node v in V  Goal: Compute shortest path distance d G (s, v) for all v in V and encode the shortest path tree  Assumption: Non-negative edge lengths

5 Problem Example What’s the SSSP solution for the above planar graph with a source node at 4?

6 Known Algorithms  General Graphs  Dijkstra’s Algorithm: O(m+nlogn)  Planar Graphs – can we do better?  Idea: r-Division

7 r-Division  Definition: A decomposition of G into:  O(n/r) edge disjoint pieces – sub-graphs (not necessarily connected)  Each piece has ≤ r vertices  O(√r) boundary vertices – vertices with edges to at least two pieces  Exists O(nlogr) time algorithm to compute

8 Example: r-Division Figure 2: Example of r-division Source: [Fre87, p. 1006, Fig. 1] In this r-division, what is r?

9 SSSP Algorithm  Idea: Dijkstra’s SSSP algorithm but with limited attention span  Dijkstra’s is much cheaper on a cluster than on G  Dijkstra’s: O(nlogn)  Mostly working on vertex sets of size log 4 n  Algorithm Main Idea  Run r-Division on G with r = log 4 n  Repeat: Choose piece P with the minimum edge in G Run Dijkstra’s algorithm on P for logn iterations

10 SSSP Runtime  Runtime: O(nloglogn)  Can use vector r-Division to achieve further speedup to O(n)  Significantly more complex

11 Planar Separator Theorem  For any n-vertex planar graph G = (V, E), there exists partitions of vertices A, S, B s. t. each of A and B has at most 2n/3 vertices, S has O(√n) vertices, and there are no edges with one endpoint in A and one in B. A and B need not be connected sub-graphs. S is called the separator.

12 Separator Theorem to Form r-Division  While a piece has size > r  Invoke theorem recursively to compute r-division  Runtime Analysis  T(n) = 2T(n/2) + O(n)  O(nlogn) time  Can we do better?

13 Fast r-Division  Theorem: r-Division can be computed in O(nlogr) time  Use ρ -clustering to improve over O(nlogn)  Definition: ρ -clustering is a decomposition of G into O(n/ ρ ) vertex-disjoint connected pieces each with Θ ( ρ ) vertices  Computable in O(n) time, assuming degree ≤ 3 for all v in V

14 Fast r-Division Algorithm  Algorithm:  ρ -clustering with ρ =√r  Contract pieces into single nodes to form G*: simple planar graph on n* = O(n/√r) vertices  Run naïve r-Division on G*  Expand pieces back, new pieces have size between r and r 3/2 Size r if no nodes in a division is a piece Size r*√r = r 3/2 if all nodes in a division is a piece Runtime: Σ O(S i logS i ) = O(nlogr)

15 r-Division Runtime Analysis OperationCost per CallNumber of CallsTotal Operation Cost ρ -clustering O(n)*O(1)O(n) Contraction of Pieces O(n/√r)O(1)O(n/√r) Naïve r-DivisionO((n/√r)log(n))O(1)O((n/√r)log(n)) Expansion of Pieces = O(S i logS i ) = O(S i logr) = O((n/√r)logr) O(√r)O(nlogr) TotalO(nlogr) *Assumes degree ≤ 3 for all v in V

16 r-Division Correctness  Fast r-Division is equivalent to the naïve algorithm  ρ -clustering with ρ =√r ensures that we produce O(√r) boundary vertices  Contracting nodes does not lose data encoded in original graph  Expanding the pieces back to the original G preserves the original graph structure with r pieces and O(n/r) edge disjoint pieces  r-Division critical in many algorithms, such as SSSP  Speed is important


Download ppt "PLANAR SHORTEST PATH & R-DIVISIONS Dwyane George March 10, 2015."

Similar presentations


Ads by Google