Crossing Number for Graphs with Bounded Pathwidth1footnote 11footnote 1This work has been started at the Crossing Number Workshop 2016 in Strobl (Austria). Research of T.B. supported by NSERC. Research of M.D. supported by NSERC Vanier CSG. Research of M.C. partially supported by the German Science Foundation (DFG), project CH 897/2-1. Research of P.M. partially supported by the DFG within the SFB 876 (project A6).

Crossing Number for Graphs with Bounded Pathwidth111This work has been started at the Crossing Number Workshop 2016 in Strobl (Austria). Research of T.B. supported by NSERC. Research of M.D. supported by NSERC Vanier CSG. Research of M.C. partially supported by the German Science Foundation (DFG), project CH 897/2-1. Research of P.M. partially supported by the DFG within the SFB 876 (project A6).

Therese Biedl Dept. of Computer Science, University of Waterloo, Canada
{biedl,mderka}@uwaterloo.ca
Markus Chimani Dept. of Computer Science, Universität Osnabrück, Germany
markus.chimani@uni-osnabrueck.de
Martin Derka Dept. of Computer Science, University of Waterloo, Canada
{biedl,mderka}@uwaterloo.ca
Petra Mutzel Dept. of Computer Science, Technische Universität Dortmund, Germany
petra.mutzel@cs.tu-dortmund.de
Abstract

The crossing number is the smallest number of pairwise edge crossings when drawing a graph into the plane. There are only very few graph classes for which the exact crossing number is known or for which there at least exist constant approximation ratios. Furthermore, up to now, general crossing number computations have never been successfully tackled using bounded width of graph decompositions, like treewidth or pathwidth.

In this paper, we for the first time show that crossing number is tractable (even in linear time) for maximal graphs of bounded pathwidth 3. The technique also shows that the crossing number and the rectilinear (a.k.a. straight-line) crossing number are identical for this graph class, and that we require only an -grid to achieve such a drawing.

Our techniques can further be extended to devise a 2-approximation for general graphs with pathwidth 3, and a -approximation for maximal graphs of pathwidth . This is a constant approximation for bounded pathwidth graphs.

Crossing Number, Graphs with Bounded Pathwidth
\Copyright

Therese Biedl and Markus Chimani and Martin Derka and Petra Mutzel\subjclassF.2.2 Nonnumerical Algorithms and Problems\EventEditorsYoshio Okamoto and Takeshi Tokuyama \EventNoEds2 \EventLongTitle28th International Symposium on Algorithms and Computation (ISAAC 2017) \EventShortTitleISAAC 2017 \EventAcronymISAAC \EventYear2017 \EventDateDecember 9–12, 2017 \EventLocationPhuket, Thailand \EventLogo \SeriesVolume92 \ArticleNo13

1 Introduction

The crossing number is the smallest number of pairwise edge-crossings over all possible drawings of a graph into the plane. Despite decades of lively research, see e.g. [27, 26], even most seemingly simple questions, such as the crossing number of complete or complete bipartite graphs, are still open, cf. [24]. There are only very few graph classes, e.g., Petersen graphs or Cartesian products of small graphs with paths or trees, see [25, 21, 4], for which the crossing number is known or can be efficiently computed. Considering approximations, we know that computing is APX-hard [5], i.e., there does not exist a PTAS (unless P = NP). The best known approximation ratio for general graphs with bounded maximum degree is  [10]. We only know constant approximation ratios for special graph classes. In fact, all known constant approximation ratios are based on one of three concepts: Topology-based approximations require that can be embedded without crossings on a surface of some fixed or bounded genus [14, 18, 17]. Insertion-based approximations assume that there is only a small (i.e., bounded size) subset of graph elements whose removal leaves a planar graph [6, 9, 7, 8]. In either case, the ratios are constant only if we further assume bounded maximum degree. Finally, some approximations for the crossing number exist if the graph is dense [13].

While treewidth and pathwidth have been very successful tools in many graph algorithm scenarios, they have only very rarely been applied to crossing number: Since general crossing number seems not to be describable with second order monadic logic, Courcelle’s result [11] regarding treewidth-based tractability can only be applied if itself is bounded [15, 19]. The related strategy of “planar decompositions” lead to linear crossing number bounds [28].

Contribution.

