On Bipartite Distinct Distances in the Plane

Given sets $\mathcal{P}, \mathcal{Q} \subseteq \mathbb{R}^2$ of sizes $m$ and $n$ respectively, we are interested in the number of distinct distances spanned by $\mathcal{P} \times \mathcal{Q}$. Let $D(m, n)$ denote the minimum number of distances determined by sets in $\mathbb{R}^2$ of sizes $m$ and $n$ respectively, where $m \leq n$. Elekes \cite{CircleGrids} showed that $D(m, n) = O(\sqrt{mn})$ when $m \leq n^{1/3}$. For $m \geq n^{1/3}$, we have the upper bound $D(m, n) = O(n/\sqrt{\log n})$ as in the classical distinct distances problem. In this work, we show that Elekes' construction is tight by deriving the lower bound of $D(m, n) = \Omega(\sqrt{mn})$ when $m \leq n^{1/3}$. This is done by adapting Sz\'{e}kely's crossing number argument. We also extend the Guth and Katz analysis for the classical distinct distances problem to show a lower bound of $D(m, n) = \Omega(\sqrt{mn}/\log n)$ when $m \geq n^{1/3}$.


Introduction
Given a set P ⊆ R 2 of n points, let D(P) denote the number of distinct distances spanned by pairs of points from P. We define D(n) = min |P|=n D(P), i.e., the minimum number of distinct distances determined by n points in R 2 . In his celebrated paper, Erdős [10] showed that a √ n × √ n section of the integer lattice Z 2 (see Figure 1A) determines Θ(n/ √ log n) distances.
. . . Although P and Q span many distances, P × Q span few distances.
Erdős conjectured that this was asymptotically tight. Although the problem is simple to state, Erdős was only able to show a lower bound of Ω(n 1/2 ). This was followed by a series of improvements over the years (for examples, see [20,4,5]). Székely [27] and later Solymosi and Tóth [25] used a graph-theoretic approach to improve the lower bound to Ω(n 4/5 ) and Ω(n 6/7 ), respectively. Later, Katz and Tardos [29,18] refined their arguments to show a bound of Ω(n 0.8641 ).
After over 65 years since the conjecture was posed, Guth and Katz [16] showed the following almost matching lower bound for D(n), resolving the problem up to a factor of √ log n.
To derive Theorem 2, Guth and Katz used the framework proposed by Elekes and Sharir [9] which reduces the distinct distances problem to that of counting pairwise intersections of lines in R 3 . Guth and Katz also developed several sophisticated techniques relying on tools from algebraic geometry and analytic geometry to fully resolve the problem.
While the problem of finding the asymptotic value of D(n) is nearly settled, many variants of the distinct distances problem are widely open. For examples, see the survey [24]. In the current work, we consider a bipartite variant of this problem first proposed by Elekes [8]. Given sets P, Q ⊆ R 2 with m and n points respectively, let D(P, Q) = |{d(p, q) | p ∈ P, q ∈ Q}|, i.e. the number of distinct distances spanned by P ×Q. That is, we only consider distances spanned by pairs of points in distinct sets. Without loss of generality, we assume that m n.
The bipartite problem behaves quite differently from the classical variant. As an example, consider the point sets shown in Figure 1B. Although D(P) = Θ(m 2 ) and D(Q) = Θ(n 2 ), we have that D(P, Q) = Θ(m + n) [24].
We denote D(m, n) = min |P|=m,|Q|=n D(P, Q), i.e. the minimum number of distinct distances between two point sets. Elekes [8] showed that D(m, n) = O( √ mn) for 2 m n 1/3 using a "circle grid" construction (described in detail in Section 2). We also have the straightforward upper bound of D(m, n) D(m + n) = O(n/ √ log n). However, as discussed in [24], it is not known if Elekes' construction is tight, and the Guth and Katz analysis for the classical problem does not seem to readily extend to this case.
The bipartite problem has been studied in various special cases. For instance, if P is a set of three noncollinear points, Sharir and Solymosi show that D(P, Q) = Ω(n 6/11 ) [22]. This is surprising because Elekes' construction shows that D(3, n) = O( √ n) when the three points are collinear. Also, in the case where P and Q are each restricted to lie on an algebraic curve in R 2 , it is known that D(P, Q) = min(m 2/3 n 2/3 , m 2 , n 2 ) unless the two curves are parallel lines, orthogonal lines or concentric circles [21,7]. However, there are no known non-trivial lower bounds for the bipartite problem when there are no such restrictions on the point sets.
In the current work, we modify and extend the Elekes, Sharir, Guth, Katz (ESGK) framework to the bipartite problem to obtain the following lower bound.
Our modifications lie within the ESGK reduction, after which the results on line incidences from [16] immediately apply. We also survey known properties of such lines. The heart of our new analysis lies in Section 5.4, where we analyse and explicitly characterise reguli that contain many lines. While doing so, we also point out a minor technical mistake in the Guth-Katz analysis of reguli (see Remark 38). In Proposition 36, we show that it is not difficult to resolve this mistake. Note that when m = n, we obtain the same lower bound as in the classical problem, which is tight up to a √ log n factor. Interestingly, for m n 1/3 , we obtain a tight bound without relying on the tools introduced by Guth and Katz. Instead, we adapt an older argument by Székely [27] to get rid of the logarithmic factor. Székely used a graph-theoretic approach, and more specifically, the crossing lemma to introduce shorter and elegant proofs for various problems in combinatorial geometry. In particular, he derived the improved lower bound at the time of D(n) = Ω(n 4/5 ) for the classical distance problem [27]. Adapting this proof for the bipartite variant, we get the following bound. This shows that Elekes' construction is indeed tight, completely resolving the bipartite distinct distances problem in this range.

