1 Lines in Metric Spaces

Two well-known results are known under the name “de Bruijn–Erdős theorem”. One of them, published in [8] in 1948, states that every set of \(n\) points in the plane is either collinear or it determines at least \(n\) distinct lines.

The notion of a line can be extended naturally into an arbitrary metric space. If \((V,\rho )\) is an arbitrary metric space and \(a,b,x\in V\), we say that \(x\) is between the points \(a\) and \(b\) if

$$\begin{aligned} \rho (a,b)=\rho (a,x)+\rho (x,b). \end{aligned}$$

Following the convention (established by Menger [12]) of writing \([axb]\) to denote that \(x\) lies between \(a\) and \(b\), the line determined by the points \(a\) and \(b\), denoted \(\langle a,b\rangle \), consists of points in the set

$$\begin{aligned} \{x;[xab]\} \cup \{a\} \cup \{x;[axb]\} \cup \{b\} \cup \{x;[abx]\}. \end{aligned}$$
(1)

We say that \(a,b\) are the defining points of this line.

The situation is now slightly more complicated than with ordinary lines. For instance, it can happen that one line is a proper subset of another line.

Chen and Chvátal asked in [4] whether a statement analogous to the de Bruijn–Erdős theorem holds in this setting as well. More precisely, they asked whether the following statement is true:

In an arbitrary metric space on \(n\) points, either there are points \(p,q\) such that the line \(\langle p,q\rangle \) contains all points, or there are at least \(n\) distinct lines.

Despite many partial results, this question remains open. In this paper, we concentrate on a scenario that resembles the original de Bruijn–Erdős situation. The points lie in the plane, but the usual Euclidean metric is replaced with the \(L_1\), or Manhattan, metric, defined by \(d((u_1,u_2),(v_1,v_2))=|u_1-v_1|+|u_2-v_2|\).

We encounter two very different kinds of lines in this case: those determined by two points that share their \(x\)- or \(y\)-coordinate, and those determined by two points that differ in both coordinates. If a set contains pairs of points that share a coordinate, we call it degenerate, otherwise it is non-degenerate.

Our first main result is that the answer to the Chen–Chvátal question is affirmative for non-degenerate sets.

Theorem 1.1

In any metric space \((X,d)\) where \(X\) is a non-degenerate finite set of points in the plane and \(d\) is the \(L_1\) metric restricted to \(X\), either there is a line that contains all points of \(X\), or there are at least \(n\) distinct lines.

In the special case of degenerate sets we can prove a linear lower bound on the number of lines.

Theorem 1.2

In any metric space \((X,d)\) where \(X\) is a finite set of points in the plane and \(d\) is the \(L_1\) metric restricted to \(X\), either there is a line that contains all points of \(X\), or there are at least \(n/37\) distinct lines.

It is easy to see that the de Bruijn–Erdős theorem is tight: consider \(n-1\) points on a line, and one additional point that does not belong to this line. A similar construction works in the \(L_1\) case as well to show that Theorem 1.1 is tight. Many other similarities between lines in \(L_2\) and \(L_1\) metrics in the plane can be found, but in many important aspects the situations are fundamentally different.

Another important metric is \(L_{\infty }\), defined by

$$\begin{aligned} d_{\infty }((u_1,\ldots ,u_k),(v_1,\ldots ,v_k))=\max _{1\le i\le k}{|u_i-v_i|}. \end{aligned}$$

Let \(\phi \) denote the rotation around the origin by 45 degrees. Inspecting the \(L_{\infty }\) lines, we see that for any pair of points \(v_1, v_2\), we have

$$\begin{aligned} \langle \phi (v_1),\phi (v_2)\rangle _\infty =\{\phi (u): u \in \langle v_1,v_2\rangle _1\}. \end{aligned}$$

That is, for any finite set of points in the plane, the \(L_{\infty }\)-lines correspond to the \(L_1\)-lines of the rotated set (we will describe what \(L_1\)-lines look like in Sect. 2). The following theorem is then a direct corollary of Theorems 1.1 and 1.2.

Theorem 1.3

In any metric space \((X,d)\) where \(X\) is a finite set of points in the plane and \(d\) is the \(L_{\infty }\) metric restricted to \(X\), either there is a line that contains all points of \(X\), or there are at least \(n/37\) distinct lines. If, moreover, we have \(|u_1-v_1|\ne |u_2-v_2|\) for every two points \((u_1,u_2)\), \((v_1,v_2)\) of \(X\), then there are at least \(n\) distinct lines.

To close this section, let us list the most important results that are known regarding the Chen–Chvátal question. In [4], Chen and Chvátal proved that in every metric space on \(n\) points, either some line contains all points, or there are at least \(\lg n\) distinct lines. Chiniforooshan and Chvátal proved in [5] that

  • in every metric space induced by a connected graph, either there is a line containing all points, or there are \(\Omega (n^{2/7})\) distinct lines,

  • in every metric space on \(n\) points, there are \(\Omega ((n/\rho )^{2/3})\) distinct lines, where \(\rho \) is the ratio between the larges distance and the smallest nonzero distance, and

  • in every metric space on \(n\) points where every nonzero distance equals 1 or 2, there are \(\Omega (n^{4/3})\) lines.

The last result implies an affirmative answer to the Chen–Chvátal question for metric spaces with nonzero distances equal to 1 or 2, as long as \(n\) is large enough. In [7], Chvátal proved a variation on this result—he showed that the answer is affirmative for such metric spaces with any value of \(n\). The authors of [1] proved that this is the case also for metric spaces induced by connected chordal graphs. In [2], the same authors generalize the de Bruijn–Erdős theorem in a different direction. Several results dealing with lines in metric spaces induced by graphs were also proved by Jirásek and Klavík in [11].

