Recognizing Optimal 1-Planar Graphs in Linear TimeSupported by the Deutsche Forschungsgemeinschaft (DFG), grant Br835/18-1.

Recognizing Optimal 1-Planar Graphs in Linear Timethanks: Supported by the Deutsche Forschungsgemeinschaft (DFG), grant Br835/18-1.

Franz J. Brandenburg University of Passau
94030 Passau
Tel.: +49/851/509-3031
Fax: +49/851/509-3032
11email: brandenb@informatik.uni-passau.de
Abstract

A graph with vertices is 1-planar if it can be drawn in the plane such that each edge is crossed at most once, and is optimal if it has the maximum of edges.

We show that optimal 1-planar graphs can be recognized in linear time. Our algorithm implements a graph reduction system with two rules, which can be used to reduce every optimal 1-planar graph to an irreducible extended wheel graph. The graph reduction system is non-deterministic, constraint, and non-confluent.

1 Introduction

There has been recent interest in beyond planar graphs that extend planar graphs by restrictions on crossings. A particular example is 1-planar graphs, which were introduced by Ringel [32] and appear when a planar graph and its dual are drawn simultaneously. A graph is 1-planar if it can be drawn in the plane with at most one crossing per edge. In his introductory paper on 1-planar graphs, Ringel studied the coloring problem and observed that a pair of crossing edges can be completed to by adding planar edges. 1-planar graphs generalize 4-map graphs, which are the graphs of adjacencies of nations of a map [16, 17]. Two nations are adjacent if they share a common border or if there is a quadripoint where four countries meet, which results in a in the 4-map graph.

The first study of structural properties of 1-planar graphs is by Bodendiek, Schumacher, and Wagner [7, 8]. They showed that 1-planar graphs with vertices have at most edges and that there are such graphs for and for all , and not for and . They called 1-planar graphs with edges optimal and observed that optimal 1-planar graphs can be obtained from planar 3-connected quadrangulations by adding a pair of crossing edges in each quadrangular face. In fact, this is a characterization and a basis of our recognition algorithm.

As usual, graphs are simple without self-loops and multiple edges, and paths and cycles are simple, too. The degree of a vertex is the number of incident edges or neighbors, and the local degree is the number of incident edges or neighbors when restricted to a particular induced subgraph. 1-planar graphs are special concerning their density, which is taken as an upper bound on the number of edges in relation to the number of vertices. There are three versions. A 1-planar graph is maximally dense or maximum [35] if there is no 1-planar graph of the same size with more edges. It is maximal 1-planar if the addition of any edge destroys 1-planarity and planar maximal or triangulated [17] if no further edge can be added without introducing a crossing. Clearly, maximally dense 1-planar graphs are maximal, which in turn are optimal, but not conversely. Suzuki [35] gave all maximally dense graphs that are not optimal, namely, the complete graphs for , and six graphs with vertices and edges. Brandenburg et al. [13] showed that there are sparse maximal 1-planar graphs with only edges, which is less than the bound for maximal planar graphs. Such sparse maximal 1-planar graphs have many vertices of degree two, whereas optimal 1-planar graphs have degree at least six [8]. Clearly, every maximal planar graph is planar maximal 1-planar, however, a planar edge can be added to if is drawn with a pair of crossing edges. Note that the terms planar maximal, maximal, maximally dense, and optimal coincide for planar graphs.

An embedding (drawing) of a graph is a mapping of into the plane such that the vertices are mapped to distinct points and the edges to simple Jordan curves between the endpoints. It is planar if (the Jordan curves of the) edges do not cross and 1-planar if each edge is crossed at most once. An embedding is a witness for planarity and 1-planarity, respectively. For an algorithmic treatment, a planar embedding is given by a rotation system, which describes the cyclic ordering of the edges incident to each vertex, or by the sets of vertices, edges, and faces. A 1-planar embedding is given by an embedding of the planarization of , which is obtained by taking the crossing points of edges as virtual vertices [21].

A planar embedding of a planar graph can be computed in linear time as part (or extension) of a planarity test algorithm, see [31]. Accordingly, 1-planarity of an embedding can be tested in linear time via the planarization. However, computing a 1-planar embedding of a 1-planar graph is -hard. The relationship between planar graphs and their embeddings is well-understood. Every 3-connected planar graph has a unique embedding on the sphere and in the plane if the outer face is fixed [36]. The set of all embeddings of a planar graph can be computed in linear time and is stored in a -tree [19, 25]. Accordingly, one often uses a planar graph and one of its embeddings interchangeably.

A 1-planar embedding partitions the edges into planar and crossing edges. We color the planar edges black and the crossing ones red. Other color schemes were used in [21, 22, 27, 20]. The black or planar skeleton consists of the black edges and inherits its embedding from the given 1-planar embedding. Vertex is called a black (red) neighbor of vertex if the edge is black (red) in a 1-planar embedding. A kite is a 1-planar embedding of with a pair of crossing edges and no other vertices in the inner (or outer) face defined by the black edges. A has one planar and four non-planar embeddings which differ by the edge coloring and the rotation system [29], see Fig. 1.

