i/o-efficient algorithms for planar graphs i:...

37
I/O-Efficient Algorithms for Planar Graphs I: Separators Anil Maheshwari School of Computer Science Carleton University Ottawa, ON K1S 5B6 Canada [email protected] Norbert Zeh Faculty of Computer Science Dalhousie University Halifax, NS B3H 1W5 Canada [email protected] Abstract We present I/O-efficient algorithms for computing optimal separator partitions of planar graphs. Our main result shows that, given a planar graph G with N vertices and an integer r> 0, a vertex separator of size O (N/ r) that partitions G into O(N/r) subgraphs of size at most r and boundary size O ( r) can be computed in O(sort(N )) I/Os, provided that M 56r log 2 B. Together with the planar embedding algorithm presented in the companion paper [27], this result is the basis for I/O-efficient solutions to many other fundamental problems on planar graphs, including breadth-first search and shortest paths [5, 8], depth-first search [6, 9], strong connectivity [9], and topological sorting [8]. Our second result shows that, given I/O-efficient solutions to these problems, a general separator algorithm for graphs with costs and weights on their vertices [3] can be made I/O-efficient. Many classical separator theorems are special cases of this result. In particular, our I/O-efficient version allows the computation of a separator as produced by our first separator algorithm, but without placing any constraints on r. 1 Introduction I/O-efficient graph algorithms have received considerable attention because massive graphs arise naturally in many applications. Recent web crawls, for example, produce graphs of on the order of 200 million nodes and 2 billion edges. Recent work in web modelling uses depth-first search, breadth-first search, shortest paths, and connected components as primitive operations for inves- tigating the structure of the web [12]. Massive graphs are also often manipulated in geographic information systems (GIS), where many fundamental problems can be formulated as basic graph problems. Yet another example of a massive graph is AT&T’s phone-call graph [13]. When working with such large data sets, the transfer of data between internal and external memory, and not the internal-memory computation, is often the bottleneck. Thus, I/O-efficient algorithms can lead to considerable run-time improvements. An extended abstract of this paper appeared in the Proceedings of the 13th ACM-SIAM Symposium on Discrete Algorithms, San Francisco 2002. Research supported by NSERC and NCE GEOIDE. 1

Upload: others

Post on 23-Sep-2020

10 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: I/O-Efficient Algorithms for Planar Graphs I: Separatorspeople.scs.carleton.ca/~maheshwa/papers/separators.pdf · 2009. 10. 14. · I/O-efficient graph algorithms have received considerable

I/O-Efficient Algorithms for Planar Graphs I:

Separators∗

Anil Maheshwari†

School of Computer Science

Carleton University

Ottawa, ON K1S 5B6

Canada

[email protected]

Norbert Zeh†

Faculty of Computer Science

Dalhousie University

Halifax, NS B3H 1W5

Canada

[email protected]

Abstract

We present I/O-efficient algorithms for computing optimal separator partitions of planar graphs.Our main result shows that, given a planar graph G with N vertices and an integer r > 0, avertex separator of size O (N/

√r) that partitions G into O(N/r) subgraphs of size at most r

and boundary size O (√

r) can be computed in O(sort(N)) I/Os, provided that M ≥ 56r log2 B.Together with the planar embedding algorithm presented in the companion paper [27], thisresult is the basis for I/O-efficient solutions to many other fundamental problems on planargraphs, including breadth-first search and shortest paths [5, 8], depth-first search [6, 9], strongconnectivity [9], and topological sorting [8]. Our second result shows that, given I/O-efficientsolutions to these problems, a general separator algorithm for graphs with costs and weights ontheir vertices [3] can be made I/O-efficient. Many classical separator theorems are special casesof this result. In particular, our I/O-efficient version allows the computation of a separator asproduced by our first separator algorithm, but without placing any constraints on r.

1 Introduction

I/O-efficient graph algorithms have received considerable attention because massive graphs arisenaturally in many applications. Recent web crawls, for example, produce graphs of on the orderof 200 million nodes and 2 billion edges. Recent work in web modelling uses depth-first search,breadth-first search, shortest paths, and connected components as primitive operations for inves-tigating the structure of the web [12]. Massive graphs are also often manipulated in geographicinformation systems (GIS), where many fundamental problems can be formulated as basic graphproblems. Yet another example of a massive graph is AT&T’s phone-call graph [13]. When workingwith such large data sets, the transfer of data between internal and external memory, and not theinternal-memory computation, is often the bottleneck. Thus, I/O-efficient algorithms can lead toconsiderable run-time improvements.

∗An extended abstract of this paper appeared in the Proceedings of the 13th ACM-SIAM Symposium on Discrete

Algorithms, San Francisco 2002.†Research supported by NSERC and NCE GEOIDE.

1

Page 2: I/O-Efficient Algorithms for Planar Graphs I: Separatorspeople.scs.carleton.ca/~maheshwa/papers/separators.pdf · 2009. 10. 14. · I/O-efficient graph algorithms have received considerable

Planar graphs are a natural abstraction of many real-world problems. For example, the graphsarising in GIS are often planar or “almost planar”. On the theoretical side, planar graphs areamong the fundamental combinatorial structures used in algorithmic graph theory. Planar separa-tors have played the key role in designing divide-and-conquer algorithms for planar graphs. Theclassical separator theorem for planar graphs by Lipton and Tarjan [26], coupled with linear-timeembedding algorithms [10, 18, 23, 25], has led to phenomenal developments in algorithmic graphtheory. Numerous research results that followed describe efficient algorithms for computing a vari-ety of separators of other sparse graphs and discuss applications of separators such as lower boundson the size of Boolean circuits, approximation algorithms for NP-complete problems, nested dissec-tion of sparse systems of linear equations, load balancing in parallel numerical simulations basedon the finite elements method, partitioning triangular irregular networks in the field of GIS, andencoding graphs.

In external memory, planar separators have been the key to obtaining I/O-efficient algorithmsfor a variety of problems on embedded planar graphs, including breadth-first search (BFS) andsingle-source shortest paths [5, 8], depth-first search (DFS) [6, 9], strong connectivity [9], andtopological sorting [8].

Existing internal-memory algorithms for computing planar separators (e.g., [2, 3, 26]) are notI/O-efficient because they all use BFS to gather structural information about the graph, and BFSand DFS are among those fundamental graph problems for which truly I/O-efficient solutions ongeneral graphs are still lacking. The existing I/O-efficient BFS-algorithms for planar graphs [5, 8]are separator-based; hence, using them in a separator algorithm creates a circular dependency.In this paper, we present a new algorithm that applies BFS only to a compressed version of thegiven graph and combines this with graph contraction techniques to obtain an optimal separatorpartition in an I/O-efficient manner. An added benefit of our algorithm is that it does not requirea planar embedding of the given graph.

1.1 Model of Computation and Previous Work

The algorithms in this paper are designed an analyzed in the I/O-model of Aggarwal and Vitter [1].This model quite accurately captures the characteristics of current hard drives and yet is simpleenough to allow the I/O-complexity of complex algorithms to be analyzed. In the I/O-model, theinternal memory of the computer is capable of holding M data items, the disk is partitioned intoblocks of B consecutive data items, and every disk access transfers one block of data betweeninternal memory and disk. A disk access is referred to as an I/O-operation or I/O. The complexityof an algorithm is the number of I/O-operations it performs.

For a survey of results obtained in the I/O-model and its extensions refer to [28, 32]. Thefollowing results are relevant to the work presented in this paper.

It is shown in [1] that sorting and permuting an array of N data items take sort(N) =Θ((N/B) logM/B(N/B)) and perm(N) = Θ(minN, sort(N)) I/Os, respectively; scanning thearray takes scan(N) = Θ(N/B) I/Os.

In internal memory, that is, in the RAM model, the problem of computing planar separators iswell-studied. Lipton and Tarjan [26] were the first to show that every planar graph with N verticeshas a 2

3 -separator of size O(√

N)

, that is, a vertex set of size O(√

N)

whose removal partitionsG into two subgraphs, each containing at most 2N/3 vertices. They also present a linear-timealgorithm to compute such a separator. In [20], it is shown that every graph of genus g has a23 -separator of size O

(√gN

)

and that such a separator can be computed in linear time. In [2], a

2

Page 3: I/O-Efficient Algorithms for Planar Graphs I: Separatorspeople.scs.carleton.ca/~maheshwa/papers/separators.pdf · 2009. 10. 14. · I/O-efficient graph algorithms have received considerable

linear-time algorithm for computing a t-separator of size O(√

(g + 1/t)N)

for an embedded graphof genus g is given; for 0 < t < 1, a t-separator is a vertex set whose removal partitions G intosubgraphs of size at most tN . Other results deal with the problems of computing small simple-cycleseparators of planar graphs [29], edge separators of planar graphs [15], separators of planar graphswith negative or multiple vertex weights [17], and separators of low cost [3, 16].

In [24], the first I/O-efficient algorithm for computing planar separators is presented. Thisalgorithm, which is an external version of Lipton and Tarjan’s algorithm, computes a 2

3 -separator

of size O(√

N)

and takes O(sort(N)) I/Os, provided that a planar embedding and a BFS-tree ofthe graph are given. In [5], an external version of Goodrich’s multi-way separator algorithm [21] hasbeen developed. This algorithm computes a t-separator of size O

(

(N/B) logM/B(N/B) +√

N/t)

and takes O(sort(N)) I/Os, again assuming that an embedding and a BFS-tree are given.A number of subsequent papers develop a hierarchy of reductions that lead to O(sort(N))-

I/O algorithms for a variety of fundamental problems on embedded planar graphs, if an optimalseparator decomposition can be obtained in O(sort(N)) I/Os: In [5, 8], separator-based ideasfirst pioneered in [19] are used to obtain I/O-efficient shortest-path algorithms for undirected anddirected planar graphs. These algorithms can of course also be used to compute BFS-trees of planargraphs. In [6], a DFS-algorithm for undirected planar graphs is presented, which uses BFS in thedual and, hence, also depends on planar separators. The directed DFS-algorithm of [9] needs tocompute directed spanning trees of the graph; currently the only I/O-efficient algorithm for thisproblem is the shortest-path algorithm of [8]. Other I/O-efficient algorithms for planar graphsthat rely on separators are the strong connectivity algorithm of [9] and the algorithms of [7, 8] fortopologically sorting planar directed acyclic graphs.

While the shortest-path algorithms of [5, 8] perform onlyO(sort(N)) I/Os, they takeO(N log N+NB) computation time in internal memory. To highlight the I/O-complexity as well as theinternal-memory computation time of an algorithm, we say that an algorithm has I/O-complexityO(sort(N)) if it performs O(sort(N)) I/Os and O(N log N) computation steps; if it performsO(sort(N)) I/Os and its computation time is within a constant factor of the computation timeof the best shortest-path algorithm for planar graphs that performs O(sort(N)) I/Os, given anappropriate separator decomposition of the graph, we say that the algorithm has I/O-complexityO(sssp(N)).

1.2 New Results

The main result of our paper is an algorithm that, given a planar graph G with N vertices and aninteger r > 0, computes a vertex separator S of size O (N/

√r) and whose removal partitions G into

O(N/r) subgraphs of size at most r and boundary size O (√

r). The algorithm takes O(sort(N))I/Os, provided that the internal memory has size at least 56r log2 B.

The most interesting value of r is B2, because this is the granularity of the partition required forall separator-based I/O-efficient algorithms for planar graphs that have been developed so far. Atthe end of the paper, we show how to use a bootstrapping approach based on our second algorithm,discussed next, in order to reduce the memory requirements from Ω(B2 log2 B) to Ω(B2) in this case.This, however, comes at the expense of increasing the complexity of the algorithm to O(sssp(N)).

Thanks to our algorithm, a wide variety of problems, as discussed in the previous section, canbe solved in O(sssp(N)) I/Os if M = Ω(B2). In particular, a shortest-path tree of a planar graphcan be obtained in this complexity. Using this fact, we show the following I/O-efficient versions ofresults from [3]:

3

Page 4: I/O-Efficient Algorithms for Planar Graphs I: Separatorspeople.scs.carleton.ca/~maheshwa/papers/separators.pdf · 2009. 10. 14. · I/O-efficient graph algorithms have received considerable

Let G = (V,E) be a planar graph with N vertices, let w : V → R+0 and c : V → R

+0 be

assignments of non-negative weights and costs to the vertices of G, and let 0 < t < 1 be anarbitrary constant. Let w(G) =

x∈V w(v), and let C(G) =∑

x∈V (c(x))2. If the size of theinternal memory is Ω(B2), it takes O(sssp(N)) I/Os to compute a vertex separator S of costc(S) ≤ 4

2 · C(G)/t such that no connected component of G− S has weight exceeding tw(G). Ifall vertices have weight and cost equal to 1, and by choosing t = r/N , we obtain a separator of sizeO(N/

√r) that partitions the graph into pieces of size at most r. This matches the result produced

by our first algorithm, but without requiring that M ≥ 56r log2 B. Another consequence is thefollowing edge separator result:

Let G = (V,E) be a planar graph with N vertices, let w : V → R+0 be an assignment of

non-negative weights to the vertices of G, and let 0 < t < 1 be an arbitrary constant. Letw(G) =

x∈V w(x). If w(x) ≤ tw(G) for every vertex x ∈ V , there exists an edge separator

S ⊆ E of size |S| ≤ 4√

2(∑

x∈V (deg(x))2)

/t such that no connected component of G − S has

weight exceeding tw(G). Such a separator can be computed in O(sssp(N)) I/Os, provided thatM = Ω(B2).

The presentation of these results is organized as follows: In Section 2, we introduce the necessaryterminology and notation and discuss some technical results that will be useful in our algorithms.In Section 3, we discuss a graph contraction procedures that will be used many times in ouralgorithms. Our algorithm for partitioning an unweighted planar graph is presented in Section 4.The partition produced by the algorithm will not have all the properties required by the shortest-path algorithm of [5] or any of the other separator-based I/O-efficient algorithms for planar graphs[7, 8, 9]. In Section 5, we explain how to ensure the required additional properties. In Section 6,we discuss our I/O-efficient algorithm for computing separators of planar graphs with costs andweights. In Section 7, we explain how to combine the algorithms from Sections 4 and 6 to reducethe memory requirements of our unweighted separator algorithm. We conclude with a discussionof open problems in Section 8.

2 Preliminaries

2.1 Graphs and Planarity

We assume that the reader is familiar with standard graph-theoretic terms and notation as defined,for example, in [22, 31]. In this paper, all graphs are simple, that is, do not contain parallel edges orloops, even though the results are easy to generalize to multigraphs. For a set W ⊆ V of vertices,we use G[W ] to denote the subgraph of G with vertex set W and whose edge set consists of alledges in G that have both endpoints in W ; we call G[W ] the subgraph of G induced by vertex setW . For a set of vertices W ⊆ V , let G−W = G[V \W ]. For a vertex x ∈ V , let G− x = G−x.For a set of edges F ⊆ E, let G− F = (V,E − F ).

For a vertex x ∈ G, the (open) neighbourhood N (x) of x is the set of vertices adjacent to x, thatis, N (x) = y ∈ V (G) : xy ∈ E \ x; the closed neighbourhood of x is N [x] = x ∪ N (x). Wegeneralize this to vertex sets and subgraphs by defining N [V ′] =

x∈V N [x], N (V ′) = N [V ′] \ V ′,N [G′] = G[N [V ′]], and N (G′) = G[N (V ′)], where G′ = (V ′, E′). We often call N (G′) the boundaryof G′. The degree deg(x) of a vertex x is the number of edges incident to x. If G is simple, we havedeg(x) = |N (x)|.

A graph G is planar if it can be drawn in the plane so that the edges of G do not intersect, except

4

Page 5: I/O-Efficient Algorithms for Planar Graphs I: Separatorspeople.scs.carleton.ca/~maheshwa/papers/separators.pdf · 2009. 10. 14. · I/O-efficient graph algorithms have received considerable

