Journal of Graph Algorithms and Applications Intersection Graphs in Simultaneous Embedding with Fixed Edges

We examine the simultaneous embedding with fixed edges problem for two planar graphs G1 and G2 with the focus on their intersection S = G1 ∩G2. In particular, we will present the complete set of intersection graphs S that guarantee a simultaneous embedding with fixed edges for (G1, G2). More formally, we define the subset I SEFE of all planar graphs as follows: A graph S lies in I SEFE if every pair of planar graphs (G1, G2) with intersection S = G1 ∩ G2 has a simultaneous embedding with fixed edges. We will characterize this set by a detailed study of topological embeddings and finally give a complete list of graphs in this set as our main result of this paper.


Introduction
A simultaneous embedding with fixed edges (SEFE) of two graphs G 1 and G 2 is a pair of drawings D 1 of G 1 and D 2 of G 2 such that each drawing is planar and the intersection S = G 1 ∩ G 2 is drawn equally in both drawings.It is clear by definition that both graphs G 1 and G 2 need to be planar to allow a simultaneous embedding with fixed edges.However, not every pair of planar graphs has a simultaneous embedding with fixed edges.The problem to decide whether a graph pair has a simultaneous embedding with fixed edges or not has been studied from different angles.Erten and Kobourov [3] showed that any pair of a tree and a path always has a simultaneous embedding with fixed edges.Di Giacomo and Liotta [2] extended this result by showing that any pair of an outerplanar graph with a cycle has a simultaneous embedding with fixed edges while Frati [6] showed that any pair of a planar graph and a tree has a simultaneous embedding with fixed edges.Fowler et al. [5] used Frati's result as a starting point to characterize the set of planar graphs that have a simultaneous embedding with fixed edges with any planar graph in two ways: by a forbidden minor and by a complete list of graphs with this property.It turns out that any planar graph and any forest have a simultaneous embedding with fixed edges but there exist pairs of planar graphs and pseudo-forests without a simultaneous embedding with fixed edges.It could be shown [4] that the problem for this specific set of graph pairs can be decided in linear time.The corresponding problem for three general graphs is NP-complete [7].
So far, all examinations concerning the simultaneous embedding with fixed edges decision problem are of the same type.Restrict G 1 and/or G 2 to certain classes of planar graphs and then make a statement whether any pair of these graph types has a simultaneous embedding with fixed edges or not.In this paper we examine the simultaneous embedding with fixed edges problem for two planar graphs G 1 and G 2 from a different point of view.We focus on the intersection graph S = G 1 ∩ G 2 .Rather than forcing G 1 or G 2 to be a specific graph we examine which types of intersections allow a simultaneous embedding with fixed edges for general graphs G 1 and G 2 .In fact, we will present the complete set of intersection graphs S that guarantees a simultaneous embedding with fixed edges for (G 1 , G 2 ).More formally, we define the subset I SEFE of all planar graphs as follows: A graph S lies in I SEFE if every pair of planar graphs (G 1 , G 2 ) with intersection S = G 1 ∩ G 2 has a simultaneous embedding with fixed edges.We will present a complete list of graphs in this set as our main result.
So far, the SEFE problem has been mainly studied for the case that both graphs G 1 and G 2 have the same node set V (G 1 ) = V (G 2 ).To our knowledge only Di Giacomo and Liotta [2] explicitly consider the case for special graph pairs with different node sets.However, the list of obtained results which require same node sets can be extended to the case where the node sets are different.In this paper, we loosen the restriction of equal node sets.This condition is irrelevant for most of our examinations but leads to a nice formulation of our main result as it is described in Theorem 5.
A combinatorial embedding of a planar graph G is defined as a clockwise ordering of the incident edges for each node with respect to a crossing-free drawing of G in the plane.A planar embedding is a combinatorial embedding together with a fixed external face.
If a graph G is 2-connected, its SPQR-tree T represents the decomposition of G into its 3-connected components comprising serial, parallel, and 3-connected structures; see [1] for a formal definition.The respective structure 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).In addition, 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.
A tree with one node of degree k while all other nodes have degree 1 or 2 is called a degree-k spider.The union of a cycle and a path that share exactly one end-node of the path is a degree-3 pseudo-spider, see Figure 1.Hershberger and Suri [8] present an algorithm for the Euclidean Shortest Path Problem.The problem consists of the computation of a shortest path between two points in the plane in the presence of polygonal obstacles.If n is the number of vertices in the obstacles, the algorithm runs in O(n log n) time which is proven to be optimal.In this paper we use this Euclidean Shortest Path Algorithm to route edges through an existing planar subdrawing in order to maintain planarity for the whole drawing.This can be done for edges whose endpoints lie on one face of the already existing subdrawing without inserting new crossings.

