1 Introduction

Let S be a set of points in the affine plane over the finite field of p elements, where p is a prime. A natural way of viewing points of the projective line is to consider the equivalence classes of the nonzero vectors of \({\mathbb {F}}_p^2\). We write \(u \sim v\) if u is a nonzero multiple of v and the equivalence class of u which we call the direction of u is denoted by d(u). We say that a pair of vectors \(w_1 \ne w_2 \in {\mathbb {F}}_p^2\) determines the direction d(u) if \(u \sim w_1-w_2\). Finally, we denote by D(S), the set of directions determined by the pair of points in S.

By elementary pigeonhole argument one can see that every direction is determined by any subset of \({\mathbb {F}}_p^2\) of cardinality at least \(p+1\). It was proved by Rédei that if S is of cardinality p, then either S is a line or S determines at least \(\frac{p+3}{2}\) directions, see [12]. The same result was independently proved by Dress et al. [3]. As a corollary of their argument they obtained a new proof for Burnside’s classical theorem on permutation groups of prime degree.

Another interesting and heavily related result is a paper of Lev [10], whose approach is more Fourier theoretic. Lev introduces an even more general version of directions and he gives a new proof using a kind of uncertainty relation settled in an earlier paper of Bíró and Lev [1].

The result of Megyesi and Rédei was generalised by Szőnyi [13], who proved that if \(|S|<p\) and S is not contained in a line, then \(|D(S)|\geqslant \frac{|S|+3}{2}\). Lovász and Schrijver [11] showed that if \(|D(S)|=\frac{|S|+3}{2}\) for some \(|S|=p\), then S is an affine transform of the graph of the function \(f(x)=x^{\frac{p+1}{2}}\). In [5] Gács proved that the |D(S)| cannot be between \(\frac{{p + 5}}{2}\) and \(2\frac{{p - 1}}{3}\) and showed that the upper bound obtained is one less than the smallest known example.

Another way of thinking of directions of p-element subsets of \({\mathbb {F}}_p^2\) is the following. We say that S is equidistributed in a direction if S intersects the lines having the corresponding fixed slope in the same amount of points. Equidistributivity is one of the key tools in investigating spectral sets of finite abelian groups, see [2, 7, 8]. One can also see that for sets \(|S|=p\) we have that S is equidistributed in the direction m if and only if \(m \not \in D(S)\). In general, equidistributivity of a set of a certain direction implies that \(p \mid |S|\). This motivates that we only study sets whose cardinality is a multiple of p in the remaining part of the paper.

The investigation of sets of cardinality larger than p was initiated by Ghidelli [6]. It was proved that a set of cardinality np (\(1 \leqslant n \leqslant p,~ n \in {\mathbb {Z}}\)) is either a set of parallel lines or is not equidistributed in at least \(\lceil \frac{p+n+2}{n+1}\rceil \) directions. From now on we call a direction special if S is not equidistributed in that direction. Note that Ghidelli’s definition of special direction is more general than this one and his results also handle sets whose cardinality is not divisible by p. For sets of cardinality divisible by p the two definitions of special directions coincide. It was asked by Ghidelli, whether the sets, which are not the union of a set of parallel lines, determine at least \(\frac{p+3}{2}\) special directions.

The main purpose of this paper is to construct an example to answer Ghidelli’s problem in the negative. We prove the following theorem.

Theorem 1.1

Up to an affine transformation, there is a unique set S of size \(\frac{p(p-1)}{2}\) in \({\mathbb {F}}_p^2\), which is equidistributed in \(p-2\) directions. Moreover, every set having exactly 3 special directions can be transformed by an affine transformation (elements of AGL(2, p)) to either S or \(S^c\), where \(S^c\) is the complement of S in \({\mathbb {F}}_p^2\).

This shows that for \(n=\frac{p-1}{2}\) the result of Ghidelli is tight. A natural question arises here. Is it possible to construct sets of cardinality np which have \(\lceil \frac{p+n+2}{n+1}\rceil \) special directions?

