Keywords

1 Introduction

Simultaneous Graph Embedding is a family of problems where one is given a set of graphs \(G_1, \dots , G_k\) with shared vertex set V and is required to produce drawings \(\varGamma _1, \dots , \varGamma _k\) of them, each satisfying certain readability properties, so that each vertex has the same position in every \(\varGamma _i\). The readability property that is usually pursued is the planarity of the drawing, and a large body of research has been devoted to establish the complexity of the corresponding decision problem, or to determine whether such embeddings always exist, given the number and the types of the graphs; for a survey refer to [9].

These problems have been studied both from a geometric (Geometric Simultaneous Embedding - GSE) [6, 16] and from a topological point of view (Simultaneous Embedding with Fixed Edges - SEFE) [10, 12, 19]. In particular, in GSE the edges are straight-line segments, while in SEFE they are topological curves, but the edges shared between two graphs \(G_i\) and \(G_j\) have to be drawn in the same way in \(\varGamma _i\) and \(\varGamma _j\). Unless otherwise specified, we focus on the topological setting.

We study a relaxation of the SEFE problem, where the graphs can be drawn with edge crossings. However, we prohibit certain crossing configurations in the drawings \(\varGamma _1, \dots , \varGamma _k\), to guarantee their readability, i.e., we require that they satisfy the conditions of a graph class in the area of beyond-planarity; see [15] for a survey on this topic. We initiate this study with the class of quasiplanar graphs [2, 3, 18], by requiring that no \(\varGamma _i\) contains three mutually crossing edges.

Definition 1

(QuaSEFE). Given a set of graphs \(G_1=(V,E_1), \ldots , G_k=(V,E_k)\) with shared vertex set V, we say that \(\langle G_1, \ldots , G_k\rangle \) admits a QuaSEFE if there exist quasiplanar drawings \(\varGamma _1, \dots , \varGamma _k\) of \(G_1, \ldots , G_k\), respectively, so that each vertex of V has the same position in every \(\varGamma _i\) and each edge shared between two graphs \(G_i\) and \(G_j\) is drawn in the same way in \(\varGamma _i\) and \(\varGamma _j\). Further, the QuaSEFE problem asks whether an instance \(\langle G_1, \ldots , G_k \rangle \) admits a QuaSEFE.

It may be worth mentioning that the problem of computing quasiplanar simultaneous embeddings of graph pairs has been studied in the geometric setting [13, 14]. Also, simultaneous embeddings have been considered in relation to another beyond-planarity geometric graph class, namely RAC graphs [7, 8, 17, 20].

We prove in Sect. 2 that any triple of two planar graphs and a tree admits a QuaSEFE, which also implies that any pair consisting of a 1-planar graphFootnote 1 and a planar graph admits a QuaSEFE. Recall that, for the original SEFE problem, there exist even negative instances composed of two outerplanar graphs [19]. Further, we investigate triples of planar graphs in which the common subgraphs have specific structural properties. Finally, we show negative results in more specialized settings in Sect. 3 and conclude with open problems in Sect. 4.

2 Sufficient Conditions for QuaSEFE s

In this section, we provide several sufficient conditions for the existence of a QuaSEFE, mainly focusing on instances composed of three planar graphs \(G_1\), \(G_2\), and \(G_3\). We start with a theorem relating the existence of a SEFE of two of the input graphs to the existence of a QuaSEFE of the three input graphs.

Theorem 1

Let \(G_1=(V,E_1)\), \(G_2=(V,E_2)\), and \(G_3=(V,E_3)\) be planar graphs with shared vertex set V. If \(\langle G_1\setminus G_3,G_2\setminus G_3 \rangle \) admits a SEFE, then \(\langle G_1, G_2, G_3 \rangle \) admits a QuaSEFE, in which the drawing of \(G_3\) is planar.

Proof