at their endpoints. Such a drawing of G is called a topological embedding of G. We denote it byE(G). Every topological embedding of G defines an order of the edges incident to each vertex x ∈ G,clockwise around x. A representation of these orders for all vertices x ∈ G is called a combinatorialembedding of G, which we denote by G. Given a topological embedding E(G) consistent with acombinatorial embedding G of G, we call the connected regions of R

2 \ E(G) the faces of G. Thesize of a face of G is the number of edges on its boundary. Let F denote the set of faces of G. ByEuler’s formula, |V | + |F | − |E| = 2. In particular, |E| ≤ 3|V | − 6. We define the size |G| of aplanar graph G = (V,E) to be the number of vertices in G.

For an embedded planar graph G = (V,E) and an edge e ∈ E, the dual e∗ of e is the edge f1f2,where f1 and f2 are the two faces of G that have edge e on their boundary. The dual of G, then,is the multigraph G∗ = (F,E∗), where E∗ = e∗ : e ∈ E.

A partition of a set S is a collection S = S1, . . . , Sk of subsets of S so that every element ofS belongs to exactly one set Si, that is, Si ∩ Sj = ∅, for i 6= j, and

⋃ki=1 Si = S.

Given a graph G = (V,E) and a partition V = V1, . . . , Vk of the vertex set of G, the contractionof V in G is the graph G/V = (V, E′), where E′ = ViVj : ∃xy ∈ E s.t. x ∈ Vi and y ∈ Vj. If thevertices of G have weights, we define w(Vi) =

x∈Viw(x), for all 1 ≤ i ≤ k. If the graph G[Vi] is

connected, for all 1 ≤ i ≤ k, we call G/V an edge contraction. If there exist vertex sets X1, . . . ,Xk

such that, for all 1 ≤ i ≤ k and x ∈ Vi, N (x) \ Vi = Xi, that is, if all vertices in Vi have the sameneighbours in V (G) \ Vi, we call G/V a vertex bundling. We will use the following facts.

Fact 2.1 If G is planar, then any edge contraction or vertex bundling of G is planar.

Fact 2.2 Let S ⊆ V, let S =⋃

Vi∈SVi, let Vi, Vj 6∈ S, and let x ∈ Vi and y ∈ Vj. If Vi and Vj

belong to different connected components of (G/V)− S, then x and y belong to different connectedcomponents of G− S.

2.2 Graph Separators

Given an assignment w : V → R+0 of weights to the vertices of a graph G = (V,E) and a constant

0 < t < 1, we call a set S ⊆ V of vertices a t-vertex separator of G if no connected component ofG − S has weight greater than tw(G), where w(G) =

x∈V w(x) is the weight of G. Similarly, at-edge separator of G is a set S ⊆ E of edges so that no connected component of the graph G− Shas weight exceeding tw(G). Since we are interested mainly in vertex separators in this paper,we refer to them simply as separators. If G is unweighted, we assume that every vertex of G hasweight one.

In our separator algorithm for unweighted graphs, we will apply the following result to a com-pressed version of the graph we want to partition, in order to obtain a first separator that is thenrefined during a sequence of refinement steps.

Theorem 2.1 (Aleksandrov and Djidjev [2]) Given a planar graph G of size N , an assign-ment w : V → R

+0 of weights to the vertices of G, and a constant 0 < t < 1, a t-vertex separator of

size at most 4√

N/t for G can be computed in linear time.

By grouping the connected components of G − S, where G is an unweighted graph and S is at-separator of G, we obtain a tN -partition of G. Precisely, let r > 0 be an integer, let t = r/N ,and let S be a t-separator of G. Then an r-partition of G is a pair P = (S, G1, . . . , Gq) with thefollowing properties:

5

Page 6: I/O-Efficient Algorithms for Planar Graphs I: Separatorspeople.scs.carleton.ca/~maheshwa/papers/separators.pdf · 2009. 10. 14. · I/O-efficient graph algorithms have received considerable

Figure 2.1. A regular partition. The solid regions are connected. Each of the hatched regions is disconnected,but shares its boundary with at most two solid regions and no hatched region.

(i) V (G1), . . . , V (Gq) is a partition of V (G) \ S,

(ii) N (V (Gi)) ⊆ S, for all 1 ≤ i ≤ q, and

(iii) |Gi| ≤ r, for all 1 ≤ i ≤ q.

The second condition captures that every subgraph Gi is a collection of connected components ofG− S, that is, no connected component of G− S has vertices in two such subgraphs.

If G is a planar graph, we call an r-partition P = (S, G1, . . . , Gq) normal if |S| = O(N/√

r),q = O(N/r), and

∑qi=1 |N (Gi)| = O (N/

√r). A normal r-partition P = (S, G1, . . . , Gq) is c-

proper, for some constant c > 0, if |N (Gi)| ≤ c√

r, for all 1 ≤ i ≤ q. If we do not want to specifyc, we say that P is proper. A proper r-partition is stronger than a normal r-partition because anormal r-partition may contain subgraphs with a large boundary, as long as other subgraphs havesmaller boundaries; in a proper r-partition, on the other hand, every individual subgraph has tohave a small boundary. Finally, we call an r-partition P = (S, G1, . . . , Gq) regular if, for all1 ≤ i ≤ q, one of the following conditions holds:

(i) Graph N [Gi] is connected, or

(ii) There are at most two indices 1 ≤ j < k ≤ q, i 6∈ j, k, such that N (V (Gi))∩N (V (Gj)) 6= ∅and N (V (Gi)) ∩ N (V (Gk)) 6= ∅. In this case, N [Gj ] and N [Gk] are connected.

This concept is visualized in Figure 2.1, which is reproduced from Frederickson [19], who showsthat every planar graph has a proper r-partition and every planar graph of bounded degree has aregular proper r-partition. The following result states that a proper r-partition of a planar graphcan be obtained efficiently:

Theorem 2.2 (Frederickson [19]) Given a planar graph G of size N and a normal r-partitionP = (S, G1, . . . , Gp) of G, a proper r-partition P ′ = (S′, G′

1, . . . , G′q) of G such that S ⊆ S′

can be computed in O(N log N) time.

Frederickson also shows how to obtain a normal r-partition of a planar graph G in O(N log N)time, which, together with Theorem 2.2, implies that a proper r-partition of G can be computedin O(N log N) time. To prove Theorem 2.2, Frederickson considers each graph Gi in turn and

6

Page 7: I/O-Efficient Algorithms for Planar Graphs I: Separatorspeople.scs.carleton.ca/~maheshwa/papers/separators.pdf · 2009. 10. 14. · I/O-efficient graph algorithms have received considerable

partitions it into subgraphs of boundary size O(√

r). When partitioning Gi, the algorithm requiresknowledge only of N [Gi]. Thus, if |N [Gi]| ≤M , for all 1 ≤ i ≤ p, we can implement Frederickson’sprocedure by loading each graph N [Gi] into internal memory and partitioning Gi without incurringany further I/Os. Assuming that each graph N [Gi] is stored in consecutive memory locations, wethus have

Corollary 2.1 Given a planar graph G of size N and a normal r-partition P = (S, G1, . . . , Gp)of G, a proper r-partition P ′ = (S′, G′

1, . . . , G′q) of G such that S ⊆ S′ can be computed in

O(N/B) I/Os and O(N log N) time, provided that |N [Gi]| ≤M for all 1 ≤ i ≤ p.

2.3 Bipartite Planar Graphs

A graph G = (V,E) is bipartite if the vertex set V can be partitioned into two sets U and W suchthat x ∈ U and y ∈ W , for every edge xy ∈ E. In this case, we write G = (U,W,E). We use thefollowing two simple results to bound the sizes of certain bipartite graphs in different parts of ouralgorithms.

Lemma 2.1 Let G = (U,W,E) be a simple connected bipartite planar graph such that every vertexin W has degree at least three. Then |W | ≤ 2|U |.

Proof. Consider a planar embedding G of G. Since G is bipartite, every face of G has size at least4. Thus, |F | ≤ |E|/2. By Euler’s formula, |V |+ |F | − |E| = 2, that is,

2 = |V |+ |F | − |E|≤ |V | − |E|/2

|E| ≤ 2|V |.

On the other hand, |E| ≥ 3|W |, so that

3|W | ≤ 2|V |= 2(|U |+ |W |)

|W | ≤ 2|U |.

Corollary 2.2 Let G = (U,W,E) be a simple connected bipartite planar graph such that no twovertices x, y ∈W satisfy N (x) = N (y) and deg(x) = deg(y) ≤ 2. Then |G| ≤ 7|U |.

Proof. We have to prove that |W | ≤ 6|U |. To this end, we divide W into three subsets and boundthe size of each of these sets. Let W1 be the set of degree-1 vertices in W , let W2 be the set ofdegree-2 vertices in W , and let W3 = W \ (W1 ∪W2), that is, every vertex in W3 has degree atleast three.

Since there are no two vertices x, y ∈ W with deg(x) = deg(y) = 1 and N (x) = N (y), W1

contains at most |U | vertices, one per vertex in U ; see Figure 2.2(a).To count the vertices in W3, we consider the bipartite planar graph G3 = (U3,W3, E3) induced

by all edges incident to vertices in W3; see Figure 2.2(b). By Lemma 2.1 and because U3 ⊆ U , wehave |W3| ≤ 2|U3| ≤ 2|U |.

7

Page 8: I/O-Efficient Algorithms for Planar Graphs I: Separatorspeople.scs.carleton.ca/~maheshwa/papers/separators.pdf · 2009. 10. 14. · I/O-efficient graph algorithms have received considerable

(a) (b)

(c) (d)

Figure 2.2. Illustration of the proof of Corollary 2.2. Figure (a) shows a bipartite planar graph G = (U, W, E);the white vertices are in U ; the black ones are in W . The circled vertices are in W1. Figure (b) shows the subgraphG3 of G induced by all edges incident to vertices in W3. Figure (c) shows the subgraph G2 of G induced by alledges incident to vertices in W2. Figure (d) shows the graph H2 obtained from G2 by contracting the highlightededges in Figure (c).

To count the vertices in W2, consider the graph H2 = (U2, E2), where U2 = N (W2) ⊆ U andE2 = xz : there exists a vertex y ∈ W2 with N (y) = x, z; see Figure 2.2(d). Since there areno two vertices x, y ∈W2 with N (x) = N (y), H2 contains exactly one edge per vertex in W2, thatis, |E2| = |W2|. Next we argue that graph H2 is planar, which implies, by Euler’s formula, that|W2| = |E2| ≤ 3|U2| ≤ 3|U |.

To see that H2 is planar, consider the subgraph G2 of G induced by all edges incident to verticesin W2; see Figure 2.2(c). Since G is planar, G2 is planar. H2 can be obtained from G2 by contractingone of the edges incident to each vertex y ∈W2. By Fact 2.1, this implies that H2 is planar.

In summary, we have |W | = |W1| + |W2| + |W3| ≤ |U | + 3|U | + 2|U | = 6|U |, that is, |G| =|U |+ |W | ≤ 7|U |.

2.4 Primitive Operations

Our algorithms will make frequent use of a number of primitive operations. In order to avoiddiscussing their implementation repeatedly, we do so here and then refer to this section wheneverwe make use of such an operation.

8

Page 9: I/O-Efficient Algorithms for Planar Graphs I: Separatorspeople.scs.carleton.ca/~maheshwa/papers/separators.pdf · 2009. 10. 14. · I/O-efficient graph algorithms have received considerable

Set operations. All elementary operations on two sets A and B—union, intersection, difference,etc.—can be computed in O(sort(N)) I/Os if the two sets A and B are represented as unorderedsequences of elements: Sort A and B (assuming that every element is represented by a uniqueinteger ID). Then scan the two sorted lists to produce C = A⊙B, where ⊙ ∈ ∩,∪, \.

Even though not a set operation as such, we want to mention duplicate removal here: Someoperations may produce multi-sets. In order to obtain a proper representation of the set of elementsin such a multi-set, we need to remove duplicates. This can be done in O(sort(N)) I/Os by sortingand scanning the multi-set.

Copying labels. Since pointers are mostly useless in I/O-efficient graph algorithms, graphs areoften represented as an (unsorted) list of vertices, each with a unique vertex ID, and an (unsorted)list of edges, each labelled with the IDs of its two endpoints. Edges do not store any pointers totheir endpoints. Thus, if certain labels are assigned to the vertices of the graph, the edges have noknowledge of the labels of their endpoints. However, it takes O(sort(N)) I/Os to label all edgeswith the labels of their endpoints: Sort the vertices by their IDs. Designate one endpoint of everyedge as being the first endpoint. Then sort the edges by the IDs of their first endpoints. Now scanthe sorted vertex and edge sets to label every edge with the label of its first endpoint. To label theedges with the labels of their second endpoints, sort the edges by the IDs of their second endpoints,and repeat the copying process.

Graph contraction. Given a labelling of the vertices of graph G that represents a partitionV = V1, . . . , Vk of the vertex set of G, that is, that assigns the same label to two vertices if andonly if they belong to the same set Vi ∈ V, the graph G/V can be computed in O(sort(N)) I/Os:First label the edges of G with the labels of their endpoints. Now replace every vertex with its IDand every edge xy with the edge ab, where a is the label of x and b is the label of y. Finally, removeduplicates from the resulting vertex and edge sets.

In this paper, we choose the label of a set Vi ∈ V to be the ID of a representative x ∈ Vi. We willthen often refer to Vi as the vertex x, taking the point of view that x has survived the contractionand all other vertices in Vi have been contracted into x.

Connected components. Chiang et al. [14] proved that it takes O(sort(N)) I/Os andO(N log N)time to compute the connected components of a planar N -vertex graph G, that is, to compute alabelling of the vertices of G such that two vertices have the same label if and only if they areconnected.

3 Uniform Graph Contraction

In this section, we discuss a general compression procedure for planar graphs that will be usedrepeatedly in our algorithms. In general, graph compression is achieved in I/O-efficient algorithmsby repeatedly contracting edges until some goal is reached (usually a sufficient reduction of thesize of the graph). Since it would be inefficient to contract edges one at a time, edges need to becontracted simultaneously. More precisely, one computes an edge contraction G/V of G such that|V| ≤ c|V |, for some c < 1, that is, G/V has only a constant fraction of the vertices of G. Thealgorithms of [5, 14, 30] for computing connected components and minimum spanning trees arebased on exactly this idea. However, the partition V used in these algorithms is non-uniform in

9

Page 10: I/O-Efficient Algorithms for Planar Graphs I: Separatorspeople.scs.carleton.ca/~maheshwa/papers/separators.pdf · 2009. 10. 14. · I/O-efficient graph algorithms have received considerable

the sense that some sets Vi ∈ V may be large, while others may be small; that is, some verticesin G/V represent many vertices in G and others represent only few. As we will see, our separatoralgorithm for unweighted graphs will rely heavily on the compression being uniform, that is, onevery set Vi ∈ V having constant size. In order to achieve uniformity, while still guaranteeing that|V| ≤ c|V |, for some c < 1, we apply two contractions: an edge contraction, followed by a vertexbundling.

In Section 3.1, we give a high-level description of our uniform contraction procedure and provea general bound on the size of the compressed graph it produces. In Section 3.2, we show how toimplement this procedure in O(sort(N)) I/Os on an N -vertex planar graph.

3.1 The High-Level Procedure

Our graph contraction procedure takes as input a weighted planar graph G and a set of weightthresholds u1, . . . , uk. More precisely, every vertex x has multiple weights w1(x), . . . , wk(x), andevery vertex x in G satisfies wh(x) ≤ uh, for all 1 ≤ h ≤ k. Our contraction procedure will ensurethat the same is true for every vertex in the graph it produces from G. Every vertex that satisfiesthese weight contraints is said to be within bounds. A vertex x that is within bounds is light ifwh(x) ≤ uh/2, for all 1 ≤ h ≤ k, and heavy otherwise.