In this paper, we for the first time show that such graph decompositions, in our case pathwidth, can be used for computing crossing number. We show for maximal graphs of pathwidth 3 (see Section 3):

  • We can compute the exact crossing number in linear time.

  • The topological equals the rectilinear crossing number , i.e., the crossing number under the restriction that all edges need to be drawn as straight lines.

  • We can compute a drawing realizing on an -grid.q

We then generalize these techniques to show:

  • A -approximation for and for general graphs of pathwidth 3, see Section 4.

  • A -approximation for for maximal graphs of pathwidth , see Section 5. This can be achieved by placing vertices and bend points on a grid.

Observe that in contrast to most previous results, these approximation ratios are not dependent on the graph’s maximum degree. As a complementary side note, we show (in the full version of the paper, see [1]) that the weighted (possibly rectilinear) crossing number is weakly NP-hard already for maximal graphs with pathwidth .

Focusing on graphs with bounded pathwidth may seem very restrictive, but in some sense these are the most interesting graphs for crossing minimization because Hliněný showed that crossing-number critical graphs have bounded pathwidth [16].

2 Preliminaries

We always consider a simple undirected graph with vertices as our input. A drawing of is a mapping of vertices and edges to points and simple curves in the plane, respectively. The curve of an edge does not pass through any point , , but has its ends at and . When asking for a crossing minimum drawing of , we can restrict ourselves to good drawings, which means that adjacent edges do not cross, non-adjacent edges cross at most once, and no three edges cross at the same point of the drawing. For other drawings, straightforward redrawing arguments, see e.g. [26], show that the crossing number can never increase when establishing these properties.

A clique is a complete graph and a biclique is a complete bipartite graph. While the exact crossing number is unknown for general cliques and bicliques, there are upper bound constructions, conjectured to attain the optimal value. In particular the old construction due to Zarankiewicz, attaining crossings for , is known to give the optimum for  [20].

A prominent variant of the traditional (“topological”) crossing number is the rectilinear crossing number , sometimes also known as geometric or straight-line crossing number. Thereby, edges are required to be drawn as straight line segments without any bends. Interestingly, while we know in general (e.g., already for complete graphs), Zarankiewicz’s construction is a straight-line drawing, suggesting that maybe for bicliques.

Alternating path decompositions and clusters.

There are several equivalent definitions of pathwidth; we use here the one based on tree decompositions, see e.g. [22]. A path decomposition of a connected graph consists of a finite set of bags , where each bag is a subset of the vertices of , such that for every edge at least one bag contains both and , and for every vertex of the set of bags containing forms an interval (i.e., the underlying graph formed by the bags is a path). The indexing of the bags gives a total ordering and we may speak of first, last, preceding, and succeeding bags. The width of a path decomposition is the maximum cardinality of a bag minus one, i.e., . The pathwidth of is the smallest width that can be achieved by a path decomposition of . A maximal pathwidth- graph is a graph of pathwidth for which adding any edge increases its pathwidth. In particular, this implies that the vertices in each bag form a clique. We assume that ; otherwise is a clique and the crossing number is 0 for and easily approximated within a factor of for bigger  (e.g., via the crossing lemma [23]).

Several additional constraints can be imposed on the bags and the path decomposition without affecting the required width. We use a variant of a nice path decomposition that we call an alternating path decomposition (see Fig. 1); one can easily show that such a decomposition exists:

  • There are exactly bags.

  • if is odd and if is even.

  • For any even , we have .

Note that for any odd there is exactly one vertex that is in but not in bag . We say that is forgotten by bag . Similarly, bag contains exactly one vertex that was not in bag . We say that is introduced by bag . We define the age-order of the vertices of as follows: is forgotten by ; are the other vertices of bag in arbitrary order. The order of the remaining vertices corresponds to the order of the bags by which they are introduced. We say that is older than if , so the three oldest vertices are . Note that we can choose arbitrarily among . In particular, if two vertices are specified, then we can ensure that they are among the three oldest; this will be exploited in Section 4.2.

Figure 1: (left) A graph, with vertices in age order according to . (right) Its alternating path decomposition of width 3, with two clusters: has , and consists of all bags containing this anchor-triplet. Analogously, we have . In , the lost vertex is and the emerging vertex is .