As an example of a result that does not hold in this setting, let us mention the Sylvester–Gallai theorem, conjectured by Sylvester in [13] and proved by Gallai many years later (see [9] for a history of the problem). This classic theorem of ordered geometry states that every set of points in the plane is either collinear, or it contains two points such that the line passing through them contains no other points of the set. De Bruijn and Erdős observed in [8] that their theorem follows from this result. In [6], Chvátal provided an example showing that the Sylvester–Gallai theorem is no longer necessarily true in general metric spaces. He conjectured, however, that if we consider the line \(\langle a,b\rangle \) to be the recursive closure of (1) instead of (1) itself, then the statements holds in arbitrary finite metric space. This conjecture was verified by Chen in [3].

In the rest of this paper, we will assume the hypotheses of Theorem 1.2, i.e., \(X\) will be a finite set of points in the plane equipped with the \(L_1\) metric.

2 Monotone Sequences of Points

In this section, we will see that long increasing or decreasing sequences of points guarantee the existence of many lines.

We will denote points by lowercase letters \(p,q,\ldots \) or by pairs of coordinates, whatever is more convenient at the moment.

We say that a pair of points \((x_1,y_1)\), \((x_2,y_2)\) is

  • increasing if \((x_1-x_2)(y_1-y_2)>0\),

  • decreasing if \( (x_1-x_2)(y_1-y_2)<0\),

  • horizontal if \(y_1=y_2\),

  • vertical if \(x_1=x_2\).

If \((x_1,y_1),(x_2,y_2)\) is an increasing pair with \(x_1<x_2\), the line determined by these points consists of points in the (closed) rectangle determined by the two points and of points lying in the two quarter-planes

$$\begin{aligned} \{(x,y); x\le x_1, y\le y_1\} \quad \text{ and } \quad \{(x,y); x\ge x_2, y\ge y_2\}. \end{aligned}$$

The line determined by a horizontal pair \((x_1,y_1),(x_2,y_1)\) consists of points \((x,y_1)\) with \(x_1\le x\le x_2\) and of points in the two half-planes \(\{(x,y); x\le x_1\}\) and \(\{(x,y); x\ge x_2\}\). Lines determined by decreasing or vertical pairs look similar.

We say that \(p_1,p_2,\ldots ,p_k\) form an increasing sequence if every pair of points from the sequence is increasing. Decreasing sequences are defined analogously.

Let us start with two easy observations.

Proposition 2.1

If \(p_1,p_2\) is an increasing pair and \(p \notin \langle p_1,p_2\rangle \), then either \(p,p_1\) or \(p,p_2\) is a decreasing pair. Also, if \(p_1,\ldots ,p_k\) is an increasing sequence and the pair \(p,p_j\) is decreasing, then \(p_i \notin \langle p,p_j\rangle \) for all \(i \ne j\).

Lemma 2.2

If \(X\) is a non-collinear set that contains an increasing sequence of size \(k\), then \(X\) defines at least \(k\) different lines.

Proof

Let \(p_1,\ldots ,p_k\) be the points of the increasing sequence and let us consider the pair \(p_1,p_2\). As there is a point \(p \notin \langle p_1,p_2\rangle \), we obtain by the first part of Proposition 2.1 that \(p,p_i\) form a decreasing pair with \(i=1\) or \(i=2\) and therefore, by the second part of Proposition 2.1, \(\langle p,p_i\rangle \) contains only \(p_i\) from the increasing sequence. Now we repeat the procedure for \(p_{3-i}, p_3\) to obtain another line \(\ell _2\) that contains either only \(p_{3-i}\) or \(p_3\) among the points of the increasing sequence. Continuing in a similar way, we finally obtain \(k-1\) lines that contain exactly one point from the increasing sequence and these points are pairwise different, thus the lines are different. Furthermore for any \(i,j\) with \(1\le i\) and \(j\le k\), the line \(\langle p_i,p_j\rangle \) contains all points of the increasing sequence, therefore there is a \(k\)-th different line defined by \(\mathcal{P }\). \(\square \)

A version of Lemma 2.2 for decreasing sequences can be proved in an analogous way.

The well-known Erdős–Szekeres theorem [10] implies that whenever we have a set of \(n\) points in the plane such that no two share their \(x\)- or \(y\)-coordinates, \(I\) is the number of points in the longest increasing sequence and \(D\) is the number of points in the longest decreasing sequence, then \(D\cdot I\ge n\). Together with Lemma 2.2 this implies the existence of at least \(\sqrt{n}\) distinct lines in such sets.

Let us take this idea a step further and prove that \(\Omega (n^{2/3})\) lines exist in such sets. Draw a vertical line so that exactly half of the points are to the left of the line, and a horizontal line so that exactly half of the points are above it. We obtain four quadrants and either the top left and the bottom right quadrants have at least \(n/4\) points each, or the same holds for the top right and the bottom left. Let us suppose the first option holds. If either the top left or the bottom right quadrant contains a decreasing sequence with \(\Omega (n^{2/3})\) points, we are done by Lemma 2.2. If this is not the case, by the Erdős–Szekeres theorem we obtain an increasing sequence with \(\Omega (n^{1/3})\) points in each of the two quadrants. We have \(\Omega (n^{2/3})\) pairs of points such that one point is in one of the two sequences and the other point is in the second one. The lines determined by these pairs are all distinct.

Much stronger results can be obtained by more complicated ideas along these lines, but in order to reach our ultimate goal and prove the existence of a linear number of lines, we have to make better use of the structure of the set \(X\). We will do this in the subsequent sections.

