Keywords

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

1 Introduction

Planar graphs play an important role in graph drawing and visualization, as the avoidance of crossings and occlusions is central objective in almost all applications [10, 18]. The theory of planar graphs [15] could be very nicely applied and used for developing great layout algorithms [13, 22, 23] based on the planarity concepts. Unfortunately, real-world graphs are usually not planar despite of their sparsity. With this background, an initiative has formed in recent years to develop a suitable theory for nearly planar graphs, that is, graphs with various restrictions on their crossings, such as limitations on the number of crossings per edge (e.g., k-planar graphs [21]), avoidance of local crossing configurations (e.g., quasi planar graphs [2], fan-crossing free graphs [9], fan-planar graphs [17]) or restrictions on the crossing angles (e.g., RAC graphs [11], LAC graphs [12]). For precise definitions, we refer to the literature mentioned above.

The most prominent is clearly the concept of k-planar graphs, namely graphs that allow drawings in the plane such that each edge is crossed at most k times by other edges. The simplest case \(k=1\), i.e., 1-planar graphs [21], has been subject of intensive research in the past and it is quite well understood, see e.g. [4, 6,7,8, 14, 20]. For \(k \ge 2\), the picture is much less clear. Only few papers on special cases appeared, see e.g., [3, 16].

Pach and Tóth’s paper [20] stands out and contributed a lot to the understanding of nearly planar graphs. The paper considers the number of edges in simple k-planar graphs for general k. Note the well-known bound of \(3n-6\) edges for planar graphs deducible from Euler’s formula. For small \(k = 1,2,3\) and 4, bounds of \(4n-8\), \(5n-10\), \(6n-12\) and \(7n-14\) respectively, are proven which are tight for \(k =1\) and \(k=2\). This sequence seems to suggest a bound of O(kn) for general k, but Pach and Tóth also gave an upper bound of \(4.1208 \sqrt{k} n\). Unfortunately, this bound is still quite large even for medium k (for \(k=9\), it gives 12.36n). Meanwhile for \(k=3\) and \(k=4\), the bounds above have been improved to \(5.5n-11\) and \(6n-12\) in [19] and [1], respectively. In this paper, we prove that the bound on the number of edges for \(k=3\) also holds for non-simple 3-planar graphs that do not contain homotopic parallel edges and homotopic self-loops. Our extension required substantially different approaches and relies more on geometric techniques than the more combinatorial ones given in [19] and [1]. We believe that it might also be central for the characterization of optimal 3-planar graphs (that is, 3-planar graphs with n vertices and exactly \(\frac{11}{2}n-11\) edges), since the densest known simple 3-planar graph has only \(\frac{11n}{2}-15\) edges and does not reach the known bound.

The remaining of this paper is structured as follows: Some definitions and preliminaries are given in Sect. 2. In Sects. 3 and 4, we give significant insights in structural properties of 3-planar graphs in order to prove that 3-planar graphs on n vertices cannot have more than \(\frac{11}{2}n-11\) edges. We conclude in Sect. 5 with open problems.

2 Preliminaries

A drawing of a graph G is a representation of G in the plane, where the vertices of G are represented by distinct points and its edges by Jordan curves joining the corresponding pairs of points, so that: (i) no edge passes through a vertex different from its endpoints, (ii) no edge crosses itself and (iii) no two edges meet tangentially. In the case where G has multi-edges, we will further assume that both the bounded and the unbounded closed regions defined by any pair of self-loops or parallel edges of G contain at least one vertex of G in their interior. Hence, the drawing of G has no homotopic edges. In the following when referring to 3-planar graphs we will mean that non-homotopic edges are allowed in the corresponding drawings. We call such graphs non-simple.

Following standard naming conventions, we refer to a 3-planar graph with n vertices and maximum possible number of edges as optimal 3-planar. Let H be an optimal 3-planar graph on n vertices together with a corresponding 3-planar drawing \(\varGamma (H)\). Let also \(H_p\) be a subgraph of H with the largest number of edges, such that in the drawing of \(H_p\) (that is inherited from \(\varGamma (H)\)) no two edges cross each other. We call \(H_p\) a maximal planar substructure of H. Among all possible optimal 3-planar graphs on n vertices, let \(G=(V,E)\) be the one with the following two properties: (a) its maximal planar substructure, say \(G_p=(V,E_p)\), has maximum number of edges among all possible planar substructures of all optimal 3-planar graphs, (b) the number of crossings in the drawing of G is minimized over all optimal 3-planar graphs subject to (a). We refer to G as crossing-minimal optimal 3-planar graph.

With slight abuse of notation, let \(G-G_p\) be obtained from G by removing only the edges of \(G_p\) and let e be an edge of \(G-G_p\). Since \(G_p\) is maximal, edge e must cross at least one edge of \(G_p\). We refer to the part of e between an endpoint of e and the nearest crossing with an edge of \(G_p\) as stick. The parts of e between two consecutive crossings with \(G_p\) are called middle parts. Clearly, e consists of exactly 2 sticks and 0, 1, or 2 middle parts. A stick of e lies completely in a face of \(G_p\) and crosses at most two other edges of \(G-G_p\) and an edge of this particular face. A stick of e is called short, if there is a walk along the face boundary from the endpoint of the stick to the nearest crossing point with \(G_p\), which contains only one other vertex of the face boundary. Otherwise, the stick of e is called long; see Fig. 1a. A middle part of e also lies in a face of \(G_p\). We say that e passes through a face of \(G_p\), if there exists a middle part of e that completely lies in the interior of this particular face. We refer to a middle part of an edge that crosses consecutive edges of a face of \(G_p\) as short middle part. Otherwise, we call it far middle part.

