1 Introduction

For many real-world networks with substantial numbers of links between objects, traditional graph drawing algorithms produce visually cluttered and confusing drawings. Reducing the number of edge crossings is one way to improve the quality of the drawings. However, minimizing the number of crossings is very difficult [6, 8], and a large number of crossings is sometimes unavoidable. Another way to alleviate this problem is to employ the edge bundling technique in which some edge segments running close to each other are collapsed into bundles to reduce the clutter [9, 13, 17, 20,21,22, 26]. While these methods produce simplified drawings of graphs and significantly reduce visual clutter, they are typically heuristics and provide no guarantee on the quality of the result.

We study the algorithmic aspect of edge bundling, which is listed as one of the open questions in a recent survey on crossing minimization by Schaefer [27]. Our goal is to formalize the underlying geometric problem and design efficient algorithms with provable theoretical guarantees. In our model, pairwise edge crossings are merged into bundles of crossings, reducing the number of bundled crossings, where a bundled crossing is the intersection of two groups of edges; see Fig. 1. We consider both the general setting, where multiple crossings and self-intersections of the edges are allowed, and the more natural restricted setting in which only simple drawings are allowed.

Fig. 1.
figure 1

Circular layout of the Chvátal graph: (a) 28 pairwise edge crossings, (b) 13 bundled crossings.

1.1 Our Contribution

We first prove that in the most general setting (when a pair of edges is allowed to cross multiple times and an edge may be crossed by itself or by an incident edge) the bundled crossing number coincides with the orientable genus of the graph (Sect. 2); thus, computing it exactly is NP-hard [30]. In the more natural setting restricted to simple drawings—without double- and self-crossings—, the bundled crossing number of some graphs is strictly greater than the genus.

Next, we consider the circular bundled crossing number (Sect. 3), that is, the minimum number of bundled crossings that can be achieved in a circular graph layout. For a fixed circular order of vertices, we present a 16-approximation algorithm and a fixed-parameter algorithm with respect to the number of bundled crossings. For circular layouts without a given vertex order, we develop an algorithm with the approximation factor \(\frac{6c}{c-2}\) for graphs with n vertices having at least cn edges for \(c>2\).

In Sect. 4, we study the bundled crossing number for general drawings. The algorithm for circular layouts can also be applied for this setting; we show that it guarantees the approximation factor \(\frac{6c}{c-3}\) for graphs with at least cn edges for \(c > 3\). We then suggest an alternative algorithm that produces fewer bundled crossings for graphs with a large planar subgraph.

Finally, by extending our analysis for circular layouts, we resolve one of the open problems stated by Fink et al. [16] for an ordering problem of paths on a graph arising in visualizing metro maps (Sect. 5).

1.2 Related Work

Edge Crossings. Crossing minimization is a rich topic in graph drawing [6] but still poorly understood from the algorithmic point of view. The best currently known algorithm implies an \({\mathcal {O}}(n^{9/10})\)-approximation for the minimum crossing number on graphs having bounded maximum degree [8]. In contrast, the problem is NP-hard even for cubic graphs and a hardness of constant-factor approximation is known [7]. Minimizing crossings in circular layouts is also NP-hard, and several heuristics have been proposed [4, 18]. For graphs with \(m \ge 4n\), an \({\mathcal {O}}(\log ^2 n)\)-approximation algorithm exists [29]. Our algorithm guarantees an \({\mathcal {O}}(1)\)-approximation for bundled crossings under that condition.

Bundled crossings are closely related to the model of degenerate crossings in which multiple edge crossings at the same point in the plane are counted as a single crossing if all pairs of edges passing through the point intersect. An unrestricted variant, called the genus crossing number (\({\text {gcr}} (G)\)), allows for self-crossings of edges and multiple crossings between pairs of edges. Mohar showed that the genus crossing number equals the non-orientable genus of a graph [24]; thus, \({\text {gcr}} (G) = {\mathcal {O}}(m)\). This is similar to our result that the bundled crossing number in this unrestricted setting equals the orientable genus of the graph. If self-crossings are not allowed, then we obtain the degenerate crossing number (\({\text {dcr}} (G)\)) [25, 28]. It was conjectured by Mohar [24] that the genus crossing number always equals the degenerate crossing number; Schaefer and Štefankovič show that \({\text {dcr}} (G) \le 6 \cdot {\text {gcr}} (G) = {\mathcal {O}}(m)\). A further restriction of the problem forbids multiple crossings between a pair of edges. The corresponding simple degenerate crossing number is \(\varOmega (m^3/n^2)\) for graphs with \(m \ge 4n\) edges [1]. Thus multiple crossings between pairs of edges are significant for the corresponding value of the crossing number. Notice the difference to the bundled crossing number, which is always \({\mathcal {O}}(m)\), even when no self- and multiple crossings are allowed.

