# Unequal clusters lower the bound on crossings in straight-line drawings with one to ten colors

Place points on a page and join every pair by a straight segment. How should the points be arranged to make as few pairs of segments cross as possible? With colored segments, the question is how few crossings there need to be between segments of the same color. A drawing with few crossings at one size may be hard to enlarge without losing its advantage. The smallest crossing fraction achievable as the number of points grows is unknown.

A standard way to enlarge a drawing is to replace every point by two nearby points. Starting with the same published drawings, we put larger clusters near some points and smaller clusters near others. For one color this lowers the upper bound on the limiting crossing fraction from 0.380449186874 to 0.380449126707 (rounded up). For two through ten colors it lowers all nine published bounds, by 0.24% to 4.11%, while keeping the original colors on segments between clusters.

## What the crossing fraction measures

Choose four points at random from a drawing in which no three points lie on a line. If the four form a convex quadrilateral, its diagonals cross. If one point lies inside the triangle formed by the other three, no segments with those four endpoints cross. Each set of four points can therefore contribute at most one crossing. For a drawing with $N$ points and $k$ colors, the crossing fraction is the number of same-color crossing pairs divided by $\binom N4$, the number of ways to choose four points. It is the probability that the four chosen points supply a same-color crossing. All colors share the same drawing.

Let $g_k$ be the limit of the smallest possible crossing fraction as $N$ grows. A random subset of a drawing has the same expected crossing fraction as the whole drawing. Some subset must therefore do at least as well as the whole drawing, so the minimum cannot decrease with size. To bound $g_k$ from above, it suffices to construct drawings of arbitrarily large size whose fractions approach the proposed bound. For one color, $g_1$ is also Sylvester's four-point constant. This is the greatest lower bound on the probability that four independent points drawn from the same planar distribution form a convex quadrilateral, over distributions for which the probability of sampling three points on one line is zero ([Scheinerman and Wilf](https://doi.org/10.1080/00029890.1994.12004571)).