Fig. 1.
figure 1

(a) Illustration of a non-simple face \(\{v_1,v_2,\ldots ,v_7\}\); \(v_6\) is identified with \(v_4\). The sticks from \(v_1\) and \(v_2\) are short, while the one from \(v_7\) is long. All other edge segments are middle-parts. (b) The case, where two triangles of type (3, 0, 0) are associated to the same triangle.

Let \(\mathcal {F}_s=\{v_1,v_2,\ldots ,v_s\}\) be a face of \(G_p\) with \(s \ge 3\). The order of the vertices (and subsequently the order of the edges) of \(\mathcal {F}_s\) is determined by a walk around the boundary of \(\mathcal {F}_s\) in clockwise direction. Since \(\mathcal {F}_s\) is not necessarily simple, a vertex (or an edge, respectively) may appear more than once in this order; see Fig. 1a. We say that \(\mathcal {F}_s\) is of type \((\tau _1,\tau _2,\ldots ,\tau _s)\) if for each \(i=1,2,\ldots ,s\) vertex \(v_i\) is incident to \(\tau _i\) sticks of \(\mathcal {F}_s\) that lie between \((v_{i-1},v_i)\) and \((v_i,v_{i+1})\) Footnote 1.

Lemma 1

(Pach and Tóth [20]). A triangular face of \(G_p\) contains at most 3 sticks.

Proof

Consider a triangular face \(\mathcal {T}\) of \(G_p\) of type \((\tau _1,\tau _2,\tau _3)\). Clearly, \(\tau _1,\tau _2,\tau _3 \le 3\), as otherwise an edge of \(G_p\) has more than three crossings. Since a stick of \(\mathcal {T}\) cannot cross more than two other sticks of \(\mathcal {T}\), it follows that \(\tau _1+\tau _2+\tau _3 \le 3\).     \(\square \)

3 The Density of Non-simple 3-Planar Graphs

Let \(G=(V,E)\) be a crossing-minimal optimal 3-planar graph with n vertices drawn in the plane. Let also \(G_p=(V,E_p)\) be the maximal planar substructure of G. In this section, we will prove that G cannot have more than \(\frac{11n}{2}-11\) edges, assuming that \(G_p\) is fully triangulated, i.e., \(|E_p| = 3n-6\). This assumption will be proved in Sect. 4. Next, we prove that the number of triangular faces of \(G_p\) with exactly 3 sticks cannot be larger than those with at most 2 sticks.

Lemma 2

We can uniquely associate each triangular face of \(G_p\) with 3 sticks to a neighboring triangular face of \(G_p\) with at most 2 sticks.

Proof

