Planarizing an Unknown Surface
Abstract
It has been recently shown that any graph of genus can be stochastically embedded into a distribution over planar graphs, with distortion [Sidiropoulos, FOCS 2010]. This embedding can be computed in polynomial time, provided that a drawing of the input graph into a genus surface is given.
We show how to compute the above embedding without having such a drawing. This implies a general reduction for solving problems on graphs of small genus, even when the drawing into a small genus surface is unknown. To the best of our knowledge, this is the first result of this type.
1 Introduction
The genus of a graph is a parameter that quantifies how far it is from being planar. Informally, a graph has genus , for some , if it can be drawn without any crossings on the surface of a sphere with additional handles (see Section 1.4). For example, a planar graph has genus , and a graph that can be drawn on a torus has genus at most .
Planar graphs exhibit properties that give rise to improved algorithmic solutions for numerous problems (see, for example [Bak94]). Because of their similarities to planar graphs, graphs of small genus enjoy similar algorithmic characteristic. More precisely, algorithms for planar graphs can usually be extended to graphs of bounded genus, with a small loss in efficiency or quality of the solution (e.g. [CEN09]).
Unfortunately, such extensions typically suffer from two main difficulties. First, for different problems, one typically needs to develop complicated, and adhoc techniques. Second, a perhaps more challenging issue is that essentially all known algorithms for graphs of small genus require that a drawing of the input graph into a small genus surface is given. In general, computing a drawing of a graph into a surface of minimum genus is NPhard [Tho89, Tho93]. Moreover, the currently bestknown approximation algorithm for this problem is only a trivial approximation that follows by bounds on the Euler characteristic. This has been improved to approximation for graphs of bounded degree [CKK97].
The first of the above two obstacles has been recently addressed for some problems by Sidiropoulos [Sid10], who showed that any graph of genus can be embedded into a distribution over planar graphs, with distortion (see Section 1.4 for definitions). This result implies a general reduction for a large class of geometric optimization problems from instances on genus graphs, to corresponding ones on planar graphs, with a loss factor in the approximation guarantee.
Unfortunately, the algorithm from [Sid10] can compute the above embedding in polynomial time, only if a drawing of the input graph into a small genus surface is given. We show how to compute this embedding even when the drawing of the input graph is unknown. In particular, this implies that the above reduction for solving problems on graphs of small genus, can be performed even on graphs for which we don’t have a drawing into a small genus surface. The statement of our main embedding result follows.
Theorem 1.1 (Main result)
There exists a polynomial time algorithm which given a graph of genus , computes a stochastic embedding of into planar graphs, with distortion . In particular, the algorithm does not require a drawing of as part of the input.
1.1 Applications
The main application of our result is a general reduction from a class of optimization problems on genus graphs, to their restriction on planar graphs. This is the same reduction obtained in [Sid10], only here we don’t require a drawing of the input graph. For completeness, we state precisely the reduction, as given in [Sid10] (see also [Bar96]). Let be a set, a set of nonnegative vectors corresponding to all feasible solutions for a minimization problem, and . Then, we define the linear minimization problem to be the computational problem where we are given a graph , and we are asked to find , minimizing
Observe that this definition captures a very general class of problems. For example, MST can be encoded by letting be the set of indicator vectors of the edges of all spanning trees on , and the allones vector. Similarly, one can easily encode problems such as TSP, FacilityLocation, Server, BiChromatic Matching, etc.
The main Corollary of our embedding result can now be stated as follows.
Corollary 1
Let be a linear minimization problem. If there exists a polynomialtime approximation algorithm for on planar graphs, then there exists a randomized polynomialtime approximation algorithm for on graphs of genus , even when the drawing of the input graph is unknown.
1.2 Overview of the Algorithm
We now give a highlevel overview of our algorithm. Consider a graph . Let us say that a collection of shortest paths in is a planarizing set of paths, if the graph is planar. It was shown by Sidiropoulos [Sid10] that any graph having a planarizing set of paths of size , admits a stochastic embedding into planar graphs, with distortion . Moreover, given such a set of planarizing paths, the embedding can be computed in polynomial time. It follows by the work of Eppstein [Epp03], and Erickson and Whittlesey [EW05], that for any graph of genus , that there exists a planarizing set of paths, of size . However, all known algorithms for computing this planarizing set require a drawing of the graph into a surface of genus . Since we don’t know how to compute a drawing of a graph into a minimumgenus surface in polynomial time, all known algorithms are not applicable in our case.
Our main technical contribution is showing how to compute in polynomial time a planarizing set of paths of approximately optimal size (up to a factor) in an arbitrary graph. For a graph , we say that a collection of shortest paths having a common endpoint is a balanced set of paths if is a balanced vertexseparator of . That is, removing all paths in from , leaves a graph where every connected component is at most half the size of . Our highlevel approach is as follows. We find and remove a “small” balanced set of paths in . Then we compute connected components in the obtained graph. In each nonplanar connected component, we again find and remove a balanced set of paths. We repeat this procedure until all components are planar. Finally, we output the planarizing set of paths that consists of all paths that we removed from the graph.
In order for this approach to work, we first prove that in a (possibly vertexweighted) graph of genus , there exists a balanced set of paths of size . Next, we show how to compute in polynomial time a balanced set of paths of approximately optimal size in an arbitrary graph . As outlined above, we then recursively use this as a subroutine to find a set of planarizing paths. We begin with a graph of genus (for which we don’t have a drawing into a genus surface), and inductively build in steps. At the first step, we compute a balanced set of paths in . We add these paths to . At every subsequent step , let be the graph obtained from after removing all the paths we have computed so far, i.e. . Since has genus , graph has at most nonplanar connected components. For every such nonplanar component, we compute a balanced set of paths and add it to . We show that after every step, the size of the largest nonplanar component reduces by at least a constant factor. Therefore, after steps, we obtain the desired planarizing set of paths.
1.3 Related Work
Inspired by Bartal’s stochastic embedding of general metrics into trees [Bar96], Indyk and Sidiropoulos [IS07] showed that every metric on a graph of genus can be stochastically embedded into a planar graph with distortion (see Section 1.4 for a formal definition of stochastic embeddings). The above bound was later improved by Borradaile, Lee, and Sidiropoulos [BLS09], who obtained an embedding with distortion . Subsequently, Sidiropoulos [Sid10] gave an embedding with distortion , matching the lower bound from [BLS09]. The embeddings from [IS07], and [Sid10] can be computed in polynomial time, provided that the drawing of the graph into a small genus surface is given. Computing the embedding from [BLS09] requires solving an NPhard problem, even when the drawing is given.
1.4 Preliminaries
Throughout the paper, we consider graphs with nonnegative edge lengths. For a tree with root , and for we denote by the unique path in between and .
Graphs on surfaces
Let us recall some notions from topological graph theory (an indepth exposition can be found in [MT01]). A surface is a compact connected 2dimensional manifold, without boundary. For a graph we can define a onedimensional simplicial complex associated with as follows: The cells of are the vertices of , and for each edge of , there is a cell in connecting and . A drawing of on a surface is a continuous injection . The genus of a surface is the maximum cardinality of a collection of simple closed nonintersecting curves in , such that is connected. The genus of a graph is the minimum , such that can be drawn into a surface of genus . Note that a graph of genus is a planar graph. We remark that we make no distinction between orientable, and nonorientable genus, since all of our results hold in both settings.
Metric embeddings
A mapping between two metric spaces and is noncontracting if for all . If is any finite metric space, and is a family of finite metric spaces, we say that admits a stochastic embedding into if there exists a random metric space and a random noncontracting mapping such that for every ,
(1) 
The infimal such that (1) holds is the distortion of the stochastic embedding. A detailed exposition of results on metric embeddings can be found in [Ind01] and [Mat02].
2 Path Separators in Embedded Graphs
For a graph , a real , and a set we say that is an balanced vertex separator for if every connected component of contains at most vertices. It is also called simply balanced vertex separator, when .
For a vertexweighted graph with weight function , for every we use the notation . Similarly to the unweighted case, we say that a set is a balanced vertex separator for a weighted graph if for every connected component of we have .
Theorem 2.1 (Lipton & Tarjan [Lt79], Thorup [Tho04])
Let be a planar graph, let , and let be a spanning tree of with root . Then, there exist , such that is a balanced vertex separator for . Moreover, the vertices and can be computed in polynomial time.
We will use a slight modification of Theorem 2.1, for the case of weighted graphs. The proof is a straightforward extension to the one due to Thorup [Tho04], which is based on the argument of Lipton and Tarjan [LT79].
Lemma 1
Let be a planar graph, let , and let be a spanning tree of with root . Let . Then, there exist , such that is a balanced vertex separator for . Moreover, the vertices and can be computed in polynomial time.
Theorem 2.2 (Erickson & Whittlesey [Ew05], Eppstein [Epp03])
Let be a graph of genus , and let be an embedding of into a surface of genus . Let , and let be a spanning tree of with root . Then, there exist edges , such that is planar. Moreover, the topological space is homeomorphic to an open disk.
We are now ready to prove the main result of this section.
Lemma 2 (Existence of path separators in embedded graphs)
Let be a weighted graph of genus , with weight function . Let , and let be a spanning tree of with root . Then, there exists , with , such that is a balanced vertex separator for .
Proof
The case follows by Lemma 1, so we may assume that . Fix an embedding of into a surface of genus . By Theorem 2.2 there exist , such that the topological space is homeomorphic to an open disk. Let
Note that . Let be the graph obtained from by contracting into a single vertex . Since is an open disk, it follows that is planar.
Let be the subgraph of induced by after contracting . Since is a spanning subgraph of , it follows that is a spanning subgraph of . Indeed, the set of vertices spans is a connected subtree of . Therefore, after contracting , the subgraph induced by is still a tree. Thus, is a spanning subtree of . We consider being rooted at .
Define a weight function such that for every ,
By Lemma 1 it follows that there exist such that is a balanced vertex separator for .
Let . Observe that . Moreover, for any , we have . Thus, the set of connected components of is the same as the set of connected components of . Let be a connected component of . We have
Thus, is a balanced vertex separator for , as required. ∎
3 Computing Path Separators in Arbitrary Graphs
Recall the definition of a caterpillar decomposition of a tree.
Definition 1 (Caterpillar decomposition [Mat99, Cs02])
A caterpillar decomposition of a rooted tree is a family of paths , satisfying the following conditions:

