# Simultaneous Orthogonal Planarity^{†}^{†}thanks: This research was initiated at the
Bertinoro Workshop on Graph Drawing 2016.
Research was partially supported by DFG grant Ka812/17-1, by MIUR project AMANDA, prot. 2012C4E3KT_001, by the grant no. 14-14179S of the Czech Science Foundation GACR, and by DFG grant WA 654/21-1.

###### Abstract

We introduce and study the OrthoSEFE- problem: Given planar graphs each with maximum degree 4 and the same vertex set, do they admit an OrthoSEFE, that is, is there an assignment of the vertices to grid points and of the edges to paths on the grid such that the same edges in distinct graphs are assigned the same path and such that the assignment induces a planar orthogonal drawing of each of the graphs?

We show that the problem is NP-complete for even if the shared graph is a Hamiltonian cycle and has sunflower intersection and for even if the shared graph consists of a cycle and of isolated vertices. Whereas the problem is polynomial-time solvable for when the union graph has maximum degree five and the shared graph is biconnected. Further, when the shared graph is biconnected and has sunflower intersection, we show that every positive instance has an OrthoSEFE with at most three bends per edge.

## 1 Introduction

The input of a simultaneous embedding problem consists of several graphs on the same vertex set. For a fixed drawing style , the simultaneous embedding problem asks whether there exist drawings of , respectively, in drawing style such that for any and the restrictions of and to coincide.

The problem has been most widely studied in the setting of topological planar drawings, where vertices are represented as points and edges are represented as pairwise interior-disjoint Jordan arcs between their endpoints. This problem is called Simultaneous Embedding with Fixed Edges or SEFE- for short, where is the number of input graphs. It is known that SEFE- is NP-complete for , even in the restricted case of sunflower instances [26], where every pair of graphs shares the same set of edges, and even if such a set induces a star [3]. On the other hand, the complexity for is still open. Recently, efficient algorithms for restricted instances have been presented, namely when (i) the shared graph is biconnected [19, 1] or a star-graph [1], (ii) is a collection of disjoint cycles [13], (iii) every connected component of is either subcubic or biconnected [26, 11], (iv) and are biconnected and is connected [14], and (v) is connected and the input graphs have maximum degree 5 [14]; see the survey by Bläsius et al. [12] for an overview.

For planar straight-line drawings, the simultaneous embedding problem is called Simultaneous Geometric Embedding and it is known to be NP-hard even for two graphs [17]. Besides simultaneous intersection representation for, e.g., interval graphs [20, 14] and permutation and chordal graphs [21], it is only recently that the simultaneous embedding paradigm has been applied to other fundamental planarity-related drawing styles, namely simultaneous level planar drawings [2] and RAC drawings [4, 8].

We continue this line of research by studying simultaneous embeddings in the planar orthogonal drawing style, where vertices are assigned to grid points and edges to paths on the grid connecting their endpoints [29]. In accordance with the existing naming scheme, we define OrthoSEFE- to be the problem of testing whether input graphs admit a simultaneous planar orthogonal drawing. If such a drawing exists, we call it an OrthoSEFE of . Note that it is a necessary condition that each has maximum degree 4 in order to obtain planar orthogonal drawings. Hence, in the remainder of the paper we assume that all instances have this property. For instances with this property, at least when the shared graph is connected, the problem SEFE-2 can be solved efficiently [14]. However, there are instances of OrthoSEFE- that admit a SEFE but not an OrthoSEFE; see Fig. 1.

Unless mentioned otherwise, all instances of OrthoSEFE- and SEFE- we consider are sunflower. Notice that instances with are always sunflower. Let be an instance of OrthoSEFE-. We define the shared graph (resp. the union graph) to be the graph (resp. ) with the same vertex set as and , whose edge set is the intersection (resp. the union) of the ones of and . Also, we call the edges in the shared edges and we call the edges in and in the exclusive edges. The definitions of shared graph, shared edges, and exclusive edges naturally extend to sunflower instances for any value of .

One main issue is to decide how degree- vertices of the shared graph are represented. Note that, in planar topological drawings, degree- vertices do not require any decisions as there exists only a single cyclic order of their incident edges. In the case of orthogonal drawings there are, however, two choices for a degree- vertex: It can either be drawn straight, i.e., it is incident to two angles of , or bent, i.e., it is incident to one angle of and to one angle of . If is a degree- vertex of the shared graph with neighbors and , and two exclusive edges , say of , are incident to and are embedded on the same side of the path , then must be bent, which in turn implies that also every exclusive edge of incident to has to be embedded on the same side of as and . In this way, the two input graphs of OrthoSEFE- interact via the degree- vertices. It is the difficulty of controlling this interaction that marks the main difference between SEFE- and OrthoSEFE-. To study this interaction in isolation, we focus on instances of OrthoSEFE- where the shared graph is a cycle for most of the paper. Note that such instances are trivial yes-instances of SEFE- (provided the input graphs are all planar).

