Bisector Energy and Few Distinct Distances

We define the bisector energyE(P)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal E(\mathcal P)$$\end{document} of a set P\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal P$$\end{document} in R2\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathbb R^2$$\end{document} to be the number of quadruples (a,b,c,d)∈P4\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(a,b,c,d)\in \mathcal P^4$$\end{document} such that a, b determine the same perpendicular bisector as c, d. Equivalently, E(P)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal E(\mathcal P)$$\end{document} is the number of isosceles trapezoids determined by P\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal P$$\end{document}. We prove that for any ε>0\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\varepsilon >0$$\end{document}, if an n-point set P\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal P$$\end{document} has no M(n) points on a line or circle, then we have E(P)=O(M(n)25n125+ε+M(n)n2).\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \mathcal E(\mathcal P) = O\big (M(n)^{\frac{2}{5}}n^{\frac{12}{5}+\varepsilon } + M(n)n^2\big ). \end{aligned}$$\end{document}We derive the lower bound E(P)=Ω(M(n)n2)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal E(\mathcal P)=\Omega (M(n)n^2)$$\end{document}, matching our upper bound when M(n) is large. We use our upper bound on E(P)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal E(\mathcal P)$$\end{document} to obtain two rather different results: If P\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal P$$\end{document} determines O(n/logn)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$O(n/\sqrt{\log n})$$\end{document} distinct distances, then for any 0<α≤1/4\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$0<\alpha \le 1/4$$\end{document}, there exists a line or circle that contains at least nα\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$n^\alpha $$\end{document} points of P\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal P$$\end{document}, or there exist Ω(n8/5-12α/5-ε)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\Omega (n^{8/5-12\alpha /5-\varepsilon })$$\end{document} distinct lines that contain Ω(logn)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\Omega (\sqrt{\log n})$$\end{document} points of P\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal P$$\end{document}. This result provides new information towards a conjecture of Erdős (Discrete Math 60:147–153, 1986) regarding the structure of point sets with few distinct distances. If no line or circle contains M(n) points of P\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal P$$\end{document}, the number of distinct perpendicular bisectors determined by P\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal P$$\end{document} is ΩminM(n)-2/5n8/5-ε,M(n)-1n2\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\Omega \left( \min \left\{ M(n)^{-2/5}n^{8/5-\varepsilon }, M(n)^{-1} n^2\right\} \right) $$\end{document}. If P\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal P$$\end{document} determines O(n/logn)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$O(n/\sqrt{\log n})$$\end{document} distinct distances, then for any 0<α≤1/4\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$0<\alpha \le 1/4$$\end{document}, there exists a line or circle that contains at least nα\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$n^\alpha $$\end{document} points of P\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal P$$\end{document}, or there exist Ω(n8/5-12α/5-ε)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\Omega (n^{8/5-12\alpha /5-\varepsilon })$$\end{document} distinct lines that contain Ω(logn)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\Omega (\sqrt{\log n})$$\end{document} points of P\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal P$$\end{document}. This result provides new information towards a conjecture of Erdős (Discrete Math 60:147–153, 1986) regarding the structure of point sets with few distinct distances. If no line or circle contains M(n) points of P\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal P$$\end{document}, the number of distinct perpendicular bisectors determined by P\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal P$$\end{document} is ΩminM(n)-2/5n8/5-ε,M(n)-1n2\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\Omega \left( \min \left\{ M(n)^{-2/5}n^{8/5-\varepsilon }, M(n)^{-1} n^2\right\} \right) $$\end{document}.


