11email: {foersth,mk}@informatik.uni-tuebingen.de22institutetext: NTUA, Athens, Greece
22email: [email protected]
Recognizing and Embedding
Simple Optimal -Planar Graphs††thanks: The work of C. Raftopoulou is funded by the National Technical University of Athens research program
EBE 2020. H. Förster and M. Kaufmann are supported by DFG grant KA812-18/2.
Abstract
In the area of beyond-planar graphs, i.e. graphs that can be drawn with some local restrictions on the edge crossings, the recognition problem is prominent next to the density question for the different graph classes. For 1-planar graphs, the recognition problem has been settled, namely it is NP-complete for the general case, while optimal 1-planar graphs, i.e. those with maximum density, can be recognized in linear time. For 2-planar graphs, the picture is less complete. As expected, the recognition problem has been found to be NP-complete in general. In this paper, we consider the recognition of simple optimal 2-planar graphs. We exploit a combinatorial characterization of such graphs and present a linear time algorithm for recognition and embedding.
Keywords:
-planar graphs recognition algorithms beyond-planarity1 Introduction
In the field of graph drawing beyond planarity, researchers study graphs that admit drawings with crossings only in restrictive local configurations [6, 14, 15, 18, 24]. Mostly studied are 1-planar graphs, which admit drawings where each edge is crossed at most once. Classic results on these graphs concern mostly the density [7, 28], recently, other problems such as generation [29], characterization [20], recognition [2, 9, 10, 11, 13], coloring [8] and page number [3, 16] have been studied. The most natural extension of -planar graphs, is the family of -planar graphs, that is graphs that admit drawings where each edge is crossed at most times. While there are plenty of results on -planarity, -planarity turns out to be more challenging. The first outstanding results on the density of simple -planar graphs came with the work of Pach and Tóth [27] for . In particular, they proved that simple -planar graphs have at most edges. Later on, improved upper bounds of [26] and [1] have been shown for simple - and -planar graphs, respectively. The bounds for - and -planar graphs are tight even for non-simple graph without homotopic parallel edges and self-loops [5].
While testing for planarity can be done in linear time, and several classes of beyond-planar graphs have a linear number of edges, the corresponding recognition problems are NP-hard, which impedes the practical application of related results. In particular, it was recently proven that the recognition of -planar graphs is NP-hard for every value of [30]. Still, optimal 1-planar graphs, which form a prominent subclass of -planar graphs, can be recognized in linear time [11], while recognition of maximal -planar graphs and -maps takes cubic time [17, 12]. Previously, efficient recognition algorithms have been developed for more restricted subclasses of -planar graphs, see e.g. [2, 10, 13, 19].
For , there are significantly fewer results. A notable result is the linear time recognition algorithm for full outer-2-planar graphs [21], while for the literature still lacks similar results.
Our contribution. In this paper, we extend the study on the recognition of subclasses of -planar graphs. Namely, we prove that simple optimal -planar graphs, that is simple -planar graphs with edges, can be efficiently recognized in time. In our strategy we first remove a set of edges that must be involved in crossings in any optimal -planar drawing of the given graph. We unwrap specific properties of the remaining graph that allow us to find a unique drawing and insert the deleted crossing edges.
Paper organization. In Section 2 we give preliminary notations and properties of optimal -planar graphs. Section 3 presents CROSS-BAT, an important -planar substructure, and examines its structural properties. Section 4 focuses on the insertion of the deleted crossing edges. Our recognition algorithm in Section 5 combines all previous results. We conclude in Section 6 with further research directions. Due to space constraints, several proofs and details, indicated by , are deferred to an appendix.
2 Preliminaries
The degree of a vertex is denoted by and its set of neighbors by . For we write to denote the set of common neighbors of and , that is . A drawing of a graph maps the vertices to points in the plane and the edges to simple open Jordan curves connecting the points corresponding to their endpoints. A drawing is -planar if each curve representing an edge is crossed at most times by the other edges together. A graph is -planar if it admits a -planar drawing.
The topology of a planar drawing is described by a rotation scheme. For -planarity, a -planar rotation scheme specifies the counter-clockwise circular order of edges around each vertex and, additionaly, a sequence of at most crossings along each edge. Hence, a -planar rotation scheme defines an equivalence class of -planar drawings.
For a graph , let a subgraph of and let be a (-planar) rotation scheme of . We say that is a partial (-planar) rotation scheme of . We further say that can be extended to a (-planar) rotation scheme of if the restriction of on is . Conversely, we say that extends . Let be a cycle of graph , whose edges define a simple closed curve in a drawing of . We refer to the region to the left of this curve in a counter-clockwise walk along in as the interior of the region bounded by cycle . Note that given drawing , the interior of a region may be unbounded.
A -planar graph that reaches the upper bound of edges is called optimal -planar. Note that the value of edges can be reached only when . Each induced subgraph of a -planar graph is also 2-planar and thus has at most edges. This implies that if is 2-planar then it is also 9-degenerate, i.e. there is a vertex ordering such that, for each , vertex of the induced subgraph has degree at most 9 in . We call such a vertex ordering a 9-degenerate sequence of .
In this work, we consider only simple graphs which we assume from now on without explicitly stating it. The structure of simple optimal -planar graphs is well established. Namely, an optimal -planar rotation scheme of a simple optimal -planar graph specifies a crossing-free -connected111The 3-connectivity derives from the fact that the graph is simple. spanning pentangulation and a set of crossing edges [4, 5]. The edges around each vertex are cyclically ordered so that every crossing-free edge (belonging to ) is followed by two crossing edges, which are succeeded by one crossing-free edge, and so on. Hence the degree of every vertex is a multiple of three. Moreover, the minimum degree of a simple optimal -planar graph is since is -connected, i.e., every vertex is incident to at least crossing-free edges. Now, each pentangular face of contains exactly five crossing edges of which form a -clique in with the boundary edges of ; we call such a -clique a facial -clique. Note that not all -cliques of are facial in . This is a major difficulty for recognizing optimal -planar graphs. We denote a facial -clique of with outer cycle as and say that the crossing edges with belong to . As is -connected, it suffices to detect all facial -cliques to find the optimal -planar rotation scheme of a given input graph, if one exists.
In the following, we state some preliminary observations and properties that we will use in the remainder of the paper. In particular, Properties 2.1–2.4 immediately arise from the combinatorial characterization of simple optimal 2-planar graphs in [5] also summarized above. So, let be an optimal -planar graph with an optimal -planar rotation scheme .
Property 2.1.
A pair of crossing edges in belongs to the same facial -clique.
Property 2.2.
If in , edge is crossed by two edges and , then and share a common endpoint. Also, , and belong to the same facial -clique.
Property 2.3.
Any two facial -cliques in share at most two vertices.
Property 2.4.
A crossing edge of belongs to exactly one facial -clique and a crossing-free edge of belongs to exactly two facial -cliques.
Combining the above properties we can further prove the following:
Corollary 2.1 ().
For two edges and of an optimal -planar graph let . If , then and belong to the same facial -clique in any optimal -planar rotation scheme of .
Corollary 2.2.
Let be an optimal -planar graph with an optimal -planar rotation scheme . Let be a crossing edge inside a facial -clique in . Further, let be a neighbor of and be a neighbor of . Then, edges and do not cross in ; see Fig. 1.

