Keywords

1 Introduction

For a drawing of a non-planar graph G in the plane it is of interest from both a theoretical and practical point of view, to minimize the number of crossings. The minimum such number is known as the crossing number \({\text {cr}}(G)\) of G. There are many variants on crossing numbers, see the comprehensive dynamic survey of Schaefer [25]. In this paper we focus on a version combining two of them: the k-planar crossing number and the rectilinear crossing number.

The k-planar crossing number \({\text {cr}}_k(G)\) of a graph G is the minimum of \({\text {cr}}(G_1)+\cdots +{\text {cr}}(G_k)\) over all sets of k graphs \(\{G_1, \ldots , G_k\}\) whose union is G. For \(k=2\), it was introduced by Owens [22] who called it the biplanar crossing number; see [13, 14] for a survey on biplanar crossing numbers. Shahrokhi et al. [26] introduced the generalization to \(k \ge 2\).

A straight-line drawing of G is a drawing D of G in the plane in which the vertices are drawn as points in general position, that is, no three points on a line, and the edges are drawn as straight line segments. We identify the vertices and edges of the underlying abstract graph with the corresponding ones in the straight-line drawing. The rectilinear crossing number of G, \(\overline{{\text {cr}}}(G)\), is the minimum number of pairs of edges that cross in any straight-line drawing of G. Of special relevance is \(\overline{{\text {cr}}}(K_n)\), the rectilinear crossing number of the complete graph on n vertices. The current best published bounds on \(\overline{{\text {cr}}}(K_n)\) are \(0.379972\left( {\begin{array}{c}n\\ 4\end{array}}\right)< \overline{{\text {cr}}}(K_n) < 0.380473 \left( {\begin{array}{c}n\\ 4\end{array}}\right) +\varTheta (n^3)\) [3, 16]. The upper bound was achieved using a duplication process and has been improved in an upcoming paper [6] to \(\overline{{\text {cr}}}(K_n) < 0.38044921 \left( {\begin{array}{c}n\\ 4\end{array}}\right) +\varTheta (n^3).\)

A k-edge-coloring of a drawing D of a graph is an assignment of one of k possible colors to every edge of D. The rectilinear k-colored crossing number of a graph G, \(\overline{{\text {cr}}}_k(G)\), is the minimum number of monochromatic crossings (pairs of edges of the same color that cross) in any k-edge-colored straight-line drawing of G. This parameter was introduced before and called the geometric k-planar crossing number [23]. In the same paper, as well as in [26], also the rectilinear k-planar crossing number was considered, which asks for the minimum of \(\overline{{\text {cr}}}(G_1)+\ldots +\overline{{\text {cr}}}(G_k)\) over all sets of k graphs \(\{G_1, \ldots , G_k\}\) whose union is G. We prefer our terminology because the terms geometric and rectilinear are very often used interchangeably and because the term k-planar is extensively used in graph drawing with a different meaning; see for example [15, 20]. We remark that in graph drawing, rectilinear sometimes also refers to orthogonal grid drawings (which is not the case here).

In this paper we focus on the case where G is the complete graph \(K_n\), and we prove the following lower and upper bounds on \(\overline{{\text {cr}}}_2(K_n)\):

$$\begin{aligned} 0.03 \left( {\begin{array}{c}n\\ 4\end{array}}\right) +\varTheta (n^3)< \overline{{\text {cr}}}_2(K_n) < 0.11798016\left( {\begin{array}{c}n\\ 4\end{array}}\right) +\varTheta (n^3). \end{aligned}$$

Our approach is based on theoretical results that guarantee asymptotic bounds from the information of small point sets. Thus, it implies computationally dealing with small sets, both to guarantee a minimum amount of monochromatic crossings (for the lower bound) and to find examples with few monochromatic crossings and some other desired properties (for the upper bound).

From an algorithmic point of view, the decision variant of the crossing number problem was shown to be NP-complete for general graphs already in the 1980s by Garey and Johnson [18]. The version for straight-line drawings is also known to be NP-hard, and actually, computing the rectilinear crossing number is \(\exists \mathbb {R}\)-complete [19]. So whenever considering crossing numbers, it is rather likely that one faces computationally difficult problems.

In our case the challenge is twofold. On the one hand, we need to optimize the point configuration (order type) to obtain a small number of crossings, which is the original question about the rectilinear crossing number of \(K_n\). On the other hand, we need to determine a coloring of the edges of \(K_n\) that minimizes the colored crossing number for a fixed point set.

