Discrete

The crossings a graph cannot avoid

Five points all joined need one crossing, six need three, seven need nine. Euler's formula gives a lower bound that grows like the square of the number of points and is badly wrong; a sampling trick turns the same formula into a bound that grows like the fourth power and is right to within a constant. And for drawings with straight edges the count turns out to be something else entirely: the number of quadrilaterals the points make.

Worth reading first: Two graphs that will not lie flat · Every crowd holds a bowl or a dome.

Two graphs that will not lie flat proved that the complete graph on five points cannot be drawn without a crossing, by counting edges against faces and finding one edge too many. That settles whether. It leaves how many: when a graph cannot be drawn flat, what is the fewest crossings any drawing of it can have?

The number is the graph’s crossing number, and for the complete graphs it grows startlingly fast. Five points need one crossing. Six need three. Seven need nine. Eight need eighteen — and eighteen only if the edges may curve, because a drawing with straight edges needs nineteen.

The complete graph on 7 points, drawn straight with 9 crossings. A straight-line drawing of the complete graph on 7 vertices with 9 crossings, the minimum for straight drawings; each crossing comes from four vertices in convex position.
Fig. 1 The complete graph on seven points, drawn with straight edges on a point set found by searching for the fewest crossings. There are nine, marked; each is where the two diagonals of four points in convex position meet, and nine is the fewest any seven points allow.

The drawing in the figure was not designed; it was searched for. Seven points were scattered and moved one at a time, keeping any move that did not add a crossing, until the count reached nine, which is known to be the minimum. The dots mark the crossings, and every one of them has the same anatomy: two edges that are the diagonals of a quadrilateral whose four corners are points of the drawing.

One crossing for every convex quadrilateral

That anatomy is the key to straight drawings, and it holds without exception.

Take any four of the points. If they sit in convex position — each outside the triangle of the other three — they form a quadrilateral, and of the six edges joining them exactly one pair crosses: the two diagonals. If one of the four lies inside the triangle of the others, no two of the six edges joining them cross. And two edges can only cross if their four endpoints are distinct, so every crossing belongs to exactly one set of four points. So

crossings of a straight drawing of Kn=number of convex quadrilaterals among the n points.\text{crossings of a straight drawing of } K_n = \text{number of convex quadrilaterals among the } n \text{ points}.

The figure counts both — crossings segment by segment, convex fours by testing each of the 3535 fours among seven points — and requires them to agree before it draws. Minimising crossings of a straight drawing is minimising convex quadrilaterals, which turns a question about drawings into a question about point sets.

The complete graph on 6 points, drawn straight with 3 crossings. A straight-line drawing of the complete graph on 6 vertices with 3 crossings, the minimum for straight drawings; each crossing comes from four vertices in convex position.
Fig. 2 Six points and the fifteen edges joining them, with three crossings — the fewest possible. Only three of the fifteen fours among the points are in convex position, and each gives one crossing.

And a question about point sets connects to one met before. Every crowd holds a bowl or a dome proved that among enough points in general position some fixed number must be in convex position — five among nine, as the happy-ending problem found. Minimising crossings asks the opposite question for fours: not whether a convex quadrilateral must exist, but how few of them a set can get away with. Among any five points in general position some four are in convex position, which is the smallest case of both statements at once, and it is why the complete graph on five points needs a crossing.

Drawings worth counting

Before counting crossings it is worth saying which drawings count, because a careless drawing can have as many as it likes and the minimum is taken over careful ones.

A good drawing has three properties: two edges meet at most once, edges from the same point never cross, and no edge crosses itself. Any drawing can be made good without adding crossings. If two edges cross twice, the two pieces between the crossings can be swapped and the crossings removed; if two edges from one point cross, swapping their first stretches out of the point removes the crossing; and a loop in an edge can be cut off. Each move strictly lowers the count, so a drawing with the fewest crossings is automatically good.

That matters for everything that follows. In a good drawing every crossing involves two edges with four different endpoints, which is what lets a crossing be assigned to a set of four points — the straight-line count below, the averaging over smaller graphs, and the sampling argument all rest on it. It is also why the question has the character it does. Five spokes squeezed into K5K_5 showed that whether a graph can be drawn flat depends on which small graphs hide inside it; how many crossings it needs depends on how many such small obstructions it contains and how they overlap, and in the complete graph every four points are a potential one.

Euler’s lower bound, and how weak it is

A lower bound for any graph comes straight from the argument that made K5K_5 non-planar. A planar graph with n≥3n \ge 3 points has at most 3n−63n - 6 edges, by Euler’s formula. Take any drawing of a graph with mm edges and remove one edge from each crossing; what is left is planar, so