In our algorithms and proofs, we will work with special subsets of bags called clusters. Let be a connected graph of pathwidth with an alternating path decomposition . Consider a set of three vertices that constitute at least one bag (this bag has an even index). There can be several such bags with exactly those vertices, but all bags containing are consecutive. For any such , we define a cluster as the maximal consecutive set of bags that all contain . We say that is the anchor-triplet of . Any cluster has at least 3 bags. They alternate between size and , starting and ending with size- bags. Two consecutive clusters overlap in exactly one bag (which consequently has size ). The order of the bags induces a unique order of the clusters .

Note that a cluster can be described as a set of bags, or by its anchor-triplet. Denote the vertices that appear in the union of bags of by , and let . The following observation is trivial (because any vertex of the anchor-triplet of belongs to all bags of ) but crucial for our analysis.

Observation \thetheorem.

Let be a maximal pathwidth- graph and let be a cluster. Then the graph induced by consists of the triangle induced by and (edge-disjoint) a biclique with one partition being .

We define the emerging vertex of , denoted by , as the vertex introduced by the last bag of . Note that belongs to the anchor-triplet of the next cluster if . We define the lost vertex of , denoted by , as the vertex that was forgotten by the second bag of . Note that belongs to the anchor-triplet of the previous cluster if , but not to the anchor-triplet of . Observe that , , and for all . For notational simplicity, we define . Any vertex that belongs to but is not in is called a singleton of . Vertex belongs to a “middle” bag of and only appears in this bag; it belongs to no cluster other than . See Fig. 1 for an example.

3 Exact Algorithm for Maximal Pathwidth-3 Graphs

Let be a maximal pathwidth- graph and fix an alternating path decomposition of width . By maximality, all bags form cliques, and in particular, each anchor-triplet induces a triangle in the graph, called anchor triangle consisting of anchor edges.

The general idea to draw is to iterate through the clusters . When considering cluster , its first bag will already be drawn and the anchor triangle will form the outer face of the current drawing. About half of the vertices introduced by will be drawn inside the anchor triangle while the other half will be drawn outside, mimicking Zarankiewicz’ construction locally. The number of crossings that these vertices add will be exactly the minimum number of crossings needed to draw the biclique of cluster , hence leading to an optimal drawing.

We start with drawing bag as a planar drawing of with the vertices on the outer face. Now we iterate over all clusters , , drawing their bags with the following invariants:

  • The drawing is good and straight-line.

  • Before drawing , the outer face contains the three vertices .

  • For any , the anchor edges of are drawn without crossings.

(a) Wedges , , and .
(b) Adding vertices inside.
(c) Adding vertices outside.
Figure 2: Drawing maximal pathwidth- graphs. For ease of legibility we draw some edges in (c) slightly curved. Dotted lines mark boundaries of the regions defined in the text.

Let be the number of singleton vertices in (possibly ). We need to place the singletons and the emerging vertex . We will add vertices into an inner face of the current drawing and vertices on the outside. Note that .

Placement on the inside. By the invariant the outer face consists of the edges connecting for some . W.l.o.g. assume that , , and occur in clockwise order walking along the outer face. By maximality, and because has just been introduced, has degree 3 in the current graph, and its neighbors are .

Let be the open region obtained by the intersection of three open “wedges” defined as follows: Wedge emanates from between edges and in the interior of the triangle induced by . Wedge () emanates at () inside of and runs along edge (, respectively) with a sufficiently small angle such that it crosses only edges incident to . Any point inside can be connected to all of with straight lines and a single crossing (with edge ).

Consider a straight line through but not through any of . Place vertices (for singletons of ) along within , and connect each of them to all of . All generated crossings are with edge or among the added edges. The drawing is straight-line and good (no three edges cross in a point), and the number of added crossings is .

Placement on the outside. The outer face of the drawing is still formed by the edges connecting , since all vertices from the paragraph above were added inside and thus in the interior of . We know that the vertex in will be lost in the next cluster (if there is any); it will play a prominent role now. Since we may or may not have , we label the vertices of afresh as .

Define an open wedge in the exterior of emanating from between the extensions of the edges and beyond . Any point inside can be connected via straight lines to all of without any crossings. Consider a straight line through , not through any of , and crossing . Now place vertices along within , and connect all of them to all of via straight lines. All generated crossings are among the added edges. The drawing is still straight-line and good, and the number of added crossings is . The outer face of the resulting drawing is again a triangle with two corners being and and the third corner being a vertex that was added on . We assign this latter vertex the role of the emerging vertex ; the other inserted vertices are the necessary singletons. With this, the invariant holds since .

