external memory multi-way planar graph separation

24
External Memory Multi- Way Planar Graph Separation (Arge, Brodal, Toma)

Upload: wanda

Post on 05-Jan-2016

38 views

Category:

Documents


2 download

DESCRIPTION

External Memory Multi-Way Planar Graph Separation. (Arge, Brodal, Toma). The Graph Separation Problem. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: External Memory Multi-Way Planar Graph Separation

External Memory Multi-Way Planar Graph Separation

(Arge, Brodal, Toma)

Page 2: External Memory Multi-Way Planar Graph Separation

The Graph Separation Problem

Given an undirected graph G = (V ,E) and a function f :N →N, we would like to find a subset S V of size f(V) such that the removal of S disconnects G into two subgraphs, each of size at most 2V/3.

√V separator vertices

Page 3: External Memory Multi-Way Planar Graph Separation

Planar Graphs

• A planar graph is a graph that can be embedded to the plane so that no two edges cross except at the endpoints.

• Kuratowski's theorem:

a finite graph is planar it does not contain a subgraph that is homeomorphic to K5 or K3,3.

planar nonplanar

Page 4: External Memory Multi-Way Planar Graph Separation

The Dual of a Planar Graph• Given a planar graph G, its dual G* is defined

as follows:1. Place a vertex in each face of G (including the outer

face).

2. For any two faces fi and fj adjacent to a common edge e = (u, v) of G, add an edge e* = (fi, fj) in G*.

G* can be computed from G using

O(sort(N)) I/Os.

Page 5: External Memory Multi-Way Planar Graph Separation

Dual Spanning TreeLemma:T is a spanning tree of G T’=(E\T)* is a spanning tree of G*

E\T

T

T’

Page 6: External Memory Multi-Way Planar Graph Separation

Multi-Way Planar Graph Separation

• Lipton and Tarjan proved that any planar graph has an O(√V )-separator.

• Hutchinson et al. showed how it can be done using O(sort(V)) I/Os, assuming that a BFS tree of the graph is given.

• For any parameter R, this result can be used recursively to partition a planar graph into O(V/R) subgraphs with O(R) vertices each, using O(V/√R) separator vertices.

• This yields an O(log(V/R)·sort(V)) I/Os algorithm. We will see an O(sort(V)) algorithm (assuming a BFS tree is given).

Page 7: External Memory Multi-Way Planar Graph Separation

Multi-Way Planar Graph Separation (2)

• Given a graph G we will assume that the following holds:• G is connected.• A planar embedding of G is given.• A BFS tree T of G is given, and is represented implicitly by

storing with each vertex in G its parent in T and each edge of G is marked as being either a tree or a non-tree edge.

• W.l.o.g, we also assume that G is triangulated. If this is not the case, it can be triangulated using O(sort(N)) I/Os (Hutchinson et al.), and the added edges can be marked and removed in the final phase.

Page 8: External Memory Multi-Way Planar Graph Separation

Partitioning a Tree(Gazit et al.)

• For a vertex v, w(v) is the number of vertices in the subtree rooted at v.

• v is called R-critical if v is not a leaf and

w(v)/R > w(v’)/R for all children v’ of v.

24

1111

23

1010

9 45

8

5

4

3

12

12

14

12

1

2

1

• e and e’ are equivalent if there is a path connecting them that avoids R-critical vertices.

• The graphs induced by the equivalence classes are called the R-bridges of T.

• The attachment vertices of a R-bridge are the vertices in the bridge that are also R-critical.

Combinatorial Results:

1. T has at most 2N/R-1 R-critical vertices.

2. If T has degree d, then it has ≤ d(2N/R − 1) R-bridges.

3. An R-bridge contains at most R+1 vertices.

4. An R-bridge has at most 2 attachment vertices.

R = 9

Page 9: External Memory Multi-Way Planar Graph Separation

Case 1: Planar graph with bounded height spanning tree

• G is triangulated, and thus T’ = (E\T)* is a binary tree.

• Conclusion:

T’ has at most 4V/R R-bridges (each of size at most R+1), and thus is has a total of at most 8V/R attachment vertices.

• If those vertices are removed, T’ breaks into O(V/R) subtrees (the R-bridges) of size O(R).

Page 10: External Memory Multi-Way Planar Graph Separation

Case 1: Planar graph with bounded height spanning tree (2)

• Any edge in T’ has a dual edge in (E\T). Adding that edge to T creates a cycle of size O(H), where H is the height of T.

• The R-bridge B has (at most) 2 attachment vertices. The (at most) 2 edges in B incident to those vertices define 2 cycles in G.

• The faces of G that are inside one of these cycles but outside the other are exactly the faces corresponding to the vertices in B.

• B contains at most R+1 vertices, and thus the 2 edges define a subgraph of G of size at most 3(R+1).

Page 11: External Memory Multi-Way Planar Graph Separation

Case 1: Planar graph with bounded height spanning tree (3)

Edges of G

Cycle Edges

Edges of T’

R-critial vertices

Page 12: External Memory Multi-Way Planar Graph Separation

Case 1: Planar graph with bounded height spanning tree (4)

Bottom line:

• There are O(N/R) R-bridges in T’.

• Each defines at most 2 cycles in T.

• Each cycle is of size O(H) vertices.

• Thus G is partitioned to O(N/R) subgraphs of

size O(R) using O((N/R)·H) separator vertices.

Page 13: External Memory Multi-Way Planar Graph Separation

Case 1: I/O Efficiency

• Computing G* and T’ can be done in O(sort(N)) I/Os.