Contributions and Outline. In Section 2 we provide our notation and we show that the existence of an OrthoSEFE of an instance of OrthoSEFE- can be described as a combinatorial embedding problem. In Section 3, we show that OrthoSEFE- is NP-complete even if the shared graph is a cycle, and that OrthoSEFE- is NP-complete even if the shared graph consists of a cycle plus some isolated vertices. This contrasts the situation of SEFE- where these cases are polynomially solvable [1, 10, 19, 26]. In Section 4, we show that OrthoSEFE- is efficiently solvable if the shared graph is a cycle and the union graph has maximum degree . Finally, in Section 5, we extend this result to the case where the shared graph is biconnected (and the union graph still has maximum degree ). Moreover, we show that any positive instance of OrthoSEFE- whose shared graph is biconnected admits an OrthoSEFE with at most three bends per edge. We close with some concluding remarks and open questions in Section 6.

Full proofs can be found in the Appendix.

## 2 Preliminaries

We will extensively make use of the Not-All-Equal -Sat (Nae3Sat) problem [25, p.187]. An instance of Nae3Sat consists of a -CNF formula with variables and clauses . The task is to find a Nae truth assignment, i.e., a truth assignment such that each clause contains both a true and a false literal. Nae3Sat is known to be NP-complete [27]. The variable–clause graph is the bipartite graph whose vertices are the variables and the clauses, and whose edges represent the membership of a variable in a clause. The problem Planar Nae3Sat is the restriction of Nae3Sat to instances whose variable–clause graph is planar. Planar Nae3Sat can be solved efficiently [23, 28].

#### Embedding Constraints.

Let be an OrthoSEFE- instance. A SEFE is a collection of embeddings for the such that their restrictions on are the same. Note that in the literature, a SEFE is often defined as a collection of drawings rather than a collection of embeddings. However, the two definitions are equivalent [22]. For a SEFE to be realizable as an OrthoSEFE it needs to satisfy two additional conditions. First, let be a vertex of degree 2 in with neighbors and . If in any embedding there exist two exclusive edges incident to that are embedded on the same side of the path , then any exclusive edge incident to in any of the must be embedded on the same side of the path . Second, let be a vertex of degree 3 in . All exclusive edges incident to must appear between the same two edges of around . We call these the orthogonality constraints. See Fig. 1.

###### Theorem 2.1

An instance of OrthoSEFE- has an OrthoSEFE if and only if it admits a SEFE satisfying the orthogonality constraints.

For the case in which the shared graph is a cycle , we give a simpler version of the constraints in Theorem 2.1, which will prove useful in the remainder of the paper. By the Jordan curve Theorem, a planar drawing of cycle divides the plane into a bounded and an unbounded region – the inside and the outside of , which we call the sides of . Now the problem is to assign the exclusive edges to either of the two sides of so that the following two conditions are fulfilled.

Planarity Constraints. Two exclusive edges of the same
graph must be drawn on different sides of if their endvertices
alternate along .

Orthogonality Constraints. Let be a vertex that is
adjacent to two exclusive edges and of the same graph ,
.
If and are on the same side of , then
all exclusive edges incident to of all graphs
must be on the same side as and .

Note that this is a reformulation of the general orthogonality constraints. Further, the orthogonality constraints also imply that if and are on different sides of , then for each graph that contains two exclusive edges and incident to , with , and must be on different sides of .

The next theorem follows from Theorem 2.1 and from the following two observations. First, for a sunflower instance whose shared graph is a cycle, any collection of embeddings is a SEFE [22]. Second, the planarity constraints are necessary and sufficient for the existence of an embedding of [5].

###### Theorem 2.2

An instance of OrthoSEFE- whose shared graph is a cycle has an OrthoSEFE if and only if there exists an assignment of the exclusive edges to the two sides of satisfying the planarity and orthogonality constraints.

## 3 Hardness Results

We show that OrthoSEFE- is NP-complete for for instances with sunflower intersection even if the shared graph is a cycle, and for even if the shared graph consists of a cycle and isolated vertices.

###### Theorem 3.1

OrthoSEFE- with is NP-complete, even for instances with sunflower intersection in which (i) the shared graph is a cycle and (ii) of the input graphs are outerplanar and have maximum degree .