Combinatorial embeddings
We start by considering all connected planar graphs that have at most two combinatorial embeddings in order to use them as building blocks for our intersection graphs.
Lemma 1 Let G be a connected planar graph that has exactly one combinatorial embedding.Then G is a path or a cycle.
Proof: Every node of degree at least 3 can have multiple clockwise orders of its incident edges.Hence, G has only nodes of degree at most 2 and is either a path or cycle.
Theorem 1 Let G be a connected planar graph that has exactly two combinatorial embeddings.Then G is • a degree-3 spider, • a degree-3 pseudo-spider, • a subdivision of K 4 \ {e}, or • a subdivision of a 3-connected graph with at least four nodes.
Proof: Assume first that G does not have any non-trivial 2-connected component.Then G is a tree.Every node of degree d can have (d − 1)! many clockwise orders of its incident edges.As the number of combinatorial embeddings of G is given by the product of all these numbers (d − 1)!, G has exactly one node of degree 3 and no node with larger degree.Hence, G is a degree-3 spider.
Let now B be a 2-connected component of G.Each cut-vertex can have multiple clockwise orders of its incident edges even if a combinatorial embedding of B is fixed (cf. Figure 2).Hence, there is at most one cut-vertex v of B and it has at most one incident edge not belonging to B. If G \ B is not empty, the induced subgraph of (G \ B) ∪ {v} is connected, has exactly one planar embedding and a node with degree 1.By Lemma 1 this subgraph is a path.Even more, in this situation B has a unique combinatorial embedding and, again by Lemma 1, is a cycle.Hence, G is a degree-3 pseudo-spider.
From now on, G is biconnected.Let T be the SPQR-tree of G.There is a bijection between the combinatorial embeddings of G and the set of combinatorial embeddings of the skeletons of each node in T .Each R-node has two planar embeddings, each P-node has (k − 1)! planar embeddings where k is the number of parallel edges in the corresponding skeleton, and each Sand each Q-node has only a single planar embedding.As G has two planar embeddings, T has exactly one Pand no R-node or no Pand one R-node.Furthermore, if there exists a P-node, its skeleton has exactly three parallel edges.
As any S-node in T yields a subdivision of the corresponding edge, we see that G is a subdivision of the skeleton graph of the Ror P-node.
exactly one Rand no P-node, the graph G is a subdivision of a 3-connected graph that has at least four nodes.If T contains no R-node but exactly one P-node whose skeleton has three parallel edges, then G is a subdivision of K 4 \ {e}.In this case, at least two of the three parallel skeleton edges need to be subdivided to avoid parallel edges in the simple graph G.
An equivalent formulation of the graphs described in Theorem 1 is given in the following corollary.Here, the close connection of the first three graph types is taken into account.
Corollary 2 Let G be a connected planar graph that has exactly two combinatorial embeddings.Then G is a subdivision of Proof: On the one hand, tt is easy to see that K 4 \ {e 1 , e 2 , e 3 } where e 1 , e 2 , e 3 form a cycle is a degree-3 spider.Further, K 4 \ {e 1 , e 2 } where e 1 , e 2 form a path is a degree-3 pseudo-spider.
On the other hand, these two graphs are the smallest degree-3 spider and smallest degree-3 pseudo-spider possible and any other degree-3 spider and degree-3 pseudo-spider is a subdivision of the two, respectively.