Introduction
Guth and Katz [13] proved that every set of n points in R 2 determines (n/ log n) distinct distances. This almost completely settled a conjecture of Erdős [7], who observed that the √ n × √ n integer lattice determines (n/ √ log n) distances, and conjectured that every set of n points determines at least this number of distances. Beyond the remaining √ log n gap, this leaves open the question of which point sets determine few distances. Erdős [9] asked whether every set that determines O(n/ √ log n) distances "has lattice structure". He then wrote: The first step would be to decide if there always is a line which contains cn 1/2 of the points (and in fact n ε would already be interesting). ' Embarrassingly, almost three decades later the bound n ε seems as distant as it ever was. The following bound is a consequence of an argument of Szemerédi, presented by Erdős [8]. Recently, it was noticed that this bound can be slightly improved to (log n) points on a line (see [21]). Assuming that no line contains an asymptotically larger number of points, one can deduce the existence of (n/ log n) distinct lines that contain (log n) points of P. By inspecting Szemerédi's proof, it is also apparent that these lines are perpendicular bisectors of pairs of points of P.
This problem was recently approached from the other direction in [17,18,22]. Combining the results of these three papers implies the following. If an n-point set P ⊂ R 2 determines o(n) distances, then no line contains (n 43/52+ε ) points of P, no circle contains (n 5/6 ) points, and no other constant-degree irreducible algebraic curve contains (n 3/4 ) points.
In the current paper we study a different aspect of sets with few distinct distances. Our main tool is a bound on the bisector energy of the point set (see below for a formal definition). Using this tool, we prove that if a point set P determines O(n/ √ log n) distinct distances, then there exists a line or a circle with many points of P, or the number of lines containing ( √ log n) points must be significantly larger than implied by Theorem 1.1. As another application of bisector energy, we prove that if no line or circle contains many points of a point set P, then P determines a large number of distinct perpendicular bisectors. We will provide more background to both results after we have properly stated them.

Bisector Energy
Given two distinct points a, b ∈ R 2 , we denote by B(a, b) their perpendicular bisector (i.e., the line consisting of all points that are equidistant from a and b); for brevity, we usually refer to it as the bisector of a and b. We define the bisector energy of P as E(P) = (a, b, c, d) ∈ P 4 : a = b, c = d, and B(a, b) = B(c, d) .
Equivalently, E(P) is the number of isosceles trapezoids determined by P (not counting isosceles triangles). Note that if each distinct pair of points of P determines a distinct bisector, then E(P) = 2n(n − 1), since quadruples of the form (a, b, a, b),  (a, b, b, a), (b, a, a, b), and (b, a, b, a) are counted for each of the n 2 choices for distinct a, b ∈ P. In Sect. 3, we prove the following upper bound on this quantity. We note that one important ingredient of our proof is the result of Guth and Katz [13]; without it, we would obtain a weaker (although nontrivial) bound on the bisector energy (see the remark at the end of Sect. 3.3).
In Sect. 4, we present a construction that implies a lower bound for the maximum bisector energy. It shows that Theorem 2.1 is tight when its second term dominates, i.e., when M(n) = (n 2/3+ε ). We conjecture that E(P) = O(M(n)n 2 ) is true for all M(n). Let P be a √ n × √ n section of the integer lattice. It is well known that P determines (n/ √ log n) distinct distances (see [7]). It can be easily verified that no line or circle contains more than √ n points of P (a more involved argument shows that no circle contains n ε points of P, for any ε > 0). In this case we have E(P) = O(n 5/2 ), which fits our conjectured bound E(P) = O(M(n)n 2 ).
In concurrent work, Hanson et al. [14] proved a finite field analogue of Theorem 2.1. They showed that for any P ⊂ F 2 q we have |E(P)| = O(|P| 4 q −2 +q|P| 2 ), where E(P) is analogously defined, and q is an odd prime power.

Few Distinct Distances
Pach and Tardos [16] proved that an n-point set P ⊂ R 2 determines O(n 2.137 ) isosceles triangles. They also observed that this bound implies that P contains a point from which there are (n 0.863 ) distinct distances (a result obtained earlier in [26] and improved slightly in [15]). Similarly, our upper bound on the number of isosceles trapezoids determined by a point set P has implications concerning the distinct distances that are determined by P.
We deduce the following theorem from Theorem 2.1. More precisely, it follows from the slightly more general Theorem 5.1 that we prove in Sect. 5.