Let \(\mathcal {T}=\{v_1,v_2,v_3\}\) be a triangular face of \(G_p\). By Lemma 1, we have to consider three types for \(\mathcal {T}\): (3, 0, 0), (2, 1, 0) and (1, 1, 1).

  • \(\mathcal {T}\) is of type (3, 0, 0): Since \(v_1\) is incident to 3 sticks of \(\mathcal {T}\), edge \((v_2,v_3)\) is crossed three times. Let \(\mathcal {T}'\) be the triangular face of \(G_p\) neighboring \(\mathcal {T}\) along \((v_2,v_3)\). We have to consider two cases: (a) one of the sticks of \(\mathcal {T}\) ends at a corner of \(\mathcal {T}'\), and (b) none of the sticks of \(\mathcal {T}\) ends at a corner of \(\mathcal {T}'\). In Case (a), the two remaining sticks of \(\mathcal {T}\) might use the same or different sides of \(\mathcal {T}'\) to exit it. In both subcases, it is not difficult to see that \(\mathcal {T}'\) can have at most two sticks. In Case (b), we again have to consider two subcases, depending on whether all sticks of \(\mathcal {T}\) use the same side of \(\mathcal {T}'\) to pass through it or two different ones. In the former case, it is not difficult to see that \(\mathcal {T}'\) cannot have any stick, while in the later \(\mathcal {T}'\) can have at most one stick. In all aforementioned cases, we associate \(\mathcal {T}\) with \(\mathcal {T}'\).

  • \(\mathcal {T}\) is of type (2, 1, 0): Since \(v_2\) is incident to one stick of \(\mathcal {T}\), edge \((v_1,v_3)\) is crossed at least once. We associate \(\mathcal {T}\) with the triangular face \(\mathcal {T}'\) of \(G_p\) neighboring \(\mathcal {T}\) along \((v_1,v_3)\). Since the stick of \(\mathcal {T}\) that is incident to \(v_2\) has three crossings in \(\mathcal {T}\), \(\mathcal {T}'\) has no sticks emanating from \(v_1\) or \(v_3\). In particular, \(\mathcal {T}'\) can have at most one additional stick emanating from its third vertex.

  • \(\mathcal {T}\) is of type (1, 1, 1): This actually cannot occur. Indeed, if \(\mathcal {T}\) is of type (1, 1, 1), then all sticks of \(\mathcal {T}\) have already three crossings each. Hence, the three triangular faces adjacent to \(\mathcal {T}\) define a 6-gon in \(G_p\), which contains only six interior edges. So, we can easily remove them and replace them with 8 interior edges (see, e.g., Fig. 1b), contradicting thus the optimality of G.

Note that our analysis also holds for non-simple triangular faces. We now show that the assignment is unique. This holds for triangular faces of type (2, 1, 0), since a triangular face that is associated with one of type (2, 1, 0) cannot contain two sides each with two crossings, which implies that it cannot be associated with another triangular face with three sticks. This leaves only the case that two (3, 0, 0) triangles are associated with the same triangle \(\mathcal {T}'\) (see, e.g., the triangle with the gray-colored edges in Fig. 1b). In this case, there exists another triangular face (bottommost in Fig. 1b), which has exactly two sticks because of 3-planarity. In addition, this face cannot be associated with some other triangular face. Hence, one of the two type-(3, 0, 0) triangular faces associated with \(\mathcal {T}'\) can be assigned to this triangular face instead resolving the conflict.     \(\square \)

We are now ready to prove the main theorem of this section.

Theorem 1

A 3-planar graph of n vertices has at most \(\frac{11}{2}n -11\) edges, which is a tight bound.

Proof

Let \(t_i\) be the number of triangular faces of \(G_p\) with exactly i sticks, \(0 \le i \le 3\). The argument starts by counting the number of triangular faces of \(G_p\) with exactly 3 sticks. From Lemma 2, we conclude that the number \(t_3\) of triangular faces of \(G_p\) with exactly 3 sticks is at most as large as the number of triangular faces of \(G_p\) with 0, 1 or 2 sticks. Hence \(t_3 \le t_0 + t_1 + t_2\). We conclude that \(t_3 \le t_p/2\), where \(t_p\) denotes the number of triangular faces in \(G_p\), since \(t_0 + t_1 + t_2 + t_3 = t_p\). Note that by Euler’s formula \(t_p = 2n-4\). Hence, \(t_3 \le n-2\). Thus, we have: \(|E| - |E_p| = (t_1 + 2t_2 + 3t_3)/2 = (t_1 + t_2 + t_3) + (t_3 - t_1)/2 = (t_p - t_0) + (t_3 - t_1)/2 \le t_p + t_3/2 \le 5t_p/4\). So, the total number of edges of G is at most: \(|E| \le |E_p| + 5t_p/4 \le 3n - 6 + 5(2n - 4)/4 = 11n/2 - 11\). In [5] we prove that our bound is tight by a construction similar to the one of Pach et al. [19].     \(\square \)

4 The Density of the Planar Substructure

Let \(G=(V,E)\) be a crossing-minimal optimal 3-planar graph with n vertices drawn in the plane. Let also \(G_p=(V,E_p)\) be the maximal planar substructure of G. In this section, we will prove that \(G_p\) is fully triangulated, i.e., \(|E_p| = 3n-6\) (see Theorem 2). To do so, we will explore several structural properties of \(G_p\) (see Lemmas 313), assuming that \(G_p\) has at least one non-triangular face, say \(\mathcal {F}_s=\{v_1, v_2, \ldots , v_s\}\) with \(s \ge 4\). In the first observations, we do not require that \(G_p\) is connected. This is proved in Lemma 6. Recall that in general \(\mathcal {F}_s\) is not necessarily simple, which means that a vertex may appear more than once along \(\mathcal {F}_s\). Our goal is to contradict either the optimality of G (that is, the fact that G contains the maximum number of edges among all 3-planar graphs with n vertices) or the maximality of \(G_p\) (that is, the fact that \(G_p\) has the maximum number of edges among all planar substructures of all optimal 3-planar graphs with n vertices) or the crossing minimality of G (that is, the fact that G has the minimum number of crossings subject to the size of the planar substructure).

Lemma 3

Let \(\mathcal {F}_s=\{v_1, v_2, \ldots , v_s\}\), \(s \ge 4\) be a non-triangular face of \(G_p\). Then, each stick of \(\mathcal {F}_s\) is crossed at least once within \(\mathcal {F}_s\).

Proof

(Sketch). Assume to the contrary that there exists a stick of \(\mathcal {F}_s\) that is not crossed within \(\mathcal {F}_s\). W.l.o.g. let \((v_1,v_1')\) be the edge containing this stick and assume that \((v_1,v_1')\) emanates from vertex \(v_1\) and leads to vertex \(v_1'\) by crossing the edge \((v_i,v_{i+1})\) of \(\mathcal {F}_s\). We initially prove that \(i+1=s\). Next, we show that there exist two edges \(e_1\) and \(e_2\) which cross \((v_i,v_{i+1})\) and are not sticks emanating from \(v_1\). The desired contradiction follows from the observation that we can remove edges \(e_1\), \(e_2\) and \((v_1,v_1')\) from G and replace them with the chord \((v_1,v_{s-1})\) and two additional edges that are both sticks either at \(v_1\) or at \(v_s\). In this way, a new graph is obtained, whose maximal planar substructure has more edges than \(G_p\), which contradicts the maximality of \(G_p\). The detailed proof is given in [5].     \(\square \)

Lemma 4

Let \(\mathcal {F}_s=\{v_1, v_2, \ldots , v_s\}\), \(s \ge 4\) be a non-triangular face of \(G_p\). Then, each middle part of \(\mathcal {F}_s\) is short, i.e., it crosses consecutive edges of \(\mathcal {F}_s\).

Proof

(Sketch). For a proof by contradiction, assume that \((u,u')\) is an edge that defines a middle part of \(\mathcal {F}_s\) which crosses two non-consecutive edges of \(\mathcal {F}_s\), say w.l.o.g. \((v_1,v_2)\) and \((v_i,v_{i+1})\), where \(i \ne 2\) and \( i+1 \ne s\). We distinguish two main cases. Either \((u,u')\) is not involved in crossings in the interior of \(\mathcal {F}_s\) or \((u,u')\) is crossed by an edge, say e, within \(\mathcal {F}_s\). In both cases, it is possible to lead to a contradiction to the maximality of \(G_p\); refer to [5] for more details.     \(\square \)

Lemma 5

Let \(\mathcal {F}_s=\{v_1, v_2, \ldots , v_s\}\), \(s \ge 4\) be a non-triangular face of \(G_p\). Then, each stick of \(\mathcal {F}_s\) is short.

Proof

Assume for a contradiction that there exists a far stick. Let w.l.o.g. \((v_1,v_1')\) be the edge containing this stick and assume that \((v_1,v_1')\) emanates from vertex \(v_1\) and leads to vertex \(v_1'\) by crossing the edge \((v_i,v_{i+1})\) of \(\mathcal {F}_s\), where \(i \ne 2\) and \(i+1 \ne s\). If we can replace \((v_1,v'_1)\) either with chord \((v_1,v_i)\) or with chord \((v_1,v_{i+1})\), then the maximal planar substructure of the derived graph would have more edges than \(G_p\); contradicting the maximality of \(G_p\). Thus, there exist two edges, say \(e_1\) and \(e_2\), that cross \((v_i,v_{i+1})\) to the left and to the right of \((v_1,v'_1)\), respectively; see Fig. 2a. By Lemma 3, edge \((v_1,v'_1)\) is crossed by at least one other edge, say e, inside \(\mathcal {F}_s\). Note that by 3-planarity edge \((v_1,v_1')\) might also be crossed by a second edge, say \(e'\), inside \(\mathcal {F}_s\). Suppose first, that \((v_1,v_1')\) has a single crossing inside \(\mathcal {F}_s\). To cope with this case, we propose two alternatives: (a) replace \(e_1\) with chord \((v_1,v_{i+1})\) and make vertex \(v_{i+1}\) an endpoint of e, or (b) replace \(e_2\) with chord \((v_1,v_i)\) and make vertex \(v_i\) an endpoint of both e; see Figs. 2b and c, respectively. Since e and \((v_i,v_{i+1})\) are not homotopic, it follows that at least one of the two alternatives can be applied, contradicting the maximality of \(G_p\).

Fig. 2.
figure 2

Different configurations used in the proof of Lemma 5.

Consider now the case where \((v_1,v_1')\) has two crossings inside \(\mathcal {F}_s\), with edges e and \(e'\). Similarly to the previous case, we propose two alternatives: (a) replace \(e_1\) with chord \((v_1,v_{i+1})\) and make vertex \(v_{i+1}\) an endpoint of both e and \(e'\), or (b) replace \(e_2\) with chord \((v_1,v_i)\) and make vertex \(v_i\) an endpoint of both e and \(e'\); see Figs. 2d and e, respectively. Note that in both alternatives the maximal planar substructure of the derived graph has more edges than \(G_p\), contradicting the maximality of \(G_p\). Since e and \(e'\) are not homotopic, it follows that one of the two alternatives is always applicable, as long as, e and \(e'\) are not simultaneously sticks from \(v_i\) and \(v_{i+1}\), respectively; see Fig. 2f. In this scenario, both alternatives would lead to a situation, where \((v_i,v_{i+1})\) has two homotopic copies. To cope with this case, we observe that e, \(e'\) and \((v_1,v'_1)\) are three mutually crossing edges inside \(\mathcal {F}_s\). We proceed by removing from G edges \(e_1\) and \(e_2\), which we replace by \((v_1,v_i)\) and \((v_1,v_{i+1})\); see Fig. 2g. In the derived graph the maximal planar substructure contains more edges than \(G_p\) (in particular, edges \((v_1,v_i)\) and \((v_1,v_{i+1})\)), contradicting its maximality.    \(\square \)

Lemma 6

The planar substructure \(G_p\) of a crossing-minimal optimal 3-planar graph G is connected.

Proof

Assume to the contrary that the maximum planar substructure \(G_p\) of G is not connected and let \(G_p'\) be a connected component of \(G_p\). Since G is connected, there is an edge of \(G-G_p\) that bridges \(G_p'\) with \(G_p-G_p'\). By definition, this edge is either a stick or a passing through edge for the common face of \(G_p'\) and \(G-G_p'\). In both cases, it has to be short (by Lemmas 4 and 5); a contradiction.    \(\square \)

In the next two lemmas, we consider the case where a non-triangular face \(\mathcal {F}_s=\{v_1, v_2, \ldots , v_s\}\), \(s \ge 4\) of \(G_p\) has no sticks. Let \(br(\mathcal {F}_s)\) and \(\overline{br}(\mathcal {F}_s)\) be the set of bridges and non-bridges of \(\mathcal {F}_s\), respectively (in Fig. 1a, edge \((v_4,v_5)\) is a bridge). In the absence of sticks, a passing through edge of \(\mathcal {F}_s\) originates from one of its end-vertices, crosses an edge of \(\overline{br}(\mathcal {F}_s)\) to enter \(\mathcal {F}_s\), passes through \(\mathcal {F}_s\) (possibly by defining two middle parts, if it crosses an edge of \(br(\mathcal {F}_s)\)), crosses another edge of \(\overline{br}(\mathcal {F}_s)\) to exit \(\mathcal {F}_s\) and terminates to its other end-vertex. We associate the edge of \(\overline{br}(\mathcal {F}_s)\) that is used by the passing through edge to enter (exit) \(\mathcal {F}_s\) with the origin (terminal) of this passing through edge. Let \(\overline{s_b}\) and \(s_b\) be the number of edges in \(\overline{br}(\mathcal {F}_s)\) and \(br(\mathcal {F}_s)\), respectively. Let also \(\widehat{s_b}\) be the number of edges of \(\overline{br}(\mathcal {F}_s)\) that are crossed by no passing through edge of \(\mathcal {F}_s\). Clearly, \(\widehat{s_b} \le \overline{s_b}\) and \(s=\overline{s_b} + 2s_b\).

Lemma 7

Let \(\mathcal {F}_s=\{v_1, v_2, \ldots , v_s\}\), \(s \ge 4\) be a non-triangular face of \(G_p\) that has no sticks. Then, the number \(\widehat{s_b}\) of non-bridges of \(\mathcal {F}_s\) that are crossed by no passing through edge of \(\mathcal {F}_s\) is strictly less than half the number \(\overline{s_b}\) of of non-bridges of \(\mathcal {F}_s\), that is, \(\widehat{s_b} < \frac{\overline{s_b}}{2}\).

Proof

For a proof by contradiction assume that \(\widehat{s_b} \ge \frac{\overline{s_b}}{2}\). Since at most \(\frac{\overline{s_b}}{2}\) edges of \(\mathcal {F}_s\) can be crossed (each of which at most three times) and each passing through edge of \(\mathcal {F}_s\) crosses two edges of \(\overline{br}(\mathcal {F}_s)\), it follows that \(|pt(\mathcal {F}_s)| \le \lfloor \frac{3\overline{s_b}}{4} \rfloor \), where \(pt(\mathcal {F}_s)\) denotes the set of passing through edges of \(\mathcal {F}_s\). To obtain a contradiction, we remove from G all edges that pass through \(\mathcal {F}_s\) and we introduce \(2s-6\) edges \(\{(v_1,v_i):~2<i<s\} \cup \{(v_i,v_i+2):~2 \le i \le s-2\}\) that lie completely in the interior of \(\mathcal {F}_s\). This simple operation will lead to a larger graph (and therefore to a contradiction to the optimality of G) or to a graph of the same size but with larger planar substructure (and therefore to a contradiction to the maximality of \(G_p\)) as long as \(s > 4\). For \(s = 4\), we need a different argument. By Lemma 4, we may assume that all three passing through edges of \(\mathcal {F}_s\) cross two consecutive edges of \(\mathcal {F}_s\), say w.l.o.g. \((v_1,v_2)\) and \((v_2,v_3)\). This implies that chord \((v_1,v_3)\) can be safely added to G; a contradiction to the optimality of G.    \(\square \)

Lemma 8

Let \(\mathcal {F}_s=\{v_1, v_2, \ldots , v_s\}\), \(s \ge 4\) be a non-triangular face of \(G_p\). Then, \(\mathcal {F}_s\) has at least one stick.

Proof

(Sketch). For a proof by contradiction, assume that \(\mathcal {F}_s\) has no sticks. By Lemma 7, it follows that there exist at least two incident edges of \(\overline{br}(\mathcal {F}_s)\) that are crossed by passing through edges of \(\mathcal {F}_s\), say w.l.o.g. \((v_s,v_1)\) and \((v_1,v_2)\). Note that these two edges are not bridges of \(\mathcal {F}_s\). If \(s+\widehat{s_b} + 2s_b \ge 6\), then as in the proof of Lemma 7, it is possible to construct a graph that is larger than G or of equal size as G but with larger planar substructure. The same holds when \(s+\widehat{s_b} +2s_b = 5\) (that is, \(s=5\) and \(\widehat{s_b} = s_b=0\) or \(s=4\), \(\widehat{s_b}=1\) and \(s_b=0\)). Both cases, contradict either the optimality of G or the maximality of \(G_p\). The case where \(s+\widehat{s_b}+2s_b=4\) is slightly more involved; refer to [5].    \(\square \)

Fig. 3.
figure 3

Different configurations used in Lemma 9.

By Lemma 5, all sticks of \(\mathcal {F}_s\) are short. A stick \((v_i,v'_i)\) of \(\mathcal {F}_s\) is called right, if it crosses edge \((v_{i+1},v_{i+2})\) of \(\mathcal {F}_s\). Otherwise, stick \((v_i,v'_i)\) is called left. Two sticks are called opposite, if one is left and the other one is right.

Lemma 9

Let \(\mathcal {F}_s=\{v_1, v_2, \ldots , v_s\}\), \(s \ge 4\) be a non-triangular face of \(G_p\). Then, \(\mathcal {F}_s\) has not three mutually crossing sticks.

Proof

Suppose to the contrary that there exist three mutually crossing sticks of \(\mathcal {F}_s\) and let \(e_i\), for \(i=1,2,3\) be the edges containing these sticks. W.l.o.g. we assume that at least two of them are right sticks, say \(e_1\) and \(e_2\). Let \(e_1=(v_1,v'_1)\). Then, \(e_2=(v_2,v'_2)\); see Fig. 3a. Since \(e_1\), \(e_2\) and \(e_3\) mutually cross, \(e_3\) can only contain a left stick. By Lemma 5 its endpoint on \(\mathcal {F}_s\) is \(v_3\) or \(v_4\). The first case is illustrated in Fig. 3b. Observe that \((v_1,v_2)\) of \(\mathcal {F}_s\) is only crossed by \(e_3\). Indeed, if there was another edge crossing \((v_1,v_2)\), then it would also cross \(e_1\) or \(e_2\), both of which have three crossings. Hence, \(e_3\) can be replaced with \((v_1,v_3)\); see Fig. 3c. The maximal planar substructure of the derived graph would have more edges than \(G_p\), contradicting the maximality of \(G_p\). The case where \(v_4\) is the endpoint of \(e_3\) on \(\mathcal {F}_s\) is illustrated in Fig. 3e. Suppose that there exists an edge crossing \((v_2,v_3)\) of \(\mathcal {F}_s\) to the left of \(e_3\). This edge should also cross \(e_2\) or \(e_3\), which is not possible since both edges have three crossings. So, we can replace \(e_3\) with chord \((v_2,v_4)\) as in Fig. 3e, contradicting the maximality of \(G_p\).    \(\square \)

Lemma 10

Let \(\mathcal {F}_s=\{v_1, v_2, \ldots , v_s\}\), \(s \ge 4\) be a non-triangular face of \(G_p\). Then, each stick of \(\mathcal {F}_s\) is crossed exactly once within \(\mathcal {F}_s\).

Proof

(Sketch). The detailed proof is given in [5]. By Lemma 3, each stick of \(\mathcal {F}_s\) is crossed at least once within \(\mathcal {F}_s\). So, the proof is given by contradiction either to the optimality of G or to the maximality of \(G_p\), assuming the existence of a stick of \(\mathcal {F}_s\) that is crossed twice within \(\mathcal {F}_s\), say by edges \(e_1\) and \(e_2\). Note that by 3-planarity a stick of \(\mathcal {F}_s\) cannot be further crossed within \(\mathcal {F}_s\). First, we prove that \(e_1\) and \(e_2\) do not cross each other. Then, we show that \(e_1\) and \(e_2\) cannot be simultaneously passing through \(\mathcal {F}_s\). The desired contradiction is obtained by considering two main cases: Either \(e_1\) passes through \(\mathcal {F}_s\) (and therefore, \(e_2\) is a stick of \(\mathcal {F}_s\)) or both \(e_1\) and \(e_2\) are sticks of \(\mathcal {F}_s\).    \(\square \)

Lemma 11

Let \(\mathcal {F}_s=\{v_1, v_2, \ldots , v_s\}\), \(s \ge 4\) be a non-triangular face of \(G_p\). Then, there are no crossings between sticks and middle parts of \(\mathcal {F}_s\).

Proof

Assume to the contrary that there exists a stick, say of edge \((v_1,v'_1)\) that emanates from vertex \(v_1\) of \(\mathcal {F}_s\) (towards \(v_1'\)), which is crossed by a middle part of \((u,u')\) of \(\mathcal {F}_s\). By Lemma 10, this stick cannot have another crossing within \(\mathcal {F}_s\). By Lemma 5, we can assume w.l.o.g. that \((v_1,v_1')\) is a right stick, i.e., \((v_1,v_1')\) crosses \((v_2,v_3)\). By Lemma 4, edge \((u,u')\) crosses two consecutive edges of \(\mathcal {F}_s\). We distinguish two cases based on whether \((v_1,v_1')\) crosses \((v_s,v_1)\) and \((v_1,v_2)\) of \(\mathcal {F}_s\) or \((v_1,v_1')\) crosses \((v_1,v_2)\) and \((v_2,v_3)\) of \(\mathcal {F}_s\); see Figs. 4a and c respectively.

Fig. 4.
figure 4

Different configurations used in Lemma 11.

In the first case, we can assume w.l.o.g. that u is the vertex associated with \((v_1,v_2)\), while \(u'\) is the one associated with \((v_s,v_1)\). Hence, there exists an edge, say \(f_1\), that crosses \((v_1,v_2)\) to the right of \((u,u')\), as otherwise we could replace \((u,u')\) with stick \((v_2,u')\) and reduce the total number of crossings by one, contradicting the crossing minimality of G. Edge \(f_1\) passes through \(\mathcal {F}_s\) and also crosses edge \((v_2,v_3)\) above \((v_1,v_1')\). Similarly, there exists an edge \(f_2\) that crosses \((v_2,v_3)\) below \((v_1,v_1')\), as otherwise replacing \((v_1,v_1')\) with chord \((v_1,v_3)\) would contradict the maximality of \(G_p\). We proceed by removing edges \((u,u')\) and \(f_2\) from G and by replacing them with \((v_3,u)\) and chord \((v_1,v_3)\); see Fig. 4b. The maximal planar substructure of the derived graph is larger than \(G_p\); a contradiction.

In the second case, we assume that u is associated with \((v_1,v_2)\) and \(u'\) with \((v_2,v_3)\); see Fig. 4c. In this scenario, there exists an edge, say f, that crosses \((v_2,v_3)\) below \((v_1,v_1')\), as otherwise we could replace \((v_1,v_1')\) with chord \((v_1,v_3)\), contradicting the maximality of \(G_p\). If \((v_1,u')\) does not belong to G, then we remove \((u,u')\) from G and replace it with stick \((v_1,u')\); see Fig. 4d. In this way, the derived graph has fewer crossings than G; a contradiction. Note that \((v_1,v_1')\) and \((v_1,u')\) cannot be homotopic (if \(v_1' = u'\)), as otherwise edge \((v_1,v_1')\) and \((u,u')\) would not cross in the initial configuration. Hence, edge \((v_1,u')\) already exists in G. In this case, f is identified with \((v_1,u')\); see Fig. 4e. But, in this case f is an uncrossed stick of \(\mathcal {F}_s\), contradicting Lemma 3.     \(\square \)

Lemma 12

Let \(\mathcal {F}_s=\{v_1, v_2, \ldots , v_s\}\), \(s \ge 4\) be a non-triangular face of \(G_p\). Then, any stick of \(\mathcal {F}_s\) is only crossed by some opposite stick of \(\mathcal {F}_s\).

Proof

By Lemma 5, each stick of \(\mathcal {F}_s\) is short. By Lemma 10, each stick of \(\mathcal {F}_s\) is crossed exactly once within \(\mathcal {F}_s\) and this crossing is not with a middle part due to Lemma 11. For a proof by contradiction, consider two crossing sticks that are not opposite and assume w.l.o.g. that the first stick emanates from vertex \(v_1\) (towards vertex \(v_1'\)) and crosses edge \((v_2,v_3)\), while the second stick emanates from vertex \(v_2\) (towards vertex \(v_2'\)) and crosses edge \((v_3,v_4)\); see Fig. 5a.

Fig. 5.
figure 5

Different configurations used in (a)–(b) Lemma 12 and (c)–(d) Lemma 13.

If we can replace \((v_1,v_1')\) with the chord \((v_1,v_3)\), then the maximal planar substructure of the derived graph would have more edges than \(G_p\); contradicting the maximality of \(G_p\). Thus, there exists an edge, say e, that crosses \((v_2, v_3)\) below \((v_1,v_1')\). By Lemma 11, edge e is passing through \(\mathcal {F}_s\). Symmetrically, we can prove that there exists an edge, say \(e'\), which crosses \((v_3,v_4)\) right next to \(v_4\), that is, \(e'\) defines the closest crossing point to \(v_4\) along \((v_3,v_4)\). Note that \(e'\) can be either a passing through edge or a stick of \(\mathcal {F}_s\). We proceed by removing from G edges \(e'\) and \((v_1,v_1')\) and by replacing them by the chord \((v_2,v_4)\) and edge \((v_4, v_1')\); see Fig. 5b. The maximal planar substructure of the derived graph has more edges than \(G_p\) (in the presence of edge \((v_2,v_4)\)), a contradiction.    \(\square \)

Lemma 13

Let \(\mathcal {F}_s=\{v_1, v_2, \ldots , v_s\}\), \(s \ge 4\) be a non-triangular face of \(G_p\). Then, \(\mathcal {F}_s\) has exactly two sticks.

Proof

By Lemmas 8 and 12 there exists at least one pair of opposite crossing sticks. To prove the uniqueness, assume that \(\mathcal {F}_s\) has two pairs of crossing opposite sticks, say \((v_1,v_1')\), \((v_2,v_2')\) and \((v_i,v_i')\), \((v_{i+1},v_{i+1}')\), \(2< i < s\); see Fig. 5c. We remove edges \((v_2,v_2')\) and \((v_i,v_i')\) and replace them by \((v_1,v_i)\) and \((v_2, v_{i+1})\); see Fig. 5d. By Lemmas 4 and 5, the newly introduced edges cannot be involved in crossings. The maximal planar substructure of the derived graph has more edges than \(G_p\) (in the presence of \((v_1,v_i)\) or \((v_2, v_{i+1})\)); a contradiction.    \(\square \)

We are ready to state the main theorem of this section.

Theorem 2

The planar substructure \(G_p\) of a crossing-minimal optimal 3-planar graph G is fully triangulated.

Proof

For a proof by contradiction, assume that \(G_p\) has a non-triangular face \(\mathcal {F}_s=\{v_1,v_2,\ldots ,v_s\}\), \(s \ge 4\). By Lemmas 10, 12 and 13, face \(\mathcal {F}_s\) has exactly two opposite sticks, that cross each other. Assume w.l.o.g. that these two sticks emanate from \(v_1\) and \(v_2\) (towards \(v_1'\) and \(v_2'\)) and exit \(\mathcal {F}_s\) by crossing \((v_2,v_3)\) and \((v_1,v_s)\), respectively; recall that by Lemma 5 all sticks are short; see Fig. 6a.

If we can replace \((v_1,v_1')\) with the chord \((v_1,v_3)\), then the maximal planar substructure of the derived graph would have more edges than \(G_p\); contradicting the maximality of \(G_p\). Thus, there exists an edge, say e, that crosses \((v_2, v_3)\) below \((v_1,v_1')\). By Lemma 13, edge e is passing through \(\mathcal {F}_s\). We consider two cases: (a) edge \((v_2,v_3)\) is only crossed by e and \((v_1,v_1')\), (b) there is a third edge, say \(e'\), that crosses \((v_2,v_3)\) (which by Lemma 13 is also passing through \(\mathcal {F}_s\)).

Fig. 6.
figure 6

Different configurations used in Theorem 2.

In Case (a), we can remove from G edges e and \((v_1,v_1')\), and replace them by \((v_1,v_3)\) and the edge from \(v_2\) to the endpoint of e that is below \((v_3,v_4)\); see Fig. 6b. In Case (b), there has to be a (passing through) edge, say \(e''\), surrounding \(v_4\) (see Fig. 6c), as otherwise we could replace \(e'\) with a stick emanating from \(v_4\) towards the endpoint of \(e'\) that is to the right of \((v_2,v_3)\), which contradicts Lemma 13. We proceed by removing from G edges \(e''\) and \((v_1,v_1')\) and by replacing them by \((v_2,v_4)\) and the edge from \(v_2\) to the endpoint of \(e''\) that is associated with \((v_3,v_4)\); see Fig. 6d. The maximal planar substructure of the derived graph has more edges than \(G_p\) (in the presence of \((v_1,v_2)\) in Case (a) and \((v_2,v_4)\) in Case (b)), which contradicts the maximality of \(G_p\). Since \(G_p\) is connected, there cannot exist a face consisting of only two vertices.    \(\square \)

5 Discussion and Conclusion

This paper establishes a tight upper bound on the number of edges of non-simple 3-planar graphs containing no homotopic parallel edges or self-loops. Our work is towards a complete characterization of all optimal such graphs. In addition, we believe that our technique can be used to achieve better bounds for larger values of k. We demonstrate it for the case where \(k=4\), where the known bound for simple graphs is due to Ackerman [1].

If we could prove that a crossing-minimal optimal 4-planar graph \(G=(V,E)\) has always a fully triangulated planar substructure \(G_p=(V,E_p)\) (as we proved in Theorem 2 for the corresponding 3-planar ones), then it is not difficult to prove a tight bound on the number of edges for 4-planar graphs. Similar to Lemma 1, we can argue that no triangle of \(G_p\) has more than 4 sticks. Then, we associate each triangle of \(G_p\) with 4 sticks to a neighboring triangle with at most 2 sticks. This would imply \(t_4 \le t_1 + t_2\), where \(t_i\) denotes the number of triangles of \(G_p\) with exactly i sticks. So, we would have \(|E|-|E_p| = (4t_4 + 3t_3 + 2t_2 + t_1)/2 \le 3(t_4+t_3+t_2 + t_1)/2 = 3(2n-4)/2 = 3n-6\). Hence, the number of edges of a 4-planar graph G is at most \(6n - 12\). We conclude with some open questions.

  • A nice consequence of our work would be the complete characterization of optimal 3-planar graphs, as exactly those graphs that admit drawings where the set of crossing-free edges form hexagonal faces which contain 8 additional edges each

  • We also believe that for simple 3-planar graphs (i.e., where even non-homotopic parallel edges are not allowed) the corresponding bound is \(5.5n-15\).

  • We conjecture that the maximum number of edges of 5- and 6-planar graphs are \(\frac{19}{3}n-O(1)\) and \(7n-14\), respectively.

  • More generally, is there a closed function on k which describes the maximum number of edges of a k-planar graph for \(k>3\)? Recall the general upper bound of \(4.1208 \sqrt{k} n\) by Pach and Tóth [20].