Topological embeddings
A combinatorial embedding of a planar graph defines the clockwise order of each node and hence the faces of the graph in each drawing.However, the relative positions of the connected components are not specified.This implies that two planar drawings of the same graph under the same planar embeddings may not be the same from a topological point of view (cf. Figure 3).Let G be a planar graph and C be the set of its connected components.Given a set of planar embeddings, one for each c ∈ C, and a set of outer faces, one for each c ∈ C, we get a set IF of the inner faces of all connected components.From a topological point of view, |IF| + 1 is the number of regions in any planar drawing of G. Let F = IF ∪ {o} be the disjoint union of all inner faces and the global outer face o.We construct a directed, bipartite auxiliary graph one outgoing edge pointing to an element of F ⊆ V H .This is the face where this connected component is inserted in a planar drawing.Hence, every planar drawing of G uniquely defines an auxiliary graph H. Furthermore, H has a special property: It contains no directed cycle and contains exactly one sink, i.e., a node with no outgoing edge.It is easy to see that each auxiliary graph H constructed like this uniquely defines a topological equivalence class of planar drawings of G.For a planar graph G with a set C of connected components, we define a topological embedding of G by a set of combinatorial embeddings, one for each c ∈ C, a set of outer faces, one for each c ∈ C, and a directed, acyclic auxiliary graph H as defined above.For a connected graph G, H is a tree of depth 2 with all inner faces having an edge pointing to the only connected component that has an edge pointing to the outer face.Hence, a combinatorial embedding of a connected graph G, together with the choice of an outer face, is a topological embedding of G.
A topological embedding E of a planar graph G uniquely determines a topological embedding E| S for every subgraph S ⊆ G. Mirroring a given topological embedding of a planar graph G, that is mirroring all combinatorial embeddings of the individual connected components, yields again a topological embedding of G.The mirror image of an embedding of a cycle just swaps the two faces.It is easy to see that the topological subgraph embedding E| S of a mirror image is the mirror image of the topological embedding E| S for every subgraph S. A planar drawing D of G respects E if for each connected component c, the corresponding sub-drawing respects the corresponding combinatorial embedding including the choice of the outer face and the placement of the sub-drawings of the connected components is the same as defined by the auxiliary graph H.Such a topological embedding contains a unique outer face.Just like the choice of an outer face for a connected graph is independent from the choice of the combinatorial embedding, we define an equivalence class of topological embeddings that are the same topological embedding modulo the choice of the outer face.
Let E be a topological embedding of some graph G, o its outer face and f some inner face.We show how to construct a topological embedding of G with outer face f .The auxiliary graph H is acyclic, has one sink o and each other node has one outgoing edge.Hence, there exists a unique directed path from f This way, we create a different auxiliary graph H that has the same properties as the first: It has one sink, no cycles, and each node except the new sink f has one outgoing edge.For all components c i , i = 1, . . ., k, in the path we change the outer face from f i+1 to f i , a former inner face.This uniquely defines another topological embedding of G that is, besides the choice of the outer face, the same as E.
As the outer face of each connected component is encoded in the auxiliary graph, we can define the following equivalence class of topological embeddings: Two topological embeddings are equivalent if for each component the planar embedding is the same, as well as the undirected auxiliary graph.For a connected graph G, an equivalence class of topological embeddings is a combinatorial embedding without the choice of an outer face.
As a next result, we present a list of planar graphs that have at most two topological embeddings modulo the choice of an outer face.Here, we identify two topological embeddings of a graph to be equivalent if we can use the path technique defined above to get from one embedding to the other.The graph classes determined in Lemma 1 and Theorem 1 are the building blocks for the graphs with two topological embeddings.
Theorem 3 A graph that has at most two topological embeddings, modulo the choice of an outer face, is • the disjoint union of a single degree-3 spider and k paths with k ≥ 0, • the disjoint union of a cycle and at most one path, • a degree-3 pseudo-spider, • a subdivision of K 4 \ {e}, or • a subdivision of a 3-connected graph with at least four nodes.
Proof: We start by showing that all graphs from the list have at most two topological embeddings.The number of topological embeddings (modulo the choice of an outer face) is given by the product of the number of combinatorial embeddings for the connected components and the number of different placements for the connected components to each other.Each of the given graphs has at most one of these factors different from 1 and this factor is at most 2. For all but the union of a cycle and a path, the number of different placements for the connected components is 1 since either the graph is connected or it does not contain any cycle.In addition, at most one connected component has two combinatorial embeddings while all the others have only one combinatorial embedding.In the case of the union of a cycle and a path, both connected components have one combinatorial embedding and there are two different relative placements of the connected components to each other.Hence, in all cases there are at most two topological embeddings.
Next, we show that this list is the complete list of graphs with this property.Let G be a graph with at most two topological embeddings.
Every connected component has at most two combinatorial embeddings and is therefore, by Lemma 1 and Theorem 1, a path, a cycle, a degree-3 spider, a degree-3 pseudo-spider, a subdivision of K 4 \ {e} or a subdivision of a 3connected graph with at least four nodes.
Consequently, if G is connected, it is one of these graphs.Furthermore, if G is not connected, at most one connected component may have more than one combinatorial embedding and hence all but one connected component are paths or cycles.
Assume that G has three connected components c 1 , c 2 , and c 3 and at least one connected component, say c 1 , contains a cycle.Then c 1 has at least two faces f 1 and f 2 (where one may be the global outer face).c 2 and c 3 can be positioned both in f 1 , both in f 2 , or one in f 1 and one in f 2 , and this results in a list of at least three different topological embeddings.Hence, this situation may not occur and if G contains more than two connected components, it must be a forest.But then, it is a disjoint union of paths or a disjoint union of a single degree-3 spider and some number of paths since paths are the only trees JGAA, 13(2) 205-218 (2009) 213 with a single planar embedding and degree-3 spiders are the only trees with two planar embeddings.
From now on, G has exactly two connected components c 1 and c 2 .We know already that one, say c 2 , is either a cycle or a path and the other, c 1 , is a path, a cycle, a degree-3 spider, a degree-3 pseudo-spider, a subdivision of K 4 \ {e} or a subdivision of a 3-connected graph with at least four nodes.If c 1 has two combinatorial embeddings, the relative placement of the connected components to each other must be unique.Otherwise, we would have more than two topological embeddings by creating all combinations.But the component placement is unique only if there exists a single face, i.e., if G is a forest.Hence, c 1 cannot be a degree-3 pseudo-spider, a subdivision of K 4 \ {e} or a subdivision of a 3-connected graph with at least four nodes.In addition, if c 1 is a degree-3 spider, c 2 cannot be a cycle but only a path.
It remains to check the case of two cycles, but here both connected components have two faces.Then, the different relative placements of the components to each other result in four cases, each leading to a larger number of topological embeddings.
It is easy to see that if a graph G has exactly two topological embeddings E 1 and E 2 , then E 2 must be the mirror image of E 1 .Whenever one connected component c of G is a graph of Theorem 1, the two topological embeddings differ only in the combinatorial embedding of c, so they are mirror images of each other.Otherwise, either G has only one topological embedding (when G is a single cycle or the union of paths) or G is a cycle and a path.But in this case, again, the two topological embeddings are mirror images of each other.

