Recognizing 2-Layer and Outer -Planar Graphs
Abstract
The crossing number of a graph is the least number of crossings over all drawings of the graph in the plane. Computing the crossing number of a given graph is -hard, but fixed-parameter tractable () with respect to the natural parameter. Two well-known variants of the problem are 2-layer crossing minimization and circular crossing minimization, where every vertex must lie on one of two layers, namely two parallel lines, or a circle, respectively. In both cases, edges are drawn as straight-line segments. Both variants are -hard, but admit -algorithms with respect to the natural parameter.
In recent years, in the context of beyond-planar graphs, a local version of the crossing number has also received considerable attention. A graph is -planar if it admits a drawing with at most crossings per edge. In contrast to the crossing number, recognizing -planar graphs is -hard even if and hence not likely to be  with respect to the natural parameter .
In this paper, we consider the two above variants in the local setting. The -planar graphs that admit a straight-line drawing with vertices on two layers or on a circle are called 2-layer -planar and outer -planar graphs, respectively. We study the parameterized complexity of the two recognition problems with respect to the natural parameter . For , the two classes of graphs are exactly the caterpillars and outerplanar graphs, respectively, which can be recognized in linear time. Two groups of researchers independently showed that outer 1-planar graphs can also be recognized in linear time [Hong et al., Algorithmica 2015; Auer et al., Algorithmica 2016]. One group asked explicitly whether outer 2-planar graphs can be recognized in polynomial time.
Our main contribution consists of -algorithms for recognizing 2-layer -planar graphs and outer -planar graphs, which implies that both recognition problems can be solved in polynomial time for every fixed . We complement these results by showing that recognizing 2-layer -planar graphs is XNLP-complete and that recognizing outer -planar graphs is XNLP-hard. This implies that both problems are -hard for every and that it is unlikely that they admit -algorithms. On the other hand, we present an -algorithm for recognizing 2-layer -planar graphs where the order of the vertices on one layer is specified.
Keywords and phrases:
2-layer -planar graphs, outer -planar graphs, recognition algorithms, local crossing number, bandwidth, , XNLP, , []Funding:
Yasuaki Kobayashi: Supported by JSPS KAKENHI Grant Numbers JP23K28034, JP24H00686, and JP24H00697.Copyright and License:
![[Uncaptioned image]](x1.png)
2012 ACM Subject Classification:
Mathematics of computing Graph theoryAcknowledgements:
We thank Hirotaka Ono and the AFSA project (Creation and Organization of Innovative Algorithmic Foundations for Social Advancement) for supporting our work. We thank Boris Klemz and Marie Diana Sieper for useful discussions.Editors:
Oswin Aichholzer and Haitao WangSeries and Publisher:

1 Introduction
When evaluating the quality of a graph drawing, one of the established metrics is the number of crossings, whose importance is supported by user experiments [42]. Unfortunately, computing the crossing number of a given graph, that is, the minimum number of crossings over all drawings of the graph, is NP-hard [27], even for graphs that become planar after removal of a single edge [14]. On the other hand, the problem is fixed-parameter tractable () with respect to the natural parameter, that is, the number of crossings [29, 33]. Many variants of the crossing number have been studied; see Schaeferâs survey [44]. Two variants with geometric restrictions have attracted considerable attention: 2-layer crossing minimization and circular (or convex, or 1-page) crossing minimization, where the placement of the vertices is restricted to two parallel lines (called layers) and to a circle, respectively. In both cases, edges are drawn as straight-line segments. Circular crossing minimization is -hard, but admits -algorithms with respect to the natural parameter [6, 34]. In practice, often the so-called sifting heuristic is used [7]. Circular crossing minimization can be seen as a special case of a book embedding problem, where vertices must lie on a straight line, the spine of the book, and each edge must be drawn on one of a given number of halfplanes called pages whose intersection is the spine. In this setting, crossing minimization is interesting even if the order of the vertices along the spine is given [8, 38].
The 2-layer variant comes in two settings: one-sided crossing minimization (OSCM) and two-sided crossing minimization (TSCM). In OSCM, the input consists of a (bipartite) graph and a linear order for the vertices on one side of the bipartition; the task is to find a linear order for the vertices on the other side that minimizes the total number of crossings. In TSCM, the linear orders on both layers can be chosen freely. OSCM is an important step in the so-called Sugiyama framework for drawing hierarchical graphs [46], that is, graphs where each vertex is assigned to a specific layer. OSCM was the topic of the Parameterized Algorithms and Computational Experiments Challenge (PACE111https://pacechallenge.org/2024/) 2024. Both OSCM and TSCM are -hard; OSCM even for the disjoint union of 4-stars [39] and for trees [19]. On the positive side, OSCM admits a subexponential -algorithm; it runs in time [35]. TSCM also admits an -algorithm; it runs in time [36].
In the context of beyond-planar graphs, a local version of the crossing number has also received considerable attention [22, 18]. A graph is -planar if it admits a drawing with at most crossings per edge. The local crossing number of a graph is the smallest such that the graph is -planar. The recognition of 1-planar graphs has long been known to be NP-hard [28]. Later, it turned out that the recognition of -planar graphs is NP-hard for every  [47]. Hence, it is unlikely that - or -algorithms exist with respect to the natural parameter . On the other hand, recognizing 1-planar graphs is fixed-parameter tractable with respect to tree-depth and cyclomatic number [5]. The problem remains -hard, however, for graphs of bounded bandwidth (and hence, pathwidth and treewidth). The local crossing number has also been studied in the context of book embeddings [37, 1].
In this paper, we study the above-mentioned geometric restrictions, but with respect to the local crossing number. The resulting graph classes are called 2-layer -planar graphs and outer -planar graphs; see Figure 1.
The former were studied by Angelini, Da Lozzo, FĂśrster, and Schneck [3]. Among others, they gave bounds on the edge density of these graphs and characterized 2-layer -planar graphs with the maximum edge density for . They concluded that âthe general recognition and characterization of 2-layer -planar graphs remain important open problemsâ. According to Schaeferâs survey [44] on crossing numbers, Kainen [32] introduced the âlocal outerplanar crossing numberâ, which minimizes, over all circular drawings, the largest number of crossings along any edge. Outer -planar graphs have been studied by Pach and TĂłth [40], who showed that any outer -planar graph with vertices has at most edges. For , they established a better bound , which is tight for . For , the constant factor was later improved to  [2].
We study the parameterized complexity of the two recognition problems with respect to the natural parameter . For , the two classes of graphs are exactly the caterpillars and outerplanar graphs, respectively, which can be recognized in linear time. There are also linear-time algorithms for recognizing outer -planar graphs [4, 30]. The authors of [30] posed the existence of polynomial-time algorithms for recognizing outer 2-planar graphs as an open problem. A partial answer has been given by Hong and Nagamochi [31], showing that full outer 2-planar graphs can be recognized in linear time. Outer -planar drawings are full if no crossing appears on the boundary of the outer face. The authors of [16] generalized this result and showed that, for every integer , full outer -planarity is testable in time, for a computable function . They also showed that outer -planar graphs can be recognized in quasi-polynomial time, which implies that, for every integer , testing outer -planarity is not -hard unless the Exponential-Time Hypothesis fails.
Parameterized complexity.
We assume that the reader is familiar with basic concepts in parameterized complexity theory (see [17, 20, 25] for definitions of these concepts). Zehavi [48] gives a survey specifically on the parameterized analysis of crossing minimization problems. The class XNLP consists of all parameterized problems that can be solved non-deterministically in time and space , where is some computable function, is the input size, and is the parameter. A parameterized problem is said to be XNLP-hard if for any , there is a parameterized logspace reduction from to , that is, there is an algorithm and computable functions and that satisfy the following: Given , the algorithm computes such that if and only if , , and runs in space . A parameterized problem is said to be -complete if it is -hard and belongs to . The class XNLP contains the class [] for every  [13]. Moreover, Pilipczuk and Wrochna [41] conjectured that an XNLP-hard problem does not admit an algorithm that runs in time and space for a computable function , where is the size of the instance and is the parameter. We refer to [13, 23] for more information.
Recently, the authors of [10] showed the first graph-drawing problem to be XNLP-complete, namely ordered level planarity, parameterized by the number of levels. Ordered level planarity is a restricted version of level planarity, where for each level, the vertices on that level are given in order (and the problem is to route the edges in a y-monotone and crossing-free way).
Our contribution.
We present -algorithms for recognizing 2-layer -planar graphs and outer -planar graphs, which implies that both recognition problems can be solved in polynomial time for every fixed ; see Sections 4.1 and 5.1, respectively. This solves the open problem regarding the recognition of outer 2-planar graphs posed by the authors of [30]. We complement these results by showing that recognizing 2-layer -planar graphs is XNLP-complete even for trees (Section 4.2) and that recognizing outer -planar graphs is XNLP-hard (Section 5.3). This implies that both problems are -hard for every  [13] and that it is unlikely that they admit -algorithms. On the other hand, we present an -algorithm for recognizing 2-layer -planar graphs where the order of the vertices on one layer is specified; see Figure 1c and Section 3.1. We prove that two edge-weighted versions of this problem are -hard; see Section 3.2. Finally, we show that the local circular crossing number cannot be approximated even for graphs that are almost trees (that is, graphs with feedback vertex number ); see Section 5.2. We conclude with open problems; see Section 6.
The proofs of statements marked with a (clickable) are in the full version.
2 Preliminaries
Let be a graph. We let and denote the sets of vertices and edges of , respectively. For a vertex of , let be the set of neighbors of in , and let be the set of edges incident to . For , we define , , and . We may omit the subscript when it is clear from the context. The subgraph of induced by is denoted by . A vertex is called a leaf if it has exactly one neighbor.
We use as shorthand for . Let , and let be a linear order of the vertices of (i.e., a bijection between and ). For , the stretch of edge in is defined as . The bandwidth of (with respect to ) is the maximum stretch of an edge of in . The bandwidth of , denoted by , is the minimum integer such that has a linear order of with bandwidth at most .
We define a circular drawing of a graph to be a cyclic order of . We say that an edge with pierces a pair of (not necessarily adjacent) vertices with if either or holds. In particular, if is an edge of , we say that crosses . For an edge , let denote the number of edges that cross in . A circular drawing is -planar (or an outer -planar drawing) if every edge crosses at most edges in . Since whether two edges cross is determined only by the cyclic vertex order, in this paper, we allow the edges to be drawn arbitrarily.
Let be a bipartite graph with , , and . A 2-layer drawing of is a pair of (strict) linear orders and defined on and on , respectively. A crossing in is defined by a pair of edges and with distinct endpoints and distinct endpoints such that and . The notation is defined as above. Moreover, for two distinct edges and , let if crosses ; otherwise. For distinct , we say that is to the left of in if . Equivalently, we say that is to the right of . The leftmost (resp. rightmost) of in is the smallest (resp. largest) vertex in under the linear order . We also use these notions for vertices in . For an integer , a 2-layer drawing of is said to be -planar if, for each edge of , . For (not necessarily disjoint) vertex sets and 2-layer drawings of and of , we say that is compatible with (or equivalently is compatible with ) if, for every pair of vertices that both are in the same set of the bipartition , we have that in if and only if in .
3 Recognizing 2-Layer -Planar Graphs â The One-Sided Case
In this section, we design an -algorithm for recognizing 2-layer -planar graphs when the order of the vertices on one layer is given as input. The problem is defined as follows.
Problem: | One-Sided -Planarity |
---|---|
Input: | A bipartite graph , an integer , and a linear order of . |
Question: | Does admit a linear order such that is a 2-layer -planar drawing of ? |
Degree reduction.
Let be a bipartite graph, and let be a non-negative integer. We describe two simple reduction rules that yield an equivalent instance of One-Sided -Planarity where every vertex in has degree at most .
Observation 1 ().
Let be a bipartite graph that contains a vertex with more than non-leaf neighbors. Then is not 2-layer -planar.
Lemma 2 ().
Let be an instance of One-Sided -Planarity. If contains a vertex with and with a leaf neighbor , then is a YES-instance if and only if is a YES-instance.
Hence, in the following, we assume that every vertex in has degree at most .
3.1 An FPT-Algorithm
Let be the number of vertices in . In this section, we prove the following result.
Theorem 3.
One-Sided -Planarity can be solved in time , that is, One-Sided -Planarity is fixed-parameter tractable when parameterized by .
We assume that has no isolated vertices; otherwise, we simply remove them. For a 2-layer drawing of a subgraph of , we say that respects if, for every , it holds that is to the left of in if and only if .
We first give a simpler algorithm with running time . Let be the vertices of appearing in this order in . If , then , and we can simply enumerate all the possible 2-layer drawings in time . Thus, we assume . Let . For , let and . Correspondingly, let and . Our algorithm recursively decides whether admits a 2-layer -planar drawing that extends a prescribed partial drawing of . To be more precise, let be a 2-layer -planar drawing of that respects . Given , a partial drawing of respecting , and a function , we define a Boolean value to be if and only if admits a 2-layer -planar drawing such that
-
is compatible with and
-
for every edge , it holds that .
Our goal is to compute for some partial drawing of and , which is done by the following dynamic programming algorithm.
For the base case , we compute the table entries by brute force: For each possible 2-layer -planar drawing of respecting and for every function , we set if for every ; otherwise, we set . Now we show that, in any 2-layer -planar drawing, if two edges have endpoints in that are far apart, then the edges do not cross.
Lemma 4 ().
If and are distinct edges such that , then, in every 2-layer -planar drawing of , it holds that or that .
This suggests the following recurrence for the dynamic program.
Lemma 5.
Let , let be a 2-layer -planar drawing of respecting , and let such that for every . Then,
where the are taken over all 2-layer -planar drawings of that are compatible with , and the are taken over all functions that satisfy
for every edge .
Proof.
Suppose that . Then, there is a 2-layer -planar drawing of that is compatible with and, for every edge , it holds that . We need to show that there exists a triplet such that . Let and be subdrawings of induced by and , respectively. Then is compatible with . By Lemma 4, edges incident to do not cross edges incident to . Thus, for every edge , we have . Moreover, every edge has exactly crossings in . Define by setting for every edge . Then, by definition, since is a 2-layer -planar drawing of compatible with and, for every , it trivially holds that .
We omit the converse direction, which readily follows by reversing the above argument.
Our algorithm evaluates the recurrence of Lemma 5 in a dynamic programming manner. To see the runtime bound, observe that, for each , the number of possible 2-layer -planar drawings of is upper bounded by and the number of possible functions from to is upper bounded by . Hence, we can evaluate the recurrence in time .
We can improve the exponential dependency of our running time as follows. Instead of fixing the âwindow sizeâ to , for every , we dynamically take the smallest such that consists of at least edges. It is easy to verify that Lemma 4 (and hence Lemma 5) still holds for this dynamic window size. Since the degree of every vertex in is at most , we have that . This improves the running time to , completing the proof of Theorem 3.
3.2 NP-Hardness of the Weighted Version
We can generalize One-Sided -Planarity to weighted settings. Let be a bipartite graph, and let be an edge-weight function. A 2-layer drawing of is said to be -planar if, for each edge of , it holds that
(1) |
It is straightforward to extend our algorithm to this weighted setting. Although we believe that One-Sided -Planarity is -hard, we can only show the following weaker result.
Theorem 6 ().
The weighted One-Sided -Planarity is (weakly) -hard under (1).
Proof (sketch).
The claim is shown by performing a reduction from Partition, which is known to be (weakly) -hard [26]. The problem asks, given a set of integers , whether the set can be partitioned into two subsets of equal sum. We construct a bipartite graph consisting of a path of length with two edges and of weight 1, and isolated edges with weight proportional to the integers in . By appropriately defining the order on , we can ensure that each isolated edge crosses either or ; see Figure 2. Setting properly induces two balanced subsets of .
We remark that there is another reasonable definition of crossings in a weighted graph: A 2-layer drawing is defined to be -planar if, for each edge , it holds that
(2) |
By making and sufficiently large, a similar reduction will work.
 Remark 7.
The weighted One-Sided -Planarity is (weakly) -hard under (2).
4 Recognizing 2-Layer -Planar Graphs â The Two-Sided Case
The algorithm in Theorem 3 exploits the prescribed order on , which is not specified in the two-sided case. This difference is reflected by the parameterized complexity of the two problems. The two-sided case turns out to be XNLP-hard, meaning that it is unlikely to be fixed-parameter tractable. On the other hand, we design a polynomial-time algorithm for the two-sided case, provided that is fixed. We use this algorithm also to show that the problem is contained in XNLP. Formally, the problem is defined as follows.
Problem: | Two-Sided -Planarity |
---|---|
Input: | A bipartite graph and an integer . |
Question: | Does admit a 2-layer -planar drawing? |
4.1 An XP-Algorithm
To solve Two-Sided -Planarity, we extend the algorithm for One-Sided -Planarity presented in Section 3. Let be a bipartite graph, let be the number of vertices of , and let . We assume that is connected; otherwise, the problem can be solved independently for each connected component. Moreover, by applying Observation 1 and applying Lemma 2 first to and then to , we assume that every vertex has degree at most . Our algorithm employs a dynamic programming approach analogous to that presented in Section 3. Instead of a âwindowâ, we specify a subset of vertices, which plays the same role as the window . However, this subset does not specify the graph on the left of the window, preventing us from defining the same type of subproblems as there. We overcome this obstacle by applying an idea similar to that of Saxe [43] for recognizing bandwidth- graphs. To properly define the subproblems, we observe that separates the subdrawings of the components of into left and right parts.
Lemma 8.
Let be a 2-layer -planar drawing of , and let be a set of vertices that appears consecutively in . Let and be the leftmost vertex and the rightmost vertex of in , respectively. Then, for each component of , the vertices in are either entirely to the left of or entirely to the right of .
Proof.
Suppose that has two vertices such that is to the left of and is to the right of in . Let be a path between and in . We can assume that has exactly two edges, and . Observe that each edge incident to a vertex in crosses either or . Since each vertex in has at least one incident edge, at least one of and involves more than crossings.
Suppose that has a 2-layer -planar drawing . For a family , we use as shorthand for . Let be the vertices of appearing in this order in . For , let be the set of connected components in . By Lemma 8, we have for some .
Now, we can formally define our subproblems. Let with , let be a 2-layer -planar drawing of , let , and let , where is the set of components in . We define a Boolean value to be if and only if there is a 2-layer -planar drawing of such that
-
is compatible with and
-
for every edge , it holds that .
Hence, has a 2-layer -planar drawing if and only if for some , , , and .
To compute the values for with , , , and , we first compute the base cases where and then the other cases in ascending order of . This can be done by using a recurrence similar to the one in Lemma 5.
To see the running time bound of the above algorithm, observe that the number of possible choices for , , , and is at most
The third factor can be bounded by as follows: Since is connected, each connected component of contains at least one vertex in . This implies that the number of components in is at most .
Theorem 9.
Two-Sided -Planarity can be solved in time , that is, Two-Sided -Planarity is polynomial-time solvable when is fixed.
The above algorithm easily turns into a non-deterministic algorithm that runs in polynomial time and space , which implies the following.
4.2 XNLP-Completeness
To complement the positive result in the previous subsection, we show that Two-Sided -Planarity is XNLP-hard even on trees. In contrast to our result, TSCM can be solved in polynomial time on trees [45].
Proof (sketch).
Membership in XNLP follows from Corollary 10. We prove the claim by showing a parameterized logspace reduction from Bandwidth, which is known to be XNLP-hard even on trees [11, 13]. Let be a tree. We subdivide each edge of once by introducing a vertex , and we add leaves adjacent to each original vertex of for some . Let be the graph obtained in this way. Next, we show that if and only if has a 2-layer -planar drawing for some .
Let , let , and let be a vertex order of with bandwidth . Define a vertex order on by setting . Since the stretch of each edge in is at most , there are at most vertices between its endpoints. This implies that we can place the vertices in so that there will be only crossings per edge; see Figure 3. Conversely, in any 2-layer -planar drawing of , the endpoints of every edge of are close to each other, as each vertex between and causes at least crossings on the path . Hence, the order on turns into a vertex order of with bandwidth at most .
5 Recognizing Outer -Planar Graphs
In this section, we discuss the parameterized complexity of recognizing outer -planar graphs.
Problem: | Outer -Planarity |
---|---|
Input: | A graph with vertices and an integer . |
Question: | Does admit an outer -planar drawing? |
5.1 An XP-Algorithm
In this subsection, we show our main result, an -algorithm for Outer -Planarity with respect to . Note that a graph is outer -planar if and only if its biconnected components are outer -planar; this can be shown in a similar manner as [31, Theorem 4] for . Hence, we assume the input graph to be biconnected.
Theorem 12.
Outer -Planarity can be solved in time , that is, Outer -Planarity is polynomial-time solvable when is fixed.
Let be the input graph, let be an ordered pair of two distinct vertices of , and let be a subset of such that there are at most edges between and , where . Let be the set of these edges. Let be a linear order of , let denote the vertices of in the order given by , and let . Let be the graph obtained by adding vertices to the induced subgraph and by connecting and the endpoint of in for every . Then we define a Boolean value to be if and only if admits an outer -planar drawing with the following properties:
-
(P1)
the cyclic order of contains as a consecutive subsequence, and
-
(P2)
for every edge , it holds that .
Clearly, the graph admits an outer -planar drawing if and only if there exists a vertex pair such that , where is the empty function.
We evaluate the recurrence as follows. For every base case, namely where , is since is also empty.
When , we compute for smaller sets of type . In this case, with the same technique as that used in [24, Lemma 6], we can show the following.
Hence, we can compute by checking all the ways to split the instance at the vertex . Let be a partition of , let and let . For , let be the set of edges between and , let , let be a linear order of , and let be a function. We say that are consistent if the following holds ( is defined below):
-
there are at most edges between and and at most edges between and ,
-
for every edge between and , holds for ,
-
for every edge between and , ,
-
for every edge between and , ,
-
for every edge between and , , and
-
for every edge between and , .
Informally, the value is the number of crossings on inside the âtriangleâ consisting of . To define it formally, let us consider a circular drawing of a graph . For each edge , the graph contains an edge defined as follows. If , simply connects and . Suppose that is incident to exactly one vertex . This implies that is contained in exactly one of , , and , which also means that is contained in the domain of exactly one . Then connects and . Otherwise, is contained in exactly two of , , and , since is not contained in . Similarly to the previous case, is contained in the domains of distinct . Then connects and . Now we define .
We are ready to state Lemma 14, which formalizes the above idea of splitting an instance at a vertex in into two subinstances and ; see Figure 4, where some edges are curved for better visualization.
Lemma 14.
For , it holds that
Proof.
Suppose that , that is, there is an outer -planar drawing of that satisfies properties P1 and P2. We assume that edges are drawn as straight-line segments in . By Lemma 13 there is a vertex for some such that both and have at most piercing edges. The vertices divide the circumference into the three arcs , where is the arc between vertices other than that does not pass through for each . Then, following the line through and , we can take a curve between and , inside the circle, such that it crosses exactly the piercing edges, does not pass through any crossing between piercing edges, and separates and the segment representing the edge (if it exists). We can take a curve between and similarly. Let and . We then define a linear order on the edges between and in such a way that orders those edges in ascending order of the distance between and the crossing with the curve . Similarly, is defined in such a way that orders the edges and in ascending order of the distance between to the crossing with the curve . If we cut the drawing along the curves as Figure 4, the drawing can be decomposed into three subdrawings , , and : is the drawing inside the region surrounded by arcs , , and ; is the drawing inside the region surrounded by arcs and ; is the drawing inside the region surrounded by arcs and . Since each crossing on the edges between and is contained in exactly one of , , , we have for each edge between and , and we have for each edge between and . As is a circular drawing of that satisfies P1 and P2, we have , and similarly, we have . Since each edge between and satisfies , we conclude that are consistent.
Suppose that there are consistent , , , , , , such that . Let and be circular drawings of and , respectively, that satisfy P1 and P2. Let and be the linear orders of and obtained from and by removing the vertices and for and , respectively. Then we obtain a cyclic order of by concatenating in this order, identifying the two occurrences of each of with each other. It is not difficult to see that, by combining , , and as in Figure 4, we obtain a drawing with linear order that satisfies P1 and P2. In other words, .
NaĂŻvely, the number of âs to consider is , which does not give an -algorithm. However, the following lemma assures that it is not so large.
Proof (sketch).
We show that, given the set of edges piercing , there are possibilities for that are separated by these piercing edges. Since is a union of components in the graph obtained from by deleting the piercing edges, it suffices to show that there are only components in this graph. The proof shares the same underlying idea with Lemma 8, but it is more involved as the maximum degree is no longer bounded. The upper bound can be obtained by considering that there are at most piercing edges of and the number of components in is at most .
With Lemma 15 and the fact that  [40], the number of combinations of arguments to consider is at most
To compute the value as in Lemma 14, we guess at most
possible combinations of . For each guess, checking the consistency takes time. Hence, the total running time to fill the table is . This completes the proof of Theorem 12.
5.2 NP-Hardness of Approximation
In this subsection, we show an inapproximability result for Outer -Planarity even for graphs that are almost trees, whereas trees can be drawn without any crossings.
Theorem 16.
For any fixed , there is no polynomial-time -approximation algorithm for Outer -Planarity unless , even for graphs with feedback vertex number .
Our proof is by reduction from Bandwidth on trees, which is -hard to approximate within any constant factor [21]. In other words, given a tree , there is no polynomial-time algorithm to distinguish between the cases and for any constant , unless .
Let be a tree, and let denote . We construct a graph from by adding a vertex and making it adjacent to all vertices of . Clearly, has feedback vertex number since is a tree.
Proof (sketch).
From a vertex order of with bandwidth at most , we construct a circular drawing of as . Each edge incident to has at most crossings in since these crossing edges lie between vertices that are âcloseâ to . For other edge with , it only crosses (1) edges incident to and (2) edges in . There are at most edges of (1) since the stretch of is at most , and at most edges of (2) since these edges lie between vertices that are âcloseâ to or . Hence, each edge has at most crossings in total.
Suppose that there is a polynomial-time -approximation algorithm for Outer -Planarity. Let be a tree, and let . By Lemma 18, would output an outer -planar drawing of . By Lemma 17, can be transformed into a linear order of with bandwidth at most . Thus, we can find a -approximate solution for Bandwidth in polynomial time, which is impossible under . This completes the proof of Theorem 16.
5.3 XNLP-Hardness
In the proof of Theorem 16, we reduced the gap-version of Bandwidth to Outer -Planarity. We exploited the gap to accommodate the crossings between edges in the original instance, which may increase the crossing number of each edge by . However, if we allow parallel edges, we can reduce from (the exact version of) Bandwidth by making the edges incident to so thick that we can ignore the increase in the crossing numbers. The following theorem is shown by emulating those parallel edges with rigid structures.
Proof (sketch).
As in Theorem 11, we give a parameterized logspace reduction from Bandwidth on trees. The idea of the reduction is similar to that used in Theorem 16. Instead of connecting with each , we replace each vertex with a clique path gadget that appears consecutively in any outer -planar drawing for some and connect with sufficiently many vertices in the gadget. Since there are many edges between and each gadget, two adjacent gadgets are placed closely in any outer -planar drawing.
6 Open Problems
We conclude with a number of problems that we have left open in this paper.
-
Is One-Sided -Planarity -hard?
-
We conjecture that Outer -Planarity is XALP-complete (see [12] for the definition).
-
Can we extend the algorithm for Two-Sided -Planarity to obtain an -algorithm for -layer -planarity parameterized by ?
-
Another way to extend -planarity is to consider min--planarity, which is also called weak -planarity [9, 15]. In a min--planar drawing, in every crossing, at least one of the two edges must have at most crossings. Can 2-layer min--planar graphs and outer min--planar graphs be recognized by -algorithms with respect to ?
-
Two-Sided -Planarity can be seen as a restricted version of Outer -Planarity for bipartite graphs where the vertices of the two sets of the bipartition must not interleave in the cyclic vertex order. This can be generalized as follows: For , can we efficiently recognize -partite graphs that admit a -planar straight-line drawing on the regular -gon? A related question has been investigated for fixed-order book embedding [1].
References
- [1] Akanksha Agrawal, Sergio Cabello, Michael Kaufmann, Saket Saurabh, Roohani Sharma, Yushi Uno, and Alexander Wolff. Eliminating crossings in ordered graphs. In Hans Bodlaender, editor, 19th Scand. Symp. Algorithm Theory (SWAT), volume 294 of LIPIcs, pages 1:1â1:19. Schloss Dagstuhl â Leibniz-Zentrum fĂźr Informatik, 2024. doi:10.4230/LIPIcs.SWAT.2024.1.
- [2] Oswin Aichholzer, Johannes Obenaus, Joachim Orthaber, Rosna Paul, Patrick Schnider, Raphael Steiner, Tim Taubner, and Birgit Vogtenhuber. Edge partitions of complete geometric graphs. In Xavier Goaoc and Michael Kerber, editors, 38th Int. Symp. Comput. Geom. (SoCG), volume 224 of LIPIcs, pages 6:1â6:16. Schloss Dagstuhl â Leibniz-Zentrum fĂźr Informatik, 2022. doi:10.4230/LIPIcs.SoCG.2022.6.
- [3] Patrizio Angelini, Giordano Da Lozzo, Henry FĂśrster, and Thomas Schneck. 2-Layer -planar graphs: Density, crossing lemma, relationships and pathwidth. The Computer Journal, 67(3):1005â1016, 2023. doi:10.1093/comjnl/bxad038.
- [4] Christopher Auer, Christian Bachmaier, Franz J. Brandenburg, Andreas GleiĂner, Kathrin Hanauer, Daniel Neuwirth, and Josef Reislhuber. Outer 1-planar graphs. Algorithmica, 74(4):1293â1320, 2016. doi:10.1007/S00453-015-0002-1.
- [5] Michael Bannister, Sergio Cabello, and David Eppstein. Parameterized complexity of 1-planarity. Journal of Graph Algorithms and Applications, 22(1):23â49, 2018. doi:10.7155/jgaa.00457.
- [6] Michael Bannister and David Eppstein. Crossing minimization for 1-page and 2-page drawings of graphs with bounded treewidth. Journal of Graph Algorithms and Applications, 22(4):577â606, 2018. doi:10.7155/jgaa.00479.
- [7] Michael Baur and Ulrik Brandes. Crossing reduction in circular layouts. In Juraj Hromkovic, Manfred Nagl, and Bernhard Westfechtel, editors, 30th Int. Workshop Graph-Theoretic Concepts Comput. Sci. (WG), volume 3353 of LNCS, pages 332â343. Springer, 2004. doi:10.1007/978-3-540-30559-0_28.
- [8] Sujoy Bhore, Robert Ganian, Fabrizio Montecchiani, and Martin NĂśllenburg. Parameterized algorithms for book embedding problems. Journal of Graph Algorithms and Applications, 24(4):603â620, 2020. doi:10.7155/jgaa.00526.
- [9] Carla Binucci, Aaron BĂźngener, Giuseppe Di Battista, Walter Didimo, Vida Dujmovic, Seok-Hee Hong, Michael Kaufmann, Giuseppe Liotta, Pat Morin, and Alessandra Tappini. Min--planar drawings of graphs. Journal of Graph Algorithms and Applications, 28(2):1â35, 2024. doi:10.7155/JGAA.V28I2.2925.
- [10] VaclĂĄv BlaĹžej, Boris Klemz, Felix Klesen, Marie Diana Sieper, Alexander Wolff, and Johannes Zink. Constrained and ordered level planarity parameterized by the number of levels. In Wolfgang Mulzer and Jeff M. Phillips, editors, 40th Annu. Sympos. Comput. Geom. (SoCGâ24), volume 293 of LIPIcs, pages 21:1â16. Schloss Dagstuhl â Leibniz-Zentrum fĂźr Informatik, 2024. doi:10.4230/LIPIcs.SoCG.2024.20.
- [11] Hans L. Bodlaender. Parameterized complexity of bandwidth of caterpillars and weighted path emulation. In Ĺukasz Kowalik, MichaĹ Pilipczuk, and PaweĹ RzÄ Ĺźewski, editors, Graph-Theoretic Concepts Comput. Sci. (WG), volume 12911 of LNCS, pages 15â27. Springer, 2021. doi:10.1007/978-3-030-86838-3_2.
- [12] Hans L. Bodlaender, Carla Groenland, Hugo Jacob, Marcin Pilipczuk, and MichaĹ Pilipczuk. On the complexity of problems on tree-structured graphs. In Holger Dell and Jesper Nederlof, editors, 17th Int. Symp. Paramet. & Exact Comput. (IPEC), volume 249 of LIPIcs, pages 6:1â6:17. Schloss Dagstuhl â Leibniz-Zentrum fĂźr Informatik, 2022. doi:10.4230/LIPIcs.IPEC.2022.6.
- [13] Hans L. Bodlaender, Carla Groenland, Jesper Nederlof, and CĂŠline M. F. Swennenhuis. Parameterized problems complete for nondeterministic FPT time and logarithmic space. In 62nd IEEE Ann. Symp. Foundat. Comput. Sci. (FOCS), pages 193â204, 2021. doi:10.1109/FOCS52979.2021.00027.
- [14] Sergio Cabello and Bojan Mohar. Adding one edge to planar graphs makes crossing number and 1-planarity hard. SIAM Journal on Computing, 42(5):1803â1829, 2013. doi:10.1137/120872310.
- [15] Rutger Campbell, Katie Clinch, Marc Distel, J. Pascal Gollin, Kevin Hendrey, Robert Hickingbotham, Tony Huynh, Freddie Illingworth, Youri Tamitegama, Jane Tan, and David R. Wood. Product structure of graph classes with bounded treewidth. Combinatorics, Probability and Computing, 33(3):351â376, 2024. doi:10.1017/S0963548323000457.
- [16] Steven Chaplick, Myroslav Kryven, Giuseppe Liotta, Andre LĂśffler, and Alexander Wolff. Beyond outerplanarity. In Fabrizio Frati and Kwan-Liu Ma, editors, 25th Int. Symp. Graph Drawing & Network Vis. (GD), volume 10692 of LNCS, pages 546â559. Springer, 2018. doi:10.1007/978-3-319-73915-1_42.
- [17] Marek Cygan, Fedor V. Fomin, Ĺukasz Kowalik, Daniel Lokshtanov, DĂĄniel Marx, Marcin Pilipczuk, MichaĹ Pilipczuk, and Saket Saurabh. Parameterized Algorithms. Springer, 2015. doi:10.1007/978-3-319-21275-3.
- [18] Walter Didimo, Giuseppe Liotta, and Fabrizio Montecchiani. A survey on graph drawing beyond planarity. ACM Comput. Surv., 52(1):4:1â4:37, 2019. doi:10.1145/3301281.
- [19] Alexander Dobler. A note on the complexity of one-sided crossing minimization of trees, 2023. arXiv. doi:10.48550/arXiv.2306.15339.
- [20] Rodney G. Downey and Michael R. Fellows. Fundamentals of Parameterized Complexity. Texts in Computer Science. Springer, 2013. doi:10.1007/978-1-4471-5559-1.
- [21] Chandan Dubey, Uriel Feige, and Walter Unger. Hardness results for approximating the bandwidth. Journal of Computer and System Sciences, 77(1):62â90, 2011. Celebrating Karpâs Kyoto Prize. doi:10.1016/j.jcss.2010.06.006.
- [22] Vida DujmoviÄ, Seok-Hee Hong, Michael Kaufmann, JĂĄnos Pach, and Henry FĂśrster. Beyond-planar graphs: Models, structures and geometric representations (Dagstuhl seminar 24062). Dagstuhl Reports, 14(2):71â94, 2024. doi:10.4230/DagRep.14.2.71.
- [23] Michael Elberfeld, Christoph Stockhusen, and Till Tantau. On the space and circuit complexity of parameterized problems: Classes and completeness. Algorithmica, 71(3):661â701, 2015. doi:10.1007/s00453-014-9944-y.
- [24] Oksana Firman, Grzegorz Gutowski, Myroslav Kryven, Yuto Okada, and Alexander Wolff. Bounding the treewidth of outer -planar graphs via triangulations. In Stefan Felsner and Karsten Klein, editors, 32nd Int. Symp. Graph Drawing & Network Vis. (GD), volume 320 of LIPIcs, pages 14:1â14:17. Schloss Dagstuhl â Leibniz-Zentrum fĂźr Informatik, 2024. doi:10.4230/LIPIcs.GD.2024.14.
- [25] JĂśrg Flum and Martin Grohe. Parameterized Complexity Theory. Texts in Theoretical Computer Science. An EATCS Series. Springer, 2006. doi:10.1007/3-540-29953-X.
- [26] Michael R. Garey and David S. Johnson. Computers and Intractability: A Guide to the Theory of NP-Completeness. W. H. Freeman, 1979.
- [27] Michael R. Garey and David S. Johnson. Crossing number is NP-complete. SIAM Journal on Algebraic Discrete Methods, 4(3):312â316, 1983. doi:10.1137/0604033.
- [28] Alexander Grigoriev and Hans L. Bodlaender. Algorithms for graphs embeddable with few crossings per edge. Algorithmica, 49(1):1â11, 2007. doi:10.1007/S00453-007-0010-X.
- [29] Martin Grohe. Computing crossing numbers in quadratic time. Journal of Computer and System Sciences, 68(2):285â302, 2004. doi:10.1016/j.jcss.2003.07.008.
- [30] Seok-Hee Hong, Peter Eades, Naoki Katoh, Giuseppe Liotta, Pascal Schweitzer, and Yusuke Suzuki. A linear-time algorithm for testing outer-1-planarity. Algorithmica, 72(4):1033â1054, 2015. doi:10.1007/S00453-014-9890-8.
- [31] Seok-Hee Hong and Hiroshi Nagamochi. A linear-time algorithm for testing full outer-2-planarity. Discrete Applied Mathematics, 255:234â257, 2019. doi:10.1016/j.dam.2018.08.018.
- [32] Paul C. Kainen. The book thickness of a graph. II. In 20th Southeastern Conf. Combin., Graph Theory, & Comput. (Boca Raton, FL, 1989), volume 71, pages 127â132, 1990.
- [33] Ken-ichi Kawarabayashi and Bruce Reed. Computing crossing number in linear time. In 39th Ann. ACM Symp. Theory Comput. (STOC), pages 382â390, 2007. doi:10.1145/1250790.1250848.
- [34] Yasuaki Kobayashi, Hiromu Ohtsuka, and Hisao Tamaki. An improved fixed-parameter algorithm for one-page crossing minimization. In Daniel Lokshtanov and Naomi Nishimura, editors, 12th Int. Symp. Paramet. & Exact Comput. (IPEC), volume 89 of LIPIcs, pages 25:1â25:12. Schloss Dagstuhl â Leibniz-Zentrum fĂźr Informatik, 2017. doi:10.4230/LIPICS.IPEC.2017.25.
- [35] Yasuaki Kobayashi and Hisao Tamaki. A fast and simple subexponential fixed parameter algorithm for one-sided crossing minimization. Algorithmica, 72:778â790, 2015. doi:10.1007/s00453-014-9872-x.
- [36] Yasuaki Kobayashi and Hisao Tamaki. A faster fixed parameter algorithm for two-layer crossing minimization. Information Processing Letters, 116(9):547â549, 2016. doi:10.1016/j.ipl.2016.04.012.
- [37] Yunlong Liu, Jie Chen, and Jingui Huang. Parameterized algorithms for fixed-order book drawing with bounded number of crossings per edge. In Weili Wu and Zhongnan Zhang, editors, Proc. 14th Int. Conf. Combin. Optim. Appl. (COCOA), volume 12577 of LNCS, pages 562â576. Springer, 2020. doi:10.1007/978-3-030-64843-5_38.
- [38] Yunlong Liu, Jie Chen, Jingui Huang, and Jianxin Wang. On parameterized algorithms for fixed-order book thickness with respect to the pathwidth of the vertex ordering. Theor. Comput. Sci., 873:16â24, 2021. doi:10.1016/j.tcs.2021.04.021.
- [39] Xavier MuĂąoz, Walter Unger, and Imrich Vrtâo. One sided crossing minimization is NP-hard for sparse graphs. In Petra Mutzel, Michael JĂźnger, and Sebastian Leipert, editors, 9th Int. Symp. Graph Drawing (GD), volume 2265 of LNCS, pages 115â123. Springer, 2001. doi:10.1007/3-540-45848-4_10.
- [40] JĂĄnos Pach and GĂŠza TĂłth. Graphs drawn with few crossings per edge. Combinatorica, 17(3):427â439, 1997. doi:10.1007/BF01215922.
- [41] MichaĹ Pilipczuk and Marcin Wrochna. On space efficiency of algorithms working on structural decompositions of graphs. ACM Trans. Comput. Theory, 9(4), 2018. doi:10.1145/3154856.
- [42] Helen C. Purchase, Christopher Pilcher, and Beryl Plimmer. Graph drawing aesthetics â created by users, not algorithms. IEEE Transactions on Visualization and Computer Graphics, 18(1):81â92, 2012. doi:10.1109/TVCG.2010.269.
- [43] James B. Saxe. Dynamic-programming algorithms for recognizing small-bandwidth graphs in polynomial time. SIAM J. Algebraic Discret. Methods, 1(4):363â369, 1980. doi:10.1137/0601042.
- [44] Marcus Schaefer. The graph crossing number and its variants: A survey. Electronic Journal of Combinatorics, DS21, 2024. doi:10.37236/2713.
- [45] Farhad Shahrokhi, Ondrej SĂ˝kora, LĂĄszló A. SzĂŠkely, and Imrich Vrto. On bipartite drawings and the linear arrangement problem. SIAM Journal on Computing, 30(6):1773â1789, 2001. doi:10.1137/S0097539797331671.
- [46] Kozo Sugiyama, Shojiro Tagawa, and Mitsuhiko Toda. Methods for visual understanding of hierarchical system structures. IEEE Trans. Syst. Man Cybern., 11(2):109â125, 1981. doi:10.1109/TSMC.1981.4308636.
- [47] John C. Urschel and Jake Wellens. Testing gap -planarity is NP-complete. Information Processing Letters, 169:106083, 2021. doi:10.1016/j.ipl.2020.106083.
- [48] Meirav Zehavi. Parameterized analysis and crossing minimization problems. Computer Science Review, 45:100490, 2022. doi:10.1016/j.cosrev.2022.100490.