1-planar embeddings are quite flexible, as the five embeddings of [29] and the -hardness proof of [3] show. There is an extension of Whitney’s theorem by Schumacher [34] who proved that every 5-connected optimal 1-planar graph has a unique 1-planar embedding with the exception of the extended wheel graphs, which have two embeddings for graphs of size at least ten and six for the minimum optimal 1-planar graph with eight vertices. The extended wheel graphs will be described in Section 2. Suzuki [35] improved this result and dropped the -connectivity precondition.

(a) planar
(b) crossed as a kite
Figure 1: 1-planar embeddings of

A serious drawback of (most classes of) beyond planar graphs is the general -hardness of their recognition. For 1-planarity this was proved by Grigoriev and Bodlaender [24] and by Korzhik and Mohar [28], and improved to hold for graphs of bounded bandwidth, pathwidth, or treewidth [4], for near planar graphs [15], and for 3-connected 1-planar graphs with a given rotation system [3]. Moreover, the recognition of right angle crossing graphs (RAC) [1] and of fan-planar graphs [6, 5] is -hard. On the other hand, Eades et al. [21] introduced a linear time testing algorithm for (planar) maximal 1-planar graphs that are given with a rotation system. As aforesaid, 1-planarity of an embedding can be tested in linear time. In addition, there are linear time recognition algorithms if all vertices are in the outer face. The resulting graphs are called outer 1-planar and were first studied by Eggleton [23]. It is not obvious that outer 1-planar graphs are planar [2]. Independently, Auer at al. [2] and Hong et al. [26] developed linear time recognition algorithms for outer 1-planar graphs. Also, maximal outer-fan-planar graphs can be recognized in linear time [5]. Chen et al. [17] developed a cubic-time recognition algorithm for hole-free 4-map graphs and observed that the 3-connected planar maximal 1-planar graphs are exactly the 3-connected hole-free 4-map graphs [16]. The optimal 1-planar graphs are exactly the hole-free 4-map graphs with edges and thus recognizable in cubic time. Recently, Brandenburg [10] showed that maximal and planar maximal 1-planar graphs can be recognized in time.

Schumacher [34] defined a single-rule graph transformation system on 1-planar embeddings and proved that every -connected optimal 1-planar graph is reducible to an extended wheel graph which is irreducible. His result was generalized by Suzuki [35] who added a second rule and thereby removed the -connectivity restriction. The reduction rules are defined on an embedding and extend the reduction rules for planar -connected quadrangulations of Brinkmann et al. [14].

In this paper we translate the reduction rules of Schumacher and Suzuki from 1-planar embeddings to 1-planar graphs and show how to implement them efficiently. In consequence, the proof of existence for a reduction of an optimal 1-planar graph to an irreducible extended wheel graph by Schumacher [34] and Suzuki [35] is transformed into an efficient algorithm. These proofs say that a (-connected) graph is optimal 1-planar if and only if there exists a natural number and a computation by a sequence of applications of reductions such that an extended wheel graph is obtained from , in symbols, . Suzuki reverses direction and expands into . Again, one must guess the start or and the expansion process.

We show that the usability of a reduction rule can be checked in time on graphs. According to Brinkmann et. al. [14], a feasible use of a reduction must preserve the given class, i.e., the optimal 1-planar graphs. Thereby, we obtain a simple quadratic-time recognition algorithm of optimal 1-planar graphs which is improved to a linear time algorithm by a bookkeeping technique. It can be extended to maximally dense 1-planar graphs and specialized to -connected optimal 1-planar graphs. Our algorithm improves upon the cubic running time algorithm of Chen et al. [17], which solves a more general problem and searches -cycles and other types of separators. Combinatorial properties of the reductions are explored in [11].

The paper is organized as follows: In the next Section we recall some basic properties of optimal 1-planar graphs. In Section 3 we introduce the reductions rules and show how to apply them to graphs. The linear recognition algorithm for optimal 1-planar graphs is established in Section 4, and we conclude with some open problems on 1-planar graphs.

2 Preliminaries

Optimal 1-planar graphs have special properties. Schumacher [34] observed that there is a one-to-one correspondence between optimal 1-planar graphs and their planar skeletons which are 3-connected quadrangulations. An optimal 1-planar graph is obtained from a 3-connected quadrangulation by adding a pair of crossing edges in each quadrilateral face to form a kite. Thus the red edges are added to the black ones. A formal proof was given by Suzuki [35]. All vertices of an optimal 1-planar graph have an even degree of at least six and there are at least eight vertices of degree six, since in total there are edges if the given graph has vertices. The planar and the crossing edges alternate in the rotation system of a 1-planar embedding of an optimal 1-planar graph. Consider, for example, graph in Fig. 2 which has vertices, edges and an even degree of at least six at each vertex. Is optimal 1-planar?

Figure 2: A candidate graph with vertices and edges

The exact number of optimal 1-planar graphs is known for graphs of size up to . Bodendiek et al. [8] showed that is 1-planar but is not optimal and that there are no optimal 1-planar graphs with seven and nine vertices. There is a unique optimal 1-planar graph for , and there are three optimal 1-planar graphs for . For , they found optimal 1-planar graphs, but one is missing. Brinkmann et al. [14] developed recurrence relations for the enumeration of quadrangulations and computed the number of 3-connected quadrangulations up to size . For example, there are 12 for and 3000183106119 quadrangulations and optimal 1-planar graphs of size 36.