Theorem 2.3
Let P ⊂ R 2 be a set of n points that spans O(n/ √ log n) distinct distances. For any 0 < α ≤ 1/4, at least one of the following holds (with constants independent of α).
(i) There exists a line or a circle containing (n α ) points of P.
If our conjecture that E(P) = O(M(n)n 2 ) is true, alternative (ii) in the conclusion of Theorem 2.3 improves to (n 2−3α log n) lines that contain ( √ log n) points of P. We believe that Theorem 2.3 is a step towards Erdős's lattice conjecture. We mention several recent results and conjectures that together paint an interesting picture.
Green and Tao [12] proved that, given an n-point set in R 2 such that more than n 2 /6 − O(n) lines contain at least three of the points, most of the points must lie on a cubic curve (an algebraic curve of degree three, which need not be irreducible). Elekes and Szabó [6] stated the stronger conjecture that if an n-point set determines (n 2 ) collinear triples, then many of the points lie on a cubic curve; unfortunately, at this point it is not even known whether there must be a cubic that contains ten points of the set. Erdős and Purdy [10] conjectured that if n points determine (n 2 ) collinear quadruples, then there must be five points on a line. If the point set is already known to lie on a low-degree algebraic curve, then both conjectures hold [6,20]. On the other hand, Solymosi and Stojaković [23] proved that for any constant k, there are point sets with (n 2−ε ) lines containing exactly k points, but no line with k + 1 points.
The philosophy of these statements is that if there are many lines containing many points, then most points must lie on some low-degree algebraic curve. Our result shows that for an n-point set with few distinct distances, there is a line or circle with very many points, or else there are many lines with many points. In particular, in the second case there would be many collinear triples (although not quite as many as (n 2 )), and many lines with very many points (more than a constant number). This suggests that few distinct distances should imply some algebraic structure. Let us pose a specific question in this direction: Are there constants 0 < β, β < 1 such that if n points determine (n 1+β ) lines with ( √ log n) points, then (n β ) points lie on a constant degree algebraic curve?

Distinct Bisectors
Let B(P) be the set of those lines that are (distinct) perpendicular bisectors of P. Since any point of P determines n − 1 distinct bisectors with the other points of P, we have a trivial lower bound |B(P)| ≥ n − 1. If P is a set of equally spaced points on a circle, then |B(P)| = n. Similarly, if P is a set of n equally spaced points on a line, then |B(P)| = 2n − 3. As we now show, forbidding many points on a line or circle forces |B(P)| to be significantly larger.

Theorem 2.4 If an n-point set P ⊂ R 2 has no M(n) points on a line or circle, then
By the Cauchy-Schwarz inequality, we have Combining this with the bound of Theorem 2.1 immediately implies the theorem.
Note that, as in Theorem 2.1, the minimum is the first expression as long as M(n) = O(n 2/3+ε ). We are not aware of any previous bound on the minimum number of distinct bisectors determined by a point set in R 2 . As a consequence of their bound on the bisector energy, Hanson et al. [14] proved that a set of at least q 3/2 points in F 2 q (where q is an odd prime power) determines (q 2 ) distinct perpendicular bisectors.
We are not aware of any point set that determines o(n 2 ) distinct bisectors without having the vast majority of the points on a single line or circle. We conjecture that for any c < 1, if a set P of n points in R 2 has the property that no line or circle contains cn points of P, then the number of distinct bisectors that are determined by P is (n 2 ). We note that while Theorem 2.1 is tight for M(n) = (n 2/3+ε ), applying it in the proof of Theorem 2.4 leads to a bound that seems not to be tight (excluding the trivial case of M(n) = n − O(1)).
Theorem 2.4 is related to a series of results initiated by Elekes and Rónyai [4], studying the expansion properties of polynomials and rational functions. For instance, in [19] it is proved that a polynomial function F : R × R → R takes (n 4/3 ) values on the n 2 pairs from a finite set in R of size n, unless F has a special form. Elekes and Szabó [5] derived, among other things, the following two-dimensional generalization (rephrased for our convenience, and omitting some details). If F : R 2 × R 2 → R 2 is a rational function that is not of a special form, and P ⊂ R 2 is an n-point set such that no low-degree curve contains more than a constant number of points of P, then F takes (n 1+ε ) values on P × P. Note that the condition on avoiding low-degree curves is very restrictive. Theorem 2.4 proves a better bound for the function B, with a less restrictive condition on P. If we view a line y = sx + t as a point (s, t) ∈ R 2 , then (see the proof of Lemma 3.1) is a rational function R 2 × R 2 → R 2 . Theorem 2.4 says that B takes many distinct values on P × P if P has few points on a line or circle. So we have replaced the broad condition of [5] that not too many points lie on a low-degree curve, with the very specific condition that not too many points lie on a line or circle.

An Incidence Bound
One of the tools we use to prove Theorem 2.1 is the incidence bound below, which is a refined version of a theorem of Fox et al. [11].
Given a set P ⊂ R d of points and a set S ⊂ R d of varieties, the incidence graph is a bipartite graph with vertex sets P and S, such that ( p, S) ∈ P × S is an edge in the graph if p ∈ S. We write I (P, S) for the number of edges of this graph, or in other words, for the number of incidences between P and S. We denote the complete bipartite graph on s and t vertices by K s,t (in the incidence graph, such a subgraph corresponds to s points that are contained in t varieties). For the definitions of the algebraic terms in this statement we refer to [11].