Proof sketch. The membership in NP directly follows from Theorem 2.2. To prove the NP-hardness, we show a polynomial-time reduction from the NP-complete problem Positive Exactly-Three Nae3Sat [24], which is the variant of Nae3Sat in which each clause consists of exactly three unnegated literals.

Let be the variables and let be the clauses of a -CNF formula of Positive Exactly-Three Nae3Sat. We show how to construct an equivalent instance of OrthoSEFE- such that and are outerplanar graphs of maximum degree 3. We refer to the exclusive edges in , , and as red, blue, and green, respectively; refer to Fig. 2.

For each clause , , we create a clause gadget as in Fig. 2 (top). For each variable , , and each clause , , we create a variable-clause gadget as in Fig. 2 (bottom). Observe that the (dotted) green edge in a variable-clause gadget is only part of if does not occur in . Otherwise, there is a green edge connecting to one of the three vertices , , or (dashed stubs) in the clause gadget. Observe that these three variable-clause edges per clause can be realized in such a way that there exist no planarity constraints between pairs of them. In Fig. 2, the variable-clause gadgets , , are incident to variable-clause edges, while and contain edges and , respectively.

The gadgets are ordered as indicated in Fig. 2. The variable-clause gadgets , with , always precede the clause gadget , for any . Further, if is odd, then the gadgets appear in this order, otherwise they appear in reversed order . Finally, and , for and , are connected by an edge , which is blue if is odd and red if is even. We call these edges transmission edges.

Assume admits an OrthoSEFE. Planarity constraints and orthogonality constraints guarantee three properties: (i) If the edge is inside , then so is , , . This is due to the fact that, by the planarity constraints, the two green edges incident to lie on the same side of and hence, by the orthogonality constraints, the two transmission edges incident to also lie in this side. We call the truth edge of variable . (ii) Not all the three green edges , , and lie on the same side of . Namely, the two red edges of the clause gadget must lie on opposite sides of because of the interplay between the planarity and the orthogonality constraints in the subgraph of induced by the vertices between and . Hence, if edges , , and lie in the same side of , then the orthogonality constraints at either or are not satisfied. (iii) For each clause , edge lies in the same side of as the truth edge of . This is due to the planarity constraints between each of these two edges and the variable-clause edge . Analogously, edge (edge ) lies on the same side as the truth edge of (of ). Hence, setting () if the truth edge of is inside (outside ) yields a Nae3Sat truth assignment that satisfies .

The proof for the other direction is based on the fact that assigning the truth edges to either of the two sides of according to the Nae3Sat assignment of also implies a unique side assignment for the remaining exclusive edges that satisfies all the orthogonality and the planarity constraints.

It is easy to see that and are outerplanar graphs with maximum degree , and that the reduction can be extended to any .

In the following we describe how to modify the construction in Theorem 3.1 to show hardness of OrthoSEFE-. We keep only the edges of and . Variable-clause gadgets and clause gadgets remain the same, as they are composed only of edges belonging to these two graphs. We replace each transmission edge in by a transmission path composed of alternating green and red edges, starting and ending with a red edge. This transformation allows these paths to traverse the transmission edges of and the variable-clause edges of without introducing crossings between edges of the same color. It is easy to see that the properties described in the proof of Theorem 3.1 on the assignments of the exclusive edges to the two sides of also hold in the constructed instance, where transmission paths take the role of the transmission edges.

###### Theorem 3.2

OrthoSEFE- is NP-complete, even for instances in which the shared graph consists of a cycle and a set of isolated vertices.

## 4 Shared Graph is a Cycle

In this section we give a polynomial-time algorithm for instances of OrthoSEFE- whose shared graph is a cycle and whose union graph has maximum degree (Theorem 4.1). In order to obtain this result, we present an efficient algorithm for more restricted instances (Lemma 1) and give a series of transformations (Lemma 2–3) to reduce any instance with the above properties to one that can be solved by the algorithm in Lemma 1.

###### Lemma 1

OrthoSEFE- is in P for instances such that the shared graph is a cycle and is an outerplanar graph with maximum degree .

###### Proof

The algorithm is based on a reduction to Planar Nae3Sat, which is in P [23, 28]. First note that since is outerplanar there exist no two edges in alternating along . Hence, there are no planarity constraints for .

We now define an auxiliary graph with vertex set and edges corresponding to pairs of edges alternating along ; see Fig 3. W.l.o.g. we may assume that is bipartite, since would not meet the planarity constraints otherwise [5]. Let be the set of connected components of , and for each component , fix a partition of into independent sets (possibly in case of a singleton ). Note that in any inside/outside assignment of the exclusive edges of that meets the planarity constraints, for every , all edges of lie in one side of and all edges of lie in the other side.

