On the N P -hardness of GRacSim drawing and k -SEFE Problems

We study the complexity of two problems on simultaneous graph drawing. The ﬁrst problem, GRacSim drawing , asks for ﬁnding a simultaneous geometric embedding of two planar graphs, sharing a common subgraph, such that only crossings at right angles are allowed, and every crossing must involve a private edge of one graph and a private edge of the other graph. The second problem, k - SEFE , is a restricted version of the topological simultaneous embedding with ﬁxed edges ( SEFE ) problem, for two planar graphs, in which every private edge may receive at most k crossings, where k is a prescribed positive integer. We show that GRacSim drawing is NP -hard and that k - SEFE is NP -complete. The NP -hardness of both problems is proved using two similar reductions from 3-Partition .


Introduction
The problem of computing a simultaneous embedding of two or more graphs has been extensively explored by the graph drawing community.Indeed, besides its inherent theoretical interest [6], it has several applications in dynamic network visualization, especially when a visual analysis of an evolving network is needed.Although many variants of this problem have been investigated so far, a general formulation for two graphs can be stated as follows: Let G 1 = (V 1 , E 1 ) and G 2 = (V 2 , E 2 ) be two planar graphs sharing a common (or shared ) subgraph G = (V, E), where Compute a planar drawing Γ 1 of G 1 and a planar drawing Γ 2 of G 2 such that the restrictions to G of these drawings are identical.By overlapping Γ 1 and Γ 2 in such a way that they perfectly coincide on G, it follows that edge crossings may only occur between a private edge of G 1 and a private edge of G 2 , where a private (or exclusive) edge of G i is an edge of E i \ E (i = 1, 2).
Depending on the drawing model adopted for the edges, two main variants of the simultaneous embedding problem have been proposed: topological and geometric.The topological variant, known as Simultaneous Embedding with Fixed Edges (or SEFE for short), allows the edges of Γ 1 and Γ 2 to be drawn as arbitrary open Jordan curves, provided that every edge of G is represented by the same curve in Γ 1 and Γ 2 .Instead, the geometric variant, known as Simultaneous Geometric Embedding (or SGE for short), imposes that Γ 1 and Γ 2 are two straight-line drawings.The SGE problem is therefore a restricted version of SEFE, and it turned out to be "too much restrictive", i.e. there are examples of pairs of structurally simple graphs, such as a path and a tree [3], that do not admit an SGE.Also, testing whether two planar graphs admit a simultaneous geometric embedding is N P-hard [8].Compared with SGE, pairs of graphs of much broader families always admit a SEFE, in particular there always exists a SEFE when the input graphs are a planar graph and a tree [9].In contrast, it is a long-standing open problem to determine whether the existence of a SEFE can be tested in polynomial time or not, for two planar graphs; though, the testing problem is N P-complete when generalizing SEFE to three or more graphs [13].However, several polynomial time testing algorithms have been provided under different assumptions [1,2,6,7,14,15], most of them involve the connectivity or the maximum degree of the input graphs or of their common subgraph.
In this paper we study the complexity of the Geometric Rac Simultaneous drawing problem [4] (GRacSim drawing for short): a restricted version of SGE, which asks for finding a simultaneous geometric embedding of two planar graphs, such that all edge crossings must occur at right angles; of course, analogously to the SGE problem, every crossing must involve a private edge of G 1 and a private edge of G 2 .We first describe a general N P-hardness construction that transforms an instance of 3-Partition into a suitable instance of SEFE; see Section 3. Based on this construction, we show that GRacSim drawing is N P-hard; see Section 4.Moreover, we introduce a new restricted version of the SEFE problem, called k-SEFE, in which every private edge may receive at most k crossings, where k is a prescribed positive integer.We then show that even k-SEFE is N P-complete for any fixed positive k (see Section 5), to prove the N P-hardness we still use a reduction from 3P, based on the construction given in Section 3.

