1 Introduction

A dramatic breakthrough in discrete geometry took place in November 2010, when Guth and Katz [17] completed a project of Elekes, exposed in [14], and established a nearly complete solution of Erdős’s distinct distances problem [15], originally posed in 1946.

In one of the main steps of their analysis, they apply the polynomial ham-sandwich theorem of Stone and Tukey [39] to obtain a partition of a finite point set P in ℝd with certain favorable properties, detailed in Sect. 2.3 below. The partition is effected by what we call an r-partitioning polynomial. The removal of the zero set Z of the polynomial partitions space into connected components, each containing at most |P|/r points of P. A key feature of the construction is that the degree of the polynomial achieving this does not have to be too high, only O(r 1/d), and thus the interaction of other objects, such as lines or hyperplanes, with Z is under control in some sense.

In this paper we apply partitioning polynomials in several classical problems of discrete geometry, mostly planar ones, and we provide new and simple proofs of some well known results.

Incidences

For a finite set P⊂ℝ2 and a finite set L of lines in ℝ2, let I(P,L) denote the number of incidences of P and L, i.e., of pairs (p,) with pP, L, and p.

The following fundamental result was first proved by Szemerédi and Trotter in 1983, in response to a problem of Erdős [15].

Theorem 1.1

(Szemerédi and Trotter [41])

I(P,L)=O(m 2/3 n 2/3+m+n) for every set P of m distinct points in the plane and every set L of n distinct lines.

We remark that the bound in the theorem is tight in the worst case for all m,n (see [13, 15] for original sources or [26] for a presentation).

A simpler proof of the Szemerédi–Trotter theorem, based on cuttings, was given by Clarkson et al. [10] in 1990, and in 1997 Székely [40] found a beautiful and elegant proof, based on the crossing lemma for graphs embedded in the plane (also see, e.g., [26]).

In Sect. 3 we present an alternative proof based on polynomial partitions, hoping that the reader will find it equally simple. The basic idea of the proof is similar to some earlier approaches. For example, it can be obtained more or less by replacing simplicial partitions by polynomial partitions in a simplified variant of a proof due to Aronov and Sharir [4], as noted in [26, p. 64]; fairly similar proofs were also noticed independently by others, e.g., by Boris Bukh [private communication] or by Terrence Tao in his blog. We also believe that the new proof is suitable for teaching purposes, so our goal is to make the exposition as elementary and self-contained as possible. For this we also give proofs of several well known and basic facts about multivariate polynomials. The only major ingredient of the analysis which we do not prove is the classical ham-sandwich theorem, which we use as a black box (see, e.g., [27] for an exposition).

The Szemerédi–Trotter theorem has led to an extensive study of incidences of points and curves in the plane and of points and surfaces in higher dimensions. A survey of the topic can be found in Pach and Sharir [34]. In particular, the following theorem on incidences between points and planar curves has been established:

Theorem 1.2

(Pach and Sharir [33])

Let k,C 1,C 2 be integer constants. Let P be a set of m points and let Γ be a set of n simple curves, all lying in the plane. If no more than C 1 curves of Γ pass through any k given points, and every pair of curves of Γ intersect in at most C 2 points, then

with an appropriate constant of proportionality that depends on k,C 1,C2.

A weaker version of this result, where the curves in Γ are assumed to be algebraic and to belong to a family parameterized by k real parameters, was obtained earlier, also by Pach and Sharir [32] (special cases of this result, e.g., for incidences of points and circles, were proved even earlier by Clarkson et al. [10]).

In Sect. 4, we give a simple proof of Theorem 1.2, with the additional assumption that Γ consists of algebraic curves of degree bounded by a constant.

Spanning Trees with Low Crossing Number

Let P be a finite set of points in ℝ2. A (geometric) graph on P is a graph G with vertex set P whose edges are realized as straight segments connecting the respective end-vertices. The crossing number of G is the maximum number of edges that can be intersected simultaneously by a line not passing through any point of P.Footnote 1 We will consider geometric spanning trees on P, i.e., acyclic connected geometric graphs on P.

The following result has been established in the late 1980s by Welzl [45] and by Chazelle and Welzl [9]; also see Welzl [46].

Theorem 1.3

(Welzl [45], Chazelle and Welzl [9])

Every set of n points in the plane has a geometric spanning tree with crossing number \(O(\sqrt{n})\).

The bound in the theorem is tight up to a multiplicative constant, as the example of a \(\sqrt{n}\times\sqrt{n}\) grid shows. Spanning trees with low crossing number have many applications in discrete and computational geometry, including range searching [9], the design of other geometric algorithms (see, e.g., [5]), discrepancy theory [28], and approximation [25].

The original proof of Theorem 1.3 constructs the tree iteratively, through a process called iterative reweighting. In each step several new edges are added, and these are selected using a packing argument with balls in a line arrangement (or, alternatively, using a so-called cutting). An alternative proof, replacing iterative reweighting with linear programming duality, was recently given by Har-Peled [19].

In Sect. 5 we present a new and simple proof of Theorem 1.3 via polynomial partitions.