(i) Every is a subpath of a root–leaf path.

(ii) For every , we have .

(iii) .
Lemma 3 (See [Mat99, Cs02])
For every rooted tree , there exists a caterpillar decomposition , such that every root–leaf path crosses at most paths from . Moreover, this decomposition can be found in polynomial time.
We are now ready to prove that main result of this section.
Lemma 4 (Computing approximate path separators)
Let be a graph, and . Let , and let be a spanning tree of with root . Suppose that there exists , such that is a balanced vertex separator for . Then we can compute in polynomial time a set with , such that is a balanced vertex separator for .
Proof
We reduce the problem to the problem of finding a vertex separator in an auxiliary graph. Using Lemma 3 we construct a caterpillar decomposition of such that every root–leaf path crosses at most paths from . We define an auxiliary graph on the set as follows: and are connected with an edge in if there is an edge between sets and in . We assign each weight equal to the total weight of all vertices of . Note that then the total weight of all vertices in equals .
Observe that for every the induced graph is connected if and only if the induced graph , where , is connected. Consequently, if are connected components of (for some ) then sets (for ) are connected components of where ; moreover, the weight of each equals the weight of . Therefore, is a balanced vertex separator in if and only if is a balanced vertex separator in .
We now prove that there is a balanced vertex separator in of size . Let . First, we show that is a balanced vertex separator in . Denote . Observe that . Indeed, consider . Then for some . Let be the path in that contains . Then intersects at vertex and therefore . Hence . We conclude that . Since is a balanced vertex separator in , set is also a balanced vertex separator in . Hence is a balanced vertex separator in . Now we upper bound the size of . Note that for every , we have (by Lemma 3). Thus we have, . We proved that there is a balanced vertex separator in of size .
We use the algorithm of Feige, Hajiaghayi and Lee [FHL08] to find a approximation for the optimal balanced vertex separator in . We get a balanced vertex separator in of size at most .
Finally, we define the set . For every path , let be a leaf of such that is a subset of . Let . Note that . Since is a balanced separator in , the set is a balanced separator in , and therefore is a balanced separator in . ∎
4 Computing Planarizing Sets of Paths
Lemma 5 (Computing a planarizing set of paths)
Let be an vertex graph of genus . Let , and let be a spanning subtree of with root . Then, we can compute in polynomial time a set , with , such that the graph is planar.
Proof
We inductively construct a sequence , for some , where for every , we have . The resulting desired set will be .
For the basis of the induction, we set .
Let , and suppose that has already been constructed. We show how to construct . Let be the set of connected components of . Let also be the set of nonplanar components in . Note that is the only component in . For every component we define a function such that for every ,
By Lemma 2 it follows that there exists , with , such that is a balanced vertex separator for . Therefore, by Lemma 4 we can compute in polynomial time a set , with
and such that is an balanced vertex separator for . We set
This concludes the inductive construction of the sequence .
We next show that for some , the set is as required. Consider some , and let be a nonplanar connected component of . Observe that there exists a connected component such that . Since is nonplanar, it follows that is also nonplanar, and thus . By the construction, the set contains the set , where is a balanced vertex separator for . It follows that . Thus, the size of every nonplanar connected component in is at most . This implies in particular that for , the set does not contain any nonplanar connected components, and therefore the graph is planar.
It remains to upper bound . Since has genus , we have that for every , the set contains at most nonplanar connected components, i.e. . Therefore,
as required. ∎
5 Putting Everything Together
The next lemma follows by the work of Sidiropoulos [Sid10].
Lemma 6 (Sidiropoulos [Sid10])
Let be a graph, and . Let be a collection of shortest paths in , having as a common endpoint. Suppose that is planar. Then, admits a stochastic embedding into planar graphs, with distortion . Moreover, if the paths are given, then we can sample from the stochastic embedding in polynomial time.
Theorem 5.1 (Kawarabayashi, Mohar & Reed [iKMR08])
There exists an algorithm which given a graph of genus , computes a drawing of into a surface of genus , in time .
Theorem 5.2 (Main result)
There exists a polynomial time algorithm which given a graph of genus , computes a stochastic embedding of into planar graphs, with distortion . In particular, the algorithm does not require a drawing of as part of the input.
Proof
We can use the algorithm of Kawarabayashi, Mohar & Reed from Theorem 5.1 to test whether in polynomial time. If , then the algorithm from Theorem 5.1 returns a drawing of into a surface of genus . Since we have a drawing of into a surface of genus , we can use the algorithm of Sidiropoulos [Sid10], to compute the required embedding.
Otherwise, if , we proceed as follows. Let be an arbitrary vertex in , and let be a shortestpath tree in , with root . By Lemma 5 we can compute a set , with , such that the graph is planar. Since for every , the path has as an endpoint, it follows that we can use Lemma 6 with the collection of paths , to compute in polynomial time a stochastic embedding into planar graphs, with distortion , as required. ∎
References
 B. S. Baker. Approximation algorithms for npcomplete problems on planar graphs. J. ACM, 41(1):153–180, 1994.
 Y. Bartal. Probabilistic approximation of metric spaces and its algorithmic applications. In 37th Annual Symposium on Foundations of Computer Science (Burlington, VT, 1996), pages 184–193. IEEE Comput. Soc. Press, Los Alamitos, CA, 1996.
 G. Borradaile, J. R. Lee, and A. Sidiropoulos. Randomly removing g handles at once. In Proc. 25th Annual ACM Symposium on Computational Geometry, 2009.
 E. W. Chambers, J. Erickson, and A. Nayyeri. Homology flows, cohomology cuts. In Proc. 41st Annual ACM Symposium on Theory of Computing, 2009.
 Jianer Chen, Saroja P. Kanchi, and Arkady Kanevsky. A note on approximating graph genus. Inf. Process. Lett., 61(6):317–322, 1997.
 M. Charikar and A. Sahai. Dimension reduction in the norm. In Foundations of Computer Science, 2002. Proceedings. The 43rd Annual IEEE Symposium on, pages 551–560. IEEE, 2002.
 D. Eppstein. Dynamic generators of topologically embedded graphs. In Proceedings of the fourteenth annual ACMSIAM symposium on Discrete algorithms, pages 599–608. Society for Industrial and Applied Mathematics, 2003.
 J. Erickson and K. Whittlesey. Greedy optimal homotopy and homology generators. In Proceedings of the sixteenth annual ACMSIAM symposium on Discrete algorithms, pages 1038–1046. Society for Industrial and Applied Mathematics, 2005.
 U. Feige, M.T. Hajiaghayi, and J.R. Lee. Improved approximation algorithms for minimum weight vertex separators. SIAM J. Comput., 38(2):629–657, 2008.
 Ken ichi Kawarabayashi, Bojan Mohar, and Bruce A. Reed. A simpler linear time algorithm for embedding graphs into an arbitrary surface and the genus of graphs of bounded treewidth. In FOCS, pages 771–780, 2008.
 P. Indyk. Tutorial: Algorithmic applications of lowdistortion geometric embeddings. Symposium on Foundations of Computer Science, 2001.
 P. Indyk and A. Sidiropoulos. Probabilistic embeddings of bounded genus graphs into planar graphs. In Proc. 23rd Annual ACM Symposium on Computational Geometry, 2007.
 R.J. Lipton and R.E. Tarjan. A separator theorem for planar graphs. SIAM Journal on Applied Mathematics, 36(2):177–189, 1979.
 J. Matoušek. On embedding trees into uniformly convex Banach spaces. Isr. J. Math., 114:221–237, 1999.
 J. Matousek. Lectures on Discrete Geometry. Springer, 2002.
 B. Mohar and C. Thomassen. Graphs on Surfaces. John Hopkins, 2001.
 A. Sidiropoulos. Optimal stochastic planarization. In 2010 IEEE 51st Annual Symposium on Foundations of Computer Science, pages 163–170. IEEE, 2010.
 Carsten Thomassen. The graph genus problem is npcomplete. J. Algorithms, 10(4):568–576, 1989.
 Carsten Thomassen. Triangulating a surface with a prescribed graph. J. Comb. Theory, Ser. B, 57(2):196–206, 1993.
 M. Thorup. Compact oracles for reachability and approximate distances in planar digraphs. Journal of the ACM (JACM), 51(6):993–1024, 2004.