3 Definition of a Partial Order; Many Lines Are Found

In this section, \(X\) will be a non-collinear set of points in the plane, and \(Y\) will be an \(n\)-element subset of \(X\) in which no two points share their \(x\)-coordinates and no two points share their \(y\)-coordinates.

Let us define a partial order \(\preceq \) on \(Y\) by putting \(p \preceq q\) whenever \(p,q\) is an increasing pair and \(p\) has smaller \(x\)-coordinate than \(q\). Define a partition \(Y=\mathcal{A }_0\cup \cdots \cup \mathcal{A }_k\) recursively as follows. Let \(\mathcal{A }_0\) be the set of minimal elements of the partially ordered set \((Y,\preceq )\), and if \(\mathcal{A }_0,\ldots ,\mathcal{A }_{i-1}\) are already defined, let \(\mathcal{A }_i\) be the set of minimal elements of the partially ordered set obtained from \((Y,\preceq )\) by removing all points that belong to \(\mathcal{A }_0,\ldots ,\mathcal{A }_{i-1}\). We will call each such \(\mathcal{A }_i\) a layer. The aim of this section is to find for each \(i>0\) a set of lines of cardinality \(|\mathcal{A }_i|\).

We will say that two points are neighbors if they are adjacent in the cover graph of this partial order.

Let \(G_i\) be the (bipartite) cover graph induced by \(\mathcal{A }_{i-1}\) and \(\mathcal{A }_i\) (that is, \(V(G_i)=\mathcal{A }_{i-1}\cup \mathcal{A }_i\), and edges are all increasing pairs of points). Fix a positive integer \(i\), and let \(q_1,\ldots ,q_t\) be all elements of \(\mathcal{A }_i\) such that all their neighbors in \(G_i\) have degree 1 in \(G_i\). For each such \(q_s\), select one of its neighbors (in \(G_i\)) arbitrarily, and call it \(\phi (q_s)\). Define a set of lines \(\mathcal{L }_i\). This set contains

  • all lines \(\langle \phi (q_{s_1}),\phi (q_{s_2})\rangle \) (these are decreasing lines) and

  • all lines \(\langle p,q\rangle \) such that \(p\in \mathcal{A }_{i-1}\), \(q\in \mathcal{A }_i\), the pair \(p,q\) is increasing, and \(\deg _{G_i}(p)>1\) (these are increasing lines).

The lines in \(\mathcal{L }_i\) have several useful properties. In order to accommodate lines that will be defined later, we formulate these properties in a slightly more general way here.

Claim 3.1

Each decreasing line \(\ell =\langle \phi (q_{s_1}),\phi (q_{s_2})\rangle \in \mathcal{L }_i\) has the following properties:

  • \(\mathfrak D _1\): it contains all points of \(\mathcal{A }_{i-1}\),

  • \(\mathfrak D _2\): it contains all points of \(\mathcal{A }_i\) except for the neighbors (in \(G_i\)) of the defining points of \(\ell \). (this is because \(\phi (q_{s_i})\) forms an increasing pair with \(q \in \mathcal{A }_i\) if and only if \(q=q_{s_i}\)),

  • \(\mathfrak D _3\): whenever \(p\) is a defining point of \(\ell \) that belongs to \(\mathcal{A }_j\) for some index \(j\), there exists an increasing sequence \(p_0,\ldots ,p_{j}=p\) such that for all indices \(s\) we have \(p_s\in \mathcal{A }_s\), and for \(s\le j-1\) we have \(p_s \notin \ell \).

Claim 3.2

Each increasing line \(\ell =\langle p,q\rangle \in \mathcal{L }_i\) has the following properties:

  • \(\mathfrak I _1\): \(\ell \cap \mathcal{A }_{i-1}=\{p\}\) and \(\ell \cap \mathcal{A }_i= \{q\}\),

  • \(\mathfrak I _2\): there exists a point \(q^{\prime } \in \mathcal{A }_i\) with \(p\preceq q^{\prime }\) and \(q^{\prime } \notin \ell \) (this is because \(p\) by definition has at least two neighbors in \(G_i\)),

  • \(\mathfrak I _3\): for any \(j\le i-1\), there exists a point \(p_j \in \mathcal{A }_j\) with \(p_j \in \ell \),

  • \(\mathfrak I _4\): for any \(j\ge i\), if \(p_j \in \mathcal{A }_j \cap \ell \), then for all \(p_{j+1} \in \mathcal{A }_{j+1}\) with \(p_j \preceq p_{j+1}\) we have \(p_{j+1} \in \ell \).

Let \(\mathcal{L }\) be the union of all \(\mathcal{L }_i\) for \(i>0\). For the purposes of the following claim, we consider \(\mathcal{L }\) to be a multiset. We will see later (in Lemma 3.6) that the lines in \(\mathcal{L }\) are in fact distinct, i.e., it is a set.

Claim 3.3

We have \(|\mathcal{L }|\ge \sum _{i>0} (|\mathcal{A }_i|-1).\)

Proof

For a fixed \(i\), suppose that \(\mathcal{A }_i\) contains \(c_i\) points for which all neighbors in \(G_i\) have degree equal to 1 and \(d_i\) points that have neighbors of higher degree. Then \(\mathcal{L }_i\) contains at least \(d_i\) increasing lines and \(\genfrac(){0.0pt}{}{c_i}{2}\) decreasing lines. We have \(\genfrac(){0.0pt}{}{c_i}{2}\ge c_i-1\) for all non-negative integers \(c_i\), so we obtain \(|\mathcal{L }_i|\ge |\mathcal{A }_i|-1\). \(\square \)