Draw the cycle as a circle in the plane. For a component , let be the polygon inscribed into whose corners are the endvertices in of the edges in corresponding to the vertices of ; refer to Fig. 3. If only contains one vertex (i.e., one edge of ), we consider the digon as the straight-line segment connecting the vertices of this edge. If has at least two vertices, we let be open along its sides, i.e. it will contain the corners and all inner points (in Fig. 3 we depict this by making the sides of slightly concave). One can easily show that for any two components , their polygons may share only some of their corners, but no inner points. Hence the graph obtained by placing a vertex inside the polygon , for , making adjacent to each corner of and adding the edges , is planar; see Fig. 3.

We construct a formula with variables , , such that is Nae-satisfiable if and only if admits an inside/outside assignment meeting all planarity and orthogonality constraints. The encoding of the truth assignment will be such that is true when the edges of are inside and the edges of are outside, and is false if the reverse holds. Every assignment satisfying the planarity constraints for defines a truth-assignment in the above sense.

Let be an exclusive edge of and let () be the exclusive edges of incident to (to , respectively); we assume that all such four edges of exist, the other cases being simpler. Let be the component containing the edge , for and . Define the literal to be if and if . With our interpretation of the truth assignment, an edge is inside if and only if is true. Now, for the assignment to meet the orthogonality constraints, if , say both are true, then must be assigned inside as well, which would cause a problem if and only if . Hence the orthogonality constraints are described by Nae-satisfiability of the clauses , for each . To reduce to Nae3Sat, we introduce a new variable for each edge and replace the clause by two clauses and . A planar drawing of the variable–clause graph of the resulting formula is obtained from the planar drawing of (see Figs. 3 and 3) by (i) placing each variable , with , on the point where vertex lies in , (ii) placing each variable , with , on any point of edge in , (iii) placing clauses and , for each edge , on the points where vertices and lie in , respectively, and (iv) drawing the edges of as the corresponding edges in . This implies that is planar and hence we can test the Nae-satisfiability of in polynomial time [23, 28].

The next two lemmas show that we can use Lemma 1 to test in polynomial time any instance of OrthoSEFE- such that is a cycle and each vertex has degree at most in either or .

###### Lemma 2

Let be an instance of OrthoSEFE- whose shared graph is a cycle and such that has maximum degree . It is possible to construct in polynomial time an equivalent instance of OrthoSEFE- whose shared graph is a cycle and such that is outerplanar and has maximum degree .

Proof sketch. We construct an equivalent instance of OrthoSEFE- such that is a cycle, has maximum degree , and the number of pairs of edges in that alternate along is smaller than the number of pairs of edges in that alternate along . Repeatedly applying this transformation yields an equivalent instance satisfying the requirements of the lemma.

Consider two edges and of such that appear in this order along cycle and such that the path in between and that contains and has minimal length. If is not outerplanar, then the edges and always exist. Fig. 4 illustrates the construction of .

By the choice of and , and by the fact that has maximum degree , there is no exclusive edge in with one endpoint in the set of vertices between and , and the other one not in . Further, observe that in an OrthoSEFE of edges and (edges and ) must be on the same side. Further, and must be in different sides of . It can be concluded that has an OrthoSEFE if and only if has an OrthoSEFE.

The proof of the next lemma is based on the replacement illustrated in Fig. 5. Afterwards, we combine these results to present the main result of the section.

###### Lemma 3

Let be an instance of OrthoSEFE- whose shared graph is a cycle and whose union graph has maximum degree . It is possible to construct in polynomial time an equivalent instance of OrthoSEFE- whose shared graph is a cycle and such that graph has maximum degree .

###### Theorem 4.1

OrthoSEFE- can be solved in polynomial time for instances whose shared graph is a cycle and whose union graph has maximum degree .

## 5 Shared Graph is Biconnected

We now study OrthoSEFE- for instances whose shared graph is biconnected. In Theorem 5.1, we give a polynomial-time Turing reduction from instances of OrthoSEFE- whose shared graph is biconnected to instances whose shared graph is a cycle. In Theorem 5.2, we give an algorithm that, given a positive instance of OrthoSEFE- such that the shared graph is biconnected together with a SEFE satisfying the orthogonality constraints, constructs an OrthoSEFE with at most three bends per edge.

We start with the Turing reduction, i.e., we develop an algorithm that takes as input an instance of OrthoSEFE- whose shared graph is biconnected and produces a set of instances ,…, of OrthoSEFE- whose shared graphs are cycles. The output is such that is a positive instance if and only if all instances , , are positive. The reduction is based on the SEFE testing algorithm for instances whose shared graph is biconnected by Bläsius et al. [10, 11], which can be seen as a generalized and unrooted version of the one by Angelini et al. [1].