First construct a SEFE of \(\langle G_1\setminus G_3,G_2\setminus G_3 \rangle \), and then construct a planar drawing of \(G_3\), whose vertices have already been placed, but whose edges have not been drawn yet, using the algorithm by Pach and Wenger [23].

The drawing of \(G_3\) is planar, by construction. The drawing of \(G_1\) is quasiplanar, as it is partitioned into two subgraphs, \(G_1\setminus G_3\) and \(G_1\cap G_3\), each of which is drawn planar. Analogously, the drawing of \(G_2\) is quasiplanar.    \(\square \)

Since every pair composed of a planar graph and a tree admits a SEFE  [19], we derive from Theorem 1 the following positive result for the QuaSEFE problem.

Corollary 1

Let \(G_1=(V,E_1)\) and \(G_3=(V,E_3)\) be planar graphs and \(T_2=(V,E_2)\) be a tree with shared vertex set V. Then \(\langle G_1,T_2,G_3 \rangle \) admits a QuaSEFE, in which the drawing of \(G_3\) is planar.

Corollary 1 already shows that allowing quasiplanarity significantly enlarges the set of positive instances. We further strengthen this result, by additionally guaranteeing that even the tree is drawn planar. For this, we use a result on the partially embedded planarity [5] problem (PEP): Given a planar graph G, a subgraph H of G, and a planar embedding \(\mathcal {H}\) of H, is there a planar embedding of G whose restriction to H coincides with \(\mathcal {H}\)? In particular, we will exploit the following characterization, which is the core of a linear-time algorithm for PEP.

Lemma 1

([5]). Let \((G,H,\mathcal {H})\) be an instance of PEP. A planar embedding \(\mathcal {G}\) of G is a solution for \((G,H,\mathcal {H})\) if and only if the following conditions hold: (C.1) for every vertex \(v \in V\), the edges incident to v in H appear in the same cyclic order in the rotation schemes of v in \(\mathcal {H}\) and in \(\mathcal {G}\); and (C.2) for every cycle C of H, and for every vertex v of \(H\setminus C\), we have that v lies in the interior of C in \(\mathcal {G}\) if and only if it lies in the interior of C in \(\mathcal {H}\).

Theorem 2

Let \(G_1=(V,E_1)\) and \(G_3=(V,E_3)\) be planar graphs and \(T_2=(V,E_2)\) be a tree with shared vertex set V. Then \(\langle G_1,T_2,G_3 \rangle \) admits a QuaSEFE, in which the drawings of \(G_1\) and \(T_2\) are planar.

Proof

Consider planar embeddings \(\mathcal {G}_1\) and \(\mathcal {G}_3^*\) of \(G_1\) and \(G_3 \setminus G_1\), respectively. We draw \(G_1\) according to \(\mathcal {G}_1\). This fixes the embedding of the subgraph \(T_2 \cap G_1\) of \(T_2\), thus resulting in an instance of the PEP problem. Since \(T_2\) is acyclic, Condition C.1 of Lemma 1 is trivially fulfilled. Also, since every rotation scheme of \(T_2\) is planar, we choose for the edges of \((T_2 \cap G_3) \setminus G_1\) an order compatible with \(\mathcal {G}_3^*\), still satisfying Condition C.1. Finally, we draw the remaining edges of \(G_3\) by considering the instance of PEP defined by its embedded subgraph \((T_2 \cap G_3) \setminus G_1\). Condition C.1 is trivially satisfied, and Condition C.1 is satisfied by construction, if we add the edges of \(G_3\) according to \(\mathcal {G}_3^*\). Since crossings edges of the same graph belong to \(G_3 \setminus G_1\) and \(G_3 \cap G_1\), the drawing of \(G_3\) is quasiplanar.    \(\square \)

The additional property guaranteed by Theorem 2 is crucial to infer the first result in the simultaneous embedding setting for a class of beyond-planar graphs.

Theorem 3