Intuitively, we will use these weight thresholds to ensure that no vertex in the final compressedgraph represents more than a constant number of vertices in G, and that the compressed graphsatisfies other properties. By choosing the thresholds large enough, we reduce the number of heavyvertices, which, together with Lemma 3.1 below, gives us a bound on the size of the compressedgraph.

The contraction procedure consists of two phases: The edge contraction phase computes anedge contraction G1 = G/V1 of G such that all vertices of G1 are within bounds and every edge ofG1 has at least one heavy endpoint. The bundling phase computes a vertex bundling G2 = G1/V2

of G1 such that all vertices of G2 are within bounds and there are no two light vertices x, y ∈ G2

such that N (x) = N (y) and deg(x) = deg(y) ≤ 2. Graph G2 is the final graph we return.When we later apply this procedure, we will be able to establish a bound on the number of

heavy vertices in G2. Together with the following lemma, this gives a bound on the size of thisgraph.

Lemma 3.1 If G is planar, then G2 is planar. All vertices in G2 are within bounds. If h is thenumber of heavy vertices in G2, then |G2| ≤ 7h.

Proof. The above explanation of the two phases of the procedure states explicitly that all verticesin G2 are within bounds. Graph G1 is an edge contraction of G, and G2 is a vertex bundling ofG1. Thus, if G is planar, Fact 2.1 implies that G1 is planar and, thus, that G2 is planar.

To bound the size of G2, we consider the subgraph G′ of G2 induced by all edges incident tolight vertices and prove that G′ satisfies the conditions of Corollary 2.2 with U being the set ofheavy vertices in G′ and W being the set of light vertices in G′. Thus, |G′| = |U | + |W | ≤ 7|U |.Since all light vertices of G belong to W and all vertices in U are heavy, this implies that |G| =h + |W | ≤ h + 6|U | ≤ 7h.

To prove that G′ is bipartite with U being the heavy vertices in G′ and W being the lightvertices in G′, observe that every edge in G′ has at least one light endpoint. So there are no twoadjacent heavy vertices. Now assume for the sake of contradiction that there are two light vertices

10

Page 11: I/O-Efficient Algorithms for Planar Graphs I: Separatorspeople.scs.carleton.ca/~maheshwa/papers/separators.pdf · 2009. 10. 14. · I/O-efficient graph algorithms have received considerable

V1 and V2 in G2 that are adjacent. This implies that there exist two adjacent vertices x, y ∈ G1 suchthat x ∈ V1 and y ∈ V2. Moreover, since wh(x) ≤ wh(V1) and wh(y) ≤ wh(V2), for all 1 ≤ h ≤ k,both x and y are light. This is a contradiction because G1 contains no two adjacent light vertices.

By the definition of G2, there are no two light vertices in G′ that have degree at most two andhave the same neighbours. Hence, G′ satisfies the conditions of Corollary 2.2.

3.2 I/O-Efficient Implementation

In this section, we discuss how to implement the two phases of the contraction procedure inO(sort(N)) I/Os.

3.2.1 Edge Contraction Phase

To implement the edge contraction phase, we compute a set F of edges and define V1 to be thepartition of V corresponding to the connected components of (V, F ). We will often use VF to denotethis partition. The set F will have the property that the graph (V, F ) is a forest, which makes thecomputation of connected components and, thus, the computation of the partition V1 easy [14].

The set F will not necessarily be a subset of E. However, whenever we add an edge xy to F ,we ensure that the two sets V1 and V2 in VF such that x ∈ V1 and y ∈ V2 contain two verticesx′ ∈ V1 and y′ ∈ V2 such that x′y′ is an edge of G. Hence, if G[V1] and G[V2] are connected, so isG[V1 ∪ V2], that is, as we augment F , we maintain that G/VF is an edge contraction of G.

We compute the edge set F iteratively. Each iteration computes a set F ′ of edges such thatG/VF∪F ′ is an edge contraction and each of its vertices is within bounds. The edges in F ′ are thenadded to F . This iterative process stops as soon as every edge in G/VF has at least one heavyendpoint, at which point we define G1 = G/VF .

To efficiently compute the set F ′, each iteration consists of three steps: The first step extractsthe contractible subgraph H of G/VF , where an edge of G/VF is contractible if both its endpoints arelight and H is the subgraph of G/VF induced by all contractible edges. The second step computesa matching F ′

1 of H and contracts the edges in F ′1, that is, computes the graph H1 = H/VF ′

1. We

call a vertex in H1 matched if it represents two vertices in H, that is, is the result of contractingan edge in F ′

1; otherwise the vertex is unmatched. Note that all neighbours of an unmatched vertexare matched because F ′

1 is maximal. The third step adds edges between matched and unmatchedvertices to a set F ′

2 so that every non-singleton set in VF ′2

contains exactly one matched vertex.During this third step, we maintain the invariant that the matched vertex in such a set stores theweights of the whole set. To determine which edges to add to F ′

2, each unmatched vertex x isinspected in turn. If there is a matched neighbour y of x that is light (that is, the whole set in VF ′

2

containing y is light), we add the edge xy to F ′2. To indicate that x is now a member of the set in

VF ′2

containing y, the weights of y are increased by the corresponding weights of x. After this thirdstep, we define F ′ = F ′

1 ∪ F ′2 and add the edges in F ′ to F . This finishes the iteration.

Given the definition of graph H, the graph G/VF contains two adjacent light vertices if andonly if H is non-empty. Thus, in order to decide whether another iteration is required, we can testwhether H is empty. Also, if H is the contractible subgraph of G/VF and H ′ is the contractiblesubgraph of G/VF∪F ′ , it is easy to see that H ′ is in fact a subgraph of H/VF ′ ; that is, to computethe contractible subgraph used in the next iteration, H ′, it suffices to compute H/VF ′ and extractits contractible subgraph. Moreover, we have H/VF ′ = H1/VF2

. So it suffices to compute thelatter. Thus, at no time do we have to work with the whole graph G; it suffices to work with the

11

Page 12: I/O-Efficient Algorithms for Planar Graphs I: Separatorspeople.scs.carleton.ca/~maheshwa/papers/separators.pdf · 2009. 10. 14. · I/O-efficient graph algorithms have received considerable

Procedure ContractEdges

Input: A weighted graph G = (V,E) and a set of weight thresholds based on which every vertexin G is classified as light or heavy.

Output: An edge contraction G1 = G/VF of G.

1: H ← G2: F ← ∅3: while H is not empty do4: Step 1: Extract the contractible subgraph

H ← the contractible subgraph of H

5: Step 2: Contract a matching

Compute a maximal matching F ′

1 of HH1 ← H/VF ′

1

6: Step 3: Contract edges incident to unmatched vertices

F ′

2 ← ∅for every unmatched vertex x ∈ H1 do

if x has a light neighbour y (which is matched) thenAdd edge xy to F ′

2 and increase the weights of y by the corresponding weights of x.end if

end forF ← F ∪ F ′

1 ∪ F ′

2

H ← H1/VF ′

2

7: end while8: G1 ← G/VF

Algorithm 3.1. The edge contraction phase.

contractible subgraph H of G/VF . We will prove below that the size of H decreases by a factor ofat least two in each iteration. This will lead to a geometrically decreasing cost of the iterations ofthe loop and is the key to the I/O-efficiency of the algorithm. Algorithm 3.1 shows the pseudo-codeof our procedure.

Before providing the implementation details and analyzing the I/O-complexity of the procedure,we show that it correctly implements the edge contraction phase of our uniform graph contractionprocedure.

Lemma 3.2 Let G1 be the graph produced by procedure ContractEdges. Then G1 is an edgecontraction of G, every vertex of G1 is within bounds, and every edge of G1 has at least one heavyendpoint.

Proof. We prove by induction on the number of iterations that the graph G/VF is an edge con-traction of G all of whose vertices are within bounds. Since we exit with G1 = G/VF only whenevery edge in G/VF has a heavy endpoint, this proves the lemma.

The claim is true before the first iteration because F = ∅, that is, G/VF = G, and all vertices ofG are within bounds. So assume that the claim is true before the current iteration. Then every setin VF induces a connected subgraph. Every edge xy ∈ F ′

1 is an edge of H ⊆ G/VF . Hence, there

12

Page 13: I/O-Efficient Algorithms for Planar Graphs I: Separatorspeople.scs.carleton.ca/~maheshwa/papers/separators.pdf · 2009. 10. 14. · I/O-efficient graph algorithms have received considerable

exists an edge x′y′ ∈ E and two sets V1, V2 ∈ VF such that x, x′ ∈ V1 and y, y′ ∈ V2. By addingedge xy to F ′

1, the sets V1 and V2 are merged into the set V1 ∪V2 in VF∪F ′1. Since, by the induction

hypothesis, the graphs G[V1] and G[V2] are connected, so is the graph G[V1 ∪ V2] because x′y′ ∈ E;that is, G/VF∪F ′

1is an edge contraction. Every vertex in G/VF∪F ′

1is within bounds because each

of its vertices represents at most two vertices in G/VF and, if it represents two vertices, they mustbelong to the contractible subgraph, that is, must be light.

Since H1 ⊆ G/VF∪F ′1, and we add only edges of H1 to F ′

2, we can argue as in the previousparagraph that every set in VF∪F ′

1∪F ′

2induces a connected subgraph of G. Hence, G/VF∪F ′

1∪F ′

2is

an edge contraction. Before the third step, every vertex in H1 stores the total weights of all thevertices in G it respesents. Since F ′

2 = ∅ before the first step, every set in VF ′2

is a singleton, andwe can view every matched vertex in H1 as storing the total weight of all vertices in the set inVF ′

2containing it. We maintain this invariant throughout the third phase. Before adding an edge

xy to F ′2 in the third step, where x is unmatched and y is matched, we test whether y is light,

that is, whether the set in VF ′2

containing y is light, and we add edge xy to F ′2 only if this is the

case. Therefore, the set in VF ′2

containing vertex y, and thus the corresponding vertex in H1/VF ′2,

remains within bounds after the addition of edge xy. Since no edge added to F ′2 produces a set in

VF ′2

that is out of bounds, all vertices in H1/VF ′2

are within bounds at the end of the loop.

Procedure ContractEdges is fairly easy to implement in O(sort(N)) I/Os. To prove this, weshow how to implement every iteration of the while-loop in Lines 3–7 in O(sort(|H|)) I/Os, that|H| decreases by a factor of at least two from one iteration to the next, and that the rest of thealgorithm takes O(sort(N)) I/Os. We start by analyzing the I/O-complexity of one iteration of thewhile-loop.

Extracting the contractible subgraph. The contractible subgraph of H can be extracted inO(sort(|H|)) I/Os: First we label all edges with the weights of their endpoints, and then we scanthe edge set to discard all edges with at least one heavy endpoint. The result is the edge list of thecontractible subgraph. Now we scan this edge list and create a list of their endpoints. To producethe vertex list of H, we remove duplicates from the resulting list. As discussed in Section 2.4, allsteps of this construction take O(sort(|H|)) I/Os.

Computing and contracting a matching. Zeh [33] presents an algorithm that computes amaximal matching of a graph G = (V,E) in O(sort(N)) I/Os, where N = |V | + |E|. Since His planar, we have N = O(|H|) when applying this procedure to H. Hence, the matching canbe computed in O(sort(|H|)) I/Os. Once the matching is given, its edges can be contracted inO(sort(|H|)) I/Os, using the contraction procedure from Section 2.4.

Contracting edges between matched and unmatched vertices. To contract edges betweenmatched and unmatched vertices, that is, to implement Step 3 of the iteration, we start by extractingall edges in H1 that are incident to unmatched vertices. For the resulting bipartite graph H ′, wecompute the following information: Let Vm be the set of matched vertices, and let Vu be the setof unmatched vertices in H ′. We number the vertices in Vm as y1, . . . , yr and the vertices in Vu

as x1, . . . , xs, in an arbitrary order. We sort the edges in H ′ by their unmatched endpoints asprimary keys and by their matched endpoints as secondary keys, and store for every edge xiyj

the unmatched endpoint xi′ of the next edge incident to yj; that is, if yj is adjacent to vertices

13

Page 14: I/O-Efficient Algorithms for Planar Graphs I: Separatorspeople.scs.carleton.ca/~maheshwa/papers/separators.pdf · 2009. 10. 14. · I/O-efficient graph algorithms have received considerable

xi1 , . . . , xit with i1 < · · · < it, then, for 1 ≤ h < t, edge xihyj stores the ID of vertex xih+1. Edge

xityj stores nil to indicate that it is the last edge incident to yj.This information can easily be computed in O(sort(|H ′|)) I/Os: We sort the edges by their

matched endpoints as primary key and by their unmatched endpoints as secondary key. Then wescan the sorted edge list to compute for every edge xiyj the endpoint of the next edge incident toyj. (If the next edge in the sorted sequence is xi′yj, then this endpoint is xi′ . If the next edge isxi′yj′ with j′ 6= j, then edge xiyj stores nil.) Now we sort the edges by their unmatched endpointsas primary key and by their matched endpoints as secondary key.

Given that graph H ′ has been prepared in this manner, we contract edges as follows: We scanthe sorted edge list, that is, we inspect the unmatched vertices in sorted order and scan theiradjacency lists. For every vertex xi, as soon as we find an edge xiyj, where yj is light, we contractxi into yj, that is, we increase each weight wh(yj) of vertex yj by the corresponding weight wh(xi)of xi and add the edge xiyj to F ′

2. The remaining edges in xi’s adjacency list are then ignored.In order to implement this procedure correctly, we have to have a mechanism to inform subse-

quent edges incident to a vertex yj about the change of its weights resulting from the contractionof vertex xi into yj. We use a priority queue Q to do this. In particular, we initialize Q to containthe weights of vertices y1, . . . , yr, where the priority of yj is equal to the ID of the first edge xiyj

incident to yj. For every edge xiyj inspected during the scan, we perform a Delete-Min operationon Q to retrieve the current weights of yj. If edge xiyj is contracted, the weights of yj are up-dated. Otherwise, they remain unchanged. Then, if edge xiyj stores a vertex xi′ 6= nil as the nextunmatched vertex incident to yj , we insert the updated weights of yj into Q, now with priorityxi′yj.

The whole procedure requires one scan of the sorted edge list of H ′ and two priority queueoperations per edge, once the edges of H ′ are stored in the right order and store the appropriatesuccessor pointers as defined above. Using a buffer tree [4], to implement the priority queue, everypriority queue operation takes O((1/B) logM/B(r/B)) = O((1/B) logM/B(|H ′|/B)) I/Os amortized.Thus, the contraction of edges between matched and unmatched vertices takes O(sort(|H ′|)) =O(sort(|H|)) I/Os.

Total cost of the loop. The previous three paragraphs establish that each iteration of the while-loop takes O(sort(|H|)) I/Os. Also observe that |H| ≤ N before the first iteration. To prove thatthe cost of the whole loop is O(sort(N)) I/Os, it is therefore sufficient to show that |H| decreasesby a factor of at least two from one iteration to the next.

Lemma 3.3 The loop in Lines 3–7 of procedure ContractEdges takes O(sort(N)) I/Os.

Proof. Let H(1), . . . ,H(k) be snapshots of H after Step 1 of the different iterations, and let H(0) = Gbe a snapshot of H at the beginning of the first iteration. Then the total cost of Step 1 over alliterations is O(sort(|H(0)|) +

∑ki=1 sort(|H(i)|)) I/Os. The cost of Steps 2 and 3 over all iterations

is O(∑k

i=1 sort(|H(i)|)) I/Os. Next we prove that, for 1 ≤ i < k, |H(i+1)| ≤ |H(i)|/2. Hence,∑k