Consider an optimal -planar rotation scheme of . If edge is crossing-free in , then by Property 2.4 and belong to two facial -cliques. Hence, holds. Although this condition is not sufficient to conclude that an edge is crossing-free, we can use it to identify some crossing edges:
Corollary 2.3.
Let be an optimal 2-planar graph and . Edge is crossing in any optimal -planar rotation scheme of if .
Our recognition algorithm relies on the identification of crossing edges based on Corollary 2.3. We say that an edge is clearly crossing if and only if . Otherwise is potentially planar. Note that in an optimal -planar rotation scheme, a potentially planar edge is not necessarily crossing-free. However, every crossing-free edge of any optimal -planar rotation scheme is potentially planar. We define as the subgraph of formed by all potentially planar edges. Graph is -connected and spans as the corresponding crossing-free pentangulation of each optimal -planar rotation scheme is a subgraph of .
3 The CROSS-BAT configuration
In this section, we study the 3-connected spanning subgraph formed by the potentially planar edges of . We want to compute a rotation scheme of which is extendable to an optimal -planar rotation scheme of , if it exists. If in each optimal -planar rotation scheme of subgraph is plane, then the rotation scheme of is unique and easy to compute. Though we cannot assure this property, we prove that in any optimal -planar rotation scheme of , crossings between edges of occur in restricted configurations: A CROSS-BAT instance is an induced subgraph of isomorphic to the graph shown in Fig. 2(a), so that (i) for edge of isomorphic to of , it holds that , and (ii) the isomorphism between and preserves the classification of edges to clearly crossing or potentially planar.
In particular, CROSS-BAT has ten vertices, named as in Fig. 2(a). Vertices and have degree in and they have common neighbors (the remaining vertices of CROSS-BAT). The edges of CROSS-BAT form four -cliques that pairwise share two vertices, and are shown as facial -cliques in Fig. 2(a). We call edge the base edge of CROSS-BAT. No other edges with both endpoints in CROSS-BAT exist, except possibly for edges and . Fig. 2(a) shows the classification of edges of CROSS-BAT as potentially planar and clearly crossing.
Let be an optimal -planar rotation scheme of , such that two potentially planar edges cross each other. These two edges must belong to the same facial -clique and, in particular, also to an instance of CROSS-BAT.



Lemma 3.1 ().
Let be an optimal -planar rotation scheme of and let be a facial -clique in such that and are potentially planar edges. Then, vertices and have degree in , and the induced subgraph of with vertex set is an instance of CROSS-BAT where is the -clique of Fig. 2(a).
Next, we show that CROSS-BAT has only two rotation schemes:
Lemma 3.2 ().
Sketch.
Vertices are named as in Fig. 2(a). First, we prove that there are four facial -cliques, namely (i) that contains , (ii) that contains , (iii) that contains both and , and, (iv) that contains both and . It is then easy to argue that , while . Finally, we show that is contained in the crossing-free cycle and is contained in the crossing-free cycle where . The two choices for and give the two different rotation schemes of Figs. 2(b) and 2(c). ∎
As it is evident in Figs. 2(b) and 2(c), if an optimal -planar graph contains an instance of CROSS-BAT as subgraph, then it admits two different optimal -planar rotation schemes and , that only differ in the choice of the rotation scheme of CROSS-BAT. Hence for any instance of CROSS-BAT, we may arbitrarily choose one of its two rotation schemes. Next, we formalize this observation:
Lemma 3.3.
Both rotation schemes of a CROSS-BAT instance contain two crossings between potentially planar edges:
Lemma 3.4 ().
Let be an optimal -planar rotation scheme of . If contains an instance of CROSS-BAT, then there exist exactly two pairs of potentially planar edges that belong to and cross in .
Using Lemma 3.2 we can fix a rotation scheme for each instance of CROSS-BAT identified in by reclassifying two crossing potentially planar edges of to clearly crossing edges. After performing this reclassification for all instances, if is optimal -planar, then the subgraph induced by the potentially planar edges is planar. Furthermore, in this case, Lemma 3.3 guarantees that the unique planar embedding of is part of an optimal -planar rotation scheme of .
4 Identifying Facial -Cliques
Assume that we have fixed the rotation scheme for every identified instance of CROSS-BAT. Let be the spanning subgraph of formed by all potentially planar edges after the reclassification process. As discussed in Section 3, is planar and -connected, i.e. it has a unique planar rotation scheme . Furthermore, by Lemma 3.3, if is optimal -planar, it admits an optimal -planar rotation scheme that extends which we call -compliant. For any -compliant optimal -planar rotation scheme , contains the corresponding spanning pentangulation as a subgraph. Hence each face of has length , or and is part of a facial -clique. Hence, we can arbitrarily triangulate them and assume from now on that is triangulated. Triangulating a face of corresponds to reclassifying some chords from clearly crossing to potentially planar.
Let be a path in the dual of so that , and , as shown in Fig. 3. If the subgraph induced by the vertices is a -clique in , we call a triplet. contains vertices , faces and the three clearly crossing edges , and , as shown in Fig. 3. We say that , and belong to triplet .
In any -compliant optimal -planar rotation scheme (if it exists), faces and clearly crossing edges of are partitioned into triplets, such that every face and clearly crossing edge belongs to exactly one of these triplets. Furthermore, the triplets are in 1-1 correspondence with the facial -cliques of . We say that , and are assigned to the triplet w.r.t. if induces a facial -clique in . Similarly, we say that faces , and of are assigned to . If such an assignment is not possible, then is not optimal -planar.

Let be a set of triplets such that any two triplets in are face-disjoint and contain different clearly crossing edges. Consider the partial -planar rotation scheme of that (i) extends , (ii) the clearly crossing edges of each are assigned to , and (iii) there is no other assignment of clearly crossing edges. We say that is bad if and only if cannot be extended to a -compliant optimal -planar rotation scheme of . Our goal is to find an assignment of all clearly crossing edges of to a set of triplets such that is not bad if is optimal 2-planar. We actually prove a stronger result, namely that the set is unique. We will use two observations that follow from the simplicity of :
Observation 4.1.
Let be a triangular face of and let be a triplet that contains vertices , and . Then contains face .
Observation 4.2.
Let and be two adjacent faces of and a clearly crossing edge. Let be a -compliant optimal -planar rotation scheme and be the triplet that is assigned to w.r.t. . Then, either (i) is drawn inside and in and contains both and , or (ii) is drawn outside and in and contains neither nor .
If any of , or belongs only to one triplet , then is a facial -clique in any -compliant optimal -planar rotation scheme and , and can be assigned to . So, we assume that each of , and belong to at least one triplet different from . Let and be two triplets that contain edges and respectively and are different from . Note that might hold. Let . If for each such pair of triplets and we can conclude that the set is bad, then in any -compliant optimal -planar rotation scheme of (if it exists) edges , and must be assigned to . In the following, we compare against all possible sets and prove that at least one of and is bad. This allows to decide, for each triplet , if forms a facial -clique in every -compliant optimal -planar rotation scheme of or in none. Note that when we write and , we assume that as shown in Fig. 3 and triplets and contain edges and , respectively.
We first restrict how triplets and relate to triplet . Observation 4.2 applied to implies that if shares either or with , then, in the presence of edge , shares both and with . A symmetric argument applies for . It follows that one of the following cases holds for :
-
C.1
is face-disjoint with , or
-
C.2
shares only face with , or,
-
C.3
shares only faces and with .
In the next two lemmas, we show that every is bad if Case C.1 applies either for none or for both of and .
Lemma 4.1 ().
Let . If none of and is face-disjoint from , then is bad.
Lemma 4.2 ().
Let . If both and are face-disjoint from , then is bad.
Sketch.
By Lemmas 4.1 and 4.2, Case C.1 applies for exactly one of the two triplets and and . Then, the other triplet complies with Case C.2 or with Case C.3. For each possible combination we first prove structural properties arising from the assumption that is not bad, and then show that these new restrictions make bad. In the next two lemmas, we consider the setting, where one of and complies with Case C.1 while the other one complies with C.2.


Lemma 4.3 ().
Let , such that is face-disjoint from and shares only face with . For , if (i) , or, (ii) for every vertex it holds , then is bad.
Sketch.
Assuming that is not bad and , we arrive at the configuration shown in Fig. 4(b). We can conclude that not all conditions of the lemma hold. ∎
Lemma 4.4 ().
Let and let such that . If there exists a vertex such that , then is bad.
By Lemmas 4.3 and 4.4 it remains to consider the case where one of and complies with Case C.1 while the other complies with Case C.3. So, we assume w.l.o.g. that is face-disjoint with , while shares faces and with . Recall that clearly crossing edge belongs to . If is not bad belongs to a triplet such that is not bad. Note that as otherwise vertex belongs to and . Hence, either or .
The following four lemmas investigate the subcase . Note that and are face-disjoint as otherwise is bad. The first two lemmas examine the scenario where contains vertex or contains vertex of .
Lemma 4.5 ().
Let , such that is face-disjoint from , shares faces and with , and is face-disjoint from . Then:
-
–
If contains vertex of and additionally (i) , or, (ii) there is a vertex such that , then is bad.
-
–
If contains vertex of and additionally (i) , or, (ii) there is a vertex such that , then is bad.
Sketch.
Assuming that is not bad and , in the first case, we arrive at the configuration shown in Fig. 5(a). We conclude that not all conditions hold. ∎



