Counting the number of crossings in geometric graphs☆
Introduction
A geometric graph is a graph whose vertices are points in general position in the plane; and its edges are straight line segments joining these points. A pair of edges of a geometric graph cross if they intersect in their interior; the number of crossings of a geometric graph is the number of pairs of its edges that cross. Let be a geometric graph on n vertices; and let H be a graph. If G and H are isomorphic as graphs then we say that G is a rectilinear drawing of H. The rectilinear crossing number of H is the minimum number of crossings that appear in all of its rectilinear drawings. We abuse notation and use and to denote the rectilinear crossing number of H and the number of crossings of G, respectively.
Computing the rectilinear crossing number of the complete graph on n vertices is an important and well known problem in Combinatorial Geometry. The current best bounds on are The lower bound is due to Ábrego, Fernández-Merchant, Leaños and Salazar [1]. The upper bound is due to Fabila-Monroy and López [6]. In an upcoming paper, Aichholzer, Duque, Fabila-Monroy, García-Quintero and Hidalgo-Toscano [2] have further improved the upper bound to For more information on crossing numbers (rectilinear or other variants) we recommend the survey by Schaefer [8].
A notable property of the improvements of [6], [2] on the upper bound of is that they rely on finding rectilinear drawings of with few crossings, for some specific values of n; this is done via heuristics that take a rectilinear drawing of and move its vertices in various ways with the aim of decreasing the number of crossings. In this approach it is instrumental that the computation of the number of crossings is done as fast as possible. In this paper we present an algorithm to compute in time. We hope that our algorithm will pave the way for finding new upper bounds on the rectilinear crossing number of various classes of graphs.
The current best algorithm for counting the number of intersections among a set of m line segments in the plane runs in time; it was given by Chazelle [4]. This provides an time algorithm for computing ; this running time can be as high as when G has a quadratic number of edges. The running time can be improved for some classes of geometric graphs: when G is a complete geometric graph, Rote, Woeginger, Zhu, and Wang [7] give an time algorithm for computing ; and Waddle and Malhotra [9] give an algorithm for computing when G is a bilayered graph. For layered graphs and convex geometric graphs a slight modification of our algorithm runs in time.
Section snippets
The algorithm
In what follows let be a geometric graph on n vertices. We make some general position assumptions: no two vertices of G have the same x-coordinate nor the same y-coordinate; and no two edges of G are parallel. In [6], the authors give an time algorithm for computing when G is a complete geometric graph; the authors define “patterns” on the set of vertices of G; these patterns can be computed in time and depends on the number of these patterns. We follow a
Faster algorithms for special classes of graphs
Of the four steps of our algorithm, only Step 3 takes superquadratic time. Moreover, the numbers and are only used as a starting point for computing and in Lemma 5. If we can compute in time, for each vertex u of G, the number of edges of G that cross two open rays with apex u and in parallel but opposite directions then we can compute in time. We pose the following conjecture. Conjecture 1 For every geometric graph G on n vertices, can be computed in
Declaration of Competing Interest
I hereby declare that neither I, nor my coauthors, have a conflict of interests regarding the reviewing and publication of the manuscript “Counting the Number of Crossings in Geometric Graphs” by Frank Duque, César Hernández-Vélez, Carlo Hidalgo-Toscano and myself.
Acknowledgements
This work was initiated at the 2nd Reunion of Optimization, Mathematics, and Algorithms (ROMA 2018), held in Mexico city, 2018. We thank the anonymous reviewer whose comments substantially improved the presentation of this paper.
References (9)
- et al.
A central approach to bound the number of crossings in a generalized configuration
- et al.
Counting k-subsets and convex k-gons in the plane
Inf. Process. Lett.
(1991) - et al.
An ongoing project to improve the rectilinear and the pseudolinear crossing constants
J. Graph Algorithms Appl.
(2020) - et al.
Selected open problems in graph drawing