m−cr≤3n−6,cr≥m−3n+6.m - \text{cr} \le 3n - 6, \qquad \text{cr} \ge m - 3n + 6.

For the complete graph on seven points, with 2121 edges, that gives 66. The truth is 99. For eight points it gives 1010 against 1818. For twelve points it gives 3636 against 150150.

Crossings of the complete graphs on 5 to 12 points: two bounds and the true values. 5 points: Euler 1, sampling —, curved 1, straight 1; 6 points: Euler 3, sampling —, curved 3, straight 3; 7 points: Euler 6, sampling —, curved 9, straight 9; 8 points: Euler 10, sampling —, curved 18, straight 19; 9 points: Euler 15, sampling 9, curved 36, straight 36; 10 points: Euler 21, sampling 15, curved 60, straight 62; 11 points: Euler 28, sampling 22, curved 100, straight 102; 12 points: Euler 36, sampling 32, curved 150, straight 153.
Fig. 3 The complete graphs on 5 to 12 points: Euler’s bound, the bound from sampling once there are at least four edges per point, the fewest crossings any drawing can have, and the fewest a straight drawing can have. Straight drawings need more from 8 points on, shaded.

The bound is too weak because it is paid only once per crossing. Removing one edge removes every crossing on it, and in a dense drawing an edge carries many crossings, so the m−3n+6m - 3n + 6 edges that must go could be removed while only a small fraction of the crossings are paid for. The bound grows like n2/2n^2/2 for the complete graph, and the truth grows like n4n^4.

Counting crossings by counting smaller graphs

There is a second way to get more out of a known value, and it is exact where Euler’s bound is slack.

Take the best drawing of KnK_n and delete one point with its edges; what remains is a drawing of Kn−1K_{n-1}, so it has at least cr(Kn−1)\text{cr}(K_{n-1}) crossings. Do this for each of the nn points in turn and add up. A crossing involves four points, so it survives the deletion of any of the other n−4n - 4, and is counted n−4n - 4 times in the total. So

(n−4) cr(Kn)≥n cr(Kn−1),cr(Kn)≥nn−4 cr(Kn−1).(n - 4)\,\text{cr}(K_n) \ge n\,\text{cr}(K_{n-1}), \qquad \text{cr}(K_n) \ge \frac{n}{n-4}\,\text{cr}(K_{n-1}).

Starting from the three crossings of K6K_6, it gives at least 7⋅3/3=77 \cdot 3/3 = 7 for seven points — short of nine — and from the true value nine it gives 8⋅9/4=188 \cdot 9/4 = 18 for eight, which is exact. The same averaging over smaller pieces that the sampling argument performs at random, this performs by deleting every point once; it is weaker as a general tool, because it needs the previous value, and sharper when that value is known. What lifts it to exact values is parity. Daniel Kleitman proved in 1970 that for an odd number of points every drawing of the complete graph in which edges behave sensibly has a crossing count of one fixed parity, so a bound that lands between two admissible values can be pushed up to the next one; with that, Guy completed the values up to ten points.

Sampling turns the square into a fourth power

The repair is one of the most elegant uses of chance in combinatorics, and it needs nothing beyond Euler’s bound.

Take the best drawing of a graph with nn points, mm edges and cr\text{cr} crossings, and keep each point independently with probability pp, deleting the rest with their edges. The expected number of points kept is pnpn, of edges p2mp^2 m — an edge survives when both its ends do — and of crossings p4crp^4 \text{cr}, since a crossing survives only when all four ends of its two edges do. Euler’s bound holds for every sample, so it holds on average:

p4 cr≥p2m−3pn.p^4\, \text{cr} \ge p^2 m - 3pn.

Now choose pp. The best choice is p=4n/mp = 4n/m, which is at most one when the graph has at least four edges per point, and it gives

cr≥m364 n2.\text{cr} \ge \frac{m^3}{64\, n^2}.

This is the crossing lemma, found independently by Miklós Ajtai, Václav Chvátal, Monroe Newborn and Endre Szemerédi, and by Tom Leighton, in the early 1980s. The weak bound was not wrong; it was being applied to the whole graph at once. Applied to a random piece of the graph, small enough that the piece has few crossings per edge, the one-crossing-per-edge loss stops mattering, and scaling back up multiplies the answer by 1/p41/p^4 while the edges scale only by 1/p21/p^2.

Euler's bound, the sampling bound and the true crossing numbers of complete graphs. On log scales for n from 10 to 200: Euler's bound grows like n², the sampling bound like n⁴/512, the Zarankiewicz value like n⁴/64.
Fig. 4 For the complete graph on n points, from 10 to 200, on logarithmic scales: Euler’s bound grows like n2n^2, the sampling bound like n4/512n^4/512, and the crossings of the best known drawings like n4/64n^4/64. The sampling bound runs parallel to the true value, within a factor of about eight.