The paper is organised as follows. In Sect. 2 we describe sets having at most two special directions. Section 3 is devoted to the analysis of the proof of Ghidelli in order to understand the possible ways of describing examples for his problems. Then in Sect. 4 we describe sets having three special directions while in Sect. 6 we present some examples for sets having four special directions. Section 5 contains a reformulation of the problem. Finally, we raise some questions concerning the topic in Sect. 7.

2 Two special directions

From now on, let \({\mathbb {F}}_p^2\) be identified with the set of pairs of integers (ab), where \(a,b \in \{ 0,1, \ldots , p-1\}\). Let us assume that S is a subset of \({\mathbb {F}}_p^2\) of cardinality np which is equidistributed in at least \(p-1\) directions. It has been proved by Fallon et al. [4] that in this case S is the union of n parallel lines. This also means that a set having at most two special directions has at most one. The original proof is short but uses techniques from Fourier analysis. We present a combinatorial argument for the statement.

Let us assume that S is equidistributed along the lines \(l(x)=ax+b\), where \(a \in {\mathbb {F}}_p^*\), \(b \in {\mathbb {F}}_p\). We may assume that \((y,c) \in S\) and \((z,c) \not \in S\) for some \(c \in {\mathbb {F}}_p\) and \(y \ne z \in {\mathbb {F}}_p\). If there is no such pair, then S is the union of n vertical lines. We may assume \(c=0\) and \(z=0\) since \(D(S)=D(S+t)\), where \(t \in {\mathbb {F}}_p^2\). Let \(\ell _{\infty }^j= \{ (j,i) \mid i \in {\mathbb {F}}_p\}\) and \(\ell _0=\{(i,0) \mid i \in {\mathbb {F}}_p\}.\) Clearly, we can assume that S is equidistributed in every direction except maybe along \(\ell _{\infty }\) and \(\ell _0\).

Now we count the cardinality of S in three different ways. First, \(|S|=np\) since S is equidistributed in at least one direction. It is equal to the number of points contained on the lines containing \((0,0) \not \in S\). We obtain

$$\begin{aligned} np=n(p-1)+(a_0+b_0), \end{aligned}$$
(1)

where \(a_0=|S \cap \ell _0|\) and \(b_0=|S \cap \ell _{\infty }^0|\). This follows from the fact that besides the two exceptional lines \(\ell _0\) and \(\ell _{\infty }^0\) each lines containing (0, 0) contains exactly n elements of S, since S determines exactly \(p-1\) directions.

On the other hand we may count the number of elements contained in the lines going through \((y,0) \in S\).

$$\begin{aligned} np=1+ (n-1)(p-1)+(a_0-1)+(b_1-1), \end{aligned}$$
(2)

where \(b_1=|S \cap \ell _{\infty }^y|\). It follows from Eq. (1) that \(a_0+b_0=n\). In particular we get \(a_0 \leqslant n\). Equation (2) shows \(n+p=a_0+b_1\). Plainly, \(b_1 \leqslant p\) and we have seen \(a_0 \leqslant n\) so \(b_1 = p,a_0 = n\) and \(b_0=0\). This shows that \(\ell _{\infty }^y\) is contained in S. This holds for every \(y \in {\mathbb {F}}_p\) with \((y,0) \in S\). Since \(a_0=n\) we have n such y. We have found the np elements of S and hence S is the union of parallel (vertical) lines.

3 Ghidelli’s proof

In this section we follow Ghidelli’s proof to obtain some extra information about sets having few special directions.

Let \(S \subseteq {\mathbb {F}}_p^2\) be a nonempty set of cardinality np. We define the Rédei polynomial associated with S as

$$\begin{aligned} H_S(x,y)=\prod _{(a,b)\in S \subseteq {\mathbb {F}}_p^2} (x-ay+b). \end{aligned}$$

One of the main properties of \(H_S\) follows from the observation that

$$\begin{aligned} (x - ay + b) = (x - a'y + b') \Longleftrightarrow \frac{b-b'}{a - a'} = y. \end{aligned}$$