Some of the sets \(\mathcal{L }_i\) might contain only \(|\mathcal{A }_i|-1\) lines. This can happen only if \(c_i=1\) or \(c_i=2\). In both cases we need to find a line \(\ell _i^+\) different from all lines in \(\mathcal{L }\). We will put \(\mathcal{L }^{\prime }_i=\mathcal{L }_i \cup \{\ell _i^+\}\) and \(\mathcal{L }^{\prime }=\cup _{i>0}\mathcal{L }^{\prime }_i\).

If \(c_i=1\), \(\mathcal{L }_i\) does not contain any decreasing line. If \(|\mathcal{A }_{i-1}|\ge 2\), pick any two points \(p,q \in \mathcal{A }_{i-1}\) and let \(\ell ^+_i=\langle p,q \rangle \). If \(|\mathcal{A }_{i-1}|=1\), then we also have \(|\mathcal{A }_i|=1\), since otherwise the only point in \(\mathcal{A }_{i-1}\) would have degree at least \(2\), implying \(c_i=0\). Let \(q\) denote the only point in \(\mathcal{A }_i\) and let \(r\) be a point outside \(\langle p,q\rangle \). We have \(\mathcal{A }_j\subseteq \langle p,q\rangle \) for all \(j\ge i-1\). It follows that if \(r\in Y\), then \(r \in \cup _{j< i-1}\mathcal{A }_j\) and the pair \(r,p\) is decreasing. If the line \(\langle p,q\rangle \) contains all points of \(Y\), then \(r\in X\setminus Y\), and the pair \(r,p\) can be increasing or decreasing. Let \(\ell ^+_i=\langle r,p\rangle \). We will call such line a special line.

Claim 3.4

Decreasing lines defined in this step satisfy properties \(\mathfrak D _1\), \(\mathfrak D _2\), and \(\mathfrak D _3\). A special increasing line satisfies \(\mathfrak I _3\). The pair \(r,q\) is decreasing since \(r \notin \langle p,q \rangle \), so a special increasing line \(\langle r,p\rangle \) also satisfies

  • \(\mathfrak I _2^{\prime }\): no point of \(\mathcal{A }_i\) belongs to \(\langle r,p\rangle \).

If \(c_i=2\), there is exactly one decreasing line in \(\mathcal{L }_i\). Let \(q_1=(x_1,y_1)\) and \(q_2=(x_2,y_2)\) be the two points in \(\mathcal{A }_i\) that only have neighbors of degree 1 in \(G_i\), and suppose \(x_1<x_2\) and \(y_1>y_2\). Let \(p_1,p_2,\ldots ,p_k\) be the points of \(\mathcal{A }_{i-1}\) sorted in increasing order according to their \(x\)-coordinate. Note that the neighbors of \(q_2\) in \(G_i\) are consecutive points in the above ordering. Let \(p_a\) be the neighbor of \(q_2\) with the smallest index and define \(\ell ^+_i=\langle p_{a-1},q_2\rangle \). Note that \(a>1\) holds, since all neighbors of \(q_1\) have smaller indices than \(a\).

Claim 3.5

The line \(\ell ^+_i\) has the property \(\mathfrak D _3\), as well as the following two properties:

  • \(\mathfrak D _1^{\prime }\): \(\ell ^+_i\) contains all points of \(\mathcal{A }_{i-1}\) except the neighbors of \(q_2\), therefore \(\ell ^+_i\) contains at least one point from all increasing pairs from \(\mathcal{A }_{i-1}\cup \mathcal{A }_i\),

  • \(\mathfrak D _2^{\prime }\): it contains all points of \(\mathcal{A }_i\) except for the neighbors of \(p_{a-1}\).

Lemma 3.6

All lines in \(\mathcal{L }^{\prime }\) are distinct.

Proof

Since for each line in \(\mathcal{L }^{\prime }=\cup _{i>0}\mathcal{L }^{\prime }_i\), at least one of its defining points lies in \(Y\), the condition that no two points of \(Y\) share their \(x\)- or \(y\)-coordinates guarantees that an increasing line never coincides with a decreasing line.

Let \(\ell _1 \in \mathcal{L }^{\prime }_i, \ell _2\in \mathcal{L }^{\prime }_j\) be two decreasing lines. If \(i=j\) and both lines satisfy \(\mathfrak D _2\), then they are distinct. Otherwise one of them satisfies \(\mathfrak D _1\) and the other \(\mathfrak D _1^{\prime }\) and thus they are distinct.

Suppose \(i<j\). The line \(\ell _2\) has at least one defining point \(u\) on \(\mathcal{A }_{j-1}\), and by \(\mathcal{D }_3\) there exists an increasing sequence \(u_0,\ldots ,u_{j-1}=u\) such that \(u_s\not \in \ell _2\) for \(s\le j-2\). If \(u_{i-1}\in \ell _1\), we are done. If not, \(\ell _1\) satisfies \(\mathcal{D }_1^{\prime }\). The vertex \(u_{i-1}\) has degree 1 in \(G_i\), so \(v_i\) is the vertex \(q_2\) defined above. If \(i<j-1\), then \(q_2\in \ell _1\setminus \ell _2\) and we are done. Now suppose \(i=j-1\). We have \(q_2=u\). If the other defining point of \(\ell _2\) is on \(\mathcal{A }_{j-1}\), repeat the same argument to get \(q_2=v\), a contradiction. If the other defining point of \(\ell _2\) is on \(\mathcal{A }_j\), similar argument applies. If the other defining point of \(\ell _2\) is on \(\mathcal{A }_k\) with \(k<j-1\), then \(|\mathcal{A }_{j-1}|=1\), a contradiction with the assumption that according to \(\mathcal{D }_1^{\prime }\) for \(\ell _1\), it contains two different points, \(q_1\) and \(q_2\).