Theorem 2.5 Let S be a set of n constant-degree varieties and let P be a set of m points, both in R d , such that the incidence graph of P × S contains no copy of K s,t (where s is a constant, but t may depend on m, n). Moreover, suppose that P ⊂ V , where V is an irreducible constant-degree variety of dimension e. Then
The main difference between Theorem 2.5 and the corresponding theorem in Fox et al. [11] is that Theorem 2.5 shows the dependence of the bound on t, which was left implicit in [11]. The proof that we give in Sect. 6 is a slight modification of the proof in [11].

Proof of Theorem 2.1
In this section we prove Theorem 2.1 by relating the bisector energy to an incidence problem between points and algebraic surfaces in R 4 . In Sect. 3.1 we define the surfaces, in Sect. 3.2 we analyze their intersection properties, and in Sect. 3.3 we apply the incidence bound of Theorem 2.5 to prove Theorem 2.1.
Throughout this section we assume that we have rotated P so that no two points have the same x-or y-coordinate; in particular, we assume that no perpendicular bisector is horizontal or vertical.

Bisector Surfaces
Recall that in Theorem 2.1 we consider an n-point set P ⊂ R 2 . We define P 2 * = {(a, c) ∈ P 2 : a = c}, and we view it as a point set in R 4 . Similarly, we define Also recall that for distinct a, b ∈ P, we denote by B(a, b) the perpendicular bisector of a and b. We define the bisector surface of a pair (a, c) ∈ P 2 * as and we set S = {S ac : (a, c) ∈ P 2 * }. The surface S ac is not an algebraic variety (so we are using the word "surface" loosely), but the lemma below shows that S ac is "close to" a variety S ac . That S ac is contained in a constant-degree two-dimensional 2 variety is no surprise (one can take the Zariski closure), but we need to analyze this variety in detail to establish the exact relationship.
We will work mostly with the surface S ac in the rest of this proof, rather than with the variety S ac , because its definition is easier to handle. Then, when we apply our incidence bound, which holds only for varieties, we will switch to S ac . Fortunately, the following lemma shows that it is easy to characterize the points of P 2 * that are in S ac but not in S ac .