i=1 |H(i)| ≤ 2|H(1)| ≤ 2N , and the total cost of the loop is O(sort(N)) I/Os.So consider a particular graph H(i), where 1 ≤ i < k. After Step 2 of the i’th iteration, there are

at most |H(i)|/2 matched vertices in H1 because each of them represents two vertices in H(i). Tobound the number of vertices in H(i+1) by |H(i)|/2, we argue that every vertex in H(i+1) representsa set V ′ in VF ′

2that contains a matched vertex.

14

Page 15: I/O-Efficient Algorithms for Planar Graphs I: Separatorspeople.scs.carleton.ca/~maheshwa/papers/separators.pdf · 2009. 10. 14. · I/O-efficient graph algorithms have received considerable

To see that this is true, observe that we inspect every unmatched vertex x in H1 to see whetherit has a matched neighbour y that is light. If so, we add the edge xy to F ′

2, thereby adding xto the set in VF ′

2that contains y. If not, vertex x remains in a singleton set in VF ′

2. However,

the corresponding vertex in H1/VF ′2

has only heavy neighbours, that is, does not belong to the

contractible subgraph of H1/VF ′2, which is H(i+1).

I/O-complexity of the edge contraction phase. To complete the analysis, we have to considerthe cost of Lines 1, 2, and 8 of the algorithm. However, Lines 1 and 2 are easy to implement inO(N/B) I/Os and linear time. Line 8 requires computing the connected components of the graphGF = (V, F ). This can be done in O(sort(N)) I/Os (see Section 2.4). The connected componentsalgorithm identifies components by labelling every vertex in a connected component of GF with arepresentative. As argued in Section 2.4, the graph G/VF can then be computed in O(sort(N))I/Os. Together with Lemma 3.3, this proves

Lemma 3.4 The edge contraction phase of the uniform graph contraction procedure takes O(sort(N))I/Os.

3.2.2 Bundling Phase

The bundling phase assumes that no two light vertices in the input graph G1 are adjacent. ByLemma 3.2, this is true for the graph produced by the edge contraction phase. We first extractall light vertices of degree at most two and represent each such vertex x as a triple (x, y1,nil)or (x, y1, y2), depending on whether it has one or two (heavy) neighbours. We sort these triplesby their last two components, thereby storing all vertices with the same neighbours consecutively.Then we scan this sorted list, that is, we scan each group C of vertices with the same neighbours.For each such group, we form subgroups, starting with the first vertex in C. For every group weform, we record its total weights W1, . . . ,Wk, which are the sums of the respective weights of thevertices in the group. For every inspected vertex x, we add it to the current group if Wh ≤ uh/2,for all 1 ≤ h ≤ k. Otherwise, vertex x starts a new group. Groups are represented by labellingevery vertex in a group with the ID of the first vertex in the group. The final grouping representsthe partition V2 of V (G1), and we compute the graph G2 = G1/V2 using the graph contractionprocedure from Section 2.4.

Lemma 3.5 Given an N -vertex planar graph G1 that has no two adjacent light vertices and all ofwhose vertices are within bounds, the bundling phase takes O(sort(N)) I/Os and produces a vertexbundling G2 = G1/V2 of G1 that contains no two light vertices x and y with N (x) = N (y) anddeg(x) = deg(y) ≤ 2. All vertices in G2 are within bounds.

Proof. The I/O-bound of the procedure is obvious because we sort and scan the vertex and edgesets of G1 a constant number of times and then apply the contraction procedure from Section 2.4.It is also obvious that G1/V2 is an edge bundling because we add two vertices to the same set inV2 only if they have the same neighbours.

Next assume that G2 contains two light vertices x and y such that N (x) = N (y) and deg(x) =deg(y) ≤ 2. Then x and y are the representatives of two sets V1 and V2 in V2 that are subsets ofthe set C of all vertices with neighbourhood N (x), and both sets are light. Assume w.l.o.g. thatV1 is formed before V2, and let z be the first vertex in C that is not in V1. Then z is not added to

15

Page 16: I/O-Efficient Algorithms for Planar Graphs I: Separatorspeople.scs.carleton.ca/~maheshwa/papers/separators.pdf · 2009. 10. 14. · I/O-efficient graph algorithms have received considerable

V1 because there exists an index h such that wh(V1) > uh/2. This is a contradiction because weassumed that V1 was light.

Finally assume that G2 contains a vertex x that is out of bounds. Since all vertices of G1 arewithin bounds, x must represent some set V1 formed by merging vertices that belong to a set Cof light vertices with the same neighbours. Let y be the last vertex in C that is added to V1.Since y is light, the set V1—and thus x—is within bounds unless there exists an index h such thatwh(V1) > uh/2 before adding y to V1. But in this case y would not have been added to V1, acontradiction.

From Lemmas 3.2, 3.4, and 3.5, we have

Lemma 3.6 The uniform graph contraction procedure takes O(sort(N)) I/Os.

4 An Algorithm for Partitioning Unweighted Graphs

In this section, we present our main result: an I/O-efficient algorithm for computing a properr-partition of an unweighted planar graph G. In particular, we prove the following result:

Theorem 4.1 Given a planar graph G and an integer r > 0, a proper r-partition of G can becomputed in O(sort(N)) I/Os, provided that M ≥ 56r log2 B.

Our algorithm (Algorithm 4.1) consists of three steps. The first two steps produce a separatorS0 of size O(N/

√r) that defines an (r log2 B)-partition of G. To do so, the first step repeatedly

applies the uniform contraction procedure from Section 3 to compute a hierarchy of smaller andsmaller graphs. The second step then uses this hierarchy to compute the desired separator. Thethird step partitions each connected component of G − S0 into subgraphs of size at most r andboundary size O(

√r), adds the separator vertices this introduces to S0, and groups subgraphs in

the partition to reduce their number to O(N/r).Step 3 is easy to implement I/O-efficiently because, given the assumption that M ≥ 56r log2 B,

every connected component of G−S0 fits in internal memory, which allows us to apply an internal-memory separator algorithm to each component, in order to compute the desired partition.

In Steps 1 and 2, we apply the same idea iteratively. In Step 1, we construct a hierarchy ofplanar graphs G0, . . . , Gℓ, where G0 = G and |Gℓ| = O(N/B). We obtain each graph Gi fromthe previous graph Gi−1 using the uniform graph contraction procedure from Section 3. Giventhe reduced size of Gℓ, we can compute an (r log2 B)-partition of Gℓ in O(N/B) I/Os by applyingTheorem 2.1 to Gℓ. Let Sℓ be the set of separator vertices used in the partition. In Step 2, weundo the contraction steps that produced graphs G1, . . . , Gℓ from G0, one graph at a time, and, ineach step, derive a separator Si for Gi from the separator Si+1 computed in the previous iteration.We do this as follows: Since Gi+1 is obtained from Gi using the graph contraction procedure fromSection 3, every vertex in Gi+1 represents a set of vertices in Gi. Let S′

i be the set of vertices in Gi

represented by the vertices in Si+1. In order to obtain an (r log2 B)-partition of Gi, we partitionevery component of Gi − S′

i into subgraphs of size at most r log2 B and add the separator verticesused in this partition to a set S′′

i . The separator Si is the union of sets S′i and S′′

i . S0 is theseparator obtained at the end of this process.

In order to carry out Step 2 efficiently, and in order to obtain a small separator S0 at the endof this phase, the graph hierarchy G0, . . . , Gℓ has to satisfy a number of properties.

16

Page 17: I/O-Efficient Algorithms for Planar Graphs I: Separatorspeople.scs.carleton.ca/~maheshwa/papers/separators.pdf · 2009. 10. 14. · I/O-efficient graph algorithms have received considerable

Procedure Separator

Input: A planar graph G = (V,E) and an integer r > 0.Output: A proper r-partition P = (S,R) of G.

1: ℓ← ⌊log B⌋ − 1

2: Step 1: Compute the graph hierarchy

G0 ← Gfor i = 1, . . . , ℓ do

Compute a graph Gi that satisfies Properties (GH3)–(GH6) from Gi−1.end for

3: Step 2: Compute the separator S0

Apply Theorem 2.1 to compute a separator Sℓ of size O (|Gℓ|/ (√

r log B)) for Gℓ whose removalpartitions Gℓ into connected components of size at most r log2 B.for i = ℓ− 1, . . . , 0 do

Compute a separator Si for Gi. Separator Si consists of two sets S′

iand S′′

i. S′

iis the set of vertices

represented by the vertices in Si+1. S′′

iis the set of separator vertices introduced in order to

partition the connected components of Gi−S′

iinto connected components of size at most r log2 B.

end for

4: Step 3: Compute the final partition

Compute the partition P = (S,R) by partitioning the connected components of G− S0 into O(N/r)subgraphs of size at most r and boundary size O(

√r) and adding the required separator vertices to

S0.

Algorithm 4.1. Computing a separator for an unweighted planar graph.

First, we want every graph Gi+1 to have roughly half as many vertices as Gi. This guaranteesthat the cost of Steps 1 and 2 is dominated by the cost of the computation on G0 = G and, sinceℓ = ⌊log B⌋ − 1, that Gℓ has size O(N/B).

Second, during the construction of the separator Si from S′i, we would like to use an internal-

memory algorithm to partition each connected component of Gi − S′i; that is, we want each such

component to fit in memory. Since Si+1 defines an (r log2 B)-partition of Gi+1 and since M ≥56r log2 B, every connected component of Gi−S′

i fits in memory if every vertex in Gi+1 representsat most 56 vertices in Gi.

Finally, observe that, once we add a vertex x in Gi to Si, all vertices in G represented by xbelong to S0. Thus, to guarantee that S0 is small, we have to ensure that no vertex in Gi representstoo many vertices of G.

These conditions are formalized in the following properties we require the graph hierarchyG0, . . . , Gℓ to have:

(GH1) ℓ = ⌊log B − 1⌋,

(GH2) G = G0,

(GH3) For i = 0, . . . , ℓ, Gi is planar,

(GH4) For i = 0, . . . , ℓ, |Gi| ≤ 7N/2i−1,

17

Page 18: I/O-Efficient Algorithms for Planar Graphs I: Separatorspeople.scs.carleton.ca/~maheshwa/papers/separators.pdf · 2009. 10. 14. · I/O-efficient graph algorithms have received considerable

(GH5) For i = 1, . . . , ℓ, every vertex in Gi represents at most 56 vertices in Gi−1, and

(GH6) For i = 0, . . . , ℓ, every vertex in Gi represents at most 2i+1 vertices in G.

In Section 4.1, we show how to compute a graph hierarchy with these properties in O(sort(N))I/Os. In Section 4.2, we show that the desired separator S0 of G can be computed from the graphhierarchy in O(sort(N)) I/Os. In Section 4.3, we provide the details of Step 3 and show that thisstep can be carried out in the same I/O and time bounds as Steps 1 and 2, thereby establishingthe complexity of Algorithm 4.1 claimed in Theorem 4.1.

4.1 The Graph Hierarchy

The first step of our algorithm is the computation of a hierarchy of graphs G0, . . . , Gℓ that satisfyProperties (GH1)–(GH6). We initialize G0 = G. Then we compute each graph Gi from the previousgraph Gi−1 by assigning a weight w(x) and a size s(x) to every vertex x ∈ Gi−1 and applying theuniform graph contraction procedure from Section 3 to Gi−1. The weight w(x) is the number ofvertices in G represented by x; the size s(x) is the number of vertices in Gi−1 represented by x, thatis, is equal to one. To ensure Properties (GH5) and (GH6) of graph Gi, we provide the contractionprocedure with a weight threshold uw = 2i+1 and a size threshold us = 56.

Note that the assignment of weights and sizes to the vertices of Gi−1 before the constructionof Gi is easily accomplished. Initially, we set w(x) = s(x) = 1 for every vertex x in G0 = G.Subsequently, before computing Gi from Gi−1, the size of every vertex in Gi−1 can be reset to onein a single scan over the vertex set of Gi−1; as a result of the construction of Gi−1 from Gi−2, everyvertex in Gi−1 already stores the correct weight.

Lemma 4.1 A graph hierarchy G0, . . . , Gq with Properties (GH1)–(GH6) can be constructed inO(sort(N)) I/Os.

Proof. First we prove that the graph hierarchy computed by the procedure we have just describedhas the desired properties. Properties (GH1) and (GH2) are trivially satisfied. Property (GH3)is easy to prove by induction. For i = 0, G0 = G; thus, the planarity of G implies that G0 isplanar. For i > 0, the planarity of Gi follows from the planarity of Gi−1 because, by Lemma 3.1,the uniform contraction procedure preserves planarity.

Properties (GH5) and (GH6) are easy to show by induction. In particular, w(x) = 1 ≤ 2, forevery vertex x ∈ G0, and Property (GH5) is vacuous in this case. When constructing Gi from Gi−1,every vertex in Gi−1 is within bounds because, by the induction hypothesis, it has weight at most2i and size 1 (after resetting its size to 1). Hence, by Lemma 3.1, every vertex in Gi has weight atmost 2i+1 and size at most 56.

It remains to show Property (GH4). For graph G0, Property (GH4) holds because |G0| = |G| =N ≤ 14N . To prove the claim for graphs G1, . . . , Gℓ, let hi be the number of heavy vertices inGi. By Lemma 3.1, each graph Gi has size at most 7hi. To prove Property (GH4), it is thereforesufficient to prove that hi ≤ N/2i−1.

We prove this claim by induction. We partition the heavy vertices into two categories. A heavyvertex of type I has weight exceeding 2i. A type-II vertex has weight at most 2i and size greaterthan 28. In general, graph Gi contains less than N/2i type-I vertices and less than |Gi−1|/28 type-IIvertices, that is, hi < N/2i + |Gi−1|/28.

18

Page 19: I/O-Efficient Algorithms for Planar Graphs I: Separatorspeople.scs.carleton.ca/~maheshwa/papers/separators.pdf · 2009. 10. 14. · I/O-efficient graph algorithms have received considerable

For i = 1, we obtain h1 < N/2 + N/28 < N/20. For i > 1, we obtain

hi <N

2i+|Gi−1|

28(1)

≤ N

2i+

hi−1

4(2)

≤ N

2i+

N

2i(3)

=N

2i−1. (4)

Line (2) follows from Line (1) because |Gi−1| ≤ 7hi−1, as argued above. Line (3) follows from Line(2) by the induction hypothesis.

To bound the I/O-complexity, we recall that, by Lemma 3.6, the construction of graph Gi fromgraph Gi−1 takes O(sort(|Gi−1|)) I/Os. By Property (GH4), we have

∑ℓi=0 |Gi| = O(N). Thus,

the total I/O-complexity is∑ℓ

i=1O(sort(|Gi−1|)) = O(sort(N)).

4.2 The Separator Hierarchy

In Step 2 of Algorithm 4.1, we use the graphs G0, . . . , Gℓ computed in the first step to construct arelatively coarse partition of G. In particular, we compute a separator S0 of size O (N/

√r) whose

removal partitions G into connected components of size at most r log2 B.First we compute a partition of Gℓ into subgraphs of size at most r log2 B. To do so, we use

an arbitrary linear-time planar embedding algorithm (e.g., [11]) to compute a planar embedding ofGℓ and then apply Theorem 2.1 to compute the desired partition. Let Sℓ = S′′

ℓ be the computedseparator. By Theorem 2.1, the size of Sℓ is at most 4|Gℓ|/(

√r log B).

In the loop in Step 2, we apply the following iterative strategy to compute separators Sℓ−1, . . . , S0

for graphs Gℓ−1, . . . , G0: Given a separator Si+1 for graph Gi+1, we construct the set S′i of ver-

tices in Gi represented by the vertices in Si+1. Then we apply Theorem 2.1 to each connectedcomponent of Gi − S′

i whose size exceeds r log2 B, in order to partition it into components of sizeat most r log2 B. Let S′′