On logarithmic axes the difference is a difference of slope. Euler’s bound climbs with slope two; the crossing lemma and the true value both climb with slope four, eight units of log⁡\log apart. The sampling bound has the right shape, and a factor of eight is the price of the crude choice of pp and of Euler’s constant 33. The best constant known today is about twice 1/641/64, and the true constant for the densest graphs is not known.

What the bound is used for

A bound that is right up to a constant can be turned into theorems in other subjects, and the crossing lemma’s most famous application is not about drawings at all.

Take nn points and ℓ\ell lines in the plane, and ask how many point–line incidences there can be. Draw a graph whose vertices are the points and whose edges join consecutive points along each line. Two lines cross at most once, so the drawing has at most ℓ2\ell^2 crossings; a line through kk points gives k−1k - 1 edges, so there are at least I−ℓI - \ell edges where II is the number of incidences. The crossing lemma then says (I−ℓ)3/(64n2)≤ℓ2(I - \ell)^3/(64 n^2) \le \ell^2 whenever there are enough edges, which rearranges to

I≤C(n2/3ℓ2/3+n+ℓ).I \le C\left(n^{2/3} \ell^{2/3} + n + \ell\right).

That is the Szemerédi–Trotter theorem of 1983, the fundamental bound on incidences, and László Székely found in 1997 that it follows from the crossing lemma in these few lines where the original proof took pages. A statement about points and lines, which mentions no graph, is a consequence of the fact that dense graphs must cross themselves a great deal.

A brick factory, and a proof with a gap

The question of crossings was first asked about a bipartite graph, and the circumstances are worth recording because they are where the formula in the table comes from.

Pál Turán spent part of the Second World War in a forced-labour camp near Budapest, pushing wagons of bricks from kilns to storage yards on rails that joined every kiln to every yard. Where two tracks crossed, the wagons jumped the rails and spilled their loads, and Turán asked the question the spilled bricks posed: how should the kilns, yards and tracks be laid out to make the crossings as few as possible? With mm kilns and nn yards that is the crossing number of the complete bipartite graph Km,nK_{m,n}, and its smallest non-planar case, three and three, is the second of the two graphs that will not lie flat.

Kazimierz Zarankiewicz published a solution in 1954: put the kilns on one axis and the yards on the other, half on each side of the origin, and join them straight, giving

⌊m2⌋⌊m−12⌋⌊n2⌋⌊n−12⌋\left\lfloor \tfrac m2 \right\rfloor \left\lfloor \tfrac{m-1}2 \right\rfloor \left\lfloor \tfrac n2 \right\rfloor \left\lfloor \tfrac{n-1}2 \right\rfloor

crossings, and a proof that no layout does better. The layout is right. The proof was wrong, as Gerhard Ringel and Paul Kainen found in the 1960s, and the formula has been proved only when the smaller side has at most six points. The brick-factory problem is still open, and the formula for complete graphs in this essay is its close relative: the cylindrical drawings of KnK_n are built on the same idea of splitting the points into two halves that interleave.

Curved edges and straight ones

The table has two final columns, and they part company at eight points.

For drawings with curved edges the best known drawings of KnK_n have

Z(n)=14⌊n2⌋⌊n−12⌋⌊n−22⌋⌊n−32⌋Z(n) = \tfrac14 \left\lfloor \tfrac n2 \right\rfloor \left\lfloor \tfrac{n-1}2 \right\rfloor \left\lfloor \tfrac{n-2}2 \right\rfloor \left\lfloor \tfrac{n-3}2 \right\rfloor

crossings: put half the points on each of two concentric circles and route edges round the cylinder they bound. Richard Guy conjectured around 1960 that no drawing does better, and the conjecture is proved up to twelve points — up to ten by Guy, eleven and twelve by Shengjun Pan and Bruce Richter in 2007.

The complete graph on 8 points, drawn straight with 19 crossings. A straight-line drawing of the complete graph on 8 vertices with 19 crossings, the minimum for straight drawings; each crossing comes from four vertices in convex position.
Fig. 5 The complete graph on eight points, drawn straight on a point set with only 19 convex quadrilaterals among its 70 fours — the fewest possible. A drawing with curved edges can reach 18; with straight edges 19 is the floor.

For straight edges the answer is the convex-quadrilateral count, and from eight points on it is larger: 1919 against 1818 at eight, 6262 against 6060 at ten, 153153 against 150150 at twelve. The difference is a genuine geometric constraint — a straight edge cannot go round the back — and it grows: the straight values are asymptotically about 0.3800.380 times (n4)\binom n4, against 0.3750.375 for the curved ones.