Range of m
Lower Bound Upper Bound  Table 1 summarises the current results for D(m, n), for each range of m. All of the lower bounds are from this work.
From Table 1, we see that there is still a gap between the upper and lower bounds when n 1/3 m n.
Question 5. What is the asymptotic value of D(m, n) when n 1/3 m n?
Improving the lower bound when m = n would also eliminate the gap for D(n). As shown by Guth and Katz [16], such an improvement cannot be obtained from the ESGK framework without making significant changes.
While D(m, n) = Θ( √ mn) for m n 1/3 , we have that D(m, n) = o( √ mn) when m = n. Therefore, somewhere in the range n 1/3 m n, we are able to achieve a better asymptotic bound. It would be interesting to find the smallest m for which D(m, n) = o( √ mn). It can be shown that if all the points in P lie on a line, then D(P, Q) = Ω( √ mn). See Remark 17 for a crossing-based proof, and see Exercise 3.4 in [23] for an incidence proof. Therefore, any construction with D(P, Q) = o( √ mn) would have to be structurally different from Elekes' construction.
Outline. In Section 2, we restate Elekes' construction for bipartite distinct distances, and present the best known upper bounds on D(m, n) for all 1 m n. In Section 3, we will introduce Székely's crossing number approach and prove Theorem 4. We then present the modified ESGK reduction for the bipartite problem in Section 4 and outline the proof of Theorem 3. We analyse the structure of the lines obtained through the reduction in Section 5, and complete the proof of Theorem 3.
Notation. For points p, q ∈ R d , we will denote the distance between them as d(p, q). For sets of points P, Q ⊂ R d , we define d(P, Q) = min p∈P,q∈Q d(p, q).
We will say that A B (respectively, A B) if there exists some constant c > 0 such that A cB (respectively, A cB). We use O v 1 ,v 2 ,...,v k to represent the usual big-O notation where the constant of proportionality depends on the variables v 1 , . . . , v k . We define Ω v 1 ,v 2 ,...,v k and Θ v 1 ,v 2 ,...,v k symmetrically.

Elekes' Circle Grid Construction
In this section, we explicitly restate Elekes' circle grid construction. We present it in a simplified manner and extend it to the case where m n 1/3 .
Construction. Suppose 2 m n 1/3 and set s = n/m. Consider the following sets of points: In Elekes' formulation, Q is viewed as the intersections of m vertical lines and √ mn circles centered at each point in P. As noted in [3], this arrangement of points can be viewed as the "hyperbolic image" of the usual n lattice points and m √ mn straight lines with many incidences, embedded in the Poincaré model of the upper half plane. Proof. Since m n 1/3 , note that s = n/m m. The square of the distance between the points (i, √ j) and (a, 0) is an integer of the form (a − i) 2 + j. To give an upper bound on the number of distinct distances in P ×Q, it suffices to check the maximal and minimal values of (a − i) 2 + j.
Therefore, the number of distinct distances is at most Moreover, the point (1, 0) has ms = √ mn distances with points of the form (1, √ j) ∈ Q. Therefore, D(P, Q) √ mn. Combining these upper and lower bounds, we have the desired result.
Remark 7. Although the construction is still well defined when m > n 1/3 , one of the main steps in the above analysis requires m s. A similar analysis shows that the construction spans Θ(m 2 ) distances when m > n 1/3 . Now, we state the current best upper bounds for this problem in various ranges.

