1 Introduction

Let P be a set of n points in the plane in general position, that is, no three of them are on a line. A line, determined by two points of P, is a halving line if it has exactly \((n-2)/2\) points of P on both sides. Let f(n) denote the maximum number of halving lines that a set of n points can have. It is a challenging unsolved problem to determine f(n).

The first bounds are due to Lovász [8], and Erdős et al. [6]. They established the upper bound \(O(n^{3/2})\), and the lower bound \(\Omega (n\log n)\) (see also [5] for a different lower bound construction). Despite great interest in this problem, there was no progress until the very small improvement due to Pach et al. [10]. They improved the upper bound to \(O(n^{3/2}/\log ^{*}n)\). The iterated logarithm of n, \(\log ^{*}n\), is the number of times the \(\log \) function must be iteratively applied before the result is at most 1.

The best known upper bound is \(O(n^{4/3})\), due to Dey [3]. The lower bound has been improved by Tóth [13] to \(ne^{\Omega ({\sqrt{\log n}})}\). Nivasch [9] simplified the construction of Tóth.

Suppose that \(\gamma >0\). A planar point set P of n points is called \(\gamma \)-dense if the ratio of the largest and smallest distances determined by P is at most \(\gamma \sqrt{n}\). There exist arbitrarily large \(\gamma \)-dense point sets if and only if

$$\begin{aligned} \gamma \ge \sqrt{\frac{2\sqrt{3}}{\pi }}, \end{aligned}$$

see [4, 7]. Dense point sets are important in the analysis of some geometric algorithms, as they can be considered “typical” for some practical applications, like computer graphics.

Recall that f(n) is the maximum number of halving lines of a (not necessarily dense) set of n points in the plane. Edelsbrunner et al. [4] showed, that a \(\gamma \)-dense point set can have at most \(O(\gamma \sqrt{n}f(3\gamma \sqrt{n}))\) halving lines. Agarwal and Sharir [1] combined it with the result of Dey [3] and obtained that for any fixed \(\gamma \), a \(\gamma \)-dense point set can have at most \(O(n^{7/6})\) halving lines.

On the other hand, Edelsbrunner et al. [4] constructed 2-dense point sets with \(\Omega (n\log n)\) halving lines. Note that at that time \(\Omega (n\log n)\) was the best known lower bound for general point sets as well. In this note we give a better construction.

Theorem 1.1

For any even n, there exists a 4-dense set of n points in the plane with \(ne^{\Omega ({\sqrt{\log n}})}\) halving lines.

Our lower bound is again asymptotically the same as the best known lower bound for general point sets and it answers a question of Nivasch [9].

Our construction can be generalized to higher dimensions. Let \(d\ge 2\) and let P be a set of n points in the d-dimensional space, \(\mathbb {R}^d\), in general position, that is, no \(d+1\) of them are on a hyperplane. A hyperplane, determined by d points of P, is a halving hyperplane if it has exactly \((n-d)/2\) points of P on both sides. Let \(f_d(n)\) denote the maximum number of halving hyperplanes that a set of n points in \(\mathbb {R}^d\) can have. So \(f_2(n)\) is the same as f(n) above. The best upper bounds are \(f_3(n)\le O(n^{5/2})\) [12], \(f_4(n)\le O(n^{4-1/18})\) [11], and for \(d>4\), \(f_d(n)\le O(n^{d-\varepsilon _d})\) where \(\varepsilon _d=1/(2d)^d\) [2]. The planar lower bound construction can be “lifted” to higher dimensions and it gives the lower bound \(n^{d-1}e^{\Omega ({\sqrt{\log n}})}\) for \(f_d(n)\) [13].

A set of n points in \(\mathbb {R}^d\) is called \(\gamma \)-dense if the ratio of the largest and smallest distances determined by P is at most \(\gamma \root d \of {n}\). It was shown by Edelsbrunner et al. [4] that for any \(d\ge 3\), a dense point set in \(\mathbb {R}^d\) can have at most \(O(n^{d-2/d})\) halving hyperplanes. On the other hand, to the best of our knowledge, so far there is no nontrivial lower bound construction for dense point sets in \(d\ge 3\) dimensions.

Theorem 1.2

Let \(d\ge 3\). There exists a \(\gamma >0\) with the following property. For every n, such that \(n+d\) is even, there exists a \(\gamma \)-dense set of n points in the d-dimensional space with \(n^{d-1}e^{\Omega ({\sqrt{\log n}})}\) halving hyperplanes.

Just like in the planar case, our lower bounds are asymptotically the same as the best known lower bounds for general point sets. The planar construction is divided into three steps, presented in the next three sections. The first step is the bulk of the result, and it is based on the ideas of Nivasch [9]. However, we have to be more careful to keep the distances under control. In the last section we show how to generalize it to higher dimensions.

2 First Construction

Definition 2.1

(a) For any point set S in the plane, if points \(p, q\in S\) determine a halving line, then the segment pq is called a halving segment. (b) A geometric graph is a graph drawn in the plane with straight line segments as edges.

First, we construct point sets S with n points and \(ne^{\Omega ({\sqrt{\log n}})}\) halving lines, such that the diameter of S is 1 and the smallest distance is \(\Omega (n^{-8})\). Then, using several, slightly modified copies of S, we increase the smallest distance to \(\Omega (n^{-1/2})\) while the number of halving lines remains asymptotically the same.

Definition 2.2

We say that a set of points forms an arithmetic progression, if its points are on a horizontal line and consecutive points are at the same distance. Its size is the number of points it contains, its step is the distance between the consecutive points, its width is the distance between the first and last points.

Lemma 2.3

For every \(i>0\), there exists a point set \(S_i\) with the following properties.

  1. (a)

    The number of points \(|S_i|=n_{i}=\Omega (2^{i^2/2+i/2})\),

  2. (b)

    the number of halving lines of \(S_i\), \(m_i=n_ie^{\Omega ({\sqrt{\log n_i}})}\),

  3. (c)

    for any two points of \(S_i\), the difference of their x-coordinates is at most 1 and at least \(\Omega (n_i^{-8})\).

Proof of Lemma 2.3

For every fixed order \(o\ge 0\), we construct the geometric graphs \(G^o_{i}(S^o_{i}, H^o_{i})\) recursively in index i, for \(o\ge i\ge 0\). Each edge in \(H^o_i\) will be a halving edge of \(S^o_i\), that is, it will correspond to a halving line of \(S^o_i\). The vertex set \(S^o_{i}\) will contain two types of points, plain and bold. Together with \(S^o_{i}\), we construct \(H^o_{i}\), a set of halving segments of \(S^o_{i}\). Each halving segment in \(H^o_{i}\) will be determined by a plain and a bold point of \(S^o_{i}\). Note that \(H^o_{i}\) might not contain all halving segments of \(S^o_{i}\).

It will be clear from the construction that for every \(o, o'\ge i\), \(G^o_{i}(S^o_{i}, H^o_{i})\) and \(G^{o'}_{i}(S^{o'}_{i}, H^{o'}_{i})\) represent the same abstract graph.