Compatible embeddings
We now focus on the SEFE problem for two planar graphs and start with the definition of compatible embeddings.Let G 1 and G 2 be two planar graphs with intersection S = G 1 ∩ G 2 and let E i be topological embeddings of G i for i = 1, 2.
We call E 1 and E 2 compatible embeddings if E 1 | S = E 2 | S where E i | S is the unique induced topological embedding of S. We will see next that the existence of compatible embeddings is directly linked to the existence of a simultaneous embedding with fixed edges.
Lemma 2 Given a planar graph G, let E G be a planar embedding and D be a partial drawing that respects E G .We can extend D into a complete crossing-free drawing of G.
Proof: We show how to extend D to a complete planar drawing of G by extending the partial drawing of D with a single edge at a time.Nodes that are not placed yet will be positioned somewhere in the faces according to E G keeping some ε distance to any node or edge within this face.
Let S be the subgraph of G that is already drawn.We start inserting those remaining edges of G \ S that do not create new faces.Let e = (v, w) be such an edge.The end nodes v and w belong to different connected components of S as they would create a cycle (and hence a new face) otherwise.By the planar embedding E G both v and w lie on the same face f in D .Furthermore, the clockwise orderings of the incident edges of v and w in E G imply that the new edge will start and end in f .Hence, we can use the Euclidean Shortest Path Algorithm to route this edge through this face.
At some point every new edge creates a new face.However, we can choose an ordering of the remaining faces such that each edge closes one of the faces of E G .Let e = (v, w) be such an edge and let P be the walk (v = v 1 , . . ., v k = w) that together with e is the boundary of the corresponding face.Furthermore, let c 1 , . . ., c l be the connected components of G that lie in this face as given by (the auxiliary graph of) E G .We can draw e from v to w along P keeping an ε distance to P not enclosing any other nodes and not crossing any edge in the newly created face of D .Of course, the leaving direction of e in v and w is chosen according to the embedding E G .However, for each component c i , i = 1, . . ., l, at some point in our travel from v to w we stop to include c i in the newly created face.This can be done by using the Euclidean Shortest Path Algorithm to route from our given position to some point of c i , then travel around c i (again keeping an ε distance without enclosing any other node) and use the route found by the Euclidean Shortest Path Algorithm to come back to the original position on our route (again keeping an ε distance to the previous route).See Figure 5 for an example.
Using this approach for any edge, D respects E G and becomes a complete planar drawing of G.
Theorem 4 Let G 1 and G 2 be two planar graphs.G 1 and G 2 have a simultaneous embedding with fixed edges if and only if there exists a pair of compatible embeddings of (G 1 , G 2 ).
Proof: Let (D 1 , D 2 ) be a simultaneous embedding with fixed edges of (G 1 , G 2 ) and let (E 1 , E 2 ) be the topological embeddings induced by (D 1 , D 2 ).As S is drawn equally in D 1 and D 2 , we get E 1 | S = E 2 | S and consequently, (E 1 , E 2 ) is a pair of compatible embeddings.
Let (E 1 , E 2 ) be a pair of compatible embeddings of (G 1 , G 2 ).We show how to construct a pair of planar drawings (D 1 , D 2 ) of (G 1 , G 2 ) that respect (E 1 , E 2 ) and yield a simultaneous embedding with fixed edges.Use E 1 to construct a planar drawing of G 1 .This can be done by starting with the combinatorial embeddings of the connected components to construct planar drawings of these and then use the auxiliary graph to determine the placement of the connected components to each other.Enlarging or shrinking the drawings of the connected components to create enough space for the other components when necessary leads to a planar drawing D