This finishes the description of the drawing algorithm. We claim that the final drawing has the minimum possible number of crossings: We first give an upper bound on the number of crossings that we achieve, and then show that any drawing requires this number.

{lemma}

The above algorithm produces at most crossings.

Proof.

The algorithm started with a planar drawing of . We argued above that the -th iteration (drawing , which contains singletons) added

crossings, where and . Finally, observe that since all vertices of except are singletons. ∎

{lemma}

Any good drawing of requires at least crossings.

Proof.

From Observation 2 we know that each cluster contains a biclique . By Zarankiewicz’ formula, needs crossings in any drawing. Thus, within each cluster we only introduce the optimal number of crossings.

However, we must argue that it is impossible for one crossing to belong to two or more clusters in an optimal drawing. This holds because nearly all of does not belong to other clusters. More precisely, assume some other cluster shares vertices with ; we may assume . Then all common vertices must appear in the first bag of . However, only three edges of those induced by are in , and all three of them are incident to . Since adjacent edges do not cross in a good drawing, no crossing can be shared between and . ∎

{theorem}

There is a linear time algorithm to compute the exact crossing number of any maximal pathwidth- graph . Furthermore, , and the algorithm gives rise to a straight-line drawing where the anchor edges are not crossed.

Proof.

Optimality follows from Lemmas 3 and 3. The second part of the claim follows from the first and third invariant in the above algorithmic description. It remains to argue linear running time. Computing a path decomposition of width (if it exists) can be done in linear time [2, 3]. This path decomposition can be turned into an alternating path decomposition in linear time as well. On it we compute as the sum in Lemma 3 in linear time. ∎

Assume we are interested in the drawing achieving this solution. The drawing algorithm uses operations, but this does not immediately imply linear time, since coordinates may become very small. We also cannot list all crossings, as there can be many. If, however, we are careful about how to place anchor-triplets, then singletons can be inserted while keeping all vertices at grid-points of an -grid, and thus we require only linear time to compute and output the drawing. Details are given in the full version of the paper [1, Appendix B]. We summarize:

{theorem}

Every maximal pathwidth- graph on vertices has a crossing-minimum drawing that is good, straight-line, and lies on a -grid. It can be found in  time.

4 Approximation Algorithm for Pathwidth-3 Graphs

We now give an algorithm that draws graphs of pathwidth 3 (not necessarily maximal) such that the number of crossings is within a factor of 2 of the optimum. Roughly speaking, if the graph is -connected (technically, we will define a slightly weaker assumption -traceable), then the algorithm for maximal pathwidth- graphs is applied, and the number of crossings is within a factor of 2. If the graph is not -traceable, then it can be split and the arising subdrawings can be “glued” together without increasing the approximation ratio.

4.1 3-traceable graphs

We first analyze graphs that satisfy a condition that is weaker than -connectivity. Define a non-anchor vertex to be a vertex that occurs in exactly one bag. Those are exactly , , and all the singletons defined earlier.

{definition}

[-traceable graph] A graph with an alternating path decomposition of width is -traceable if every non-anchor vertex has degree at least , and for all , edge exists.

Assume we are given a -traceable graph with an alternating path decomposition of width . We can first maximize (obtaining ) by adding all edges that have both ends in one bag, but are not in yet. We then apply the algorithm described in Section 3 to , and finally delete the temporarily added edges again. We will show:

{lemma}

Let be a -traceable graph. Then the algorithm of Theorem 3 gives a drawing of with at most crossings.

We first give a sketch of the proof. The main challenge is that a cluster now does not necessarily contain a biclique . However, we can argue that contains a subdivision of that uses mostly vertices of , but “borrows” a non-anchor vertex each (to play the role of and ) from the nearest preceding and succeeding cluster that has such vertices. This subdivided requires crossings. The main work is then in arguing that these subdivided bicliques cannot overlap much, or more precisely, that any crossing can belong to at most 2 of them. Lemma 4.1 then follows by applying the upper bound given in Lemma 3.

As before, let be the clusters of with anchor-triplets , and recall that we have an age-order .