The pseudo-double wheels [14] and the extended wheel graphs play a particular role for quadrangulations and optimal 1-planar graphs, respectively, since thes are the irreducible or minimum graphs under two graph reduction rules. For , a pseudo-double wheel is a quadrangulation with two distinguished vertices and , called poles, a cycle of even length with vertices and edges in circular order and further edges and for . Thus is connected with the vertices at even and with the vertices at odd positions on the cycle. has vertices, edges and faces. The extended wheel graph additionally contains all possible pairs of 1-planar crossing edges and in circular order. This is the augmentation of by kites, see Fig. 3. The two poles of have degree and each of the vertices on the cycle has degree six. If , then the edges on the cycle are black and the edges and are red. In addition, a graph is an extended wheel graph if it is optimal 1-planar and has a vertex of degree [8]. The second degree vertex is implied. Moreover, an optimal 1-planar graph is an extended wheel graph if the vertices of degree six form a cycle [8].

The notation for graphs of size is taken from Suzuki [35] and is related to Schumacher’s notation.

(a) The minimum extended wheel graph drawn as a crossed cube
(b) The extended wheel graph with poles and and with hexagons for vertices of degree
Figure 3: Extended wheel graphs and . Any two non-adjacent vertices and of can be taken as poles. In larger extended wheel graphs, if poles and change places this swaps the coloring of the incident edges. Edges between consecutive vertices on the cycle are always planar and are colored black.

We summarize some basic properties of optimal 1-planar graphs from [7, 8, 35].

Proposition 1

Every optimal 1-planar graph consists of a planar quadrangulation and a pair of crossing edges in each face of forming a kite such that , where is the set of crossing edges. is 3-connected and bipartite. has a unique embedding, except if is an extended wheel graph , which has two inequivalent embeddings for in which the planar and crossing edges incident to a pole are interchanged and their colors swap. The minimum extended wheel graph has six inequivalent 1-planar embeddings.

From the fact that is bipartite, we can conclude:

Lemma 1

Every cycle of odd length in an optimal 1-planar graph contains at least one red edge. If is a cycle of length four and three of its edges are black, then all edges of are black.

Schumacher [34] defined a relation on 1-planar embeddings and used it to characterize -connected optimal 1-planar graphs.

Definition 1

Two 1-planar embeddings and are related, , if there is a planar quadrangle in the planar skeleton such that

(*)     all paths from to of length four in pass through or .

Then is obtained from by merging and and removing parallel edges. For graphs and , let if there exist embeddings such that and denote the transitive closure by “”.

The paths of (*) from to are simple and use only planar (black) edges. The embedding must satisfy special properties such that the planar quadrangle coincides with in Fig. 5. Note that each quadrangle in an extended wheel graph has a path of length four between opposite vertices of a planar quadrangle through one of the poles, such that (*) is violated. In consequence, the “”-relation is not applicable.

Proposition 2

[34] Every 5-connected optimal 1-planar graph can be reduced to an extended wheel graph for some , i.e., . The extended wheel graphs are irreducible (or minimum) elements under the “”-relation.

By the restriction to 5-connected graphs, Schumacher excluded graphs with separating 4-cycles. Separating 4-cycles play a similar role in optimal 1-planar graphs as separating triangles do in triangulated planar graphs. In fact, every non-irreducible -connected optimal 1-planar graph can be reduced to [11].

Brinkmann et al. [14] introduced two graph transformations, called -  and -expansions, for the generation and characterization of (planar) 3-connected quadrangulations. We consider their inverse as reductions.

Definition 2

The -reduction on a quadrangulation consists of a contraction of a face at , where has degree and have degree at least . It is shown in Fig. 4 and in an augmented version in Fig. 5 with the restriction to planar (black) edges. The -reduction removes the vertices of the inner cycle of a planar cube, where the inner cycle is empty and the vertices of the outer cycle have degree at least , see Fig. 6 restriced to planar (black) edges.

The reductions must be applied such that they preserve the class of 3-connected quadrangulations.

By the one-to-one correspondence between 3-connected quadrangulations and optimal 1-planar graphs, the -  and -reductions are extended straightforwardly to embedded 1-planar graphs, called vertex and face contraction by Suzuki [35]. Their inverse is called -splitting and -cycle addition, respectively, and are used from right to left. The illustration in Fig. 4 is taken from [35]. A -cycle addition removes the pair of crossing edges of a kite and inserts five new kites as illustrated in Fig. 6. Suzuki [35] observed that Schumacher’s “”-relation coincides with his face contraction and defines the -reduction on the planar skeleton of an embedded 1-planar graph.

Figure 4: Face contraction or vertex splitting on 1-planar embeddings with planar (black and thick) and crossing (red and thin) edges