Lemma 4.6 ().
Let and let with . If for every vertex it holds , then is bad.
The next two lemmas consider the scenario, where does not contain vertex and does not contain vertex of triplet .
Lemma 4.7 ().
Let , such that is face-disjoint from , shares faces and with , and is face-disjoint from . Assume that does not contain vertex and does not contain vertex of . If there is no triplet that contains such that (i) shares only vertices of with , and, (ii) is face-disjoint from all of , and , then is bad.
Lemma 4.8 ().
Let triplets , , be pairwise disjoint such that is face-disjoint from , shares faces and with , is face-disjoint from , does not contain vertex and does not contain vertex of . If there is a triplet that contains such that (i) shares only vertices of with , and, (ii) is face-disjoint from all of , and , then is bad.
Sketch.
For the second subcase, where , Property 2.3 assures that and share only vertices and , as otherwise would be bad. As indicated by the next lemma, no further restrictions (imposed by the assumption that is not bad) are needed to prove that is bad.
Lemma 4.9 ().
Let . Assume that is face-disjoint from , that shares faces and with , and . If has exactly two common vertices with , then is bad.
Sketch.
In the following two lemmas, we summarize our findings from this section.
Lemma 4.10 ().
Let be optimal -planar and let . is not bad if and only if every set is bad.
Sketch.
As is optimal -planar, at least one of or for some triplets and is not bad. If is bad, the lemma holds. For the reverse direction, assume there is a set that is not bad, i.e. none of Lemmas 4.3, 4.5 and 4.7 applies for . If is not bad from the corresponding Lemmas 4.4, 4.6 and 4.8, the conditions of Lemma 4.9 are satisfied and is bad. ∎
Lemma 4.11 ().
Sketch.
For a contradiction we assume that is bad. Since is optimal -planar, by Lemma 4.10, there exists a set that is not bad. We go through all lemmas and check their conditions. For all the cases, we argue that if the specific lemma can not apply on , then is bad. ∎
5 The Recognition and Embedding Algorithm
Now that we have all required ingredients, we are ready to state our main theorem for the recognition of optimal -planar graphs.
Theorem 5.1.
Let be a simple graph on vertices. It can be decided in time whether is optimal -planar. If the instance is positive, an optimal -planar rotation scheme of is reported.
The remainder of this section contains the proof of Theorem 5.1 which is split into two parts. In Section 5.1 we describe our algorithm and prove its correctness, while an efficient implementation is discussed in Section 5.2.
5.1 Recognition Algorithm
Our recognition algorithm is formalized in Algorithm 1.
There are four main steps in the process. The first step is the classification of all edges of as potentially planar and clearly crossing (line 1). Second, is the identification of the CROSS-BAT instances and the creation of and its planar rotation scheme (lines 2–10). Third, we identify all triplets of (line 11). Finally, we decide which of the triplets are not bad (lines 12–13) determining an optimal -planar rotation scheme of if one exists. Having the set of triplets that are facial -cliques in any -compliant optimal -planar rotation scheme of , we decide if is optimal -planar (lines 14–15) and compute an optimal -planar rotation scheme of if it exists (line 16). The details of the steps are given in Theorem D.1 in Appendix D.
5.2 Implementation
First, we check that the input graph has at most edges and that it is -degenerate. This process takes time and is described in Details 1 in Appendix D, together with standard techniques and data structures that we use. In the following, we discuss in more detail the time complexity of the involved steps of Algorithm 1. The first step of the process, described in line 1 of Algorithm 1, can be performed in time as stated in the following lemma:
Lemma 5.1 ().
All edges of can be classified as potentially planar or clearly crossing in time.
We proceed with the second step given in lines 2–10 of Algorithm 1. First, we compute the CROSS-BAT instances of (line 2).
Lemma 5.2 ().
All CROSS-BAT instances of can be identified in time if all edges are already classified as clearly crossing or potentially planar.
For each CROSS-BAT instance, we choose the rotation scheme of Fig. 2(b) where crosses and crosses by reclassifying and as clearly crossing. We proceed with lines 3–10 of Algorithm 1. We check the necessary conditions for and compute the planar rotation scheme and the dual after augmenting to maximal planar; see Details 2 in Appendix D.
Next, we compute the set of triplets of (line 11) in time; see Details 3 in Appendix D. During this process, for each face and each clearly crossing edge of , we store the set of triplets that contain it. The next lemma describes how to implement the labeling of each triplet as facial -clique or not; see line 13.
Lemma 5.3 ().
Let and , and be the set of triplets containing , and , respectively. It can be decided in time if is bad or not.
After labeling all triplets as facial -cliques or non-facial -cliques, we consider the set of triplets labelled as facial -cliques. Checking whether covers all faces and clearly crossing edges of exactly once, in line 15 of Algorithm 1, can be done in time. Finally, we augment the planar rotation scheme of to an optimal -planar rotation scheme of in time by inserting the clearly crossing edges of and identifying the crossings; refer to Details 4 in Appendix D. The overall time required for the last step is in .
Every step described above takes time , hence Algorithm 1 can be implemented to run in linear time. We point out that after fixing , the optimal -planar rotation scheme of is uniquely defined if it exists. In particular, if there are instances of CROSS-BAT, there exist at most optimal -planar rotation schemes which can be easily enumerated.
6 Conclusions
We showed that simple optimal -planar graphs can be recognized and embedded in linear time. It remains open to extend our result also for simple -planar graphs with the maximum number of edges when , as well as to non-simple optimal -planar graphs. Another reasonable attempt would be recognizing -maps, similarly to [12]. Finally, a natural question would be if a recognition algorithm for non-simple optimal -planar graphs could be adopted for optimal -planar graphs that are non-simple, or if our approach could work for simple optimal -planar graphs.
Acknowledgement.
We thank Michael Bekos for his valuable suggestions and endless discussions on this topic.
References
- [1] Ackerman, E.: On topological graphs with at most four crossings per edge. CoRR 1509.01932 (2015), http://arxiv.org/abs/1509.01932
- [2] Auer, C., Bachmaier, C., Brandenburg, F.J., Gleißner, A., Hanauer, K., Neuwirth, D., Reislhuber, J.: Outer 1-planar graphs. Algorithmica 74(4), 1293–1320 (2016), https://doi.org/10.1007/s00453-015-0002-1
- [3] Bekos, M.A., Bruckdorfer, T., Kaufmann, M., Raftopoulou, C.N.: 1-planar graphs have constant book thickness. In: Bansal, N., Finocchi, I. (eds.) ESA. LNCS, vol. 9294, pp. 130–141. Springer (2015), http://dx.doi.org/10.1007/978-3-662-48350-3_12
- [4] Bekos, M.A., Giacomo, E.D., Didimo, W., Liotta, G., Montecchiani, F., Raftopoulou, C.N.: Edge partitions of optimal 2-plane and 3-plane graphs. Discret. Math. 342(4), 1038–1047 (2019), https://doi.org/10.1016/j.disc.2018.12.002
- [5] Bekos, M.A., Kaufmann, M., Raftopoulou, C.N.: On optimal 2- and 3-planar graphs. In: Aronov, B., Katz, M.J. (eds.) 33rd International Symposium on Computational Geometry, SoCG 2017, July 4-7, 2017, Brisbane, Australia. LIPIcs, vol. 77, pp. 16:1–16:16. Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2017), https://doi.org/10.4230/LIPIcs.SoCG.2017.16
- [6] Binucci, C., Giacomo, E.D., Didimo, W., Montecchiani, F., Patrignani, M., Symvonis, A., Tollis, I.G.: Fan-planarity: Properties and complexity. Theor. Comput. Sci. 589, 76–86 (2015), http://dx.doi.org/10.1016/j.tcs.2015.04.020
- [7] Bodendiek, R., Schumacher, H., Wagner, K.: Über 1-optimale Graphen. Mathematische Nachrichten 117(1), 323–339 (1984)
- [8] Borodin, O.V.: A new proof of the 6 color theorem. J. of Graph Theory 19(4), 507–521 (1995), http://dx.doi.org/10.1002/jgt.3190190406
- [9] Brandenburg, F.J.: Recognizing optimal 1-planar graphs in linear time. CoRR 1602.08022 (2016), http://arxiv.org/abs/1602.08022
- [10] Brandenburg, F.J.: Recognizing IC-planar and NIC-planar graphs. J. Graph Algorithms Appl. 22(2), 239–271 (2018), https://doi.org/10.7155/jgaa.00466
- [11] Brandenburg, F.J.: Recognizing optimal 1-planar graphs in linear time. Algorithmica 80(1), 1–28 (2018), https://doi.org/10.1007/s00453-016-0226-8
- [12] Brandenburg, F.J.: Characterizing and recognizing 4-map graphs. Algorithmica 81(5), 1818–1843 (2019), https://doi.org/10.1007/s00453-018-0510-x
- [13] Brandenburg, F.J., Didimo, W., Evans, W.S., Kindermann, P., Liotta, G., Montecchiani, F.: Recognizing and drawing IC-planar graphs. Theor. Comput. Sci. 636, 1–16 (2016), https://doi.org/10.1016/j.tcs.2016.04.026
- [14] Cheong, O., Har-Peled, S., Kim, H., Kim, H.: On the number of edges of fan-crossing free graphs. Algorithmica 73(4), 673–695 (2015), http://dx.doi.org/10.1007/s00453-014-9935-z
- [15] Didimo, W., Eades, P., Liotta, G.: Drawing graphs with right angle crossings. Theor. Comput. Sci. 412(39), 5156–5166 (2011)
- [16] Dujmovic, V., Joret, G., Micek, P., Morin, P., Ueckerdt, T., Wood, D.R.: Planar graphs have bounded queue-number. J. ACM 67(4), 22:1–22:38 (2020), https://dl.acm.org/doi/10.1145/3385731
- [17] Eades, P., Hong, S., Katoh, N., Liotta, G., Schweitzer, P., Suzuki, Y.: A linear time algorithm for testing maximal 1-planarity of graphs with a rotation system. Theor. Comput. Sci. 513, 65–76 (2013), https://doi.org/10.1016/j.tcs.2013.09.029
- [18] Giacomo, E.D., Didimo, W., Liotta, G., Meijer, H., Wismath, S.K.: Planar and quasi-planar simultaneous geometric embedding. Comput. J. 58(11), 3126–3140 (2015), http://dx.doi.org/10.1093/comjnl/bxv048
- [19] Hong, S., Eades, P., Katoh, N., Liotta, G., Schweitzer, P., Suzuki, Y.: A linear-time algorithm for testing outer-1-planarity. Algorithmica 72(4), 1033–1054 (2015), http://dx.doi.org/10.1007/s00453-014-9890-8
- [20] Hong, S., Eades, P., Liotta, G., Poon, S.: Fáry’s theorem for 1-planar graphs. In: Gudmundsson, J., Mestre, J., Viglas, T. (eds.) COCOON. LNCS, vol. 7434, pp. 335–346. Springer (2012), http://dx.doi.org/10.1007/978-3-642-32241-9_29
- [21] Hong, S., Nagamochi, H.: A linear-time algorithm for testing full outer-2-planarity. Discret. Appl. Math. 255, 234–257 (2019), https://doi.org/10.1016/j.dam.2018.08.018
- [22] Hopcroft, J.E., Tarjan, R.E.: Dividing a graph into triconnected components. SIAM J. Comput. 2(3), 135–158 (1973), https://doi.org/10.1137/0202012
- [23] Hopcroft, J.E., Tarjan, R.E.: Efficient planarity testing. J. ACM 21(4), 549–568 (1974), https://doi.org/10.1145/321850.321852
- [24] Kaufmann, M., Ueckerdt, T.: The density of fan-planar graphs. CoRR 1403.6184 (2014), http://arxiv.org/abs/1403.6184
- [25] Matula, D.W., Beck, L.L.: Smallest-last ordering and clustering and graph coloring algorithms. J. ACM 30(3), 417–427 (1983), https://doi.org/10.1145/2402.322385
- [26] Pach, J., Radoicic, R., Tardos, G., Tóth, G.: Improving the crossing lemma by finding more crossings in sparse graphs. Discrete & Computational Geometry 36(4), 527–552 (2006), http://dx.doi.org/10.1007/s00454-006-1264-9
- [27] Pach, J., Tóth, G.: Graphs drawn with few crossings per edge. Combinatorica 17(3), 427–439 (1997), http://dx.doi.org/10.1007/BF01215922
- [28] Ringel, G.: Ein Sechsfarbenproblem auf der Kugel. Abhandlungen aus dem Mathematischen Seminar der Universität Hamburg (in German) 29, 107–117 (1965)
- [29] Suzuki, Y.: Re-embeddings of maximum 1-planar graphs. SIAM J. Discrete Math. 24(4), 1527–1540 (2010), http://dx.doi.org/10.1137/090746835
- [30] Urschel, J.C., Wellens, J.: Testing gap k-planarity is NP-complete. Inf. Process. Lett. 169, 106083 (2021), https://doi.org/10.1016/j.ipl.2020.106083
Appendix 0.A Ommited Proofs from Section 2
See 2.1
Proof.
Assume for a contradiction that and belong to two different facial -cliques and of an optimal -planar rotation scheme of , respectively. Since and , it follows that and thus . Since , it follows that ; contradiction to Property 2.3. Hence, and belong to the same facial -clique. ∎
Appendix 0.B Ommited Proofs from Section 3
See 3.1
Proof.
Since is potentially planar, vertices and have at least six common neighbors. Out of these common neighbors, exactly three belong to (namely, , and ). It follows that at least three of the common neighbors of and , call them , and , do not belong to ; see Fig. 6(a). By Corollary 2.2, the edges connecting to , and do not cross the edges that connect to , and in . Assume w.l.o.g. that appear in this circular order around in ; see Fig. 6(a).