There are three types of edges in . Type I are edges that are incident to non-anchor vertices. Type II are edges that have the form for some . Finally, Type III are the remaining edges (they connect vertices of some anchor-triplet , ).

Observation \thetheorem.

Consider a -traceable graph. For any , there are three vertex-disjoint paths from to that are either single vertices or consist exactly of the Type II edges for . Every non-anchor vertex attaches to the three different paths .

Proof.

For any , we have . By -traceability of , edge exists and consists of two paths of length 0 (the common vertices of the triplets) and the third path being this edge. We obtain arbitrary by extending via . Since is -traceable, the non-anchor vertices have degree 3 and are adjacent to the vertices of the anchor-triplet of their unique cluster; those lie on distinct paths of . ∎

Singleton vertices
Figure 3: The structure of a -traceable graph. Dotted triangles mark anchor-triples with at least one adjacent singleton. In bold, we show one cluster biclique: the anchor vertices depicted as circles form one partition side. The left- and rightmost bold singleton is “borrowed” from the preceding and succeeding singleton-containing cluster, respectively.

This shows that has as a minor, where is the number of non-anchor vertices. Unfortunately this is not sufficient for crossing number arguments as contracting edges may increase the crossing number. Instead, we will use the above structure to extract a subdivision of for each cluster in such a way that these bicliques do not overlap “much.”

{definition}