The distinction between graphs and embeddings is not important for the -  and -reductions of Brinkmann et. al., since there is a one-to-one correspondence on -connected planar graphs. They point out that the reductions must be used with care such that the given class of graphs is preserved. It is not specified, however, how this is achieved. On the other hand, the “”-relation of Schumacher and the -splitting and -cycle addition and the inverse -contraction and -removal of Suzuki need a 1-planar embedding and the distinction between planar (black) and crossing (red) edges. It is not immediately clear how to apply these rules to graphs that are given without an embedding or an edge coloring. Nevertheless they characterize the respective graphs, as stated in Propositions 3 and 4.

3 Reduction Rules and Their Application

For the translation of the reduction rules from embeddings to graphs and an efficient check of their usability, we use the uniqueness of 1-planar embeddings of reducible optimal 1-planar graphs and the local environment of a reduction. In consequence, a reduction is applied to a subgraph which has (almost) a fixed embedding. A primary goal is to compute the embedding and to check the feasibility of the application of a reduction. The correctness follows from the works of Brinkmann et al. [14], Schumacher [34], and Suzuki [35].

Transformations on graphs and graph replacement systems have been studied in the theory of graph grammars [33]. In general, a graph transformation is a pair of left-hand and right-hand side graphs . An application of to a graph replaces an occurrence of in by an occurrence of while the remainder is preserved. It results in a graph . A graph occurs in and is said to match a subgraph of if there is a graph homomorphism between and , which is one-to-one and onto on the vertices and one-to-one but not necessarily onto for the edges, and similarly for and . Unmatched edges of remain in and are kept for . This is elaborated in the algebraic approach to graph transformations [18]. In this particular case, the general approach does not really help, since the complexity of the element problem of graph grammars is PSPACE hard [9].

We reverse the expansions of Brinkmann et al. and Suzuki and call them SR-reduction (Schumacher reduction) and CR-reduction (crossed cube reduction), and the graphs of the left-hand sides (crossed star) and (crossed cube), respectively. The -reduction augments the vertex splitting of Suzuki and includes the subgraph induced by the center . The reductions are shown in Figs. 5 and 6 including a 1-planar embedding and an edge coloring. The tiny strokes at the outer vertices indicate further edges, which are necessary. These vertices may have even more edges to outer vertices.

Following Brinkmann et al. [14], the given class, here the optimal 1-planar graphs, must be preserved and therefore an application of a reduction is constrained. An infeasible application may destroy the 3-connectivity of the underlying planar skeleton or introduce multiple edges, which ultimately leads to a violation of 3-connectivity.

Figure 5: The reduction for optimal 1-planar graphs. A candidate is drawn as a hexagon and other vertices as circles. Good candidates are light green and bad ones orange. Planar edges are drawn black and thick and crossing edges red and thin. The tiny strokes at the outside indicate further necessary edges. The left graph is together with its embedding.
Figure 6: The reduction for optimal 1-planar graphs with candidates . The reduction is good and the candidates are colored light green if there is no edge or in the outer face. The graph on the left is together with its embedding.

The main task of our algorithm is an efficient and feasible use of the reduction rules such that optimal 1-planar graphs are preserved. An obstacle is the gap between the graphs and of the left-hand side of the reductions, which come with an embedding, and the matched subgraph , which comes as a part of . A matched subgraph of a -reduction is a subgraph induced by a vertex of degree six and its neighbors. There are three red and three black neighbors which alternate in the circular order around . For a -reduction there is a subgraph of eight vertices. A matched subgraph may have further edges, since the matching is not onto for the edges. This introduces so-called blocking edges and is discussed later on. We grant 3-connectivity of the underlying planar skeleton by the absence of a blocking vertex, which has degree six. For example, vertices or are blocking vertices of in Fig. 5 if they have degree six. In case of a -reduction, a vertex is blocking if it is matched by a vertex from the outer cycle of and has degree six. Multiple edges are avoided by the absence of blocking edges, which can be planar or crossing, i.e., black or red. A blocking edge is always related to a reduction and it may be blocking for many reductions. Blocking black edges occur in separating 4-cycles, and red and black blocking edges are treated differently. Blocking vertices and planar blocking edges can also appear in the planar case, whereas blocking red edges are exclusive to 1-planar graphs. They also cover the case of blocking vertices, since a blocking vertex implies a blocking red edge. The converse does not hold.

A matching of or with a subgraph shall classify the edges of as planar and crossing and color them black and red, respectively. It shall determine the circular order of the vertices in the outer face of and , and thus an embedding of . However, this is not always the case. Graph has several 1-planar embeddings, since some ’s may be drawn planar or as a kite. In fact, is a planar graph, however, as a subgraph of a 1-planar graph it must be embedded with crossings as shown in Fig. 5, since reducible optimal 1-planar graphs have a unique embedding. Furthermore, if the matched graph of also has edges and , then it has two 1-planar embeddings in which and may change places, which implies a color change of the incident edges, just as in the case of extended wheel graphs. If edges and exists in addition to the edges of , then the situation is even worse and any circular order of the neighbors of is possible. Fortunately, these possibilities are represented by the degree vectors which are defined below.