Crossing Number Arguments
Székely [27] showed that many results in discrete geometry could be obtained using crossing numbers. For example, he presented short proofs for the point-line incidence problem and the unit distances problem. In particular, Székely showed the following bound which led to the best known lower bound at that time for the classical distinct distances problem.
In this section, we adapt Székely's approach to derive a tight bound for D(m, n) when 2 m n 1/3 . We first introduce two main tools required for this proof: crossing number bounds for multigraphs and the Szemerédi-Trotter bound for the number of point-line incidences.
The Crossing Lemma. In a drawing of a graph, every vertex is a distinct point in the plane and every edge is a Jordan arc connecting the two corresponding vertices. We assume that the interior of every such arc does not contain vertices, that any two arcs have a finite number of intersections bounded by a constant C > 0, and that no three arcs intersect at the same point. We call such an intersection of arcs an edge crossing.
We define the crossing number cr(G) of a graph G to be the minimum number of edge crossings across all drawings of G.
Székely's main tool was the following asymptotically tight lower bound for the crossing number of a graph. This was shown independently by Ajtai et al [1] and Leighton [19]. [19]). For a simple graph G = (V, E) where |V | = n and |E| = e with e 4n, we have that For the purpose of Theorem 9, Székely introduced an analogue of Theorem 10 for multigraphs (graphs which can have parallel edges -multiple edges between the same pair of vertices). The Szemerédi-Trotter Theorem. Given a set P of m points and a set L of n lines, both in R 2 , an incidence is a pair (p, ) ∈ P × L such that p ∈ . Erdős and Purdy [12] constructed P and L with Θ(m 2/3 n 2/3 + m + n) incidences, and conjectured that this is asymptotically optimal. This conjecture was resolved by Szemerédi and Trotter.
Theorem 12 (Szemerédi-Trotter Theorem [28]). Let P be a set of m points and L be a set of n lines. The number of incidences in P × L is O(m 2/3 n 2/3 + m + n).
Theorem 12 was one of the main theorems Székely was able to reprove using an elegant crossing number argument.
Given a set P and an integer r 2, we say that a line is r-rich if contains at least r points from P. The Szemerédi-Trotter theorem immediately implies a bound on the number of r-rich lines.
Theorem 13 ( [27,26]). Let P be a set of m points and let r 2. Then, the number of r-rich lines is We use Theorem 13 to analyse rich perpendicular bisectors of pairs of points in R 2 . The bisector of p and q is the set of all points that are equidistant to p and q.
Proof of Theorem 4. To prove Theorem 4, we derive the following stronger statement.
Theorem 14. Consider a set P of m points and a set Q of n points, with 2 m n 1/3 . Then there exists a point in P that determines Ω( √ mn) distances with the points in Q.
Proof. Let t = max p∈P D(p, Q) and assume that t √ mn for some small constant > 0 (otherwise we are done). For each point p ∈ P, draw at most t concentric circles centered at p (possibly of radius zero) so that each circle contains at least one point from Q, and every point in Q is contained in some circle. Denote the set of resulting circles as C and note that |C| mt. We construct a corresponding topological multigraph G = (V, E) as follows: 1. Set |V | = n so that each vertex in V corresponds to a point in Q. 2. For every circle in C ∈ C incident to k points in Q, label the points q 1 , . . . , q k ∈ Q in clockwise order. Add an edge between q i and q i+1 denoted by (q i , q i+1 , C) for i = 1, 2, . . . , k, where q k+1 = q 1 . If k = 1, add a self-loop to q 1 . 3. Delete edges corresponding to circles that contain at most two points.
Note that a circle C ∈ C incident to k points q 1 , q 2 , . . . , q k ∈ Q in that order leads to k edges of the form (q i , q i+1 , C) in Step (2), where q k+1 = q 1 . Thus, for each point p ∈ P, we constructed n edges in the graph. After this step, |E| = mn. For each vertex p ∈ P, since there are at most t circles corresponding to it, we are deleting at most 2mt 2 mn edges at Step (3). By choosing to be arbitrarily small, we conclude that |E| = Θ(mn) after Step (3).
Consider the drawing of the graph G with vertices corresponding to the points in Q, and edges corresponding to the arcs of the circles in C (with slight perturbations to avoid more than three concurrent edges). Since |C| mt and every two circles intersect at most twice, we conclude that cr(G) m 2 t 2 .
To apply Theorem 11, we need an upper bound for the maximum edge multiplicity. While G might have high edge multiplicity, we can delete edges to reduce the multiplicity without changing the asymptotic size of |E|. This is stated more precisely in the following proposition, which we prove after the current proof.
Proposition 15. For an integer r 2, let T be a set of pairs ( , e) where e = (u, v, C) ∈ E, the line is the perpendicular bisector of u and v, and is incident to at least r points of P. Then, Note that if vertices u and v have more than r edges between them, then they are consecutive on more than r circles of C. This in turn implies that the perpendicular bisector of u and v is r-rich. Therefore, we can use Proposition 15 for some constant r = K to bound the number of edges with multiplicity at least K. This number is where the last inequality follows from the fact that m 3 n. For a sufficiently large constant K, we delete at most half the edges in G. Denote the resulting subgraph as G . Then, G has n vertices, Θ(mn) edges and maximum edge multiplicity K. Applying Theorem 11, we have that Rearranging the inequality, we get the desired bound of t √ mn.
Remark 16. The assumption m = O(n 1/3 ) is crucial in the proof. If m = ω(n 1/3 ), we have to delete edges with multiplicity larger than K mt/n edges for some large constant K. Then, the above proof gives a weaker bound of D(m, n) = Ω(m 3/5 n 1/5 ). When m = n, we recover Theorem 9.
Although Proposition 15 is a bipartite analogue of the bisector bound in [27], the proof generalises immediately. We include it here for completeness.
Proof of Proposition 15. Let be a line incident to k points of P. These points correspond to the centers of at most kt circles in C, and each such circle C ∈ C contains at most two arcs e = (u, v, C) such that ( , e) ∈ T . Hence, participates in at most 2kt pairs in T .
By Theorem 13, we know that for 2 i √ m, there are at most cm 2 /2 3i perpendicular bisectors that are 2 i -rich. By a dyadic decomposition, the number of pairs in T corresponding to r-rich edges for 2 i √ m is at most When 2 i √ m, we have at most cm/2 i perpendicular bisectors that are 2 i -rich. A similar dyadic decomposition argument implies that the number of pairs of T in this case is at most Combining the above bounds leads to the result.
As an immediate consequence of Theorem 14, we have the bound of D(m, n) = Ω( √ mn) when m n 1/3 as asserted in Theorem 4.
Remark 17. Suppose P is a set of m points on a line , where 2 m n. Then, is the only 2-rich line, and it corresponds to the centers of all the circles in C. Therefore, the size of T as defined in Proposition 15 is bounded by 2mt. After deleting all the edges with multiplicity at least 2, we obtain a simple graph with Θ(mn) edges. Following the rest of the argument in Theorem 14, we have D(P, Q) = Ω( √ mn) for every m.
Remark 18. While Theorem 14 implies that there exists one point in P that spans Ω( √ mn) distances, in Elekes' construction, every point p ∈ P spans Θ( √ mn) distances.