In other words, if \(y=m\) is fixed, then \(am - b=c\) for a given \(c\in {\mathbb {F}}_p\) holds for those points (ab) of \({\mathbb {F}}_p^2\) which are contained in a line whose slope is m. Therefore if we pick a set of representatives \(\{(a_i,b_i) \mid i=0,1,\ldots , p-1\}\) of the class of parallel lines of slope m (one point from each line), then \(\prod _{i=0}^{p-1} \left( x-a_im+b_i \right) =x^p-x\). It follows that if S is equidistributed in the direction m, then \(H_S(x,m)=(x^p-x)^n\).

We may write

$$\begin{aligned} H_S(x,y)=x^{|S|}+x^{np-1}g_1(y)+ x^{np-2}g_2(y)+ \ldots +g_{np}, \end{aligned}$$

where \(g_l \in {\mathbb {F}}_p[y]\) (\(l=1, \ldots , np\)). It is easy to see that \(g_l\) is of degree at most l and it is equal to the l-th elementary symmetric polynomialFootnote 1

$$\begin{aligned} g_l(y)=\sigma _l(a_1y-b_1,a_2y-b_2, \ldots , a_{np}y-b_{np}) \end{aligned}$$

of the polynomials \(a_iy-b_i\) (\(i=1, \dots , np\)).

Now assume that S is equidistributed in \(k\leqslant p-1\) directions. Then \(g_l(y)\) has at least k roots since the coefficients of \(x^{a}\) (\(a>(n-1)p+1\)) in the polynomial \((x^p-x)^n\) are 0. This happens for at least k different values of y. Then we have \(g_l\equiv 0\) if \(i<k\) since the number of its roots is larger than its degree. By Newton’s identities \(\sum _{i=1}^{np}(a_iy+b_i)^l=0\) if \(l<k\) and so as the leading coefficients of these polynomials \(\sum _{i=0}^{np}a_i^l\), these expressions should also be 0.

Let \(w_j\) be the number of indices i such that \(a_i=j\). Then

$$\begin{aligned} \sum _{i=0}^{np}a_i^l =\sum _{j=0}^{p-1}w_j j^l. \end{aligned}$$

This shows that the vector \(w=(w_j)_{j=0,1,\ldots , p-1}\) is orthogonal to \((j^l)_{j=0,1,\ldots , p-1}\) in \({\mathbb {F}}_p^p\) for \(l=1,\ldots , k-1\). Further \(w \in {\mathbb {F}}_p^p\) is orthogonal to \((1)_{j=0,1,\ldots , p-1}\) since |S| is divisible by p. Thus w is orthogonal to the first k rows of the Vandermonde matrix \(M_{j,l}=(j^l)\) (\(0 \leqslant j,l \leqslant p-1\) ).

It is not hard to see that the i-th and j-th rows of M are orthogonal in \({\mathbb {F}}_p^p\) except if \(i+j=p-1\). Thus we obtain that the orthogonal subspace for \(\langle 1,x,x^2, \ldots , x^{k-1} \rangle \) is \(\langle 1,x,x^2, \ldots , x^{p-1-k} \rangle \), i.e. \(\deg (w)\leqslant p-1-k\). As a corollary of this argument we obtain the following.

Proposition 3.1

Let w be the projection function associated with S defined above. Assume S has \(k \geqslant 2\) special directions (i.e. S has \(p+1-k\) equidistributed directions). Then w as a function from \({\mathbb {F}}_p\) to \({\mathbb {F}}_p\) can be expressed as a polynomial of degree at most \(k-2\).

As a corollary of this argument we obtain again that sets having exactly two special directions do not exist since the projections are constant functions (after deleting lines) so every direction is equidistributed or the set is the union of parallel lines. Both cases contradict the fact that the set has two special directions.

Assume now that we have a set S, which is equidistributed in \(p-2\) directions but it is not the union of lines. In this case \(a_i\) is a function that is either constant or linear. We may write it as \(\alpha i + \beta \).

The \(\alpha =0\) case is realised when S is the union of parallel lines.

In the case when \(a_i=\alpha i +\beta \) with \(\alpha \ne 0\), we obtain in particular that \(|S| = 0+1+\ldots + p-1=\frac{p(p-1)}{2}\) or \(|S| = 1+\ldots + p-1+p=\frac{p(p+1)}{2}\) since linear polynomials are permutation polynomials.