The usability of a reduction is linked to one or four vertices of degree six and some conditions. A -reduction is applied to a vertex of degree six, which is the image of the central vertex and the corner of three kites of . For the right-hand side, is merged with a target, which is a red vertex of the outer cycle, denoted , and is shown in Fig. 5. A given optimal 1-planar graph may have several places for the application of a reduction, even at a single candidate, and the next reduction is chosen nondeterministically. There are candidates where a reduction is feasible and others where a reduction is infeasible. An application of a -reduction is linked to (one of) four vertices of degree six, which are all infeasible for a -reduction, and is denoted . The vertices are on the inner cycle of and are removed and replaced by a pair of crossing edges, such that the vertices from the outer cycle form a kite. In a drawing, the inner cycle may be at the outside.

For convenience, we say that is applied to vertex of the given graph if is feasible and call the target of , and similarly, that is applied to or just to for some . In addition, we shall identify the vertices and edges of the left-hand sides or with those of the matched subgraph , although the embedding and edge coloring of is not yet fixed and some vertices might change places. In general, the matching and embedding will be clear. Sometimes, it would be good to increase the degree of a vertex , e.g., to avoid that is a blocking vertex for another reduction. The simplest way is to apply the inverse of , i.e., the -cycle addition of [35], and insert a new -cycle together with five pairs of crossing edges in a quadrangular face at that is left if a pair of crossing edges is removed.

Definition 3

A vertex (of an optimal 1-planar graph ) of degree six is called a candidate.

A candidate is “good” if there is a feasible application of a reduction at . Then the reduction is used as given in Figs. 5 and 6 and the class of optimal 1-planar graphs is preserved. A good candidate is drawn as a light green hexagon. In case of , is the center of a subgraph of that matches and there is some red neighbor , called a target, such that can be applied by merging with , denoted . Then is “good” and can feasibly be applied to . There are three targets in for a -reduction. In case of a -reduction, vertex belongs to the inner cycle of a subgraph that matches , and is applied to any vertex of the inner cycle.

Otherwise, is a “bad” candidate and is drawn as an orange hexagon. Then the reductions are bad for all three red neighbors of . The usage is illegal. A bad reduction is blocked by a vertex if is a black neighbor of and of degree six and if is any vertex on the outer cycle of degree six in case of , respectively. An edge of is a blocking red edge of if is a red neighbors of . Edge is a blocking black edge if is a black neighbor and is not matched by an edge of . If the outer cycle of matches , then edges and are blocking red edges of a -reduction.

A subgraph with neighbors of in circular order may have up to three blocking red edges, namely and if are the red neighbors of , see Fig. 7. There may be none. Blocking red edges are associated in pairs with -reductions, and each blocking red edge is associated with two -reductions, and . The edges must be red by Lemma 1. Accordingly, a blocking black edge of connects with the vertex at the opposite side of , since it is not matched, and, again, it must be black by Lemma 1, see Fig. 7. There are up to three blocking black edges in , and each -reduction has at most one blocking black edge, since blocking black edges do not cross. There are two blocking red edges in case a -reduction, however, at most one of them can occur in an optimal 1-planar graph that is not the minimum extended wheel graph . By Lemma 1, blocking black edges are excluded in this case.

(a) Graph with three blocking red edges and . There may be a subgraph in the area between and (x2, x3, x4) and similarly for and . is blocked by if there is no such subgraph and is crossed by a red edge incident to .
(b) Graph with a blocking black edge and two blocking red edges
Figure 7: Blocking edges added to

An application of a reduction with a blocking vertex would decrease the degree of the blocking vertex to four, which would violate the 3-connectivity of the planar skeleton. The resulting graph would no longer be optimal 1-planar. The application of a reduction with a blocking edge would introduce a multiple edge, whose endpoints are a separation pair of the planar skeleton. This again leads to a violation of the 3-connectivity of the planar skeleton. Note that the case of a blocking vertex is covered by a blocking red edge between the black neighbors of the blocking vertex on the outer cycle. The converse is not true, since the blocking edge may enclose a (larger) subgraph. For example, add a forth vertex and then apply the inverse of .

Example 1

Consider graph which is optimal 1-planar by the 1-planar embedding displayed in Fig. 10(a). Vertices are candidates, where are good for a -reduction, whereas and are bad candidates, and therefore are colored orange. Vertices are good for a -reduction. A good -reduction is indicated by an arrowhead on the red edge from to . Vertex moves along that edge and is merged with . For example, is good, whereas and are bad, since is a blocking vertex and is a blocking red edge.

As another example, consider extended wheel graphs as in Fig. 3. Every vertex on the cycle of is a candidate which, however, is blocked by its neighbors on the cycle. In addition, all vertices of are blocked candidates. Hence, all -reductions are bad and the extended wheel graphs are irreducible.

Definition 4

Every reduction has a pair of associated red blocking edges. If , then and , where and are the red neighbors of . If is a -reduction, then and are the two blocking red edges of .

Recall that is Schumacher’s “”-relation and the reverse of Suzuki’s vertex splitting [35], and is the reverse of the -cycle addition, and the -  and -expansions of Brinkmann et al. are the restrictions to planar quadrangulations. The existential foundations for the reductions are:

Proposition 3