Lemma 3.1 For distinct a, c ∈ P, there exists a two-dimensional constant-degree algebraic variety S ac such that S ac
By definition B(a, b) passes through the midpoint ((a x + b x )/2, (a y + b y )/2) of a and b, as well as through the midpoint (c x + d x )/2, (c y + d y )/2 of c and d. We thus have By combining (1) and (2) we obtain From (1) and ( Since any point (b, d) ∈ S ac satisfies these two equations, we have Consider a point (b, d) ∈ (S ac \S ac ) ∩ P 2 * . By reexamining the above analysis, we see that for this to happen we must have a y = b y or c y = d y (since then (1) is not well defined). By the assumption that no two points of P have the same y-coordinate, It remains to prove that S ac is a constant-degree two-dimensional variety. The constant degree is immediate from f ac and g ac being polynomials of degree at most three. As just observed, a point (b, d) ∈ S ac \S ac satisfies a y = b y or c y = d y . If We see that in each case we get two independent linear equations, which define a plane, so S ac \S ac is the union of three two-dimensional planes. Thus, it suffices to prove that S ac is two-dimensional. For this, we simply show that for any valid value of b there is at most one valid value of d. Let C ac ⊂ R 2 denote the circle that is centered at c and incident to a (here we use a = c). It is impossible for b to lie on C ac , since this would imply that the bisector Remark Note that the variety S ac is not the Zariski closure of S ac . For example, S ac also contains the two-dimensional plane that is defined by x 2 = a y and x 4 = c y .

Intersections of Bisector Surfaces
We denote by R ab the reflection of R 2 across the line B(a, b). Observe that if B(a, b) = B(c, d), then R ab = R cd , and this reflection maps a to b and c to d; this in turn implies that |ac| = |bd|. That is, (b, d) ∈ S ac implies |ac| = |bd|. It follows that if |ac| = δ, then the surface S ac is contained in the hypersurface We can thus partition S into classes corresponding to the distances δ that are determined by pairs of points of P. Each class consists of the surfaces S ac with |ac| = δ, all of which are fully contained in H δ .
We now study the intersection of two surfaces contained in a hypersurface H δ . (a, c) = (a , c ), |ac| = |a c | = δ = 0, and S a,c ∩ S a,c = ∅. Then there exist curves C 1 , C 2 ⊂ R 2 , which are either two concentric circles or two parallel lines, such that a, a ∈ C 1 , c, c ∈ C 2 , and S ac ∩ S a c is contained in the set  B(c, d) = B(a, b) = B(c , d), which in turn implies c = c . Since this contradicts an assumption of the lemma, we may assume that a = a . By a symmetric argument we may assume that c = c .

Lemma 3.2 Let
We split the analysis into three cases:  o = B(a, a ) ∩ B(c, c ). Then there exist two (not necessarily distinct) circles C 1 , C 2 around o such that a, a ∈ C 1 and c, c ∈ C 2 . If (b, d) ∈ S ac ∩ S a c , then the reflection R ab maps a to b and c to d, and similarly, R a b maps b to a and d to c . We set T = R a b • R ab , and notice that this is a rotation whose center o * is the intersection point of B(a, b) = B(c, d) and B(a , b) = B(c , d). Note that T(a) = a and T(c) = c , so o * lies on both B(a, a ) and B(c, c ). Since o = B(a, a ) ∩ B(c, c ), B(a, a ) = B(c, c ). The line segment ac is a reflection across of the line segment a c . Thus, the intersection point o of the lines that contains these two segments is incident to . Let C 1 be the circle centered at o that contains a and a , and let C 2 be the circle centered at o that contains c and c . With this definition of o, C 1 , and C 2 , we can repeat the analysis of case (i), obtaining the same conclusion. this case B(a, a ) and B(c, c ) are parallel. The analysis of this case is similar to that in case (i), but with lines instead of circles.

Case (iii) In
Let C 1 be the line that is incident to a and a , and let C 2 be the line that is incident to c and c . Note that C 1 and C 2 are parallel lines, each perpendicular to B(a, a ) and B(c, c ). If (b, d) ∈ S ac ∩ S a c , then, as before, R ab maps a to b and c to d, and R a b maps b to a and d to c . Since T = R a b •R ab maps a to a and c to c , it is a translation in the direction parallel to the lines C 1 and C 2 ; hence, R a b and R ab are reflections over lines that are perpendicular to C 1 and C 2 . This implies that b ∈ C 1 and d ∈ C 2 , which completes the analysis of this case.
In Sect. 3.3, we will use Theorem 2.5 to bound the number of incidences between the point set P 2 * = {(b, d) ∈ P 2 : b = d} and the set of surfaces S. For this we need to show that the incidence graph contains no complete bipartite graph K 2,M ; that is, that for any two points of P 2 * there is a bounded number of surfaces of S that contain both points. In the following lemma we prove the more general statement that the incidence graph contains no K 2,M and no K M,2 , although we will only make use of the fact that there is no K 2,M .

Corollary 3.3
If no line or circle contains M points of P, then the incidence graph of P 2 * × S contains neither a copy of K 2,M nor a copy of K M,2 .
Proof As mentioned above, (b, d) ∈ S ac implies |ac| = |bd|. Hence, it suffices to consider pairs of surfaces S ac , S a c with |ac| = |a c |.
Consider two distinct surfaces S ac , S a c ∈ S with |ac| = |a c | = δ. Lemma 3.2 implies that there exist two lines or circles C 1 , C 2 such that (b, d) ∈ S ac ∩ S a c only if b ∈ C 1 and d ∈ C 2 . Since no line or circle contains M points of P, we have B(a, b) = B(c, d), and thus at most one point (b, d) ∈ S ac . (Notice that no points of the form (a, d) ∈ P 2 * are in S ac .) Thus That is, the incidence graph contains no copy of K M,2 .
We now define "dual" surfaces for pairs (b, d) ∈ P 2 * by and set S * = {S * bd : (b, d) ∈ P 2 * }. By a symmetric argument, we get Observe that (a, c) ∈ S * bd if and only if (b, d) ∈ S ac . Hence, having fewer than M points (a, c) ∈ (S * bd ∩ S * b d ) ∩ P 2 * is equivalent to having fewer than M surfaces S ac that contain both (b, d) and (b , d ); i.e., the incidence graph contains no K 2,M .
Remark Set S = {S ac : (a, c) ∈ P 2 * }. Because the surfaces in S are not varieties, and our incidence bound applies only to varieties, we will actually apply it to S. This leads to the following complication, which will be dealt with below. The incidence graph of P 2 * × S does contain large complete bipartite graphs. Indeed, for fixed a ∈ P we have (a, d) ∈ S ac for all d, c not equal to a, which gives a copy of K n−1,n−1 in the incidence graph.

Applying the Incidence Bound
For simplicity, we write M = M(n) throughout this proof. We set B(a, b) = B(c, d)}, and note that |Q|+n(n −1) = E(P), where the term n(n −1) accounts for the quadruples of the form (a, b, a, b). As we saw in Sect. 3.2, every quadruple (a, b, c, d) ∈ Q satisfies |ac| = |bd|.
Let δ 1 , . . . , δ D denote the distinct distances that are determined by pairs of distinct points in P. We partition P 2 * into the disjoint subsets 1 , . . . , D , where We also partition S into disjoint subsets S 1 , . . . , S D , defined by Similarly, we set S i = {S ac ∈ S : |ac| = δ i }. Let m i be the number of (a, c) ∈ P 2 * such that |ac| = δ i . Note that | i | = |S i | = m i and m i = n(n − 1).