Let \(\ell _1 \in \mathcal{L }^{\prime }_i, \ell _2\in \mathcal{L }^{\prime }_j\) be two increasing lines. If \(i=j\), then both \(\ell _1\) and \(\ell _2\) satisfy \(\mathfrak I _1\) (if \(\mathcal{L }^{\prime }_i\) contains a special increasing line, then there is only one increasing line in \(\mathcal{L }^{\prime }_i\)), so they are distinct. If \(i< j\) and \(\ell _1\) satisfies \(\mathfrak I _2^{\prime }\), then the lines are distinct since \(\mathfrak I _3\) holds for \(\ell _2\). Otherwise they are distinct because \(\ell _1\) satisfies \(\mathfrak I _4\), and \(\ell _2\) satisfies \(\mathfrak I _2\) or \(\mathfrak I _2^{\prime }\). \(\square \)

For future reference, let us state also the following observation as a lemma.

Lemma 3.7

For \(i>0\) we have \(|\mathcal{L }_i^{\prime }|\ge |\mathcal{A }_i|\).

4 Linear Lower Bound for Arbitrary Sets of Points

Lemma 4.1

Let \(X\) be a set of non-collinear points in the plane. Moreover suppose that \(X\) has an \(n\)-element subset in which no two points share their \(x\)-coordinates and no two points share their \(y\)-coordinates. Then \(X\) induces at least \(n/2\) distinct lines.

Proof

The \(n\)-element subset of \(X\) satisfies the conditions placed on \(Y\) in Sect. 3. Let us use the notation and results introduced in that section. Since \(|\mathcal{L }^{\prime }|=\sum _{i>0} |\mathcal{L }_i^{\prime }|\), Lemma 3.7 implies that

$$\begin{aligned} |\mathcal{L }^{\prime }|\ge \sum _{i>0}|\mathcal{A }_i|. \end{aligned}$$

If this sum is at least \(n/2\), then we have found \(n/2\) distinct lines determined by \(X\). Otherwise, since points in \(\mathcal{A }_0\) form a decreasing sequence, \(X\) induces at least \(|\mathcal{A }_0|=n-\sum _{i>0}|\mathcal{A }_i|>n/2\) distinct lines by Lemma 2.2. \(\square \)

Lemma 4.2

Let \(\{(a,y_1),(a,y_2)\}\) and \(\{(b,y_1^{\prime }),(b,y_2^{\prime })\}\) be two vertical pairs in \(X\) such that the pairs \(\{y_1,y_2\}\) and \(\{y_1^{\prime },y_2^{\prime }\}\) are distinct. Then the lines \(\langle (a,y_1),(a,y_2) \rangle \) and \(\langle (b,y_1^{\prime }),(b,y_2^{\prime })\rangle \) are distinct.

Proof

Suppose first that \(a=b\). If \(p_1,\ldots ,p_k \in X\) are points with the same \(x\)-coordinate \(a\) and with \(y\)-coordinates \(y_1,\ldots ,y_k\), then for any integer \(i\) with \(1 \le i <k\), there exists a point \(p^{\prime }_i=(x^{\prime }_i,y^{\prime }_i) \in X\) such that \(a\ne x^{\prime }\) and \(y_i <y^{\prime }_i<y_{i+1}\). For \(l<m\), the line \(\langle p_l,p_m \rangle \) contains all the points \(p^{\prime }_i\) except for \(p^{\prime }_l,\ldots ,p^{\prime }_{m-1}\). It follows that the lines \(\langle p_l,p_m\rangle \) are pairwise distinct for all distinct pairs \(\{p_l,p_m\}\).

If \(a\ne b\) and \(y_1<y_2\le y_1^{\prime }<y_2^{\prime }\), then for any point \(p\notin \langle (a,y_1),(a,y_2)\rangle \) we have \(p \in \langle (b,y_1^{\prime }),(b,y_2^{\prime })\rangle \). If \(y_1<y_1^{\prime }<y_2<y_2^{\prime }\), then \((b,y_1^{\prime }) \notin \langle (a,y_1),(a,y_2)\rangle \). Finally, if \(y_1<y_1^{\prime }<y_2^{\prime }<y_2\), then again \((b,y_1^{\prime }) \notin \langle (a,y_1),(a,y_2)\rangle \). \(\square \)

Lemma 4.3

Let \(\{(a,y_1), (a,y_2)\}\) and \(\{(b,y_1^{\prime }), (b,y_2^{\prime })\}\) be two distinct vertical pairs of points in \(X\) such that there exists a point \((a,y_3)\in X\) with \(y_3\) strictly between \(y_1\) and \(y_2\). Then the line \(\ell _1=\langle (a,y_1), (a,y_2)\rangle \) does not coincide with the line \(\ell _2=\langle (b,y_1^{\prime }),(b,y_2^{\prime })\rangle \).

Proof

If \(\{y_1,y_2\}=\{y_1^{\prime },y_2^{\prime }\}\), then \(a\ne b\) and \((a,y_3)\in \ell _1\setminus \ell _2\). If the two pairs of \(y\)-coordinates do not coincide, then the lines are distinct by Lemma 4.2 \(\square \)

Analogous pair of lemmas holds for horizontal lines.

Lemma 4.4

Let \(X\) be a set of \(n\) points such that each point shares its \(x\)-coordinate with at least four others. Then \(X\) determines at least \(n\) (vertical) lines.

Proof