i be the set of separator vertices introduced by partitioning the connectedcomponents of Gi − S′

i in this manner. Then Si = S′i ∪ S′′

i .

Lemma 4.2 The separator S0 of G computed in Step 2 of Algorithm 4.1 has size O (N/√

r). Theconnected components of G− S0 have size at most r log2 B.

Proof. The bound on the size of the connected components of G − S0 is explicitly guaranteed bythe construction. To see that the size of S0 is as claimed, observe that, once we add a vertex toa separator Si, the vertices it represents in graphs Gi−1, . . . , G0 belong to separators Si−1, . . . , S0

or, more precisely, to S′i−1, . . . , S

′0. Conversely, if a vertex belongs to S′

i, its representative in Gi+1

already belongs to Si+1. Hence, if we consider the vertices in S′′0 , . . . , S′′

ℓ , which are the verticesadded at these levels, and count how many vertices in G each of them represents, we obtain thesize of S0. By Property (GH6) of the graph hierarchy, every vertex in Gi represents at most 2i+1

vertices in G. Since we use Theorem 2.1 to partition each connected component of Gi − S′i into

19

Page 20: I/O-Efficient Algorithms for Planar Graphs I: Separatorspeople.scs.carleton.ca/~maheshwa/papers/separators.pdf · 2009. 10. 14. · I/O-efficient graph algorithms have received considerable

connected components of size at most r log2 B, we have |S′′i | ≤ 4|Gi|/(

√r log B). Thus,

|S0| ≤ℓ

i=0

2i+1|S′′i | (5)

≤ℓ

i=0

2i+1 4|Gi|√r log B

(6)

≤ℓ

i=0

2i+1 28N

2i−1√

r log B(7)

=

ℓ∑

i=0

112N√r log B

(8)

≤ 112N√r

. (9)

Line (7) follows from Line (6) by Property (GH4). Line (9) follows from Line (8) because ℓ ≤log B − 1.

Lemma 4.3 Step 2 of Algorithm 4.1 takes O(sort(N)) I/Os to compute separator S0, providedthat M ≥ 56r log2 B.

Proof. The computation of the separator Sℓ takes O(N/B) I/Os and linear time, by Theorem 2.1and because graph Gℓ has size at most 7N

2ℓ−1 = O(N/B). Since the sizes of graphs G0, . . . , Gℓ

are geometrically decreasing, it is sufficient to show that the separator Si can be constructed fromseparator Si+1 inO(sort(|Gi|)) I/Os, in order to prove that Step 2 takes O(sort(|G0|)) = O(sort(N))I/Os.

Since the uniform graph contraction procedure labels every vertex x in Gi with the vertex inGi+1 representing x, we can compute the separator S′

i in O(sort(|Gi|)) I/Os: First we sort theset Si+1 and sort the vertices in Gi by their representatives in Gi+1. Then we scan the two listsand mark every vertex of Gi whose representative in Gi+1 is in Si+1 as being in S′

i. Now it takesO(sort(|Gi|)) I/Os to compute the connected components of Gi − S′

i (see Section 2.4).Since every connected component of Gi+1−Si+1 has size at most r log2 B, it follows from Prop-

erty (GH5) and Fact 2.2 that every connected component of Gi−S′i has size at most 56r log2 B ≤M ;

that is, each such connected component fits in internal memory. Thus each connected componentof Gi−S′

i whose size exceeds r log2 B can be loaded into internal memory, in order to apply Theo-rem 2.1 to partition it into connected components of size at most r log2 B. As the computation ofTheorem 2.1 is carried out in internal memory, partitioning the connected components of Gi − S′

i

into subgraphs of size at most r log2 B takes O(|Gi|/B) I/Os. The internal-memory computationtakes linear time, by Theorem 2.1. Thus, the computation of Si takes O(sort(|Gi|)) I/Os, and thetotal I/O-bound follows.

4.3 Computing the Final Partition

In order to obtain the final partition in Step 3 of Algorithm 4.1, the connected components of G−S0

have to be partitioned into subgraphs of size at most r and boundary size O(√

r), and subgraphs

20

Page 21: I/O-Efficient Algorithms for Planar Graphs I: Separatorspeople.scs.carleton.ca/~maheshwa/papers/separators.pdf · 2009. 10. 14. · I/O-efficient graph algorithms have received considerable

have to be merged to reduce their number to O(N/r), while maintaining the bounds on their sizeand boundary size. We do this as follows:

First we use Theorem 2.1 to partition each connected component of G − S0 into pieces of sizeat most r. This adds O(N/

√r) vertices to the separator and, thus, increases the separator size

by only a constant factor. The resulting partition may contain more than O(N/r) subgraphs, andthe boundary size of these subgraphs may exceed O(N/

√r). Next we group the subgraphs in the

current partition to reduce their number to O(N/r) and their total boundary size to O(N/√

r).Then we partition each subgraph in the resulting partition whose boundary size is greater thanO(√

r) into subgraphs of boundary size O(√

r). This is similar to Frederickson’s approach [19] and,as argued below, increases the number of subgraphs in the partition and the total boundary sizeby only a constant factor.

Since every connected component of G−S0 has size at most r log2 B ≤M , the partition of G−S0

into connected components of size at most r can be computed by loading each connected componentof G− S0 into internal memory and applying Theorem 2.1 in internal memory. Let S′ ⊇ S0 be theseparator produced by this step. Next we focus on grouping the connected components of G−S′ toproduce a partition P ′ = (S′, G′

1, . . . , G′p) such that p = O(N/r) and

∑pi=1 |N (G′

i)| = O(N/√

r),that is, P ′ is a normal r-partition.

4.3.1 Grouping Components

Intuitively, we compute the partition P ′ in two phases: The first phase groups connected compo-nents of boundary size at most two with other components that have the same boundary, whileensuring that none of the resulting subgraphs has size greater than r. This phase reduces thetotal boundary size of all subgraphs to O(N/

√r). The second phase merges subgraphs that share

boundary vertices until no two subgraphs sharing boundary vertices can be merged without pro-ducing a subgraph of size greater than r. This reduces the number of subgraphs to O(N/r). Notethat merging subgraphs in this manner cannot increase the total boundary size, that is, the totalboundary size of all subgraphs in the resulting partition is O(N/

√r).

To determine which connected components to group in these two phases, we use an auxiliarygraph H0 whose vertices represent separator vertices and the connected components of G − S′.Both phases operate on H0, grouping component vertices rather than actual components in thepartition. After the two phases have been applied to H0, we obtain P ′ by mering the componentsin the current partition that correspond to merged component vertices in H0.

The graph H0 contains all vertices in S′ and one vertex per connected component of G − S′.There is an edge between two separator vertices if they are adjacent in G. There is an edgebetween a separator vertex x and a component vertex representing a component G′ of G − S′ ifx ∈ N (V (G′)). Finally, every vertex in H0 has a weight, which is equal to the number of verticesin G it represents.

Graph H0 is easily constructed from G and S′ in O(sort(N)) I/Os: First we compute theconnected components of G − S′, thereby labelling every vertex in G − S′ with the ID of thecomponent it belongs to; we also label every vertex in S′ with its own ID. Then we apply thecontraction procedure from Section 2.4 to G.

Reducing the total boundary size. Merging components of boundary size at most two thathave the same boundary is equivalent to merging component vertices in H0 that have the sameneighbours and degree at most two. The latter is easily achieved using the uniform graph contraction

21

Page 22: I/O-Efficient Algorithms for Planar Graphs I: Separatorspeople.scs.carleton.ca/~maheshwa/papers/separators.pdf · 2009. 10. 14. · I/O-efficient graph algorithms have received considerable

procedure (in fact, only the bundling phase is sufficient). For the purpose of applying this procedure,we change the weight of every separator vertex to r, leave the weights of all component verticesunchanged, and set the weight threshold to r. Then the edge contraction phase does nothing becauseevery edge of H0 has at least one endpoint that is a separator vertex, that is, is heavy. The bundlingphase merges light component vertices that have the same neighbours and degree at most two. ByLemma 3.6, the application of the uniform contraction procedure takes O(sort(|H0|)) = O(sort(N))I/Os. The next lemma proves that this produces a graph H1 from H0 whose component verticesrepresent subgraphs of G−S′ of a sufficiently small total boundary size and each of which has sizeat most r. Note that the bound on the size of H1 stated in the lemma implies the claimed bound onthe boundary size of the corresponding partition of G because the total boundary size is equal tothe number of edges between component vertices and separator vertices in H1. Since H1 is planarand has size O(N/

√r), there are only O(N/

√r) edges in H1.

Lemma 4.4 Applying the uniform contraction procedure to H0 produces a planar graph H1 of sizeO(N/

√r). Every vertex in H1 has weight at most r.

Proof. Since H0 is an edge contraction of G, Fact 2.1 implies that H0 is planar. By Lemma 3.1, thisimplies that H1 is planar. Before applying the contraction procedure to H0, all vertices are withinbounds, that is, have weight at most r. Hence, by Lemma 3.1, every vertex in H1 has weight atmost r. Finally, to bound the size of H1, observe that H1 contains only O(N/

√r) heavy vertices:

O(N/√

r) separator vertices and O(N/r) heavy component vertices; the latter is true because thetotal weight of all component vertices in H1 is at most N . By Lemma 3.1, this implies that H1 hasO(N/

√r) vertices.

Reducing the number of subgraphs. To reduce the size of H1 to O(N/r) by further mergingvertices, we first reset the weight of every separator vertex to 1 and then apply the uniform contrac-tion procedure to H1, again with weight threshold r. Since |H1| ≤ N , this takes O(sort(N)) I/Os,by Lemma 3.6. Since a vertex is heavy if its weight exceeds r/2, and the total weight of all verticesin the resulting graph H2 is N , there are at most 2N/r heavy vertices in H2. By Lemma 3.1, thisimplies that the total size of H2 is O(N/r). Moreover, since no vertex in H1 has weight exceedingr, Lemma 3.1 implies that no vertex in H2 has weight exceeding r. Thus, we have

Lemma 4.5 Applying the uniform contraction procedure to H1 produces a planar graph H2 of sizeO(N/r). Every vertex in H2 has weight at most r.

The final grouping. Every component vertex in H2 now represents a subgraph in the partitionP ′. We finish the computation of P ′ by labelling every non-separator vertex with the ID of thesubgraph it belongs to. This is easily achieved by sorting and scanning the vertex sets of G, H0,H1, and H2 a constant number of times. Indeed, every vertex in G−S′ is initially labelled with theconnected component of G − S′ that contains it, that is, with its representative in H0. Similarly,every vertex in H0 is labelled with its representative in H1, and every vertex in H1 is labelledwith its representative in H2. Thus, sorting and scanning suffices to label every vertex in H1, andsubsequently every vertex in H0 and G, with its representative in H2. This labelling represents thesubgraphs in P ′.

Lemma 4.6 Given the separator S0, a normal r-partition P ′ of G can be computed in O(sort(N))I/Os.

22

Page 23: I/O-Efficient Algorithms for Planar Graphs I: Separatorspeople.scs.carleton.ca/~maheshwa/papers/separators.pdf · 2009. 10. 14. · I/O-efficient graph algorithms have received considerable

Proof. The I/O-bound of computing P ′ from S0 follows from the above discussion of the differentsteps required to obtain P ′ from G and S0.

There are only O(N/r) subgraphs in P ′ because there are only O(N/r) component vertices inH2 and each of them defines one subgraph in P ′. Every subgraph in the partition has size equalto the weight of its representative in H2; by Lemma 4.5, no vertex in H2 has weight exceedingr. Finally, by Lemma 4.4, there are only O(N/

√r) edges in H1. Each such edge represents an

adjacency between a separator vertex and a subgraph in the partition P ′′ of G represented by H1.Thus, P ′′ has total boundary size O(N/

√r). Since partition P ′ is obtained by merging subgraphs

in P ′′, the total boundary size of the subgraphs in P ′ cannot be greater than the boundary size ofthe subgraphs in P ′′, that is, the total boundary size of all subgraphs in P ′ is O(N/

√r).

4.3.2 Ensuring Small Boundary Size

In order to obtain a proper r-partition from the normal r-partition P ′ we have produced so far,we have to reduce the boundary size of each individual subgraph to O(

√r) by further partitioning

each subgraph in P ′ whose boundary exceeds the desired size. In order to do so, our algorithmpartitions each graph G′

i in P ′ in turn. We would like to do this by loading G′i into internal memory

and applying Theorem 2.2 in internal memory. However, the algorithm needs to work with thegraph N [G′

i] and, while G′i has size at most r, the boundary of G′

i may be large. Thus, N [G′i] may

not fit in memory.We solve this problem by first augmenting the separator so that its size increases by only a

constant factor and every graph G′′i in the resulting partition satisfies |N [G′′

i ]| = O(r). Then weload each graph in the augmented partition into memory, in order to apply Theorem 2.2 to it.

To augment the separator, we consider each graph G′i in the partition P ′ in turn. Let Gi be

the graph obtained from N [G′i] by removing all edges that belong to N (G′

i) and then merging allvertices in N (V (G′

i)) that have the same at most two neighbours in G′i. For every vertex in Gi

that represents more than one vertex in N (V (G′i)), we add its neighbours in G′

i to a set S′′i . Then

let P ′′ = (S′′, G′′1 , . . . , G′′

p), where G′′i = G[V (G′

i) \ S′′i ] and S′′ = S′ ∪⋃p

i=1 S′′i ; that is, in P ′′, the

vertices in S′′i are removed from the graph G′

i and are added to the separator.

Lemma 4.7 Let P ′′ = (S′′, G′′1 , . . . , G

′′p) be the partition obtained from P ′ using the above trans-

formation. Then P ′′ is normal, and every graph N [G′′i ], 1 ≤ i ≤ p, has size O(r).

Proof. Let P ′ = (S′, G′1, . . . , G

′p). Then |S′| = O(N/

√r) and

∑pi=1 |N (Gi)| = O(N/

√r) because

P ′ is normal. Now consider a subgraph G′i in P ′, and let S′′

i be the vertices in S′′ ∩ V (G′i),

that is, the vertices in G′i that are added to S′′ during the augmentation step. Every vertex in

S′′i is added by some boundary vertex x of Gi that represents at least two boundary vertices of

G′i. Since vertex x adds at most two vertices of G′

i to S′′i , we have |S′′

i | ≤ |N (G′i)| and, hence,

|S′′| = |S′|+ ∑pi=1 |S′′

i | ≤ |S′|+ ∑pi=1 |N (G′

i)| = O(N/√

r).Every boundary vertex of a graph G′′

i in P ′′ is either a boundary vertex of G′i, or it belongs to

|S′′i |. Now observe that any boundary vertex x of Gi adds at most two vertices y1 and y2 to S′′

i .Vertices y1 and y2 are all the neighbours in G′

i of the at least two vertices in N (G′i) represented

by x. Hence, by adding y1 and y2 to S′′i and, thus, possibly to N (G′′

i ), we make sure that atleast two vertices in N (G′

i), namely the ones represented by x, do not belong to N (G′′i ). Thus,

|N (G′′i )| ≤ |N (G′

i)| and∑p

i=1 |N (G′′i )| ≤

∑pi=1 |N (G′

i)| = O(N/√

r).

23

Page 24: I/O-Efficient Algorithms for Planar Graphs I: Separatorspeople.scs.carleton.ca/~maheshwa/papers/separators.pdf · 2009. 10. 14. · I/O-efficient graph algorithms have received considerable

To bound the size of each graph N [G′′i ], we partition its vertices into two groups: those in G′

i

and those in N (G′i). Since |G′

i| ≤ r, N [G′′i ] can contain at most r vertices that belong to G′

i.Next observe that there are no two vertices x and y in N (G′

i) ∩ N [G′′i ] such that N (x) = N (y)