A symmetric argument for and implies the existence of three common neighbors , and of and that do not belong to . Since is a facial -clique, vertices appear between and in the circular order around in . In particular, we can assume w.l.o.g. that vertices occur in this order around in . Note that , and are not necessarily different from , and . In particular, we will prove in the following that .
Proposition 3.1.1.
None of the edges , and crosses .
Proof.
Proposition 3.1.2.
None of vertices lies in the interior of the region delimited by the cycle .
Proof.
Assume for a contradiction that vertex lies in the interior of this region (refer to the gray-shaded region in Fig. 6(c)); an analogous argument holds for and . Then, edge crosses at least three edges, in particular, one edge of and , one edge of and , and one edge of and ; a contradiction to the fact that is a optimal -planar rotation scheme. ∎
Proposition 3.1.3.
and edges and cross edge .
Proof.
Assume for a contradiction, that ; an analogous argument holds if we assume . Since , and appear in this circular order around in and since, by Proposition 3.1.1, edge does not cross , vertex is located in the region delimited by the cycle ; see Fig. 6(d). This contradicts Proposition 3.1.2, and hence .
Proposition 3.1.4.
.
Proof.



The constraints discussed so far lead to the configuration shown in Fig. 6(f). Since is a common neighbor of and , we turn our attention to edge . We prove the following:
Proposition 3.1.5.
Edge crosses and and is a facial -clique.
Proof.
By the circular order of edges around and , edge must cross one of edges and as well as one of edges and . First we prove that it must either cross and or and . Indeed if crosses and as in Fig. 7(a) (the case where crosses and is symmetric), edge is crossed by two independent edges, contradicting Property 2.2.
It remains to prove that does not cross edges and . Assume the contrary; see Fig. 7(b). Then, by Property 2.2, is a facial -clique with being one of its crossing-free boundary edges. However, by Proposition 3.1.3 edges and cross with edge , as ; a contradiction. We conclude that crosses and forming the facial -clique . ∎
To summarize so far, Propositions 3.1.2 and 3.1.3 imply that vertices and lie in the interior of the region delimited by the cycle . Since and are facial -cliques, we can further restrict and in the interior of the region delimited by the cycle ; see Fig. 7(c). In the following proposition, we restrict and even more.