Modified ESGK Reduction
To prove their distinct distances theorem, Guth and Katz [16] adapted a preceding reduction by Elekes and Sharir [9]. In this section, we modify this reduction for the bipartite variant. In Section 5, we complete the analysis by proving lemmas that were used in the current section. The heart of our new analysis lies in Section 5.4, where we further develop our knowledge about lines contained in a regulus. At the end of this section, we list the places where our reduction is different from the original one.
Bipartite Distance Energy. Let P be a set of m points and Q be a set of n points such that 2 m n. We define the bipartite distance energy of P × Q to be the set of quadruples: We now use a standard Cauchy-Schwarz argument to relate the bipartite distance energy to D(P, Q).
Proposition 19. For any set P of m points and set Q of n points, we have Proof. Let δ 1 , δ 2 , . . . , δ x be the distinct distances between P and Q, and let d i be the number of pairs (p, q) ∈ P × Q at distance δ i . Since each of the mn pairs in P × Q contributes to exactly one δ i , we get d i = mn. Applying the Cauchy-Schwarz inequality, we have that .
Rearranging, we have the desired inequality.

Rigid Motions.
A transformation of R 2 is a rigid motion if it preserves distances between points, and it is a proper rigid motion if it also preserves orientation. Let G denote the group of proper rigid motions of the plane. It is well known that G consists of translations and rotations of R 2 .
Then, there exists a unique rigid motion g ∈ G such that g(z 1 ) = z 3 and g(z 2 ) = z 4 .
Proof. All proper rigid motions g taking z 1 to z 3 can be obtained by first translating the plane by z 3 − z 1 , and then applying a rotation around z 3 . Since |z 4 − z 3 | = |z 2 − z 1 | = 0, exactly one such rotation that also takes z 2 to z 4 .
We can write G as a disjoint union G tr ∪G rot , where G tr is the set of all translations and G rot is the set of rotations of R 2 . Consider the subset E tr (P, Q) ⊆ E(P, Q) of quadruples that are mapped to a rigid motion in G tr , and let E (P, Q) = E(P, Q) \ E tr (P, Q). Proof. Given p 1 , p 2 ∈ P, q 1 ∈ Q, there is exactly one translation g mapping g(q 1 ) = p 2 , and therefore there is at most one q 2 ∈ Q such that g(p 1 ) = q 2 . The number of choices for p 1 , p 2 ∈ P and q 1 ∈ Q is m 2 n, and each choice could be completed to at most one quadruple in E tr (P, Q).
Reduction to Lines in R 3 . Any rotation g ∈ G rot fixes some point (o x , o y ) and rotates around this point with some counterclockwise angle 0 < α < 2π. We define the map ρ : G rot → R 3 such that ρ(g) = (o x , o y , cot(α/2)).
This is a simplication introduced by Guth and Katz. Under this parametrisation, one can check that the set of all rotations taking a point p ∈ R 2 to q ∈ R 2 form the line Note that there exists a rotation taking p 1 to q 2 and q 1 to p 2 if and only if the lines p 1 ,q 2 and q 1 ,p 2 intersect. Indeed, the point of intersection is the parameterisation of the rotation ϕ(p 1 , q 1 , p 2 , q 2 ). Therefore, a quadruple is in E (P, Q) if and only if p 1 ,q 2 and Let I(L 1 , L 2 ) denote the number of pairs of intersecting lines in L 1 × L 2 . The above bijection gives us that |E (P, Q)| = I(L 1 , L 2 ).
We have now reduced the problem of bounding the cardinality of the bipartite distance energy to the problem of bounding the number of pairs of intersecting lines. More specifically, to showing that I(L 1 , L 2 ) = O(m 3/2 n 3/2 log n). Note that |L i | = mn and |L| = 2mn.
Remark 22. It may seem tempting to associate the lines in L 1 to pairs of points in P × P and those in L 2 to pairs of points in Q × Q. However, this approach leads to a much more difficult problem. In particular, having 2mn lines rather than m 2 + n 2 lines seems to be crucial in our proof.
Rich points. Consider a point p in R 3 that is incident to r lines of L. If x of those lines are associated with L 1 , then the number of pairs in L 1 × L 2 that intersect at p is x(r − x) r 2 /2. We call a point r-rich if it is incident to at least r lines in L, and let m r (L) denote the number of r-rich points. Then, we have Therefore, it suffices to bound m r (L). In general, 2mn lines can have a lot more than m 3/2 n 3/2 log n pairs of intersecting lines. When many lines lie on a common plane or regulus, or if many lines intersect at a point, we can have up to ∼ m 2 n 2 pairs of intersecting lines. To overcome these issues, we rely on the following results due to Guth and Katz [16]. In Section 5, we will prove the following two lemmas.  We are now ready to prove Theorem 3.
Proof. Suppose that D(P, Q) c √ mn (otherwise, we are done) for some constant c > 0. By Lemma 25 and Lemma 26, at most 2m lines in L lie in a common plane and at most d √ mn lines in L lie in a common regulus for some constant d. Lemma 25 also gives us that P r (L) = 0 for r > 2m since no point is incident to more than 2m lines. Combining (6) with Theorems 23 and 24, we have: Main modifications. Here are the main modifications that we made to adapt the reduction for the bipartite problem.
(i) We consider the bipartite distance energy rather than the standard distance energy.
(ii) We consider the set of rigid motions taking a pair of points in P × Q to a pair of points in Q × P. (iii) We present a somewhat different analysis in Section 5 to bound the number of lines in any plane or regulus.

Lines, Planes, and Reguli
In this section, we prove Lemmas 25 and 26. This is the last remaining piece in our proof of Theorem 3. Throughout this section, we identify each point in R 3 with the rotation described by the map ρ in (2). In Section 5.1, we state some properties of lines in R 3 . Then, in Section 5.2, we bound the number of lines in L that lie on any given plane in R 3 . We then introduce some definitions and tools from algebraic geometry in Section 5.3. Finally, in Section 5.4, we define reguli, state properties of reguli and bound the number of lines in L that lie on any given regulus.
For the rest of this section, for each p ∈ P, define L 1