Chazelle and Welzl [9] established their result on spanning trees with low crossing number in a very general setting, where the points do not lie in the plane, but rather in the ground set of an arbitrary set system \(\mathcal{F}\). The bound on the crossing number is then expressed in terms of the dual shatter function of \(\mathcal{F}\).

At present it seems that the approach with polynomial partitions is not suitable for this level of generality. However, some generalizations are possible. First, we have verified that Theorem 1.3 can be extended to the case where the crossing number is taken with respect to a family of algebraic curves of degree bounded by a constant, but we will not pursue this in this paper.

Second, one can also prove a d-dimensional generalization of Theorem 1.3, and this we do in Sect. 6. Here we are given a set P of n points in ℝd, and consider spanning trees of P, which we embed into ℝd by drawing their edges as straight segments connecting the respective end-vertices, as in the plane. The crossing number of such a tree is the maximum number of its edges that are crossed by a hyperplane not passing through any point of P. According to [9, 45], for every n-point set in ℝd there exists a straight-edge spanning tree with crossing number O(n 1−1/d).

We re-prove this fact using polynomial partitions, in a way which is similar to the planar case. However, the proof is more involved in higher dimensions. Informally, the partition distributes the input points evenly among the resulting cells, except that some (in the worst case even all) of the points may lie on the zero set Z of the partitioning polynomial, and therefore not belong to any of the subsets.

We avoid this situation using a perturbation argument. This works for the spanning tree construction because there we may assume general position of the input points. For incidence problems this assumption cannot be made, and other techniques are needed to handle the points on Z. We have started to investigate alternative approaches to handling points on Z in a subsequent paper [21].

The present paper is what we hope only the beginning of the study of applications of the polynomial partitioning technique, as well as of other tools from algebraic geometry. We note that since the original submission of the present paper, several other works in this direction have already appeared, including papers by Solymosi and Tao [37], Zahl [47, 48], Iosevich et al. [20], and our own [2, 21].

2 Review of Tools

2.1 Preliminaries on Polynomials

Here we recall some standard facts about polynomials. The proofs are given for didactic purposes, and can be skipped by more experienced readers.

Since most of the problems that we study here are planar, we will consider mostly bivariate polynomials f=f(x,y)=∑ i,j a ij x i y j∈ℝ[x,y], the ring of bivariate polynomials over the reals, but the analysis can easily be extended to d-variate polynomials in ℝd. The degree of f is deg(f)=max{i+ja ij ≠0}. Let Z(f)={(x,y)∈ℝ2f(x,y)=0} denote the zero set of f.

Lemma 2.1

If is a line in2 and f∈ℝ[x,y] is of degree at most D, then either Z(f), or |Z(f)|≤D.

Proof

Writing in parametric form {(u 1 t+v 1,u 2 t+v 2)∣t∈ℝ}, we see that the points of Z(f) are roots of the univariate polynomial g(t):=f(u 1 t+v 1,u 2 t+v 2), which is of degree at most D. Thus, either g is identically 0, or it has at most D roots. □

Lemma 2.2

If f∈ℝ[x,y] is nonzero and of degree at most D, then Z(f) contains at most D distinct lines.

Proof

We need to know that a nonzero bivariate polynomial (i.e., with at least one nonzero coefficient) does not vanish on all of ℝ2. (Readers who do not consider this a sufficiently standard fact are welcome to work out a quick proof.)

Now we fix a point p∈ℝ2 not belonging to Z(f). We will show that if { 1,…, k } is an arbitrary finite collection of (distinct) lines contained in Z(f), then kD (this, in particular, will imply that Z(f) contains only finitely many lines).

Given 1,…, k , we choose another line passing through p that is not parallel to any i and avoiding all the intersections i j . (Such an exists since only finitely many directions need to be avoided.) Then is not contained in Z(f) and it has k intersections with \(\bigcup_{i=1}^{k}\ell_{i}\). Lemma 2.1 yields kD. □

In the proof of Theorem 1.3 (spanning trees with low crossing number), we will also need the following result.

Theorem 2.3

(Harnack’s curve theorem [18])

Let f∈ℝ[x,y] be a bivariate polynomial of degree D. Then the number of (arcwise) connected components of Z(f) is at most \(1+{D-1\choose 2}\). The bound is tight in the worst case.

For our application, we actually do not need the precise bound in Harnack’s theorem; it suffices to know that the number of components is at most O(D 2). For the sake of completeness, we provide a short proof of an almost tight bound.

First we recall, without proof, another basic result in algebraic geometry; see, e.g., [6, p. 135],[11, p. 115],[12, p. 430].

Theorem 2.4

(Bézout’s theorem)

Let f,g∈ℝ[x,y] be two bivariate polynomials of degrees D f and D g , respectively, and let us suppose that f and g have no non-constant common factor. Then the system f=g=0 has at most D f D g solutions.

For a proof of Theorem 2.3, we choose a generic direction, and assume, without loss of generality, that it is the x-direction. We may assume that f is square-free, because eliminating repeated factors of f does not change its zero set.

Every bounded component of Z(f) has at least two extreme points in the x-direction (that is, its leftmost and rightmost points). Such an extreme point has to satisfy f=f y =0, where f y is the partial derivative of f with respect to y.