Proposition 3.1.6.
Neither nor lies in the interior of the region delimited by the cycle .
Proof.
Proposition 3.1.7.
and edge crosses .
Proof.
Proposition 3.1.8.
.
Proof.
The constraints imposed by Propositions 3.1.1–3.1.8 imply the configuration shown in Fig. 8(c). It remains to decide whether or if is located in the interior of cycle .
Proposition 3.1.9.
.
Proof.
By Proposition 3.1.7 and by -planarity, we conclude that is located inside the cycle ; see Fig. 9(b). Since by Propositions 3.1.3 and 3.1.7, edge crosses with edges and , respectively, it follows by Property 2.2 that is a facial -clique. In addition, is a crossing-free edge on the boundary of this facial -clique.



Now, since edges and cross, they belong to a facial -clique that contains vertices . Let be the last vertex of this facial -clique. It must be since edge is a crossing edge inside the facial -clique .
The final configuration is depicted in Fig. 9(c). Vertices and have degree nine in , with eight common neighbors . Let be the subgraph induced by the vertex set . Since cycles and are crossing-free cycles and since the two edges and are already part of a facial -clique, contains only the edges of the four identified facial -cliques and possibly one or both of edges and .
Consider a relabeling of the vertices of based on the following table:
Figure 9(c)
We obtain the CROSS-BAT substructure of Fig. 2(a) where is the facial -clique as claimed. Since the boundaries of the four identified facial -cliques are crossing-free in , we can easily verify that the edges of are classified to clearly crossing and potentially planar according to the definition of CROSS-BAT; see also Fig. 2(a). ∎
See 3.2
Proof.
Consider an instance of CROSS-BAT in . In the following, we use the naming of vertices according to Fig. 2(a) for the vertices of . First we prove that the four -cliques of are always facial -cliques of .
Proposition 3.2.10 ().
Edges and belong to the same facial -clique in with . Also, edges and belong to another facial -clique with .
Proof.
By definition, vertices and have degree 9 in and . In particular and . On the other hand, the neighborhood of in consists of , , and (which form a -clique with ) and potentially (if the edge exists). We conclude that , and . Then . By Corollary 2.1, it follows that and belong to the same facial -clique . The vertex set of contains vertices , and , and two vertices from . By symmetry, the same holds for edges and , that is, they belong to the same facial -clique , whose vertex set contains vertices , , , and two vertices from . ∎
Proposition 3.2.11 ().
Let . Edges , and belong to a facial -clique in . Also, edges and and belong to another facial -clique .
Proof.
Consider edge . Since is clearly crossing it belongs to a facial -clique of . We have that . By Proposition 3.2.10, the edge belongs to two facial -cliques, that contain vertices and respectively. Since contains neither nor , it follows that contains exactly one of or . Then , where . Hence all three edges and and belong to the same facial -clique, namely . By symmetry, edges and and belong to another facial -clique where and . It remains to argue that . Recall that vertices and have degree nine in and therefore belong to three facial -cliques in . Already, by Proposition 3.2.10 we have identified two facial -cliques. Clearly if , vertex would belong to two more facial -cliques, namely and , that is a total of four facial -cliques. ∎
As initially mentioned, we identified four facial -cliques, , , and . Recall that contains two vertices from . We show now, that does not contain . Assume for a contradiction that contains and w.l.o.g. vertex . Then ; a contradiction to Property 2.3. Hence, contains both and . Analogously, contains both of and .
By Proposition 3.2.11, and are two facial -cliques that share the crossing-free edge . Moreover, by Property 2.4, edge is crossing-free as it belongs to the two facial -cliques and by Proposition 3.2.10; refer to Figs. 2(b) and 2(c). Hence, is contained in the crossing-free separating cycle while is contained in the crossing-free separating cycle . Since and are clearly crossing, edges and are on the boundary of , the same holds for edges and being on the boundary of . Now, by selecting or , we yield the two different embeddings of Figs. 2(b) and 2(c). ∎
See 3.4
Proof.
By Lemma 3.3, we can assume w.l.o.g. that has the rotation scheme of CROSS-BAT shown in Fig. 2(b) in . Then, it is not hard to see that edges and are potentially planar and cross each other. The same holds for edges and . It is evident that no other pair of potentially planar edges that belong to cross. ∎
Appendix C Ommited Proofs from Section 4
See 4.1
Proof.
Assume for a contradiction that is not bad. In , edge is assigned to and edge to . By the assumptions of the lemma, none of and is face-disjoint from (i.e., Case C.1 applies neither for nor for ). We consider two cases, depending on whether Case C.3 applies for one of and or Case C.2 applies for both and .
First, consider the case where w.l.o.g. shares faces and with (i.e., Case C.3 applies for ); the reasoning for is symmetric. We claim that is face-disjoint from , contradicting our assumption that none of and is face-disjoint from . Indeed, cannot share faces and with , as otherwise and cross each other in and thus and would be identical with . On the other hand, if contains face (which is also contained in ), then it follows that , and coincide; a contradiction. Hence, is necessarily face-disjoint with , contradicting our assumption that Case C.1 does not apply for .
Second, consider the case where Case C.2 applies for both and , that is, for triplet shares only face with . Clearly . In particular, in the facial -clique formed by contains vertices (the three vertices of face ) and vertex (which is endpoint of edge ). Similarly, in the facial -clique formed by contains vertices . Hence, the two facial -cliques share three vertices; a contradiction to Property 2.3. This concludes the proof. ∎
See 4.2
Proof.
Assume for a contradiction that is not bad, and each of and is face-disjoint from . Recall that in edge is assigned to and edge to , where might hold. Since is not bad, can be extended to an -compliant optimal -planar rotation scheme of . This implies that there exists (at least) one triplet that contains face , such that is not bad. If contains , then by Observation 4.2 edge is assigned to , i.e., . This contradicts our assumption that is face-disjoint with . Hence, does not contain . Similarly, we argue that does not contain .
By the assumptions of the lemma, and are face-disjoint from . Thus, in both edges and are drawn outside the faces of , which implies that they cross each other. Let and be the vertices of as shown in Fig. 10. Now edge is a crossing edge of the facial -clique formed by in , which, by Corollary 2.2, implies that and do not cross each other; a contradiction. ∎

See 4.3
Proof.
Assume that is not bad. Then can be extended to a -compliant optimal -planar rotation scheme of . Consider the facial -cliques of and in . Since the boundary edges of facial -cliques are crossing-free and shares only face with , edge must cross edge ; see Fig. 11. contains vertices , , (since these are vertices of ) and vertex (as an endpoint of edge ). Let be the last vertex of . If then by Observation 4.1, contradicting the assumption that shares only face with . Since edges and are both incident to and are crossing edges in , edges and are crossing-free. Similarly, edges and are crossing-free. Hence, the facial -clique of is ; see Fig 11.