and deg(x) = deg(y) ≤ 2. Indeed, if there were two such vertices, their neighbours in G′i would

have been added to S′′i ; that is, neither x nor y would belong to N [G′′

i ]. Thus, the subgraph of Ginduced by the edges between vertices in N (G′

i)∩N [G′′i ] and vertices in G′

i satisfies the conditionsof Corollary 2.2, and the number of vertices in N (G′

i) ∩ N [G′′i ] is at most 7|G′

i| ≤ 7r.

The computation of partition P ′′ takesO(sort(N)) I/Os: The computation of graph Gi, for everygraph N [G′

i], is easily carried out using the uniform graph contraction procedure after assigningweight 1 to every separator vertex and weight 2N to every vertex in G′

i; the weight thresholdis 2N . The construction of set S′′

i now requires scanning the vertex set of Gi and, for everyseparator vertex of weight at least two and degree at most two, adding its neighbours to S′′

i .Thus, the computation on each graph N [G′

i] takes O(sort(|N [G′i]|)) I/Os, and the total cost is

∑pi=1O(sort(|N [G′

i]|)) = O(sort(N)).To obtain the final partition, we apply Theorem 2.2 to every subgraph G′′

i in partition P ′′

whose boundary size exceeds c√

r, for an appropriate constant c > 0. By Corollary 2.1, this canbe done in O(N/B) I/Os and O(N log N) time and increases the size of the separator and thenumber of graphs in the partition by only a constant factor; that is, this final step produces aproper r-partition of G.

In summary, the graph hierarchy can be constructed in O(sort(N)) I/Os. Using the graphhierarchy, a separator S0 of size O(N/

√r) that partitions G into connected components of size

at most r log2 B can be computed in O(sort(N)) I/Os. Given S0, it takes O(sort(N)) I/Os toobtain a normal r-partition P ′ of G, augment P ′ to obtain a normal r-partition P ′′ such that|N [G′′

i ]| = O(r), for every graph G′′i in P ′′, and finally derive a proper r-partition from P ′′. This

proves Theorem 4.1.

5 Regular Partitions

Our result from the previous section provides an algorithm for computing proper r-partitions ofplanar graphs, as long as r is small; but the computed partitions are not necessarily regular. Ingeneral, without a bound on the degrees of the vertices in the graph, a regular proper r-partitionmay not exist. For planar graphs of degree three, however, regular proper r-partitions do exist [19],and the algorithms of [5, 7, 8, 9] rely on the existence of such partitions. In this section, we showhow to modify the partition produced by the algorithm in Section 4 to obtain a regular properr-partition for a planar graph of degree three.

Given such a graph G, we apply Algorithm 4.1 to G to produce a proper r-partition P =(S, G1, . . . , Gp) of G. We are, however, interested only in the separator S and discard the groupingof the connected components G − S into subgraphs. Next we group the connected components ofG − S to obtain the desired regular proper r-partition P ′ = (S, G′

1, . . . , G′q). This grouping is

again similar to [19].To compute the desired grouping, we use an auxiliary graph H again. Graph H contains one

vertex per connected component of G− S. There is an edge between two vertices in H if the twocorresponding components of G − S share a boundary vertex. Note that, since every vertex in Ghas degree at most three, graph H is planar. Every vertex x in H has two weights s(x) and b(x):

24

Page 25: I/O-Efficient Algorithms for Planar Graphs I: Separatorspeople.scs.carleton.ca/~maheshwa/papers/separators.pdf · 2009. 10. 14. · I/O-efficient graph algorithms have received considerable

s(x) is the size, that is, the number of vertices in the connected component represented by x; b(x)is the size of the component’s boundary. Note that s(x) ≤ r and b(x) ≤ c

√r, for some c > 0,

because P is a proper r-partition.Now we apply the uniform graph contraction procedure to H, with thresholds us = r and

ub = c√

r. This produces a graph H ′ each of whose vertices represents a set of vertices in H and,thus, a set of connected components of G − S. The graphs G′

1, . . . , G′q in partition P ′ are defined

as the graphs represented by the vertices in H ′. Similar to Section 4, this partition of G − S canbe computed in O(sort(N)) I/Os.

Theorem 5.1 Given an N -vertex planar graph G none of whose vertices has degree greater thanthree, and an integer r > 0, a regular proper r-partition of G can be computed in O(sort(N)) I/Os,provided that M ≥ 56r log2 B.

Proof. The I/O-complexity of the procedure is easily seen to be O(sort(N)): Algorithm 4.1 has thiscost, as has the computation of the connected components of G−S. Graph H is then a contractionof G w.r.t. the component labels, and graph H ′ is obtained from H using the uniform contractionprocedure. The final grouping of the connected components of G − S to produce partition P ′

requires sorting and scanning sets of size O(N) a constant number of times.Next we argue that the produced partition is proper. Since P is proper, we have |S| = O(N/

√r).

This implies that the total boundary size of the connected components of G − S cannot exceedO(N/

√r) because every vertex in G has degree at most three and, thus, every vertex in S is adjacent

to at most three connected components of G− S. This implies that there are only O(N/r) heavyvertices in H ′: at most 2N/r vertices of size greater than r/2 and O(N/r) vertices of boundarysize greater than c

√r/2. By Lemma 3.1, this implies that |H ′| = O(N/r), that is, partition P ′ has

O(N/r) subgraphs. No subgraph in P ′ can have size exceeding r or boundary size exceeding c√

rbecause this is true for every vertex in H and thus, by Lemma 3.1, for every vertex in H ′.

In order to prove that P is regular, we analyze the two phases of the computation of H ′ from H.The edge contraction phase of the uniform compression procedure merges only vertices that areadjacent. In G, this corresponds to merging connected components of G− S that share boundaryvertices. Thus, for every graph G′′

i in the resulting partition, the graph N [G′′i ] is connected. The

bundling phase merges only vertices of degree at most two that have the same neighbours. Moreover,these neighbours are heavy, that is, are not merged with any other vertices in the bundling phase.Thus, the merging of vertices during the bundling phase corresponds to merging subgraphs in thecurrent partition that have the same at most two neighbours. For a graph G′

i produced during thebundling phase, let these two neighbours be G′

j and G′k. Since the vertices in H that represent

G′j and G′

k are not merged with any other vertices during the bundling phase, N [G′j ] and N [G′

k]are connected. Graph G′

i shares boundary vertices only with G′j and G′

k. Hence, partition P ′

contains only subgraphs that are either connected or share boundary vertices with at most twoother subgraphs, which are connected; that is, partition P ′ is regular.

6 Separators of Low Cost and Edge Separators

Aleksandrov et al. [3] have shown the following general separator theorem for planar graphs whosevertices have associated positive weights and costs. Intuitively, as in other weighted separatortheorems, the weight of a vertex measures its contribution to the subgraph in the partition thatcontains it. The cost of a vertex measures how costly it is to include this vertex in the separator.

25

Page 26: I/O-Efficient Algorithms for Planar Graphs I: Separatorspeople.scs.carleton.ca/~maheshwa/papers/separators.pdf · 2009. 10. 14. · I/O-efficient graph algorithms have received considerable

One example of the application of costs is the edge separator theorem of [3] of which Theorem 6.3later in this section is an I/O-efficient version.

Theorem 6.1 (Aleksandrov et al. [3]) Given a planar graph G = (V,E), a cost function c :V → R

+, a weight function w : V → R+, and a real number 0 < t < 1, there exists a t-separator S

of cost c(S) ≤ 4√

2C(G)/t for G, where C(G) =∑

x∈V (c(x))2. Such a separator can be computedin linear time.

Several known separator theorems can be derived from Theorem 6.1 by choosing appropriatecost and weight functions. For example, Theorem 2.1 can be obtained from Theorem 6.1 by choosingc(x) = 1 for all x ∈ V , and Aleksandrov et al. have shown how to obtain a generalization of theedge separator theorem of [15] using Theorem 6.1.

In this section, we show that, using the results from Sections 4 and 5, the steps of the algorithmof [3] can be carried out in O(sssp(N)) I/Os, provided that M = Ω(B2 log2 B). This I/O-efficientversion of the algorithm of [3] allows us in particular to compute a partition of G into subgraphs ofsize at most r using a separator of size at most O(N/

√r). Our separator algorithm from Section 4

computes such a partition, but does so in an I/O-efficient manner only if r = O(M/ log2 B). Thealgorithm in this section removes this restriction on r. We start by giving an overview of thealgorithm of [3] and then discuss how to implement each of its steps in an I/O-efficient manner.

6.1 Outline of the Algorithm

The algorithm of [3] proceeds in two phases, similar to Lipton/Tarjan’s algorithm [26]. The firstphase computes a spanning tree T of G and cuts it into “shallow” layers by removing vertices from Tthat are at roughly the same distance from the root; see Figure 6.1(a). The second phase partitionseach layer using fundamental cycles. More precisely, every layer of G is re-triangulated and a newspanning tree of the layer is computed. A fundamental cycle F (e) w.r.t. the computed spanningtree then consists of a non-tree edge e and the unique simple path in the tree connecting the edge’sendpoints. The separator computed for each layer is the union of a number of fundamental cycles;see Figure 6.1(b).

There are three major differences to Lipton/Tarjan’s algorithm: (1) In order to obtain a t-separator, for t < 2/3, the tree is cut into more than three layers, and each layer is partitionedusing more than one fundamental cycle. (2) In order to find the fundamental cycles partitioningeach layer, so-called separation trees, first introduced in [2], are used. These trees reduce theproblem of finding the desired fundamental cycles to the much simpler problem of finding a t′-edgeseparator in a tree. (3) Instead of using a BFS-tree to obtain the partition into shallow layers, ashortest-path tree based on the vertex costs is used. The depth of a vertex x in the tree equals thecost of all its ancestors in the tree, including x itself. Thus, if a layer is shallow, the fundamentalcycles in the layer have low cost. Next we discuss the construction of the spanning tree T and thetwo phases computing the separator in more detail.

6.1.1 The Shortest-Path Tree

To compute the spanning tree T used in the separator algorithm, the graph G is embedded andtriangulated. Let ∆ be the resulting triangulation. Then a new vertex s of cost and weight zerois added inside one of the faces of ∆, and vertex s is connected to each vertex on the boundary of

26

Page 27: I/O-Efficient Algorithms for Planar Graphs I: Separatorspeople.scs.carleton.ca/~maheshwa/papers/separators.pdf · 2009. 10. 14. · I/O-efficient graph algorithms have received considerable

G0

G1

G2

G3

G4

L(ℓ1)

L(ℓ2)

L(ℓ3)

L(ℓ4)

s2

L(ℓ3)ℓ3

(a) (b) (c)

Figure 6.1. (a) The partition of G into subgraphs G0, . . . , G4 using levels L(ℓ1), . . . , L(ℓ4). (b) The partition ofG2 into subgraphs of weight at most tw(G) using fundamental cycles. The dotted edges are the ones introducedto connect all vertices that were adjacent to vertices in L(ℓ2) to the new root vertex s2. The dashed edges are thenon-tree edges defining the fundamental cycles that are used to partition G2. (c) The definition of level L(ℓ3).The bold edges are all edges spanning distance ℓ3. Their bottom endpoints are in L(ℓ3). The sets V −(ℓ3) andV +(ℓ3) are shown in light and dark grey, respectively. Note that there are no edges between V −(ℓ3) and V +(ℓ3).

the face. From now on, we use G to refer to the resulting triangulation because a separator of thetriangulation is also a separator of G.

Next, every edge xy of G is replaced with two directed edges xy and yx, and each directed edgexy is assigned a weight w′(xy) = c(y), that is, the weight of every edge is equal to the cost of itstarget vertex. Tree T is a shortest-path tree w.r.t. edge weights w′, rooted at vertex s. Note thatthe distance of a vertex x from s in T equals the cost of x’s ancestors, including x.

For every vertex x ∈ G, let d(x) = distT (s, x), and let the radius of T be r(T ) = maxd(x) :x ∈ V .

6.1.2 Cutting T into Layers

To partition T into shallow layers, appropriate distance values ℓ1, . . . , ℓp from the root s are chosen.For each ℓi, the bottom endpoints of all edges crossing this distance value are added to the separator.More precisely, given a real number ℓ ∈ (0, r(T )], let L(ℓ) = y : e = xy ∈ T and d(x) < ℓ ≤ d(y).We denote the vertices of G by s = x0, x1, . . . , xN so that 0 = d(x0) < d(x1) ≤ d(x2) ≤ · · · ≤d(xN ) = r(T ). Then L(ℓ) = L(ℓ′), for all ℓ, ℓ′ ∈ (d(xi−1), d(xi)]. Thus, there are only N differentsets L(ℓ). Every set L(ℓ) is a separator of G whose removal partitions the vertex set V into twosets V −(ℓ) = x ∈ V : d(x) < ℓ and V +(ℓ) = x ∈ V : d(x) ≥ ℓ and x 6∈ L(ℓ) so that no vertexin V −(ℓ) is adjacent to a vertex in V +(ℓ). See Figure 6.1(c).

There is a trade-off between the cost of the separator used to cut G into layers and the cost ofthe separator used to partition the layers. By cutting G into more shallow layers, the separatorsused to partition the layers become cheaper, but we need to partition G into more layers, therebyincreasing the size of the separator introduced in the current phase. As we will see, this trade-off

27

Page 28: I/O-Efficient Algorithms for Planar Graphs I: Separatorspeople.scs.carleton.ca/~maheshwa/papers/separators.pdf · 2009. 10. 14. · I/O-efficient graph algorithms have received considerable

is balanced by partitioning G into p = ⌊r(T )/h⌋ layers of height h =√

tC(G)/8.Now let ℓ′i = ih, for 0 ≤ i ≤ p, and let Vi be the set of vertices x ∈ V such that d(x) ∈ (ℓ′i−1, ℓ

′i],

for 1 ≤ i ≤ p. For 1 ≤ i ≤ p, let xi ∈ Vi be the vertex that minimizes c(L(d(xi))), and let ℓi = d(xi);that is, L(ℓi) has minimal cost among all sets L(ℓ) with ℓ′i−1 < ℓ ≤ ℓ′i. The separator S1 then is the

set S1 = L(ℓ1)∪ · · · ∪L(ℓp). It is shown in [3] that c(S1) ≤ C(G)/h = 2√

2C(G)/t. The removal ofthe vertices in S1 partitions G into subgraphs G0, . . . , Gp, where G0 = G[V −(ℓ1)], Gp = G[V +(ℓp)],and, for 0 < i < p, Gi = G[V +(ℓi) ∩ V −(ℓi+1)]; see Figure 6.1(a).

6.1.3 Partitioning the Layers

A subgraph Gi whose weight exceeds tw(G) is partitioned into subgraphs of size at most tw(G)using fundamental cycles w.r.t. a spanning tree Ti. The tree Ti is obtained as follows: If i > 0, anew vertex si of cost and weight 0 is added to Gi and made adjacent to all vertices of Gi that, in G,are adjacent to vertices in L(ℓi). if i = 0, let s0 = s. Then Gi is triangulated, and Ti is computedas a shortest-path tree rooted in si.

From the choice of levels L(ℓ1), . . . , L(ℓp) it follows that r(Ti) ≤ 2h, so that every fundamental

cycle w.r.t. Ti has cost at most 4h. Below we argue that ⌊2w(Gi)tw(G) ⌋ fundamental cycles suffice to

partition Gi into subgraphs of weight at most tw(G), that is, Gi can be partition into subgraphs

of weight at most tw(G) using a separator of cost at most 4h⌊2w(Gi)tw(G) ⌋. Let S2 be the union of

these separators for all graphs G0, . . . , Gp. Then c(S2) ≤ 4h∑p

i=0⌊2w(Gi)tw(G) ⌋ ≤ 8h/t = 2

2C(G)/t.

Hence, the cost of the final separator S = S1 ∪ S2 is c(S) = c(S1) + c(S2) ≤ 4√