• BFS and DFS traversals on undirected trees are done with O(sort(N)) I/Os, and thus:

1. Calculating the weights is also done using O(sort(N)) I/Os.

2. Once we have the weights, the R-bridges are computed with O(sort(N)) I/Os using a simple tree traversal.

Page 14: External Memory Multi-Way Planar Graph Separation

Case 1: I/O Efficiency (2)

• To compute the separator vertices and subgraphs:1. Scan through the R-bridges and for each vertex

output the 3 vertices defining the dual face to a list L, along with a unique identifier of the R-bridge.

2. Sort L by vertex and then by the identifier, and remove vertices with more than one identifier. Those are the separator veritces.

3. Remove duplicate vertices.

This is done using O(sort(N)) I/Os.

Total cost: O(sort(N)) I/Os.

Page 15: External Memory Multi-Way Planar Graph Separation

Case 2: General planar graph

• Let L(i) be the total number of vertices on levels 0 through i of T.

• Given parameters X and Y < N, define:

1. starter levels: the levels i such that (L(i), L(i+1)] contains a multiple of N/X.

2. cutter levels: the first level above and below some starter level, which contains at most Y vertices.

• There are at most X starter levels.

• Between each two consecutive starter levels there are at most N/X vertices.

Page 16: External Memory Multi-Way Planar Graph Separation

Case 2: General planar graph (2)

• Partition G to O(X) subgraphs by grouping vertices between two consecutive cutter levels together.

Page 17: External Memory Multi-Way Planar Graph Separation

Case 2: General planar graph (3)

• If the two cutter levels defining a subgraph Gi are

within two consecutive starter levels, then Gi has

size O(N/X).

– Solve the problem recursively on G i.

• Otherwise, each of the levels of T in Gi have

more than Y vertices. Thus Gi has a spanning

tree of height O(N/Y).– Solve using the algorithm for Case 1.

Page 18: External Memory Multi-Way Planar Graph Separation

Case 2: General planar graph (4)• The part of T that falls within a subgraph G i is not a BFS

tree for Gi, since it is not connected.

• In order to obtain a BFS tree for a subgraph, introduce a fake root vertex and connect it to all vertices just below the cutter level defining Gi.

– Assume that T is given level-by-level.

– Then the BFS trees for all subgraphs can be computed in O(scan(N)) I/Os.

– Each fake root replaces at least one vertex on the cutter level and thus the total size of the subgraphs remains O(N).

– Fake vertices and edges can be marked and removed later using another O(scan(N)) I/Os.

Page 19: External Memory Multi-Way Planar Graph Separation

Case 2: Analysis• Choose Y = N / √R.

• Bounded subgraph Gi of size Ni has height √R, and

thus can be partitioned as in case 1 to O(Ni / R)

subgraphs, each of size O(R), using O((Ni /R)·√R) =

O(Ni /√R) separator vertices.

• In addition, the at most X cutter levels contribute another O(X · Y) = O(X · N/√R) separator vertices.

Page 20: External Memory Multi-Way Planar Graph Separation

Case 2: Analysis (2)• Thus, the total number of separator vertices is given

by: S(N) ≤ O(X · N/√R) + O(N/√R) + X · S(N/X) (and S(R) = 0)

• Choose X = (M/B2)1/4.

• For now, assume that R>B√M.

• Thus X·N/√R = O(N/B).

• Therefore: S(N) = O(N/B)+(M/B2)1/4 · S(N/(M/B2)1/4).

• This solves to O(N/B)·log(M/B2)1/4(N/R), which is

O(sort(N)) under the assumption that M > B2+ε.

Page 21: External Memory Multi-Way Planar Graph Separation

Case 2: Analysis (3)

Final result:

G = (V, E) was partitioned into O(N/R) subgraphs, each of size O(R), using a set of O(sort(N)) separator vertices in O(sort(N)) I/Os.

Page 22: External Memory Multi-Way Planar Graph Separation

Case 2: I/O Efficiency• Representing T level-by-level and computing the

BFS level for each vertex can be done using O(sort(N)) I/Os using standard tree algorithms.

• Not including the I/Os needed to handle bounded height subgraphs, one recursion step can be performed in O(scan(N)) I/Os.

• Therefore, the recurrence is T(N) ≤ N/B+X·T(N/X), which is O(sort(N)).

• Bounded height subgraphs can be separated “immediately”, using a total of O(sort(N)) I/Os.

Page 23: External Memory Multi-Way Planar Graph Separation

Case 2: I/O Efficiency (2)• So far we assumed that R > B√M.

• If R ≤ B√M < M, use the above algorithm to partition G into subgraphs of size O(M) and then load each subgraph into memory in turn and apply the algorithm of Lipton and Tarjan recursively until all subgraphs have size O(R).

• This only requires an extra O(N/B) I/Os and introduces O(M/√R) separator vertices in each of the O(N/M) subgraphs, for a total of O(N/√R) vertices.

Page 24: External Memory Multi-Way Planar Graph Separation

Summery

• We’ve actually seen an O(sort(N)) reduction from the multi-way planar graph separation problem to planar BFS.

• Arge et al. also showed how the multi-way separation of a planar graph can be used to solve the SSSP problem in O(sort(V)) I/Os.

• In a different paper, Arge et al. showed that planar DFS can be reduced to planar BFS in O(sort(V)) I/Os.

• Since BFS can be trivially reduced to SSSP by assigning all edges weight 1, all fundamental problems on planar undirected graphs are equivalent.