Let and be the triplets that faces and are assigned to w.r.t. . It must be the case that as otherwise, would contain faces and of and, as a consequence, edge . Then would be identical to contradicting the fact that shares only face with . Hence we conclude that there exist triplets and such that is not bad. Observe that is surrounded by the three facial -cliques formed by , and in , that pair-wise share an uncrossed edge incident to . This implies that . Hence, if , then is bad as stated in the lemma. It remains to prove that there is a vertex with .
The facial -cliques formed by triplets and share vertices and , thus, by Property 2.4, edge is crossing-free in . Similarly, and share vertices and , while and share vertices and . Hence, edges and are also crossing-free in .
Thus, the facial -clique formed by is bounded by the crossing-free -cycle while the facial -clique formed by is bounded by the crossing-free -cycle where ; see Fig 11. Observe that since and share vertices and we can conclude that by Property 2.3. Similarly, each of and shares two vertices with , thus .
Since triplets and share vertex , at least one vertex among and , say , does not belong to by Property 2.3. Let . We claim that . Since is a facial -clique in , there exist two crossing-free paths and that connect and . Assume w.l.o.g. that the edges of and incident to appear in this order and between edges and in the circular order of edges around 222It might be that the edge of incident to coincides with or that the edge of incident to coincides with .; refer to Fig. 11. The cycle is crossing-free in . Since lies in the interior of this cycle, while vertices , and lie in its exterior, it follows that vertex is not adjacent to vertices , or , i.e., is adjacent only to vertex of .
To summarize, assuming that is not bad, vertex has degree nine and there exists at least one neighbor of that does not belong to , namely , such that . The lemma follows. ∎
See 4.4
Proof.
Assume for a contradiction that is not bad. Let be a -compliant optimal -planar rotation scheme of that extends . In , the triplet that contains edge contains three more neighbors of . Since , contains at least two vertices from , contradicting Property 2.3. ∎
See 4.5
Proof.
Assume that is not bad and that contains vertex . Then can be extended to a -compliant optimal -planar rotation scheme of . Since belongs to , it follows that also contains vertices and of . Let and be the other two vertices of . First we claim that neither nor is a vertex of . Assume the contrary, say for . Then, is either vertex or vertex of . If is vertex , then by Observation 4.1, triplet would contain face of contradicting the assumption that is face-disjoint with . On the other hand, if is vertex , then would contain edge , contradicting the fact that is different from .
Now, consider a counter-clockwise walk around the boundary of the facial -clique formed by in . If edge is not on the boundary of , then face would belong to ; a contradiction to the fact that is face-disjoint with . Similarly, is also on the boundary of , since face does not belong to . This implies that vertices , and appear consecutively along the boundary of , followed by vertices and .

Recall that w.r.t. edges , and are assigned to , and respectively, as shown in Fig. 12. Note that is not contained in any of , or . Let be the triplet that forms the facial -clique of where belongs to. Since is not bad, we conclude that is also not bad. Observe that is surrounded by the three facial -cliques formed by , and in , that pair-wise share an uncrossed edge incident to . Thus, vertex is a degree-9 vertex. Clearly, if , is bad as stated in the lemma. It remains to prove that there is no vertex with .
By the assumptions of the lemma, triplet contains faces and of , hence it contains vertices , , and of . Let be the last vertex of , which is different from . Now, along the boundary of vertices , and appear consecutively, followed by two more vertices that are different from vertices , and . Hence the neighbors of in circular order are or depending on whether vertex appears before of after vertex . Let be the set of neighbors of that do not belong to . We claim that every vertex of has at most neighbors in .
Recall that the boundary edges of the facial -cliques in are crossing-free. Since is a facial -clique in , it follows that there exist two crossing-free paths and that connect vertices and . Assume w.l.o.g. that the edges of and incident to appear in this order and between edges and in the circular order of edges around 333It might be that the edge of incident to coincides with or that the edge of incident to coincides with .; refer to Fig. 12. Then along with the crossing-free path forms a crossing-free cycle in . Vertex lies in the interior of this cycle (note that might be a vertex of this cycle), while vertex lies in its exterior. Thus, and can’t be adjacent vertices. Also, any other vertex of can be adjacent to at most one of and , proving the claim. To summarize, assuming that is not bad, and that vertex has degree nine, we conclude that for every neighbor of in it holds , proving the first part of the lemma. The case where is not bad and contains vertex is symmetric. ∎
See 4.6
Proof.
Assume for a contradiction that is not bad. Thus there is a -compliant optimal -planar rotation scheme of that extends . In , the neighbors of belong to three facial -cliques, one of them being . Let and be two other facial -cliques which include so that and share vertices and . Clearly, , and . Since each of and can contain at most one vertex of different from , this implies that must be adjacent to at least vertices of ; a contradiction. ∎
See 4.7
Proof.
Assume that is not bad, i.e. there exists a -compliant optimal -planar rotation scheme of that extends . By assumption, shares only faces and with in . In , face is part of a facial -clique formed by a triplet which is necessarily face-disjoint from all of , and . Since already shares vertices and with the facial -clique formed by , triplet contains neither vertex nor of , i.e. shares only the three vertices of with . The lemma follows. ∎
See 4.8
Proof.
Assume for a contradiction that is not bad. The boundary of triplet consists of two paths in , say and , that connect vertices and . Similarly, the boundary of consists of two paths in , say and , that connect vertices and . Note that and are edge-disjoint. The same holds for paths and . Assume w.l.o.g. that in the counter-clockwise order of edges around , we encounter the edges of , , and incident to in this order between edges and ; see Fig. 13. Thus, and are edge-disjoint. On the other hand, paths and might either be edge-disjoint, as in Fig. 13(a), or they share an edge, as shown in Figs. 13(b) and 13(c). Note that in the second case the edge of incident to is the same as the corresponding edge of .



Consider triplet of the lemma that contains face of . Since by assumption , triplet must contain at least one of the triangular faces that share edge or with face . Assume w.l.o.g. that contains the face sharing edge with ; the case where contains the face sharing edge with is symmetric. Let be the third vertex of this face that is different from vertices and ; see Fig. 13. Since both and are vertices of triplet , edge is an edge of . Furthermore lies in the interior of the cycle . In particular, the presence of path in implies that edge is a clearly crossing edge of .
Since is not bad there exists a -compliant optimal -planar rotation scheme of that extends . We focus on edge in , and consider two cases, depending on whether paths and are edge-disjoint or not. If and are edge-disjoint, the edge in must cross an edge of , an edge of and an edge of , as shown in Fig. 13(a). This implies that cannot exist, since has at least three crossings; a contradiction to the assumption that is not bad. If and share edge , then in , edge must cross the edge of that is incident to , say , and the common edge of paths and (otherwise, we can conclude as before that is bad). Furthermore, vertex belongs to path as otherwise also crosses an edge of creating three crossings along . This implies that in , is a facial -clique, and edge is a crossing edge of this facial -clique; see Figs. 13(b) and 13(c).
Now, triplet contains vertices , , and . Let be the last vertex of which by the assumptions of the lemma is not a vertex of , and it is adjacent to vertices , and .
Since by the assumption of the lemma, is face-disjoint from and , it follows that is in the interior of the region bounded by cycle or the region bounded by cycle . In the first case; see Fig. 13(b), edge can’t be drawn since it should cross paths , and , having at least three crossings; a contradiction. Similarly, in the second case; see Fig. 13(c), edge can’t be drawn since it should cross paths , and , having at least three crossings; a contradiction. The lemma follows. ∎
See 4.9