A set of \(m\) points that all share the same \(x\)-coordinate determines at least \(\genfrac(){0.0pt}{}{m-1}{2}\) non-consecutive pairs of points. If \(m\ge 5\), this is greater than \(m\). Overall we have at least \(n\) non-consecutive vertical pairs. These determine distinct lines by Lemma 4.3. \(\square \)

Proof of Theorem 1.2

Let \(0\le c,d\le 1\) be some constants. If at least \(cn\) points share their \(x\)-coordinates with at least four other points, then we have \(cn\) vertical lines by Lemma 4.4. If not, we have at least \((1-c)n\) points that share their \(x\)-coordinate with at most three other points. Deleting some points we get a set of at least \((1-c)n/4\) points with unique \(x\)-coordinates. Again, if at least \(d\)-fraction of these points share their \(y\)-coordinates with at least four other points, then we have \((1-c)dn/4\) horizontal lines. If not, deleting some points we get a set of at least \((1-d)(1-c)n/16\) points such that no two share \(x\)- or \(y\)-coordinate. By Lemma 4.1 we then obtain at least \((1-d)(1-c)n/(16\cdot 2)\) lines. Set \(d=1/9\), \(c=1/37 \). \(\square \)

Since our method does not yield the conjectured lower bound of \(n\), we did not attempt to improve the multiplicative constant \(1/37\).

5 Additional Lines for Non-degenerate Sets

If \(X=Y\), we can prove a stronger lower bound on the number of lines. In this section, we will assume that \(X\) is a non-collinear set of \(n\) points in the plane, such that no two points share their \(x\)- or \(y\)-coordinate.

Define the set \(\mathcal{L }^{\prime }\) of lines as in Sect. 3. Note that in this case all lines \(\ell ^+_i\) are decreasing. We need to add a set \(\mathcal{L }_0\) of new lines so that \(|\mathcal{L }_0 \cup \mathcal{L }^{\prime }_1| \ge |\mathcal{A }_0 \cup \mathcal{A }_1|\) holds.

Partition \(\mathcal{A }_0\) into four parts \(A_{0,0}, A_{0,h}, A_{0,-},A_{0,+}\). A point \(p \in \mathcal{A }_0\) belongs to \(A_{0,0}\) if there exists no \(q\) such that \(p,q\) is an increasing pair. A point \(p \in \mathcal{A }_0\setminus A_{0,0}\) belongs to \(A_{0,h}\) if it belongs to some increasing pair but all pairs \(p,q\) with \(q\in \mathcal{A }_1\) are decreasing. \(A_{0,-}\) consists of the points of \(\mathcal{A }_0\) that have degree 1 in \(G_1\), and \(A_{0,+}\) is set of points in \(\mathcal{A }_0\) with degree at least 2 in \(G_1\).

Let us first introduce the new increasing lines. For any point \(p \in \mathcal{A }_0 \setminus A_{0,0}\) let \(h(p)\) denote the minimum index \(i\) such that there exists a point \(q \in \mathcal{A }_i\) with \(p \prec q\). We define

$$\begin{aligned} \mathcal{L }_{0,\mathrm{incr}}=\{\langle p,q\rangle : p \in A_{0,-} \cup A_{0,h} ,q \in \mathcal{A }_{h(p)}, p\prec q\}. \end{aligned}$$

Every line \(\ell =\langle p,q\rangle \in \mathcal{L }_{0,\mathrm{incr}}\) has the following properties:

  • \(\mathfrak I _1^{\prime \prime }\): \(\ell \cap \mathcal{A }_0=\{p\}, \ell \cap \mathcal{A }_{h(p)}=q\), and for all \(0 <j<h(p)\) we have \(\ell \cap \mathcal{A }_j=\emptyset \),

  • \(\mathfrak I _4^{\prime \prime }\): for any \(j\ge h(p)\), if \(p_j \in \mathcal{A }_j \cap \ell \), then for all \(p_{j+1} \in \mathcal{A }_{j+1}\) with \(p_j \prec p_{j+1}\) we have \(p_{j+1} \in \ell \).

Lemma 5.1

The lines in \(\mathcal{L }^{\prime }\cup \mathcal{L }_{0,\mathrm{incr}}\) are all distinct.

Proof

Property \(\mathfrak I _1^{\prime \prime }\) ensures that two lines \(\langle p,q\rangle \) and \(\langle p^{\prime },q^{\prime }\rangle \) that both belong to \(\mathcal{L }_{0,\mathrm{incr}}\) are distinct unless \(\{p,q\}=\{p^{\prime },q^{\prime }\}\). A line \(\langle p,q\rangle =\ell _1 \in \mathcal{L }_{0,\mathrm{incr}}\) is different from any increasing line \(\ell _2 \in \cup _{i=1}^{h(p)}\mathcal{L }_i\) because \(\ell _1\) satisfies \(\mathfrak I _1^{\prime \prime }\) and \(\ell _2\) satisfies \(\mathfrak I _1\). If \(\ell _2 \in \cup _{i>h(p)}\mathcal{L }_i\), then \(\ell _1 \ne \ell _2\) because \(\ell _1\) satisfies \(\mathfrak I _4^{\prime \prime }\) and \(\ell _2\) satisfies \(\mathfrak I _2\). \(\square \)