The published bounds used here come from repeated doubling, with the direction of each pair of nearby points chosen to keep crossings rare. Earlier uncolored constructions also used clusters of different sizes. [Ábrego and colleagues, §5](https://www.csun.edu/~ba70714/inbi106.pdf) counted crossings by grouping the four endpoints according to how many came from each cluster. Their construction required the cluster directions to satisfy balancing conditions. We use their counting principle to choose cluster sizes on published point sets, allowing an unbalanced direction at any point and accounting for edge colors.

## Leaving one point undoubled

The [Crossing Numbers Project](https://www.crossingnumbers.org/projects/crossingconstants/rectilinear.php) provides coordinates for a drawing with $n=2{,}643$ points and $C=771{,}218{,}714{,}414$ crossings. For odd $n$, the doubling theorem of [Aichholzer and colleagues (Theorems 1 and 3)](https://arxiv.org/abs/1907.07796) turns a finite crossing count into an upper bound $B(n,C)$ on the limiting fraction. The formula and its value for this drawing are
\[
 g_1\le B(n,C)=\frac{24C+3n^3-7n^2+(30/7)n}{n^4}
 =\frac{43317371729896}{113858494707069}.
\]
The theorem uses a distinct line through each point with equally many other points on either side. Such lines always exist for odd $n$. A [later workshop paper](https://egc23.web.uah.es/wp-content/uploads/2023/06/paper_16_4pages.pdf) quotes 0.380445 but cites the same result; we use the exact fraction above. We checked 108 smaller public drawings, 98 from [Chappell](https://github.com/rhyschappell/rcn-records/tree/c711665081d6cb320af57da2b2bb9d769f5c05e3) and ten from [Özdemir](https://doi.org/10.5281/zenodo.23677013). None gave a better bound by this theorem. Only the drawing with $n=4$ gave a smaller value on substitution, and it fails the theorem's matching condition on the lines used for doubling.

Use the original points as cluster centers. Leave one center, $i$, as a single point and replace each of the others by twins on a short segment through its center. Choose each segment's direction so that its line has $h=(n-1)/2$ other centers on each side. Make the segments short enough that any three points from distinct centers have the same clockwise or counterclockwise order as their centers. Write $I_i$ for the number of original convex quadrilaterals containing $i$, its crossing incidence. The new drawing has $2n-1$ points and crossing count
\[
 C'_i=16C-8I_i+(n-1)\left[8\binom h2-2(h-1)\right]+\binom{n-1}2.
\]

To see which center to leave single, count the crossings in three groups. First, four distinct centers forming a convex quadrilateral would give 16 crossings under full doubling, one for each choice of an endpoint at each center. They give only eight if one center stays single. Second, when a crossing uses both twins at one center and one point from each of two other centers, those other centers must lie on the same side of the twin segment. Under full doubling there would be $8\binom h2$ choices for these points per twin center. The singleton removes two choices for each of its $h-1$ same-side partners. Finally, every choice of two twin pairs gives one crossing. Only the first group depends on which center stays single, so the highest-incidence center gives the largest saving.

Of the 2,643 possible singletons, 248 have enough incidence ($I_i\ge1{,}167{,}291{,}149$) to improve the published bound. Point 646, numbering the public coordinates from zero, has the highest incidence, 1,167,317,954. An independent count on the expanded integer coordinates gives 12,348,585,033,833 crossings on 5,285 points. Applying the doubling theorem to this drawing gives $g_1\le296808694888442/780153330000625<0.380449180277$.

Reallocating a point also helps at the original size. We tried removing each of the 25 highest-incidence points (27 including ties). In all 27 cases, even the best second deletion gave a worse bound at size 2,641. A better choice was to remove point 653 and place it next to point 651. Removing 653 eliminates 1,167,315,924 crossings. After that deletion, point 651 has incidence 1,165,573,072, so adding its twin restores that many crossings with four distinct centers. The line through the twins splits the remaining centers 1,320 to 1,321. There are $\binom{1320}{2}+\binom{1321}{2}=1{,}742{,}400$ new crossings that use both twins. The net saving is 452 crossings at the same size. A direct count from the coordinates confirms 771,218,713,962 crossings, giving a strictly better bound by the same theorem.

## Counting crossings in clusters of any size

For larger clusters, put the points on a short arc of a parabola near their original center, which we call their parent. The tangent line at the parent divides the other centers into two groups. The side toward which the arc bends matters when three endpoints come from that arc.

Assign each parent $p_i$ a nonnegative integer weight, or mass, $w_i$. The masses sum to $W>0$ and specify the relative cluster sizes. At each parent choose a tangent vector $u_i$ that is not parallel to any line from it to another parent. Choose a perpendicular vector $v_i$ pointing toward the side where the parabola opens. For a positive integer scale factor $t$, replace $p_i$ by $t w_i$ points. Their positions in order along the arc, indexed by the integer rank $r$, are
\[
 p_i+\epsilon r u_i+\epsilon^2 r^2 v_i,\qquad 0\le r<t w_i,\quad r\text{ integer}.
\]
Give every segment between different clusters the color of the segment between their parents. Within each cluster use one chosen color for all segments.

For each fixed $t$, choose $\epsilon>0$ small enough to preserve the orientation of every triple from distinct parents. Orientation is the sign of the determinant of the two displacement vectors from the first point of an ordered triple; the determinant equals its signed double area. With two ranks $r<s$ at $i$ and a third point at $j$, the first nonzero determinant term is $\epsilon(s-r)\det(u_i,p_j-p_i)$. With three ranks $r<s<a$ at $i$, the determinant is $\epsilon^3(s-r)(a-r)(a-s)\det(u_i,v_i)$. Thus no triple is collinear, and only the order of the ranks matters for the signs. If crossings must be simple, a further small generic perturbation prevents three or more segments from crossing at one point without changing these signs. Rational parameters followed by scaling suffice to give integer coordinates.

Table 1 counts the five ways four endpoints can be distributed among parents. As $t\to\infty$, four distinct points sampled without replacement have, in the limit, independent parent labels with probabilities $w_i/W$. For each unordered group of four parent labels satisfying the condition shown, multiply their four masses (including repetitions) by the coefficient and divide by $W^4$. The coefficient counts the possible orders of those labels. Summing the contributions gives the limiting crossing fraction, hence an upper bound for any specified allocation.

| Multiplicities | Coefficient | When there is a monochromatic crossing |
|---|---:|---|
| $1+1+1+1$ | 24 | The parent quadruple has one. |
| $2+1+1$ | 12 | The singleton parents $j,l$ are on the same side of the doubled parent $i$'s tangent, and $ij,il$ have the same color. |
| $2+2$ | 6 | Always. |
| $3+1$ | 4 | The singleton is on the opening side, and its edge to the triple's parent has that parent's internal color. |
| $4$ | 1 | Always. |

For the $2+1+1$ case, imagine looking along the short segment joining the two points with the same parent. If the two external parents are on the same side, the short segment and the segment joining the external points are opposite edges of a convex quadrilateral. Each diagonal therefore joins a twin to an external point. If the parents are on opposite sides, one twin lies inside the triangle formed by the other three points: the line through the external points does not separate the twins. For two twin pairs ($2+2$), both short segments are outer edges. Both crossing diagonals run between the same two clusters and so have the same color.

For three points on one arc ($3+1$), an external point on the opening side leaves all three on the boundary of the quadrilateral. The segment from the middle rank to the external point crosses the chord joining the two extreme ranks. On the other side, the middle rank lies inside the triangle. Four points on the same parabola always form a convex quadrilateral. Each test also follows from the determinant signs above.

Only the $2+1+1$ and $3+1$ contributions depend on the local choices of tangent, opening side and internal color. Each depends on those choices at just the repeated parent. For fixed masses we can therefore minimize the count at each parent independently. Rotating a tangent changes the count only when it passes a line to another center. It suffices to test the angular intervals between consecutive lines, both opening sides and the available internal colors.

## How cluster size affects the one-color bound

On the 2,643-point drawing, giving every arc unit mass yields a worse bound than repeated doubling. The best tangent splits the other centers evenly, with $h$ on each side. A split of $h+d$ and $h-d$ adds $12d^2-4d$ to that parent's contribution to the numerator, even with the better choice of opening side. Summing Table 1 for the even splits gives $(24C+3n^3-7n^2+5n)/n^4$, just above $B(n,C)$.

To isolate the effect of changing a single cluster size, give every center mass 64 except center $i$, whose mass $p$ ranges from 0 to 128. Keep tangents that split the other original centers evenly and open each arc toward the side with less mass. Before multiplication by 24, the contribution from four distinct centers is $64^4 C+(p-64)64^3 I_i$. All terms with repeated centers depend on $p$ in the same way regardless of which center is $i$: at every other center the exceptional mass shares a side with exactly $h-1$ ordinary neighbors. For any fixed increase in mass, the best place to add it is therefore a center with the lowest incidence. For a decrease, the order reverses.

![Change in the uncolored upper bound versus the original crossing incidence of the changed center. Increasing mass helps at low incidence, decreasing it helps at high incidence.](results/one-center.png)

Figure 1. Change from the published doubling bound for the best of the 129 masses at each center. Centers with the same incidence coincide. Of 340,947 trials, 57,558 improve the bound, spread over 2,148 centers. The best single change raises the mass at center 1320 from 64 to 86 and gives a bound below 0.380449175003.

Allowing every mass to vary gives the lowest one-color bound found here. All centers remain in use, with integer masses from 8,073 to 16,717:
\[
 \boxed{g_1\le\frac{23205703089178487450964916221}{60995548314367952148433920512}
 <0.380449126707.}
\]
The absolute decrease from the published bound is $6.02\times10^{-8}$ to three significant figures.

## Crossings between segments of the same color

For each color count from two to ten, [Hahn, Klinz and Vogtenhuber (HKV)](https://doi.org/10.3217/tw2dv-87653) provide a 135-point drawing and a color for every segment. Their [published bounds (Table 1)](https://arxiv.org/abs/2505.18014) come from a doubling construction that uses a matching, a set of edges with no shared endpoints.

Table 2 compares that bound with three ways of enlarging each drawing on arcs. In the “unit mass” column every cluster has the same size, and each parent uses its best tangent, opening side and internal color for those sizes. The “frozen” column changes only the masses, keeping those local choices fixed. The “reselected” column again takes the best local choices, now for the unequal integer masses. “Centers used” counts parents with positive mass. Bounds are rounded up to nine decimal places; percentage gains use the unrounded constructions and the published comparison decimals. The [numerical table](results/colors.csv) gives the constructed fractions exactly.

| Colors | HKV | Unit mass | Unequal, frozen | Unequal, reselected | Centers used | Gain vs HKV (%) |
|---:|---:|---:|---:|---:|---:|---:|
| 2 | 0.117314123 | 0.117309841 | 0.117105138 | 0.117029895 | 72 | 0.242 |
| 3 | 0.060624659 | 0.060621295 | 0.058591349 | 0.058132709 | 48 | 4.110 |
| 4 | 0.035721507 | 0.035717931 | 0.035120923 | 0.035103085 | 105 | 1.731 |
| 5 | 0.023893256 | 0.023887756 | 0.023487757 | 0.023475865 | 116 | 1.747 |
| 6 | 0.017260493 | 0.017256656 | 0.016981224 | 0.016976423 | 129 | 1.646 |
| 7 | 0.013140792 | 0.013136501 | 0.012920124 | 0.012915732 | 130 | 1.713 |
| 8 | 0.010283342 | 0.010279918 | 0.010142636 | 0.010139915 | 135 | 1.395 |
| 9 | 0.008453387 | 0.008449580 | 0.008345617 | 0.008342863 | 135 | 1.307 |
| 10 | 0.006926708 | 0.006924476 | 0.006804728 | 0.006803104 | 134 | 1.784 |

Even equal-sized arcs improve slightly on all nine published colored bounds. Changing the masses alone, from the unit-mass column to the frozen column, accounts for 72% to 97% of the total decrease from HKV to the reselected column. At eight and nine colors every center remains in use. Three colors give the largest relative improvement, with just 48 centers remaining. Giving those same 48 centers equal masses and optimizing their local choices yields $28909/442368>0.06535$, worse than the published three-color bound. The unequal sizes matter even after choosing which centers to keep.

## Finding the sizes and checking the counts

To find promising cluster sizes, we started with equal masses and allowed them to vary continuously. We used bounded quasi-Newton minimization, a numerical method that uses changes in slope to choose the next step, with a lower bound of zero on each mass. For the colored drawings we held the local choices fixed during each fit, then minimized over those choices and repeated. For the uncolored drawing we tested a preliminary step in the direction of steepest decrease and reselected directions at each evaluation. We normalized the final masses to mean one, multiplied by 10,000 for one color or 1,000 for more colors, rounded to integers and selected directions again.

The [construction table](results/allocations.csv) gives the masses and directions in the public coordinate order, counting from zero. It specifies each tangent by a ray from the parent to another center. The tangent points just to one side of that ray: a left indicator of one places the ray on the left of the tangent, and zero places it on the right. The table also specifies the internal edge color and opening side. For one color the arc opens toward the side with less total mass (either side at a tie). With Table 1, these specifications give the bound directly without repeating the numerical search.

The one-color search counts contributions from four distinct parents using separating lines. In a convex quadrilateral, two lines through pairs of vertices separate the remaining pair; for four points with one inside the triangle of the others, three such lines do. We checked the count independently using triangles. Fix one center and sort the rays to all other centers by exact slope independently of the first count. A triangle misses the fixed center precisely when the rays to its three vertices fit in an open semicircle. In circular order each such triangle can be counted once at its first ray. Weighting triangles by the product of their vertex masses gives the weight of triangles surrounding each center by subtraction. Combining this with each enclosed center's mass gives the weight of nonconvex four-point sets. Subtracting that weight from the total weight of four-point sets gives the contribution from convex sets with distinct parents. For the two finite drawings, the same triangle count uses only the expanded integer coordinates, with unit weights.

For each colored drawing a second program placed four representative ranks at each parent, using integer coordinates, and examined all 14,463,090 unordered groups of four parent labels, including repetitions. For each group it computed the signed areas of the four triangles formed by omitting one point at a time. With alternating signs these determinants give the coefficients of the affine dependence among the four points. When two coefficients are positive and two are negative, the segment joining the positive pair crosses the segment joining the negative pair. The program checked the actual colors of these segments independently of the side-and-color rules in Table 1. Since only the order of the ranks matters, the representative points suffice for clusters of any size. The program also recovered all nine published crossing counts on the original drawings.

Each upper bound needs only one allocation that achieves it. The true minimum fractions could be smaller. On these drawings, unequal cluster sizes improve on equal doubling without moving the original centers or changing any color between them.