4 Sets with three special directions

Using the result of the previous section we present a natural construction that fulfils the required conditions to answer Ghidelli’s question in the negative. What is more, we prove that the sets (and their images of AGL(2, p)) described in this section are the ones having exactly three special directions. We emphasise the fact that we think of the coordinates as elements of \({\mathbb {Z}}\), which gives us the opportunity to compare them. However, the additive and multiplicative operations are understood (\(\bmod ~ p\)).

According to the observations in the previous section it seems reasonable to try to understand the properties of the following set:

$$\begin{aligned} S=\{(a,b) \in {\mathbb {F}}_p^2 \mid b<a \}. \end{aligned}$$

S has \(\frac{p(p-1)}{2}\) elements. (See also Fig. 1.)

Fig. 1
figure 1

Set S which has three special directions

Clearly, S is not equidistributed in at least three directions since the lines having equation \(ax+by=c\), where \((a,b,c) \in {\mathbb {F}}_p^3\) is either \((1,0,p-1)\), (0, 1, 0) or \((1,-1,1)\) intersects S in \(p-1>\frac{p-1}{2}\) elements.

Let L be a line containing the origin. We show that if the equation determining L is \(f_L(x)=ax\) with \( 2 \leqslant a \leqslant p-1\), then \(|L \cap S|=\frac{p-1}{2}\). Clearly, \((0,0) \not \in S\) and if \(i<ai\) for some \(i \in \{1, \ldots , p-1 \}\), then \(-i>a(-i)\) since \(a \ne 0\). Note also that \(i \ne ai\) since \(i \ne 0\) and \(a \ne 1\).

It remains to verify that if \(|S\cap (L+i)|=\frac{p-1}{2}\), then \(|S\cap (L+i+1)|=\frac{p-1}{2}\). Therefore, we show there is exactly one \(j \in \{ 0, \ldots , p-1\}\) such that \(f_L(j)+i >j\) and \(f_L(j)+i+1 < j\). This happens when \(f_L(j)+i=aj+i=p-1\) and \(j \ne 0\). Since \(a\ne 0\), if \(i = p-1\) we would get \(j =0\), which is excluded. If \(i \ne p-1\), then there is a unique \(j=\frac{p-1-i}{a}\) fulfilling the equation. Thus, there is a unique column, when the intersection of S with the line \(L+i\) increases by 1, when we replace the line \(L+i\) by \(L+i+1\).

On the other hand, if \(f_L(j)+i=j-1\) (\(j \ne 0 \)), then \((j,f_L(j)+i)\), which is an element of \(L+i\), is in S but \((j,f_L(j)+i+1) \not \in S\). The solution of the equation \(f_L(j)+i=aj+i=j-1\) is \(j=-\frac{i+1}{a-1}\). Note that \(a \ne 1\) so such a j exists.

The case \(j=0\) (\(i=p-1\)) can be handled similarly.

Theorem 4.1

Let T be a subset of \({\mathbb {F}}_p^2\) which is equidistributed in \(p-2\) directions. Then \(T=\alpha (S)\), if \(|T|=\frac{p(p-1)}{2}\) and \(T=\alpha '(S^c)\) if \(|T|=\frac{p(p+1)}{2}\) for some \(\alpha ,\alpha ' \in AGL(2,p)\), where \(S^c\) denotes the complement of S in \({\mathbb {F}}_p^2\).

Proof

We have seen that \(|T|=\frac{p(p-1)}{2} \text{ or } \frac{p(p+1)}{2}\). As the complement of a set of size \(\frac{p(p-1)}{2}\) is of size \(\frac{p(p+1)}{2}\) and vice-versa, it is enough to prove the statement for the case \(|T|=\frac{p(p-1)}{2}\).