We first describe a preprocessing step. Afterwards, we give an outline of the approach of Bläsius et al. [11] and present the Turing reduction in two steps. We assume familiarity with SPQR-trees [7, 6]; for formal definitions see Appendix A.

###### Lemma 4

Let be an instance of OrthoSEFE- whose shared graph is biconnected. It is possible to construct in polynomial time an equivalent instance whose shared graph is biconnected and such that each endpoint of an exclusive edge has degree in the shared graph.

We continue with a brief outline of the algorithm by Bläsius et al. [11]. First, the algorithm computes the SPQR-tree of the shared graph. To avoid special cases, is augmented by adding S-nodes with only two virtual edges such that each P-node and each R-node is adjacent only to S-nodes and Q-nodes. Then, necessary conditions on the embeddings of P-nodes and R-nodes are fixed up to a flip following some necessary conditions. Afterwards, by traversing all S-nodes, a global 2SAT formula is produced whose satisfying assignments correspond to choices of the flips that result in a SEFE. We refine this approach and show that we can choose the flips independently for each S-node, which allows us to reduce each of them to a separate instance, whose shared graph is a cycle.

We now describe the algorithm of Bläsius et al. [11] in more detail. Consider a node of . A part of is either a vertex of or a virtual edge of , which represents a subgraph of . An exclusive edge has an attachment in a part of if is a vertex that is an endpoint of or if is a virtual edge whose corresponding subgraph contains an endpoint of . An exclusive edge of or of is important for if its endpoints are in different parts of . It is not hard to see that, to obtain a SEFE, the embedding of the skeleton of each node has to be chosen such that for each exclusive edge the parts containing the attachments of share a face. It can be shown that any embedding choice for P-nodes and R-nodes that satisfies these conditions can, after possibly flipping it, be used to obtain a SEFE [1, Theorem 1]. The proof does not modify the order of exclusive edges around degree- vertices of , and therefore applies to OrthoSEFE- as well.

Now let be an S-node. Let be a virtual edge of , be the subgraph represented by , and be the corresponding neighbor of in the SPQR-tree of . An attachment of with respect to is an interior vertex of that is incident to an important edge for . If has such an attachment, then it is a P- or R-node. It is a necessary condition on the embedding of that each attachment with respect to must be incident to a face incident to the virtual edge of representing , and that their clockwise circular order together with the poles of is fixed up to reversal [11, Lemma 8].

For the purpose of avoiding crossings in , we can thus replace each virtual edge that does not represent a Q-node by a cycle containing the attachments of with respect to and the poles of in the order . We keep only the important edges of . Altogether this results in an instance of SEFE modeling the requirements for ; see Figs. 6 and 6.

###### Lemma 5

Let be an instance of OrthoSEFE- whose shared graph is biconnected. Then admits an OrthoSEFE if and only if all instances admit an OrthoSEFE.

Next, we transform a given instance of OrthoSEFE- as above into an equivalent instance whose shared graph is a cycle. Let be the cycles corresponding to the neighbor , of in . To obtain the instance , we replace each cycle with poles and by a path from to that first contains two special vertices followed by the clockwise path from to (excluding the endpoints), then four special vertices , then the counterclockwise path from to (excluding the endpoints), and finally two special vertices followed by . In addition to the existing exclusive edges (note that we do not remove any vertices), we add to the exclusive edges , , , , and to the exclusive edges and to ; see Fig. 6.

The above reduction together with the next lemma implies the main result.

###### Lemma 6

admits an OrthoSEFE if and only if does.

###### Theorem 5.1

OrthoSEFE- when the shared graph is biconnected is polynomial-time Turing reducible to OrthoSEFE- when the shared graph is a cycle. Also, the reduction does not increase the maximum degree of the union graph.

###### Corollary 1

OrthoSEFE- can be solved in polynomial time for instances whose shared graph is biconnected and whose union graph has maximum degree .

Observe that, from the previous results it is not hard to also obtain a SEFE satisfying the orthogonality constraints, if it exists. We show how to construct an orthogonal geometric realizations of such a SEFE.

###### Theorem 5.2

Let be a positive instance of OrthoSEFE- whose shared graph is biconnected. Then, there exists an OrthoSEFE of in which every edge has at most three bends.

Proof sketch. We assume that a SEFE satisfying the orthogonality constraints is given.