Lines
In this section, we present some properties of lines in R 3 . Following the notation from [14], we call a line in R 3 horizontal if it has a constant z-coordinate.
Proposition 27. We have the following properties of lines in R 3 .
(i) For all p, q ∈ R 2 , the line p,q is not horizontal, and hence it intersects the xy-plane.
(ii) Every non-horizontal line in R 3 is of the form p,q for some unique p, q ∈ R 2 .
(iii) For each p ∈ R 2 and P ∈ R 3 , there exist q, r ∈ R 2 such that P ∈ p,q and P ∈ r,p .
(iv) For all p, q, r ∈ R 2 where q = r, the lines p,q and p,r are skew. The same holds for q,p and r,p . (v) For all p, q ∈ R 2 , the line p,q is a reflection of q,p across the xy-plane.
Proof. These observations follow immediately from (3) and the fact that every point represents a rotation of R 2 .
(i) From (3), we see that the direction of p,q has a non-zero z-coordinate, implying that it is not horizontal. (ii) Any non-horizontal line intersects the xy-plane at some point (a, b, 0), and has direction (d, e, 1). In other words, it can be written uniquely in the form Equating this to (3), we obtain a system of four linearly independent linear equations in p x , p y , q x , q y . This system always has a unique solution. (iii) The point P ∈ R 3 represents some rotation g. Set q = g(p) and r = g −1 (p). Then, P ∈ p,q and P ∈ q,r . (iv) Since a rigid motion is a bijection from R 2 to R 2 , no g ∈ G can take p to both q and r. Therefore, p,q and p,r cannot intersect. From (3), these lines cannot be parallel. Therefore, these two lines are skew. A symmetric argument shows that q,p and r,p are skew.
(v) Consider a rotation g. Note that g and g −1 have the same fixed point. This implies that the corresponding points in R 3 have the same x and y coordinates. Moreover, if g is a rotation with angle θ, then g −1 is a rotation with angle 2π − θ. Note that the cotangent function is an odd function with period π. In other words, cot(θ/2) = − cot((2π − θ)/2), so the z coordinates of the corresponding points in R 3 are negations of each other. Therefore, the points corresponding to g and g −1 are reflections of each other across the xy-plane. Since g ∈ p,q ⇐⇒ g −1 ∈ q,p , we conclude that p,q is the reflection of q,p across the xy-plane.
We now study the geometric interpretation of horizontal lines in R 3 under ρ. We define an oriented line to be a line with an associated directional vector with the same slope as the line. We say that two oriented lines are parallel if their vectors have the same direction and anti-parallel if they have opposite directions. Two oriented lines subtend an angle θ if this is the counterclockwise angle subtended by two directional vectors corresponding to the line orientations. If the oriented lines are parallel, then θ = 0. If the oriented lines are anti-parallel, then θ = π.
In the rest of this section, we use to denote lines in R 3 and λ to denote lines in R 2 . For oriented non-parallel lines λ 1 , λ 2 ⊂ R 2 , let S(λ 1 , λ 2 ) be the set of points in R 3 corresponding to rotations of R 2 that map λ 1 onto λ 2 while preserving the orientation. This notation and the following proposition are based on ideas from [14].
It remains to show that the set of fixed points of all g ∈ S(λ 1 , λ 2 ) form a line in R 2 . Since g(λ 1 ) = λ 2 and g(λ 1 ) = λ 2 , we get that d(λ 1 , λ 1 ) = d(λ 2 , λ 2 ). Therefore, O lies on an axis of symmetry of λ 1 and λ 2 (that is, a line consisting of the points that are equidistant from λ 1 and λ 2 ). If λ 1 and λ 2 are anti-parallel, there is only one axis of symmetry. Otherwise, there are two axes of symmetry. Fix a rotation g ∈ S(λ 1 , λ 2 ). From the above, we know that g is a rotation of angle θ that fixes a point O ∈ R 2 . For i ∈ {1, 2}, let P i denote the foot of the perpendiculars from O to λ i . Note that P i is the unique point on λ i closest to O, and Since g(P 1 ) ∈ λ 2 , we get that g(P 1 ) = P 2 . In particular, the angle subtended by − − → OP 1 and − − → OP 2 is equal to θ. This happens only when O lies on the axis of symmetry that bisects the angle not subtended by λ 1 and λ 2 . That is, if λ 1 and λ 2 have directions v 1 and v 2 respectively, this is the axis of symmetry parallel to v 1 − v 2 . These axes of symmetry are depicted in Figure 2. Moreover, for any O on this chosen axis of symmetry, the rotation g around O such that g(P 1 ) = P 2 lies in S(λ 1 , λ 2 ). This completes the proof of the first part of the proposition.
Consider a horizontal line in R 3 lying on the plane z = w. Let λ be the projection of on the xy-plane. Let θ = 2 cot −1 (w). If θ = π, let λ 1 and λ 2 be two distinct parallel lines at distance 1 from λ with opposite orientations. Otherwise, pick an arbitrary point p on λ. Pick λ 1 and λ 2 to be two oriented lines through p subtending an angle of θ such that λ is the axis of symmetry that does not bisect the angle subtended by λ 1 and λ 2 . Then, S(λ 1 , λ 2 ) = , as desired.