A quadruple (a, b, c, d) ∈ P 4 * is in Q if and only if the point (b, d) is incident to
S ac . Moreover, there exists a unique 1 ≤ i ≤ D such that (b, d) ∈ i and S ac ∈ S i . Therefore, it suffices to study each i and S i separately. That is, we have We have I ( i , S i ) ≤ I ( i , S i ), and we will use Theorem 2.5 to bound I ( i , S i ) for each i. By Corollary 3.3, the incidence graph of P 2 * × S contains no K 2,M , hence neither does the incidence graph of i × S i . As observed after Corollary 3.3, the incidence graph of P 2 * × S does contain large complete bipartite graphs. Fortunately, this is not the case for i × S i , as we now argue.
Consider a point (b, d) ∈ i and a surface S ac ∈ S i such that (b, d) ∈ S ac \S ac ; we have |ac| = δ i = |bd|. By Lemma 3.1, we have b = a or d = c. If b = a, then c lies on the circle around b of radius δ i , while if d = c, then a lies on the circle around d of radius δ i . By assumption, no circle contains M points of P, so there are less than M points c for which (b, d) ∈ S bc \S bc , and less than M points a for which (b, d) ∈ S ad \S ad . This means that the incidence graph of i × S i has at most 2M more edges incident with (a, d) than the incidence graph of i × S i . It follows that the incidence graph of i × S i contains no K 2,3M .
Observe that i ⊂ H δ i . The hypersurface H δ i is irreducible, three-dimensional, and of a constant degree, since it is defined by the irreducible polynomial (x 1 − x 3 ) 2 + (x 2 − x 4 ) 2 − δ i . Thus we can apply Theorem 2.5 to the incidence graph of i × S i , with m = n = m i , V = H δ i , d = 4, e = 3, s = 2, and t = 3M. This implies that Let J be the set of indices 1 ≤ j ≤ D for which the bound in (4) This implies that the number of m j for which m j ≥ x is O(n 3 log n/x 2 ). By using a dyadic decomposition, we obtain In conclusion, which completes the proof of Theorem 2.1.

Remark About the Incidence Bound
Instead of partitioning the problem into D separate incidence problems, one can apply an incidence bound directly to the point set P 2 * and the surface set S. Roughly speaking, the best known bounds for incidences with two-dimensional surfaces in R 4 , whose incidence graph contains no K 2,M , are of the form |P 2 * | 2/3 |S| 2/3 . Relying on such an incidence bound (and not using [13]) would yield a bound |Q| = O(M 1/3 n 8/3 + Mn 2 ) = O(M 1/3 n 8/3 ), which is nontrivial but weaker than our bound. For simplicity, we assume that M(n) is a multiple of 8, and that n is divisible by M(n). It is straightforward to extend the construction to values that do not satisfy these conditions.
Let C be an ellipse that is centered at the origin, has a major axis of length 2 that is parallel to the y-axis, and a minor axis of length 1 that is parallel to the x-axis. Let P + be an arbitrary set of 4n/M(n) points on C, each having a strictly positive x-coordinate. Let P − be the reflection of P + over the y-axis, and set P = P + ∪ P − . We denote by P j the translate of P by (4 j, 0). Finally, we take P = P 0 ∪ P 1 ∪ · · · ∪ P M(n)/8−1 . An example is depicted in Fig. 2.
Note that P lies on the union of M(n)/8 ellipses. Since a line can intersect an ellipse in at most two points, and a circle can intersect an ellipse in at most four points, we indeed have that a line or circle contains at most M(n) points of P.
It remains to prove that E(P) = (M(n)n 2 ). For every integer M(n)/32 ≤ j ≤ M(n)/16, we denote by j the vertical line x = 4 j. For every such j, there are (n) points of P that are to the left j , and such that the reflection of every such point across j is another point of P. That is, for every M(n)/32 ≤ j ≤ M(n)/16, the line j is the perpendicular bisector of (n) pairs of points of P. The assertion of the theorem follows, since there are (M(n)) such lines, each contributing (n 2 ) to E(P).