Preliminaries
Let G = (V, E) be a simple graph.A drawing Γ of G maps each vertex of V to a distinct point in the plane and each edge of E to a simple Jordan curve connecting its end-vertices.The drawing Γ is planar if no two distinct edges intersect, except at common end-vertices.Also, Γ is a planar straightline drawing if it is planar and all its edges are represented by straight-line segments.The graph G is planar if it admits a planar drawing.A planar drawing Γ of G partitions the plane into topologically connected regions called faces.The unbounded face is called the external (or outer ) face; the other faces are the internal (or inner ) faces.A face f is described by the circular ordering of vertices and edges that are encountered when walking along its boundary in clockwise direction if f is internal, and in counterclockwise direction if f is external.A planar embedding of a planar graph G is an equivalence class of planar drawings that define the same set of faces for G.An outerplanar graph is a (planar) graph that admits a planar embedding in which all vertices belong to a same face.For a fixed positive integer n, a ladder L n is a graph that can be obtained by the Cartesian product of a path with n vertices and a graph consisting of a single edge.In other words, L n is an outerplanar graph with 2n vertices and n + 2(n − 1) edges, which consists of two n-vertex paths, called side paths, along with a set of n edges, called rungs, connecting the i-th vertex of the first side path to the i-th vertex of second side path (1 ≤ i ≤ n); we will say that a rung edge is in odd (respectively, even) position if its end-vertices are in odd (respectively, even) position along their own side paths.For every n > 1, a ladder L n contains n−1 4-cycles, which are called the cells of the ladder; observe that in an outerplanar embedding of L n no cell contains another.A wheel is a graph consisting of a cycle C plus a vertex c and a set of edges connecting c to every vertex of C; vertex c is the center of the wheel.