Proof.
From the assumptions stated in the lemma, edges and belong to both triplets and . This implies that and share vertices , and . If and share another vertex, then and would have at least three common vertices, contradicting the assumptions of the lemma.
Hence, and form the configuration shown in Fig. 14(a) which is unique up to a renaming of vertices and and a renaming of vertices and . Triplet contains vertices , , , and a vertex which by the assumptions of the lemma does not belong to or .
Assume that is not bad, i.e., there exists a -compliant optimal -planar rotation scheme of that extends such that is a facial -clique in . Assume w.l.o.g. that lies in the exterior of the cycle of as shown in Fig. 14(b). Since is a triplet, edges and belong to . Furthermore, and are clearly crossing edges, as and lie in the interior of and in its exterior; see Fig. 14(b).
In , edge must cross both edges and . This implies that is a facial -clique in ; see Fig. 14(b). Similarly, edge must cross edges and (the latter crossing is unavoidable in the presence of the facial -cliques formed by and ), hence is another facial -clique of . Then and form two facial -cliques in and share vertices , and , contradicting Property 2.3. ∎
See 4.10
Proof.
Since is optimal -planar, then at least one of or for some triplets and is not bad. Hence if is bad, the lemma holds. It remains to argue that if is not bad, then every set is bad. Assume that this is not the case, and there exist triplets and such that is not bad.
By Lemmas 4.1 and 4.2, exactly one of and is face-disjoint with . Assume, w.l.o.g. that is face-disjoint with , i.e. Case C.1 applies for . Then either shares only face with or it shares only faces and with , i.e either Case C.2 or Case C.3 applies for , respectively. Thus, also holds.
In the first case, by Lemma 4.3 it follows that vertex of has degree and that there exists a vertex such that . On the other hand, applying Lemma 4.4 for vertex , we conclude that is bad, contradicting our assumption that both and are not bad. Hence, we can assume that shares only faces and with , i.e. Case C.3 applies for . Consider edge of . Since is not bad, can be extended to at least one -compliant optimal -planar rotation scheme of . Let be such a rotation scheme and let triplet be the triplet that edge is assigned to w.r.t. . We observe first that . Indeed, since shares vertices , , and with , would imply that ; a contradiction. We distinguish two cases, depending on whether or .
Case 1: . Since and it follows that belongs neither to nor to . Furthermore, the existence of implies that is not bad. Applying Lemma 4.6 for , we conclude that for every vertex with degree nine, there exists a vertex such that . In particular, this property holds for vertices and if any of them has degree nine. Since is not bad, we conclude from Lemma 4.5 that does not contain while does not contain . Hence, by Lemma 4.7 for , there exists a triplet that contains face of , shares only vertices of with , and is face-disjoint from all triplets of . Then, Lemma 4.8 implies that is bad; a contradiction.
Case 2: . Both triplets and contain edges and , hence they contain their endpoints, i.e. and share at least three vertices. Since is not bad, and since triplets and both contain vertices and , triplets and have exactly two common vertices by Property 2.3. Now the conditions of Lemma 4.9 are fulfilled and we conclude that is bad; a contradiction. This completes the proof of the lemma. ∎
See 4.11
Proof.
Clearly, if we can apply at least one of these lemmas for then is bad. So, assume that is bad, and that for each of these lemmas not all conditions hold for . Since is optimal -planar, by Lemma 4.10, there exists a set that is not bad.
By Lemmas 4.1 and 4.2, exactly one of and is face-disjoint with . Assume, w.l.o.g. that is face-disjoint with . Then either shares only face with or it shares only faces and with .
In the first case, since does not fulfill all conditions of Lemma 4.4, we conclude that, in particular for vertex , holds or every vertex has . Then, the conditions of Lemma 4.3 are satisfied, and is bad; a contradiction.
Hence, we can assume that shares only faces and with . Consider edge of . Since is not bad, can be extended to at least one -compliant optimal -planar rotation scheme of . Let be such an embedding and let triplet be the triplet that is assigned to w.r.t. .
Since does not satisfy all conditions of Lemma 4.9, either or does not have exactly two common vertices with . If has at least three common vertices with , then by Property 2.3, set is bad. On the other hand, if has exactly one common vertex with , then , as otherwise, and would share vertices and . Hence, it suffices to consider the case where . Note that also holds. Indeed, since shares vertices , , and with , would imply that also holds; a contradiction.
Then is not bad, which implies that is face-disjoint from and . Since does not satisfy all conditions of Lemma 4.6, in particular for vertex , holds or there exists a vertex such that . If contains vertex , then Lemma 4.5 implies that is bad; a contradiction. Hence, does not contain vertex . Using the same argument for vertex , we conclude that does not contain vertex . Already all conditions of Lemma 4.8 are satisfied except for the constraints related to . Since by assumption not all conditions of Lemma 4.8 are met, we conclude that every triplet that contains (i) shares at least four vertices with , or, (ii) is not face-disjoint with at least one triplet of . Then all conditions of Lemma 4.5 are satisfied and is bad. The lemma follows. ∎
Appendix D Ommited Proofs and Details from Section 5
Theorem D.1.
Algorithm 1 is correct.
Proof.
We assume that the input graph has exactly edges and is -degenerate. We proceed with the four steps of our algorithm as described in Section 5.1 and formalized in Algorithm 1. In the first step, we use Corollary 2.3 to classify each edge of as clearly crossing or potentially planar. Recall that an edge is potentially planar if and only if its two endpoints have at least six common neighbors.
From Lemma 3.1 we get that if two potentially planar edges of cross each other in some optimal -planar rotation scheme, then they belong to an instance of CROSS-BAT. Hence, in the second step, we identify all such instances and by Lemma 3.2 we can fix the partial rotation scheme of the subgraph induced by the vertices of each CROSS-BAT instance. By doing this, we change the classification of two potentially planar edges of each instance to clearly crossing edges. Note that by Lemma 3.4 for every CROSS-BAT instance, there exist exactly two pairs of potentially planar edges that cross, hence the reclassification process takes place only when potentially planar edges cross in some optimal -planar rotation scheme.
As a result, the subgraph defined by the set of potentially planar edges is planar. Furthermore, if is optimal 2-planar, then must also be 3-connected and spanning , as it contains as subgraph the 3-connected pentangulation of every -compliant optimal -planar rotation scheme of . Hence if is not planar or if is not 3-connected we can conclude that is not optimal-2-planar. If is planar and 3-connected, we compute its unique planar rotation scheme . Note that by Lemma 3.3, if is optimal 2-planar, then there exists a -compliant optimal -planar rotation scheme of . As mentioned at the beginning of Section 4, all faces of must have length , or . In particular non-triangular faces belong to facial -cliques of and hence they induce complete subgraphs in . If these properties are violated, we conclude that does not exist and is not optimal 2-planar. In order to proceed with the next step, we first need to augment to maximal planar. To achieve this, we arbitrarily triangulate every non-triangular face of (this process can not create parallel edges or self-loops in as it is 3-connected). Also, since non-triangular faces induce complete subgraphs in , the added edges belong to and are classified as clearly crossing. We change their classification to potentially planar so that they belong to .
The next step is to calculate the triplets of , which can be accomplished by computing the paths of length two of the dual of and check whether the vertices of the three faces induce a -clique in .
Now, for each triplet we can use Lemma 4.11 to decide whether is bad or not. If is not bad, we mark triplet as a facial -clique. By definition, if is a facial -clique of any -compliant optimal -planar rotation scheme of , then the three clearly crossing edges of are assigned to and to no other triplet by Lemma 4.10. Hence if any clearly crossing edge of is not assigned to exactly one triplet, then we can conclude that is not optimal-2-planar. Similarly, a face of is assigned to exactly one triplet. If this property does not hold, then is not optimal 2-planar.
Having reached this point, is an optimal 2-planar graph and it remains to compute its -compliant optimal -planar rotation scheme by combining the embedding of and the triplets marked as facial -cliques. To do this, for each triplet as depicted in Fig. 3, for every vertex of we insert the clearly crossing edges of that are incident to between the corresponding edges of in the cyclic order of edges around . Also, we define the order of crossings along each edge of as indicated by Fig. 3.
The correctness of Algorithm 1 follows from the above analysis. ∎
Details 1.
In our algorithm, we assume that the given graph has edges and is -degenerate. Checking whether a graph has these properties can be done in linear time by using standard algorithms [25].
For checking whether is planar and 3-connected, and for computing the planar rotation scheme of (the cyclic order of the edges around each vertex, and the faces corresponding to the embedding), as well as the dual graph we use standard algorithms that run in linear time and data structures that consume linear space [22, 23].
In all steps, it is required to check whether two vertices are adjacent or to find the edge between two given vertices. Since is -degenerate, for each vertex in the degeneracy sequence , we separately store its edges in subgraphs and . For , edge belongs to . Hence, it suffices to only check the stored edges of in , which are at most nine. Hence, the cost of these operations is .
See 5.1
Proof.
First, we compute a 9-degenerate sequence of the vertices of in linear time [25]. In order to classify the edges, for each edge we count the number of common neighbors of and as follows. For we process vertex . Recall that since is 9-degenerate, vertex has at most nine neighbors in . For each of the at most pairs of neighbors of in , we check whether they are connected by an edge in time. If so, we update the number of common neighbors for the edges , and . After this process, we check whether the number of common neighbors computed for each edge is at least or not. If this is the case we mark as potentially planar, otherwise as clearly crossing. Since for every vertex, we process at most pairs of neighbors in time each, the classification of all edges of takes time in total. ∎
See 5.2
Proof.
We iterate over all edges of trying to identify first the base edge of each CROSS-BAT instance. Recall that each base edge is potentially planar and both its endpoints have degree . So, in our iteration we explicitly focus on such edges. Let be such an edge. If is the base edge of a CROSS-BAT instance, then . Since and are degree-9 vertices, we can check in time if has eight elements. If this is not true, then is not the base edge of a CROSS-BAT instance. Otherwise, let be the subgraph induced by and let . In the following, we try to find an isomorphism between and the vertices of CROSS-BAT as named in Fig. 2(a).
Clearly, if is an instance of CROSS-BAT, then must have the same degree-sequence in decreasing order as CROSS-BAT. If this is not true, then is not an instance of CROSS-BAT.
Since vertices and of CROSS-BAT are the only vertices with or neighbors in CROSS-BAT (depending on whether they are adjacent to and , respectively), we can find the corresponding two vertices of ; assume w.l.o.g. that . From the set of the remaining vertices of CROSS-BAT, only and have five neighbors in . W.l.o.g., let and .
Now and are connected to with potentially planar edges, while and are connected to with clearly crossing edges. This allows to distinguish and from and . So, let w.l.o.g. and . Also, and are connected to and not connected to . Hence, we can identify and ; w.l.o.g. let and .
It remains to identify , , and . Since the pairs and are symmetric in CROSS-BAT, we arbitrarily choose . Since is connected to but not to , this allows to identify ; w.l.o.g. let . Then we can conclude that and . After the mapping of the vertices of to the ones of CROSS-BAT, it remains to check that is isomorphic to CROSS-BAT, i.e., that it contains exactly the edges of CROSS-BAT, and that the edges of have the same classification (clearly crossing or potentially planar) as the corresponding edges of the CROSS-BAT.
If the above process fails at any step, then we can conclude that is not an instance of CROSS-BAT. After identifying the two adjacent vertices and with degree , all steps related to determining whether is a base edge of a CROSS-BAT instance can be performed in time. ∎
Details 2.
If is optimal -planar, is 3-connected, planar and spans . These properties can be checked in linear time with algorithms that also compute the planar rotation scheme of . Note that we ensured that is -connected, hence, is uniquely defined (see line 6 of Algorithm 1). After computing , we can iterate over all faces of and check for each face in time, if its length is at most five and, if so, check in time, if it induces a complete subgraph in (see lines 7–8). If any face violates these constraints, we reject the instance in line 9.
Next, we triangulate all faces of length four or five in line 10 of Algorithm 1. In fact, adding edges in corresponds to reclassifying some clearly crossing edges of as potentially planar. This process takes time . Now that is maximal planar, we recompute its planar rotation scheme and its dual in linear time.
Details 3.
Recall that a triplet consists of three faces , and of which form the path of length in the dual . All vertices of have degree 3, hence identifying all paths of length two takes linear time in the order of , i.e. time. For each path we check in time, if the vertices of the three faces induce a -clique in . If this is the case, the path is a triplet of . During this process, for each face and each clearly crossing edge of , we store the set of triplets that contain it and count their cardinalities. Note that this information can be stored in linear space, since each triplet contains three faces and three clearly crossing edges of .
See 5.3
Proof.
By Lemma 4.11 it suffices to check whether the conditions of one of Lemmas 4.4, 4.6, 4.8 and 4.9 are met. For the first two lemmas, namely Lemmas 4.4 and 4.6, for every vertex with , and every neighbor of , we compute the set and its cardinality. Since and , this computation requires to check a constant number of times for the existence of some edge. Hence, it takes time to check whether the conditions of Lemmas 4.4 and 4.6 hold for .
The next two lemmas, namely Lemmas 4.8 and 4.9, assume that is face-disjoint from and contains faces and of . The case where is face-disjoint from and contains faces and of can be handled analogously. In a brute-force approach for Lemma 4.8, one would have to consider all triplets that contain face and all possible sets , where edges , and belong to , and respectively. Since contains face of , there exist at most five ways to extend to a path of three faces in the dual of . Checking whether these paths of faces form triplets of and whether they share only the vertices of with can be performed in time. Similarly, since shares faces and with , there are at most three choices for its third face (face is excluded). For each choice we can identify in time if this is a triplet of . Clearly if we cannot identify or then the conditions of Lemma 4.8 are not met.
Now, in this brute-force approach, for triplets and , there might exist a linear number of triplets that contain edge (or ), thus we would have to consider a quadratic number of sets . Ideally we would like to have a bounded number of triplets that contain edge or . In fact we can prove that if this is not the case, then we can always find triplets and that satisfy the conditions of Lemma 4.8, i.e. it applies for . In order to achieve this, we need the following:
Proposition 5.3.1.
Let be a triplet and consider a set of triplets with at least 20 elements. Then, at least one triplet of the set is face-disjoint with .
Proof.