Since f is square-free, f and f y have no common factor,Footnote 2 and so by Theorem 2.4 the system f=f y =0 has at most D(D−1) solutions. Every bounded component consumes at least two of these critical points, and hence the number of bounded components is at most \(\frac{1}{2} D(D-1)\).

If B is a sufficiently large number, then (again, assuming generic directions of the coordinate axes) every unbounded component of Z(f) meets (at least) one of the two lines x=+B and x=−B. Thus, there are at most 2D unbounded components, and in total we get a bound of \(\frac{1}{2} D(D+1)\) on all components.

2.2 The Polynomial Ham-Sandwich Theorem

Here we review the polynomial ham-sandwich theorem of Stone and Tukey [39], the key tool used by Guth and Katz in constructing their partitioning polynomials.

We assume the standard ham-sandwich theorem in the following discrete version: Every d finite sets A 1,…,A d ⊂ℝd can be simultaneously bisected by a hyperplane. Here a hyperplane h bisects a finite set A if neither of the two open halfspaces bounded by h contains more than ⌊|A|/2⌋ points of A.

From this, it is easy to derive the polynomial ham-sandwich theorem, which we state for bivariate polynomials.

Theorem 2.5

Let A 1,…,A s ⊆ℝ2 be finite sets, and let D be an integer such that \({D+2\choose 2}-1\ge s\). Then there exists a nonzero polynomial f∈ℝ[x,y] of degree at most D that simultaneously bisects all the sets A i , where “f bisects A i ” means that f>0 in at most ⌊|A i |/2⌋ points of A i and f<0 in at most ⌊|A i |/2⌋ points of A i .

Proof

We note that \({D+2\choose 2}-1\) is the number of non-constant monomials in a bivariate polynomial of degree D, or in other words, the number of pairs (i,j) of nonnegative integers with 1≤i+jD. We set \(k:={D+2\choose 2}-1\), and we let Φ:ℝ2→ℝk denote the Veronese map, given by

(We think of the coordinates in ℝk as indexed by pairs (i,j) with 1≤i+jD.)