N P-hardness Construction
The N P-hardness results given in this paper use two very similar reductions from 3-Partition (3P) that rely on a same construction; we refer to the following formulation of 3P.
Problem: 3-Partition (3P) Instance: A positive integer B, and a multiset A = {a 1 , a 2 , . . ., a 3m } of 3m natural numbers with B/4 < a i < B/2 (1 ≤ i ≤ 3m).Question: Can A be partitioned into m disjoint subsets A 1 , A 2 , . . ., A m , such that each A j (1 ≤ j ≤ m) contains exactly 3 elements of A, whose sum is B?  In this section, we describe this construction, which transforms an instance of 3P into an instance of SEFE, and illustrate the basic idea of our reductions.We recall that 3P is a strongly N P-hard problem [11], i.e., it remains N P-hard even if B is bounded by a polynomial in m.Also, a trivial necessary condition for the existence of a solution is that 3m i=1 a i = mB, therefore it is not restrictive to consider only instances satisfying this equality.
Let A = {a 1 , a 2 , . . ., a 3m } be an instance of 3P.We now describe in detail a procedure to incrementally construct an instance G 1 , G 2 of SEFE starting from A; see Fig. 1 for an illustration of this construction and Fig. 2(b) for an example of an input instance.At each step, this procedure adds one or more subgraphs (gadgets) to the current pair of graphs.As G 1 and G 2 have the same vertex set, for each added subgraph we will only specify which edges are shared and which are exclusive; the final vertex set will be known implicitly.Hereafter, we will refer to G 1 , G 2 as a full pumpkin of A.
Full Pumpkin Construction Start with a biclique K 2,m+1 , and denote by s, t and by v 0 , v 1 , . . ., v m its vertices of the partite sets of cardinality 2 and m+1, respectively.Create a graph G p , called pumpkin (see, e.g., Fig. 1(a)), by adding the edge (v 0 , v m ) to the biclique, i.e.G p = K 2,m+1 ∪ {(v 0 , v m )}.All the edges of G p are shared edges, i.e.G p ⊂ G; vertices s and t are called the poles of the pumpkin, while (v 0 , v m ) is its handle.
Connect each pair of vertices v j−1 , v j (1 ≤ j ≤ m) of G p with a transversal path π j as depicted in Fig. 1(a), which shows only a basic schematization of these paths.Indeed, each transversal path consists of 2B + 1 non-shared edges, so that edges in odd positions (starting from v j−1 ) are private edges of G 1 , while those in even positions are private edges of G 2 ; hence, every transversal path starts and ends with an edge of G 1 and has exactly 2B inner vertices.Integer B represents the effective length of a transversal path, which is defined as half the number of its inner vertices.
For each integer a i ∈ A, (1 ≤ i ≤ 3m) add a ladder L 2ai+1 and attach it to the poles of the pumpkin as follows: connect all the vertices of one side path to the pole t and all the vertices of the other side path to the pole s (see, e.g., Fig. 1(b)).The ladder L 2ai+1 and the edges connecting its side paths to the poles of the pumpkin form a subgraph S i called the slice gadget, which encodes the integer a i ; hence, by construction, the ladder of every slice always has an even number of cells.All the edges of S i are shared edges, except for the rungs of its ladder.In particular, as depicted in Fig. 1(b), a rung edge in odd position is a private edge of G 2 , while a rung edge in even position is a private edge of G 1 .We conclude this construction by introducing the concept of width w(S i ) of a slice S i : the width w(S i ) is defined as half the number of cells in the ladder of S i , thus w(S i ) = a i .
It is not difficult to see that a full pumpkin of A contains 6Bm + 7m + 3 vertices and 8Bm + 12m + 3 edges, therefore its construction can be performed in polynomial time.We observe that the common subgraph is not connected.Indeed, G consists of the pumpkin G p along with all the edges connecting the ladders to the poles of G p and all inner vertices of the transversal paths; thus, there are 2Bm isolated vertices in the common subgraph.Moreover, even G 1 and G 2 are not connected, because in addition to G they also contain their own private edges of slices S i (1 ≤ i ≤ 3m) and those of transversal paths π j (1 ≤ j ≤ m); in particular, due to the latter paths, G 1 and G 2 contain an induced matching of (B − 1)m and Bm (private) edges, respectively.
In Sections 4 and 5, we will examine two restricted versions of the SEFE problem, in which every SEFE drawing of a full pumpkin G 1 , G 2 (if any) is always a canonical drawing (see, e.g., Fig. 2(b)), where a canonical drawing of G 1 , G 2 is a SEFE such that no two rung edges cross each other.
We now briefly explain the general strategy of our reductions.Any planar embedding of a pumpkin G p has exactly one face containing the pole t but not s, one face containing s but not t, and m remaining faces that are incident to both poles.The latter faces are called wedges and are used to contain the slice gadgets, which are 3m subgraphs attached to the two poles of the pumpkin, with no other vertices in common with each other and with the pumpkin.Further, as already mentioned, every slice has a width that suitably encodes a distinct element a i of A-recall that two distinct elements could be equal-and the structure of a slice is sufficiently rigid (i.e. it has a unique embedding up to a choice of the external face) so that overlaps and nestings among slices cannot occur in a canonical drawing of a full pumpkin.
The basic idea of our reductions is to get the subsets A j (1 ≤ j ≤ m) of a solution of 3P, in case one exists, by looking at the slices in each wedge of a canonical drawing, which implies that every wedge must contain exactly three slices whose widths sum to B. Of course, without introducing some further gadget, each wedge could contain even all slices, i.e. its width can be considered unlimited.This is the reason why we added the transversal paths, namely, to make all wedges of the same width B. Indeed, as it will be clarified later, there cannot be cossings between two edges of a transversal path.Hence, the pumpkin plus the transversal paths form a subdivision of a maximal planar graph, which  has a unique embedding (up to a choice of the external face).Therefore, the effective length of a transversal path (that encodes the integer B) establishes the width of the corresponding wedge.Crossings between slices and transversal paths are thus unavoidable, because every transversal path splits its wedge into two parts, separating the two poles of the pumpkin; clearly, every slice crosses only one transversal path.However, by tuning the length of the transversal paths, i.e. by choosing a suitable definition for the effective length, it is possible to form only crossings that are allowed in a canonical drawing.The key factor of the reductions is to make it possible if and only if each slice of width a i can cross a portion of its transversal path with an effective length greater than or equal to a i .In other words, the slice structure and the transversal path effective length are defined in such a way that (i ) every transversal path cannot cross more than three slices, and (ii ) the total width of the slices crossed by a same transversal path equals integer B, which yields a solution of 3P.
The following lemma formalizes this argument.
Lemma 1 Let A = {a 1 , a 2 , . . ., a 3m } be an instance of 3P, and let G 1 , G 2 be a full pumpkin of A. G 1 , G 2 admits a canonical drawing if and only if A is a Yes-instance of 3P.
Proof: (⇐) Suppose that A admits a 3-partition {A 1 , A 2 , . . ., A m }, then a canonical drawing Γ 1 , Γ 2 of G 1 , G 2 can be constructed as follows.Compute a plane drawing Γ p of the pumpkin G p (see, e.g., Fig. 1(a)) such that (i ) the external face is delimited by the edges (s, v 0 ), (v 0 , v m ) and (v m , s) and (ii ) for each j = 1, 2, . . ., m edge (t, v j ) immediately follows edge (t, v j−1 ) in the counterclockwise edge ordering around t.The drawing Γ p contains m inner faces of degree four, delimited by edges (s, v j−1 ), (v j−1 , t), (t, v j ), (v j , s) (1 ≤ j ≤ m), which are the wedges W j of the pumpkin.Consider now each triple , and denote by S j1 , S j2 , S j3 the corresponding slices in the full pumpkin.For each slice S jk (1 ≤ k ≤ 3), compute a plane drawing with both poles on the external face (see, e.g., Fig. 1(b)).Place these drawings one next to the other within wedge W j , in any order; for simplicity we may assume that S j1 is the leftmost slice, S j2 is the middle slice and S j3 is the rightmost one.It is not difficult to see that the drawing produced so far is planar, i.e. even the private edges do not create crossings.To complete the drawing Γ 1 , Γ 2 , it remains to embed the transversal paths, taking into account that every path π j will unavoidably cross the three slices in its wedge W j .But since, by construction, w(W j ) = B = a j1 +a j2 +a j3 = w(S j1 )+w(S j2 )+w(S j3 ), every transversal path π j (1 ≤ j ≤ m) can be drawn within wedge W j in such a way that (i ) every inner vertex of π j is placed within a cell of a ladder in W j , (ii ) every cell in W j contains exactly one inner vertex of π j , and (iii ) every crossing involves two private edges of different graphs such that one is a rung edge and the other is an edge of π j (see, e.g., Fig. 2(a) and 2(b)).Therefore, the resulting drawing Γ 1 , Γ 2 is a canonical drawing of a full pumpkin of A.
(⇒) We conclude the proof by showing that if G 1 , G 2 admits a canonical drawing Γ 1 , Γ 2 , then A admits a 3-partition.Let Γ p be the drawing of G p induced by Γ 1 , Γ 2 .Also, let C j ⊂ G p (1 ≤ j ≤ m) be the cycle consisting of the edges (s, v j−1 ), (v j−1 , t), (t, v j ) and (v j , s).We first claim that the following properties are satisfied.(P1 ) C j (1 ≤ j ≤ m) is the boundary of a wedge W j in Γ p , where a wedge is a bounded or unbounded face of degree four in Γ p .(P2 ) Transversal path π j (1 ≤ j ≤ m) is drawn within wedge W j .(P3 ) Any two slices cannot be contained in each other and do not overlap with each other except at poles s and t. (P4 ) Every wedge contains exactly three slices.
Let R b (C j ) and R u (C j ) be the bounded and the unbounded plane regions, respectively, delimited by C j in Γ p .Since v j−1 and v j are two vertices of C j , path π j has to be drawn within either R b (C j ) or R u (C j ), otherwise an inner edge of π j would cross an edge of C j , which is not allowed in a Sefe drawing of , then all the other paths of the pumpkin that connect the two poles s and t must be drawn within R u (C j ) (respectively, R b (C j )).Properties P1 and P2 are thus satisfied.Concerning property P3, it is immediate to see that any two slices cannot be contained in each other.Further, in case of overlap, an edge e 1 of a slice S 1 would cross a boundary edge e 2 of a slice S 2 , where e 2 is a private edge of G 2 and e 1 is a private edge of G 1 .But this is not possible, because the end-vertices of e 1 are also connected in S 1 by a 3-edge path consisting of two shared edges and of a private edge of G 2 .We now show that property P4 is satisfied.We preliminarily observe that every slice S i (1 ≤ i ≤ 3m) must be drawn within some wedge, and all the slices in a wedge W j are crossed by its transversal path π j .Moreover, the embedding of S i is completely established (see, e.g., Fig. 1(b)).Indeed, since in a canonical drawing two rung edges cannot cross each other, it follows that S i has to be drawn planarly, and the two poles s and t must be on the outer face of S i .The embedding of S i is therefore completely determined, because it is a 3-connected planar graph and has only one face containing both poles.As a consequence, no cell of S i contains another cell of it in Γ 1 , Γ 2 , i.e. the drawing of S i contains an outerplanar drawing of its ladder.Suppose by contradiction that property P4 does not hold.Then, there would be a wedge W p (1 ≤ p ≤ m) containing at least four slices; recall that there are 3m slices to be distributed among m wedges.Let us denote such slices by S p1 , S p2 , . . ., S pk , with k ≥ 4, and let a pl ∈ A be the integer encoded by slice S pl (1 ≤ l ≤ k).Since each element of A is strictly greater than B/4, it follows that thus wedge W p is not wide enough to host all its slices, a contradiction.In other words, the transversal path π p does not have enough inner vertices to pass through all the cells of slices in W p avoiding crossing that are not allowed in a Sefe drawing.Now, for each wedge W j (1 ≤ j ≤ m), denote by S j1 , S j2 and S j3 the three slices that are within W j , and let a j1 , a j2 and a j3 be their corresponding elements of A. We claim that a j1 + a j2 + a j3 = B. Indeed, it cannot be 3 k=1 a jk > B, because it would imply that 3 k=1 w(S jk ) > w(W j ), which is not possible as seen above.On the other hand, if 3 k=1 a jk < B, there would be some j = j with 1 ≤ j ≤ m such that 3 k=1 a j k > B, otherwise 3m i=1 a i would be strictly less than mB, which violates our initial hypothesis on the elements of A. Hence, even this case is not possible.In conclusion, every wedge W j (1 ≤ j ≤ m) contains exactly three slices S j1 , S j2 and S j3 , each of these slices has a width w(S jk ) (1 ≤ k ≤ 3) that encodes a distinct element of A, and the sum of these widths is equal to B, i.e. w(S j1 ) + w(S j2 ) + w(S j3 ) = B. Therefore, the partitioning of A defined by A 1 , A 2 , . . ., A m , where A j = {w(S j1 ), w(S j2 ), w(S j3 )}, is a solution of 3P for the instance A.
We conclude this section with two remarks.
Remark 1.It is not hard to see that Lemma 1 remains valid if the common subgraph G of a full pumpkin is replaced by any subdivision of G; we will refer to such a modified pumpkin as a subdivided full pumpkin.
Remark 2. The previous lemma cannot be successfully applied to any Sefe drawing of a full pumpkin, because of the 2-edge penetration vulnerability: if rung edges can cross each other, then every transversal path π j (1 ≤ j ≤ m) can pass through all the cells of the ladders in W j using only its two first edges; an illustration of this vulnerability is given in Fig. 3. Also, any tentative to patch this vulnerability by replacing the transversal paths with different graphs, modifying the slices accordingly, always resulted in constructions in which overlapping slices were possible.