[14] The class of all 3-connected quadrangulations of the sphere is generated from the pseudo-double wheels by the -  and -expansions.

Proposition 4

[35] Every optimal 1-planar graph can be obtained from an extended wheel graph by a sequence of -splittings and -cycle additions.

3.1 Application of the Reduction Rules

For an application of a reduction one must find a matching of and and a subgraph that preserves the coloring and the 1-planar embedding of and , respectively, and check whether the reduction is good or bad. In addition, the reason for a bad reduction must be known for the linear time algorithm in Section 4. Fortunately, the degree vector and the local degrees of the vertices of the matched subgraph provide the necessary information, as stated in Table 1.

Definition 5

Let be a candidate of graph , and let be the subgraph induced by and its six neighbors. Let be the lexicographically ordered 7-tuple with the local degrees of the vertices of , called the degree vector of , and call the type of .

Lemma 2

If is a candidate of an optimal 1-planar graph, then

  1. has between and edges, and

  2. ,
               .

Proof

The first tuple for is the degree vector of and any sparser subgraph cannot match . As is the corner of three kites, one can add at most three extra edges in the outer face of , namely with and with , where e.g., must be black and the other edges are red. The other degree vectors result from one or two edges added to . ∎

Obviously, for vertex of in Fig. 10(a) and vertex has local degree . Moreover, if is on the inner cycle of and the -reduction is good, such as in , and if is on the cycle of an extended wheel graph for . Finally, the maximum degree vector appears at every vertex of and at two candidates of if there is a blocking red edge, e.g., in Fig. 11(b).

Definition 6

The subgraph of a candidate of an optimal 1-planar graph is fixed if its embedding and coloring is uniquely determined. It has a partial coloring if two neighbors of may change places and the coloring of the incident edges is open, and, finally, is unclear if the coloring of the edges of is undecided.

Lemma 3

Let be a candidate of an optimal 1-planar graph and the subgraph induced by and its neighbors.

  1. If , then the coloring of is fixed except for , where there is a partial coloring.

  2. If , then there is a partial coloring.

  3. If , then the edge coloring is unclear.

Proof

First, a black neighbor of has local degree at least .

If and has local degree , then is a red neighbor of and has two more neighbors, say and , that are black neighbors of and . Then the subgraph induced by must form a kite, since it is and the embedding is unique by Proposition 1. If there is another vertex with local degree , then the above applies again, such that the circular order of the neighbors of , the edge coloring and the embedding of are uniquely determined. If , then the two vertices with local degree are red neighbors of and they have a red edge in between, whose removal leaves two vertices with local degree . Again, is uniquely determined. Finally, consider with of local degree and of local degree . Vertex determines and as its black neighbors on the cycle. There are no edges and such that is opposite of . Vertices and have as common neighbor and is a black neighbor of and . However, the roles of and are undecided in . They may change places in the circular order around , but the edge is black, see Fig. 8. Thus there is a partial coloring of .

If , there are two vertices of local degree by Lemma 2. Let and be these vertices, which are red neighbors of . The third red neighbor of has local degree at least . Hence, edge is missing in . There is a vertex of local degree that is not adjacent to and is opposite of and similarly for . Let and be the respective vertices, which are black neighbors of . Edges and are black, and the subgraph induced by is fixed. However, and may change places and there is a partial edge coloring. Finally, the neighbors of are indistinguishable and the edge coloring is unclear if . ∎

(a) The correct 1-planar drawing.
(b) The incorrect 1-planar drawing with a new edge coloring. For a correct drawing swap and .
Figure 8: An ambiguous case where the embedding of and is not yet fixed.

Fortunately, neighboring candidates help each other in determining the edge coloring. Consider the candidates of the inner cycle of , as given in Fig. 6, and assume that the graph is not . Then and for two of them, say and . Then determines that and are black, whereas and may change places. Similarly, determines the black edges . If then and their coloring is unclear. However, the black neighbors of are and is a red neighbor, which implies that is a black neighbor of and the case is decided. Hence, the coloring of a subgraph matching is fixed and its embedding is unique.

In fact, we have the following situation:

Lemma 4

Let be a (sub-) graph of size with a vertex of degree . Then is unique and is maximal planar if . There are (at least) two graphs and if , and and are non-planar and -planar.

Proof

Let be the vertices of , where has degree , and have local degree . If each of has two vertices of as neighbors, then . Clearly, satisfies the assumptions and is planar. For a contradiction, suppose that there is an edge and let be the two remaining neighbors of and . Then and cannot have local degree and there is no graph as required.

Let be obtained from by adding edge , and let be the graph displayed in Fig. 9. There is an edge from the vertex of degree to a vertex of degree in , which does not exist in . The graphs are non-planar, since there are vertices and edges and they are 1-planar, as shown by the figures. ∎

Figure 9: Graph from Lemma 4 with vertices labeled by degree

Similarly, there is a unique subgraph that matches if is good. The unique embedding is obtained from pairs of vertices that are placed opposite each other on the inner and outer cycles.

Lemma 5

There is a unique graph that matches if has four mutually neighbored candidates with for .

Proof