Assuming, as we may, that s=k, we set \(A'_{i}:=\varPhi(A_{i})\), i=1,2,…,k, and we let h be a hyperplane simultaneously bisecting \(A'_{1},\ldots,A'_{k}\). Then h has an equation of the form a 00+∑ i,j a ij z ij =0, where (z ij )(i,j)∣1≤i+jd are the coordinates in ℝk. It is easy to check that f(x,y):=∑ i,j a ij x i y j is the desired polynomial (here the sum includes a 00 too). □

2.3 Partitioning Polynomials

In this section we recall the construction of Guth and Katz [17], specialized to the planar setting (our formulation is slightly different from theirs). We also (informally) compare it to earlier tools of discrete geometry, such as cuttings.

Let P be a set of n points in the plane, and let r be a parameter, 1<rn. We say that f∈ℝ[x,y] is an r-partitioning polynomial for P if no connected component of ℝ2Z(f) contains more than n/r points of P.

In the sequel, we will sometimes call the connected components of ℝ2Z(f) cells (although they need not be cells in the sense typical, e.g., in topology; they need not be even simply connected). Let us also stress that the cells are open sets. The points of P lying on Z(f) do not belong to any cell, and usually require a special treatment.

Theorem 2.6

(Polynomial partitioning theorem; Guth and Katz [17])

For every r>1, every finite point set P⊂ℝ2 admits an r-partitioning polynomial f of degree at most \(O(\sqrt{r})\).

Proof

We inductively construct collections \(\mathcal {P}_{0},\mathcal {P}_{1},\ldots\), each consisting of pairwise disjoint subsets of P, such that \(|\mathcal {P}_{j}|\le 2^{j}\) for each j. We start with \(\mathcal {P}_{0}:=\{P\}\). Having constructed \(\mathcal {P}_{j}\), with at most 2j sets, we use the polynomial ham-sandwich theorem to construct a polynomial f j , of degree \(\deg(f_{j}) \le \sqrt{2\cdot2^{j}}\) (recall that the constraint to be satisfied is \({\deg(f_{j}) \choose 2}-1\ge 2^{j}\)), that bisects each of the sets of \(\mathcal {P}_{j}\). Then for every subset \(Q\in \mathcal {P}_{j}\), we let Q + consist of the points of Q at which f j >0, and let Q consist of the points of Q with f j <0, and we put \(\mathcal {P}_{j+1}:=\bigcup_{Q\in \mathcal {P}_{j}}\{Q^{+},Q^{-}\}\).

Each of the sets in \(\mathcal {P}_{j}\) has size at most |P|/2j. We let t=⌈log2 r⌉; then each of the sets in \(\mathcal {P}_{t}\) has size at most |P|/r. We set f:=f 1 f 2f t .

By the construction, no component of ℝ2Z(f) can contain points of two different sets in \(\mathcal {P}_{t}\), because any arc connecting a point in one subset to a point in another subset must contain a point at which one of the polynomials f j vanishes, so the arc must cross Z(f). Thus f is an r-partitioning polynomial for P.

It remains to bound the degree:

where \(c = 2\sqrt{2}/(\sqrt{2}-1) < 7\). □

A Comparison with Other Partitioning Techniques

The Guth–Katz technique with partitioning polynomials is useful for problems where we deal with a finite point set P and with a collection Γ of lines, algebraic curves, or algebraic varieties in higher dimensions. It provides a method of implementing the divide-and-conquer paradigm.

In the planar case discussed above, the plane is subdivided by Z(f) into some number of (open, connected) cells, each containing at most |P|/r points of P. If Γ consists of lines, then every γΓ intersects at most \(\deg(f)+1=O(\sqrt{r})\) cells (by Lemma 2.1). Similarly, for Γ consisting of algebraic curves of degree bounded by a constant, every γΓ intersects at most \(O(\sqrt{r})\) cells by Bézout’s theorem (Theorem 2.4). Thus, if we define, for every cell C i of ℝ2Z(f), a subset P i P as the set of points of P contained in C i , and we let Γ i consist of the lines or curves of Γ intersecting C i , then |P i |≤|P|/r for all i, and the average size of the Γ i is \(O(|\varGamma|/\sqrt{r})\).

There are two earlier partitioning tools in discrete geometry with a similar effect. The first, and simpler, kind of them are cuttings (see [8]). A cutting for a collection Γ of curves in the plane subdivides ℝ2 into a collection of connected, simply shaped cells, in such a way that no cell is crossed by more than a prescribed fraction of the curves of Γ. If we again let P i denote the set of points of P in the ith cell, and Γ i is the set of the curves intersecting that cell, then this time, with an appropriate choice of parameters, all Γ i have size \(O(|\varGamma|/\sqrt{r})\), and the average of the sizes |P i | isFootnote 4 |P|/r. Thus, the behavior of cuttings is, in a sense, “dual” to that of polynomial partitions. For many applications, this does not really make a difference.

The second of the earlier tools are simplicial partitions [24]. Here, as in the case of polynomial partitions, the plane is subdivided into cells so that |P i |≤|P|/r for each i (where, again, P i is the set of points of P in the ith cell), and no γΓ intersects more than \(O(\sqrt{r})\) cells.Footnote 5

In the plane, as far as we can see, whatever can be done with polynomial partitions, can also be achieved through cuttings or through simplicial partitions. The main advantage of polynomial partitions is simplicity of the proof. On the other hand, cuttings and simplicial partitions can be constructed and manipulated with fairly efficient algorithms, at least in the sense of asymptotic complexity, which is not obvious for polynomial partitions. For example, finding a ham-sandwich cut in a high-dimensional space is a rather costly operation; see [22]. (Nevertheless, recently, after the original submission of this paper, Agarwal, Matoušek, and Sharir [2] presented an efficient randomized algorithm for computing polynomial partitions.)

Polynomial partitions may be more powerful than the earlier tools if we pass to a higher-dimensional space ℝd, d>2. Asymptotically optimal cuttings and simplicial partitions are known to exist in ℝd, for every fixed d, in the case where Γ is a collection of hyperplanes. However, if we want to apply analogous methods to construct cuttings (or simplicial partitions, whose construction needs cuttings as a subroutine) for Γ consisting of algebraic surfaces of degree bounded by a constant, say, then there is a stumbling block. In one of the steps of the construction, we have a collection Γ′ of m surfaces from Γ. It is known that these surfaces partition ℝd into O(m d) cells, but we need to further subdivide each cell into subcells, so that each of the resulting subcells can be described by a constant number of real parameters. There is no known general solution that achieves O(m d) subcells in total, which is the optimal bound one is after for most applications (and which is achievable in the plane). For d=3,4, the situation is still not bad, since bounds only slightly worse than O(m d) have been proved, but for d≥5, the best bound is of order roughly m 2d−4, and so for large d, the exponent is almost twice as large as what it probably should be (see [1] for a more detailed discussion). The new approach with polynomial partitions might hopefully be able to bypass this stumbling block. Some recent progress in this direction can be found in [2].

3 Proof of the Szemerédi–Trotter Theorem

We recall that we are given a set P of m distinct points and a set L of n distinct lines in the plane and we want to bound the number of incidences I(P,L).

We begin with a simple observation (appearing in most of the previous proofs).

Lemma 3.1

I(P,L)≤n+m 2.

Proof

We divide the lines of L into two subsets: each of the lines in L′ is incident to at most one point of P, while each of the lines in L″ passes through at least two points.

Obviously, I(P,L′)≤|L′|≤n. In order to bound I(P,L″), we note that a point pP may have at most m−1 incidences with the lines of L″, since there are at most m−1 lines passing through p and some other point of P. Thus, I(P,L″)≤m(m−1)≤m 2. □

Let us remark that this lemma also follows from the Kővári–Sós–Turán theorem [23] concerning graphs with forbidden complete bipartite subgraphs. In the above argument, we are really proving the required instance of the Kővári–Sós–Turán theorem.

Proof of the Szemerédi–Trotter Theorem

For simplicity, we first carry out the proof for m=n, and then indicate the changes needed to handle an arbitrary m.

We set r:=n 2/3, and we let f be an r-partitioning polynomial for P. By the polynomial partitioning theorem (Theorem 2.6), we may assume \(D=\deg(f)=O(\sqrt{r}) = O(n^{1/3})\).

Let Z:=Z(f), let C 1,…,C s be the connected components of ℝ2Z, let P i :=PC i , and let P 0:=PZ. Since f is an r-partitioning polynomial, we have |P i |≤n/r=n 1/3, i=1,2,…,s. Furthermore, let L 0L consist of the lines of L contained in Z; we have |L 0|≤D by Lemma 2.2.

We decompose

We can immediately bound

and

since each line of LL 0 intersects Z, and thus also P 0, in at most D=deg(f) points.

It remains to bound \(\sum_{i=1}^{s} I(P_{i},L)\). Let L i L be the set of lines containing at least one point of P i (the L i are typically not disjoint). By Lemma 3.1 we get

We have \(\sum_{i=1}^{s}|L_{i}|=O((D+1)n)=O(n^{4/3})\), since by Lemma 2.1, no line intersects more than D+1 of the sets P i . Finally, \(\sum_{i=1}^{s} |P_{i}|^{2}\le (\max_{i} |P_{i}|)\cdot\sum_{i=1}^{s}|P_{i}|\le \frac{n}{r}\cdot n=O(n^{4/3})\). This finishes the proof for the case m=n.

We generalize the proof for an arbitrary m as follows. We may assume, without loss of generality, that mn; the complementary case is handled by interchanging the roles of P and L, via a standard planar duality (see, e.g., [26, Sec. 5.1]). We may also assume that \(\sqrt{n} \le m\), since otherwise, the theorem follows from Lemma 3.1. Then we set r:=m 4/3/n 2/3. Noting that 1≤rm for the assumed range of m, we then proceed as in the case m=n above. We get D=deg(f)=O(m 2/3/n 1/3), and we verify that all the partial bounds in the proof are at most O(m 2/3 n 2/3). □

4 Incidences of Points with Algebraic Curves

As stated in the introduction, we prove the following (weaker) version of Theorem 1.2.

Theorem 4.1

Let b,k and C be constants, let P be a set of m points in the plane, and let Γ be a family of n planar curves such that

  1. (i)

    every γΓ is an algebraic curve of degree at most b, and

  2. (ii)

    for every k distinct points in the plane, there exist at most C distinct curves in Γ passing through all of them.

Then I(P,Γ)=O(m k/(2k−1) n (2k−2)/(2k−1)+m+n), with the constant of proportionality depending on b,k,C.

In the proof, we may assume that the curves in Γ are irreducible.Footnote 6 Indeed, if it is not the case, we apply the forthcoming analysis to the irreducible components of the curves of Γ, whose number is at most bn.

We begin with an analog of Lemma 3.1.

Lemma 4.2

Under the conditions of Theorem 4.1, we have I(P,Γ)=O(n+m k), and also I(P,Γ)=O(m+n 2); the constants of proportionality depend on b,k,C.

Proof

For the first estimate, we distinguish between the curves with fewer than k incidences, which altogether generate O(n) incidences, and curves with at least k incidences, observing that there are at most \(C{m-1\choose k-1}\) such curves through each point of P.

For the second estimate, we first note that, by the assumed irreducibility and by Bézout’s theorem (Theorem 2.4), every pair of curves of Γ intersect in at most b 2 points. Then we distinguish between points lying on at most one curve each, which have O(m) incidences altogether, and the remaining points, each lying on at least two curves. Now a single γΓ has at most b 2(n−1) intersections with the other curves, and thus it contributes at most b 2(n−1) incidences with these latter points. So I(P,Γ)=O(m+n 2) follows. □

Proof of Theorem 4.1

We may assume mn 2 and nm k, for otherwise, the bounds of Lemma 4.2 give I(P,Γ)=O(m+n).

We set r:=m 2k/(2k−1)/n 2/(2k−1), and we observe that our assumptions on m,n yield 1≤rm. Let f be an r-partitioning polynomial for P, of degree

The proof now continues in much the same way as the proof of the Szemerédi–Trotter theorem.

We put Z:=Z(f), let P 0:=PZ, and let Γ 0Γ consist of the curves fully contained in Z. Since every γΓ 0 is irreducible, it must be a zero set of a factor of f (this follows from Bézout’s theorem), and so \(|\varGamma_{0}|\le \deg(f)= O(\sqrt{r})\). Hence I(P 0,Γ 0)=O(m+|Γ 0|2)=O(m+r)=O(m) by the second bound of Lemma 4.2. (Here the argument differs from the one for the Szemerédi–Trotter theorem—in the latter, it was enough to use the trivial bound I(P 0,L 0)≤|P 0|⋅|L 0|, which in general is not sufficient here.)

Next, we consider γΓΓ 0. Applying Bézout’s theorem to γ and every irreducible component of Z in turn, we find that every γΓ that is not fully contained in Z may intersect Z only in finitely many points—namely, \(|\gamma\cap Z|\le b\cdot \deg(f)=O(\sqrt{r})\) for all γΓΓ 0. So \(I(P_{0},\varGamma\setminus \varGamma_{0}) =O(n\sqrt{r})=O (m^{k/(2k-1)} n^{(2k-2)/(2k-1)} )\).

Letting C 1,…,C s be the connected components of ℝ2Z, it remains to bound \(\sum_{i=1}^{s} I(P_{i},\varGamma_{i})\), where P i =PC i and Γ i is the set of curves meeting C i . By Bézout’s theorem once again, we have \(\sum_{i=1}^{s}|\varGamma_{i}|=O(n\cdot\deg(f))= O(n\sqrt{r})\). Then, by the first bound of Lemma 4.2, we obtain

 □

5 Spanning Trees with Low Crossing Number in the Plane

In the forthcoming proof of Theorem 1.3, instead of constructing a geometric spanning tree directly, it will be more natural to construct an arcwise connected set X, made of segments and algebraic arcs, that has a low crossing number and contains the given point set P. Here we say that a set X⊆ℝd has crossing number at most k if each line, possibly with finitely many exceptions, intersects X in at most k points. (It is easy to check that for a geometric spanning tree, this new definition is equivalent to the earlier one.)

The following lemma allows us to convert such an X into a geometric spanning tree. We believe that most or all of the ideas of the proof appear in the literature in some form.

Lemma 5.1

Let P be a set of n points in the plane, and let X be an arcwise connected set containing P, with crossing number at most k. Then there exists a (geometric) spanning tree of P whose edges are straight segments and whose crossing number is at most 2k.

Proof

In the first stage of the proof we build a Steiner tree S for P, whose edges are arcs contained in X. We order the points of P arbitrarily, into a sequence p 1,p 2,…,p n . We set S 1={p 1}, and, having built a Steiner tree S i X for {p 1,…,p i }, we choose an arc α i connecting p i+1 to some point q i of S i , in such a way that α i S i ={q i }. Then we set S i+1:=S i α i , making q i a new node of S i+1, and splitting the arc it lies on into two edges of the new tree. Having reached i=n, we set S:=S n ; see Fig. 1. The crossing number of S is at most k since SX.

Fig. 1
figure 1

Illustrating the first two stages of the proof of Lemma 5.1: (Left) Building a Steiner tree from arcs. (Right) Shortcutting the arcs into segments

In the second stage, we replace arcs by straight segments. Namely, the points p i and q j divide S into finitely many subarcs, and we replace each of them by a straight segment connecting its endpoints. It is easy to see (and standard) that the crossing number does not increase. This yields a Steiner tree for P whose edges are straight segments.

In the third and last stage, we eliminate the Steiner points and obtain a spanning tree, at the price of at most doubling the crossing number. First we perform an in order traversal of the Steiner tree, starting from some arbitrary root vertex belonging to P; this results in a directed closed walk that traverses each edge twice, once in each direction. Thus, the walk now has twice as many intersections with a given line as the original Steiner tree. Next, we repeatedly shortcut the walk by skipping over the Steiner points; instead, we connect consecutive points of P by straight segments. This short cutting does not increase the crossing number. Finally, we eliminate cycles and multiple edges by deleting some of the resulting segments. □

The main step in the proof of Theorem 1.3 is the following lemma.

Lemma 5.2

Let P be a set of n points in the plane. Then there exists a set X⊆ℝ2 that contains P, has at most n/2 arcwise connected components, and with crossing number \(O(\sqrt{n})\).

Proof

If n is below a suitable constant, we can interconnect the points of P by an arbitrary geometric spanning tree, and so we may assume that n is large.

We apply the polynomial partitioning theorem (Theorem 2.6), to obtain an r-partitioning polynomial f for P, with r as large as possible but so that Z:=Z(f) is guaranteed to have at most n/2 connected components. By Theorem 2.6, we have \(\deg(f) =O(\sqrt{r})\), and so, by Harnack’s theorem (Theorem 2.3), we can afford to take r=n/c for a suitable constant c.

Then, for every pP not lying in Z, we pick a straight segment σ p connecting p to a point of Z (and otherwise avoiding Z). We let X:=Z∪⋃ pPZ σ p . Clearly, X has at most n/2 components, and it remains to bound its crossing number.

Let be a line that is not contained in Z and that does not contain any of the segments σ p (these conditions exclude only finitely many lines). It intersects Z in at most \(\deg(f)=O(\sqrt{n})\) points, and so it remains to bound the number of the segments σ p intersected by .

Since f is an r-partitioning polynomial for P, no component of ℝ2Z contains more than c points of P. The line meets at most 1+deg(f) components, and so it intersects at most \(c(1+\deg(f))=O(\sqrt{n})\) of the segments σ p . The lemma is proved. (Alternatively, the proof can be modified in the spirit of the proof of Theorem 6.1 below, namely, by constructing an arbitrary straight-line spanning tree on the points of each component of ℝdZ, and interconnect the points of ZP by Z itself.) □

Proof of Theorem 1.3

In view of Lemma 5.1, it suffices to construct an arcwise connected set X containing P, with crossing number \(O(\sqrt{n})\). To this end, we apply Lemma 5.2 recursively.

We construct a sequence B 0,B 1,B 2,… of sets, such that each B i contains P and has at most n/2i arcwise connected components. We begin with B 0:=P, and, having constructed B i , we choose a point in each of its components, which yields a set R i of at most n/2i points. Lemma 5.2 then provides us with a set X i R i with at most n/2i+1 components and crossing number \(O(\sqrt{n/2^{i}})\). We may assume that each component of X i contains at least one point of R i . We then set B i+1:=B i X i , and note that it has at most n/2i+1 connected components. Indeed, each point qB i is connected in B i , and thus also in B i+1, to some point in R i , so the number of components of B i+1 is at most the number of components of X i , which is at most n/2i+1. We now continue with the next iteration, until for some i 0 we reach an arcwise connected \(B_{i_{0}}\), which we use as X. The crossing numbers of the X i are bounded by a geometrically decreasing sequence, and so X has crossing number bounded by its sum, which is \(O(\sqrt{n})\), as required. □

6 Spanning Trees in Higher Dimensions

Here we prove the higher-dimensional generalization of Theorem 1.3 mentioned in the introduction.

Theorem 6.1

Every set P of n points ind admits a geometric spanning tree with crossing number (with respect to hyperplanes) at most C d n 1−1/d, with C d a sufficiently large constant depending on d.

When one tries to extend the planar proof from Sect. 5, using the appropriate higher-dimensional analogs of the polynomial partition lemma and Harnack’s theorem (discussed below), a problem arises when almost all the points of P happen to lie on the zero set Z(f) of the partitioning polynomial. (This situation seems hard to avoid—for example, P may lie on a low-degree algebraic variety, in which case the zero set of each of the bisecting polynomials would simply coincide with this variety.)

In the planar case this did not matter, since we could use Z(f) itself as a part of the connecting set X. However, in higher dimension, we cannot take all of Z(f) (which is typically a (d−1)-dimensional object), so we would still need to construct a suitable connecting 1-dimensional network with low crossing number within Z(f).

Fortunately, the spanning tree problem behaves well with respect to small perturbations. Namely, it is easy to see (and well known) that the crossing number of a geometric spanning tree cannot change by a (sufficiently small) perturbation of its vertex set, and this will allow us to avoid the situation with too many points on Z(f). Before carrying out this plan, we first summarize and review the additional tools we need, beyond those already covered.

6.1 Additional Tools

The polynomial ham-sandwich theorem (Theorem 2.5) and the polynomial partitioning theorem (Theorem 2.6) immediately generalize to ℝd, with the d-variate r-partitioning polynomial f having degree O(r 1/d) (this relies on the fact that the number of monomials of degree D in d variables is \({D+d\choose d}\), so the degree will be the smallest integer D satisfying \({D+d\choose d}-1\ge r\)).

We will also need a kind of generalization of Harnack’s theorem, dealing with components of the complement of Z(f), rather than with the components of Z(f):

Lemma 6.2

Let f be a real polynomial of degree D in d variables. Then the number of connected components ofdZ(f) is at most (2D)d.

Using a basic result of algebraic topology known as the Alexander duality (see, e.g., Munkres [30, §71]), this follows from classical results on the sum of Betti numbers of real algebraic varieties of Oleinik and Petrovskiı̌ [31, 35], Milnor [29], and Thom [42]. With a slightly worse constant, it is also a special case of Theorem 2 of Warren [44] (also see [6] for an exposition, and [3] for a neatly simplified proof).

We also note that if f is as in Lemma 6.2 and h is a hyperplane in ℝd, then hZ(f) has at most (2D)d−1 connected components, and consequently, h intersects at most that many components of ℝdZ(f). Indeed, this is clear from Lemma 6.2 if h is the coordinate hyperplane x d =0, and the general case follows by a linear transformation of coordinates.

6.2 A General Position Lemma

The next lemma is probably known, but unfortunately we do not have a reference at the moment.

Lemma 6.3

Let d,D be given integers, and let \(k:={D+d\choose d}-1\). Let P=(p 1,…,p k+1) be an ordered (k+1)-tuple of points ind. Let us call P exceptional if it is contained in the zero set of a nonzero d-variate polynomial of degree at most D. Then there is a nonzero polynomial ψ=ψ d,D with integer coefficients in the variables z ij , 1≤ik+1, 1≤jd, such that all exceptional (k+1)-tuples (p 1,…,p k+1) belong to the zero set of ψ. That is, if we set z ij to the jth coordinate of p i , for all i,j, then ψ evaluates to 0.

Proof

The value of k in the lemma is the number of non-constant monomials of degree at most D in the d variables x 1,…,x d . Let μ 1,μ 2,…,μ k be an enumeration of these monomials in some fixed order.

It is convenient to phrase the argument using the Veronese map Φ:ℝd→ℝk, which we encountered in Sect. 2.2 for the special case d=2. For x=(x 1,…,x d )∈ℝd, we can write Φ(x)=(μ i (x)∣i=1,2,…,k)∈ℝk.

As in the proof of Theorem 2.5, the zero set Z(f) of a polynomial f of degree at most D can be written as Φ −1(h), where h is a suitable hyperplane in ℝk. Thus, the condition for a (k+1)-tuple P=(p 1,…,p k+1) of points in ℝd to be exceptional is equivalent to the k+1 points Φ(p 1),…,Φ(p k+1) lying on a common hyperplane in ℝk.

The condition that k+1 points q 1,…,q k+1 in ℝk lie on a common hyperplane can be expressed by the vanishing of a suitable determinant in the coordinates of q 1,…,q k+1. Namely, it is equivalent to det(A)=0, where

We define the desired polynomial ψ by

where z i =(z i1,…,z id ). Clearly, ψ has integer coefficients, and by the above, it vanishes on all exceptional sequences; it remains to verify that it is not identically 0.

Assuming the contrary, it means that the images of any k+1 points under the Veronese map lie on a common hyperplane in ℝd. This in turn implies that all of Φ(ℝd) is contained in a hyperplane. But the Φ-preimage of every hyperplane is the zero set of some nonzero polynomial, and thus it cannot be all of ℝd (extending the observation in the proof of Lemma 2.2 to higher dimensions).Footnote 7 The resulting contradiction proves the lemma. □

6.3 Proof of Theorem 6.1

Given a finite point set P⊂ℝd, we first perturb each point slightly, obtaining a new set P′, for which we may assume that the coordinates of its points are algebraically independent (i.e., they do not satisfy any nontrivial polynomial equation with integer coefficients).Footnote 8

In particular, for every D=1,2,…, if we set \(k:={D+d\choose d}-1\) as in Lemma 6.3, then no (k+1)-tuple of points of P′ is contained in Z(f), for any nonzero polynomial f of degree at most D.

By the observation mentioned at the beginning of Sect. 6, it suffices to exhibit a geometric spanning tree with crossing number O(n 1−1/d) for P′.

Moreover, it suffices to show that there exists a geometric graph G on the vertex set P′ with at most n/2 components and with crossing number O(n 1−1/d); the existence of the desired spanning tree then follows by recursion on the size of P′ (as in the proof of the planar case).

So we set r:=n/c for a sufficiently large constant c>0, and construct an r-partitioning polynomial f for P′, of degree D=O(r 1/d); thus, no component of ℝdZ contains more than c points of P′, where Z=Z(f).

By the algebraic independence of P′, and by Lemma 6.3, Z contains fewer than \({D+d\choose d}=O(r)\) points of P′, with a constant of proportionality depending only on D. For c sufficiently large, we thus have \(|P'_{0}|\le \frac{n}{4}\), where \(P'_{0}:=P'\cap Z\). By Lemma 6.2, we may also assume that for c sufficiently large, ℝdZ has at most \(\frac{n}{4}\) components.

For each component U of ℝdZ, we now interconnect the points of UP′ by an arbitrary geometric spanning tree T U . (Note that T U need not be contained in U.) The geometric graph G is the union of all the trees T U and the points of \(P'_{0}\) (which appear as isolated vertices in G). The number of connected components of G is at most \(\frac{n}{2}\) (one for each T U and one for each point of \(P'_{0}\)). It remains to bound its crossing number.

To this end, let h be a hyperplane avoiding P′, and let us consider an edge {p,q} of G crossed by h. This edge belongs to some T U , and so the points p and q lie in the same component U of ℝdZ. Considering an arc αU connecting p to q, we see that h has to intersect α and thus U too. By the remark following Lemma 6.2, h intersects at most O(D d−1)=O(n 1−1/d) components of ℝdZ, and within each such component U it meets at most c edges of G (that is, of T U ). Hence the crossing number of G is O(n 1−1/d), as claimed.

As noted above, this completes the proof of the theorem.  □

7 Conclusion

We regard this paper as an initial stepping stone in the development of applications of the new algebraic machinery of Guth and Katz. It is encouraging that this technique can replace more traditional approaches and yield simpler proofs of central theorems in combinatorial geometry.

Of course the real challenge is to use the techniques to obtain improved solutions to other “hard Erdős problems in discrete geometry” (borrowing from the title of [40]), as Guth and Katz themselves did, first for the joints problem in [16] and then for the harder distinct distances problem in [17]. There is a long list of candidate problems, of varying degree of difficulty. Perhaps the hardest in the list is the planar unit distances problem of Erdős: What is the maximum possible number of unit distances determined by a set of n points in the plane? This problem seems to require an algebraic approach, mainly because the best known upper bound, O(n 4/3), is known to be tight if the norm is not Euclidean, as shown by Valtr [43].

In closing, one should note that the algebraic approach used in this paper has also some disadvantages. For one, it seems to require the objects to be algebraic or semialgebraic. For example, the Szemerédi–Trotter theorem can easily be extended to yield the same bound on the number of incidences of points and pseudolines, using, e.g., the combinatorial proof technique of Székely [40], but such an extension does not seem to follow from the polynomial partitioning technique. The same situation occurs in the setup of Theorem 1.2, where the general situation considered there can be handled by traditional combinatorial tools (similar to those used in [40]), but not by the algebraic machinery, which can only establish weaker variants, like the one in Theorem 4.1. Perhaps some abstract version of polynomial partitions, yet to be discovered, might combine the advantages of both approaches. For this one would probably need a topological extension of the Veronese map that is used in the proof of Theorem 2.5.