Now we sketch the construction, then we explain it precisely.

Let \(S^o_0\) be a set of just two points, (1, 1), which is plain, and (0, 0), which is bold, \(H^o_0\) is the segment connecting them. Suppose that we already have \(S^o_{i-1}\) and \(H^o_{i-1}\). Substitute each plain point of \(S^o_{i-1}\) with an arithmetic progression of \(a_{i}\)plain points, of a very small step \(\varepsilon ^o_{i}\), and substitute each bold point with an arithmetic progression of \(a_{i}+1\)plain points, of the same step, \(\varepsilon ^o_{i}\). Finally, put a bold point very close to the midpoint of each halving segment of \(S^o_{i-1}\). Add all \(2a_i+1\) edges from the bold point to the plain points replacing the endpoints of the halving segment of \(S^o_{i-1}\). Finally, the diagonal construction (i.e., \(o=i\)) satisfies the conditions of Lemma 2.3.

Now we describe the construction precisely. Let \(S^o_{0}\) be a set of two points, (1, 1), which is plain, and (0, 0), which is bold. The set \(H^o_{0}\) contains the segment determined by the two points.

For \(i\ge 1\), let

$$\begin{aligned} a_{i}=2^i,\; \; \varepsilon ^o_{i}=2^{-(4o+4)i},\; \; d^o_{i}=a_i\varepsilon ^o_{i}=2^{-(4o+3)i}. \end{aligned}$$

Suppose again that we already have \(S^o_{i-1}\) and \(H^o_{i-1}\). For every plain point \(p=(x,y)\in S^o_{i-1}\), let \(p^{(k)}=(x+k\varepsilon ^o_{i}, y)\), and replace p with the plain points \(p^{(k)}\in S^o_{i}\), \(0\le k\le a_i-1\). We call these points the children of p, and p is the parent of the new points.

For every bold point \(b=(x,y)\in S^o_{i-1}\), let \(b^{(k)}=(x-k\varepsilon ^o_{i}, y)\), and replace b with the plain points \(b^{(k)}\in S^o_{i}\), \(0\le k\le a_i\). Again, we call these points the children of b, and b is the parent of the new points.

For each halving segment \(s=pb\in H^o_{i-1}\), where \(p=(x_p, y_p)\) is plain and \(b=(x_b, y_b)\) is bold, add a bold point

$$\begin{aligned} q=\left( \frac{x_p+x_b}{2}-\frac{\varepsilon ^o_{i}}{4}, \frac{y_p+y_b}{2}\right) . \end{aligned}$$

Add the segments \(qp^{(k)}\), \(0\le k\le a_i-1\), and \(qb^{(k)}\), \(0\le k\le a_i\), to \(H^o_{i}\). See Fig. 1. We say that these new segments in \(H^o_{i}\) are the children of \(pb\in H^o_{i-1}\), and pb is the parent of the new segments and q.

Fig. 1
figure 1

The recursion step on a halving segment s. The new plain points \(p^{(0)},\ldots , p^{(a_i-1)}\) are the children of p, and \(b^{(0)},\ldots , b^{(a_i)}\) are the children of b. The new bold point q is the child of b, and q is assigned to s

We also say that the point q is the child of b and b is the parent of q. Finally, we say that the point q is assigned to segment pb.

Extend the relations “parent” and “child” to their transitive closure and call the resulting relation “ancestor” and “descendant”, respectively.

A halving segment \(s\in H^o_{i}\) is the k-th ancestor (k-th descendant) of \(s'\in H^o_{i'}\), if it is an ancestor (descendant) and \(i'=i+k\) (\(i'=i-k\)). Similarly, a point \(p\in S^o_{i}\) is the k-th ancestor (k-th descendant) of \(p'\in S^o_{i'}\), if it is an ancestor (descendant) and \(i'=i+k\) (\(i'=i-k\)).

For any \(s\in H^o_{i}\) or \(p\in S^o_{i}\) and \(k>0\), let \(\mathrm{Desc}_k(s)\) or \(\mathrm{Desc}_k(p)\) denote the set of the k-th descendants of s or p, respectively, and \(\mathrm{Desc}(s)\) or \(\mathrm{Desc}(p)\) denote the set of all of its descendants.

Now we prove the correctness of the construction, that is, the segments in \(H_i^o\) are halving segments of \(S_i^o\).

Definition 2.4

  1. (a)

    Let \(\ell \) be a non-horizontal line and let q be a point. The horizontal distance of \(\ell \) and q, \(d(\ell , q)\), is the length of the unique horizontal segment, one of whose endpoints is q and the other one is on \(\ell \).

  2. (b)

    Let s be a non-horizontal segment with endpoints \(b =(x_1, y_1)\), \(p = (x_2, y_2)\), where \(0\le y_1<y_2\le 1\), and let \(\ell \) be its line. Let \({\bar{b}}=({\bar{x}}_1, 0)\) and \({\bar{p}}=({\bar{x}}_2, 1)\) be the intersections of \(\ell \) with the line \((y=0)\) and \((y=1)\), respectively. Call \({\bar{s}}={\bar{b}}{\bar{p}}\) the extension of s.

  3. (c)

    For any segment s, the horizontal strip HS(s) is the closed strip bounded by the horizontal lines through the endpoints of s.

  4. (d)

    Let r be a point in HS(s). The horizontal distance of s and r, d(sr), is the horizontal distance of r and the line determined by s.

  5. (e)

    Let \(\alpha >0\). The \(\alpha \)-strip of s, \(S_{\alpha }(s)\), is the set of points q such that \(q\in HS({\bar{s}})\) and \(d({\bar{s}}, q)\le \alpha \). See Fig. 2.

Fig. 2
figure 2

The strips and the extension of s

Fig. 3
figure 3

Point r is a descendant of s, but q is not

We show that for any halving segment s in \(H^o_i\), all of its descendant segments are in a very narrow strip of s, in a very strong sense, while other points, that is, those points which are not endpoints of descendant segments, will never get into that strip. See Fig. 3.

Claim 1

Let \(i\ge 0\) and \(s\in H^o_i\). For every \(r\in \mathrm{Desc}(s)\), the extension \({\bar{r}}\) of r lies in \(S_{\alpha }(s)\), where \(\alpha =2^{i+2}d^o_{i+1}\).

Proof

Suppose that \(s\in H^o_i\), \(s=pb\) where \(p, b\in S^o_i\), p is plain, b is bold. Let \(r\in \mathrm{Desc}(s)\). Then there is a sequence \(s = s_0, s_1, \ldots , s_{j} = r\) such that for every \(0\le k\le j-1\), \(s_k\in H^o_{i+k}\), and \(s_{k}\) is a parent of \(s_{k+1}\). For every \(0\le k\le j\), let \({\bar{s}}_k={\bar{p}}_k{\bar{b}}_k\) be the extension of \(s_k\). For the exact definition see Definition 2.4 (b).

