Title: External Memory Multi-Way Planar Graph Separation
1External Memory Multi-Way Planar Graph Separation
2The 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.
vV separator vertices
3Planar 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.
nonplanar
planar
4The Dual of a Planar Graph
- Given a planar graph G, its dual G is defined as
follows - Place a vertex in each face of G (including the
outer face). - 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.
5Dual Spanning Tree
- Lemma
- T is a spanning tree of G ? T(E\T) is a
spanning tree of G
E\T T T
6Multi-Way Planar Graph Separation
- Lipton and Tarjan proved that any planar graph
has an O(vV )-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/vR) 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).
7Multi-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.
8Partitioning a Tree(Gazit et al.)
24
- 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? gt ?w(v)/R? for all children v of v.
- 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
- T has at most 2N/R-1 R-critical vertices.
- If T has degree d, then it has d(2N/R - 1)
R-bridges. - An R-bridge contains at most R1 vertices.
- An R-bridge has at most 2 attachment vertices.
23
11
11
10
10
9
4
5
8
4
1
2
1
5
3
2
1
4
2
1
2
1
1
R 9
9Case 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 R1), 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).
10Case 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 R1 vertices, and thus the 2
edges define a subgraph of G of size at most
3(R1).
11Case 1 Planar graph with bounded height spanning
tree (3)
Edges of G Cycle Edges Edges of T R-critial
vertices
12Case 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.
13Case 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 - Calculating the weights is also done using
O(sort(N)) I/Os. - Once we have the weights, the R-bridges are
computed with O(sort(N)) I/Os using a simple tree
traversal.
14Case 1 I/O Efficiency (2)
- To compute the separator vertices and subgraphs
- 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. - Sort L by vertex and then by the identifier, and
remove vertices with more than one identifier.
Those are the separator veritces. - Remove duplicate vertices.
- This is done using O(sort(N)) I/Os.
- Total cost O(sort(N)) I/Os.
15Case 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 lt N, define
- starter levels the levels i such that (L(i),
L(i1) contains a multiple of ?N/X?. - 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.
16Case 2 General planar graph (2)
- Partition G to O(X) subgraphs by grouping
vertices between two consecutive cutter levels
together.
17Case 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 Gi.
- 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.
18Case 2 General planar graph (4)
- The part of T that falls within a subgraph Gi 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.
19Case 2 Analysis
- Choose Y N / vR.
- Bounded subgraph Gi of size Ni has height vR, and
thus can be partitioned as in case 1 to O(Ni / R)
subgraphs, each of size O(R), using O((Ni /R)vR)
O(Ni /vR) separator vertices. - In addition, the at most X cutter levels
contribute another O(X Y) O(X N/vR)
separator vertices.
20Case 2 Analysis (2)
- Thus, the total number of separator vertices is
given by S(N) O(X N/vR) O(N/vR) X
S(N/X) (and S(R) 0) - Choose X (M/B2)1/4.
- For now, assume that RgtBvM.
- Thus XN/vR 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 gt B2e.
21Case 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.
22Case 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/BXT(N/X),
which is O(sort(N)). - Bounded height subgraphs can be separated
immediately, using a total of O(sort(N)) I/Os.
23Case 2 I/O Efficiency (2)
- So far we assumed that R gt BvM.
- If R BvM lt 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/vR) separator vertices in each of
the O(N/M) subgraphs, for a total of O(N/vR)
vertices.
24Summery
- Weve 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.