
An SPQR-Tree Approach to Decide Special Cases of Simultaneous Embedding with Fixed Edges J. Joseph Fowler1, Carsten Gutwenger2, Michael J¨unger3, Petra Mutzel2, and Michael Schulz3 1 Department of Computer Science, University of Arizona, USA [email protected] 2 Department of Computer Science, Technische Universit¨at Dortmund, Germany {petra.mutzel,carsten.gutwenger}@cs.tu-dortmund.de 3 Department of Computer Science, University of Cologne, Germany† {mjuenger,schulz}@informatik.uni-koeln.de Abstract. We present a linear-time algorithm for solving the simulta- neous embedding problem with fixed edges (SEFE) for a planar graph and a pseudoforest (a graph with at most one cycle) by reducing it to the following embedding problem: Given a planar graph G, a cycle C of G, and a partitioning of the remaining vertices of G, does there exist a planar embedding in which the induced subgraph on each vertex partite of G \ C is contained entirely inside or outside C? For the latter prob- lem, we present an algorithm that is based on SPQR-trees and has linear running time. We also show how we can employ SPQR-trees to decide SEFE for two planar graphs where one graph has at most two cycles and the intersection is a pseudoforest in linear time. These results give rise to our hope that our SPQR-tree approach might eventually lead to a polynomial-time algorithm for deciding the general SEFE problem for two planar graphs. 1 Introduction Many practical graph drawing applications demand planar embeddings of a graph that yield additional constraints. One natural application is in obtain- ing simultaneous drawings of a set of related planar graphs. This is useful in the areas of bioinformatics, social sciences and software engineering. A single drawing can be insufficient in depicting complex interrelationships of different models of a system. Instead, multiple drawings may be required, each from a different perspective. The challenge is to preserve the “mental map” of the com- mon structures in each layout so that the scientist can easily navigate between the different diagrams. To do this, common vertices and edges are placed and drawn equally in each drawing. This can be modeled via embedding constraints. Various embedding constraints have already been studied in [2, 5, 6]; Gutweng- er et al. [12] apply SPQR-trees to efficiently decide if a graph has a combinatorial embedding with respect to a set of hierarchical constraints modeling grouping † Partially supported by the German Science Foundation (JU204/11-1). and fixed orders of edges around a vertex. We instead address a problem that cannot be modeled by any of the previous approaches. Given a planar graph G, a cycle C ⊂ G, and a partition P of all vertices of G \ C, we ask whether there is a planar embedding of G where all vertices v ∈ p for some part p ∈ P lie completely inside or outside C. We give an efficient decision algorithm using SPQR-trees that can be used to solve a simultaneous embedding problem. Given a set of planar graphs {G1, G2,...,Gn} on the same vertex set, a simultaneous embedding with fixed edges (SEFE) of {Gi} are planar drawings Γi of Gi, i ∈ [1..n], such that all vertices and all edges belonging to two graphs Gi and Gj are drawn identically in the corresponding drawings Γi and Γj . SEFE and its variant of simultaneous geometric embedding (SGE) with planar straight-line drawings as well as the other variations of simultaneous embedding have become an important branch within the field of graph drawing. It is known that deciding SEFE is NP-complete for three graphs [11] while deciding SGE is NP-hard for two graphs [8]. The complexity of deciding SEFE for two graphs is still open. Many approaches have been made to decide the problem for some classes of graph pairs [4, 7, 9, 10]. Frati [10] showed that trees and planar graphs always have a SEFE. Fowler et al. [9] improved this result to show that forests, circular caterpillars (removal of all degree-1 vertices yields a cycle), K4, and subgraphs of K3-multiedges (an edge (x, y) with any number of edges with x or y as end- points) are the only graphs to always have a SEFE with any planar graph. Their drawing algorithms are based upon using an optimal Euclidean shortest path algorithm [13]. We also apply this technique in our algorithms. In this paper we examine the pairs of a planar graph G1 with a pseudofor- est G2. A SEFE is not always guaranteed unless all non-cycle edges of G2 are incident to the cycle, i.e., the pseudoforest happens to be a circular caterpillar. However, we show that SEFE for such pairs can be decided in polynomial time by presenting an efficient decision algorithm. We further discuss efficient decision algorithms for the case that G2 contains two cycles and G1 ∩ G2 is a pseudofor- est. We think that our approach is promising in that it may eventually lead to a general polynomial time decision algorithm for testing SEFE of two graphs. 2 Preliminaries Given some planar drawing Γ of a planar graph G, a cycle C in G forms a Jordan curve that splits the plane into two connected components. One is bounded by C and the other is unbounded as given by the Jordan curve theorem [14]. We say that some vertex v ∈ G \ C lies in the interior (exterior) of C if it is mapped to a position in the bounded (unbounded) component. A combinatorial embedding of a planar graph G is defined as a clockwise ordering of the incident edges for each vertex with respect to a crossing-free drawing of G in the Euclidean plane. A planar embedding is a combinatorial embedding together with a fixed external face. A block is a maximal 2-connected subgraph of a graph G. If G is 2-connected, the SPQR-tree T of G represents its decomposition into 3-connected components comprising serial, parallel, and 3-connected structures [3]. The respective struc- ture is given by a skeleton graph associated with each tree node which is either a cycle (S-node), a bundle of parallel edges (P-node), or a 3-connected simple graph (R-node); Q-nodes serve as representatives for the edges of G. If G is 2-connected and planar, its SPQR-tree T represents all combinatorial embeddings of G. In particular, a combinatorial embedding of G uniquely defines a combinatorial embedding of each skeleton in T , and fixing the combinatorial embedding of each skeleton uniquely defines a combinatorial embedding of G. Given two planar graphs G1 = (V, E1) and G2 = (V, E2) on the same ver- tex set V , a simultaneous embedding with fixed edges (SEFE) consists of planar drawings Γi of Gi, i ∈ [1, 2], such that each vertex is mapped to the same point in the plane for Γ1 and Γ2 and each edge in G1 ∩ G2 is represented by the same simple curve in the plane for both drawings. 3 A Planar Graph, a Cycle, and a Partition In this section, we consider the following graph embedding problem. Given a planar graph G = (V, E), a cycle C = (VC , EC ) ⊂ G, and a partition P of V \ VC , decide whether G has a planar drawing such that all vertices of each part in P either lie completely inside or outside of C; see Algorithm 1. The input partition P or the planar embeddings of the graph may force two vertices to be on the same side of the cycle (either both inside or both outside). We call this situation a same-side constraint. On the other hand, by examining all embeddings of the graph we may reveal that two vertices must be positioned on opposite sides of the cycle (one inside and one outside). We refer to this situation as an opposite-side constraint. The idea of the algorithm is to find all such constraints and then check whether all these constraints can be satisfied at once, i.e., whether a planar embedding with the required property exists. The following algorithm uses an SPQR-tree T to examine all embeddings of the block of graph G containing the given cycle C. Each skeleton of a node of T may lead to constraints prohibiting some of the possible embeddings as discussed above. We use an auxiliary graph H containing all of the vertices of the original graph to maintain the occuring constraints. Same-side constraints are represented by green edges and opposite-side constraints by red edges. We say that H is 2-colorable if its vertices can be colored with two colors, say red and green, in such a way that both endpoints of a green edge have the same color and both endpoints of a red edge have different color. As cycles are 2-connected, the given cycle C is contained in a single block B of graph G. All other blocks are either completely inside or outside of C in all planar drawings of G. Hence, we get one same-side constraint for all vertices of each block B′ 6= B. We can now assume to deal with a 2-connected graph G and its SPQR-tree T that represents all planar embeddings of G together with some cycle C ⊆ G. Let ν ∈ T be some node of the SPQR-tree, S be its skeleton and e ∈ S be any skeleton edge. If the expansion graph of e includes any edge of C, we call e a cycle edge. We consider the different possibilities for ν in turn.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages12 Page
-
File Size-