Let \(s_1=b_1p_1\) where \(b_1, p_1\in S^o_{i+1}\), \(p_1\) is plain, \(b_1\) is bold. Move \(s_1\) horizontally to the right by \(\varepsilon ^o_{i+1}/4\), let \(s'_1=b'_1p'_1\) be the resulting segment and let \({\bar{s}}_1'={\bar{p}}_1'{\bar{b}}_1'\) be the extension of \(s'_1\). Then \(b'_1\) is exactly the midpoint of s. The point \(p'_1\) has the same y-coordinate as either p or b, and their (horizontal) distance is at most \(d^o_{i+1}-\varepsilon ^o_{i+1}/4\). Consequently, \(|{\bar{p}}_0{\bar{p}}_1'|\le 2^{i+1}(d^o_{i+1}-\varepsilon ^o_{i+1}/4)\) so \(|{\bar{p}}_0{\bar{p}}_1|\le 2^{i+1}d^o_{i+1}.\) Similarly, \(|{\bar{b}}_0{\bar{b}}_1'|\le 2^{i+1}(d^o_{i+1}-\varepsilon ^o_{i+1}/4)\) so \(|{\bar{b}}_0{\bar{b}}_1|\le 2^{i+1}d^o_{i+1}.\)

We can show by the same argument that for any \(1\le k\le j\), \(|{\bar{p}}_{k-1}{\bar{p}}_{k}|\le 2^{i+k}d^o_{i+k}\). and \(|{\bar{b}}_{k-1}{\bar{b}}_{k}|\le 2^{i+k}d^o_{i+k}\).

Therefore, \(|{\bar{p}}_0{\bar{p}}_{j}|\le \sum _{k=1}^{j}2^{i+k}d^o_{i+k}<2^{i+2}d^o_{i+1}=\alpha \) and \(|{\bar{b}}_0{\bar{b}}_{j}|\le \sum _{k=1}^{j}2^{i+k}d^o_{i+k}<2^{i+2}d^o_{i+1}=\alpha \). \(\square \)

Claim 2

(a) Let \(j\ge i\ge 0\) and \(s\in H^o_i\). Suppose that \(q\in S^o_j\) is not an endpoint of s and not a descendant of s. Then \(q\not \in S_{2\alpha }(s)\) where \(\alpha =2^{i+2}d^o_{i+1}\).

(b) Suppose that \(q_i\in S^o_i\), \(s_i\in H^o_i\) and \(q_i\) is not an endpoint of \(s_i\). Let \(q_{i+1}\in S^o_{i+1}\) be a child of \(q_i\), \(s_{i+1}\in H^o_{i+1}\) be a child of \(s_i\).

Then \(q_i\) is below the line of \(s_i\) if and only if \(q_{i+1}\) is below the line of \(s_{i+1}\).

Proof

First we show part (a) of the claim. Let \(j\ge i\), \(q\in S^o_j\) that is not an endpoint of s or any descendant of s.

Case 1

Suppose that q is bold. There is a sequence \(b_0, b_1, \ldots , b_j=q\) such that for every k, \(0\le k\le j\), \(b_k\) is a bold point in \(S^o_k\), and for every k, \(0\le k<j\), \(b_{k}\) is a parent of \(b_{k+1}\). Moreover, there is a sequence \(s'_0, s'_1, \ldots , s'_{j-1}\) such that for every k, \(0\le k<j\), \(s'_k\in H^o_k\), \(b_{k+1}\) is assigned to \(s'_k\), and for every k, \(0\le k<j-1\), \(s'_{k}\) is a parent of \(s'_{k+1}\).

Similarly, there is a sequence \(s_0, s_1, \ldots , s_i=s\) such that for every k, \(0\le k\le i\), \(s_k\in H^o_k\), and for every k, \(0\le k<j\), \(s_{k}\) is a parent of \(s_{k+1}\).

By the assumption, if \(j>i\), then \(s'_i\ne s_i\), if \(j=i\) then \(s'_{i-1}\ne s_{i-1}\). Let \(m\le i\) be the smallest number with the property that \(s'_m\ne s_m\).

Case 1.1

Suppose first that \(m=i\). Then \(s'_i\ne s_i\) but \(s'_{i-1}=s_{i-1}\). In this case both \(s_i\) and \(s'_i\) are children of \(s_{i-1}=s'_{i-1}\) and \(j>i\) by the previous observations. Let \(\ell \) be the horizontal line through \(q=b_j\). We will analyze the situation step by step on that line. Let t be the intersection of \(\ell \) and the line of \(s_i\). For \(k=i, \ldots , j-1\), let \(t_k\) be the intersection of \(\ell \) and the line of \(s'_k\) and let \(t_j=q\). See Fig. 4.

Fig. 4
figure 4

Case 1.1 in the proof of Claim 2

Clearly, \(|tt_i|\ge 2^{i-j-1}\varepsilon ^o_{i}\). For any k, \(i\le k<j\), \(|t_kt_{k+1}|\le d^o_{k+1}\). But

$$\begin{aligned} \sum _{k=i}^{j-1}|t_kt_{k+1}|\le \sum _{k=i}^{j-1}d^o_{k+1}\le 2d^o_{i+1}, \end{aligned}$$

therefore, for \(\alpha =2^{i+2}d^o_{i+1}\),

$$\begin{aligned} |tq|&\ge |tt_i|-\sum _{k=i}^{j-1}|t_kt_{k+1}|\ge 2^{i-j-1}\varepsilon ^o_{i}-2d^o_{i+1}\\&=2^{i-j-1}2^{-(4o+4)i}-2^{-(4o+3)(i+1)+1}\ge 2^{i-o-1}2^{-(4o+4)i}-2^{-(4o+3)(i+1)+1}\\&>2^{-(4o+3)(i+1)+i+3}=2\alpha . \end{aligned}$$

Consequently, \(q\not \in S_{2\alpha }(s)\). Here we used that \(o\ge j\).

Case 1.2

Suppose now that \(i>m\). By the previous argument, \(q\not \in S_{2\beta }(s_m)\) where \(\beta =2^{m+2}d^o_{m+1}\). By Claim 1, \({\bar{s}}_i\subset S_{\beta }(s_m)\), therefore, \(S_{2\alpha }(s_i)\subset S_{2\beta }(s_m)\), so it follows that \(q\not \in S_{2\alpha }(s_i)\).

Case 2

Suppose that q is plain. The argument will be a more complicated version of the previous one. There is a sequence \(b_0, b_1, \ldots , b_l, p_{l+1}, \ldots , p_j=q\) such that

  1. (a)

    for every k, \(0\le k\le l\), \(b_k\) is a bold point in \(S^o_k\),

  2. (b)

    for every k, \(0\le k<l\), \(b_{k}\) is a parent of \(b_{k+1}\),

  3. (c)

    for every k, \(l<k\le j\), \(p_k\) is a plain point in \(S^o_k\),

  4. (d)

    for every k, \(l<k<j\), \(p_{k}\) is a parent of \(p_{k+1}\), and

  5. (e)

    \(b_{l}\) is a parent of \(p_{l+1}\).

Moreover, there is a sequence \(s'_1, s'_2, \ldots , s'_{l-1}\) such that for every k, \(0\le k\le l-1\), \(s'_k\in H^o_k\), for every k, \(0\le k<l-1\), \(s'_{k}\) is a parent of \(s'_{k+1}\), and \(b_{k+1}\) is assigned to \(s'_k\).

Similarly, there is a sequence \(s_0, s_1, \ldots , s_i=s\) such that for every k, \(0\le k\le i\), \(s_k\in H^o_k\), and for every k, \(0\le k<i\), \(s_{k}\) is a parent of \(s_{k+1}\).

Case 2.1

Suppose first that \(l\ge i\). We proceed almost exactly as in Case 1.

By the assumption, if \(l>i\), then \(s'_i\ne s_i\), and if \(l=i\) then \(s'_{i-1}\ne s_{i-1}\). Let \(m\le i\) be the smallest number with the property that \(s'_m\ne s_m\).

Then \(s'_m\ne s_m\) but both of them are children of \(s_{m-1}=s'_{m-1}\). Let \(\ell \) be the horizontal line through q. Observe that \(b_l, p_{l+1}, \ldots , p_j=q\) are all on \(\ell \). Let t be the intersection of \(\ell \) and the line of \(s_m\). For \(m\le k\le l-1\), let \(t_k\) be the intersection of \(\ell \) and the line of \(s'_k\), let \(t_l=b_l\), and for \(k=l+1, \ldots , j\), let \(t_k=p_k\).

Clearly, \(|tt_m|\ge 2^{m-l-1}\varepsilon ^o_{m}\). For any k, \(m\le k< j\), \(|t_kt_{k+1}|\le d^o_{k+1}\). But

$$\begin{aligned} \sum _{k=m}^{j-1}|t_kt_{k+1}|\le \sum _{k=m}^{j-1}d^o_{k+1}\le 2d^o_{m+1}, \end{aligned}$$

therefore, for \(\beta =2^{m+2}d^o_{m+1}\),

$$\begin{aligned} |tq|\ge |tt_m|-\sum _{k=m}^{j-1}|t_kt_{k+1}|\ge 2^{m-l-1}\varepsilon ^o_{m}-2d^o_{m+1}\ge 2\beta . \end{aligned}$$

Consequently, \(q\not \in S_{2\beta }(s_m)\). By Claim 1, \({\bar{s}}_i\in S_{\beta }(s_m)\). Recall, that \(\alpha =2^{i+2}d^o_{i+1}\). Therefore, \(S_{2\alpha }(s_i)\subset S_{2\beta }(s_m)\), so it follows that \(q\not \in S_{2\alpha }(s_i)\).

Case 2.2

Suppose now that \(l< i\). If \(s'_{l-1}\ne s_{l-1}\), then we can proceed exactly as in Case 2.1. Let \(m\le i\) be the smallest number with the property that \(s'_m\ne s_m\), and do the same calculation.

So we can assume that \(s'_{l-1}=s_{l-1}\). In this case \(b_l\) is an endpoint of \(s_l\). For simplicity denote \(b_l\) also as \(p_l\). By the assumption, \(p_i\) is not an endpoint of \(s_i\). Let m be the smallest number such that \(p_m\) is not the endpoint of \(s_m\). Now we do the same calculation again.

Let \(\ell \) be the horizontal line through \(p_m, \ldots , p_j\). Let t be the intersection of \(\ell \) and the line of \(s_m\). We have \(|tp_m|\ge \varepsilon ^o_{m}/2\). For any k, \(m\le k< j\), \(|p_kp_{k+1}|\le d^o_{k+1}\). So

$$\begin{aligned} \sum _{k=m}^{j-1}|p_kp_{k+1}|\le \sum _{k=m}^{j-1}d^o_{k+1}\le 2d^o_{m+1}, \end{aligned}$$

therefore, for \(\beta =2^{m+2}d^o_{m+1}\),

$$\begin{aligned} |tq|\ge |tp_m|-\sum _{k=m}^{j-1}|p_kp_{k+1}|\ge \varepsilon ^o_{m}/2-2d^o_{m+1}\ge 2\beta . \end{aligned}$$

Consequently, \(q\not \in S_{2\beta }(s_m)\). By Claim 1, \({\bar{s}}_i\subset S_{\beta }(s_m)\), therefore, \(S_{2\alpha }(s_i)\subset S_{2\beta }(s_m)\), so it follows that \(q\not \in S_{2\alpha }(s_i)\).

This concludes the proof of part (a). Part (b) follows directly from the calculations, we only have to observe that taking a child of the point q, it cannot “jump” to the other side of the strip \(S_{2\alpha }(s)\). \(\square \)

We are ready to prove that the segments in \(H^o_i\), \(i\le o\), are indeed halving segments. Let \(o>0\) be fixed. First we show that the new lines are “locally” halving. Suppose that \(s=pb\in H^o_{i-1}\) where \(p, b\in S^o_{i-1}\), p is plain, b is bold. To construct \(S^o_i\) and \(H^o_i\), we replace p with the arithmetic progression \(p^{(0)}, \ldots , p^{(a_i-1)}\) of plain points, replace b with the arithmetic progression \(b^{(0)}, \ldots , b^{(a_i)}\) of plain points and add the bold point \(b'\) close to the midpoint of pb as described before. Then for any k, the line \(b'p^{(k)}\) has \(p^{(0)}, \ldots , p^{(k-1)}, b^{(k+1)}, \ldots , b^{(a_i)}\) on one side and \(b^{(0)}, \ldots , b^{(k)}, p^{(k+1)}, \ldots , p^{(a_i-1)}\) on the other side. We can argue the same way for the line \(b'b^{(k)}\). So, these lines halve the set of plain points that replace p and b. Call this the locally halving property of the halving segments.

For every i, let \(B_i\) resp. \(P_i\) be the set of bold resp. plain points of \(S^o_i\). We prove by induction that every \(s\in H^o_i\) halves both of the sets \(B_i\) and \(P_i\). More precisely, the two open halfplanes determined by the line of s contain the same number of points of \(B_i\) and they also contain the same number of points of \(P_i\). For \(i=0, 1\) it is trivial. Assume that \(s_{i-1}=(p_{i-1}, b_{i-1})\in H^o_{i-1}\) halves the sets \(B_{i-1}\) and \(P_{i-1}\).

The set \(B_i=B_i^{(1)}\cup B_i^{(2)}\) where \(B_i^{(1)}\) is the set of bold children of points of \(B_{i-1}\setminus \{b_{i-1}\}\) and \(B_i^{(2)}\) is the set of bold children of \(b_{i-1}\).

Similarly, \(P_i=P_i^{(1)}\cup P_i^{(2)}\cup P_i^{(3)}\) where \(P_i^{(1)}\) is the set of (plain) children of points of \(P_{i-1}\setminus \{p_{i-1}\}\), \(P_i^{(2)}\) is the set of plain children of points of \(B_{i-1}\setminus \{b_{i-1}\}\), and \(P_i^{(3)}\) is the set of plain children of \(p_{i-1}\) and \(b_{i-1}\).

Let \(s_i\) be a child of \(s_{i-1}\). It follows from Claim 2 that if \(p\in P_{i-1}\) is on the left (resp. right) side of the line of \(s_{i-1}\), then any descendant \(p'\in P_i\) of p is on the left (resp. right) side of \(s_{i}\). Since each \(p\in P_{i-1}\) is replaced by the same number, \(a_i\) of plain points, it follows that \(s_i\) is halving \(P_i^{(1)}\). By a similar argument, \(s_i\) is halving \(P_i^{(2)}\). And by the locally halving property of \(s_i\), it is halving the set \(P_i^{(3)}\). So, \(s_i\) is halving \(P_i\).

Since \(s_{i-1}\) is halving \(B_{i-1}\), and each bold point has exactly \(2a_{i-1}+1\) bold children, it follows again from Claim 2 that \(s_i\) is halving the set \(B_i^{(1)}\). The set \(B_i^{(2)}\) contains \(2a_{i-1}+1\) bold points. It follows from the locally halving property of \(s_{i-1}\) and Claim 2 that \(s_i\) is halving the set \(B_i^{(2)}\). Therefore, \(s_i\) is halving \(B_i\) as well. This concludes the proof that the segments in \(H^o_i\) are indeed halving segments for every \(o\ge i\).

For any o, the set \(S_0^o\) contains only two points, (1, 1) and (0, 0), and the line determined by them has slope 1. We show that for any \(o\ge i\), any two points of \(S_i^o\) determine a horizonal line, or line of slope close to 1. This will be very useful in the proof of part (c) of Lemma 2.3.

Claim 3

Suppose that \(\ell \) is a line determined by two points of \(S_i\) and let \(\gamma \) be the smaller angle determined by \(\ell \) and the x-axis. Then either \(\gamma =0\) or \(7/8\le \cot \gamma \le 9/8\).

Proof

For any point p, let x(p) and y(p) denote its x-coordinate and y-coordinate, respectively. The statement of Claim 3 is trivial for \(o=0\). Note that in this case \(i=0\) as well, since \(o\ge i\ge 0\). Let \(o>0\) and let \(o\ge i\ge 0\). Let \(a, b\in S_{i}^o\). If \(y(a)=y(b)\), then they determine a horizontal line. Suppose that \(y(a)\ne y(b)\). Then we have \(|y(a)-y(b)|\ge 2^{-i}\ge 2^{-o}\). Let \(\gamma \) be the smaller angle determined by the line ab and the x-axis. Then

$$\begin{aligned} \cot (\gamma )=\frac{x(a)-x(b)}{y(a)-y(b)}. \end{aligned}$$

The set \(S_0^o\) contains only two points, (1, 1) and (0, 0), and they determine \(s_0\in H_0^o\). Apply Claim 1 for the segment \(s_0\), we obtain that \(a, b\in S_{\alpha }(s_0)\) where \(\alpha =4d_1^o=2^{-4o-1}\). Therefore, \(|y(a)-x(a)|\le 2^{-4o-1}\) and \(|y(b)-x(b)|\le 2^{-4o-1}\). Therefore,

$$\begin{aligned} |1-\cot (\gamma )|\le \frac{|y(a)-x(a)|+|y(b)-x(b)|}{|y(a)-y(b)|}\le \frac{2^{-4o}}{2^{-o}}=2^{-3o}\le \frac{1}{8}. \end{aligned}$$

\(\square \)

Note that \(7/8\le \cot \gamma \le 9/8\) implies that \(4\pi /18<\gamma <5\pi /18\).

It is clear from the construction, that for every \(o, o'\ge i\), \(G^o_{i}(S^o_{i}, H^o_{i})\) and \(G^{o'}_{i}(S^{o'}_{i}, H^{o'}_{i})\) represent the same abstract graph, but they are different as geometric graphs. For any i, let

$$\begin{aligned} G_{i}(S_{i}, H_{i})=G^i_{i}(S^i_{i}, H^i_{i}). \end{aligned}$$

The graph \(G_i\) has \(n_i\) vertices and \(m_i\) edges, all of them are halving edges of \(S_i\).

We estimate now the number of points \(n_i\) in \(S_i\) and the number of halving lines \(m_i\) in \(H_i\), that is, we prove parts (a) and (b) of Lemma 2.3. Our calculation is similar to the one by Nivasch [9].

We have \(n_0=2\) and \(m_0=1\). Since each halving line in \(H_{i-1}\) is replaced by \(2a_i+1\) halving lines in \(H_i\),

$$\begin{aligned} m_i=(2a_i+1)m_{i-1}, \end{aligned}$$

therefore,

$$\begin{aligned} m_i=m_0\prod _{j=1}^{i}(2a_j+1)=\prod _{j=2}^{i+1}(2^j+1)= \frac{1}{6}\prod _{j=0}^{i+1}(2^j+1). \end{aligned}$$

Consequently

$$\begin{aligned} m_i>\frac{1}{6}\prod _{j=0}^{i+1}2^j=\frac{1}{6}\,2^{i^2/2+3i/2+1}= \frac{1}{3}\,2^{i^2/2+3i/2}. \end{aligned}$$

On the other hand,

$$\begin{aligned}&m_i=\frac{1}{6}\prod _{j=0}^{i+1}2^j \cdot \prod _{j=0}^{i+1}\left( \frac{2^j+1}{2^j}\right) = \frac{1}{3}\,2^{i^2/2+3i/2}\cdot \prod _{j=0}^{i+1}\left( 1+2^{-j}\right) \\&\qquad<\,\frac{1}{3}\,2^{i^2/2+3i/2}\cdot \prod _{j=0}^{i+1} \left( e^{2^{-j}}\right) <\frac{e^2}{3}\,2^{i^2/2+3i/2}. \end{aligned}$$

Here we used that for any \(x>0\), \(e^x>1+x\).

Summarizing,

$$\begin{aligned} \frac{1}{3}\,2^{i^2/2+3i/2}<m_i<\frac{e^2}{3}\,2^{i^2/2+3i/2}. \end{aligned}$$
(1)

The number of bold points in \(S_{i-1}\) is \(m_{i-2}\), hence the number of plain points in \(S_{i-1}\) is \(n_{i-1}-m_{i-2}\). Therefore, there are

$$\begin{aligned} a_i(n_{i-1}-m_{i-2})+(a_i+1)m_{i-2}=a_in_{i-1}+m_{i-2} \end{aligned}$$

plain points and \(m_{i-1}\) bold points in \(S_i\), so

$$\begin{aligned} n_i=a_in_{i-1}+m_{i-1}+m_{i-2}. \end{aligned}$$

Using (1) for \(m_i\), we prove by induction that

$$\begin{aligned} 2^{i^2/2+i/2}<n_i<4(i+1)2^{i^2/2+i/2}. \end{aligned}$$
(2)

Both inequalities hold trivially for \(i=0\). Suppose that \(i>0\) and \(2^{(i-1)^2/2+(i-1)/2}<n_{i-1}\). Then

$$\begin{aligned} n_i=a_in_{i-1}+m_{i-1} +m_{i-2}>a_in_{i-1}>2^i2^{(i-1)^2/2+(i-1)/2}=2^{i^2/2+i/2}. \end{aligned}$$

Suppose now that \(n_{i-1}<4i2^{(i-1)^2/2+(i-1)/2}\). Then

$$\begin{aligned}&n_i=a_in_{i-1}+m_{i-1}+m_{i-2}<a_in_{i-1}+2m_{i-1} \\&\qquad<\,4i2^i2^{(i-1)^2/2+(i-1)/2}+\frac{2e^2}{3}\, 2^{(i-1)^2/2+3(i-1)/2}<4(i+1)2^{i^2/2+i/2}. \end{aligned}$$

It follows that \(m_i\ge n_ie^{\Omega ({\sqrt{\log n_i}})}\). This finishes the proof of parts (a) and (b) of Lemma 2.3.

Now we prove part (c). The statement is trivial for \(i=0\), suppose that \(i>0\). Let \(a, b\in S_i\). First assume that \(y(a)\ne y(b)\). Then we have \(2^{-i}\le |y(a)-y(b)|\le 1\), so by Claim 3,

$$\begin{aligned} \frac{7\cdot 2^{-i}}{8}\le |x(a)-x(b)|\le \frac{9}{8}. \end{aligned}$$

Now assume that \(y(a)=y(b)\). Then \(|x(a)-x(b)|<\sum _{j=1}^{i}d^i_j=\sum _{j=1}^{i}2^{-(4i+3)j}<1\), on the other hand, \(|x(a)-x(b)|\ge \varepsilon ^i_i=2^{-4i^2-4i}\). Summarizing, in any case we have

$$\begin{aligned} \frac{9}{8}\ge |x(a)-x(b)|\ge 2^{-4i^2-4i}\ge n_i^{-8} \end{aligned}$$

by inequality (2). Apply a scaling by a factor of 8 / 9 and the statement follows. This concludes the proof of Lemma 2.3. \(\square \)

3 Second Construction

The following statement is stronger than Lemma 2.3. It holds for all even numbers n, not just a sequence \(\{ n_i\}\), and in part (c), instead of \(\Omega (n_i^{-8})\), now we have \(\Omega (n^{-1})\), which is optimal.

Lemma 3.1

For every even \(n>0\) there is a planar point set \(S^*(n)\) of n points and \(m=ne^{\Omega ({\sqrt{\log n}})}\) halving lines such that for any two points of S(n), the difference of their x-coordinates is \(\Omega (n^{-1})\) and at most 1.

Proof of Lemma 3.1

Our construction is based on \(G_{i}(S_{i}, H_{i})\) from Lemma 2.3. Assume without loss of generality that \(i>10\). This will slightly simplify our calculations.

Claim

Consider the set \(S=S_{i}\) of \(n_i\) points from Lemma 2.3. Move each of its points horizontally by a distance at most \(n_i^{-9}\). Let \(S'\) be the resulting point set. If \(x, y\in S\) and \(xy\in H_i\) then \(x'\) and \(y'\), the corresponding points in \(S'\), determine a halving line of \(S'\).

Proof

Let \(s=pb\), \(p, b\in S_i\), \(s\in H_i\), and let \(q\in S_i\), \(q\ne p, b\). By Claim 2, \(q\not \in S_{2\alpha }(s)\) where \(2\alpha =2^{i+3}d^i_{i+1}=2^{-4i^2-6i}\). On the other hand \(|y(p)-y(b)|\ge 2^{-i}\). Move p, b, and q horizontally by at most \(n_i^{-9}\). The horizontal distance of the line of s and the point q changed by at most \(d=n_i^{-9}+2^{i+1}n_i^{-9}\). By inequality (2), \(n_i\ge 2^{i^2/2+i/2}\), therefore,

$$\begin{aligned}d= & {} n_i^{-9}+2^{i+1}n_i^{-9}\le 1/2^{9i^2/2+9i/2}+2^{i+1}/2^{9i^2/2+9i/2} \\= & {} 1/2^{9i^2/2+9i/2}+2^{i+1}/2^{9i^2/2+7i/2-1}< 2^{-4i^2-6i}=2\alpha . \end{aligned}$$

We used here that \(i>10\). Therefore, q remains on the same side of s after the perturbation of the points. This holds for any \(q\ne p, b\), therefore, s remains a halving line. \(\square \)

Suppose now that \(i>10\) is a fixed number. Let \(n=n_i\), \(m=m_i\), \(S=S_i\), and \(H=H_i\). Let \(p_1, \ldots , p_n\) be the points of S, \(p_j=(x_j, y_j)\). Then let \(p'_j=(x'_j, y_j)\), where

$$\begin{aligned} x'_j=\frac{\lfloor n^9x_j\rfloor }{n^9} + \frac{j}{n^{10}}. \end{aligned}$$

Let \(S'=\{p'_j\ |\ 1\le j\le n\}\) and let \(H'\) be the segments corresponding to the segments in H. Each point of S is moved horizontally by less than \(n^{-9}\), so, by Claim, the segments in \(H'\) are halving segments of \(S'\). Now apply a horizontal translation so that all points of \(S'\) have x-coordinates between 1 and 3. This is possible by Lemma 2.3 (c).

Let \(\delta >0\) be a very small number. Apply the transformation \((x, y)\longrightarrow (x, \delta ^2\cdot y)\) on \(S'\), call the resulting point set \(S''\). See Fig. 5. Clearly, halving edges remained halving edges. Since \(\delta \) is very small, all halving edges are very close to the x-axis and almost parallel to it. All points of \(S''\) have very small y-coordinates and their x-coordinates are between 1 and 3.

Fig. 5
figure 5

The points of \(S''\)

Let \(\Psi _{\alpha }\) denote the counterclockwise rotation about the origin by angle \(\alpha \) and let \(T_r\) denote the translation to the right by r. We have to introduce one more parameter, N. Let \(n^9\le N\le n^{10}\) be an arbitrary number.

Define the point sets \(S_+^{(k)}\) and \(S_-^{(k)}\), called positive blocks and negative blocks, respectively, as follows. For \(0\le k\le N\), let

$$\begin{aligned} S_+^{(k)}= \Psi _{2k\delta }\left( T_{k/n^9}(S'')\right) , \end{aligned}$$

and for \(0\le k\le N-1\), let

$$\begin{aligned} S_-^{(k)}= \Psi _{\pi +(2k+1)\delta }\left( T_{k/n^9}(S'')\right) . \end{aligned}$$

Let \(S^{\text{ union }}\) be their union, that is,

$$\begin{aligned} S^{\text{ union }}=\bigcup _{k=0}^{N}S_+^{(k)} \cup \bigcup _{k=0}^{N-1}S_-^{(k)}. \end{aligned}$$

See Fig. 6.

Finally, apply a scaling of factor \(n^9/(6N)\) to \(S^{\text{ union }}\) and let \(S^{*}\) be a point set obtained.

We claim that \(S^{*}\) satisfies the conditions. Recall that each block has m halving lines, \(n=n_i\) and \(m=m_i\) for some fixed i. The set \(S^{*}\) contains \(2N+1\) blocks, each contains n points. So \(|S^{*}|=n^{*}=2Nn+n\).

Observe, that a halving line of a block has the same number of other blocks on both sides, so it is a halving line of \(S^{*}\) as well. So, for the number of halving edges of \(S^{*}\),

$$\begin{aligned} m^{*}=(2N+1)m=(2N+1)n e^{\Omega ({\sqrt{\log n}})}=n^{*}e^{\Omega ({\sqrt{\log n^{*}}})} \end{aligned}$$

since \(N\le n^{10}\). This proves parts (a) and (b).

Fig. 6
figure 6

The construction of \(S^*\)

By the construction, the x-coordinates of the points of \(S''\) are between 1 and 3. Consequently, the x-coordinates of the points of a positive block \(S_+^{(k)}\) (resp. negative block \(S_-^{(k)}\)) are between 0 and \(3N/n^9\) (resp. \(-3N/n^9\) and 0). Therefore, the x-coordinates of the points of \(S^{\text{ union }}\) are between \(3N/n^9\) and \(-3N/n^9\). Finally, we can conclude that the x-coordinates of the points of \(S^{*}\) are between 1 / 2 and \(-1/2\).

Recall that \(p'_1, \ldots , p'_n\) are the points of \(S'\), \(p'_j=(x'_j, y_j)\), and for every j, \(x'_j={k}/{n^9} + {j}/{n^{10}}\) for some integer k. This remains true for \(S^{''}\) and still remains true if we apply a translation by \({l}/{n^9}\) for some integer l. If we apply now a rotation about the origin by a very small angle, the x-coordinates will change by a very small amount. So, we have the following statement: let \(q_1, \ldots , q_n\) be the points of a positive block \(S_+^{(k)}\), corresponding to the points \(p'_1, \ldots , p'_n\) of \(S'\). Then the x-coordinate \(x_j\) of \(q_j\) is very close to a number of the form \({k}/{n^9} + {l}/{n^{10}}\) for some kl integers. Analogous statement holds for the negative blocks. So, for any two points of \(S^{\text{ union }}\), the difference of their x-coordinates is least \(n^{-10}/2\). After scaling by a factor of \(n^9/(6N)\) we get the final set \(S^{*}\), so in \(S^{*}\), the difference of the x-coordinates of any two points is at least \({n}/({12N})=\Omega ((n^{*})^{-1})\). This proves Lemma 3.1 if \(n^{*}\), the number of points, is of the form \((2N+1)n\), where \(n=n_i\) for some i and \(n^9\le N\le n^{10}\). For other values we have to add some extra points as follows.

Observe, that for every \(i>10\), \((2n_i^{10}+1)n_i>(2n_{i+1}^9+1)n_{i+1}\). This means, that for any large enough even n (say, \(n>(2n_{10}^9+1)n_{10}\)), there is an \(i>10\) and an N, \(n_i^9\le N\le n_i^{10}\), such that \((2N+1)n_i\le n\le (2N+3)n_i\). So we can take our construction with parameters \(n_i\) and N, and add at most \(2n_i\) extra points so that the conditions are still satisfied. This concludes the proof of Lemma 3.1. \(\square \)

4 Third Construction

Proof of Theorem 1.1

Let \(S^{*}\) be the point set satisfying the conditions of Lemma 3.1. Let n be the number of its points and let m be the number of its halving lines. Let \(\varepsilon >0\) be a very small number.

Apply the transformation \((x, y)\longrightarrow (x+1/2, \varepsilon ^2\cdot y)\) on \(S^{*}\) from Lemma 3.1, and let R denote the resulting point set. The set R contains n points and \(m=ne^{\Omega ({\sqrt{\log n}})}\) halving lines. The x-coordinates of its points are between 1 and 2, the y-coordinates are extremely small, and the distance between any two points is \(\Omega (1/n)\).

For \(0\le k\le n\), let

$$\begin{aligned} R_k= \Psi _{2k\pi /(n+1)}(R) \end{aligned}$$

and let

$$\begin{aligned} P=\bigcup _{k=0}^{n}R_k. \end{aligned}$$

See Fig. 7.

The set P contains \(N=n(n+1)\) points. For every k, each halving line of \(R_k\) contains the same number of other blocks on both sides, so it is a halving line of P. Therefore, the number of halving lines of P, \(M=(n+1)ne^{\Omega ({\sqrt{\log n}})}=Ne^{\Omega ({\sqrt{\log N}})}\). The minimum distance among the points in P is \(\Omega (1/n)=\Omega (1/\sqrt{N})\) and the diameter of P is less than 4. This finishes the proof of Theorem 1.1, if the number of points, N, is of the form \(n(n+1)\) where n is even. If we want a construction with N even number of points where \(n(n+1)<N<(n+2)(n+3)\) for some n even, we take the construction with \(n(n+1)\) points and add \(N-n(n+1)<4n+6=O(N^{1/2})\) extra points so that the conditions are still satisfied. One possible way to do it is that we add the vertices of a regular \((N-n(n+1))\)-gon, inscribed in a circle of radius 3 about the origin, so that none of the extra points are on the (original) halving lines. This concludes the proof. \(\square \)

Fig. 7
figure 7

The point set P

Remark 4.1

The number of halving lines of P is \(\Omega \bigl (ne^{{\sqrt{(\log 2)/11 }\sqrt{\log n}}}/\sqrt{\log n}\bigr )\), while in the construction of Nivasch [9] it is \(\Omega \bigl (ne^{\sqrt{2 \log 2}\sqrt{\log n}}/\sqrt{\log n}\bigr )\).

Remark 4.2

The point set P is 4-dense, it can be proved by the same calculation as in [4]. We omit the details.

5 Construction in the Space

Proof of Theorem 1.2

Suppose first that \(d=3\). Let \(m>0\) even. By Lemma 3.1, there is a planar set S with the following properties.

  1. (a)

    The number of points \(|S|=m\),

  2. (b)

    the number of halving edges of S is \(me^{\Omega ({\sqrt{\log m}})}\),

  3. (c)

    for any two points of S, the difference of their x-coordinates is at most 1 and at least \(\Omega (m^{-1})\).

Let \(\varepsilon >0\) be a very small number. We set its value later. By an application of a suitable affine transformation (flattening) we can assume in addition that

  1. (d)

    each point of S has y-coordinate \(|y|< \varepsilon ^3\).

First, we define two planar sets of points, block A and block B. Block A contains two parts, the important part and the unimportant part. Both parts contain m points. The important part is a translated copy of S such that all points have x-coordinate \(1\le x\le 2\) and y-coordinate \(|y|<\varepsilon ^3\). Then all halving lines of S are very close to the x-axis. The unimportant part contains the points \(p_1, \ldots , p_{m/2}\) and \(q_1, \ldots , q_{m/2}\), where \(p_i=(-2+i/m, \varepsilon ^2)\), \(q_i=(-1.5+i/m, -\varepsilon ^2)\). If \(\varepsilon \) is small enough, then all halving lines of the important part will have \(p_1, \ldots , p_{m/2}\) on one side and \(q_1, \ldots , q_{m/2}\) on the other. Therefore, they are also halving lines of the whole block A. The origin \(O=(0,0)\) is called the center, the x-axis is called the axis and the xy plane is called the plane of block A.

Block B contains points \(r_1, \ldots , r_m\) and \(s_1, \ldots , s_m\) where \(r_i=(-2+i/m, \varepsilon )\), \(s_i=(1+i/m, -\varepsilon )\). Again \(O=(0,0)\) is called the center, the x-axis is called the axis and the xy plane is called the plane of block B. Note that B is symmetric about the origin.

Now take a maximal symmetric (about the origin) packing of discs, of spherical radii 1 / m, on the unit sphere, whose center is the origin. Let \(c_1, \ldots , c_k\), \(c'_1, \ldots , c'_k\) be their centers, \(c'_i\) is the reflection of \(c_i\). Since the packing was maximal, the discs of spherical radii 2 / m around \(c_1, \ldots , c_k\), \(c'_1, \ldots , c'_k\) cover the sphere. Therefore, \(k=\Theta (m^2)\). On the other hand, any two centers are at distance at least 1 / m (actually, almost 2 / m). Suppose for simplicity that k is even. Perturb the points \(c_i\) so that no three of them determine a plane through the origin and none of them is on the z-axis. Let \(\ell _1, \ldots , \ell _{k/2}\), be the lines through the origin and \(c_1, \ldots , c_{k/2}\), respectively, and let \(\ell '_1, \ldots , \ell '_{k/2}\) be the lines through the origin and \(c_{k/2+1}, \ldots , c_k\), respectively. For each line \(\ell _i\), \(1\le i\le k/2\), take a block A so that its center is the origin and its axis is \(\ell _i\). Its plane can be arbitrary through \(\ell _i\) that does not go through any other \(c_j\), \(j\ne i\). For each line \(\ell '_i\), \(1\le i\le k/2\), take a block B so that its center is the origin and its axis is \(\ell '_i\). Again, its plane can be arbitrary through \(\ell '_i\) that does not go through any other \(c_j\). Choose now the parameter \(\varepsilon >0\) to be a very small number. Finally slightly perturb the points so that they are in general position. We obtain the point set P. Now we have \(n=\Theta (m^3)\) points. The maximum distance is at most 4, the minimum is at least \(1/m=\Theta ({n^{-1/3}})\), so P is \(\gamma \)-dense for some \(\gamma \).

Let A be a block of type A, and B a block of type B. Take two points, uv, of the important part of block A that determine a halving line and a point w of block B. The plane \(\Pi \) determined by these three points is almost a halving plane of P. It halves any other block, since it goes almost through the origin, it also halves block A, by the choice of u and v, and since B is almost symmetric about the origin, the plane has one more points of B on one side than on the other. See Fig. 8. So, \(\Pi \) has one more or one less points of P above than below it. An easy calculation shows that we have \(k^2m^2e^{\Omega ({\sqrt{\log n}})}=n^2e^{\Omega ({\sqrt{\log n}})}\) such planes. We can assume without loss of generality that at least half of them have one less points of P above than below. Add the point (0, 0, 2) to P. It is still dense, and now it has \(n^2e^{\Omega ({\sqrt{\log n}})}\) halving planes.

Fig. 8
figure 8

Block B of type B and plane \(\Pi \)

This proves the result in three dimensions, if the number of points \(n=\Theta (m^3)\) for some even m and n is odd. In order to extend the result to all odd n, we have to add some extra points to the construction, in pairs, symmetric about the origin. We can do it so that it does not decrease the number of halving planes and the resulting set is still dense.

Suppose now that \(d>3\). The construction is analogous, we only sketch it. We use the same blocks, A and B as before. We take a maximal symmetric (about the origin) packing of \(d-1\)-dimensional discs, of spherical radii 1 / m, on the unit sphere, whose center is the origin.

Let \(c_1, \ldots , c_k\), \(c'_1, \ldots , c'_k\) be their centers, \(c'_i\) is the reflection of \(c_i\). Since the packing was maximal, \(k=\Theta (m^{d-1})\). Suppose that k is even. Let \(\ell _1, \ldots , \ell _{k/2}\), \(\ell '_1, \ldots , \ell '_{k/2}\) be the lines through the origin and \(c_1, \ldots , c_k\), respectively. For each line \(\ell _i\), \(1\le i\le k/2\), take a block A so that its center is the origin and its axis is \(\ell _i\). For each line \(\ell '_i\), \(1\le i\le k/2\), take a block B so that its center is the origin and its axis is \(\ell '_i\). Finally slightly perturb the points so that they are in general position. We obtain the point set P. Now we have \(n=\Theta (m^d)\) points. The maximum distance is at most 4, the minimum is at least \(1/m=\Theta ({n^{-1/d}})\), so P is \(\gamma \)-dense for some \(\gamma \).

Let A be a block of type A, and let \({\text{ B }}_1, {\text{ B }}_2, \ldots , {\text{ B }}_{d-2}\) be different blocks, each of type B. Take two points, u, v, of the important part of block A that determine a halving line and for \(1\le i\le d-2\), let \(w_i\in {\text{ B }}_{i}\). The hyperplane \(\Pi \) determined by these d points is almost a halving plane of P. It halves any other block, since it goes almost through the origin, it also halves block A, by the choice of u and v, and since \({\text{ B }}_{i}\) is almost symmetric about the origin, \(\Pi \) has one more points of \({\text{ B }}_{i}\) on one side than on the other. An easy calculation shows that we have \(n^{d-1}e^{\Omega ({\sqrt{\log n}})}\) such planes.

Let \(\text{ diff }(\Pi )\) be the number of points of P above \(\Pi \) minus the number of points below \(\Pi \). (“Above” and “below” are defined with respect to the d-th coordinate.) It follows, that \(|\text{ diff }(\Pi )|\le d-1\) and \(\text{ diff }(\Pi )-d\) is even. So, for some x, where \(|x|\le d-1\) and \(x-d\) is even, there are still \(n^{d-1}e^{\Omega ({\sqrt{\log n}})}\) such planes \(\Pi \) with \(\text{ diff }(\Pi )=x\). We can assume without loss of generality that \(x\le 0\). Add the points \((0, 0, \ldots , 0, 2+i/n)\), \(1\le i\le x\) to P. The resulting set is still dense and now it has \(n^2e^{\Omega ({\sqrt{\log n}})}\) halving planes.\(\square \)