I SEFE
Compatible embeddings of a pair of graphs G 1 and G 2 are those topological embeddings that can be used to create a simultaneous embedding with fixed edges of G 1 and G 2 .Deciding whether a pair of graphs has a pair of compatible embeddings may not be easy in general.However, if we restrict the intersection of a graph pair, the requirement E 1 | S = E 2 | S may be trivially satisfied for almost every pair of embeddings.Using this approach, we determine I SEFE , the set of all intersection graphs with a guaranteed simultaneous embedding with fixed edges for all graph pairs.We show that I SEFE corresponds exactly to the set of graphs that we determined in Theorem 3.
Lemma 3 Given two planar graphs G i , i = 1, 2, such that S = G 1 ∩ G 2 has at most two topological embeddings that are mirror images of each other, then every pair of topological embeddings E i of G i , i = 1, 2, yields a pair of compatible embeddings in which E 2 is possibly mirrored.
Proof: Let E i be any planar embedding of G i for i = 1, 2. If E 1 and E 2 do not yield the same embedding E 1 | S = E 2 | S , we mirror E 2 and the demanded equality holds and guarantees a pair of compatible embeddings.
The following theorem states our main result.Using the complete list of the planar graphs with at most two topological embeddings of Theorem 3, we show that this set of graphs is exactly the set I SEFE .
Theorem 5 I SEFE is the set of all planar graphs that have at most two topological embeddings.
Proof: Let S be a planar graph with at most two topological embeddings.Then these embeddings are mirror images of each other.If a pair of planar graphs G 1 and G 2 has the intersection S = G 1 ∩ G 2 , then Lemma 3 states that any pair (E 1 , E 2 ) of topological embeddings of (G 1 , G 2 ) yields a pair of compatible embeddings by possibly mirroring E 2 .In particular, G 1 and G 2 have a pair of compatible embeddings.But then Theorem 4 guarantees the existence of a simultaneous embedding with fixed edges.
Let S be a planar graph that has a pair of topological embeddings E 1 and E 2 that are not mirror images of each other.We show how to construct two graphs G 1 and G 2 with intersection S = G 1 ∩ G 2 but without a simultaneous embedding with fixed edges.G i is obtained by triangulating S while respecting the embedding E i .This straightforward graph transformation constructs a 3connected graph G i .It may happen that we add an edge e to G 1 and G 2 that would enlarge their intersection G 1 ∩ G 2 .If this is the case, we substitute e in G 2 with a path of length 2 by introducing a new node.This way we guarantee G 1 ∩ G 2 = S. G 2 may not be 3-connected anymore but it becomes a subdivision of a 3-connected graph.Consequently, both graphs G 1 and G 2 are connected and have a unique planar embedding (up to mirroring).The unique induced topological embedding of S in G i is E i (or its mirror image).Hence, by Theorem 4, G 1 and G 2 cannot have a simultaneous embedding with fixed edges as they have no pair of compatible embeddings.
An example for the construction of G 1 and G 2 as given in the proof to Theorem 5 is presented in Figure 6.Notice that the two resulting graphs G 1 and G 2 may have different node sets since we add dummy nodes in order to avoid increasing their intersection.
Corollary 6 A planar graph belongs to I SEFE if and only if it is one of the following: • the disjoint union of k paths with k ≥ 1, • the disjoint union of a single degree-3 spider and k paths with k ≥ 0, • the disjoint union of a cycle and at most one path, • a degree-3 pseudo-spider, • a subdivision of K 4 \ {e}, or • a subdivision of a 3-connected graph with at least four nodes.