Let be the remaining vertices of . Each vertex of the inner cycle of excludes exactly one vertex of the outer cycle as a neighbor. Assume this does not hold in and let e.g.,  and both exclude as a neighbor. Since and are candidates, vertices are their neighbors, and both and contribute a in the degree vector of the other such that , a contradiction. ∎

The usability of a reduction is completely determined by the degree vector of a candidate and the type distinguishes between a -  and a -reduction.

Lemma 6

A candidate of an optimal 1-planar graph is good for if and only if and is good if has local degree .

Proof

Let be the subgraph matching and let be the vertices of . Then has a unique embedding matching the embedding of as shown in Lemma 3 if and . Then is good if has local degree . Otherwise, there is a partial coloring and and may change places if has local degree and has local degree . This ambiguity does not hinder using , which removes and the edge and inserts the edges and the red edge . Then the color of the edges incident to and remains open.

If , then every red neighbor of has a blocking red edge and there is no good -reduction. ∎

Lemma 7

A candidate of an optimal 1-planar graph is good for if and only if and there are three more candidates with , and matches the subgraph induced by and its four common neighbors.

Proof

If is good, then the degree vector of the four vertices that match the vertices of the inner cycle of is . The degree vector implies a blocking red edge and implies a black edge between two opposite neighbors of a center, which violates .

Conversely, there is a unique subgraph matching by Lemma 5 if the degree vector of the candidates is , and there is no blocking edge. ∎

Corollary 1

For each candidate of a graph it can be checked in time whether is good or bad. It can be determined which reduction applies if is good. The reduction takes time including a (partial) coloring of the edges.

Proof

The type of decides which reduction may apply and the degree vector(s) and the local degrees tell whether the reduction is good. The reductions operate on subgraphs with six resp. eight vertices. They remove one or four vertices and one more edge and insert three or two edges. This can be accomplished in time. ∎

We summarize the degree vectors and their impact on an edge coloring, reductions and their blocking edges, and storing the reductions in the linear-time algorithm in Section 4 in Table 1. For convenience, assume that the circular order of the neighbors of candidate is as in Fig. 5, where and are red neighbors and if the vertices are ordered by local degree. Let and let and be the diagonals and in case of and a -reduction.

coloring reductions blocking edges storing

fixed none
none
none

fixed none
none
black none

fixed
none

partial
none
black none

fixed none
fixed
unclear infeasible
Table 1: Degree vectors and their impact on reductions

The existence of a good candidate is granted unless all candidates are blocked, as in an extended wheel graph, or if the graph is not optimal 1-planar.

Lemma 8

If is a reducible optimal 1-planar graph, then has a good candidate.

Proof

According to Brinkmann et al. [14] there is a good candidate for their -  and -reductions (or expansions) on 3-connected quadrangulations unless the graph is a double-wheel graph, and thus irreducible. In Lemma 4 [14] they prove that a good candidate lies in the innermost (or outermost) separating -cycle. By the one-to-one correspondence between planar 3-connected quadrangulations and optimal 1-planar graphs, this generalizes to optimal 1-planar graphs. ∎

As a final step, we consider the recognition of extended wheel graphs.

Lemma 9

There is a linear time algorithm to test whether a graph is an extended wheel graph .

Proof

If the input graph has eight vertices, we check by inspection. Here, each vertex is a candidate with .

For , an extended wheel graph has two poles and of degree as distinguished vertices and a cycle of vertices of degree six. This is checked in a preprocessing step on the given graph and takes en passant time. For a final check, we remove the poles and restrict ourselves to the subgraph induced by the vertices of degree six. Each such vertex has four neighbors and the cyclic ordering of these vertices is determined as by the missing edges and . So we determine the cycle and then check for . Altogether, the tests take time. ∎

From the above observations, we obtain a simple quadratic-time algorithm for the recognition of optimal 1-planar graphs. The algorithm scans the actual graph and searches a single candidate for or a cluster of four candidates for and checks in time whether the reduction is good or bad. Each reduction removes one or four vertices. Hence, there are at most reductions from a graph of size to an extended wheel graph .

Theorem 3.1

There is a quadratic-time recognition algorithm for optimal 1-planar graphs.

Example 2

For an explanation of the reductions consider the input graph as shown in Fig. 10(a) with a 1-planar embedding. Vertices are good for an -reduction, and are good for a -reduction. If the -reduction is applied first, we obtain the graph in Fig. 10(b) and then yields .

Alternatively, using and finally ends up at . This computation is illustrated in Figs. 11(a) to 11(f). Note that the cluster flips from good to bad if there is an outer neighbor of degree six, which is blocking and induces a blocking red edge.

Also, can be obtained by , and finally .

(a) A 1-planar embedding of . Candidates are drawn as hexagons which are light green for good candidates and orange for bad candidates. Non-candidates of degree at least are drawn as circles.
(b) Graph after .
(c) and after .
Figure 10: A reduction of an input graph to an extended wheel graph.
(a) after
(b) and after
(c) and after
(d) and after
(e) and after
(f) and finally yields
Figure 11: A alternative reduction of an input graph to .