We want to count the triplets that contain at least one face of . Each triplet corresponds to a unique path of length in the dual ; see Fig. 15. There exist five triplets that contain face but not face , and four triplets that contain both and . Similarly there exist nine triplets that contain face (four of them also include face ), and two triplets that contain but not and . In total we count 20 triplets, having counted twice: once for face and once for face . Hence there exist at most 19 different triplets that contain at least one face of . Then if the set contains at least 20 elements, there is at least one triplet that is face-disjoint with . ∎
Along the same lines we can argue the following:
Proposition 5.3.2.
Let be a triplet, with vertices and that are consecutive along its boundary in . Let be a set of at least six triplets that are face-disjoint from and contain vertex . Then, at least one triplet of the set does not contain vertex .
Proof.
Let and be the two faces of that share edge . Assume w.l.o.g. that belongs to . Note that any triplet that is face-disjoint with and contains both vertices and , must contain face (and not ). There exist at most five such triplets. Hence, if has at least six elements, then it has at least one triplet that does not contain , i.e. does not contain vertex as claimed. ∎
Consider the set of triplets that contain edge and the set of triplets that contain edge . Assume w.l.o.g. that . If then we can check for every and every whether the conditions of Lemma 4.8 hold. Checking whether and are face-disjoint and whether they contain vertex and , respectively, takes time.
So assume that . If we can find a triplet that is face-disjoint from all of , and , and does not contain vertex , then we claim that Lemma 4.8 applies and is bad. Indeed, assuming a valid , since then Proposition 5.3.1 assures that at least triplets of are face-disjoint from . Among these triplets, at least of them are also face-disjoint from , at least of these are also face-disjoint from , and at least six of them are additionally face-disjoint from . Then by Proposition 5.3.2 we can find a triplet that, in addition to the previous properties, does not contain vertex . Then all conditions of Lemma 4.8 are met for , which implies that is bad as claimed. Hence we only need to identify triplet . If , then we check all elements of , whether they are face-disjoint from all of , and , and do not contain vertex in time. If we find triplet , then is bad, otherwise the conditions of Lemma 4.8 are not met. If on the other hand, , Propositions 5.3.1 and 5.3.2 assure that there exists a triplet with the aforementioned properties, hence the conditions of Lemma 4.8 are satisfied.
Finally, for Lemma 4.9, first we need to find triplets and , if they exist. Note that if exists, then it contains the face opposite of along edge . This face, considered as a vertex in the dual of , can be extended to at most five different paths of length of . We can check for each path in time if its vertices create a -clique, i.e. if this is a triplet of . On the other hand, since contains faces and of , there are at most three choices for its third face (face is excluded). Again, we check if these options define triplets of in time. Now, for every triplet and we check in time if they are face-disjoint and whether they have exactly two common vertices. Since there exist at most five triplets and at most three triplets , checking whether Lemma 4.9 applies for can be done in time. ∎
Details 4.
Here we augment the planar rotation scheme of to an optimal -planar rotation scheme of by inserting the clearly crossing edges of appropriately. Let triplet as depicted in Fig. 3. For every vertex of we insert the clearly crossing edges of that are incident to between the corresponding edges of in the cyclic order of edges around . This can be done in time for the clearly crossing edges incident to a specific vertex in a triplet as the triplet consists of the faces that provide access to the correct position in the cyclic neighbor list of . Since the triplet also defines the crossings contained in the facial -clique, we can define and store the order of crossings along each edge of in time.