NP-hardness of GRacSim drawing
In this section, we study the complexity of the following problem [4].
. Question: Are there two planar straight-line drawings Γ 1 and Γ 2 , of G 1 and G 2 , respectively, such that (i ) every vertex is mapped to the same point in both drawings, and (ii ) any two crossing edges e 1 and e 2 , with e 1 ∈ E 1 \ E and e 2 ∈ E 2 \ E, cross only at right angle?
Theorem 1 GRacSim drawing is N P-hard.
Proof: We use a reduction from 3P that relies on a construction very similar to that examined in the previous section.In particular, in order to get more readable and compact GRacSim drawings, we consider a subdivided full pumpkin G 1 , G 2 of an instance A of 3P, instead of a (normal) full pumpkin.The construction of G 1 , G 2 is as follows (see, e.g., Fig. 4(a) and 4(b)).Construct first a full pumpkin of A (exactly as described in Section 3).Then, subdivide the handle edge twice, and finally, subdivide exactly once every edge that is incident to one of the two poles.As already mentioned in Remark 1, this does not invalidate Lemma 1.Hence, to prove the statement, it is sufficient  to show that a subdivided full pumpkin G 1 , G 2 admits a canonical drawing if and only if it admits a GRacSim drawing.
(⇒) Suppose that G 1 , G 2 admits a canonical drawing Γ 1 , Γ 2 , we show how to compute a GRacSim drawing of G 1 , G 2 .In Γ 1 , Γ 2 , every transversal path π j (1 ≤ j ≤ m) induces a total order σ(π j ) on the set R j of the rung edges that are drawn within wedge W j .Construct now a pair of straight-line drawings Γ 1 , Γ 2 as follows.Draw the rung edges as a set of parallel vertical segments of the same length (see also Fig. 5(a) and 5(b)), with the same baseline, and such that (i ) the left-to-right order of the edges in R j coincides with σ(π j ); (ii ) for every j < j , all the edges of R j are to the left of all the edges of R j .
Let h be the horizontal line passing through the midpoints of the segments representing the rung edges.Place vertex v 0 along h and to the left of the leftmost edge in R 1 .Similarly, place vertex v m along h and to the right of the rightmost edge in R m .Also, place vertex v j (1 ≤ j ≤ m − 1) along h , between the rightmost edge in R j−1 and the leftmost edge in R j+1 .At this point, it is straightforward to add the remaining vertices of the subdivided pumpkin G p without introducing crossings.Moreover, every transversal path can be easily embedded along h in such a way that the set of pairs of crossing edges is the same as in Γ 1 , Γ 2 .Therefore, the resulting drawing Γ 1 , Γ 2 is a GRacSim drawing.(⇐) Let Γ 1 , Γ 2 be a GRacSim drawing of G 1 , G 2 .We show that G 1 , G 2 is also a canonical drawing.Of course, there cannot be a crossing between a rung edge of a slice and a rung edge of another slice in Γ 1 , Γ 2 .Suppose then, by contradiction, that two rung edges e 1 ∈ G 1 and e 2 ∈ G 2 of a same slice S cross each other in Γ 1 , Γ 2 .Let S 2 be the subgraph of S that results after the removal of all the rung edges of G 1 .It is not hard to see that S 2 has a unique planar embedding E with both poles on the outer face.Moreover, the end-vertices of each rung edge of G 1 always belong to a same inner face of E. Now, let e 1 = (x, y) and let f be the face in E that contains the end-vertices x and y of e 1 .If there is a crossing between e 1 and e 2 in Γ 1 , Γ 2 , then e 1 has to exit from f , crossing a rung edge e 2 ∈ G 2 (possibly coincident with e 2 ), and the only possible way to come back to f , avoiding crossings that are not allowed in a SEFE, is to cross e 2 again.But this is impossible in a straight-line drawing.
We conclude this section with two remarks.Remark 3. It is not hard to see that this reduction can also be used to give an alternative proof for the N P-hardness of SGE, which was proved by Estrella-Balderrama et al. [8].Remark 4. This reduction cannot be adapted to study the complexity of the one bend extension of GRacSim, i.e. the variant of GRacSim in which one bend per edge is allowed.Indeed, in this setting, two rung edges can cross each other (Lemma 1 is no longer valid) and the 2-edge penetration vulnerability cannot be avoided.