Graph in Example 2 can be reduced to different extended wheel graphs which are irreducible. In consequence, the graph reduction system with the rules and cannot be confluent, since confluence implies a unique irreducible representative. A rewriting system is confluent if and implies that there is a common descendant with and . In consequence, if two rules can be applied at different places of starting two reductions, then the reductions join at a common descendant. This is not the case for and . More properties are elaborated in [11].

Corollary 2

The reduction system with the rules and is non-confluent on optimal 1-planar graphs.

4 A Linear Time Algorithm

Example 2 shows that a reduction may change the role of other candidates and reductions. In particular, increases the degree of by two. If was a candidate before, it is no longer. If blocked another reduction, it does no longer. On the other hand, the degree of and decreases by two and they may become new candidates, which may turn their neighbor candidates from good to bad. Accordingly, a -reduction decreases the degree of the vertices on the outer cycle by two, which may introduce some of them as candidates with an impact on candidates in their neighborhood. However, vertices at distance at least three from the vertex of the application of a rule are not affected. Hence, a reduction operates locally. However, a reduction may have a global effect and introduce or remove a blocking edge for many other reductions and candidates. This is illustrated in Figs. 12 and 13. Thus it may be advantageous to maintain lists with all reductions that are or may be blocked by an edge. There is a separating -cycle if an edge blocks two or more reductions. Clearly, there is a separating -cycle at a -reduction. If two -reductions are blocked by an edge , then the centers of the reductions have degree and have and as common neighbors and there is a separating -cycle through and which includes if the blocking edge is black.

We shall assume throughout that the given graph is reducible, i.e., not an extended wheel graph, and that is a candidate of a -reduction or is one of four candidates of a -reduction.

The degree vector of a candidate does not determine the coloring of , but it tells which reduction is applicable, see Lemmas 3 - 7. Infeasible applications can be restricted even further.

First, observe that if is a candidate of a reducible optimal 1-planar graph. Otherwise, implies , but is not a proper subgraph of a -connected 1-planar graph [8].

Second, both blocking edges of a -reduction cannot occur simultaneously, since the induced subgraph would have a separation pair violating -connectivity.

Finally, suppose there is a blocking black edge for an -reduction at candidate , say edge . Then or by Lemma 2. If vertex has local degree three, then is applicable, whereas is not. Suppose the coloring is fixed as in Fig. 5, otherwise one must also consider cases with and exchanged. Then and are separating -cycles which separates from further black neighbors of and , respectively. The blocking black edge for cannot be removed if remains as a candidate. Then another reduction must remove the edge. A black edge is removed by a reduction if it is incident to a candidate. However, if is a candidate and there is the edge , then has degree at least eight and the degree of cannot be decreased to six since is a blocking neighbor. Consider the -cycle and suppose that is in the outer face of , the other case is similar. Then has at least one more black neighbor besides and . If had local degree six, then the red edge were crossed by , which were a multiple edge. Hence, also has degree at least eight and is not a candidate. Hence, the black prohibited edge remains if remains. However, if or can be applied, then is removed and also . In consequence, a reduction can never be used if there is a blocking black edge incident to , and we add “none” in the last column of Table 1.

We summarize these facts:

Lemma 10

For a reducible optimal 1-planar graph the following holds:

  1. If is a candidate, then is fixed or has a partial coloring for an -reduction.

  2. The subgraph matched by has at most one blocking red edge.

  3. A reduction is infeasible if there is a blocking black edge incident to .

Next, consider the interaction between - and -reductions. Their usability is distinguished by the type of the candidates. The vertices of the inner cycle of mutually block each other for a -reduction. These vertices are a “black hole” for -reductions, since they can never take the role of the center of a good -reduction. However, vertex of the inner cycle of may be the target of a -reduction , whose use absorbs vertex . In that case, the -reduction is bad and is blocked by . The vertices of the inner cycle can only be removed by a -reduction, or they remain for the final extended wheel graph.

Lemma 11

A -reduction never applies to a candidate if a -reduction applies to candidates for .

Proof

If applies to , then for if the reduction is good and for two vertices if the reduction is bad by Lemma 7. The matching subgraph has a unique embedding. Vertices on the inner cycle of mutually block each other and excludes the use of a -reduction, which needs by Lemma 6. ∎

Finally, consider the relationship between reductions and blocking edges. A reduction may introduce a blocking edge for many reductions, and it may be blocked by several blocking edges. It is a many-to-many relation, say , where may be linear in the size of the graph. By Lemma 10 it suffices to consider reductions with a fixed or a partial coloring, and a reduction with a blocking black edge can be discarded. Hence, a candidate may allow for three -reductions towards its red neighbors if is fixed. Each -reduction has zero, one, or two blocking red edges, where zero means that the reduction is good. Therefore, suffices. There are two bad -reductions for a candidate if there is a single blocking red edge, and is bad if and only if there are two blocking red edges or the graph is .

A -reduction introduces the planar edge , which simultaneously may close many 4-cycles and then may block many other candidates and their -reduction towards , see Fig. 12. Similarly, edges and or the diagonals in may be blocking red edges for many other reductions, as Fig. 13 illustrates. Such edges may be removed by another reduction, and then they can reappear after a further reduction.

Figure 12: A conflict among good candidates