Since PGL(2, p) acts triply transitively on the elements of the projective line we may assume that the three special directions are (1, 0), (0, 1), (1, 1). Moreover, it follows from the argument in Sect. 3 that the set of intersections of T with the horizontal lines is expressed by a linear function. Thus the set of the sizes of the intersections of S with the horizontal lines is \(\{0,1, \ldots , p-1 \}\) (since \(|T|=\frac{p(p-1)}{2}\)) and the same holds for the vertical lines. Moreover using a suitable affine transformations along the axis we may assume that the order can be chosen to be \((0,1, \ldots , p-1 )\) along the vertical and \(( p-1,p-2, \ldots , 1,0 )\) along the horizontal lines, respectively. Indeed the projection functions have to be linear functions (as it was shown in Sect. 3) with root at 0, hence we may apply suitable affine transformations (multiplication with fixed number in both direction) to get the corresponding sequences as required.

This shows that the first column does not contain any element of T and since its first line contains \(p-1\) elements we have \(\{(0,i ) \mid 0<i\leqslant p-1\} \subseteq T\). Using the same argument recursively one can prove that \(T=S\). \(\square \)

5 Weighted sum of lines

The number of special directions of the set S coincides with the number of non-Fourier roots of the characteristic function of S. This allows us to give a construction of sets with a given number of special directions. These sets are obtained as a linear combination of characteristic functions of lines (determining the special directions of the set) with rational coefficients. It is easy to see that if S is the weighted sum of lines of k directions, then S is equidistributed in every direction not determined by any line appearing in the sum.

One further aim is to present an alternative proof for the results of Sects. 2 and 4 using the following proposition. We say that a function \(f :{\mathbb {F}}_p^2 \rightarrow {\mathbb {C}}\) is equidistributed in a direction d if the sum of the values of f along the lines parallel to d is constant.

Proposition 5.1

Let \(f :{\mathbb {F}}_p^2 \rightarrow {\mathbb {Q}}\) be a function. Assume f is equidistributed in all but the following directions \(d_1, \ldots , d_k\) (\(k \geqslant 1\)). Then f can be written as the weighted sum of lines with rational weights:

$$\begin{aligned} f=\sum _{j=1}^k\sum _{i=0}^{p-1} c_{j,i} 1_{l_{j,i}}, \end{aligned}$$

where \(c_{j,i} \in {\mathbb {Q}}\) and \(l_{j,i}\) are lines determined by direction \(d_j\) and for every \(j\in \{1, \dots , k\}\) there is \(i\in \{0, \dots , p-1\}\) \(c_{j,i}\ne 0\).

Proof

We proceed by induction. Let \(w_1\) be a function defined on the \(\langle d_1 \rangle \)-cosets such that \(w_1\) takes the sum of the values of f for the elements on each \(\langle d_1 \rangle \)-coset. Let \(g_1(x)\) be a function of \({\mathbb {F}}_p^2\) defined as \(g_1(x)=\frac{w_1(C)}{p}\), where C is the \(\langle d_1 \rangle \)-coset containing x. Since f is not equidistributed in direction \(d_1\), function \(g_1(x)\) is not constant.