2C(G)/t. Since S1

partitions G into graphs G0, . . . , Gp and S2 partitions graphs G0, . . . , Gp into subgraphs of weightat most tw(G), S is a t-separator.

In order to compute⌊

2w(Gi)tw(G)

fundamental cycles that partition Gi into subgraphs of weight at

most tw(G), the idea of a separation tree is used, which has been introduced in [2]. The separationtree Di of Gi w.r.t. Ti is defined as follows: Let G∗

i be the dual of Gi. Then Di is obtained from G∗i

by removing all edges that are dual to edges in Ti. Any edge set X = e∗1, . . . , e∗k of Di defines aset of fundamental cycles F(X) = F (e1), . . . , F (ek). Next we present an assignment of weights tothe edges of graph Di, proposed in [2], that ensures that the set F(Xi) corresponding to a t′-edgeseparator of Di is a t′-vertex separator of Gi. Thus, it suffices to compute a t′-edge separator Xi

of Di, for t′ = tw(G)/w(Gi), and add the vertices on the fundamental cycles in F(Xi) to S2.To compute the necessary assignment w∗ of weights to the edges of Di, we define two sets

of edges for every vertex x ∈ Vi: The set E0(x) contains all non-tree edges incident to x. Theset E1(x) contains all non-tree edges both of whose endpoints are adjacent to x. It is shown in [2]that E1(x) 6= ∅, for all x ∈ Vi. Initially, let w∗(e∗) = 0, for every edge e∗ ∈ Di. For every vertexx ∈ Vi with E0(x) 6= ∅, choose an edge e ∈ E0(x) and increase the weight w∗(e∗) of its dual byw(x). For every vertex x ∈ Vi with E0(x) = ∅, choose an edge e ∈ E1(x) and increase the weightw∗(e∗) of e∗ by w(x). Note that with this definition of edge weights w∗(e∗), w∗(Di) = w(Gi). Itis shown in [2] that the set F(Xi) of fundamental cycles defined by a t′-edge separator Xi of Di

w.r.t. these weights is a t′-separator of Gi. Intuitively, F(Xi) partitions the plane into regions, eachcorresponding to a subtree of Di−Xi. The weight of every vertex in such a region must have beencharged to an edge in the corresponding subtree; but, since Xi is a t′-separator of Di, no subtreehas weight exceeding t′w(Gi); that is, the fundamental cycles in F(Xi) form a t′-vertex separatorof Gi. By choosing t′ = tw(G)/w(Gi), we obtain a partition of Gi into subgraphs of weight at most

28

Page 29: I/O-Efficient Algorithms for Planar Graphs I: Separatorspeople.scs.carleton.ca/~maheshwa/papers/separators.pdf · 2009. 10. 14. · I/O-efficient graph algorithms have received considerable

tw(G).

In order to compute a t′-edge separator Xi of size at most⌊

2w∗(Di)tw(G)

=⌊

2w(Gi)tw(G)

, for t′ =

tw(G)/w(Gi), the algorithm of [2] chooses a leaf of Di as the root and then processes Di bottom-up. For every edge e∗, let its tree weight be the weight of all edges in Di below e∗, including e∗

itself. If the tree weight of e∗ exceeds tw(G)/2, edge e∗ is added to X. Edge e∗ and all edges belowe∗ then do not contribute to the tree weights of edges above e∗. It is easily verified that everysubtree of Di − Xi has weight at most tw(G). Also, every edge added to Xi can be charged tothe edges contributing to its tree weight. Their total weight is at least tw(G)/2, so that at most⌊

2w∗(Di)tw(G)

edges are added to Xi.

The computation of tree weights is easily implemented as follows: For an edge e∗ whose bottomendpoint is a leaf of Di, the tree weight of e∗ equals its weight. For any other edge e∗, initializethe tree weight of e∗ to be equal to w∗(e∗). When processing an edge f∗ whose top endpoint is thesame as the bottom endpoint of e∗, add the tree weight of f∗ to that of e∗ if f∗ is not added to Xi.Otherwise, leave the tree weight of e∗ unchanged.

6.2 An I/O-Efficient Algorithm

Next we show that each step of the above algorithm can be carried out I/O-efficiently, therebyobtaining an I/O-efficient algorithm to compute a separator as in Theorem 6.1.

6.2.1 Computing T

A planar embedding G of G can be computed in O(sort(N)) I/Os using the algorithm of [27]. In[24], it is shown how to triangulate an embedded planar graph in O(sort(N)) I/Os. A representationof the faces of the resulting triangulation as lists of vertices on the boundary of each face can becomputed in O(sort(N)) I/Os [24]. Given this representation, we scan one such list and make thenew vertex s adjacent to all vertices in this list. It takes O(sort(N)) I/Os to label every edge ofG with the costs of its endpoints, replace every edge of G with its corresponding directed edges,and assign weights as defined above to these edges (see Section 2.4). The shortest-path tree Tcan now be computed in O(sssp(N)) I/Os using the shortest-path algorithm of [8]. (This is whereour weighted separator algorithm depends on the unweighted separator algorithm from Section 4because the shortest-path algorithm of [8] requires a regular proper B2-partition to be given.)

6.2.2 Cutting T into Layers

Given the distances of the vertices of T from s, we compute values ℓ1, . . . , ℓp, as defined in Sec-tion 6.1, as follows: First we label both endpoints of every edge with their costs and their distancesfrom the root s of T . Then we sort the edges of T by the distances of their source vertices froms. We scan the sorted edge list to simulate a sweep from ℓ = −∞ to ℓ = +∞. During the sweep,we maintain the weight of the current set L(ℓ), the minimum cost cmin(i) found in the interval(ℓ′i−1, ℓ

′i], and the value ℓi ∈ (ℓ′i−1, ℓ

′i] such that c(L(ℓi)) = cmin(i). When ℓ = d(xj), for some

vertex xj, we perform the following operations: If d(xj+1) > ℓ′i, we report ℓi, increase i by one,and initialize cmin(i) = +∞. Then we decrease c(L(ℓ)) by c(xj) and increase c(L(ℓ)) by the totalcost of the target vertices of all edges having xj as a source vertex. This produces c(L(d(xj+1))).If c(L(d(xj+1))) < cmin(i), we update cmin(i) = c(L(d(xj+1))) and ℓi = d(xj+1).

29

Page 30: I/O-Efficient Algorithms for Planar Graphs I: Separatorspeople.scs.carleton.ca/~maheshwa/papers/separators.pdf · 2009. 10. 14. · I/O-efficient graph algorithms have received considerable

Given values ℓ1 < · · · < ℓp and the edge set of T as sorted above, the set S1 = L(ℓ1)∪· · ·∪L(ℓp)can be extracted as follows: We scan the list of values ℓ1, . . . , ℓp and the edge set of T , again tosimulate a sweep from ℓ = −∞ to ℓ = +∞. When the sweep passes the source vertex of an edge e,we append edge e to a list L of edges that contains all edges spanning the current sweep value ℓ, butmay contain more edges. When the sweep passes a value ℓi, we scan list L to add all target verticesof edges xy ∈ L with d(x) < ℓi ≤ d(y) to S1. Then we set L = ∅. The reason for resetting L is thatendpoints of edges that span two values ℓi and ℓi+1 should be reported only once, and endpointsof edges in L that have not been reported for ℓi cannot be reported for ℓi+1 because, for each suchedge xy, d(y) < ℓi ≤ ℓi+1. Since this phase requires sorting and scanning the edge set of T aconstant number of times, its I/O-complexity is O(sort(N)).

6.2.3 Partitioning the Layers

This phase of the algorithm extracts graphs G0, . . . , Gp, computes shortest-path trees T0, . . . , Tp

for these graphs, and partitions each graph Gi, 0 ≤ i ≤ p, into subgraphs of weight at most tw(G),using fundamental cycles of Ti.

Computing the layers. We compute graphs G0, . . . , Gp as follows: First we compute the setV − S1 and sort the vertices in V − S1 by their distances from s. We scan the vertices in V − S1

and the values 0 = ℓ0, ℓ1, . . . , ℓp, ℓp+1 = r(T ) to partition V − S1 into sets V0, . . . , Vp, where Vi =x ∈ V − S1 : ℓi < d(x) ≤ ℓi+1. For 1 ≤ i ≤ p, we add a new vertex si to Vi. This produces thevertex sets of graphs G0, . . . , Gp.

Next we partition E into sets E0, . . . , Ep, E−1 , . . . , E−

p , and E+ such that every edge in Ei has

both endpoints in Vi; every edge xy in E−i has one endpoint, say y, in Vi, and the other endpoint,

x, satisfies x ∈ S1 and d(x) < d(y); and set E+ contains the remaining edges. This partition iseasily computed in O(sort(N)) I/Os: We label every edge with the membership of its endpoints inV0, . . . , Vp or S1 and with their distances from s. Every edge can then determine its membership inone of the sets based on its local information, so that we can sort E to obtain the desired partition.Graph Gi is now defined as Gi = (Vi, Ei ∪ E′

i), where E′i = siy, ysi : xy ∈ E−

i and d(x) < d(y).Finally, we triangulate Gi using the algorithm of [24].

This procedure requires sorting and scanning the vertex and edge sets of G a constant numberof times. In addition, we invoke the O(sort(N))-I/O triangulation algorithm of [24] on graphsG0, . . . , Gp, whose total size is O(N). Hence, the extraction of graphs G0, . . . , Gp takes O(sort(N))I/Os.

Computing the separation trees. To compute the separation tree Di for each graph Gi, westart by computing a shortest-path tree Ti of Gi rooted in si and then extract Di. Using theseparator algorithm from Section 4 and the shortest-path algorithm of [8], the construction of Ti

takes O(sssp(|Gi|)) I/Os. To construct Di, we compute the dual G∗i = (Fi, E

∗i ) of Gi, which can

be done in O(sort(|Gi|)) I/Os using an algorithm from [24]. Then we remove all edges dual toedges in Ti from E∗

i . This takes another O(sort(|Gi|)) I/Os (see Section 2.4). Thus, in total, theconstruction of all separation trees D0, . . . ,Dp takes O(sssp(N)) I/Os.

Computing dual edge weights. Before computing an edge separator of Di and the corre-sponding set of fundamental cycles, we have to assign weights to the edges of Di, as defined in

30

Page 31: I/O-Efficient Algorithms for Planar Graphs I: Separatorspeople.scs.carleton.ca/~maheshwa/papers/separators.pdf · 2009. 10. 14. · I/O-efficient graph algorithms have received considerable

Section 6.1.3. We do this in two phases. The first one partitions Vi into two sets V 0i and V 1

i suchthat E0(x) 6= ∅ for all x ∈ V 0

i and E0(x) = ∅ for all x ∈ V 1i . It also identifies an edge e ∈ E0(x)

for every vertex x ∈ V 0i and adds w(x) to the weight w∗(e∗) of e’s dual. The second phase finds an

edge e ∈ E1(x) for every x ∈ V 1i and adds w(x) to w∗(e∗). The details are as follows:

To implement Phase 1, we create a list Yi of non-tree edges of Gi. More precisely, Yi containsdirected edges xy and yx for every non-tree edge xy of Gi. We sort the edges in Yi by their sourcevertices and the vertices in Vi by their IDs. List Yi is now the concatenation of lists E0(x), for allx ∈ V 0

i , and a single scan of lists Vi and Yi suffices to partition Vi into V 0i and V 1

i and add a pair(e∗, w(x)) to a list W , for every vertex x ∈ V 0

i and the first edge e ∈ E0(x). List W will be usedafter Phase 2 to add w(x) to w∗(e∗) for all entries (e∗, w(x)) ∈W .

To implement Phase 2, we observe that, for every edge yz such that y and z are neighbours ofx in Ti, one endpoint, say y, must be a child of x in Ti, and the other, z, must be x’s parent in Ti

or another child of x. Therefore, we can compute sets E1(x), for all x ∈ Ti, as follows: First welabel every vertex x ∈ Ti with its grandparent in Ti. This can be done by creating two copies of Vi,sorting one by vertex IDs, the other by parent IDs, and then scanning the two lists. Now we labelevery non-tree edge of Gi with the parents and grandparents of its endpoints. For every non-teeedge yz, yz ∈ E1(x) if and only if p(y) = p(z) = x or, w.l.o.g., p(y) = x and z = p(x) = p(p(y)).This can be tested based on the local information stored with edge yz. If edge yz satisfies thiscondition, we give it E1-label x. Otherwise, it receives E1-label nil. We sort the non-tree edges bytheir E1-labels and scan V 1

i and the sorted edge list to add a pair (e∗, w(x)) to W , for every vertexx ∈ V 1

i and the first edge e ∈ E1(x).Finally, we sort the edges of Di by their IDs and the pairs in W by their first components. A

single scan of these two sorted lists suffices to add w(x) to w∗(e∗), for every pair (e∗, w(x)) ∈W .Since this procedure sorts and scans lists of size O(|Gi|) a constant number of times, the

assignment of weights to the edges of Di takes O(sort(|Gi|)) I/Os. The total cost for all graphsG0, . . . , Gp is therefore O(sort(N)).

Computing the edge separator and fundamental cycles. To obtain the edge separator Xi

of Di, we root Di at an arbitrary leaf, compute a preorder numbering of Di w.r.t. the chosen root,and direct all edges in Di from children to parents. This can be done using the Euler tour techniqueand list ranking [14]. Then we use time-forward processing [14] to carry out the procedure of [2]for partitioning Qi into subgraphs of weight at most tw(G) (see the end of Section 6.1.3). Giventhe edge separator Xi of Di produced by this procedure, we mark the endpoints of all edges e ∈ Gi

such that e∗ ∈ Xi. Now we process Ti bottom-up (using time-forward processing again) to identifyall vertices of Gi that belong to the fundamental cycles defined by the edges in Xi. We add thesevertices to S2.

As applying the Euler-tour technique, list-ranking, and time-forward processing to Di takeO(sort(|Di|)) = O(sort(|Gi|)) I/Os, the computation of the edge separator Xi takes O(sort(|Gi|))I/Os. The marking of the endpoints of edges that are dual to edges in Xi takes O(sort(|Gi|)) I/Os.The final application of time-forward processing to extract the vertex set of the fundamental cy-cles in F(Xi) takes another O(sort(|Gi|)) I/Os. Hence, the total cost of this last phase of thecomputation of S2 is O(sort(N)).

Since we have shown that the computation of both S1 and S2 can be carried out in O(sssp(N))I/Os, we obtain

31

Page 32: I/O-Efficient Algorithms for Planar Graphs I: Separatorspeople.scs.carleton.ca/~maheshwa/papers/separators.pdf · 2009. 10. 14. · I/O-efficient graph algorithms have received considerable

Theorem 6.2 Given a planar graph G = (V,E), a cost function c : V → R+, and a weight function

w : V → R+, a separator S as in Theorem 6.1 can be computed in O(sssp(N)) I/Os, provided that

M = Ω(B2 log2 B).

The memory requirements of the algorithm are inherited from the separator algorithm of Sec-tion 4 and the shortest-path algorithm of [8]. In particular, the latter requires a proper Θ(B2)-partition as part of the input and uses Θ(B2) main memory to carry out its computation. Thealgorithm from Section 4 can be used to produce the desired partition in O(sort(N)) I/Os, providedthat M = Ω(B2 log2 B).