N P-completeness of k-SEFE
In order to obtain a more readable simultaneous embedding, which is particularly desired in graph drawing applications, one may wonder whether it is possible to compute a SEFE, where every private edge receives at most a limited and fixed number of crossings.We recall that there is no restriction on the number of crossings that involve a private edge in a SEFE drawing.Further, two private edges may cross more than once, and these multiple crossings could be necessary for the existence of a simultaneous embedding; however, Frati et al. [10] have shown that whenever two planar graphs admit a SEFE, then they also admit a SEFE with at most sixteen crossings per edge pair.
Motivated by the previous considerations, we introduce and study the complexity of the following problem, named k-SEFE, where k denotes a fixed bound on the number of crossings per edge that are allowed.
, and a positive integer k.Question: Do G 1 and G 2 admit a SEFE such that every private edge receives at most k crossings?It is straightforward to see that k-SEFE is, in general, a restricted version of SEFE.Namely, for any positive integer k, it is easy to find pairs of graphs that admit a (k + 1)-SEFE, and thus a SEFE, but not a k-SEFE.For example, consider a pair of graphs G 1 = (V, E 1 ) and G 2 = (V, E 2 ) defined as follows (an illustration for k = 4 is given in Fig. 6).The common subgraph G = (V, E) is a wheel of 2k + 5 vertices, where u 0 , u 1 , . . .u k+1 , v 0 , v 1 , . . ., v k+1 are the 2(k + 2) vertices of its cycle in clockwise order, E 1 = E ∪ {(u 0 , v 0 )}, and Since G has a unique planar embedding (up to a choice of the outer face), the private edge (u 0 , v 0 ) of G 1 crosses all the k + 1 private edges of G 2 , i.e. all the edges (u i , v k+2−i ) with 1 ≤ i ≤ k + 1.Therefore, G 1 and G 2 admit a (k + 1)-SEFE, and thus a SEFE, but not a k-SEFE.
Proof: We use a reduction from 3P with a construction that is similar, but not identical, to that described in Section 3. Indeed, according to the definition of full pumpkin, every transversal path has 2B + 1 inner edges, which are not enough to guarantee at most one crossing per edge; more precisely, every transversal path has two inner edges that cross two rung edges each (see, e.g., Fig. 2(a)).However, this problem can be easily fixed by slightly increasing the length of a transversal path (modifying the definition of effective length accordingly) by adding four inner edges (see, e.g., Fig. 7).After this modification of the full pumpkin construction, the statement can be shown with a proof analogous to that of Lemma 1. Proof: Concerning the N P-hardness, it suffices to repeat the proof of Theorem 2, by replacing every transversal path π j (1 ≤ j ≤ m), with a set of k internally vertex-disjoint paths π 1 j , π 2 j , . . ., π k j , where every π We now introduce some definitions and then prove the membership in N P using an approach similar to that described in [12].An edge crossing structure χ(e 1 ) of a private edge e 1 ∈ E 1 is a pair ε 2 , σ(ε 2 ) , where ε 2 is a multiset on the set E 2 \ E with cardinality at most k, and σ(ε 2 ) is a permutation of multiset ε 2 .A crossing structure χ(G 1 , G 2 ) of a pair of graphs G 1 , G 2 is an assignment of an edge crossing structure to each private edge of E 1 .Of course, all crossing structures of G 1 , G 2 can be non-deterministically generated in a time that is polynomial in |V | = n, and they include the crossing structures induced by all k-SEFE drawings of G 1 , G 2 .We conclude the proof by describing a polynomial time algorithm for testing whether a given crossing structure χ(G 1 , G 2 ) is a crossing structure induced by some k-SEFE drawing of G 1 , G 2 .Let G ∪ be the union graph of G 1 and G 2 , i.e.G ∪ = (V, E 1 ∪E 2 ).For each edge e of G ∪ such that e ∈ E 1 \ E, consider its crossing structure χ(e) = ε 2 , σ(ε 2 ) , replace every crossing between e and the edges in ε 2 with a dummy vertex, preserving the ordering given by σ(ε 2 ), and then test the resulting (multi) graph for planarity.
We conclude even this section with two remarks.Remark 5. Concerning the membership in N P, we cannot successfully apply the proof strategy just described for k-SEFE to GRacSim, because the vertex coordinates of a GRacSim drawing are expressed by real numbers, which may have an unbounded number of decimal digits.Thus, for an arbitrary input instance G 1 , G 2 , it is not possible to represent a superset of all the GRacSim drawings of G 1 , G 2 (if any), by a polynomial length encoding.Therefore, it remains open whether the GRacSim drawing problem lies in N P. Remark 6.From a theoretical point of view, it also makes sense to study a slightly different restriction of SEFE, where instead of limiting the number of crossings per edge, it is limited the number of distinct edges that cross a same private edge; recall that two private edges may cross each other more than once, which gives rise to a different problem than k-SEFE.We may call this problem k-pair-SEFE, because k is now the bound on the allowed number of crossing edge pairs involving a same edge.It is not hard to see that a reduction analogous to that given in the proof of Theorems 2 and 3 can be used to prove the N P-hardness of k-pair-SEFE.The interesting theoretical aspect of k-pair-SEFE is the following: if k is greater than or equal to the maximum number of edges of G i (i = 1, 2), then a k-pair-SEFE is also a SEFE; in particular, if k ≥ 3|V | − 6 the two problems are identical.