Conclusion
In this paper we studied the simultaneous embedding with fixed edges problem for a graph pair (G 1 , G 2 ) with a focus on the intersection graph G 1 ∩G 2 .We defined I SEFE as the set of all intersection graphs S that guarantee a simultaneous embedding with fixed edges for any pair (G 1 , G 2 ) with S = G 1 ∩ G 2 .Using the new construction of compatible embeddings, we could characterize I SEFE as the set of all planar graphs with at most two topological embeddings.Our detailed study of topological embeddings results in a complete list of all graphs in I SEFE .

Figure 3 :
Figure 3: A disconnected graph may have different drawings from a topological point of view under the same planar embedding.

Figure 4 :
Figure 4: Auxiliary graphs for the topological embeddings shown in Figure 3. c 2 is the connected component given by the path of length 2, while c 1 is the other connected component.f 1 and f 1 are the exterior face of c 1 , respectively, (and hence the global outer face) and f 2 and f 2 its interior face, respectively.

Figure 5 :
Figure 5: Possible routings of edge e = (v, w).(a,b): The edge can be routed along the given path (v = v 1 , . . ., v k = w) if there are no connected components that must lie in the newly created face.(c,d): However, for each connected component c i this route can be extended by additional routes using the Euclidean Shortest Path Algorithm to the component and back.

1 of G 1 .
Now let S = G 1 ∩ G 2 and D 2 = D 1 | S be a drawing of S according to drawing D 1 .But then D 2 is a partial drawing of G 2 that respects E 2 and we can use Lemma 2 to construct a planar drawing D 2 that respects E 2 .As both D 1 and D 2 are planar drawings of G 1 and G 2 , respectively, with D 1 | S = D 2 | 2 , (D 1 , D 2 ) is a simultaneous embedding with fixed edges of (G 1 , G 2 ).

Figure 6 :
Figure 6: An example of how to construct a pair of graphs without simultaneous embedding with fixed edges from a pair of topological embeddings that are no mirror images of each other.(a) and (b) show an intersection graph S with different topological embeddings E 1 and E 2 .(c) and (d) show two connected graphs G 1 and G 2 with unique planar embeddings (up to mirroring and the choice of the outer face).Their intersection G 1 ∩ G 2 = S has the induced topological embeddings E 1 and E 2 , respectively.