Recently, Fink et al. [15] introduced the bundled crossing number. However, they only study the bundled crossing number of a given embedding and show that determining the number is NP-hard. They also present a heuristic that in some cases, e.g., in circular layouts, yields a constant-factor approximation. In contrast, we study the variable-embedding setting: minimize the bundled crossing number over all embeddings of a graph, which is posed as an open problem in [15].

Edge Bundling. Improving the quality of layouts via edge bundling is related to the idea of confluent drawings, when a non-planar graph is presented in a planar way by merging groups of edges [11, 12]. The first discussion of bundled edges in the graph drawing literature appeared in [18], where the authors improve circular layouts by routing edges either on the outer or on the inner face of a circle. The hierarchical approach by Holten [20] bundles the edges based on an additional tree structure, and the method is also applied for circular layouts. Similar to [12, 18, 20], we study circular graph layouts. Edge bundling methods for general graph layouts are suggested in [9, 13, 17, 21, 22]. While these methods create an overview drawing, they allow the edges within a bundle to cross and overlap each other arbitrarily, making individual edges hard to follow. The issue is addressed in [5, 26], where the edges within a bundle are drawn parallel, as lines in metro maps. To the best of our knowledge, none of the above works on edge bundling provides a guarantee on the quality of the result, though they can be applied in conjunction with our algorithms to provide a better visualization.

Metro Maps. Crossing minimization has also been studied in the context of visualizing metro maps. There, a planar graph (the metro network) and a set of paths in the graph (metro lines) are given. The goal is to order the paths along the edges of the graph so as to minimize the number of crossings. Fink, Pupyrev, and Wolff [16] suggest to merge single line crossings into crossings of blocks of lines minimizing the number of block crossings in the map. They devise approximation algorithms for several classes of simple underlying networks (paths, upward trees) and an asymptotically worst-case optimal algorithm for general networks. While we use some ideas of [16] (Sect. 3.1), bundled crossings are more general, since the edges are not restricted to be routed along a specified planar graph. Furthermore, we resolve an open question stated in [16].

2 Bundled Crossings and Graph Genus

Let \(G = (V,E)\) with \(n=|V|\) and \(m=|E|\) be a graph drawn in the plane (with crossings). A bundled crossing is a subset C of the crossings so that the following conditions hold:

  1. (i)

    Every crossing in C belongs to edges \(e_1\in E_1\) and \(e_2\in E_2\), for two subsets \(E_1, E_2 \subseteq E\) (\(E_1\) and \(E_2\) are the bundles of the bundled crossing), and C contains a crossing of each edge pair \(e_1\), \(e_2\), for \(e_1 \in E_1\) and \(e_2 \in E_2\).

  2. (ii)

    One can find a pseudodisk D—a closed polygonal region crossing every edge at most twice—that separates C (in its interior) from all remaining crossings of the embedding. No edge \(e \notin E_1 \cup E_2\) intersects D. The requirement ensures that the bundled crossing is visually separated from the rest of the drawing.

The bundled crossing number of a drawing is the minimum number of bundled crossings into which the crossings can be partitioned (with disjoint pseudodisks). The bundled crossing number \({\text {bc}}(G)\) of G is the minimum number of bundled crossings in a drawing of G. For a circular layout, we denote the circular bundled crossing number by \({\text {bc}}^\circ (G)\). If the circular order \(\pi \) of vertices is prescribed, we speak of the fixed circular bundled crossing number\({\text {bc}}^\circ (G, \pi )\). Clearly, \({\text {bc}}(G) \le {\text {bc}}^\circ (G) \le {\text {bc}}^\circ (G, \pi )\).