For the first problem there is not even a conjecture of point configurations that minimize the rectilinear crossing number of \(K_n\) for any n. The latter problem corresponds to finding a maximum cut in a segment intersection graph, which in general is NP-complete [9]. Moreover, these two problems are not independent. There exist examples where a point set with a non-minimal number of uncolored crossings allows for a coloring of the edges so that the resulting colored crossing number is smaller than the best colored crossing number obtained from a set minimizing the uncolored crossing number. Thus, the two optimization processes need to interleave if we want to guarantee optimality. But, as we will see in Sect. 2, even this combined optimization does not guarantee to yield the best asymptotic result. There are sets of fixed cardinality and with larger 2-colored crossing number which—due to an involved duplication process—give a better asymptotic constant than the best minimizing sets. This is in contrast to the uncolored setting [2, 3], where for any fixed cardinality, sets with a smaller crossing number always give better asymptotic constants. Also, it clearly indicates that our extended duplication process for 2-colored crossings differs essentially from the original version.

As mentioned, drawings with few crossings do not necessarily admit a coloring with few monochromatic crossings. This observation motivates the following question: given a fixed straight-line drawing D of \(K_n\), what is the ratio between the number of monochromatic crossings for the best 2-edge-coloring of D and the number of (uncolored) crossings in D? A simple probabilistic argument shows that this ratio is less than 1/2. In Sect. 4, we improve that bound, showing that for sufficiently large n, it is less than \(1/2-c\) for some positive constant c.

In a slight abuse of notation, we denote with \(\overline{{\text {cr}}}(D)\) the number of pairs of edges in D that cross and call it the rectilinear crossing number of D. The (rectilinear) 2-colored crossing number of a straight-line drawing D, \(\overline{{\text {cr}}}_2(D)\), is then the minimum of \(\overline{{\text {cr}}}(D_1)+\overline{{\text {cr}}}(D_2)\), over all pairs of straight-line drawings \(\{D_1, D_2\}\) whose union is D. For a given 2-edge-coloring \(\chi \) of D, we denote with \(\overline{{\text {cr}}}_2(D,\chi )\) the number of monochromatic crossings in D. Thus, \(\overline{{\text {cr}}}_2(D)\) is the minimum of \(\overline{{\text {cr}}}_2(D,\chi )\) over all 2-edge-colorings \(\chi \) of D.

Outline. In Sect. 2 we prove that, given a 2-colored straight-line drawing D of \(K_n\), there is a duplication process that allows us to obtain a 2-colored straight-line drawing \(D_k\) of \(K_{2^kn}\) for any \(k \ge 1\) whose 2-colored crossing number \(\overline{{\text {cr}}}_2 (D_k)\) can be easily calculated. Moreover, we can obtain the asymptotic value when \(k\rightarrow \infty \). By finding good sets of constant size as a seed for the duplication process, we obtain an asymptotic upper bound for \(\overline{{\text {cr}}}_2(K_n)\). In Sect. 3 we obtain a lower bound for \(\overline{{\text {cr}}}_2(K_n)\) using the crossing lemma, and we improve it with an approach again using small drawings. For sufficiently large n, we show in Sect. 4 that for any straight-line drawing D of \(K_n\), \({\overline{{\text {cr}}}_2(D)}/{\overline{{\text {cr}}}(D)} < 1/2 - c\) for a positive constant c, that is, using two colors saves more than half of the crossings. Finally, in Sect. 5 we present some open problems.

2 Upper Bounds on \(\overline{{\text {cr}}}_2(K_n)\)

For the rectilinear crossing number \(\overline{{\text {cr}}}(K_n)\), the best upper bound [6] comes from finding examples of straight-line drawings of \(K_n\) (for a small value of n) with few crossings which are then used as a seed for the duplication process in [2, 3]. To be able to apply this duplication process, the starting set P with m points has to contain a halving matching. If m is even (odd), a halving line of P is a line that passes exactly through two (one) points of P and leaves the same number of points of P to each side. If it is possible to match each point p of P with a halving line of P through this point in such a way that no two points are matched with the same line, P is said to have a halving matching. It is then shown in [2] that every point of P can be substituted by a pair of points in its close neighborhood such that the resulting set Q with 2m points contains again a halving matching. Iterating this process leads to the mentioned upper bound for \(\overline{{\text {cr}}}(K_n)\), where this bound depends only on m and the number of crossings of the starting set P.

In this section, we prove that a significantly more involved but similar approach can be adopted for the 2-colored case. Unlike the original approach, we cannot always get a matching which simultaneously halves both color classes. Moreover, even for sets where such a halving matching exists, it cannot be guaranteed that this property is maintained after the duplication step. We will see below that we need a more involved approach, where the matchings are related to the distribution of the colored edges around a vertex. Consequently, the number of crossings which are obtained in the duplication, and thus, the asymptotic bound we get, not only depends on the 2-colored crossing number of the starting set, but also on the specific distribution of the colors of the edges. In that sense, both the heuristics for small drawings and the duplication process for the 2-colored crossing number differ significantly from the uncolored case.

