A Unified FPT Framework for Crossing Number Problems
Abstract
The basic (and traditional) crossing number problem is to determine the minimum number of crossings in a topological drawing of an input graph in the plane. We develop a unified framework that smoothly captures many generalized crossing number problems, and that yields fixed-parameter tractable (FPT) algorithms for them not only in the plane but also on surfaces.
Our framework takes the following form. We fix a surface , an integer , and a map from the set of topological drawings of graphs in to , satisfying some natural monotonicity conditions, but essentially describing the allowed drawings and how we want to count the crossings in them. Then deciding whether an input graph has an allowed drawing on with can be done in time quadratic in the size of (and exponential in other parameters). More generally, we may take as input an edge-colored graph, and distinguish crossings by the colors of the involved edges; and we may allow to perform a bounded number of edge removals and vertex splits to before drawing it. The proof is a reduction to the embeddability of a graph on a two-dimensional simplicial complex.
This framework implies, in a unified way, quadratic FPT algorithms for many topological crossing number variants established in the graph drawing community. Some of these variants already had previously published FPT algorithms, mostly relying on Courcelle’s metatheorem, but for many of those, we obtain an algorithm with a better runtime. Moreover, our framework extends, at no cost, to these crossing number variants in any fixed surface.
Keywords and phrases:
computational geometry, fixed-parameter tractability, graph drawing, graph embedding, crossing number, two-dimensional simplicial complex, surfaceFunding:
Petr Hliněný: Part of this work was done while this author was invited professor at LIGM, Marne-la-Vallée, supported by Paris-Est Sup.Copyright and License:
2012 ACM Subject Classification:
Theory of computation Computational geometry ; Theory of computation Fixed parameter tractability ; Mathematics of computing Graph theoryEditors:
Anne Benoit, Haim Kaplan, Sebastian Wild, and Grzegorz HermanSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
The (traditional) crossing number problem, minimizing the number of pairwise edge crossings in topological drawings of an input graph in the plane, is a long-standing and central task in graph drawing and visualization that comes in many established flavors; see the extensive dynamic survey by Schaefer [45]. In this paper, we give a framework that smoothly captures many of the variants of crossing numbers, and in a unified way provide efficient algorithms for them when parameterized by the solution value (i.e., the respective crossing number).
Many flavors of crossing numbers.
There is currently a surge of crossing number variants. A motivation for such variations is that, in practical drawing applications, not every crossing or crossing pattern of edges may be “equal” to other ones. One may, e.g., want to avoid mutual crossings of important edges. Or, to allow crossings only within specific parts of a graph, and not between unrelated parts. Or, to exclude crossings of edges of some type. Or, to allow only certain “comprehensible” crossing patterns in order to help visualize the graph. This is the main focus of the recent research direction called “beyond planarity” [15].
Paraphrasing Schaefer [45, Chapter 2], a crossing number variant minimizes, over all allowed drawings of an input graph in some specified host surface, an objective function related to the crossings in . The allowed drawings may, e.g., restrict the crossings on one edge or in a local pattern of crossing edges, or prescribe or forbid certain local properties of the drawing (also depending on types or colors of edges). The host surface is usually the plane, but can be any fixed surface, orientable or not. The objective function is often the number of crossings between edges, but other possibilities include, e.g., the number of edges involved in crossings, or the number of pairs of edges that cross an odd number of times.
Existing algorithms for the traditional version.
One usually considers the decision version of the (traditional) crossing number problem: Given an input graph of size , and an integer , does have a crossing number at most ? This problem is already -hard in the plane, as proved by Garey and Johnson in 1983 [18], and even in very specific cases [24, 26, 8]. Moreover, the problem is -hard [7], and the best known polynomial-time approximation algorithm [10] gives an approximation factor that is subpolynomial in only for bounded-degree graphs.
Thus, the main current focus is on algorithms that are fixed-parameter tractable () in – the runtime has the form , where is a computable function of the parameter . For fixed , Grohe [20] has described an -time algorithm, and Kawarabayashi and Reed [32] have announced an -time algorithm. Both rely on Courcelle’s metatheorem [14], which automatically entails a huge dependence in the parameter .
Two recent approaches avoid resorting to Courcelle’s theorem. First, Colin de Verdière, Magnard, and Mohar [13] have studied the problem of embedding a graph in a two-dimensional simplicial complex (2-complex for short), a topological space obtained from a surface by adding isolated edges and identifying vertices. Among other motivations for this problem, they observe [13, Introduction] that the crossing number problem reduces to the embeddability of the input graph in a certain 2-complex depending only on . Then Colin de Verdière and Magnard [12] have shown that the embeddability of a graph of size in a 2-complex of size can be tested in time. Hence, this results in a -time algorithm for the crossing number problem, which, moreover, extends to any fixed surface.
Second, even more recently, Lokshtanov, Panolan, Saurabh, Sharma, Xue, and Zehavi [35] have given a -time algorithm for the traditional crossing number problem in the plane, by a reduction to bounded treewidth and dynamic programming, all in time linear in .
Existing algorithms for other variants.
For other flavors of crossing numbers, which are (typically) also -hard, the literature on FPT algorithms is scarce; besides Pelsmajer, Schaefer, and Štefankovič [41] giving algorithms for the odd and pair crossing numbers, we are only aware of two very recent papers, which bring a general approach to multiple crossing number flavors and which we now detail. (The various flavors of crossing numbers are defined in Section 5.)
First, Münch and Rutter [37], extending Grohe’s approach [20], provide a framework for quadratic algorithms for the crossing number of several types of beyond-planar drawings of graphs in the plane, characterized by forbidden combinatorial crossing patterns. This includes the crossing number of -planar, -quasi-planar, min--planar, fan-crossing, and fan-crossing free drawings of a graph for any constant .
Second, Hamm, Klute, and Parada [22], in a very recent preprint, have announced a generalization of the previous framework [37], also handling forbidden topological crossing patterns in drawing types in the plane and, more importantly, bringing the possibility of handling predrawn parts of the input graph (as already known for the traditional crossing number [21]). The dependence in the size of the input graph is an unspecified polynomial.
The above results all rely on Courcelle’s theorem. Apart from that, we are only aware of sporadic results for isolated variants. Kawarabayashi and Reed [32] and Jansen, Lokshtanov, and Saurabh [30] both claim, without details, a linear algorithm to compute the skewness of a graph, and Nöllenburg et al. [39] give a non-uniform algorithm for the splitting number in surfaces. All mentioned papers except Nöllenburg et al. are restricted to the plane.
Our contributions.
Our general framework takes the following form. We fix a surface and an objective function from the set of (possibly edge-colored) topological drawings of graphs on to the set ; the allowed drawings are those that satisfy . The map has to satisfy some natural monotonicity conditions, defined later. Given an integer , we prove that deciding whether an input graph has a drawing on with can be done in quadratic time in the size of , and exponential in a polynomial of the other parameters, namely the genus of , the maximum size of a “fully crossing” drawing satisfying , and the integer . This remains true if one allows a bounded number of (possibly color-restricted) edge removals and vertex splits to before drawing it; these numbers are also parameters. The proof is a reduction to the already mentioned problem of deciding the embeddability of a graph on a 2-complex [12]; while the general strategy is intuitive, many subtle technical details need to be overcome to make it all work.
We deduce algorithms with runtime quadratic in the size of the input graph, and exponential in a polynomial of the other parameters, for many established crossing number variants; we now survey some of them. First, we can restrict ourselves to many established drawing styles, such as -planar, -quasi-planar, min--planar, fan-crossing, weakly and strongly fan-planar, -gap, and fixed-rotation drawings ( being an additional fixed parameter). For the -gap and fixed rotation cases, no algorithms were known. Second, we may assign colors to the edges of the input graph and count the crossings differently depending on the colors of the edges involved, leading to the first algorithms on the joint crossing number on surfaces and its generalizations. Third, assuming suitable additional properties, we can handle problems that do not count the crossings, but rather the number of edges, or pairs of edges, involved in crossings, such as the edge, pair, and odd crossing numbers (no algorithm was known for the edge crossing number). And fourth, since we allow for prior edge removals and vertex splits, our framework encompasses, e.g., the skewness, for which algorithms were only sketched [32, 30] in the plane, and the splitting number, which was only known to admit a nonuniform algorithm [39].
Last but not least, all these four aspects that define flavors of crossing numbers can be combined arbitrarily, and our main results are valid not only in the plane, but for arbitrary surfaces. For most flavors of crossing number, the arguments are direct, though they really differ according to the flavor; they essentially boil down to checking some technical conditions (see Definition 3.1), and to giving an algorithm (not necessarily polynomial) to check a given drawing of bounded size and to count its crossings (see Theorem 3.2). However, for a couple of crossing number flavors (in particular, when fixing the rotation scheme), additional ingredients are needed.
Comparison with the state of the art.
Our main contribution is a convenient, versatile, and unified framework capturing a very general class of crossing number variants while giving algorithms. In particular, as listed above, we get new results for several established variants and their generalizations (to surfaces, or by combining the features of multiple variants). It is conceivable that some of the variants newly covered by our framework could be proved using other techniques, perhaps the (very powerful) metatheorem of Courcelle, as already used in [20, 21, 37, 22]. However, such developments are extremely delicate even in isolated variants and lead to hard-to-describe algorithms. Indeed, first, checking a given drawing and counting its crossings must be formalized in the MSO2 logic of graphs, which usually needs heavy tricks tailored to the specific case; second, there remains the specific and often highly nontrivial treewidth reduction step to be done. So far, such approaches have been successful only in the case of the plane.
Moreover, all approaches using Courcelle’s theorem inherently come with a high computational cost. Indeed, they result in algorithms with a huge multi-level exponential dependence in the parameter ; for instance, it is an exponential tower of height at least four in the case of [20] and three in the case of [32], see the discussion in [35]. In contrast, our algorithms are singly exponential in a polynomial in . Also, while Courcelle’s theorem itself runs in linear time in the size of the input graph, the necessary treewidth reduction step requires quadratic time, if not more, in the known approaches for the non-traditional crossing numbers. Our algorithms have a quadratic dependence in , and the only bottleneck to a linear-time dependence is the quadratic runtime of the current best embeddability algorithm [12].
The frameworks used in the two very recent works mentioned above [37, 22], which both use treewidth reduction and Courcelle’s theorem, can handle some of the drawing styles that we encompass, but different counting functions, edge removals and vertex splits, and nonplanar surfaces are out of their reach. However, it should not be difficult to extend their framework to handle edge-colored graphs, thanks to the MSO2 logic being able to handle arbitrary sets of edges. On the other hand, the recent breakthrough of Lokshtanov et al. [35] for the traditional crossing number problem may fuel hope for more -time algorithms, but tweaking all ingredients of that highly technical paper seems hard, even for isolated crossing number variants, and moreover this approach is inapplicable to surfaces other than the plane, due to the use of several inherently planar techniques (3-connectivity arguments and dependence on [30]).
Organization of the paper.
2 Preliminaries
Graphs and surfaces.
In this paper, graphs are finite and undirected, but not necessarily simple unless specifically noted. The size of a graph is the number of vertices plus the number of edges of . A vertex split of a graph at vertex creates a new vertex and replaces some of the edges incident to by making them incident to instead of .
We follow [2, 36] for surface topology. A surface is a topological space obtained from finitely many disjoint solid, two-dimensional triangles by identifying some of their edges in pairs. Surfaces are not necessarily connected. The boundary of is the closure of the union of the unidentified edges. The (Euler) genus of a connected surface is twice its number of “handles”, if it is orientable, and is its number of “crosscaps”, otherwise. The topological size of equals , where is the number of connected components of , is the sum of the (Euler) genera of its connected components, and is the number of boundary components. The plane is not a surface according to our definition, but in this paper it can always be substituted with a disk, which is (homeomorphic to) a surface. A self-homeomorphism of is just a homeomorphism from to .
(Topological) drawings of graphs.
A curve in a topological space is a continuous map from the closed interval into . The relative interior of is the image, under , of the open interval . In a drawing of a graph in a topological space , vertices are represented by points of and edges by curves in such that the endpoints and of a curve are the images of the end vertices of the corresponding edge. Moreover, we assume that distinct vertices are mapped to distinct points and that the relative interiors of the edges avoid the images of the vertices. Given a point , its multiplicity in is the number of pairs such that , where is a curve representing an edge of in , and . An intersection point (shortly an intersection) of is a point with multiplicity at least two. We only consider drawings with finitely many intersection points.
When considering a drawing of a graph on a surface , we always implicitly assume that has no isolated vertex and that the image of avoids the boundary of ; these conditions are actually benign in a graph drawing context. In , each edge is subdivided into (finitely many) pieces by the intersection points along . A point of multiplicity two corresponds to a crossing if no local perturbation of the curves can remove this intersection, or to a tangency, otherwise. is normal [44] if every intersection point has multiplicity two and is a crossing (not a tangency). Moreover, is simple if it is normal, no edge self-crosses, no two adjacent edges cross, and no two edges cross more than once.111Note that many authors do not consider a drawing simple if contains two parallel edges (even uncrossed), as two parallel edges necessarily intersect at their two endpoints. Likewise, uncrossed loops are usually not allowed in simple drawings. We do not make these additional restrictions here for technical reasons connected to Definition 3.1; see also Proposition 5.2.
The (traditional) crossing number of a graph in a surface is the least number of crossings over all normal drawings of in . Many variations exist [45], see Section 5.
We need to represent drawings of graphs on a surface combinatorially, up to self-homeomorphisms of . Cellular embeddings can be represented by combinatorial maps [16], but we need to allow crossings, and moreover faces need not be disks. We can achieve this, ultimately relying on combinatorial maps. Details can be found in the full version.
2-complexes.
In this paper, a -complex (or two-dimensional simplicial complex) is a topological space obtained from a simple graph (without loops or multiple edges) by attaching solid, two-dimensional triangles to some of its cycles of length three; see Figure 1.222Our definition of 2-complex slightly departs from the standard one; it is the same as a geometric simplicial complex of dimension at most two, realized in some ambient space of dimension large enough. The simplices of are its vertices, edges, and triangles. We can easily represent 2-complexes algorithmically, by storing the vertices, edges, and triangles, and the incidences between them. In general, many such representations correspond to the same topological space, and the choice of the representation only impacts the complexity analysis of our algorithms. The class of 2-complexes is quite general; it contains all graphs, all surfaces, and any space obtained from a surface by identifying finitely many finite subsets of points and by adding finitely many edges between any two points.
An isolated edge of a 2-complex is an edge incident to no triangle. The surface part of is the union of all its triangles, together with their incident vertices and edges. A singular point of is a point that has no open neighborhood homeomorphic to an open disk, a closed half-disk, or an open segment.
Our above definition of drawings in topological spaces applies to drawings in 2-complexes. In particular, vertices of may lie anywhere on , and edges of as curves may traverse several vertices, edges, and triangles of . An embedding of into is a drawing without any intersection point.
Embeddability of graphs on 2-complexes.
The embeddability problem takes as input a graph and a 2-complex , and the task is to decide whether has an embedding in . This problem is fixed-parameter tractable in the size of the input 2-complex:
Theorem 2.1 (Colin de Verdière and Magnard [12, arXiv version, Theorem 1.1]333The conference proceedings version of [12] gives a slightly worse bound on the running time, cubic in . The theorems that we state take into account the improvement in the latest arXiv version. ).
One can solve the embeddability problem (of graphs in 2-complexes) in time, where is the number of simplices of the input -complex and is the size of the input graph.
3 The framework: description and results
We consider colored graphs, in which each edge is labeled with a positive integer. A colored drawing in a surface is a drawing of a colored graph in in which each edge of the drawing inherits the color of the corresponding edge of . Throughout this paper, let be a surface, and let be the set of colored drawings of graphs on .
The general formulation of our result is based on the following definition, in which the function of a drawing should be thought of as a generalization of the (traditional) crossing number – “counting the crossings”, or indicating (with value ) that “a drawing is invalid”. More precisely, is a quality function that does not increase upon changes that add no new crossings, and bounds the number of pieces into which edges are split in valid drawings:
Definition 3.1 (Crossing-counting pair).
Let be a function, and let be a non-decreasing function. We say that is a crossing-counting pair if:
-
1.
for any , we have whenever results from by one of the following operations: (a) the removal of a vertex or an edge; (b) the addition of a vertex whose image is disjoint from the image of (and from the boundary of ); (c) the addition of an edge, of an arbitrary color, connecting two vertices in , and otherwise disjoint from the image of (and from the boundary of ); (d) a self-homeomorphism of ;
-
2.
for any drawing such that each edge carries at least one intersection point in (either a self-intersection or an intersection with another edge, but common endpoints do not count) and , the number of pieces of is at most ;
-
3.
one can compute in time.
Note that Definition 3.1, Item 1, implies that is not affected by any of the operations (b), (c), and (d), since such operations can be reversed by an operation of type (a) or (d).
As an important special case, if is the number of crossings in , or is if is not a normal drawing, and , then satisfies the conditions of Definition 3.1 (indeed, note that each piece of an edge of is incident to at least one crossing point, and each crossing point involves at most four pieces). This motivates the term “crossing-counting pair”.
We now introduce the following problem (the reader may wish to focus on the simplified case of , which implies ):
-Crossing Number (for the class of -colored drawings, in surface )
Input: A colored graph with colors in for some integer , with at most vertices and edges, a non-negative integer , and non-negative integers and .
Question: Is there a colored drawing in , with , of a colored graph , such that is obtained from by performing at most successive vertex splits and by removing, for , at most edges of color ?
Our main result is that, assuming is computable, the -Crossing Number problem is fixed-parameter tractable in the topology of the surface, the number of colors, the number of allowed vertex splits and edge removals, and the value of :
Theorem 3.2.
Let be a surface of topological size , let be the set of colored drawings of graphs in , and let be a crossing-counting pair.
Let be a non-decreasing function such that, given a representation of size of a (colored) drawing , one can compute in time .
Then the -Crossing Number problem, on input instance , can be solved in time , where is the size of and .
In all our applications, the factor in the runtime will be at most exponential in the parameters, and can thus be ignored. Moreover, for positive instances, we can compute an actual representation of the corresponding drawing; see the full version.
4 Sketch of proof of Theorem 3.2
Due to space restrictions, we only informally describe the reduction here; details are in the full version. Recall that denotes the set of drawings of graphs on the surface . Let be a crossing-counting pair for drawings in .
The proof of Theorem 3.2 is a parameterized Turing reduction to the embeddability problem on 2-complexes. Consider an instance of the -Crossing Number problem. We define an uncolored graph and a set of 2-complexes such that our -Crossing Number instance is positive if and only if embeds in at least one of the 2-complexes in (see a sketch in Figure 2). The set is built by branching over a (small enough) set of properties for the hypothetical drawing of a graph (obtained from by edge removals and vertex splits as in the problem definition) or, equivalently, by guessing some properties of that drawing.
Assume that has a colored drawing in with . Let be the subdrawing of the subgraph of made of the edges that are involved in at least one intersection in ; the definition of a crossing-counting pair implies that , so is made of at most pieces. Viewing as an abstract drawing, without its correspondence with the vertices and edges of , this implies that we can enumerate all such colored drawings up to self-homeomorphism of in time . In other words, we can guess the appropriate colored drawing .
Subsequently, we cut along the relative interior of the edges of (Figure 2(b); details are in the full version) and add isolated edges connecting the endpoints of the edges in (Figure 2(c)), obtaining a 2-complex in which embeds. If is allowed to result from by edge removals and vertex splits, we modify the 2-complex appropriately, by guessing where the endpoints of the additional isolated edges must be inserted (Figure 2(d)) and which points of the 2-complex must be identified back (doing an inverse of the vertex split, Figure 2(e)). Note that these guessed points may be picked from the surface part of , as well as among the vertices of the edges of in . We obtain a 2-complex in which embeds. Each isolated edge of naturally bears the color of the edge of it carries.
It remains to ensure that, conversely, the embeddability of into one of the resulting 2-complexes implies a positive -Crossing Number instance. For this purpose, we do the following. First (Figure 3(b)), as a minor technical detail, we apply a preprocessing step – attaching a 4-clique to each vertex of , to ensure that all vertices of have degree at least three. Let be this new graph. Second, and more importantly (Figure 2(f) and Figure 3), we need to encode the colors of the edges. We turn each edge of and each isolated edge of the -complex (in which embeds, see above) into a necklace encoding the color, such that a necklace of a certain encoding type in the resulting graph can only use a necklace of the same type in the resulting 2-complex. This results in an (uncolored) graph embedded in a 2-complex . Finally, the set of 2-complexes in which we try to embed is made of all 2-complexes , over all possible choices (guesses) described above.
In more detail, we define a necklace of thickness and beads of size to be the graph obtained from a path of length three by (1) replacing each edge with parallel edges, and (2) attaching loops to each of the two internal vertices of the path (Figure 3(c)). The intuition is that, by the minimum-degree condition on , the internal vertices of necklaces of our 2-complex can essentially only be used by internal vertices of the necklaces of . So, if edges of color are encoded with necklaces of, say, thickness and beads of size , we effectively prevent graph necklaces from using 2-complex necklaces of different types. (We will actually use slightly refined formulas for the thickness and the size of the beads.)
5 Applications: FPT algorithms for diverse crossing number variants
In this section, we demonstrate the wide applicability of our framework to crossing number problems. First, as a toy example, we reprove that we can compute the traditional crossing number in quadratic FPT time on surfaces [12]:
Proposition 5.1.
Let be an integer, and a surface with topological size . Deciding whether an input graph of size has crossing number at most in can be solved in time .
Proof.
We apply our framework with a single color (), no vertex splits or edge removals (), and in the case where is the set of drawings of graphs on . For any drawing , let be the number of crossings in , or if is not a normal drawing. Moreover, let . Since only if is normal, is a crossing-counting pair. Theorem 3.2 implies the result.
We now turn to the promised applications. We survey, in order, specific drawing styles, colored crossing number problems, various counting methods, and problems where prior edge removals and vertex splits are allowed. Throughout this section, again, let be a surface and the set of colored drawings of graphs on . In our reductions to the -Crossing Number problem, we always set except in Section 5.4. In nearly all cases, only normal drawings of graphs are considered. Note that in all cases, for positive instances, we can compute a corresponding drawing; see the full version. Statements marked with * are proved in the full version.
5.1 Variations on the traditional crossing number
-planar drawings.
Introduced by Pach and Tóth [40], -planar drawings (for ) are normal drawings in the plane such that every edge is involved in at most crossings. For any drawing , let be the number of crossings in , if is a normal -planar drawing, and otherwise. The -planar crossing number is then the smallest value of over all normal drawings of (which may equal ). Already for , deciding the existence of a -planar drawing is -hard even for very restricted inputs [19, 8]. This definition naturally extends to an arbitrary surface , which we call the -surface crossing number in .
-quasi-planar and min--planar drawings.
There are similar concepts of -quasi-planar [1] (no edges pairwise cross) and of min--planar [6] (for every two edges with a common crossing, one carries at most crossings) normal drawings in the plane, which give rise to the corresponding crossing number flavors in the plane, and we may likewise generalize them to the -quasi-surface and min--surface crossing numbers in a surface .
Many authors restrict the problems to simple graphs and require the admissible drawings to be simple; this restriction defines the simple-drawing -surface (-quasi-surface, min--surface) crossing number(s). These simple-drawing variants can be very different from the non-simple ones, see, e.g., [44, Chapter 7] and [27], but we will show that they also smoothly fit into our framework.
-gap drawings.
Another known concept is that of -gap crossing number [3, 46], minimizing the number of crossings over -gap drawings in the plane (Figure 4), namely, normal drawings of a graph admitting a mapping from each crossing in to one of the two involved edges such that at most crossings are mapped to each edge of . This problem is -hard for [3]. Again, the -gap crossing number is naturally generalized to any surface .
Applying our framework.
Given , deciding whether a graph has -planar (-quasi-planar, or min--planar) crossing number at most can be done in quadratic -time [37] using Courcelle’s theorem. The parameterized complexity of these three problems in other surfaces, and of the -gap crossing problem altogether, has not been studied prior to us. Even in the known planar cases, we largely improve the dependence in in the runtime:
Proposition 5.2.
Let and be integers, a surface with topological size , and let “-surface”, “-quasi-surface”, “min--surface”, “-gap”. Deciding whether an input graph of size has -crossing number at most in can be solved in time . The same conclusion holds for the simple-drawing -crossing number of a simple input graph .
Proof.
The proof relies on Theorem 3.2 with a single color () and no splits or removals (). For each , we must give an appropriate crossing-counting pair such that is efficiently computable. Let map a drawing to if it is not a normal drawing or if it violates the property , and to the number of crossings of otherwise. In particular, if is greater than the number of crossings in , then always satisfies .
Given a drawing , one may in time polynomial in the size of a representation of verify that is a normal drawing satisfying , and so compute . This is an easy routine in all cases of except when ‘-gap’; in the latter case we additionally employ a standard maximum flow algorithm to decide the existence of a mapping from the crossings to their incident edges respecting “capacities” of edges to accept at most crossings each.
Since we only consider normal drawings, satisfies the assumption of Definition 3.1. Likewise, it is easy to see that is non-increasing under the operations listed in Definition 3.1. Hence, our conclusion follows by an application of Theorem 3.2 to and the graph .
Next, we consider the simple-drawing -crossing number, assuming is simple. We now, additionally, set if is a non-simple drawing. For this case, it is important that our definition of a simple drawing does not immediately exclude drawings of non-simple graphs; while this is irrelevant for our simple graph , fulfillment of Definition 3.1, Item 1(c), depends on this technical twist. The rest of the argument is identical.
Fan-crossing and fan-planar drawings.
A normal drawing is fan-crossing [31] if all edges crossing the same edge are incident to a common vertex. One can restrict this notion to strongly or weakly fan-planar drawings, which not necessarily lead to the same crossing number problems, see Figure 5 and [9]. The fan-crossing, strongly fan-planar, and weakly fan-planar crossing numbers are the minimum number of crossings over all strongly fan-planar, weakly fan-planar, and fan-crossing drawings in the plane, respectively.
algorithms, all using Courcelle’s theorem, exist for the fan-crossing crossing number, by Münch and Rutter [37], and for the weakly fan-planar crossing number, by Hamm, Klute, and Parada [22], and it seems that with further adjustments they ([22]) could also handle the strongly fan-planar version. We solve all three variants, again with a better runtime. For the strongly fan-planar version, we use the fact that our framework allows for surfaces with boundary, and thus can easily capture the “infinite face” of the drawing; indeed, strong fan-planarity is invariant under self-homeomorphisms of the plane, but not of the sphere (e.g., the drawings in Figure 5(a) and (b) are homeomorphic when seen on the sphere).
Proposition 5.3.
* Let be an integer. The problem to decide whether an input graph of size has strongly fan-planar, weakly fan-planar, or fan-crossing crossing number at most in the plane can be solved in time .
The proof is very similar to that of Proposition 5.2 and extends to arbitrary surfaces.
Drawings that may not be normal.
To illustrate the applicability of our framework to non-normal drawings, we introduce the following example. For an integer , we define the -intersecting crossing number of a graph to be the minimum value such that there is a drawing of with at most intersection points in which the multiplicity of every intersection point is at most . For every graph , the traditional crossing number of is at most times its -intersecting crossing number, and this bound can be tight. We prove:
Proposition 5.4.
* Let and be integers, a surface with topological size . The problem to decide whether an input graph of size has -intersecting crossing number at most in can be solved in time .
We refer to Section 5.3 for more examples of different methods for counting crossings.
5.2 Crossing problems with colored edges
We now turn our attention to problems in which the colors of intersecting edges play a role.
Joint crossing number and generalizations.
In the joint crossing number problem [38], the goal is to embed two input graphs simultaneously on the same surface while minimizing the number of crossings between them. It is -hard for any fixed Euler genus [28, 25], and the complexity parameterized by the solution value has not been studied prior to our work. We actually solve the following new problem generalizing the joint crossing number:
Color-Constrained Crossing Problem (in surface )
Input: A colored graph with colors in , and a symmetric matrix of size with nonnegative integer values.
Question: Is there a normal colored drawing of in such that, for each , the number of crossings involving two edges, one colored and the other , is at most ?
Proposition 5.5.
* Let be a surface of with topological size . The Color-Constrained Crossing Problem in of the input graph of size and matrix can be solved in time , where .
Proposition 5.5 solves the joint crossing number in simply by giving the edges of one graph color red and the edges of the other color blue, and allowing only red–blue crossings.
Our approach can also be applied (see the full version) to the homeomorphic joint crossing number [28] of two graphs and , in which and are given as cellularly embedded in , and the task is to minimize the number of crossings of under an additional condition that the subdrawings of and are homeomorphic to the given embeddings.
Fixing the rotation system.
More generally, a natural restriction on crossing number problems is to fix the clockwise cyclic order of edges around each vertex (the rotation system). The traditional crossing number with a fixed rotation system remains -hard [43], and its parameterized complexity has not been considered so far. We solve the variant of the Color-Constrained Crossing Problem where the input also prescribes the cyclic permutation of the edges around each vertex of , and give a solution in the plane. (We remark that the problem naturally generalizes to orientable surfaces, but the proof is more complicated then, so in this version we only formulate it in the plane.)
Theorem 5.6.
* The Color-Constrained Crossing Problem with Rotation System (in the plane) of the input connected graph of size , matrix , and rotation system can be solved in time , where .
The proof reduces to the Color-Constrained Crossing Problem. The main delicate task in it is to “transfer the sense of orientation” from one vertex to another, which is achieved with suitably crafted tri-colored rigid “chains” as sketched in Figure 6.
5.3 Non-traditional methods of counting crossings
We now look at different problems which do not count the crossings simply “one by one”.
Edge crossing number.
The edge crossing number of a graph is the smallest such that has a normal drawing having at most edges with at least one crossing. Computing the edge crossing number is -hard [4], and according to Schaefer [45, Section 3.2: Edge crossing number], no algorithm parameterized by the solution size is known even in the plane.
Proposition 5.7.
Let be an integer and be a surface with topological size . The problem to decide whether an input graph of size has edge crossing number at most in can be solved in time .
Proof.
For a drawing in , let be equal to the number of edges of carrying an intersection point if the total number of intersection points in is at most , and let otherwise. We also set . It is again routine to check that is a crossing-counting pair and that is computable in polynomial time.
It is well known, see, e.g., Schaefer [44], that any drawing with edges carrying an intersection point can be turned into a normal drawing in which no two edges cross twice, without introducing new crossed edges, and thus having at most crossings. Thus, the edge crossing number of indeed equals the minimum value of over all drawings of . Hence, Theorem 3.2 implies an algorithm running in time . A natural edge-colored generalization can be solved by a straightforward combination of the ideas in the proof of Proposition 5.5 and of the previous proof.
Odd and pair crossing numbers.
The pair (resp. odd) crossing number of a graph is the minimum such that there exists a normal drawing of in which at most pairs of edges mutually cross (resp. cross an odd number of times). While the question whether the pair crossing number coincides with the traditional crossing number is one of the biggest open problems in crossing numbers, Pelsmajer, Schaefer, and Štefankovič [42] proved that the odd crossing number can be lower than the traditional crossing number. algorithms for the pair and odd crossing numbers were given by Pelsmajer, Schaefer, and Štefankovič [41], with an unspecified dependence on ; however, because these algorithms are based on an adaptation of Grohe’s algorithm [20], they are quadratic in the size of the input and the dependence on is at least an exponential tower of height four. We improve over their algorithms by providing algorithms also quadratic in but with a better dependence in the parameter :
Proposition 5.8.
* Let be an integer, and let ‘pair’, ‘odd’. The problems to decide whether an input graph of size has -crossing number at most in the plane can be solved in time .
5.4 Allowing edge removals and vertex splits before drawing
Finally, we consider crossing number variants that allow graph simplifications before drawing.
Skewness.
The skewness of a graph is the smallest number of edges whose removal from leaves a planar graph. Deciding whether the skewness of is at most is NP-complete [34], and linear-time FPT algorithms are claimed, without details, by Kawarabayashi and Reed [32] and Jansen, Lokshtanov, and Saurabh [30]. We generalize the problem as follows.
Color-Constrained -Skewness with Crossings
Input: A colored graph with colors in , non-negative integers and .
Question: Can we remove, for each , at most edges of color from , such that the resulting graph has crossing number at most in ?
Proposition 5.9.
* Let be a surface with topological size . The Color-Constrained -Skewness with Crossings problem for an input graph of size and parameter can be solved in time , where .
Splitting number.
The smallest integer such that a graph obtained from the given graph by successive vertex splits is embeddable in is called the splitting number of in [29, 23]. This problem is -hard [17], already in the plane. Nöllenburg et al. [39] proved that the -splitting number has a nonuniform algorithm parameterized by using the theory of graph minors. We generalize and improve the latter result to a uniform algorithm:
Proposition 5.10.
* Let be integers and be a surface with topological size . The problem to decide whether an input graph of size has, after at most vertex splits, a crossing number at most in can be solved in time .
6 Conclusions
More applications.
Theorem 3.2 allows for almost endless combinations for crossing number variants, in terms of drawing styles, ways to count crossings, allowed vertex splits and edge removals, all possibly taking edge colors into account, all on an arbitrary surface.
Limitations.
Nonetheless, in our definition of crossing-counting pair, must functionally bound the total number of intersection points in the drawing , and the value of cannot grow upon deletion of vertices and edges. The first requirement immediately excludes, e.g., the local crossing number (the minimum such that a given graph has an -planar drawing, which is -complete to compute already for [8, 19]), and the second requirement excludes some recently introduced drawing styles such as, for instance, and -real face drawings [5]. It is conceivable that Courcelle-based approaches would be able to handle and -real face drawings, albeit not easily.
Another weakness, in particular compared to the very recent preprint by Hamm, Klute, and Parada [22], is our quite restricted ability to handle predrawn parts of the input graph, essentially limited to fixing uncrossable parts of the graph via rigid subembeddings, and to special restrictions like the fixed rotation system in Theorem 5.6. In contrast, [21] and [22] are very general in this respect and, in particular, allow crossings of fixed parts with the unfixed rest of the graph.
Remarks and possible extensions.
Beyond their use for strongly fan-planar drawings, surfaces with boundaries can be useful for other problems, because they allow to pinpoint specific regions of the surface. One could actually consider a version with colored boundaries, restricting Item 1(d) of the definition of a crossing-counting pair to color-preserving self-homeomorphisms; all our arguments carry through. Finally, a possible extension of the -Crossing Number problem would be to replace the surface with an arbitrary 2-complex. We leave open whether such an extension is possible, and also potential applications.
References
- [1] Pankaj K. Agarwal, Boris Aronov, János Pach, Richard Pollack, and Micha Sharir. Quasi-planar graphs have a linear number of edges. Comb., 17(1):1–9, 1997. doi:10.1007/BF01196127.
- [2] Mark Anthony Armstrong. Basic topology. Undergraduate Texts in Mathematics. Springer-Verlag, 1983.
- [3] Sang Won Bae, Jean-François Baffier, Jinhee Chun, Peter Eades, Kord Eickmeyer, Luca Grilli, Seok-Hee Hong, Matias Korman, Fabrizio Montecchiani, Ignaz Rutter, and Csaba D. Tóth. Gap-planar graphs. Theor. Comput. Sci., 745:36–52, 2018. doi:10.1016/j.tcs.2018.05.029.
- [4] Martin Balko, Petr Hliněný, Tomás Masařík, Joachim Orthaber, Birgit Vogtenhuber, and Mirko H. Wagner. On the uncrossed number of graphs. In Stefan Felsner and Karsten Klein, editors, 32nd International Symposium on Graph Drawing and Network Visualization, GD 2024, September 18-20, 2024, Vienna, Austria, volume 320 of LIPIcs, pages 18:1–18:13. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2024. doi:10.4230/LIPICS.GD.2024.18.
- [5] Carla Binucci, Giuseppe Di Battista, Walter Didimo, Vida Dujmovic, Seok-Hee Hong, Michael Kaufmann, Giuseppe Liotta, Pat Morin, and Alessandra Tappini. Graphs drawn with some vertices per face: Density and relationships. IEEE Access, 12:68828–68846, 2024. doi:10.1109/ACCESS.2024.3401078.
- [6] 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-k-planar drawings of graphs. In GD (1), volume 14465 of Lecture Notes in Computer Science, pages 39–52. Springer, 2023. doi:10.1007/978-3-031-49272-3_3.
- [7] Sergio Cabello. Hardness of approximation for crossing number. Discrete Comput. Geom., 49(2):348–358, 2013. doi:10.1007/s00454-012-9440-6.
- [8] Sergio Cabello and Bojan Mohar. Adding one edge to planar graphs makes crossing number and 1-planarity hard. SIAM J. Comput., 42(5):1803–1829, 2013. doi:10.1137/120872310.
- [9] Otfried Cheong, Henry Förster, Julia Katheder, Maximilian Pfister, and Lena Schlipf. Weakly and strongly fan-planar graphs. In Michael A. Bekos and Markus Chimani, editors, Graph Drawing and Network Visualization - 31st International Symposium, GD 2023, Isola delle Femmine, Palermo, Italy, September 20-22, 2023, Revised Selected Papers, Part I, volume 14465 of Lecture Notes in Computer Science, pages 53–68. Springer, 2023. doi:10.1007/978-3-031-49272-3_4.
- [10] Julia Chuzhoy and Zihan Tan. A subpolynomial approximation algorithm for graph crossing number in low-degree graphs. In STOC, pages 303–316. ACM, 2022. doi:10.1145/3519935.3519984.
- [11] Éric Colin de Verdière and Arnaud de Mesmay. Testing graph isotopy on surfaces. Discrete & Computational Geometry, 51(1):171–206, 2014. doi:10.1007/s00454-013-9555-4.
- [12] Éric Colin de Verdière and Thomas Magnard. An FPT algorithm for the embeddability of graphs into two-dimensional simplicial complexes. In Proceedings of the 29th European Symposium on Algorithms (ESA), pages 32:1–32:17, 2021. Full improved version in arXiv:2107.06236v2. doi:10.4230/LIPIcs.ESA.2021.32.
- [13] Éric Colin de Verdière, Thomas Magnard, and Bojan Mohar. Embedding graphs into two-dimensional simplicial complexes. Computing in Geometry and Topology, 1(1):Article 6, 2022.
- [14] Bruno Courcelle. The monadic second-order logic of graphs. I. recognizable sets of finite graphs. Inf. Comput., 85(1):12–75, 1990. doi:10.1016/0890-5401(90)90043-H.
- [15] 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.
- [16] David Eppstein. Dynamic generators of topologically embedded graphs. In Proceedings of the 14th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 599–608, 2003. URL: http://dl.acm.org/citation.cfm?id=644108.644208.
- [17] Luérbio Faria, Celina M. H. de Figueiredo, and Candido Ferreira Xavier de Mendonça Neto. Splitting Number is NP-complete. Discret. Appl. Math., 108(1-2):65–83, 2001.
- [18] Michael R. Garey and David S. Johnson. Crossing number is NP-complete. SIAM J. Algebr. Discrete Methods, 4(3):312–316, September 1983.
- [19] 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.
- [20] Martin Grohe. Computing crossing numbers in quadratic time. J. Comput. Syst. Sci., 68(2):285–302, 2004. doi:10.1016/j.jcss.2003.07.008.
- [21] Thekla Hamm and Petr Hliněný. Parameterised partially-predrawn crossing number. In Xavier Goaoc and Michael Kerber, editors, 38th International Symposium on Computational Geometry, SoCG 2022, June 7-10, 2022, Berlin, Germany, volume 224 of LIPIcs, pages 46:1–46:15. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2022. doi:10.4230/LIPICS.SOCG.2022.46.
- [22] Thekla Hamm, Fabian Klute, and Irene Parada. Computing crossing numbers with topological and geometric restrictions. CoRR, abs/2412.13092, 2024. doi:10.48550/arXiv.2412.13092.
- [23] Nora Hartsfield, Brad Jackson, and Gerhard Ringel. The splitting number of the complete graph. Graphs and Combinatorics, 1:311–329, 1985. doi:10.1007/BF02582960.
- [24] Petr Hliněný. Crossing number is hard for cubic graphs. Journal of Comb. Theory, Ser. B, 96(4):455–471, 2006. doi:10.1016/J.JCTB.2005.09.009.
- [25] Petr Hliněný. Complexity of anchored crossing number and crossing number of almost planar graphs. In Pawel Gawrychowski, Filip Mazowiecki, and Michal Skrzypczak, editors, 50th International Symposium on Mathematical Foundations of Computer Science, MFCS 2025, August 25-29, 2025, Warsaw, Poland, volume 345 of LIPIcs, pages 59:1–59:17. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2025. doi:10.4230/LIPICS.MFCS.2025.59.
- [26] Petr Hliněný and Liana Khazaliya. Crossing number is NP-hard for constant path-width (and tree-width). In Julián Mestre and Anthony Wirth, editors, 35th International Symposium on Algorithms and Computation, ISAAC 2024, December 8-11, 2024, Sydney, Australia, volume 322 of LIPIcs, pages 40:1–40:15. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2024. doi:10.4230/LIPICS.ISAAC.2024.40.
- [27] Petr Hliněný and Csenge Lili Ködmön. Note on min--planar drawings of graphs. In Stefan Felsner and Karsten Klein, editors, 32nd International Symposium on Graph Drawing and Network Visualization, GD 2024, September 18-20, 2024, Vienna, Austria, volume 320 of LIPIcs, pages 8:1–8:10. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2024. doi:10.4230/LIPICS.GD.2024.8.
- [28] Petr Hliněný and Gelasio Salazar. On hardness of the joint crossing number. In ISAAC, volume 9472 of Lecture Notes in Computer Science, pages 603–613. Springer, 2015.
- [29] Brad Jackson and Gerhard Ringel. Splittings of graphs on surfaces. Proceedings of the 1st Colorado Symposium on Graph Theory, pages 203–219, 1982.
- [30] Bart M. P. Jansen, Daniel Lokshtanov, and Saket Saurabh. A near-optimal planarization algorithm. In Proceedings of the 25th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1802–1811, 2014. doi:10.1137/1.9781611973402.130.
- [31] Michael Kaufmann and Torsten Ueckerdt. The density of fan-planar graphs. Electron. J. Comb., 29(1), 2022. doi:10.37236/10521.
- [32] Ken-ichi Kawarabayashi and Bruce A. Reed. Computing crossing number in linear time. In STOC, pages 382–390. ACM, 2007. doi:10.1145/1250790.1250848.
- [33] Sóstenes Lins. Graph-encoded maps. Journal of Combinatorial Theory, Series B, 32:171–181, 1982. doi:10.1016/0095-8956(82)90033-8.
- [34] P.C. Liu and R.C. Geldmacher. On the deletion of nonplanar edges of a graph. In Proceedings of the Tenth Southeastern Conference on Combinatorics, Graph Theory and Computing (Florida Atlantic Univ.,Boca Raton, Fla., 1979), pages 727–738, 1979.
- [35] Daniel Lokshtanov, Fahad Panolan, Saket Saurabh, Roohani Sharma, Jie Xue, and Meirav Zehavi. Crossing number in slightly superexponential time. In Proceedings of the 36th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1412–1424, 2025. doi:10.1137/1.9781611978322.44.
- [36] Bojan Mohar and Carsten Thomassen. Graphs on surfaces. Johns Hopkins Studies in the Mathematical Sciences. Johns Hopkins University Press, 2001.
- [37] Miriam Münch and Ignaz Rutter. Parameterized algorithms for beyond-planar crossing numbers. In Stefan Felsner and Karsten Klein, editors, 32nd International Symposium on Graph Drawing and Network Visualization, GD 2024, September 18-20, 2024, Vienna, Austria, volume 320 of LIPIcs, pages 25:1–25:16. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2024. doi:10.4230/LIPICS.GD.2024.25.
- [38] Seiya Negami. Crossing numbers of graph embedding pairs on closed surfaces. J. Graph Theory, 36(1):8–23, 2001. doi:10.1002/1097-0118(200101)36:1\%3C8::AID-JGT2\%3E3.0.CO;2-O.
- [39] Martin Nöllenburg, Manuel Sorge, Soeren Terziadis, Anaïs Villedieu, Hsiang-Yun Wu, and Jules Wulms. Planarizing graphs and their drawings by vertex splitting. In GD, volume 13764 of Lecture Notes in Computer Science, pages 232–246. Springer, 2022. doi:10.1007/978-3-031-22203-0_17.
- [40] János Pach and Géza Tóth. Graphs drawn with few crossings per edge. Comb., 17(3):427–439, 1997. doi:10.1007/BF01215922.
- [41] Michael J. Pelsmajer, Marcus Schaefer, and Daniel Štefankovič. Crossing numbers and parameterized complexity. In Graph Drawing, 15th International Symposium, GD 2007, Sydney, Australia, September 24-26, 2007. Revised Papers, volume 4875 of Lecture Notes in Computer Science, pages 31–36. Springer, 2007. doi:10.1007/978-3-540-77537-9_6.
- [42] Michael J. Pelsmajer, Marcus Schaefer, and Daniel Štefankovič. Odd crossing number and crossing number are not the same. Discret. Comput. Geom., 39(1-3):442–454, 2008. doi:10.1007/S00454-008-9058-X.
- [43] Michael J. Pelsmajer, Marcus Schaefer, and Daniel Štefankovič. Crossing numbers of graphs with rotation systems. Algorithmica, 60(3):679–702, 2011. doi:10.1007/S00453-009-9343-Y.
- [44] Marcus Schaefer. Crossing Numbers of Graphs. Discrete mathematics and its applications. CRC Press, Taylor & Francis Group, 2017.
- [45] Marcus Schaefer. The graph crossing number and its variants: A survey. Electron. J. Comb., Dynamic Surveys, #DS21, 2024. Eighth Edition: May 17, 2024. doi:10.37236/2713.
- [46] Nathan van Beusekom, Irene Parada, and Bettina Speckmann. Crossing numbers of beyond-planar graphs revisited. J. Graph Algorithms Appl., 26(1):149–170, 2022. doi:10.7155/jgaa.00586.