We now discuss the relation of the bundled crossing number to the orientable genus of the graph. More specifically, consider the unrestricted drawing style for graphs in which double crossings of edges are allowed, as well as self intersections and crossings of adjacent edges. Let \({\text {bc}}'(G)\) be the minimum number of bundled crossings achievable for G in this unrestricted drawing style. We show that \({\text {bc}}'(G)\) equals the graph genus.

Theorem 1

For every graph G with genus \({\text {g}}(G)\), it holds that \({\text {bc}}'(G) = {\text {g}}(G)\).

Proof

It is easy to show that \({\text {g}}(G) \le {\text {bc}}'(G)\). We take a drawing of G with the minimum number of bundled crossings, \({\text {bc}}'(G)\), on the sphere. Then, for every bundled crossing, we add a handle to the sphere, where we route one of the bundles through the handle and one on top of it. This way we get a crossing-free drawing of G on a surface of genus \({\text {bc}}'(G)\).

For the other direction, assume that we have a crossing-free drawing of G on a surface of genus \(g = {\text {g}}(G)\). It is known that such a drawing can be modeled using the representation of a genus-g surface by a fundamental polygon with 4g sides in the plane [23]. More precisely, the sides of the polygon are numbered in circular order \(a_1,b_1,a_1',b_1', \ldots , a_g,b_g,a_g',b_g'\); for \(1 \le k \le g\), the pairs \((a_k,a_k')\) and \((b_k,b_k')\) of sides are identified in opposite direction, meaning that an edge leaving side \(a_k\) appears on the corresponding position of edge \(a_k'\); see Fig. 2 for an example showing \(K_6\) drawn in a fundamental square that models a drawing on the torus. Directly transforming a drawing on the surface into the fundamental polygon can lead to vertices appearing multiple times on the polygon’s boundary; however, small movements of the vertices on the surface fix this. Thus, we assume that all vertices lie in the interior of the fundamental polygon, and all edges leave the polygon only in the relative interior of a side of the polygon; especially, every point of an edge appears at most twice on the boundary of the fundamental polygon. (There can be parts of edges connecting two points on different sides of the polygon without directly touching a vertex as in Fig. 2).

Fig. 2.
figure 2

\(K_6\) drawn in a fundamental square modeling a torus.

Fig. 3.
figure 3

A single bundled crossing outside the fundamental polygon.

Given such a crossing-free representation of the drawing of G via the fundamental polygon, we create a new drawing of G in the plane by connecting parts of the edges outside of the fundamental polygon. For every \(1 \le k \le g\), we connect identified points of edges on \(a_k, a_k', b_k\), and \(b_k'\) as shown in Fig. 3. It is easy to see that for every k, only one bundled crossing is necessary; furthermore, all g tuples of four consecutive sides are independent. Hence, we get a drawing with g bundled crossing, which proves that \({\text {bc}}'(G) \le {\text {g}}(G)\).   \(\square \)

When creating a drawing as in the second part of the above proof, it may happen that we introduce (i) double crossings of edges, (ii) crossings between adjacent edges, or (iii) self intersections of an edge. Certainly, a drawing avoiding such configurations—that is, a simple drawing—is preferred. From now on, we only consider simple drawings. Let \({\text {bc}}(G)\) denote the minimum number of bundled crossings achievable with a simple drawing of G. It turns out that insisting on a simple drawing sometimes makes additional bundled crossing necessary.

Lemma 1

For every graph \(G = (V,E)\), \({\text {bc}}(G) \ge {\text {g}}(G)\), and there are graphs G for which \({\text {bc}}(G) > {\text {g}}(G)\).

Proof

Since we only restrict the allowed drawings, we clearly have \({\text {bc}}(G) \ge {\text {bc}}'(G)={\text {g}}(G)\) and the first claim follows.

For the second part of the lemma, consider the complete graph on six vertices, \(K_6\), with genus \({\text {g}}(K_6) = 1\); there is a crossing-free drawing of \(K_6\) on the torus. Every realization of \(K_6\) with only one bundled crossing leads to a drawing on the torus. Consider such a drawing in the fundamental polygon model of the torus; in this case, the fundamental polygon can be seen as an axis-aligned square where edges can go to the upper, lower, left, and right side of the square. If two edges incident to the same vertex v leave the square to adjacent sides, the edges cross in the bundled crossing, which is forbidden. Furthermore, no part of an edge can enter and leave the square on adjacent sides since this would result in a forbidden self-intersection. Given these constraints, it is not hard but technical to verify that \(K_6\) cannot be embedded on the torus and, therefore, \({\text {bc}}(K_6) > 1\); see [3] for more details.   \(\square \)

It is easy to see that \({\text {g}}(G) = {\mathcal {O}}(m)\) by introducing a handle on the sphere for each edge. Furthermore, for the complete graph \(K_n\), it is known that \({\text {g}}(K_n) = \lceil (n-3)(n-4)/12\rceil \), that is, \({\text {g}}(G) = \varTheta (m)\) for some graphs. Clearly, we cannot do better with bundled crossings, that is, \({\text {bc}}(G) = \varOmega (m)\) for some graphs. In Sect. 3.1 we show that \({\mathcal {O}}(m)\) bundled crossings always suffice, even if we are using a circular layout with a fixed order of vertices. This means that for complete graphs, all bundled crossing number variants and the genus are within a constant factor from each other. An interesting question is how large the ratio between the bundled crossing number and the graph genus can get for general graphs.

It is known that \(\varOmega (m^3/n^2)\) single crossings are necessary for graphs with n vertices and \(m\ge 4n\) edges [2]. For dense graphs with \(m = \varTheta (n^2)\) edges, \(\varTheta (m^2)\) crossings are required, while the bundled crossing number is \({\mathcal {O}}(m)\). Therefore, using edge bundles can significantly reduce visual complexity of a drawing.

3 Circular Layouts

Now we consider circular graph layouts. Let \(G = (V,E)\) be a graph and let \(\pi = \left[ v_1, \ldots , v_n \right] \) be a permutation of its vertices. The goal is to draw G in such a way that the vertices are placed on the boundary of a disk in the circular order prescribed by \(\pi \), all edges are drawn inside the circle, and the number of bundled crossings, \({\text {bc}}^\circ (G, \pi )\), is minimized. We start with a scenario when \(\pi \) is predefined.

3.1 Circular Layouts with Fixed Order

Since in our model adjacent edges are not allowed to cross and the circular order of the vertices is fixed, the order of outgoing edges for every vertex is unique for \(\pi \). Hence, we may assume that G is a matching. Note that in this case the circular layout can be seen as a weak pseudoline arrangement, that is, an arrangement of pseudolines in which not every pair of pseudolines has to cross [10].

Assume that edges \(e_1\) and \(e_2\) are parallel, that is, they do not have to cross, and they start and end as immediate neighbors. Clearly, in any simple drawing, \(e_1\) and \(e_2\) do not cross and they are crossed by exactly the same set of other edges; otherwise we would have a forbidden double crossing. Therefore, we can remove \(e_2\) from the instance, find a drawing for the remaining graph, and then reintroduce \(e_2\) without an additional bundled crossing. To this end, we route \(e_2\) parallel to \(e_1\) and let it participate in \(e_1\)’s bundled crossings in the same bundle as \(e_1\). Thus, we may assume that (i) the input contains no parallel pairs of edges. Additionally, we assume that (ii) every edge of the input graph has to be crossed by an edge (which can be checked by looking at the given circular order); otherwise, such an edge is removed from the input and later reinserted without crossings. In the following we assume that the input satisfied both conditions (i) and (ii) and such a graph is called simplified.

Next we develop an approximation algorithm for \({\text {bc}}^\circ (G, \pi )\) by showing how to find a solution with only a linear number of bundled crossings, and proving that every feasible solution, even an optimum one, must have a linear number of bundled crossings. We start with the lower bound.

Lemma 2

Let \(G = (V,E)\) be a simplified graph with fixed circular vertex order \(\pi \). Then, \({\text {bc}}^\circ (G, \pi ) \ge m/16\).

Proof

Assume we are given a circular drawing of G with the minimum number of bundled crossings. Such a drawing is a weak pseudoline arrangement. Let H be the embedded planar graph that we get by planarizing the drawing, that is, by replacing each crossing by a crossing vertex and adding the cycle \((v_1, v_2, \ldots , v_n)\). We consider the faces of H. Some faces are bounded by original edges and an additional edge stemming from the cycle. Next we lower bound the number of triangles in the pseudoline arrangement and, hence, the triangular faces in H.

Assume that we follow some edge in the drawing and analyze the faces at one of its sides. If all faces were quadrilaterals, then the edge would be completely parallel to a neighboring edge, which is not possible in a simplified instance. Hence, on both sides of the edge we find at least one face that is either a triangle or a k-gon with \(k \ge 5\). For \(k \ge 3\), let \(f_k\) be the number of faces in the drawing of H of degree k. Since we see at least 2m sides of such faces and every side only once, we have \(2m \le 3f_3 + \sum _{k \ge 5}kf_k\). Fink et al. [15] show that \(f_3 = 4 + \sum _{k \ge 5} (k-4)f_k\). Hence, \( 2m \le 3f_3 + \sum _{k \ge 5} (k-4)f_k + 4 \sum _{k \ge 5} f_k \le 3f_3 + (f_3 - 4) + 4(f_3 - 4) \le 8f_3, \) which implies \(f_3 \ge m/4\). Note that the bound is tight; see [3].

To complete the proof of the lemma, we use a result of Fink et al. [15], who show that the crossings in a fixed drawing can be partitioned into no less than \(f_3/4\) bundled crossings. Since every drawing has at least m/4 triangles, \({\text {bc}}^\circ (G, \pi ) \ge m/16\).   \(\square \)

Note that, as Fink et al. [15] point out, there exist circular drawings whose crossings can be partitioned into no less than \(\varTheta (m^2)\) bundled crossings. However, we can choose the drawing as long as we follow the cyclic order, \(\pi \), of vertices. We use this freedom and show how to construct a solution with \({\mathcal {O}}(m)\) bundled crossings.

Lemma 3

Let \(G = (V,E)\) be a graph with a fixed circular vertex order. We can find a circular layout with at most \(m-1\) bundled crossings in \({\mathcal {O}}(m^2)\) time.

Fig. 4.
figure 4

Finding a circular layout with \(m-1\) bundled crossings (gray shaded).

Proof

Recall that we may assume that the input graph is a matching. Since only the circular order of the vertices matters for the combinatorial embedding, we transform the circle into a rectangle with \(v_1, \ldots , v_n\) placed on the lower side from left to right; see Fig. 4. We produce a drawing in which every edge \(e= (v_i, v_j)\) with \(i < j\) consists of two straight-line segments.Footnote 1 The first segment leaves \(v_i\) with a slope \(\alpha \); when the segment is above \(v_j\) it is followed by a vertical segment connecting down to \(v_j\). Since there are only two slopes, every crossing is between a vertical segment and a segment of slope \(\alpha \). It is easy to see that two edges \((v_i, v_j)\) and \((v_{i'}, v_{j'})\) cross if the endvertices are interleaved, that is, if \(i< i'< j < j'\) or \(i'< i< j' < j\). In that case, the edges have to cross in any possible embedding and we do not introduce additional crossings.

Finally, we create a single bundled crossing for each edge e consisting of all crossings of e’s vertical segment. It is easy to see that this yields a feasible partitioning of all crossings into bundled crossings. Since the edge ending at vertex \(v_n\) will not have any crossing on its vertical segment, the number of bundled crossings is at most \(m-1\). The drawing is created in \({\mathcal {O}}(m)\) time but the time needed to produce a combinatorial embedding depends on the number of crossings; it is bounded by \({\mathcal {O}}(m^2)\).   \(\square \)

The upper bound of \(m-1\) is tight: a matching in which every edge crosses every other edge requires that many bundled crossings. Combining the algorithm and the lower bound of Lemma 2, we get the following result.

Theorem 2

For a graph G with a fixed circular vertex order, we can find a 16-approximation for the fixed circular bundled crossing number in \({\mathcal {O}}(m^2)\) time.

Fixed-Parameter Tractability. We now show that deciding whether a solution with at most k bundled crossings exists is fixed-parameter tractable with respect to k. The crucial instruments for achieving this are the graph simplification and the lower bound of Lemma 2. If after the simplification, G has more than 16k edges, we know that \({\text {bc}}^\circ (G, \pi ) > 16k/16 = k\) and we can reject the instance. Otherwise, if at most k edges remain, we can afford to solve the problem exhaustively.

Theorem 3

Let \(G = (V,E)\) be a graph with a fixed circular vertex order \(\pi \). Deciding whether \({\text {bc}}^\circ (G, \pi ) \le k\) is fixed-parameter tractable with respect to k with a running time of \({\mathcal {O}}(2^{0.657 k^{2}} k^{128k^2} + m)\).

Proof

We simplify the graph in \({\mathcal {O}}(m)\) time. Afterwards, we check every combination of circular order, combinatorial embedding, and partitioning of the crossings into up to k sets. If any such combination yields a feasible partitioning into bundled crossings, we accept the instance; otherwise, we reject it.

There are at most \({16k \atopwithdelims ()2} \le 128k^2\) pairs of edges that need to cross. Hence, there are up to \(k^{128k^2}\) ways to partition the crossings into up to k sets. Since every pair of edges crosses at most once, the circular embedding can be extended to a pseudoline arrangement (in which every pair crosses exactly once). Felsner and Valtr proved [14] that there are at most \(2^{0.657 k^{2}}\) arrangements of k pseudolines, and Yamanaka et al. [31] presented a method that iterates over all pseudoline arrangements using \({\mathcal {O}}(k^{2})\) total space and \({\mathcal {O}}(1)\) time per arrangement. For each pseudoline arrangement, we can check whether an embedding with the prescribed circular order occurs as a part in \({\mathcal {O}}(k^3)\) time; within the same time bound, we can check whether a given partitioning of the crossings yields feasible bundled crossings. In total this takes \({\mathcal {O}}(2^{0.657 k^{2}} k^{128k^2}+m)\) time.   \(\square \)

3.2 Circular Layouts with Free Order

We now study the variant of the problem in which the circular order of the vertices is not known. How can one find a suitable order? A possible approach would be finding an order that optimizes some aesthetic criteria (e.g., the total length of the edges [18] or the number of pairwise crossings [4]) and then applying the algorithm of Lemma 3. Next we analyze such an approach.

In Sect. 2, we have already seen that \({\text {bc}}(G) \ge {\text {g}}(G)\). We can use this for getting a lower bound for the bundled crossing number.

Lemma 4

For every graph \(G = (V,E)\) with n vertices and m edges, \({\text {bc}}(G) \ge \left( m - (3n-6) \right) /6\) and \({\text {bc}}^\circ (G) \ge (m - (2n-3))/6\).

Proof

Assume we have a crossing-free drawing of graph G on a surface of genus \({\text {g}}= {\text {g}}(G)\). The relation between vertices, edges, and faces is described by the Euler formula \(n-m+f = 2 - 2{\text {g}}\). Combining this with \(2m \ge 3f\), we get that \({\text {bc}}(G) \ge {\text {g}}(G) \ge \left( m - (3n-6) \right) /6\).

Now consider a circular drawing with the minimum number \(k = {\text {bc}}^\circ (G)\) of bundled crossings. All n vertices lie on the outer face. Hence, we can add \(n-3\) edges triangulating the outer face without introducing new crossings. We get a new graph \(G'\) with \(m' = m + n-3\) edges and a (non-circular) drawing of \(G'\) with k bundled crossings. Hence, \(k \ge \big (m' - (3n-6)\big )/6 = \big (m - (2n-3)\big )/6\).

   \(\square \)

For dense graphs with more than 2n edges, we can get a constant-factor approximation using the upper bound of \(m-1\) with an arbitrary order.

Theorem 4

Let \(G = (V,E)\) be a graph with \(m \ge cn\) for some \(c > 2\). There is an \({\mathcal {O}}(n^2)\)-time algorithm that computes a solution for the circular bundled crossing number with an approximation factor of \( \frac{6c}{c-2}. \)

Proof

Using the algorithm of Lemma 3, we find a solution with at most \(m-1\) bundled crossings. By Lemma 4, \((m - (2n-3))/6\) crossings are required. Then the approximation factor is \(\frac{m-1}{(m - (2n - 3))/6}=6\left( 1 + \frac{2n-4}{m-2n+3}\right) \le 6\left( 1 + \frac{2n}{m-2n}\right) \le 6\left( 1 + \frac{2}{c-2}\right) =\frac{6c}{c-2}\), which is constant for every \(c > 2\) and \(n \ge 1\).   \(\square \)

For constructing a constant-factor approximation algorithm for sparse graphs with \(m \le 2n\) one would need better bounds. We next suggest a possible direction by improving our algorithm for some input graphs. The idea is to save some crossings by first drawing an outerplanar subgraph of G.

Lemma 5

Let \(G = (V,E)\) be a graph and \(G^\star = (V, E^\star )\) be a subgraph of G having \(m^\star =|E^\star |\) edges that is outerplanar with respect to a vertex order \(\pi \). Then \({\text {bc}}^\circ (G) \le {\text {bc}}^\circ (G, \pi ) \le 2(m - m^\star )\) and we can find such a solution in \({\mathcal {O}}(m^2)\) time.

Proof

The algorithm is similar to the one used in Lemma 3 in which every edge consists of two segments. This time we initialize the embedding by adding the edges of \(E^\star \) without crossings, each with a segment of slope \(\alpha \). Next, we add the remaining edges from left to right ordered by their first vertex. When adding edge \(e = (v_i, v_j)\) with \(i<j\), we route the edge with two vertical segments and a middle segment of slope \(\alpha \). We start upward from \(v_i\) so that the first segment crosses all edges present at \(x = x(v_i)\) that have to cross e, but no other edge. We start the middle segment with slope \(\alpha \) there and complete with a vertical segment at \(x = x(v_j)\). It is easy to see that any edge of \(E^\star \) whose vertical segment could intersect e must start left of \(v_i\). However, our routing of e places the possible crossing on a vertical segment of e. Hence, all vertical segments of edges of \(E^\star \) are crossing-free. Creating a bundled crossing for each vertical segment of the edges of \(E - E^\star \) results, therefore, in at most \(2 (m - m^\star )\) bundled crossings.   \(\square \)

This bound is asymptotically tight; see [3].

4 General Drawings

We now consider general (non-circular) drawings. Note that Lemma 4 provides a lower bound for the bundled crossing number, and Lemma 3 gives an algorithm that can be applied for general drawings. Combining the lower and the upper bounds, we get the following result for dense graphs.

Theorem 5

Let \(G = (V,E)\) be a graph with \(m \ge cn\) for some \(c > 3\). There is an \({\mathcal {O}}(n^2)\)-time algorithm that computes a solution for the bundled crossing number with an approximation factor of \( \frac{6c}{c-3}. \)

Proof

By Lemma 4, \({\text {bc}}(G) \ge (m-(3n-6))/6\), and by Lemma 3, \({\text {bc}}(G) \le m-1\). Then the approximation factor of the algorithm of Lemma 3 is \(\frac{m-1}{(m - (3n - 6))/6} = 6\left( 1 + \frac{3n-7}{m-3n+6}\right) \le 6\left( 1 + \frac{3n}{m-3n}\right) \le 6\left( 1 + \frac{3}{c-3}\right) =\frac{6c}{c-3}\).   \(\square \)

Can we improve the algorithm for general drawings? Next we develop an alternative upper bound based on a planar subgraph \(G^\star = (V, E^\star )\) of G, which produces fewer bundled crossings if \(m^\star = |E^\star | > 3m/4\).

Lemma 6

Let \(G = (V,E)\) be a graph, let \(G^\star = (V, E^\star )\) be its planar subgraph, and let \(m^\star = |E^\star |\). Then, \({\text {bc}}(G) \le 4(m-m^\star )\).

Proof

We start with a topological book embedding of \(G^\star \), that is, a planar embedding with all vertices on the x-axis and the edges composed of circular arcs whose center is on the x-axis. Giordano et al. [19] show how to construct such an embedding with at most two circular arcs per edge and all edges being x-monotone (that is, edges with two circular arcs cannot change the direction).

We add the edges of \(E' = E \setminus E^\star \) to get a non-planar topological book embedding (with up to two circular arcs per edge) and keep the drawing simple, that is, free of self-intersections, double crossings, and crossings of adjacent edges. Then we split the drawing at the spine and interpret each half as a circular layout with fixed order. Using the algorithm of Lemma 5, we get an embedding with at most \(2(m-m^\star )\) crossings for each side and \(4(m-m^\star )\) crossings in total.

It remains to show how to add an edge \(e = (u,v) \in E'\). Consider all planar edges incident to u and v. If we can add e as a single circular arc above or below the spine without crossing any of these edges, we do so. Otherwise, two edges \(e_1\) adjacent to u and \(e_2\) adjacent to v exist (see Fig. 5), and e must be inserted using two circular arcs. We consider all these obstructing two-bend edges incident to u and v and insert e by placing its bend next to the rightmost bend of an edge incident to u (see Fig. 6), avoiding all intersections with planar edges. Bends of the edges incident to u are ordered by their endvertex so that they do not cross.

Fig. 5.
figure 5

Adding edge \(e = (u,v)\) requires two circular arcs.

Fig. 6.
figure 6

Inserting edge \(e = (u,v)\) with two circular arcs.

Fig. 7.
figure 7

Double crossings of edges are not possible

It is easy to see that there are no self-intersections and no crossings of adjacent edges. There are also no double crossings: Otherwise, let \(e_1\) and \(e_2\) be a pair of edges that cross both above and below the spine. Assume that \(e_1 \in E', e_2 \in E^\star \). Since \(e_1\) consists of two segments, there must be adjacent planar edges that caused \(e_1\)’s shape. We find such an edge \(e_1'\) that crosses with the planar edge \(e_2\), a contradiction; see Fig. 7a. If \(e_1, e_2 \in E'\), we find a planar edge \(e_2'\) causing the two-arc shape of \(e_2\), such that \(e_1'\) and \(e_2'\) cross, another contradiction; see Fig. 7b.   \(\square \)

5 Block Crossings in Metro Maps

Our analysis has an interesting application for block crossings in metro maps [16]. The block crossing minimization problem (BCM) asks to order simple paths (metro lines) along the edges of a plane graph (underlying metro network) so as to minimize the total number of block crossings. Fink et al. [16] present a method that uses two block crossings per line on a tree network, and ask whether a (constant-factor) approximation is possible. With the help of the lower bound of Lemma 2, we affirmatively answer the question. We provide a sketch of the proof; see [3] for details.

Theorem 6

There is an \({\mathcal {O}}(\ell ^2)\)-time 32-approximation algorithm for BCM, where \(\ell \) is the number of metro lines and the underlying network is a tree.

Proof

Suppose that we have a solution with k block crossings on the tree. We can interpret the metro lines as edges in the drawing of a matching—connecting the respective leaves—in a circular layout. This layout has k bundled crossings, each stemming from a block crossing. Hence, we could use the lower bound of Lemma 2. To this end, we simplify the instance and consider the remaining m lines. Lemma 2 implies that an optimum solution has at least m / 16 block crossings of the metro lines. We apply the method of Fink et al. [16] creating 2m block crossings in \({\mathcal {O}}(m^2)\) time, and reinsert the simplified lines.   \(\square \)

6 Conclusion

We have considered the bundled crossing number problem and devised upper and lower bounds for general as well as circular layouts with and without fixed circular vertex order. We have also shown the relation of the bundled crossing number to the orientable graph genus and resolved an open problem for block crossings of metro lines on trees. The setting of bundled crossings still has several interesting questions to offer. It seems very likely that the circular bundled crossing number problem is NP-hard, but a proof is missing. Furthermore, an approximation or a fixed-parameter algorithm for the version with free circular vertex order is desirable. Both questions are also interesting for general graph layouts.