Throughout this section, P is a set of m points in general position in the plane, where m is even. Let p be a point in P. By slight abuse of notation, in the following we do not distinguish between a point set and the straight-line drawing of \(K_n\) it induces. Given a 2-coloring \(\chi \) of the edges induced by P, we denote by \(L(p)\) and \(S(p)\) the edges incident to \(p\in P\) of the larger and smaller color class at p, respectively. An edge \(e=(p,q)\) incident to p is called a \(\chi \) -halving edge of p if the number of edges of \(L(p)\) to the right of the line \(\ell _e\) spanned by e (and directed from q to p) and the number of edges of \(L(p)\) to the left of \(\ell _e\) differ by at most one. A matching between the points of P and their \(\chi \)-halving edges is called a \(\chi \) -halving matching for P.

Theorem 1

Let P be a set of m points in general position and let \(\chi \) be a 2-coloring of the edges induced by P. If P has a \(\chi \)-halving matching, then the 2-colored rectilinear crossing number of \(K_n\) can be bounded by

$$\begin{aligned} \overline{{\text {cr}}}_2 (K_n) \le \frac{24 A}{m^4} \left( {\begin{array}{c}n\\ 4\end{array}}\right) + \varTheta (n^3) \end{aligned}$$

where A is a rational number that depends on P, \(\chi \), and the \(\chi \)-halving matching for P.

Proof

First we describe a process to obtain from P a set Q of 2m points, a 2-edge-coloring \(\chi '\) of the edges that Q induces, and a \(\chi '\)-halving matching for Q. The set Q is constructed as follows. Let p be a point in P and \(e = (p, q)\) its \(\chi \)-halving edge in the matching. We add to Q two points \(p_1, p_2\) placed along the line spanned by e and in a small neighborhood of p such that:

  1. (i)

    if f is an edge different from e that is incident to p, then \(p_1\) and \(p_2\) lie on different sides of the line spanned by f;

  2. (ii)

    if f is an edge different from e that is not incident to p, then \(p_1\) and \(p_2\) lie on the same side of the line spanned by f as p; and

  3. (iii)

    the point \(p_1\) is further away from q than \(p_2\).

The set Q has 2m points and the above conditions ensure that they are in general position.

Next, we define a coloring \(\chi '\) and a \(\chi '\)-halving matching for Q. For every edge (pq) of P, we color the four edges \((p_i, q_j), i,j \in \{1, 2\}\) with the same color as (pq). Hence, the only edges remaining to be colored are the edges \((p_1,p_2)\) between the duplicates of a point \(p\in P\). Let \(\ell _e\) be the line spanned by e and directed from q to p. Further, let \(q_1\) and \(q_2\) be the points that originated from duplicating q, such that \(q_1\) lies to the left of \(\ell _e\) and \(q_2\) lies to the right of \(\ell _e\). Denote by \(L_l(p)\) and \(L_r(p)\) the number of edges in \(L(p)\) to the left and right of e, respectively. Analogously, denote by \(S_l(p)\) and \(S_r(p)\) the number edges in \(S(p)\) to the left and right of e. For the following case distinction, we assume that the colors are red and blue and that the larger color class at p is blue.

There are six cases in which p can fall, depending on the color of the edge e and on the relation between the numbers \(L_l(p)\) and \(L_r(p)\) of blue edges incident to p on the left and the right side of \(\ell _e\); see Fig. 1. The edge e of P has color red in the first three cases and color blue in the last three cases. The edge \((p_1,p_2)\) receives color blue in Cases 1 and 3, and color red in the remaining cases. The thick edges in Fig. 1 represent the matching edges for \(p_1\) and \(p_2\) in Q, where the arrow points to the point it is matched with. For each of \(p_1\) and \(p_2\), the resulting numbers of incident red and blue edges that are to the left and to the right of the line spanned by the matching edge are written next to those lines in the figure. They also show that the matching edges are indeed \(\chi '\)-halving edges in each case. A detailed case distinction can be found in the full version [7].

Having completed the coloring \(\chi '\) for the edges induced by Q, we next consider the number of monochromatic crossings in the resulting drawing on Q. We claim the following for \(\overline{{\text {cr}}}_2(Q, \chi ')\):

Fig. 1.
figure 1

The cases in the duplication process of Theorem 1 when the larger color class at p is blue.The dotted lines represent the lines spanned by the \(\chi \)-halving matching edges for P. The numbers of blue (red) edges at p to the left and right of \(l_e\), is denoted with \(L_l\) and \(L_r\) (\(S_l\) and \(S_r\)), respectively. (Color figure online)