Let \(G_1=(V,E_1)\) be a 1-planar graph and \(G_2=(V,E_2)\) be a planar graph. Then \(\langle G_1,G_2 \rangle \) admits a QuaSEFE.

Proof

As \(G_1\) is 1-planar, it is the union of a planar graph \(G_1'\) and a forest \(F_1\) [1]. We augment \(F_1\) to a tree \(T_1\). By Theorem 2, there is a QuaSEFE of \(\langle G_1', T_1, G_2 \rangle \) where \(G_1'\) and \(T_1\) are drawn planar. Thus, \(G_1\) is drawn quasiplanar.    \(\square \)

We now study properties of the subgraphs induced by the edges that belong to one, to two, or to all the input graphs. We denote by \(H_i\) the subgraph induced by the edges only in \(G_i\); by \(H_{i,j}\) the subgraph induced by the edges only in \(G_i\) and \(G_j\); and by H the subgraph induced by the edges in all graphs; see Fig. 1a.

The following two corollaries of Theorem 1 list sufficient conditions for \(G_1 \setminus G_3\) and \(G_2\setminus G_3\) to have a SEFE. In the first case, \(H_{1,2}\) has a unique embedding, which fulfills the conditions of Lemma 1 with respect to any planar embedding of \(G_1\) and of \(G_2\). In the second case, this is because \(G_1\setminus G_3\) is a subgraph of \(G_2 \setminus G_3\).

Corollary 2

Let \(G_1=(V,E_1)\), \(G_2=(V,E_2)\), \(G_3=(V,E_3)\) be planar graphs with shared vertex set V. If \(H_{1,2}\) is acyclic and has maximum degree 2, then \(\langle G_1, G_2, G_3 \rangle \) admits a QuaSEFE.

Corollary 3

Let \(G_1=(V,E_1)\), \(G_2=(V,E_2)\), \(G_3=(V,E_3)\) be planar graphs with shared vertex set V. If \(H_1 = \emptyset \), then \(\langle G_1, G_2, G_3 \rangle \) admits a QuaSEFE.

Contrary to the previous corollaries, Theorem 1 has no implication for the graph H, as there are instances with \(H = \emptyset \) where no pair of graphs has a SEFE. However, we show that a simple structure of H is still sufficient for a QuaSEFE.

Theorem 4

Let \(G_1=(V,E_1)\), \(G_2=(V,E_2)\), \(G_3=(V,E_3)\) be planar graphs with shared vertex set V. If H has a planar embedding that can be extended to a planar embedding \(\mathcal {G}_i\) of each graph \(G_i\), then \(\langle G_1,G_2, G_3 \rangle \) admits a QuaSEFE.

Proof

We draw the graph \(G_1\setminus H_{1,3} = H_1 \cup H_{1,2} \cup H\) with embedding \(\mathcal {G}_1\), the graph \(G_2 \setminus H_{1,2} = H_2 \cup H_{2,3} \cup H\) with embedding \(\mathcal {G}_2\), and the graph \(G_3\setminus H_{2,3} = H_3 \cup H_{1,3} \cup H\) with embedding \(\mathcal {G}_3\). Then, the edges of \(G_1\) are partitioned into two sets, one belonging to \(G_1\setminus H_{1,3}\) and one to \(G_3\setminus H_{2,3}\), each of which is drawn planar. As the same holds for the edges of \(G_2\) and \(G_3\), the statement follows.    \(\square \)

Corollary 4

Let \(G_1=(V,E_1)\), \(G_2=(V,E_2)\), \(G_3=(V,E_3)\) be planar graphs with shared vertex set V. If H is acyclic and has maximum degree 2, then \(\langle G_1,G_2, G_3 \rangle \) admits a QuaSEFE.

The above discussion shows that, if one of the seven subgraphs in Fig. 1a is empty, or has a sufficiently simple structure, \(\langle G_1, G_2, G_3\rangle \) admits a QuaSEFE. Most notably, this is always the case in the sunflower setting [4, 21, 24], in which every edge belongs either to a single graph or to all graphs, i.e., \(H_{1,2}=H_{1,3}=H_{2,3}=\emptyset \). We extend this result to any set of planar graphs. We remark that SEFE is NP-complete in the sunflower setting for three planar graphs [4, 24].

Theorem 5

Let \(G_1=(V,E_1), \ldots , G_k=(V,E_k)\) be planar graphs with shared vertex set V in the sunflower setting. Then \(\langle G_1, \ldots ,G_k \rangle \) admits a QuaSEFE.

Proof

Let H be the graph induced by the edges belonging to all graphs. We independently draw planar the graph H and every subgraph \(G_i \setminus H\), for \(i=1,\ldots ,k\). This guarantees that each \(G_i\) is drawn quasiplanar.    \(\square \)

Fig. 1.
figure 1

(a) Subgraphs induced by the edges in one, two, or three graphs. (b) A simple quasiplanar drawing of \(Q_1\) in Theorem 6, obtained by adding w to the drawing of \(K_{10}\) by Brandenburg [11]. (c) Theorem 7: Edge \((v_{18},v_{20})\) crosses either all dotted blue or all dashed red edges, making \((v_5,v_6)\) and \((v_7,v_8)\) uncrossable (Color figure online).

We remark that all our proofs are constructive. Moreover, the corresponding algorithms run in linear time, as they exploit linear-time algorithms for constructing planar embeddings of graphs [22], for extending their partial embeddings [5], and for partitioning 1-planar graphs into planar graphs and forests [1].

3 Counterexamples for QuaSEFE

In this section we complement our positive results, by providing negative instances of the QuaSEFE problem in two specific settings. We start with a negative result about the existence of a simple QuaSEFE for two quasiplanar graphs and one star. Here simple means that a pair of independent edges in the same graph is allowed to cross at most once and a pair of adjacent edges in the same graph is not allowed to cross. Note that our algorithms in Sect. 2 may produce non-simple drawings. Also, the maximum number of edges in a quasiplanar graph with n vertices depends on whether simplicity is required or not [2].

Theorem 6

There exist two quasiplanar graphs \(Q_1=(V,E_1)\), \(Q_2=(V,E_2)\) and a star \(S_3=(V,E_3)\) with shared vertex set V such that \(\langle Q_1, Q_2, S_3 \rangle \) does not admit a simple QuaSEFE.

Proof

Let \(V = \{v_1,\ldots ,v_{10},w\}\) and let \(E_{10}\) be the edges of the complete graph on \(V\setminus \{w\}\). Further, let \(E_1 = E_{10}\, \cup \, \{(w,v_1),\ldots ,(w,v_6)\}\), let \(E_2 = E_{10}\, \cup \, \{(w,v_7)\}\), and let \(E_3=\{(w,v_1),\ldots ,(w,v_{10}\}\). By construction, \(S_3\) is the star on all eleven vertices with center w, while Fig. 1b shows that there is a simple quasiplanar drawing of \(Q_1\) (and of \(Q_2\), which is a subgraph of \(Q_1\), up to vertex relabeling).

Suppose that \(\langle Q_1, Q_2, S_3 \rangle \) has a simple QuaSEFE, and let \(\varGamma _{1,2}\) be the drawing of the union of \(Q_1\) and \(Q_2\) that is part of it. Since the union of \(Q_1\) and \(Q_2\) has 52 edges, which exceeds the upper bound of \(6.5n-20\) edges in a simple quasiplanar graph [2], \(\varGamma _{1,2}\) is not simple or not quasiplanar. Since \((w,v_7)\) is the only edge in \(\varGamma _{1,2}\) that is not in \(Q_1\), edge \((w,v_7)\) is involved in every crossing violating simplicity or quasiplanarity. Analogously, one of \((w,v_1), \dots , (w,v_6)\), say \((w,v_1)\), is involved in every crossing violating simplicity or quasiplanarity; in particular, \((w,v_1)\) crosses \((w,v_7)\). Since both \((w,v_1)\) and \((w,v_7)\) belong to \(S_3\), the drawing of \(S_3\) that is part of the simple QuaSEFE is not simple, a contradiction.    \(\square \)

The second special setting is the one in which one of the input graphs is already drawn in a quasiplanar way, and the goal is to draw the other input graphs so that the resulting simultaneous drawing is a QuaSEFE. This setting is motivated by the natural approach, for an instance \(\langle G_1, \ldots , G_k \rangle \), of first constructing a solution for \(\langle G_1, \ldots , G_{k-1} \rangle \) and then adding the remaining edges of \(G_k\). Note that, since the drawing of the first graph partially fixes a drawing of the second graph, this can be seen as a version of the PEP problem for quasiplanarity.

For the original SEFE problem, this setting always has a solution when the graph that is already drawn (in a planar way) is a general planar graph, and the other graph is a tree [19]. In a surprising contrast, we construct negative instances for the QuaSEFE problem that are composed of two matchings only.

Theorem 7

Let \(M_1=(V,E_1)\) and \(M_2=(V,E_2)\) be two matchings on the same vertex set V and let \(\varGamma _1\) be a quasiplanar drawing of \(M_1\). Instance \(\langle M_1, M_2\rangle \) does not always admit a QuaSEFE in which the drawing of \(M_1\) is \(\varGamma _1\).

Proof

First recall that the edges in \(E_1\, \cap \, E_2\) have to be drawn in the quasiplanar drawing \(\varGamma _2\) of \(G_2\) as they are in \(\varGamma _1\). Consider the quasiplanar drawing \(\varGamma _1\) of the matching \((v_{2i-1},v_{2i})\), with \(i=1, \dots , 10\), in Fig. 1c, and let \(E_2\) contain the edges \((v_{17},v_{19})\) and \((v_{18},v_{20})\). Since \(v_{17}\) is enclosed in a region bounded by the crossing edges \((v_1,v_2)\) and \((v_3,v_4)\), in any quasiplanar drawing of \(M_2\) edge \((v_{17},v_{19})\) crosses exactly one of \((v_1,v_2)\) and \((v_3,v_4)\). In the first case, \((v_{17},v_{19})\) crosses also \((v_{13},v_{14})\) and \((v_{15},v_{16})\) (dotted blue). In the second case, \((v_{17},v_{19})\) crosses also \((v_{9},v_{10})\) and \((v_{11},v_{12})\) (dashed red). In both cases, \((v_{5},v_{6})\) and \((v_{7},v_{8})\) cannot be crossed, and thus \((v_{17},v_{19})\) cannot be drawn so that \(\varGamma _2\) is quasiplanar.    \(\square \)

4 Conclusions and Open Problems

We initiated the study of simultaneous embeddability in the beyond planar setting, which is a fertile and almost unexplored research direction that promises to significantly enlarge the families of representable graphs when compared with the planar setting. We conclude the paper by listing a few open problems.

  • A natural question is whether two 1-planar graphs, a quasiplanar graph and a matching, three outerplanar graphs, or four paths admit a QuaSEFE. All our algorithms construct drawings with a stronger property than quasiplanarity, namely that they are composed of two sets of planar edges. Exploiting quasiplanarity in full generality may lead to further positive results.

  • Motivated by Theorem 6, we ask whether some of the constructions presented in Sect. 2 can be modified to guarantee the simplicity of the drawings.

  • Another intriguing direction is to determine the computational complexity of the QuaSEFE problem, both in its general version and in the two restrictions studied in Sect. 3. In particular, the setting in which one of the graphs is already drawn can be considered as a quasiplanar version of the PEP problem, which is known to be linear-time solvable in the planar case [5].

  • Extend the study to other beyond-planarity classes. For example, do any two planar graphs admit a k-planar SEFE for some constant k?