Conclusions and Open Problems
In this work we have shown the N P-hardness of the GRacSim drawing problem, a restricted version of the SGE problem in which edge crossings must occur only at right angles.Then, we have introduced and studied the N P-completeness of the k-SEFE problem, a restricted version of the SEFE problem, where every private edge can receive at most k crossings.
Our results raise two main questions.First, as already mentioned at the end of Section 4, it would be interesting to study the complexity of a relaxed version of the GRacSim drawing problem, where a prescribed number of bends per edge are allowed; this open problem was already posed in [5].
Another interesting open problem is to investigate the complexity of k-pair-SEFE when the ratio |V |/k tends to 1  3 + 2 k from the right; we recall that for k ≥ 3|V | − 6, k-pair-SEFE and SEFE are the same problem, and that the N P-hardness of k-pair-SEFE strongly relies on a construction where the ratio |V |/k is significantly greater than 1  3 + 2 k .

Figure 1 :
Figure 1: (a) Illustration of a pumpkin gadget (thick style) including a basic schematization of all the transversal paths (dashed style); we recall that every transversal path consists of an alternating sequence of 2B + 1 non-shared edges.(b) Illustration of a slice gadget encoding integer 5.
Wedge W j , transversal path π j , and slices S j1 , S j2 , and S j3 Canonical drawing of a full pumpkin

Figure 4 :
Figure 4: (a) Illustration of a subdivided pumpkin gadget (thick style) including a basic schematization of all the transversal paths (dashed style).(b) Illustration of a subdivided slice.
Wedge W j , transversal path π j , and subdivided slices S j1 , S j2 , and S j3 GRacSim drawing of a subdivided full pumpkin

v 5 cFigure 6 :
Figure 6: A pair of graphs that admit a k-SEFE only for k ≥ 5.

Figure 7 :Theorem 3
Figure 7: Illustration of a the construction for the 1-SEFE problem.