Proof of Theorem 2.3
In this section we prove that Theorem 2.3 follows from Theorem 2.1. In fact, we prove the following more general version of Theorem 2.3.  Since Guth and Katz [13] proved that any n-point set spans (n/ log n) distinct distances, the assumption that K = O(log n) is not a real restriction. The original formulation of Theorem 2.3 is immediately obtained by setting K (n) = √ log n and M(n) = n α .
Proof For simplicity, we use the notation K = K (n) and M = M(n) throughout this proof. Beck [1] proved that if a set of n points in R 2 does not contain δn collinear points then the points span (n 2 ) lines. This result is stronger than the assertion of Theorem 5.1 when K = O(1). We may thus assume that K is at least some large constant.
We assume that (i) does not hold, and prove that (ii) holds in this case. Given a point set P ⊂ R 2 , we denote by B * (P) the multiset of bisectors that are spanned by ordered pairs of P 2 * . Recall that B(P) is the set of distinct lines of B * (P). For every line ∈ B(P), we denote by μ( ) its multiplicity in B * (P) (i.e., the number of times it occurs in the multiset), and set ρ( ) = | ∩ P|. We define that is, I (P, B * (P)) is the number of incidences counted with multiplicities.
We derive a lower bound on I (P, B * (P)) by using an argument that is similar to the one in Szemerédi's proof of Theorem 1.1. Let T ⊂ P 3 be the set of triples ( p, q, r ) of distinct points of P such that | pq| = |pr |. Note that a triple ( p, q, r ) is in T if and only if p is incident to B(q, r ). That is, Denote the distances that are determined by pairs of P 2 * as δ 1 , . . . , δ D . For every point p ∈ P and 1 ≤ i ≤ D, let i, p denote the number of points of P that have distance δ i from p. Let T p ⊂ T denote the set of triples of T in which the first element is p. Applying the Cauchy-Schwarz inequality yields where the last transition comes from the assumption that K is at least some large constant. The above implies We remark that by the Szemerédi-Trotter theorem [25], the number of incidences between n points and n 2 distinct lines is O(n 2 ). This does not contradict (5) since the lines in the multiset B * (P) need not be distinct. A priori, it might be that B * (P) consists of (n) distinct lines, each with multiplicity (n) and incident to (K ) points. However, our bound on the bisector energy excludes such cases.
Let c t be the constant implicit in the lower bound on |T |; we have |T | ≥ c t K n 2 .
Let L + be the subset of lines in B(P) that are each incident to at least c t K /2 points. Then where we use the fact that each ordered pair of points has a unique bisector, and hence contributes to ∈B(P) μ( ) exactly once. Applying Cauchy-Schwarz, we get Since K = O(log n), the factor K can be absorbed into the factor n −ε in the final bound.

Note that
Remark Notice that the proof of Theorem 5.1 also applies when M(n) = (n 1/4 ). However, this would lead to a bound for the number of lines in (ii) that is weaker than the bound that is implied by Theorem 1.1.