Clearly, \(f_1:=f-g_1\) is a function equidistributed in all but \(k-1\) directions. If \(k=1\), then \(f_1\) is equidistributed in every direction and the sums along every line is zero. Then we claim that \(f_1\) is zero. This can be seen from the fact that the Fourier transform of \(f_1\) vanishes on every character. Hence \(f=g_1\), so it is of the form \(\sum _{i=0}^{p-1} c_{1,i} 1_{l_{1,i}}\), where \(l_{1,i}\) are determined by direction \(d_1\) and \(c_{1,i'}\ne 0\) for some \(i'\in \{0,\dots , p-1\}\), since \(g_1\) is not constant.

For \(k\ne 1\) we get the statement for \(f=f_1+g\) by using the inductive hypothesis for \(f_1\).

\(\square \)

  • In particular we obtain the following explicit formula for the set discussed in the previous Sect. 4.

    Let \(\frac{c}{p}\) be the weight of lines defined by the equation \(x=c\) and \(\frac{-c}{p}\) the one of \(y=c\). Further let \(\frac{c}{p}\) be the weight of the vertical lines \(y=x+c\). Now if \(a<b\) we obtain that the sum of weight of these lines in this region is 1 and it is zero everywhere else.

  • As a corollary of Proposition 5.1 one can see that there is no subset of \({\mathbb {F}}_p^2\), which is not equidistributed in exactly 2 directions (see also Sect. 2). Similarly, one can also show the following Lam–Leung type result [9], which is formulated for \({\mathbb {F}}_p \times {\mathbb {F}}_q\), where p and q are different primes. Let S be a multiset, i.e., each value of the characteristic function of S is a nonnegative integer, and suppose that there are at most two special directions of S. Then S is a sum of weighted lines with nonnegative integer coefficients. The proofs of these results are analogous to the proof of Proposition 3.8 in [7].

6 Examples for four special directions

In this section we will try to find sets of smallest possible cardinality, having exactly four special directions. For small prime \(p\leqslant 11\) we construct such sets of minimal cardinality according to Ghidelli’s lower bound [6].

For a matrix \(M \in {\mathbb {R}}^{a \times b}\) let \(M^{(r)}\) denote the matrix defined by \(M^{(r)}(l,k)=M(l,k-r)\), where the indices in the second coordinate are taken modulo b. In particular for a row vector \(v\in {\mathbb {R}}^{1 \times \{0,1, \ldots , p-1 \}}\) and given \(i,j\in \{0,1, \ldots , p-1 \}\) let \(v^{(ij)}(1,k)=v(1, k-ij)\), where the product ij is taken mod p. Let \(\underline{1}\) denote the all 1 row vector and let \(e_i\) denote the vector which is 1 at its i-th coordinate and zero everywhere else. For a row vector v let \(L_j(v):=\sum _{i=0}^{p-2} \frac{p-i-1}{p} v^{(ij)}\)

Lemma 6.1

  1. 1.

    Let p be a prime and let \(v_j \in {\mathbb {R}}^{1 \times \{0,1, \ldots , p-1 \}}\) be a row vector whose first coordinate is 1 and \((j+1)\)-th coordinate is \(-1\) everywhere else. Then

    $$\begin{aligned} \frac{1}{p}\underline{1}+L_j(v_j):=\frac{1}{p}\underline{1} +\sum _{i=0}^{p-2} \frac{p-i-1}{p} v_j^{(ij)}=e_1. \end{aligned}$$
  2. 2.

    Let \(k \in {\mathbb {F}}_p \setminus \{0\}\) with \(k l \equiv j \pmod {p}\). Then

    $$\begin{aligned} \frac{l}{p}\underline{1} +L_k(v_j):=\frac{l}{p}\underline{1} +\sum _{i=0}^{p-2} \frac{p-i-1}{p} v_j^{(ik)}=\sum _{a=0}^{l-1}e_1^{(ak)}. \end{aligned}$$

Proof

  1. 1.

    Easy calculation gives the result.

  2. 2.

    It is easy to see that \(v_j=\sum _{a=0}^{l-1} v_k^{(ak)}\). The result follows from the fact that L is additive and \(L_k(v^{(m)})=L_k(v)^{(m)}\).

\(\square \)

The way we are going to use this lemma is the following. We construct \(\{\pm 1,0\}\) valued matrices whose row sums are all 0. The previous lemma will be used simultaneously for the rows of these matrices.

We fix a \(k \in {\mathbb {F}}_p \setminus \{0\}\) and we apply Lemma 6.1 (2). Lemma 6.1 treats \(\{\pm 1,0\}\) valued rows, which contain exactly one 1’s and \(-1\)’s but since \(L_k\) are linear operators we may apply it for some of these types of matrices. Now if we write a \(\{\pm 1,0\}\) valued row vector v, whose row sum is zero, as the sum of \(\{\pm 1,0\}\) valued row vectors (\(v=\sum _{a=1}^c u_a\)) where for each \(1 \leqslant a \leqslant c\), the vector \(u_a\) has exactly one 1 and \(-1\) entry, then \(L_k(v)= L_k(\sum _{a=1}^c u_a)\).

Now for each \(1 \leqslant a \leqslant c\) there is a \(k_a\) such that \(u_a=v_{i_a}^{(k_a)}\) for some \(1 \leqslant i_a-1,k_a \leqslant p-1\). Finally, let \(l_a k_a \equiv i_a \pmod {p}\) Then it follows from the previous conversation and Lemma 6.1 that \(L_k(u_a)\) will be a nonnegative integer valued vectors such that \(\underline{1}^tL_k(u_a)=\sum _{a=1}^c l_a\).

The four directions used in the remainder of the section are (1, 0), (0, 1), (1, 1), \((1,-1)\). We build up sets, which are not equidistributed in these directions only. It is clear that the sets presented in Fig. 2 can be constructed using weighted sums of lines in these directions.

Fig. 2
figure 2

Two triangular sets with non-equidistributed directions (0,1), (1,0), (1,1) and (0,1), (1,0), (1,-1), respectively

Now the difference of these two sets is also a weighted sum of suitable lines. This is presented in Fig. 3 and we denote it by \(M_{11}\).

Fig. 3
figure 3

\(M_{11}\)

Now let \(N_{11}=M_{11}+M_{11}^{(5)}+C_{11}\), where \(C_{11}\) is the matrix whose entries are all 0 except in the second and seventh columns which are constant 1 and the fifth and last columns, which are constant −1. An easy calculation shows that \(N_{11}\) is the following matrix.

Now we apply the operator \(L_{-2}\) simultaneously for the rows of \(N_{11}\). Note that this can be realised as the sum of lines of the chosen directions. One essential thing is that for those rows which contain more than one 1’s (and \(-1\)’s) we have to find a pairing of these elements, which is indicated with colours.

We obtain the following \(\{0,1\}\) matrix, which corresponds to the set we were looking for (Figs. 4, 5, 6).

Fig. 4
figure 4

The coloured pairs of 1’s and −1’s in \(N_{11}\) on the left, and the corresponding set given by the process on the right (Color figure online)

A similar algorithm gives us the following sets for \(p=5,7\) and 13.

Fig. 5
figure 5

Examples for sets of smallest cardinality that have four special directions for \(p=7\) (on the left) and \(p=5\) (on the right)

Note that if we fix the prime p and the number of special directions n, then Ghidelli’s result gives us a lower bound for the subsets of \({\mathbb {F}}_p^2\) having exactly k special directions. The previous examples for \(p=5,7,11\) meet this lower bound. However this is not the case for the next example \(p=13\), which seems to be optimal using this method.

The original method only gives us a multiset, where the sum of the weights is 65, which can easily be modified by subtracting \(\underline{1}\) from those lines which contain weight 2 as well and adding \(\underline{1}^t\) to those columns which are currently empty. This does not modify the sum of the values but makes the following matrix to a \(\{0,1 \}\)-matrix.

Fig. 6
figure 6

Example of 65-element set with four special directions in \({\mathbb {F}}_{13}^2\)

The question remains whether there exists \(4*13=52\)-element subset of \({\mathbb {F}}_{13}^2\) determining exactly four special directions.

7 Open problems

  1. 1.

    Is there a set in \({\mathbb {F}}_p^2\) that is equidistributed in exactly d directions for every \(d \leqslant p-2\)? We have seen that this is not the case for \(d=p-1\) since sets which are equidistributed in \(p-1\) directions are unions of parallel lines so these are equidistributed in p directions at least.

    It follows from the result of Rédei [12] that there is a gap in the possible number of special directions for subsets of \({\mathbb {F}}_p^2\) of cardinality p. Further, the result of Gács [5] shows that this is not a unique gap since sets of cardinality p determining more than \(\frac{p+3}{2}\) special directions determine at least \(\lfloor 2 \frac{p-1}{3}+1\rfloor \) special directions.

    However, it is not hard to see that for \(p=3,5,7\) there is no such a gap if the cardinality of the set is divisible by p.

  2. 2.

    What is the minimal size of a set in \({\mathbb {F}}_p^2\), which is equidistributed in at most k directions? In particular, is it true that Ghidelli’s bound is tight [6], i.e., is it possible to construct sets of cardinality np which have \(\lceil \frac{p+n+2}{n+1}\rceil \) special directions?

    Even for \(p=13\) this question is still open.