The complete graph on 9 points, drawn straight with 36 crossings. A straight-line drawing of the complete graph on 9 vertices with 36 crossings, the minimum for straight drawings; each crossing comes from four vertices in convex position.
Fig. 6 Nine points drawn straight with 36 crossings, the fewest possible, which here equals the curved value too. Among nine points in general position, 36 of the 126 fours are unavoidably convex.

The straight constant is itself a probability. Edward Scheinerman and Herbert Wilf showed in 1994 that it equals the smallest possible chance that four points drawn at random from some distribution in the plane are in convex position — the infimum of Sylvester’s four-point problem over every way of choosing points. Sylvester asked in 1864 for the probability that four random points form a convex quadrilateral and received a different answer from every correspondent, because the answer depends on the region — the same dependence on how random is made precise that the needles dropped on a floor have to be careful about; the crossing number of large complete graphs is the least of all those answers.

On other surfaces, and on chips

A crossing number depends on the surface the graph is drawn on, and changing the surface changes everything. On a torus the complete graph on seven points needs no crossings at all — the seven regions on a doughnut that all touch one another are that drawing’s dual — and a graph’s crossing number on a surface of genus gg falls as gg grows, since every handle is a bridge one edge can take over another. The plane is the hardest surface on which to draw anything, and the crossing number measures how hard.

The crossing lemma itself came out of a practical problem. Leighton proved it to bound the area needed to lay out a circuit on a chip, where wires are edges, gates are points, and every crossing costs space; the area of the best layout is tied both to the crossing number and to how few points separate the graph, the quantity the few points that cut a flat graph measured for planar graphs. A graph with many crossings forced on it needs a large chip whatever the designer does, and the fourth power in the crossing lemma is a statement about silicon as much as about drawings.

What the drawings cannot certify

Every straight drawing here was found by search, and a search proves only an upper bound. The figure reaches 33, 99, 1919 and 3636 crossings and stops, because those are the values proved to be minimal by others — by exhaustive enumeration of the ways small point sets can be arranged, which is how the straight values are known up to twenty-seven points and for thirty. The search is evidence that the minimum is achievable; that nothing smaller is achievable is quoted.

No curved drawing is drawn. The cylindrical drawings that realise Z(n)Z(n) need edges that wind round two circles, and the figures stay with straight lines, whose crossings can be counted exactly. The curved column of the table is Guy’s formula and the proofs of Guy, Pan and Richter, not a computation.

The growth-rate figure plots formulas, not crossing numbers. The top curve is Z(n)Z(n), which is conjectured and proved only to twelve; the middle one is a bound; neither is a measurement of any drawing.

Still open: the crossing number of the complete graph

Is the crossing number of KnK_n exactly Z(n)Z(n) for every nn? Guy’s conjecture, sometimes credited to Anthony Hill, has been checked up to twelve points and is open from thirteen. For large nn it is known that the true value is at least a large fixed fraction of Z(n)Z(n), and the fraction has been pushed close to one; no proof of equality is known.

The companion question for straight drawings — the exact constant 0.380…0.380\ldots — is open too, pinned between bounds that agree to three decimal places. And computing the crossing number of a given graph is hard in general: Michael Garey and David Johnson proved in 1983 that deciding whether a graph can be drawn with at most kk crossings is NP-complete, so no efficient method is expected even for graphs of modest size.

A weak bound, applied to a random piece

The habit worth keeping is the sampling step.

Euler’s formula gave a bound that charged one crossing per removed edge, which is hopelessly weak when edges carry many crossings. The fix was not a better inequality but a better place to apply the same one: a random sample of the points, thin enough that almost every surviving edge has few crossings left, where the weak bound is nearly sharp. Scaling back up, the crossings grow like the fourth power of the sampling rate and the edges like the square, and the gap between those exponents is the whole improvement.

That move — prove a weak statement about a random piece, then scale — is the probabilistic method at its most efficient, and it has the same shape as the argument by which a random colouring beats every explicit one in Ramsey theory. Averaging over pieces extracts from a coarse inequality the exponent it was hiding, and here the exponent turned a count of edges into a count of quadrilaterals.

What links here

Computed from the collection, not written here: the essays that point at this one.

Reads more easily once this is understood

Essays that name this one as worth reading first.

Shares its objects with

Essays that name at least two of the same things, and that neither author linked.

Named objects

A dashed tag is an object no other essay names yet.

Complete graphConjectureConvexityCrossing numberEuler formulaLower boundPlanar graphProbabilistic method