We adopt the method of Biedl and Kant [9]. We draw the vertices with increasing y-coordinates with respect to an --ordering [15] on the shared graph. We choose the face to the left of as the outer face of the union graph. The edges will bend at most on y-coordinates near their incident vertices and are drawn vertically otherwise. Fig. 11 indicates, how the ports are assigned. We make sure that an edge may only leave a vertex to the bottom if it is incident to or to a neighbor with a lower index. Thus, there are exactly three bends on . Any other edge , has at most one bend around and at most two bends around .

## 6 Conclusions and Future Work

In this work we introduced and studied the problem OrthoSEFE- of realizing a SEFE in the orthogonal drawing style. While the problem is already NP-hard even for instances that can be efficiently tested for a SEFE, we presented a polynomial-time testing algorithm for instances consisting of two graphs whose shared graph is biconnected and whose union graph has maximum degree . We have also shown that any positive instance whose shared graph is biconnected can be realized with at most three bends per edge.

We conclude the paper by presenting a lemma that, together with Theorem 5.1, shows that it suffices to only focus on a restricted family of instances to solve the problem for all instances whose shared graph is biconnected.

###### Lemma 7

Let be an instance of OrthoSEFE- whose shared graph is a cycle. An equivalent instance of OrthoSEFE- such that (i) the shared graph is a cycle, (ii) graph is outerplanar, and (iii) no two degree- vertices in are adjacent, can be constructed in polynomial time.

## References

- [1] P. Angelini, G. D. Battista, F. Frati, M. Patrignani, and I. Rutter. Testing the simultaneous embeddability of two graphs whose intersection is a biconnected or a connected graph. J. Discrete Algorithms, 14:150–172, 2012.
- [2] P. Angelini, G. Da Lozzo, G. Di Battista, F. Frati, M. Patrignani, and I. Rutter. Beyond level planarity. In M. Nöllenburg and Y. Hu, editors, GD ’16, LNCS. Springer, 2017. To appear.
- [3] P. Angelini, G. D. Lozzo, and D. Neuwirth. Advancements on SEFE and partitioned book embedding problems. Theor. Comput. Sci., 575:71–89, 2015.
- [4] E. N. Argyriou, M. A. Bekos, M. Kaufmann, and A. Symvonis. Geometric RAC simultaneous drawings of graphs. J. Graph Algorithms Appl., 17(1):11–34, 2013.
- [5] L. Auslander and S. V. Parter. On embedding graphs in the sphere. J. Math. Mech., 10(3):517–523, 1961.
- [6] G. D. Battista and R. Tamassia. On-line maintenance of triconnected components with SPQR-trees. Algorithmica, 15(4):302–318, 1996.
- [7] G. D. Battista and R. Tamassia. On-line planarity testing. SIAM J. Comput., 25(5):956–997, 1996.
- [8] M. A. Bekos, T. C. van Dijk, P. Kindermann, and A. Wolff. Simultaneous drawing of planar graphs with right-angle crossings and few bends. J. Graph Algorithms Appl., 20(1):133–158, 2016.
- [9] T. Biedl and G. Kant. A better heuristic for orthogonal graph drawings. Comput. Geom., 9(3):159–180, 1998.
- [10] T. Bläsius, A. Karrer, and I. Rutter. Simultaneous embedding: Edge orderings, relative positions, cutvertices. In S. K. Wismath and A. Wolff, editors, GD’13, volume 8242 of LNCS, pages 220–231. Springer, 2013.
- [11] T. Bläsius, A. Karrer, and I. Rutter. Simultaneous embedding: Edge orderings, relative positions, cutvertices. ArXiv e-prints, abs/1506.05715, 2015.
- [12] T. Bläsius, S. G. Kobourov, and I. Rutter. Simultaneous embedding of planar graphs. In R. Tamassia, editor, Handbook of Graph Drawing and Visualization. CRC Press, 2013.
- [13] T. Bläsius and I. Rutter. Disconnectivity and relative positions in simultaneous embeddings. Comput. Geom., 48(6):459–478, 2015.
- [14] T. Bläsius and I. Rutter. Simultaneous PQ-ordering with applications to constrained embedding problems. ACM Trans. Alg., 12(2):16, 2016.
- [15] U. Brandes. Eager st-ordering. In R. H. Möhring and R. Raman, editors, ESA’02, volume 2461 of LNCS, pages 247–256. Springer, 2002.
- [16] G. Di Battista and R. Tamassia. On-line graph algorithms with SPQR-trees. In M. S. Paterson, editor, ICALP’90, volume 443 of LNCS, pages 598–611. Springer, 1990.
- [17] A. Estrella-Balderrama, E. Gassner, M. Jünger, M. Percan, M. Schaefer, and M. Schulz. Simultaneous geometric graph embeddings. In S. Hong, T. Nishizeki, and W. Quan, editors, GD’07, volume 4875 of LNCS, pages 280–290. Springer, 2007.
- [18] C. Gutwenger and P. Mutzel. A linear time implementation of SPQR-trees. In J. Marks, editor, GD’00, volume 1984 of LNCS, pages 77–90. Springer, 2000.
- [19] B. Haeupler, K. R. Jampani, and A. Lubiw. Testing simultaneous planarity when the common graph is 2-connected. J. Graph Algorithms Appl., 17(3):147–171, 2013.
- [20] K. R. Jampani and A. Lubiw. Simultaneous interval graphs. In O. Cheong, K. Chwa, and K. Park, editors, ISAAC’10, volume 6506 of LNCS, pages 206–217, 2010.
- [21] K. R. Jampani and A. Lubiw. The simultaneous representation problem for chordal, comparability and permutation graphs. J. Graph Algorithms Appl., 16(2):283–315, 2012.
- [22] M. Jünger and M. Schulz. Intersection graphs in simultaneous embedding with fixed edges. J. Graph Algorithms Appl., 13(2):205–218, 2009.
- [23] B. M. E. Moret. Planar NAE3SAT is in P. ACM SIGACT News, 19(2):51–54, 1988.
- [24] B. M. E. Moret. Theory of Computation. Addison-Wesley-Longman, 1998.
- [25] C. H. Papadimitriou. Computational complexity. Academic Internet Publ., 2007.
- [26] M. Schaefer. Toward a theory of planarity: Hanani–Tutte and planarity variants. J. Graph Algorithms Appl., 17(4):367–440, 2013.
- [27] T. J. Schaefer. The complexity of satisfiability problems. In R. J. Lipton, W. A. Burkhard, W. J. Savitch, E. P. Friedman, and A. V. Aho, editors, Proceedings of the 10th Annual ACM Symposium on Theory of Computing (STOC’78), pages 216–226. ACM, 1978.
- [28] W. Shih, S. Wu, and Y. Kuo. Unifying maximum cut and minimum cut of a planar graph. IEEE Trans. Computers, 39(5):694–697, 1990.
- [29] R. Tamassia. On embedding a graph in the grid with the minimum number of bends. SIAM J. Comput., 16(3):421–444, 1987.