Proof of Theorem 2.5
We now present the proof of the incidence bound that we use. As mentioned in the introduction, this proof is essentially from [11]; we reproduce it here to determine the dependence on the parameter t. We refer to [11] for the definitions used here. We prove a more general version than we need, since it seems to come at no extra cost, and may be useful elsewhere.
The proof uses the Kővári-Sós-Turán theorem (see for example [2,Thm. IV.9]). We amplify the weak bound of Lemma 6.1 by using polynomial partitioning. Given is an r -partitioning polynomial for a finite set P ⊂ R d if no connected component of R d \Z ( f ) contains more than |P|/r points of P (notice that there is no restriction on the number of points of P that are in Z ( f )). Guth and Katz [13] introduced this notion and proved that for every P ⊂ R d and 1 ≤ r ≤ |P|, there exists an r -partitioning polynomial of degree O(r 1/d ). In [11], the following generalization was proved. We are now ready to prove our incidence bound. For the convenience of the reader, we first repeat the statement of the theorem. Proof Note that we may assume that no variety in S contains V . Indeed, we can assume that V contains at least s points (otherwise the bound in the theorem is trivial), so the fact that the incidence graph contains no K s,t implies that there are at most t − 1 varieties in S that contain V . These at most t − 1 varieties give altogether less than tm incidences, so they are accounted for in the bound.
We use induction on e and m, with the induction claim being that for P, S, V as in the theorem, with the added condition that no variety in S contains V , we have for constants α 1,e , α 2,e depending only on d, e, s, ε, the degree of V , and the degrees of the varieties in S. The base cases for the induction are simple. If m is sufficiently small, then (6) follows immediately by choosing sufficiently large values for α 1,e and α 2,e . Similarly, when e = 0, we again obtain (6) when α 1,e and α 2,e are sufficiently large (as a function of d and the degree of V ). The constants d, e, s, ε are given and thus fixed, as are the degree of V and the degrees of the varieties in S. The other constants are to be chosen, and the dependencies between them are where C C means that C is to be chosen sufficiently large compared to C; in particular, C should be chosen before C . Furthermore, the constants α 1,e , α 2,e depend on α 1,e−1 , α 2,e−1 .
By Lemma 6.1, there exists a constant C weak depending on d, s such that When m ≤ (n/t) 1/s , and α 2,e is sufficiently large, we have I (P, S) ≤ α 2,e n. Therefore, in the remainder of the proof we can assume that n < m s t, which implies Partitioning By Theorem 6.2, there exists an r -partitioning polynomial f with respect to V of degree at most C part · r 1/e , for a constant C part . Denote the cells of V \Z ( f ) as 1 , . . . , N . Since we are working over the reals, there exists a constantdegree polynomial g such that Z (g) = V . Then, by [24,Theorem A.2], the number of cells is bounded by C · deg( f ) dim V = C cells · r , for some constant C cells depending on C part .
We partition I (P, S) into the following three subsets: • I 1 consists of the incidences ( p, S) ∈ P × S such that p ∈ V ∩ Z ( f ), and some irreducible component of V ∩ Z ( f ) contains p and is fully contained in S. • I 2 consists of the incidences ( p, S) ∈ P × S such that p ∈ V ∩ Z ( f ), and no irreducible component of V ∩ Z ( f ) that contains p is contained in S. • I 3 = I (P, S)\(I 1 ∪ I 2 ), the set of incidences ( p, S) ∈ P × S such that p is not Note that we indeed have I (P, S) = |I 1 | + |I 2 | + |I 3 |.
Bounding |I 1 | The points of P ⊂ R d that participate in incidences of I 1 are all contained in the variety V 0 = V ∩ Z ( f ). Set P 0 = P ∩ V 0 and m 0 = |P 0 |. Since V is an irreducible variety and V ⊂ Z ( f ), V 0 is a variety of dimension at most e − 1 and of degree that depends on r . By [24,Lem. 4.3], the intersection V 0 is a union of C comps irreducible components, where C comps is a constant depending on r and d. 3 The degrees of these components also depend only on these values (for a proper definition of degrees and further discussion, see for instance [11]).
Consider an irreducible component W of V 0 . If W contains at most s − 1 points of P 0 , it yields at most (s − 1)n incidences. Otherwise, since the incidence graph contains no K s,t , there are at most t − 1 varieties of S that fully contain W , yielding at most (t − 1)m 0 incidences. By summing up, choosing sufficiently large α 1,e , α 2,e , and applying (7), we have By applying (7) to remove the term α 2,e−1 n, and by choosing α 1,e and α 2,e sufficiently large as a function of C comps , α 1,e−1 , α 2,e−1 , we obtain Bounding |I 3 | For every 1 ≤ i ≤ N , we set P i = P ∩ i and denote by S i the set of varieties of S that intersect the cell i . We also set m i = |P i | and n i = |S i |. Then we have m i ≤ m/r and N i=1 m i = m − m 0 . Let S ∈ S. By the assumption made at the beginning of the proof, S does not contain V , so S ∩ V is a subvariety of V of dimension at most e − 1. By [24,Thm. A.2], there exists a constant C inter such that the number of cells intersected by S ∩ V is at most C · deg( f ) dim(S∩V ) = C inter · r (e−1)/e . This implies that where C Höld depends on C inter , C cells . Using the induction claim for each i with the point set P i , the set of varieties S i , and the same variety V , we obtain By choosing α 1,e sufficiently large with respect to C inter , r, α 2,e , and using (7), we get