Actually, things are a little more complicated: Graph G, once triangulated, is not necessarily ofbounded degree and, thus, does not necessarily have a regular proper Θ(B2)-partition, but this iswhat the shortest-path algorithm of [8] requires. If G is embedded, this problem can be solved byapplying the following standard transformation to obtain a graph G′ of degree at most three andof size O(N) from G: For every vertex v with deg(v) = k > 3, let w1, . . . , wk be the neighboursof v, clockwise around v. Then replace v with a directed cycle (v1, . . . , vk), replace edges vwi andwiv with edges viwi and wivi of the same weight, and assign weight 0 to every edge vivi+1 andvkv1. Then distG(v,w) = distG′(vi, wj), for any two vertices v and w of G and any two indices1 ≤ i ≤ deg(v) and 1 ≤ j ≤ deg(w). Thus, we can compute shortest paths in G by computingshortest paths in G′. Using the algorithm from Section 5, we can obtain a regular proper Θ(B2)-partition of G′, and then we use the shortest-path algorithm of [8] to compute shortest paths inG′. Since |G′| = O(N), this affects the complexity of the algorithm by only a constant factor. Theplanar embedding required to perform this transformation can be computed in O(sort(N)) I/Osusing the embedding algorithm in the companion paper [27].

6.3 Edge Separators

The final result of this section is an I/O-efficient edge separator algorithm, which is an immediateconsequence of Theorem 6.2. It is shown in [3] that Theorem 6.1 can also be used to computeoptimal weighted edge separators of planar graphs: Let the cost of a vertex be equal to its degree.Then compute a vertex separator S of low cost. For every vertex x ∈ S, add all edges incident tox to the edge separator X. It is easy to verify that the computation of the vertex costs and theextraction of set X from set S can be carried out in O(sort(N)) I/Os. Hence, we obtain

Theorem 6.3 Let G = (V,E) be a planar graph, let 0 < t < 1 be a real number, and let w : V → R+

be a weight function so that w(x) ≤ tw(G), for all x ∈ V . Then there exists a set X of at most

4√

2(∑

v∈V (deg(v))2)

/t edges so that no connected component of G − X has weight exceeding

tw(G). Such an edge separator X can be found in O(sssp(N)) I/Os, provided that M ≥ B2 log2 B.

7 Improving the Memory Requirements

In this final section of the paper, we argue how to reduce the memory requirements of our algo-rithm from Section 4 to M ≥ max(196B2, r). The resulting algorithm also produces a separatorsignificantly smaller than the one produced by the algorithm in Section 4. However, these twoimprovements come at the expense of increasing the complexity of the algorithm from O(sort(N))to O(sssp(N)); that is, the I/O-complexity increases by only a constant factor, but the internal-memory computation increases significantly.

32

Page 33: I/O-Efficient Algorithms for Planar Graphs I: Separatorspeople.scs.carleton.ca/~maheshwa/papers/separators.pdf · 2009. 10. 14. · I/O-efficient graph algorithms have received considerable

Recall the reason why M ≥ 56r log2 B is required for the algorithm in Section 4: If we chooseto compute an r′-partition of each graph Gi in the hierarchy, then the separator vertices introducedat each level correspond to O(N/

√r′) vertices in G; no better upper bound is known. Since there

are ⌊log B⌋ levels in the hierarchy, and we want a separator of size O(N/√

r), we have to ensurethat O((N/

√r′) log B) = O(N/

√r), which we achieve by choosing r′ = r log2 B. This now forces

us to use 56r log2 B main memory because, as argued in Section 4, every piece of Gi − S′i has size

at most 56r log2 B, and we need to load each such piece into memory to partition it into smallerpieces.

So the central problem is that, if we were to choose r′ = r, then every level in the hierarchyadds O(N/

√r) vertices to the final separator of G, that is, we would obtain a separator that is by a

factor log B too big. Next we explain how to avoid this problem by using a recursive bootstrappingapproach.

The centerpiece of the algorithm is the separator algorithm from Section 6, now using vertexcosts and weights equal to 1. This algorithm takes O(sort(N)) I/Os using only Θ(B) main memory,if we ignore the costs and memory requirements of computing an embedding of G, computing theshortest-path tree T of G, and computing the shortest-path trees T0, . . . , Tp for the different layersG0, . . . , Gp.

Given appropriate separator decompositions, the computation of the embedding and the shortest-path computations take O(sssp(N)) I/Os and require Θ(B2) main memory. Our strategy is toobtain these separator decompositions by recursive application of the separator algorithm.

Embedding G and computing T . To compute a planar embedding of G, we require a nor-mal Θ(B2)-partition P = (S, G1, . . . , Gp) of G. We obtain this partition by applying theuniform graph contraction procedure to G, recursively computing a normal B2-partition P =(S, G1, . . . , Gp) of the resulting graph G, and then choosing S to be the set of vertices inG represented by the vertices in S. To obtain G from G, we assign weight 1 to every ver-tex in G and choose a weight threshold u, to be specified later, in the uniform graph contrac-tion procedure. Then |S| ≤ u|S| = O(N/B), |Gi| ≤ u|Gi| = O(B2), for all 1 ≤ i ≤ p, and∑p

i=1 |N (Gi)| ≤ u∑p

i=1 |N (Gi)| = O(N/B). Thus, P is a normal Θ(B2)-partition of G.Given a planar embedding of G, we can now construct the degree-3 graph G′ from G. We

apply the procedure we have just described to obtain a normal Θ(B2)-partition for G′. Using theprocedures from Sections 4.3 and 5, this partition can be augmented to obtain a regular properB2-partition of G′, which we then use to compute the shortest-path tree T .

Computing T0, . . . , Tp. In order to compute shortest-path trees T0, . . . , Tp, we apply the sameprocedure as above to each graph Gi, except that Gi is already embedded. Hence, we only have tocompute a regular proper B2-partition of G′

i, in order to compute Ti.

Putting it all together. To bound the cost of our recursive procedure, we first bound the sizes ofthe different graphs involved in the computation: Graph G has N vertices. Graph G′ has at most 6Nvertices, at most two per edge in G. Graphs G0, . . . , Gp contain at most N vertices. Thus, graphsG′

0, . . . , G′p contain at most 6N vertices. The total size of graphs G,G′, G0, . . . , Gp, G

′0, . . . G

′p is

therefore O(N). This implies that all steps of the algorithm, excluding the recursive computation ofproper B2-partitions for graphs G, G′, G′

1, . . . , G′p, take O(sssp(N)) I/Os and require uB2 = Θ(B2)

33

Page 34: I/O-Efficient Algorithms for Planar Graphs I: Separatorspeople.scs.carleton.ca/~maheshwa/papers/separators.pdf · 2009. 10. 14. · I/O-efficient graph algorithms have received considerable

main memory, that is, the cost of the algorithm is given by the recurrence

T (N) = O(sssp(N)) + T (|G|) + T (|G′|) +

p∑

i=0

T (|G′i|).

If we choose u = 196, graph G contains at most |G|/98 heavy vertices and, by Lemma 3.1, has sizeat most |G|/14. Similarly, |G′| ≤ |G′|/14 and, for 0 ≤ i ≤ p, |G′

i| ≤ |G′i|/14. Thus, we have

|G|+ |G′|+p

i=0

|G′i| ≤

|G|14

+|G′|14

+

p∑

i=0

|G′i|

14

≤ N

14+

6N

14+

6N

14

=13N

14,

and the recurrence solves to T (N) = O(sssp(N)). This proves that we can compute a t-vertexseparator and, thus, a t-edge separator, for any 0 < t < 1, in O(sssp(N)) I/Os, provided thatM ≥ 196B2. In order to obtain a (regular) proper r-partition from an (r/N)-separator, we stillhave to be able to load subgraphs of size O(r) into internal memory, that is, we cannot do withless than r main memory. This proves the following result.

Theorem 7.1 The partitions in Theorems 4.1 and 5.1 can be computed in O(sssp(N)) I/Os, pro-vided that M ≥ max(196B2, r). The separators in Theorems 6.2 and 6.3 can be computed inO(sssp(N)) I/Os, provided that M ≥ 196B2.

The memory requirements in Theorem 7.1 can be reduced further to M ≥ max(cB2, r) andM ≥ cB2, for an arbitrarily small constant c > 0. Indeed, 196B2 memory is required because werecursively compute B2-partitions of the compressed graphs, which correspond to 196B2-partitionsin the uncompressed graphs. Instead, we can compute cB2/196-partitions of the compressed graphs,thereby obtaining cB2-partitions of the uncompressed graphs. This affects the size of the producedseparators and, thus, the performance of the embedding and shortest-path algorithms by only aconstant factor, but reduces the memory requirements.

8 Conclusions

In this paper, we have demonstrated that different types of separator decompositions of planargraphs can be computed I/O-efficiently. Using these partitions, a wide variety of fundamentalproblems on planar graphs can be solved I/O-efficiently.

A number of open questions remain, however. First of all, the constant factors in our algorithms—in terms of the size of the produced separator, the memory requirements, and the efficiency—arebig. In order for the algorithms to be of practical value, these constant factors have to be reduced.Even though the individual steps of the algorithm are fairly simple, the algorithm consists of toomany of them. This impacts the efficiency of the algorithm—for example, only a small number ofsorting steps are affordable in practice—and makes the algorithm tedious to implement. From apractical point of view, it would therefore be desirable to have a simpler, even possibly theoreticallysuboptimal algorithm for computing separators I/O-efficiently. On the theoretical side, the mostimportant open question is whether separators can be computed in O(sort(N)) I/Os using o(B2)main memory.

34

Page 35: I/O-Efficient Algorithms for Planar Graphs I: Separatorspeople.scs.carleton.ca/~maheshwa/papers/separators.pdf · 2009. 10. 14. · I/O-efficient graph algorithms have received considerable

References

[1] A. Aggarwal and J. S. Vitter. The input/output complexity of sorting and related problems.Communications of the ACM, pages 1116–1127, September 1988.

[2] L. Aleksandrov and H. Djidjev. Linear algorithms for partitioning embedded graphs of boundedgenus. SIAM Journal of Discrete Mathematics, 9:129–150, 1996.

[3] L. Aleksandrov, H. Djidjev, H. Guo, and A. Maheshwari. Partitioning planar graphs with costsand weights. In Proceedings of the 4th Workshop on Algorithm Engineering and Experiments,volume 2409 of Lecture Notes in Computer Science, pages 98–107. Springer-Verlag, 2002.

[4] L. Arge. The buffer tree: A technique for designing batched external data structures. Algo-rithmica, 37(1):1–24, 2003.

[5] L. Arge, G. S. Brodal, and L. Toma. On external-memory MST, SSSP and multi-way planargraph separation. Journal of Algorithms, 53(2):186–206, 2004.

[6] L. Arge, U. Meyer, L. Toma, and N. Zeh. On external-memory planar depth first search.Journal of Graph Algorithms and Applications, 7(2):105–129, 2003.

[7] L. Arge and L. Toma. Simplified external memory algorithms for planar DAGs. In Proceedingsof the 9th Scandinavian Workshop on Algorithm Theory, volume 3111 of Lecture Notes inComputer Science, pages 493–503. Springer-Verlag, 2004.

[8] L. Arge, L. Toma, and N. Zeh. I/O-efficient algorithms for planar digraphs. In Proceedings ofthe 15th ACM Symposium on Parallelism in Algorithms and Architectures, pages 85–93, 2003.

[9] L. Arge and N. Zeh. I/O-efficient strong connectivity and depth-first search for directed planargraphs. In Proceedings of the 44th IEEE Symposium on Foundations of Computer Science,pages 261–270, 2003.

[10] K. Booth and G. Lueker. Testing for the consecutive ones property, interval graphs, and graphplanarity using PQ-treealgorithms. Journal of Computer and System Sciences, 13:335–379,1976.

[11] J. Boyer and W. Myrvold. Stop minding your P’s and Q’s: A simplified O(n) planar embeddingalgorithm. In Proceedings of the 10th Annual ACM-SIAM Symposium on Discrete Algorithms,pages 140–146, 1999.

[12] A. Broder, R. Kumar, F. Manghoul, P. Raghavan, S. Rajagopalan, R. S. andA. Tomkins, andJ. Wiener. Graph structure in the web. In Proceedings of the 9th International World-WideWeb Conference, 2000. http://www9.org.

[13] A. L. Buchsbaum and J. R. Westbrook. Maintaining hierarchical graph views. In Proceedingsof the Annual ACM-SIAM Symposium on Discrete Algorithms, pages 566–575, 2000.

[14] Y.-J. Chiang, M. T. Goodrich, E. F. Grove, R. Tamassia, D. E. Vengroff, and J. S. Vitter.External-memory graph algorithms. In Proceedings of the 6th Annual ACM-SIAM Symposiumon Discrete Algorithms, pages 139–149, January 1995.

35

Page 36: I/O-Efficient Algorithms for Planar Graphs I: Separatorspeople.scs.carleton.ca/~maheshwa/papers/separators.pdf · 2009. 10. 14. · I/O-efficient graph algorithms have received considerable

[15] K. Diks, H. N. Djidjev, O. Sykora, and I. Vrto. Edge separators of planar and outerplanargraphs with applications. Journal of Algorithms, 14:258–279, 1993.

[16] H. N. Djidjev. Partitioning graphs with costs and weights on vertices: Algorithms and appli-cations. Algorithmica, 28:51–75, 2000.

[17] H. N. Djidjev and J. R. Gilbert. Separators in graphs with negative and multiple vertexweights. Algorithmica, 23:57–71, 1999.

[18] S. Even and R. E. Tarjan. Computing an st-numbering. Theoretical Computer Science, 2:339–344, 1976.

[19] G. N. Frederickson. Fast algorithms for shortest paths in planar graphs, with applications.SIAM Journal on Computing, 16(6):1004–1022, December 1987.

[20] J. R. Gilbert, J. P. Hutchinson, and R. E. Tarjan. A separator theorem for graphs of boundedgenus. Journal of Algorithms, 5:391–407, 1984.

[21] M. T. Goodrich. Planar separators and parallel polygon triangulation. Journal of Computerand System Sciences, 51(3):374–389, 1995.

[22] F. Harary. Graph Theory. Addison-Wesley, 1969.

[23] J. Hopcroft and R. E. Tarjan. Efficient planarity testing. Journal of the ACM, 21(4):549–568,1974.

[24] D. Hutchinson, A. Maheshwari, and N. Zeh. An external memory data structure for shortestpath queries. Discrete Applied Mathematics, 126:55–82, 2003.

[25] A. Lempel, S. Even, and I. Cederbaum. An algorithm for planarity testing of graphs. InTheory of Graphs: International Symposium (Rome 1966), pages 215–232, New York, 1967.Gordon and Breach.

[26] R. J. Lipton and R. E. Tarjan. A separator theorem for planar graphs. SIAM Journal onApplied Mathematics, 36(2):177–189, 1979.

[27] A. Maheshwari and N. Zeh. I/O-efficient algorithms for planar graphs II: Planarity testingand planar embedding. SIAM Journal on Computing, 2004. Submitted.

[28] U. Meyer, P. Sanders, and J. Sibeyn, editors. Algorithms for Memory Hierarchies: AdvancedLectures, volume 2625 of Lecture Notes in Computer Science. Springer-Verlag, 2003.

[29] G. L. Miller. Finding small simple cycle separators for 2-connected planar graphs. Journal ofComputer and System Sciences, 32:265–279, 1986.

[30] K. Munagala and A. Ranade. I/O-complexity of graph algorithms. In Proceedings of the 10thAnnual ACM-SIAM Symposium on Discrete Algorithms, pages 687–694, January 1999.

[31] W. T. Tutte. Graph Theory. Cambridge University Press, 2001. First published by Addison-Wesley, 1984.

36

Page 37: I/O-Efficient Algorithms for Planar Graphs I: Separatorspeople.scs.carleton.ca/~maheshwa/papers/separators.pdf · 2009. 10. 14. · I/O-efficient graph algorithms have received considerable

[32] J. S. Vitter. External memory algorithms and data structures: Dealing with massive data.ACM Computing Surveys, 33(2):209–271, 2001.

[33] N. Zeh. I/O-Efficient Algorithms for Shortest Path Related Problems. PhD thesis, School ofComputer Science, Carleton University, 2002.

37