To introduce the new decreasing lines, let \(A_{1,c}\) denote the set of all elements of \(\mathcal{A }_1\) such that all their neighbors in \(G_1\) have degree 1 in \(G_1\) (i.e., \(|A_{1,c}|=c_1\)). Writing \(A_{1,d}=\mathcal{A }_1 \setminus A_{1,c}\), consider the induced subgraph \(G^{\prime }=G_1[A_{1,d},A_{0,+}]\). Let us create a final partition of \(A_{1,d}\) and \(A_{0,+}\). Let \(A\) consist of the points of \(A_{1,d}\) that have degree 1 in \(G^{\prime }\) and let \(C \subseteq A_{0,+}\) be the set of neighbors of \(A\) in \(G^{\prime }\). Write \(B=A_{1,d}\setminus A\) and \(D=A_{0,+}\setminus C\). Let \(p_1,p_2,\ldots ,p_s\) be the enumeration of \(C\) in increasing order according to their \(x\)-coordinates and let \(q_k^1,q_k^2,\ldots ,q_k^{m(k)}\) be the neighbors of \(p_k\) in \(A\) enumerated again in increasing order according to their \(x\)-coordinates. Let \(u_k\) be either the rightmost point in \(A_{0,-} \cup A_{0,+}\) that has larger \(y\)-coordinate than \(q_k^1\) or the leftmost point in \(A_{0,-} \cup A_{0,+}\) that has larger \(x\)-coordinate than \(q_k^{m(k)}\). If \(k \ge 2\) then \(p_{k-1}\) has larger \(y\)-coordinate than \(q_k^1\) while if \(k \le s-1\), then \(p_{k+1}\) has larger \(x\)-coordinate than \(q_k^{m(k)}\). If this was not the case, \(p_{k-1}\) and \(q_k^1\) (or \(p_{k+1}\) and \(q_k^{m(k)}\)) would form an increasing pair, contradicting that \(q_k^1\) and \(q_k^{m(k)}\) have degree 1 in \(G^{\prime }\). It follows that if \(s \ge 2\),then \(u_k\) exists for all \(1\le k \le s\). If \(s \ge 2\), define

$$\begin{aligned} \mathcal{L }_{0,\mathrm{decr}}=\{\langle u_k,q_k^1\rangle : 1 \le k\le s\}. \end{aligned}$$

Claim 5.2

Every line \(\ell =\langle u_k,q_k^1\rangle \in \mathcal{L }_{0,\mathrm{decr}}\) has the following properties:

  • \(\mathfrak D _1^{\prime \prime }\): \(\ell \) contains all points of \(\mathcal{A }_0\) except for \(p_k\) (this is because the only point in \(\mathcal{A }_0\) with which \(q_k^1\) forms an increasing pair is \(p_k\)),

  • \(\mathfrak D _2^{\prime \prime }\): there exists a point \(q \in \mathcal{A }_1\) with \(q \notin \ell \) (since \(u_k\in A_{0,-} \cup A_{0,+}\), it has positive degree in \(G_1\)),

  • \(\mathfrak D _3^{\prime \prime }\): for every \(q \in \mathcal{A }_1\) either \(q \in \ell \) holds or there exists \(p\in \mathcal{A }_0\) with \(p \prec q\) and \(p\in \ell \) (if the only neighbor of \(q\) is \(p_k\), then by definition \(q \in \ell \) holds, otherwise we are done by \(\mathfrak D _1^{\prime \prime }\)).

Lemma 5.3

The lines in \(\mathcal{L }^{\prime }\cup \mathcal{L }_{0,\mathrm{decr}}\) are all distinct.

Proof

For \(k_1\ne k_2\), the lines \(\langle u_{k_1},q_{k_1}^1\rangle \) and \(\langle u_{k_2},q_{k_2}^1\rangle \) are distinct because of the property \(\mathfrak D _1^{\prime \prime }\). If \(\ell _1=\langle u_k,q_k^1\rangle \) and \(\ell _2 \in \mathcal{L }^{\prime }_1\), then they are distinct because \(\ell _1\) satisfies \(\mathfrak D _1^{\prime \prime }\) and \(\ell _2\) satisfies \(\mathfrak D _1\) or \(\mathfrak D _1^{\prime }\), since we have \(p_k \notin A_{0,-}\). If \(\ell _1=\langle u_k,q_k^1\rangle \) and \(\ell _2 \in \mathcal{L }^{\prime }_2\), the property \(\mathfrak D _2^{\prime \prime }\) guarantees that there is a point \(q\in \mathcal{A }_1\) that does not belong to \(\ell _1\). If \(q\in \ell _2\), we are done. If this is not the case, then \(\ell _2\) satisfies \(\mathfrak D _1^{\prime }\), so \(q\) has a neighbor in \(\mathcal{A }_2\) that belongs to \(\ell _2\). This point does not belong to \(\ell _1\). Finally, if \(\ell _1=\langle u_k,q_k^1\rangle \) and \(\ell _2 \in \mathcal{L }^{\prime }_j\) with \(j \ge 3\), then they are distinct because \(\ell _1\) satisfies \(\mathfrak D _3^{\prime \prime }\) and \(\ell _2\) satisfies \(\mathfrak D _3\). \(\square \)

Thanks to the assumption that no two points in \(X\) share their \(x\)- or \(y\)-coordinate, an increasing line never coincides with a decreasing line. We have therefore shown that the lines in \(\mathcal{L }^{\prime } \cup \mathcal{L }_{0,\mathrm{decr}} \cup \mathcal{L }_{0,\mathrm{incr}}\) are all distinct.

Lemma 5.4

We have \(|\mathcal{L }^{\prime }_1 \cup \mathcal{L }_{0,\mathrm{decr}} \cup \mathcal{L }_{0,\mathrm{incr}}| \ge |\mathcal{A }_0 \cup \mathcal{A }_1|-2\).

Proof