Claim 1

The pair \((Q,\chi ')\) satisfies

$$\begin{aligned} \overline{{\text {cr}}}_2(Q,\chi ')&= 16\ \overline{{\text {cr}}}_2(P,\chi ) + \left( {\begin{array}{c}m\\ 2\end{array}}\right) - m \\&+\, 4\sum _p \left( \left( {\begin{array}{c}L_l(p)\\ 2\end{array}}\right) + \left( {\begin{array}{c}L_r(p)\\ 2\end{array}}\right) + \left( {\begin{array}{c}S_l(p)\\ 2\end{array}}\right) + \left( {\begin{array}{c}S_r(p)\\ 2\end{array}}\right) \right) \\&+\, 2 \sum _p (H_l(p) + H_r(p)). \end{aligned}$$

The proof of this claim follows the same counting technique used in [2]. The proof can be found in the full version [7].

We now apply the duplication process multiple times. To this end, consider again the six different cases for a point \(p\in P\) when obtaining a coloring and a matching for Q. Note that if one of the Cases 1, 2, 3, 4 and 6 applies for p, then the same case applies for its duplicates \(p_1,p_2 \in Q\) (and will apply in all further duplication iterations). If p falls in Case 5, then for \(p_1\) and \(p_2\) we have Case 2 and 4, respectively. As no point in Q falls in Case 5, from now on, we assume that P is such that no point of P falls in Case 5 either.

Let \(k \ge 1\) be an integer and let \((Q_{k},\chi _{k})\) be the pair obtained by iterating the duplication process k times, with \((Q_0,\chi _0)=(P,\chi )\). We claim the following on \(\overline{{\text {cr}}}_2(Q_k, \chi _k)\), the number of monochromatic crossings in the 2-edge-colored drawing of \(K_n\) induced by \(Q_k\) and \(\chi _k\):

Claim 2

After k iterations of the duplication process, the following holds

$$\begin{aligned} \overline{{\text {cr}}}_2(Q_k,\chi _k) = A\cdot 2^{4k} + B\cdot 2^{3k} + C\cdot 2^{2k} + D\cdot 2^{k} \end{aligned}$$

where ABC and D are rational numbers that depend on P and its \(\chi \)-halving matching.

The proof of this claim uses a careful analysis of the structure of \((Q_k,\chi _k)\) in dependence of \((P,\chi )\) and the \(\chi \)-halving matching for P. This analysis, followed by involved calculations to obtain the statement of Claim 2, can be found in the full version [7]. Applying Claim 2 to an initial drawing on m vertices and letting \(n = 2^km\), we get:

$$\begin{aligned} \overline{{\text {cr}}}_2(K_n) \le \overline{{\text {cr}}}_2(Q_k,\chi _k) = \frac{24 A}{m^4} \left( {\begin{array}{c}n\\ 4\end{array}}\right) + \varTheta (n^3) \end{aligned}$$

which completes the proof of Theorem 1 when n is of the form \(2^km\). The proof for \(2^km< n < 2^{k+1}m\) then follows from the fact that \(\overline{{\text {cr}}}_2(K_n)\) is an increasing function.   \(\square \)

We remark that the duplication process described in the proof of Theorem 1 can also be applied if the initial set P has odd cardinality. However, then it might happen that the resulting matching is not \(\chi '\)-halving for the resulting set Q. Moreover, a similar process can even be applied with any matching between the points of P and the edges induced by P, where in that situation one needs to specify how the colors for the edges between duplicates of points (and possibly a matching for the resulting set) is chosen.

In the uncolored duplication process for obtaining bounds on \(\overline{{\text {cr}}}(K_n)\), halving matchings always yield the best asymptotic behavior, which only depends on |P| and \(\overline{{\text {cr}}}(P)\). This is not the case for the 2-colored setting, where we ideally would like to achieve simultaneously for every point \(p\in P\) that (i) both color classes are of similar size, (ii) both color classes are evenly split by the matching edge, and (iii) \(\overline{{\text {cr}}}_2(P)\) is small. Yet, this is in general not possible. Starting with a \(\chi \)-halving matching for P we obtain (ii) at least for the larger color class at every point of P. Moreover, this is hereditary by the design of our duplication process.

The results of this section imply that for large cardinality we can obtain straight-line drawings of the complete graph with a reasonably small 2-colored crossing number by starting from good sets of constant size. Similar as in [6] we apply a heuristic combining different methods to obtain straight-line drawings of the complete graph with low 2-colored crossing number. Our heuristic iterates three steps of (1) locally improving a set, (2) generating larger good sets, and (3) extracting good subsets, where also after steps (2) and (3) a local optimization is done. The currently best (with respect to the crossing constant, see below) straight-line drawing D with 2-edge coloring \(\chi \) we found in this wayFootnote 1 has \(n= 135\) vertices, a 2-colored crossing number of \(\overline{{\text {cr}}}_2(D,\chi ) = 1470756\), and contains a \(\chi \)-halving matching.

Let \(\overline{{\text {cr}}}_2\) be the rectilinear 2-colored crossing constant, that is, the constant such that the best straight-line drawing of \(K_n\) for large values of n has at most \(\overline{{\text {cr}}}_2 {n \atopwithdelims ()4}\) monochromatic crossings. Its existence follows from the fact that the limit \(\lim _{n\rightarrow \infty } \overline{{\text {cr}}}_2(K_n)/{n\atopwithdelims ()4}\) exits and is a positive number (the proof goes along the same lines as for the uncolored case [24]). Using the above-mentioned currently best straight-line 2-edge colored drawing and plugging it into the machinery developed in the proof of Theorem 1 we get

Theorem 2

The rectilinear 2-colored crossing constant satisfies

$$\begin{aligned} \overline{{\text {cr}}}_2 \le \frac{182873519}{1550036250}< 0.11798016. \end{aligned}$$

In [3] a lower bound of \(\overline{{\text {cr}}}\ge \frac{277}{729} > 0.37997267\) has been shown for the rectilinear crossing constant. We can thus give an upper bound on the asymptotic ratio between the best rectilinear 2-colored drawing of \(K_n\) and the best rectilinear drawing of \(K_n\) of \(\overline{{\text {cr}}}_2 / \overline{{\text {cr}}}\le 0.31049652\).

3 Lower Bounds on \(\overline{{\text {cr}}}_2(K_n)\)

In this section we consider lower bounds for the 2-colored crossing number and the biplanar crossing number of \(K_n\).

In related work [23], the authors present lower and upper bounds on the \(\sup {\overline{{\text {cr}}}_k (G)}/{\overline{{\text {cr}}}(G)}\) where the supremum is taken over all non-planar graphs. We remark that this lower bound does not yield a lower bound for \(\overline{{\text {cr}}}_2(K_n)\) as their bound is obtained for “midrange” graphs (graphs with a subquadratic but superlinear number of edges). Czabarka et al. mention a lower bound on the biplanar crossing number of general graphs depending on the number of edges [14, Equation 3]. For the complete graph, this yields a lower bound of \(\overline{{\text {cr}}}_2(K_n) \ge 1/1944 n^4 - O(n^3)\). A better bound of \(\overline{{\text {cr}}}_2 \ge \frac{24}{29\cdot 32} = 3/116 > 1/39\) can be obtained from (an improved version of) the crossing lemma [4, 21], which states that for an undirected simple graph with n vertices and e edges with \(e > 7n\), the crossing number of the graph is at least \(\frac{e^3}{29n^2}\).

Fig. 2.
figure 2

Left: a 2-colored rectilinear drawing of \(K_8\) without monochromatic crossings.Right: a 2-colored drawing of \(K_9\) with only one monochromatic (red) crossing. (Color figure online)

Alternatively, the following result shows that from the 2-colored rectilinear crossing number of small sets we can obtain lower bounds for larger sets.

Lemma 1

Let \(\overline{{\text {cr}}}_2({m})=\hat{c}\) for some \(m \ge 4\). Then for \(n>m\) we have \(\overline{{\text {cr}}}_2(K_n) \ge \frac{24 \hat{c}}{m(m-1)(m-2)(m-3)}{n \atopwithdelims ()4}\) which implies \(\overline{{\text {cr}}}_2 \ge \frac{24 \hat{c}}{m(m-1)(m-2)(m-3)}\).

Proof

Every subset of m points of \(K_n\) induces a drawing with at least \(\hat{c}\) crossings, and thus we have \(\hat{c}{n \atopwithdelims ()m}\) crossings in total. In this way every crossing is counted \({{n-4} \atopwithdelims (){m-4}}\) times. This results in a total of \(\frac{24 \hat{c}}{m(m-1)(m-2)(m-3)}{n \atopwithdelims ()4}\) crossings.   \(\square \)

As \(K_8\) can be drawn such that \(\overline{{\text {cr}}}_2(K_8)=0\) (see Fig. 2 left) we next determine \(\overline{{\text {cr}}}_2(K_9)\). We use the optimization heuristic mentioned from Sect. 2 to obtain good colorings for all 158 817 order types of \(K_9\) (which are provided by the order type data base [5]). In this way, it is guaranteed that all (crossing-wise) different straight-line drawings of \(K_9\) (uncolored) are considered.

To prove that the heuristics indeed found the best colorings we consider the intersection graph for each drawing D. In the intersection graph every edge in D is a vertex, and two vertices are connected if their edges in D cross. Note that each odd cycle in the intersection graph of D gives rise to a monochromatic crossing in D. On the other hand, several odd cycles might share a crossing and only one monochromatic crossing is forced by them. We thus set up an integer linear program, where for every crossing of D we have a non-negative variable and for each odd cycle the sum of the variables corresponding to the crossings of the cycle has to be at least 1. The objective function aims to minimize the sum of all variables, which by construction is a lower bound for the number of monochromatic crossings in D.

With that program and some additional methods for speedup (see [17] for details), we have been able to obtain matching lower bounds and hence determine the 2-colored crossing numbers for all order types of \(K_9\) within a few hours. The best drawings we found have 2 monochromatic crossings, and thus \(\overline{{\text {cr}}}_2(K_9)=2\). Using Lemma 1 for \(m=9\) and \(\hat{c}=2\) we get a bound of \(\overline{{\text {cr}}}_2 \ge 1/63\), which is worse than what we obtained from the crossing lemma. Repeating the process of computing lower bounds for sets of small cardinality, we checked all order types of size up to 11 [8] and obtained \(\overline{{\text {cr}}}_2(K_{10})=5\) and \(\overline{{\text {cr}}}_2(K_{11})=10\). By Lemma 1, the latter gives the improved lower bound of \(\overline{{\text {cr}}}_2 \ge 1/33\).

3.1 Straight-Line Versus General Drawings

The best straight-line drawings of \(K_n\) with \(n \le 8\) have no monochromatic crossing, see again Fig. 2 left. In [23, Section 3], the authors state that no graph is known were the k-planar crossing number is strictly smaller than the rectilinear k-planar crossing number for any \(k \ge 2\). Moreover, according to personal communication [27], the similar question whether a graph exists where the k-planar crossing number is strictly smaller than the rectilinear k-colored crossing number was open. We next argue that \(K_9\) is such an example. From the previous section we know that \(\overline{{\text {cr}}}_2(K_9)=2\). Inspecting rotation systems for \(n=9\) [1] which have the minimum number of 36 crossings, we have been able to construct a drawing of \(K_9\) which has only one monochromatic crossing, see Fig. 2 right. As the graph thickness of \(K_9\) is 3 [12, 28], we cannot draw \(K_9\) with just two colors without monochromatic crossings. Thus, we get the following result.

Observation 1

The biplanar crossing number for \(K_9\) is 1 and is thus strictly smaller than the rectilinear 2-colored crossing number \(\overline{{\text {cr}}}_2(K_9)=2\).

4 Upper Bounds on the Ratio \(\overline{{\text {cr}}}_2(D)/\overline{{\text {cr}}}(D)\)

In this section we study the extreme values that \({\overline{{\text {cr}}}_2(D)}/{\overline{{\text {cr}}}(D)}\) can attain for straight-line drawings D of \(K_n\). Using a simple probabilistic argument as in [23], 2-coloring the edges uniformly at random, it can be shown that \(\overline{{\text {cr}}}_2(D)/\overline{{\text {cr}}}(D) < 1/2\) for every straight-line drawing D, even if the underlying graph is not \(K_n\).

In the following, we show that for \(K_n\) this upper bound on \({\overline{{\text {cr}}}_2(D)}/{\overline{{\text {cr}}}(D)}\) can be improved. To obtain our improved bound, we find subdrawings of D and colorings such that many of the crossings in these drawings are between edges of different colors. To this end, we need to find large subsets of vertices of D with identical geometric properties. We use the following definition and theorem. Let \((Y_1,..., Y_k)\) be a tuple of finite subsets of points in the plane. A transversal of \((Y_1,..., Y_k)\) is a tuple of points \((y_1,\dots ,y_k)\) such that \(y_i \in Y_i\) for all i.

Theorem 3 (Positive fraction Erdős-Szekeres theorem)

For every integer \(k \ge 4\) there is a constant \(c_k > 0\) such that every sufficiently large finite point set \(X \subset \mathbb {R}^2\) in general position contains k disjoint subsets \(Y_1,\dots ,Y_k\), of size at least \(c_k|X|\) each, such that each transversal of \((Y_1,\dots ,Y_k)\) is in convex position.

The Positive Fraction Erdős-Szekeres theorem was proved by Bárány and Valtr [11], see also Matoušek’s book [21]. Although it is not stated in the theorem, every transversal of the \(Y_i\) has the same (labelled) order type. Making use of that result we obtained the following theorem.

Theorem 4

There exists an integer \(n_0>0\) and a constant \(c>0\) such that for any straight-line drawing D of \(K_n\) on \(n \ge n_0\) vertices, \({\overline{{\text {cr}}}_2(D)}/{\overline{{\text {cr}}}(D)} < \frac{1}{2}-c.\)

Proof

Let \(c_4\) be as in Theorem 3 and let \(n_0\) be such that Theorem 3 holds for \(k=4\) and for point sets with at least \(n_0\) points. Let D be a straight-line drawing of \(K_n\), where \(n \ge n_0\).

Our general strategy is as follows. We first find subsets of edges of D that can be 2-colored such that many of the crossings between these edges are between pairs of edges of different colors. We remove these edges and search for a subset of edges with the same property. We repeat this process as long as possible. We 2-color the remaining edges so that at most half of the crossings are monochromatic. Afterwards, we put back the edges we removed while 2-coloring them in a convenient way.

We define a sequence of subsets \(V=X_0 \supset X_1 \supset \cdots \supset X_m\) of vertices of D, where \(V=X_0\) is the set of vertices of D, and tuples \((F_1, F_1'),\dots , (F_m,F_m')\) of sets of edges of D as follows. Suppose that \(X_i\) has been defined. If \(|X_i| < n_0\), we stop the process. Otherwise we apply Theorem 3 to \(X_i\), to obtain a tuple \((Y_1, Y_2, Y_3, Y_4)\) of disjoint subsets of points \(X_i\), each with exactly \(\left\lfloor c_4 |X_i| \right\rfloor \) vertices, such that every transversal \((y_1, y_2, y_3, y_4)\) of \((Y_1, Y_2, Y_3, Y_4)\) is a convex quadrilateral. Without loss of generality we assume that \((y_1, y_2, y_3, y_4)\) appear in clockwise order around this quadrilateral. This implies that the edge \((y_1, y_3)\) crosses the edge \((y_2, y_4)\). Let \(F_i\) be the set of edges with an endpoint in \(Y_1\) and an endpoint in \(Y_3\); let \(F_i'\) be the set of edges with an endpoint in \(Y_2\) and an endpoint in \(Y_4\); and finally, let \(X_{i+1}=X_i\setminus (Y_1 \cup Y_2)\). Note that every edge in \(F_i\) crosses every edge in \(F_i'\).

We now consider the remaining edges. Let \(\overline{F}\) be the set of edges of D that are not contained in any \(F_i\) nor in any \(F_i'\) for \(1\le i \le m\). Let H be the straight-line drawing with the same vertices as D and with edge set equal to \(\overline{F}\). By a probabilistic argument 2-coloring the edges uniformly at random, there is a coloring \(\chi '\) of the edges of H so that \(\overline{{\text {cr}}}(H) / \overline{{\text {cr}}}_2(H,\chi ') \ge 2\).

We now 2-color the edges in \(F_i\) and \(F_i'\). We define a sequence of straight-line drawings \(H=D_{m+1}, \subset D_{m} \subset \cdots \subset D_{0}=D\) and a corresponding sequence of 2-edge-colorings \(\chi '=\chi _{m+1},\chi _{m},\dots ,\chi _0=\chi \) that satisfies the following. Each \(\chi _i\) is a 2-edge-coloring of \(D_{i}\). Also \(\chi _{i-1}\) when restricted to \(D_{i}\) equals \(\chi _{i}\). Suppose that \(D_{i}\) and \(\chi _i\) have been defined and that \(0 < i \le m+1\). Let \(D_{i-1}\) be the straight-line drawing with the same vertices as D and with edge set \(E_{i-1}\) equal to \(E_{i}\cup F_{i-1} \cup F_{i'-1}\) (where \(E_{i}\) is the edge set of \(D_{i}\)). Since \(\chi _{i-1}\) coincides with \(\chi _i\) in the edges of \(E_i\), we only need to specify the colors of \(F_{i-1}\) and \(F_{i-1}'\). We color the edges of \(F_{i}\) with the same color and the edges of \(F_{i-1}'\) with the other color. There are two options for doing this, and one of them guarantees that at most half of the crossings between an edge of \(F_{i-1} \cup F_{i-1}'\) and an edge of \(D_i\) are monochromatic. We choose this option to define \(\chi _{i-1}\).

In what follows we assume that D has been colored by \(\chi \). Let C be the set of pairs of edges of D that cross. Of these, let \(C_1\) be the subset of pairs of edges such that both of them are contained in \(F_i \cup F_i'\) for some \(1\le i\le m\). Let \(C_2:=C \setminus C_1\). Note that, by construction of \(\chi \), at most half of the pairs of edges in \(C_2\) are of edges of the same color. For a given i, let \(E'_i\) be the subset of pairs of edges in \(C_1\) such that both edges are in \(F_i \cup F_i'\). Let \((Y_1, Y_2, Y_3, Y_4)\) be the tuple of disjoint subsets of points \(X_i\) used to define \(F_i\) and \(F_i'\). Recall that each \(Y_i\) consists of \(\lfloor c_4 |X_i| \rfloor \) points. Every pair of crossing edges defines a convex quadrilateral and, conversely, every convex quadrilateral defines a unique pair of crossing edges. Therefore, by construction there at most \({c_4}^4 \lfloor |X_i| \rfloor ^4/2\) pairs of edges in \(E'_i\) such that both edges are of the same color; and there are exactly \(\lfloor {c_4}|X_i| \rfloor ^4\) pairs of edges in \(E'_i\) such that the edges are of different color. Thus, at most \(\frac{1}{3}\) of the pairs of edges in \(E'_i\) are edges of the same color.

Therefore, \(\frac{\overline{{\text {cr}}}_2(D,\chi )}{\overline{{\text {cr}}}(D)}\le \frac{\frac{1}{2}|C_1|+\frac{1}{3}|C_2|}{|C_1|+|C_2|}\). This is maximized when \(C_1\) is as large as possible. Since there are in total at most \(\left( {\begin{array}{c}n\\ 4\end{array}}\right) \) pairs of edges that cross, we have \(|C_1| \le \left( {\begin{array}{c}n\\ 4\end{array}}\right) -|C_2|.\) Thus,

$$\begin{aligned} \frac{\overline{{\text {cr}}}_2(D,\chi )}{\overline{{\text {cr}}}(D)}\le \frac{\frac{1}{2} \left( {\begin{array}{c}n\\ 4\end{array}}\right) -\frac{1}{6}|C_2|}{\left( {\begin{array}{c}n\\ 4\end{array}}\right) }. \end{aligned}$$

We now obtain a lower bound for the size of \(C_2\). Note that \(|X_0|=n\) and \(|X_i| \ge (1-4c_4)|X_{i-1}|\). This implies that \(|X_i| \ge (1-4c_4)^i n\) and that \(|E_i| \ge {c_4}^4(1-4c_4)^{4i} n^4.\) Therefore,

$$\begin{aligned} |C_2| =\sum _{i=1}^m |E_i| \ge \sum _{i=1}^m {c_4}^4(1-4c_4)^{4i} n^4 =24{c_4}^4 \left( \frac{1}{1-(1-4c_4)^4}-1-o(1) \right) \left( {\begin{array}{c}n\\ 4\end{array}}\right) , \end{aligned}$$

which completes the proof.   \(\square \)

In the full version [7] we explore the ratio \({\overline{{\text {cr}}}_2(D)}/{\overline{{\text {cr}}}(D)}\) for certain classes of straight-line drawings of \(K_n\).

5 Conclusion and Open Problems

In this paper we have shown lower and upper bounds on the rectilinear 2-colored crossing number for \(K_n\) as well as its relation to the rectilinear crossing number for fixed drawings of \(K_n\). Besides improving the given bounds, some open problems arise from our work.

  1. (1)

    How fast can the best edge-coloring of a given straight-line drawing of \(K_n\) be computed? This problem is related to the max-cut problem of segment intersection graphs, which has been shown to be NP-complete for general graphs [9]. But for the intersection graph of \(K_n\) the algorithmic complexity is still unknown.

  2. (2)

    What can we say about the structure of 2-colored crossing minimal sets? For the rectilinear crossing number it is known that optimal sets have a triangular convex hull [10]. For \(n=8,9\) we have optimal sets with 3 and 4 extreme points, but so far all minimal sets for \(n \ge 10\) have a triangular convex hull.

  3. (3)

    We have seen that for convex sets asymptotically, the ratio \(\overline{{\text {cr}}}_2(D) / \overline{{\text {cr}}}(D)\) approaches 3/8 from below when \(n \rightarrow \infty \). It can be observed that among all point sets (order types) of size 10, the convex drawing D of \(K_{10}\) is the only one that provides the largest ratio of \(\overline{{\text {cr}}}_2(D) / \overline{{\text {cr}}}(D)=2/7\), while the best factor 5/76 is reached by sets minimizing \(\overline{{\text {cr}}}_2(D)\). Is it true that the convex set has the worst (i.e., largest) factor? And is the best (smallest) factor always achieved by optimizing sets, that is, sets with \(\overline{{\text {cr}}}_2(D)=\overline{{\text {cr}}}_2(K_n)\)?