Appendix

## Appendix A Definitions for the appendix

In Section 2 we already discussed how to assign the exclusive edges to either of the two sides of . We formalise this assignment by means of a function , where (resp. ) if edge lies to the left (resp. to the right) of , according to an arbitrary orientation of .

### Connectivity and SPQR-trees.

A graph is connected if there is a path between any two vertices. A cutvertex is a vertex whose removal disconnects the graph. A separating pair is a pair of vertices whose removal disconnects the graph. A connected graph is biconnected if it does not have a cutvertex and a biconnected graph is 3-connected if it does not have a separating pair.

We consider -graphs with two special pole vertices and . The family of -graphs can be constructed in a fashion very similar to series-parallel graphs. Namely, an edge is an -graph with poles and . Now let be an -graph with poles for and let be a planar graph with two designated adjacent vertices and and edges . We call the skeleton of the composition and its edges are called virtual edges; the edge is the parent edge and and are the poles of the skeleton . To compose the ’s into an -graph with poles and , we remove the edge from and replace each by for by removing and identifying the poles of with the endpoints of . In fact, we only allow three types of compositions: in a series composition the skeleton is a cycle of length , in a parallel composition consists of two vertices connected by parallel edges, and in a rigid composition is 3-connected.

For every biconnected planar graph with an edge , the graph is an -graph with poles and [16]. Much in the same way as series-parallel graphs, the -graph gives rise to a (de-)composition tree describing how it can be obtained from single edges. The nodes of corresponding to edges, series, parallel, and rigid compositions of the graph are Q-, S-, P-, and R-nodes, respectively. To obtain a composition tree for , we add an additional root Q-node representing the edge . We associate with each node the skeleton of the composition and denote it by . For a Q-node , the skeleton consists of the two endpoints of the edge represented by and one real and one virtual edge between them representing the rest of the graph. For a node of , the pertinent graph is the subgraph represented by the subtree with root . For a virtual edge of a skeleton , the expansion graph of is the pertinent graph of the neighbor corresponding to when considering rooted at .