Let , , be a cluster with at least one singleton. The cluster biclique of , denoted , is a subdivision of obtained as follows, cf. Fig. 3:

  1. The 3-side is formed by the three vertices of .

  2. Every singleton that belongs to (there are of them) is one of the vertices on the side that will have vertices. We know that by -traceability, and it is adjacent to all of as required for the biclique.

  3. Let ( be maximal (minimal) such that cluster (, respectively) has a non-anchor vertex; among its non-anchor vertices, let () be the youngest (oldest, respectively). If , we simply set ; if , we set . By Observation 4.1, we can establish three disjoint paths from and to . Hence, add and to the “big” side of . Observe that in either case, and are distinct from the the singletons of and their paths to .

{lemma}

Let be two edges of without common endpoint. There are at most two cluster bicliques that contain both and .

Proof.

We are done if at least one of and is of Type III, because then it belongs to no cluster biclique at all. Assume that one of and is of Type II, say for some . Edge may be used only for the cluster bicliques and where () is the maximal (minimal) index such that cluster (, respectively) has singletons. The fact that belongs to at most two cluster bicliques proves the claim.

Finally, assume that both and are of Type I, i.e., incident to distinct non-anchor vertices, say and . Let be the ordered subsequence of clusters that have at least one non-anchor vertex. A non-anchor vertex can belong to at most three cluster bicliques, refer to Definition 4.1: the one of its “own” cluster , and those of the directly preceding and succeeding cluster in . Assume that and are in three cluster bicliques. If , and are singletons of different age in , and the two clusters directly preceding and succeeding would have chosen distinct singletons of , a contradiction. If , any overlap of three-element subsequences of with distinct middle clusters has size at most 2, a contradiction. ∎

Proof of Lemma 4.1.

We know from Lemma 3 that the algorithm of Theorem 3 gives a drawing with at most crossings. We need to consider only clusters that have at least one singleton; for any other cluster we have and therefore its summand is 0. For any cluster that has a singleton, we have , a subdivision of , which requires at least crossings in any good drawing of . Any crossing in is created by two edges without common endpoints, and by Lemma 4.1, any such pair belongs to at most two cluster bicliques. Hence any drawing of has at least crossings, yielding the 2-approximation. ∎

4.2 General pathwidth- graphs

A pair of vertices of a -connected graph is called a separation pair if is not connected. Assume that the pathwidth- graph is -connected but not -traceable. We will show that we can split the graph at separation pairs within anchor-triplets, draw the cut-components recursively, and merge them without introducing additional crossings. We start with a more general auxiliary statement whose proof is in [1, Appendix C].

{lemma}

Let be a -connected graph with a separation pair . Consider a partition of into two edge-disjoint connected subgraphs with . Define for . Then .

We will draw cut-components inside triangles bounded by their three oldest vertices.

{lemma}

Let be a -connected graph with an alternating path decomposition of width . Then there exists an algorithm to create a straight-line drawing of with at most crossings. All anchor-edges are drawn without crossings, and the three oldest vertices form the corners of the triangular convex hull of the drawing.

Proof.

We prove the result by induction on the structure and size of the graph.

Base case: is -traceable or a . If , the claim is obvious. Otherwise, we apply Lemma 4.1. However, the algorithm of Theorem 3 used therein grows the drawing “outwards”, while we would now like the oldest vertices to form the outer triangle. Thus we apply the algorithm for the reverse path decomposition; this makes (by suitably placing the last vertex) the outer face and draws it as a triangle.

Induction Step: is neither -traceable nor a . For every non-anchor vertex of degree , let be its adjacent anchor vertices. We can temporarily remove from , ensure that the reduced graph contains edge , draw the reduced graph, and—since will be drawn crossing free by the induction hypothesis—reinsert each with crossing-free close to the drawing of . Similarly, we can remove if it has degree : We can choose an age-order of the reduced graph such that the neighbors of are among the three oldest vertices of and hence draw such that the neighbors of are on the outer-triangle; then can be reinserted on the outside to form the desired outer triangle. If the graph became -traceable by these operations, we are done (base case). Otherwise, we can now assume that all non-anchor vertices have degree .

Since is not -traceable, for some . There exists a unique bag , the common bag of and , that contains both and . Let be the two other vertices in this bag, and observe that while . Let be the graph induced by all vertices that appear in bags , and let be the graph induced by all vertices that appear in bags . Any edge of appears in or , since is the only vertex-pair that existed in bags of , but neither of nor . Clearly, is a separation pair with .

Define and . By the addition of edge (if it did not already exist), both graphs are -connected. Apply induction to (with path decomposition ) and (with the path decomposition ). Since belong to the first bag of , we can ensure that they are among the three oldest vertices of . We obtain two drawings in both of which is not crossed. We can insert (affinely transformed) , which has on its bounding triangle, along in without additional crossings. Finally, we remove edge from the resulting drawing if .

By induction hypothesis, and . By Lemma 4.2, and since the gluing gave no new crossings, the claim follows. ∎

We are now ready to establish the theorem for general pathwidth- graphs.

{theorem}

Let be any pathwidth- graph. We have , and a linear time algorithm to create a good straight-line drawing of with at most crossings.

Proof.

(Sketch) If is -connected, then the result holds by Lemma 4.2. It is well known that is additive over the -connected components of . When gluing at cut-vertices, the cut-vertex must be on the outer face of the drawing to be inserted into the other. We can achieve this while maintaining a straight-line drawing by choosing appropriate path decompositions; see [1, Appendix D]. The running time follows as in Theorem 3. ∎

5 Approximation Algorithm for Graphs of Higher Pathwidth

We now study the crossing number of graphs that have pathwidth , and are maximal within this class. We give an algorithm to draw such graphs, and show that the number of crossings in the resulting drawing is within a factor of of the crossing number. As opposed to Section 3, the drawings we create here are not straight-line drawings.

As before we assume that we have an alternating path decomposition of width . We again use the age-order of the vertices of . Define to be the graph induced by vertices , and use to denote the number of neighbors that has within graph . For any , let the predecessors of vertex be those neighbors that are older. We will only use this concept for , which implies that has exactly predecessors by maximality of . We enumerate them as in age-order, with the oldest.

Drawing algorithm. We create a drawing of by starting with (the graph induced by ) and then iteratively adding vertex . We maintain the following invariants for the drawing of (see also Figure 4):

  • Vertex is drawn at for all .

  • The drawing is contained in the half-space .

  • All vertices in the bag introducing are bottom-visible, i.e., the vertical ray downward from does not intersect any edge.

We start by placing at their specified coordinates, and draw the edges between them as half-circles above the -axis. This satisfies the above invariants and gives rise to crossings since crossings are in 1-to-1-correspondence with subsets of 4 vertices.

drawing of
Figure 4: The construction for higher pathwidth: edge routings when adding vertex .

Assume is drawn and consider , for . Place as specified, i.e., to the right of all previous vertices and edges. Let be the predecessors of , all of which are bottom-visible by the invariant. We draw the edges to them using two different methods (and then redraw previous edges as a third step for each ). See also Figure 4.

  • The edge to (the oldest predecessor) is routed counterclockwise around the drawing of until it is below but slightly to the left of , from where it connects to . We need no crossings, and all predecessors remain bottom-visible.

  • All other edges incident to are routed together as a bundle from leftward below the drawing of . This allows to be bottom-visible. Whenever the bundle is slightly to the right of some , , one of the bundle’s lines (the lowest one) connects to . The remaining bundle lines go counterclockwise around , in its direct vicinity, until they are to the left of and below . The bundle hence crosses every edge incident to in , but no other edges, and remains bottom-visible. This drawing scheme continues until the last bundle line connects to .

  • Finally, we redraw the edges for ; they exist by maximality. Both ends of any such edge are bottom-visible, so we can redraw it without crossing below the entire drawing, including the newly drawn edges from . We remove the previous drawings of these edges and retain bottom-visibility of the vertices in the current bag.

In the full paper [1, Appendix E] we analyze the number of crossings and obtain:

{theorem}

Let be a maximal graph of pathwidth . The described algorithm runs in linear time and finds a drawing of with at most crossings. In particular, for any constant pathwidth , we have an -approximation of the crossing number. The drawing is poly-line on a grid.

6 Conclusions and Open Questions

We have shown that the path decomposition of a graph can be used to efficiently compute or bound the crossing number of a graph. This is the first successful use of such graph decomposition for crossing numbers (besides the use of a tree decomposition in the special case that is bounded by a constant [15, 19]). Several interesting questions remain:

  • Can we attain stronger approximation results for general pathwidth- graphs? The proven ratio of may simply be due to a too weak lower bound, and we, in fact, do currently not know an instance where the algorithm does not obtain the optimum.

  • Can we approximate for arbitrary (not maximal) pathwidth--graphs?

  • In [1] we only showed weak NP-completeness for the weighted crossing number version on pathwidth-restricted graphs. Can this be strengthened to unweighted graphs?

Finally, there is of course the question whether we can use the stronger tool of tree decompositions, instead of path decompositions, to achieve crossing number results.

References

  • [1] T. Biedl, M. Chimani, M. Derka, and P. Mutzel. Crossing number for graphs with bounded pathwidth. CoRR, abs/1612.03854, 2016.
  • [2] H.L. Bodlaender. A linear-time algorithm for finding tree-decompositions of small treewidth. SIAM J. Comput., 25(6):1305–1317, 1996.
  • [3] H.L. Bodlaender and T. Kloks. Efficient and constructive algorithms for the pathwidth and treewidth of graphs. J. Algorithms, 21(2):358–402, 1996.
  • [4] D. Bokal. On the crossing numbers of cartesian products with paths. J. Comb. Theory Ser. B, 97(3):381–384, May 2007.
  • [5] S. Cabello. Hardness of approximation for crossing number. Discrete & Computational Geometry, 49(2):348–358, 2013.
  • [6] S. Cabello and B. Mohar. Crossing number and weighted crossing number of near-planar graphs. Algorithmica, 60(3):484–504, 2011.
  • [7] M. Chimani and P. Hliněný. A tighter insertion-based approximation of the crossing number. Journal of Combinatorial Optimization, pages 1–43, 2016.
  • [8] M. Chimani and P. Hliněný. Inserting multiple edges into a planar graph. In SoCG 2016, pages 30:1–30:15. LIPIcs, 2016.
  • [9] M. Chimani, P. Hliněný, and P. Mutzel. Vertex insertion approximates the crossing number for apex graphs. European Journal of Combinatorics, 33:326–335, 2012.
  • [10] J. Chuzhoy. An algorithm for the graph crossing number problem. In STOC ’11, pages 303–312. ACM, 2011.
  • [11] B. Courcelle. The monadic second-order logic of graphs. I. Recognizable sets of finite graphs. Information and Computation, 85(1):12–75, 1990.
  • [12] E. de Klerk, J. Maharry, D.V. Pasechnik, R.B. Richter, and G. Salazar. Improved bounds for the crossing numbers of and . SIAM J. Discr. Math., 20(1):189–202, 2006.
  • [13] J. Fox, J. Pach, and A. Suk. Approximating the rectilinear crossing number. In GD 2016, LNCS 9801, pages 413–426. Springer, 2016.
  • [14] I. Gitler, P. Hliněný, J. Leanos, and G. Salazar. The crossing number of a projective graph is quadratic in the face-width. Electronic Journal of Combinatorics, 15(1):#R46, 2008.
  • [15] M. Grohe. Computing crossing numbers in quadratic time. J. Comput. Syst. Sci., 68(2):285–302, 2004.
  • [16] P. Hliněný. Crossing-number critical graphs have bounded path-width. J. Comb. Theory, Ser. B, 88(2):347–367, 2003.
  • [17] P. Hliněný and M. Chimani. Approximating the crossing number of graphs embeddable in any orientable surface. In SODA ’10, pages 918–927, 2010.
  • [18] P. Hliněný and G. Salazar. Approximating the crossing number of toroidal graphs. In ISAAC ’07, LNCS 4835, pages 148–159. Springer, 2007.
  • [19] K-I. Kawarabayashi and B. Reed. Computing crossing number in linear time. In STOC ’07, pages 382–390, 2007.
  • [20] D.J. Kleitman. The crossing number of . J. of Comb. Theory, 9(4):315–323, 1970.
  • [21] M. Klešč and J. Petrillová. The crossing numbers of products of path with graphs of order six. Discussiones Mathematicae Graph Theory, 33(3):571–582, 2013.
  • [22] T. Kloks. Treewidth, Computations and Approximations. LNCS 842. Springer, 1994.
  • [23] F.T. Leighton. Complexity Issues in VLSI: Optimal Layouts for the Shuffle-exchange Graph and Other Networks. MIT Press, Cambridge, MA, USA, 1983.
  • [24] S. Pan and R.B. Richter. The crossing number of is 100. Journal of Graph Theory, 56(2):128–134, 2007.
  • [25] R.B. Richter and G. Salazar. The crossing number of . Graphs and Combinatorics, 18(2):381–394, 2002.
  • [26] M. Schaefer. The graph crossing number and its variants: A survey. Electronic Journal of Combinatorics, #DS21, May 15, 2014.
  • [27] I. Vrt’o. Crossing numbers of graphs: A bibliography. ftp://ftp.ifi.savba.sk/pub/imrich/crobib.pdf, 2014.
  • [28] D.R. Wood and J.A. Telle. Planar decompositions and the crossing number of graphs with an excluded minor. New York J. Math., 13:117–146, 2007.

Appendix A NP-hardness of weighted crossing number

Figure 5: (left) A drawing of for . Edges of are bold red. (center) An equivalent straight-line drawing. (right) , viewed as Möbius-strip, with a path decomposition of width .

The weighted rectilinear crossing number problem asks: Given a graph , edge weights , and a threshold , is there a straight-line drawing of such that

In this section, we prove the following:

{theorem}

The weighted and weighted rectilinear crossing number problems are weakly NP-hard already for (maximal) pathwidth- graphs that have non-weighted crossing number .

Our reduction is from Partition, defined as follows. Given positive integers with , does there exist a such that . Given a Partition instance , define graph as described in the proof sketch as a -cycle and chords with weight for . We must show that is a yes-instance if and only if has a straight-line drawing with , where depends only on .

Assume first that there exists some with . Figure 5 shows how to create a straight-line drawing of : Place vertices on the left legs of an -shape, and vertices on the right legs of the , using the upper/lower leg depending on whether . With the help of and , the cycle can then be completed without crossing.

Consider a pair with and . Then is drawn between the two upper legs of the (hence inside ) and while is drawn between the two lower legs of the (hence outside ), which means that they cannot cross. Also no edge of has a crossing. In consequence, the number of crossings is at most

as desired.

For the other direction, assume that we have a straight-line drawing of with . Since , no edge of can have a crossing. Define to be the indices of all those edges that are drawn inside . Any two such edges must cross each other, since the order of their endpoints is interleaved on . Likewise, any two edges with must cross each other. In consequence, we have

Define (note that could be positive or negative). Then

But we assumed , which implies and hence as desired.

Appendix B Proof of Theorem 3

We explain how to place points for the algorithm in Section 3 so that the resulting drawing has linear coordinates. This involves a paradigm-shift in explaining how the drawing is created. In Section 3, we added vertices from the point of view of adding cluster . This added half of the singletons near , and the other half near . We now change this around, and describe the algorithm in terms of all those singletons (coming from both and ) that need to be added near one edge