Planes
Using Proposition 5.1, we can bound the number of lines in any plane and complete the proof of Lemma 25. We restate the lemma for convenience.
Lemma 25. Consider L as defined in (4). The following hold.
(i) Every point of R 3 is incident to at most 2m lines of L.
(ii) Every plane in R 3 contains at most 2m lines of L.
Proof. By Proposition 27, any two lines in L i p are skew. Therefore, no two lines from the same family L i p are incident to the same point in R 3 or lie on the same plane. Since we have 2m such sets, we obtain both parts of the lemma.

Algebraic Geometry Preliminaries
Before studying reguli, we introduce some basic algebraic geometry. For more information, see for example [6,30].
the electronic journal of combinatorics 28(4) (2021), #P4.33 If U is a variety and U ⊆ U is a variety, we say U is a subvariety of U . If we can write U = V ∪ W where V and W are proper subvarieties, we say U is reducible. Otherwise, we say U is irreducible.
We now state basic properties of varieties without proof.
Theorem 29 (Special case of Hilbert's basis theorem). Every variety in R d can be described by a single polynomial.
Proposition 30. Let U and W be varieties in F d . Then, U ∩ W and U ∪ W are both varieties.
Degree and Dimension. There are several non-equivalent definitions of degree of a variety in R d . For our purposes, we define the degree of a variety U ∈ R d as min The dimension d of an irreducible variety U ⊆ R d is the maximum integer for which there exists a sequence: where all the varieties are irreducible and all the containments are proper. The dimension of a reducible variety U is the maximum dimension of an irreducible component of U .
As an example, a zero-dimensional variety is a finite set of points, and a one-dimensional variety is a finite union of curves and points. We rely on the following results about intersections of varieties.
Theorem 31 (Bézout's theorem). Consider f, g ∈ F[x, y]. If f and g do not have any common factors, V(f ) ∩ V(g) consists of at most deg(f ) · deg(g) points.
Theorem 32 ( [15]). Consider f, g ∈ F[x, y, z]. If f and g do not have any common factors, V(f ) ∩ V(g) contains at most deg(f ) · deg(g) lines.
Theorem 33 ( [23]). Let f ∈ F[x 1 , x 2 ] be a polynomial of degree D such that V(f ) is a one-dimensional variety. Then, the number of irreducible components of V(f ) is at most D.
We also require the following distinct distances bound, which is an application of Bézout's theorem. Proof. Since γ has degree D, it has at most D irreducible components. By the pigeonhole principle, there exists an irreducible component γ of γ that contains at least n/D of the points of B. Pick some a ∈ A. If γ is a circle, choose an a that is not the center of γ .
Consider the set of circles C centered at a and containing at least one point from B ∩ γ . For each circle c ∈ C, since c and γ are distinct irreducible curves, they do not have a common component. By theorem 31, we have that |c ∩ γ | 2D. Since C covers all of B ∩ γ , we have that |C| x 2D 2 . Therefore, D(A, B) x 2D 2 = Ω D (x).
Zariski Topology. The Zariski topology on a variety U ⊆ F d is the topology where the closed sets are algebraic varieties in F d . Thus, an open set is U \ W for a variety W ⊂ U . If X ⊂ F d , the Zariski closure X is the smallest variety in F d that contains U . In particular, X is Zariski open in X if X \ X is a variety.

Complexification.
Given a variety U ⊂ R d , the complexification U * ⊂ C d is the smallest complex variety that contains U . Every complex variety that contains U also contains U * . Such a complexification always exists, and U is precisely the set of real points in U * [30]. We will use (V ) to denote the set of all real points of a complex variety V . The dimension of a complex variety is defined in the same way as the dimension of a real variety. For the degree of a complex variety, see for example [17,Definition 18.1]. We only require the standard property that a real variety U has degree O(1) if and only if its complexification U * has degree O(1).

Constructible Sets and Projections.
A set X is constructible if there exist varieties X 1 , X 2 , . . . , X such that dim X j+1 < dim X j for every 1 j − 1, and Note that X is Zariski open in its Zariski closure X. We define the complexity of X to be min(deg(X 1 ) + deg(X 2 ) + · · · + deg(X )) where the minimum is taken over all representations of X of the form (7). This definition is not standard. However, since we are interested only in constructible sets of bounded complexity, any reasonable definition of complexity would work equally well. For further details, see for example [17,Section 3]. For a constructible set X ⊆ C d , we will denote by (X) the set of real points contained in X. Then (X) is a constructible set in R d . In both R d and C d , a projection of a variety need not be a variety. For instance, if we project a circle in the xz-plane of R 3 onto the first two coordinates, then we obtain a line segment. In R d , projections of constructible sets need not be constructible. However, in the case of C d , we have the following result.
Theorem 35 ( [17]). Let X ⊂ C d be a constructible set of dimension d and complexity k. Let π : C d → C e be a projection on e out of d coordinates of C d . Then, π(X) is constructible set of dimension at most d and complexity O k,d (1).

Reguli
When studying lines in reguli, while we use some tools from [16], we present a somewhat different argument. We first define a regulus and describe some properties of reguli. We then characterise reguli that contain many lines, and provide a geometric approach to bound the number of lines in any regulus.

Properties of Reguli.
It is known that all reguli are quadratic surfaces in R 3 , i.e. they can be written as R = V(f ) where f ∈ R[x, y, z] is of degree 2 (see for example, [23,Section 5.2]). If the three pairwise-skew lines 1 , 2 , 3 lie in parallel planes, then the corresponding regulus is a hyperbolic paraboloid. Otherwise, the corresponding regulus is a hyperboloid of one sheet.
Reguli are doubly-ruled. That is, for every point p on a regulus R, there exist at least two lines that are contained in R and incident to p. The set of lines that are contained in a regulus R can be partitioned into two disjoint sets, called rulings. The lines of a ruling are pairwise-disjoint and pairwise-skew, and their union is R. In the regulus R( 1 , 2 , 3 ), the lines in Ψ( 1 , 2 , 3 ) lie on one ruling of the regulus, and 1 , 2 , 3 lie on the other ruling.
where Z is the union of all lines in Ψ( 1 , 2 , 3 ), and Z 0 is a one-dimensional variety with degree O(1).
Proof. Applying a generic isometry of R 3 , we may assume that 1 , 2 , 3 are non-horizontal and that R( 1 , 2 , 3 ) contains O(1) horizontal lines. Denote Z as the union of all lines in Ψ( 1 , 2 , 3 ). Since R( 1 , 2 , 3 ) is the Zariski closure of Z, it suffices to show that Z is constructible.
Complexify the three lines 1 , 2 , 3 to obtain lines in C 3 . Abusing notation, we also refer to these complex lines as 1 , 2 , 3 . We say that a non-horizontal line has parametrisation (a, b, c, d) ∈ C 4 if we can define by x = az + b and y = cz + d.
For i ∈ {1, 2, 3}, suppose i has parametrisation (a i , b i , c i , d i ). Consider some line with parametrisation (a, b, c, d). Note that i and intersect if and only if there exists a z ∈ R for which a i z + b i = az + b and c i z + d i = cz + d.
Solving (8), unless a = a i or c = c i , we have If at least one of a = a i and c = c i holds, then we have the following two cases.
(i) If a = a i and c = c i , then and i are parallel and do not intersect. In this case, note that (9) also holds.
(ii) If a = a i but c = c i , we see that (9) holds only if b = b i . In this case, choosing z to be the unique solution to c i z + d i = cz + d, we have that (8) is satisfied and and i intersect. A similar argument shows that the lines intersect also in the case where a = a i and c = c i .
Let V be the set of points (a, b, c, d) ∈ C 4 that satisfy (9) for all i ∈ {1, 2, 3}. Note that V is a variety. Consider some non-horizontal line in C 3 with parametrisation (a, b, c, d) ∈ V . For each i ∈ {1, 2, 3}, either and i intersect or and i are parallel. Since 1 , 2 , 3 are pairwise-skew, there is at most one (a, b, c, d) ∈ V parallel to 1 but intersecting 2 and 3 . More generally, at most three points (a, b, c, d) ∈ V correspond to lines that are not transversal to all three of 1 , 2 , 3 . Call this set of finite exceptions V 0 . Now, let U ⊆ C 7 be the set of points (a, b, c, d, x, y, z) ∈ U that satisfy (9) and that (x, y, z) ∈ C 3 lies on the line with parametrisation (a, b, c, d). Note that U is a variety.
Since V 0 is a set of at most three points, U 0 is a set of at most three lines, so it is a one-dimensional variety. By definition, M = U \ U 0 is a constructible set.
Let π : C 7 → C 3 be the projection on the last three coordinates. Clearly, π(M ) is the union of the lines in C 3 that are transversal to 1 , 2 , 3 . In particular, where Γ is the set of all lines in C 3 with parametrisation (a, b, c, d) ∈ V \ V 0 . By Theorem 35, we have that π(M ) is constructible. In other words, we have that π(M ) is Zariski open in its closure. Therefore, we can write π(M ) = π(M ) \ P 0 where P 0 is a variety of dimension at most one and degree O(1).
The real part of any line in C 3 is either a real line or a single point. Let S 0 be the set of all lines in Γ that contain a single real point. A simple dimension counting argument implies that, for a surface to contain a two-dimensional family of lines, it must be infinitely ruled by those lines. Thus, any non-planar variety in C 3 contains at most a one-dimensional family of lines. In particular, S 0 is at most a one-dimensional set of lines. It is not difficult to then show that (S 0 ) is a semi-algebraic set of dimension at most one. Since the real part of any line in Γ \ S 0 is a real line, this implies that (π(M )) \ (S 0 ) ⊆ Ψ( 1 , 2 , 3 ). Set Then, Ψ( 1 , 2 , 3 ) \ S 1 is a set of O(1) horizontal lines transversal to all 1 , 2 , 3 . We denote by H the union of these lines. Note that A = (π(M ) ∪ H * ) \ (P 0 ∪ S 0 ) is a constructible set in C 3 . Moreover, it is easy to check that is the real part of the complex constructible set A, or in other words, Z constructible in Proposition 40. Consider p, q ∈ R 2 , and r > 0. There exists a regulus R where one ruling consists of the lines of the form { p,a } a∈C(q,r) , and the other ruling is all lines of the form { b,q } b∈C(p,r) .
Proof. Consider a 1 , a 2 , a 3 ∈ C(q, r). Let b i be the unique point such that p − b i = a i − q (see Figure 3). Note that the lines p,a i and b i ,q do not intersect since the rigid motion corresponding to (p, b j , q, a i ) is a translation. For all b = b i , the lines p,a i and b,q intersect since (p, b, q, a i ) does not correspond to a translation. Hence, the regulus generated by p,a 1 , p,a 2 , p,a 3 contains all lines b,q such that b ∈ C(p, r) \ {b 1 , b 2 , b 3 }. Denote this regulus as R. Now, pick points x 1 , x 2 , x 3 ∈ C(q, r) \ {a 1 , a 2 , a 3 }, and let y i be the unique point such that p − y i = x i − q. By a symmetric argument, we have that the regulus generated by p,x 1 , p,x 2 , p,x 3 contains all lines b,q such that b ∈ C(p, r) \ {y 1 , y 2 , y 3 }. Since the two reguli have infinitely many lines in common, by Theorem 32, we have that Hence, { b,q } b∈C(p,r) lies in R. Note that every line of { p,a } a∈C(q,r) intersects infinitely many lines from { b,q } b∈C(p,r) . Thus, the lines of { p,a } a∈C(q,r) are also contained in R.
By Lemma 39, we know that { p,a } a∈C(q,r) lie in one ruling, and { b,q } b∈C(p,r) lie in the other. More specifically, the first ruling lies entirely in Γ 1 p and the second ruling lies entirely in Γ 2 q . Suppose p,x lies on the first ruling. By Corollary 37, we have that p,x intersects all but a constant number of lines in the second ruling. Suppose p,x intersects some b,q for b ∈ C(q, r). In other words, d(x, q) = d(p, a) = r, and we have x ∈ C(q, r). Therefore, the first ruling is exactly { p,a } a∈C(q,r) . Similarly, the second ruling is exactly { b,q } b∈C(p,r) .
Remark 41. Since p,a intersects the xy-plane at the point px+ax 2 , py+ay 2 , 0 , it is easy to verify that the intersection of a∈C(q,r) p,a with the xy-plane is a circle. Since the cross-section of a hyperbolic paraboloid cannot be a closed curve, the regulus described above is a hyperboloid of one sheet.
For the second construction, recall from Proposition 28 that every horizontal line is of the form S(λ 1 , λ 2 ) for two non-parallel oriented lines in R 2 .
Proposition 42. Consider some p ∈ R 2 and some oriented line λ ⊂ R 2 . There exists a regulus where one ruling consists of all lines of the form { p,a } a∈λ , and the other ruling is all the lines of the form {S(λ , λ) | λ is an oriented line containing p, not parallel to λ}. Proof. It suffices to show the statement for the first construction since the second construction is a reflection of the first across the xy-plane. Arbitrarily choose three distinct points a 1 , a 2 , a 3 ∈ λ, as shown in Figure 4. By Proposition 27, the lines p,a 1 , p,a 2 , p,a 3 are pairwise-skew. We denote as R the regulus R( p,a 1 , p,a 2 , p,a 3 ).
First, we show that Ψ( p,a 1 , p,a 2 , p,a 3 ) does not contain non-horizontal lines. Consider some line x,y . If a line x,y is transversal to the three lines p,a i , we have d(p, x) = d(a 1 , y) = d(a 2 , y) = d(a 3 , y).
However, since a 1 , a 2 , a 3 are distinct points that are collinear, there is no point y that is equidistant from all three, leading to a contradiction. Hence, no line x,y is in R.
Consider the horizontal line S(λ , λ), where λ is some oriented line containing p and not parallel to λ. For each a i , let g i be the rigid motion obtained by first translating the plane to map p to a i , and then rotating the plane around a i to map λ to λ. Clearly, g i ∈ p,a i and g i ∈ S(λ , λ). In other words, S(λ , λ) intersect all three lines, and is contained Ψ( p,a 1 , p,a 2 , p,a 3 ). Hence, the set of lines {S(λ , λ) | λ is an oriented line containing p, not parallel to λ} (10) is contained in the first ruling of the regulus. Repeating the same argument for any x 1 , x 2 , x 3 ∈ λ, we have that Ψ( p,x 1 , p,x 2 , p,x 3 ) = Ψ( p,a 1 , p,a 2 , p,a 3 ). By Theorem 32, the two triples of lines define the regulus R. By Lemma 39, this ruling lies in Γ 1 p . Moreover, by Corollary 37, any line in this ruling intersects all but a finite number of lines in the other ruling. Suppose p,v intersects S(λ , λ), where λ contains p. Let g = p,v ∩ S(λ , λ). Since g is a rigid motion, we have d(v, λ) = d(p, λ ) = 0. Therefore, this ruling is exactly { p,a } a∈λ .
Finally, we show that no other line lies in the ruling containing (10). We already showed above that no line of the form x,y can intersect three distinct lines p,a 1 , p,a 2 , p,a 3 where a i ∈ λ. That is, it remains to consider only horizontal lines. First, consider S(λ , λ ) such that λ is neither parallel nor antiparallel to λ. Then, there are at most 2 points q ∈ λ such that d(p, λ ) = d(q, λ ). In particular, there are at most 2 points q 1 , q 2 ∈ λ such that p,q 1 and p,q 2 both intersect S(λ , λ ). Since the second ruling contains all lines of the form { p,a } a∈λ , by Corollary 37, we have that S(λ , λ ) does not lie in the regulus.
It suffices to consider S(λ , λ ) such that λ is either parallel or antiparallel to λ. In this case, we may assume without loss of generality that λ = λ by the construction in Proposition 28. Suppose λ = λ is a line that does not contain p. For any g ∈ S(λ , λ), since g is a bijection between λ and λ, g(p) / ∈ λ. In other words, S(λ , λ) cannot be transversal to any p,x where x ∈ λ. Hence, this ruling cannot contain any line not in (10).
Remark 43. Since all the lines in one ruling of the above regulus are parallel to the xy-plane (recall that S(λ , λ) is horizontal), the above regulus is a hyperbolic paraboloid.
Remark 44. As an example, consider the construction in Figure 1B. The corresponding set of lines L that we obtain through the modified ESGK reduction results in 2m reguli of the form described in Proposition 42, which contain n lines each.
her in many helpful discussions. She would also like to thank the anonymous referee for their insightful comments and suggestions which improved the writing of this paper.