The SPQR-tree of with respect to the edge , originally introduced by Di Battista and Tamassia [16], is the (unique) smallest decomposition tree for . Using a different edge of and a composition of corresponds to rerooting at the node representing . It thus makes sense to say that is the SPQR-tree of . The SPQR-tree of has size linear in and can be computed in linear time [18]. Planar embeddings of correspond bijectively to planar embeddings of all skeletons of ; the choices are the orderings of the parallel edges in P-nodes and the embeddings of the R-node skeletons, which are unique up to a flip. When considering rooted SPQR-trees, we assume that the embedding of is such that the root edge is incident to the outer face, which is equivalent to the parent edge being incident to the outer face in each skeleton. We remark that in a planar embedding of , the poles of any node of are incident to the outer face of . Hence, in the following we only consider embeddings of the pertinent graphs with their poles lying on the same face.

## Appendix B Omitted or Sketched Proofs from Section 2

Theorem 2.1. An instance of OrthoSEFE- has an OrthoSEFE if and only if it admits a SEFE satisfying the orthogonality constraints.

###### Proof

For the if part, let be the embedding of determined by the SEFE of . Observe that the orthogonality constraints at each vertex define (i) whether a degree vertex of has to be drawn straight or bent, and (ii) which face incident to a degree vertex of has to be assigned the angle. It is not hard to see that a planar orthogonal drawing of in which the embedding of is satisfying such requirements can be constructed. We draw the exclusive edges in each as orthogonal polylines in inside the face of determined by the SEFE. The fact that the exclusive edges of each can be drawn in without introducing any crossings descends from the fact that is a planar embedding of .

For the only if part, let be a vertex in such that the orthogonality constraints are not satisfied at . If has exactly two neighbors and in , then we need to assign a port to two exclusive edges of the same graph (one for each of these edges) on one side of the path and a port to at least one exclusive edge on the other side of the path . If has degree 3 in , then we need to assign a port to an exclusive edge between a pair of edges of and a port to an exclusive edge between a different pair of edges of . Hence, in both cases we need at least five ports, which is not possible on the grid.

## Appendix C Omitted or Sketched Proofs from Section 3

Theorem 3.1. OrthoSEFE- is NP-complete, even for instances with sunflower intersection in which (i) the shared graph is a cycle and (ii) and are outerplanar graphs with maximum degree .

###### Proof

The membership in NP directly follows from Theorem 2.2, since an assignment , which is a certificate for our problem, can be easily verified in polynomial time to satisfy all the planarity and the orthogonality constraints.

To prove that the problem is NP-hard, we show a reduction from the NP-complete problem Positive Exactly-Three Nae3Sat [24], which is the variant of Nae3Sat in which each clause consists of exactly three unnegated literals. See Fig. 2.

Let be the variables and let be the clauses of a -CNF formula of Positive Exactly-Three Nae3Sat. We show how to construct an equivalent instance of OrthoSEFE-; refer to Fig. 2. Assume, without loss of generality, that the literals in each clause are such that , if is odd, and , otherwise.

A variable-clause gadget for a variable belonging to a clause is a subgraph of defined as follows. Gadget contains a path belonging to , and edges and belonging to ; see Fig. 2.

The clause gadget for a clause is a subgraph of defined as follows. Gadget contains a path belonging to , and edges , , , , , , belonging to , and edges and belonging to ; see Fig. 2.

Initialize to the union of , for and , and of , for . Then, for and for identify vertex with vertex , if is odd, or identify vertex with vertex , otherwise. Further, for (where ), identify vertex with vertex and vertex with vertex , if is odd, or identify vertex with vertex and vertex with vertex , otherwise.

To complete the construction of we add to exclusive edges as follows. For and for , we add an edge to , if is odd, or to , otherwise. We call these edges transmission edges. Further, for and for , we add an edge , if , or an edge , otherwise.

Clearly, the construction of instance can be completed in polynomial time.

Graph is a cycle, as we already observed. Also, the transmission edges in (in ) do not alternate along , since the variable-clause gadgets appear along in the order , if is odd, or in the order , otherwise. Also, no transmission edge in alternates with edges and , for any , and such edges do not alternate with each other by construction. Hence, and are outerplanar. The fact that and have maximum degree also directly follows from the construction.

Given a positive instance of Positive Exactly-Three Nae3Sat, we show that is a positive instance of OrthoSEFE-. Given a satisfying truth assignment where denotes the set of variables in , we construct an assignment of the exclusive edges of to the two sides of satisfying all the planarity and the orthogonality constraints.

For and for , we set , for each exclusive edge incident to , if , or , otherwise. For and for , we set , if , or , otherwise. For each clause , we set , if , or , otherwise; we set , if , or , otherwise; and we set , if , or , otherwise. Finally, for each clause , consider the literal with such that , if any, otherwise let . Suppose that ; set and set , if , or set and set , otherwise. Suppose that ; set and set , if , or set