We partitioned \(\mathcal{A }_1\) into \(A_{1,c}, A\), \(B\), while \(\mathcal{A }_0\) is partitioned into \(A_{0,0}, A_{0,h}, A_{0,-},\) \( C,D\). The number of decreasing lines in \(\mathcal{L }^{\prime }_1\) is at least \(c_1=|A_{1,c}|\). The number of increasing lines in \(\mathcal{L }^{\prime }_1\) is \(e(G^{\prime })\), where \(G^{\prime }=G_1[A_{1,d}, A_{0,+}]=G_1[A \cup B, C\cup D]\).

Let us note that we have \(|\mathcal{L }_{0,\mathrm{incr}}| \ge |A_{0,-}| +|A_{0,h}|\) and \(|A_{0,0}| \le 1\). The first inequality follows from the definition of \(\mathcal{L }_{0,\mathrm{incr}}\). For the second inequality observe that if \(p_1, p_2\) belonged to \(A_{0,0}\), then the decreasing line \(\langle p_1,p_2\rangle \) would contain all points of \(X\). The number of lines in \(\mathcal{L }_{0,\mathrm{decr}}\) is \(|C|\) if \(|C| \ne 1\) and \(0=|C|-1\) if \(|C|=1\).

We claim that \(e(G^{\prime }) \ge |A| +|B|+|D|\). Vertices in \(A\), by definition, have degree 1 in \(G_1\), thus the number of edges adjacent to \(A\) is exactly \(|A|\) and these edges have their other endpoint in \(C\). The degree of all vertices of \(B \cup D\) is at least 2, thus the number of edges in \(G^{\prime }\) not adjacent to vertices in \(A\) is at least \(|B|+|D|\). Adding all these inequalities we obtain that \(|\mathcal{L }^{\prime }_1 \cup \mathcal{L }_{0,\mathrm{decr}} \cup \mathcal{L }_{0,\mathrm{incr}}| \ge |\mathcal{A }_0 \cup \mathcal{A }_1|-2\). \(\square \)

6 Non-Degenerate Sets: \(n\) Lines Exist

If \(X=Y\), then we can improve Lemma 4.1 and obtain Theorem 1.1.

Proof of Theorem 1.1

Putting together Lemma 3.7 with Lemma 5.4, we see that \(X\) induces at least \(n-2\) lines, and moreover the term \(-2\) would disappear if we had \(A_{0,0}=\emptyset \) and \(|C|\ne 1\) in the proof of the Lemma 5.4.

To overcome these last two problems, let us introduce three more partial orders on \(X\). Let \((X,\preceq _1)=(X,\preceq )\), and define \((X,\preceq _2),(X,\preceq _3),(X,\preceq _4)\) by

  • \(p \preceq _2 q\) if and only if \(q \preceq _1 p\),

  • \(p \preceq _3 q\) if and only if \(p,q\) is a decreasing pair and \(p\) has a smaller \(x\)-coordinate than \(q\),

  • \(p \preceq _4 q\) if and only if \(q \preceq _3 p\).

All the sets \(\mathcal{L }^{\prime }_i\), as well as \(\mathcal{L }_{0,\mathrm{decr}}\) and \(\mathcal{L }_{0,\mathrm{incr}}\), can be defined with respect to the layers according to \((X,\preceq _j)\) for all \(j=1,2,3,4\). We claim that for at least one of them \(A_{0,0}=\emptyset \) and \(|C|\ne 1\) must hold. Note first that a point in \(A_{0,0}\) forms a decreasing pair with all other points in \(X\) when \(A_{0,0}\) is defined according to \((X,\preceq _1)\) or \((X,\preceq _2)\), while it forms an increasing pair with all other points in \(X\) when \(A_{0,0}\) is defined according to \((X,\preceq _3)\) or \((X,\preceq _4)\). Clearly, there cannot exist two points simultaneously with these properties. Thus we can assume that for, say, \((X,\preceq _1)\) and \((X,\preceq _2)\) the set \(A_{0,0}\) is empty.

We still have to deal with the case where \(|C|=1\). Let \(p_1\) denote the only point in \(C\). If \(A_{0,-} \cup A_{0,+}\) contains other points besides \(p_1\), then \(u_1\) is defined and we obtain one decreasing line in \(\mathcal{L }_{0,\mathrm{decr}}\). Otherwise, as \(A_{0,-}\) is empty, we have \(c_1=0\) and thus \(\mathcal{L }^{\prime }_1\) does not contain any decreasing line. Therefore, if \(A_{0,h}\) is not empty, then a decreasing line \(\langle q, p_1\rangle \) with \(q \in A_{0,h}\) contains all \(\mathcal{A }_0\) and thus is different from any other lines. If \(A_{0,h}\) is empty, then we obtain \(A_0=\{p_1\}\) meaning \(p_1 \preceq q\) for any other point \(q\). The same proof for \((X,\preceq _2)\) shows that we find an extra line unless there exists a point \(p_2\) such that \(p_2 \preceq _2 q\), or equivalently \(q \preceq _1 p_2\), for any other point \(q\). But then \(\langle p_1,p_2 \rangle \) contains all points. Thus for one of the partial orders \((\preceq _1,X)\) or \((\preceq _2,X)\) we must have defined at least \(|\mathcal{A }_0 \cup \mathcal{A }_1|\) distinct lines. \(\square \)

Remark

Note that all four partial orders are needed in the above proof. Consider the points \(p_1=(x_1,y_1),p_2=(x_2,y_2),\ldots ,p_{n-1}=(x_{n-1},y_{n-1}),p=(x,y)\) such that \(x<x_1<x_2<\cdots <x_{n-1}\) and \(y_1<y_2<\cdots <y_{n-1}<y\) hold (this is the configuration mentioned in the introduction, showing that Theorem 1.1 is tight). Then only \((X,\preceq _4)\) will have the property that \(A_{0,0}=\emptyset \) and \(|C|\ne 1\).