1 Introduction

Let \(\mathbb {F}_q\) be the finite field with q elements, and let C be a k-dimensional vectorial subspace of \(\mathbb {F}_q^n\), where \(n\in \mathbb {N}\). From now on, we will call C a [nk] linear code endowed with the Hamming metric, i.e. the distance between two codewords (elements of C) is given by the number of the coordinate positions in which the two elements differ.

For a codeword \(c\in C\), the support of c, denoted by \(\rm {Supp(c)}\), is the set of its nonzero coordinate positions, and the weight of c is \(\rm{wt}(c)=\#\rm {Supp(c)}\). A codeword c is said to be minimal if its support determines c up to a scalar multiplication, i.e. if \(c^\prime \in C\) is linear independent with c, then \({\hbox{Supp(c}^{\prime})}{\nsubseteq}{\hbox{Supp(c)}}\). Minimal codewords were employed by Massey (see [10, 11]) for the construction of a perfect and ideal SSS, in which the access structure is determined by the set of the minimal codewords of a linear code.

Unfortunately, the determination of the set of minimal codewords of a given code is a difficult task. Therefore, obtaining the access structure of Massey’s SSS is very challenging. This fact led to the study of codes for which every non-zero codeword is minimal, that are called minimal codes.

A useful tool to construct minimal codes was given by Ashikhmin and Barg (see [2]).

Lemma 1

Let \(\mathcal {C}\)be a linear code over \(\mathbb {F}_q\), and denote by \(\rm{wt}_{min}\) and \(\rm{wt}_{max}\) the minimum and maximum nonzero weights in \(\mathcal {C}\), respectively. If \(\frac{\rm{wt}_{min}}{\rm{wt}_{max}} > \frac{q-1}{q}\) (called the \(\rm {AB}\)condition from now on), then C is minimal.

Since the study of minimal codes has attracted much attention in recent years, many families of minimal linear codes satisfying \(\rm {AB}\) have been constructed, e.g. see [5].

However, \(\rm {AB}\) is only a sufficient condition and, for this reason, a relative new research line consists in finding examples of minimal codes violating \(\rm {AB}\). Families of these codes were first constructed in [7], whereas [6, 8] give the first infinite family of minimal codes for the binary and ternary case, respectively. Afterwards, in [3] the first examples of minimal linear codes for every field of odd characteristic were constructed.

Following the geometrical approach of [3], in [4] it was proved that it is possible to construct families of minimal codes through the study of cutting blocking sets.

Recently, in [1, 13] the authors found out independently that cutting blocking sets not only determine minimal codes, but they are actually in bijection with them.

Therefore, minimal codes and algebraic varieties over finite fields are very related objects. In this note we investigate families of minimal codes arising from celebrated objects in finite geometry, i.e. Hermitian varieties and quadrics, giving some information about their weight distribution.

2 Preliminaries

2.1 Blocking sets

Hereafter, we will denote with \(\mathbb {F}_q\) the finite field with q elements, where \(q=p^h\) is a prime power, and with \(\rm {PG}(n,q)\) the projective space of dimension \(n\in \mathbb {N}\) over \(\mathbb {F}_q\). A subspace of dimension r in \(\rm {PG}(n,q)\) is denoted by \(\varPi _r\). For a set of homogeneous polynomials \(f_1,\ldots ,f_r\in \mathbb {F}_q[X_0,\ldots ,X_n]\), \(V_p(f_1,\ldots ,f_r)\) is the projective variety associated to \(f_1,\ldots ,f_r\). With \(\varPi _r V_p(f_1,\ldots ,f_r)\) we denote a cone in \(\rm {PG}(n,q)\) having vertex \(\varPi _r\) and base \(V_p(f_1,\ldots ,f_r)\), i.e. \(\varPi _r V_p(f_1,\ldots ,f_r)\) is the join of \(\varPi _r\) to \(V_p(f_1,\ldots ,f_r)\).

In the following, we recall some useful basic definitions on blocking sets; for an exhaustive reference we point to [12, Chapter 3].

Definition 1

A k-blocking set is a subset of \(\rm {PG}(n,q)\) intersecting all \((n-k)\)-dimensional subspaces. When \(k=1\), it is simply called a blocking set.

The dimension of a k-blocking set corresponds to the dimension of the subspace generated by its elements.

A (k, s)-blocking set in \(\rm {\rm {PG}}(n,q)\), where \(n>k\), is a k-blocking set that does not contain a s-dimensional subspace.

As we already mentioned, in order to construct minimal linear codes as in [4] we need to introduce a particular class of blocking set.

Definition 2

A k-blocking set in \(\rm {\rm {PG}}(n,q)\) is cutting if its intersection with every \((n-k)\)-dimensional subspace is not contained in any other \((n-k)\)-dimensional subspace.

2.2 Minimal codes from cutting blocking sets

For every homogeneous function \(f:\mathbb {F}_q^{n+1}\rightarrow \mathbb {F}_q\), let \(\widetilde{\mathcal {C}}_f\) be the linear code defined as

$$\begin{aligned} \widetilde{\mathcal {C}}_f {:}{=}\{c_{u,v}=(uf(x)+v\cdot x)_{x \in \rm {PG}(n,q)} \ \mid u\in \mathbb {F}_q\,, v \in \mathbb {F}_q^{n+1}\}. \end{aligned}$$
(1)

Here we write a point of \(\rm {PG}(n,q)\) in standard notation, i.e. the first nonzero coordinate from the left is 1. The resulting code does not depend on this choice.

Remark 1

If f is non-linear, then \(\widetilde{\mathcal {C}}_f\) is a \([(q^{n+1}-1)/(q-1),n+2]\) code and a generator matrix is obtained by extending the generator matrix of a simplex code by a line from the evaluation of the homogeneous function f.

In particular, for any \(v\in (\mathbb {F}_q^{n+1})^*\), \(\rm{wt}(c(0,v))=(q^{n+1}-q^{n})/(q-1)\), whereas for any \(u\in \mathbb {F}_q^*\) \(\rm{wt}(c(u,0))=(q^{n+1}-1)/(q-1)-\#V_p(f)\) .

The following result gives a sufficient condition to construct minimal codes (see [4] for details).

Theorem 1

Let \(f:\mathbb {F}_q^{n+1}\rightarrow \mathbb {F}_q\)be a homogeneous function such that:

  1. (a)

    \(V_p(f)\) is a n-dimensional cutting \((1,n-1)\)-blocking set in \(\rm {PG}(n,q)\),

  2. (b)

    for every \(v\in \mathbb {F}_q^{n+1}\setminus \{0\}\), there exists \(x\in \mathbb {F}_q^{n+1}\) such that \(f(x) + v\cdot x= 0\) and \(x\not \in V_p(f)\),

then \(\widetilde{\mathcal {C}}_f\) defined as in (1) is a \([(q^{n+1}-1)/(q-1),n+2]\) minimal code over \(\mathbb {F}_q\).

Depending on the variety \(V_p(f)\), the code \(\widetilde{\mathcal {C}}_f\) may not satisfy the \(\rm {AB}\) condition.

Lemma 2

[4, Lemma 4.9] If \(\#V_p(f)\ge \frac{2q^{n}-q^{n-1}-1}{q-1}\), then the code \(\widetilde{\mathcal {C}}_f\) as in (1) does not satisfy the \(\rm {AB}\) condition.

Our aim is to show that properties (a) and (b) of Theorem 1 hold in the case of Hermitian varieties and quadrics.

3 Minimal codes from Hermitian varieties

Our notations and terminologies are standard, see [9]. Let \(f_r\), \(r\in \lbrace 1,\ldots ,n\rbrace \), be a canonical Hermitian form in \(\mathbb {F}_{q^2}[X_0,X_1,\ldots ,X_n]\), i.e.

$$\begin{aligned} f_r=X_0^{q+1}+\cdots +X_r^{q+1}. \end{aligned}$$
(2)

The variety \(V_p(f_r)\) is a Hermitian variety in \(\rm {\rm {PG}}(n,q^2)\). If \(r=n\), the Hermitian variety \(V_p(f_n)\) is non-singular and it is denoted by \(\mathcal {H}_n\).

The following result is a corollary of [9, Lemma 2.20] and gives information about the intersections of \(\mathcal {H}_n\) with hyperplanes.

Proposition 1

The intersection between\(\mathcal {H}_n\) and an hyperplane of \({\rm PG}(n,q^2)\) is either a non-singular Hermitian variety \(\mathcal {H}_{n-1}\) or a cone \(\varPi _0 \mathcal {H}_{n-2}\).

Proposition 2

[9, Lemma 2.18] The dimension of a subspace of maximum dimension lying on \({\mathcal H}_n\) equals \(\lfloor (n-1)/2\rfloor \).

Propositions 1 and 2 allow to prove that Theorem 1 can be applied to non-singular Hermitian varieties.

Proposition 3

Condition (a) of Theorem 1holds for non-singular Hermitian varieties.

Proof

We show that \(\mathcal {H}_n\) is an n-dimensional \((1,n-1)\) cutting blocking set of \(\rm {\rm {PG}}(n,q)\). First, by Proposition 1, \(\mathcal {H}_n\) is an n-dimensional blocking set. Moreover \(\mathcal {H}_n\) cannot contain a hyperplane (see Proposition 2), and hence it is a \((1,n-1)\) blocking set. Finally, since by Proposition 1 the intersection of \(\mathcal {H}_n\) with any hyperplane cannot be contained in a space of dimension \(n-2\), the claim follows. \(\square \)

Proposition 4

Let \(\mathcal {H}_n=V_p(f)\) be a non-singular Hermitian variety in canonical form. Then Condition (b) of Theorem 1holds.

Proof

Let \(v=(v_0,\ldots ,v_n)\in \mathbb {F}_{q^2}^{n+1}\setminus \{0\}\) and let \(i\in \{0,\ldots ,n\}\) such that \(v_i\ne 0\). If \(x\in \mathbb {F}_{q^2}^{n+1}\) is such that \(x_j=0\) for \(j\ne i\) and \(x_i=-v_i^q\), then \(f(x)+v\cdot x=0\) and \(f(x)=v_1^{q+1}\ne 0\). \(\square \)

By Propositions 3 and 4, Theorem 1 applies to \(f=X_0^{q+1}+\ldots +X_n^{q+1}\) and \(\widetilde{\mathcal {C}}_f\) is a \([(q^{2n}-1)/(q^2-1),n+2]\) minimal code over \(\mathbb {F}_{q^2}\).

Remark 2

Since the number of points of a non-singular projective Hermitian variety of dimension n is

$$\begin{aligned} \mathcal {P}(\mathcal {H}_n)=\frac{[q^{n+1}+(-1)^n][q^n-(-1)^n]}{q^2-1}, \end{aligned}$$

Lemma 2 implies that \(\widetilde{\mathcal {C}}_f\) does not satisfy the \(\rm {AB}\) condition.

4 On the weight distribution of minimal codes from \(\mathcal {H}_n\)

In this section, \(\mathcal {A}(\mathcal {H}_n)=\mathcal {P}(\mathcal {H}_n)-\mathcal {P}(\mathcal {H}_{n-1})\) denotes the number of affine points of a non-singular Hermitian variety of \(\rm{PG}(n,q^2)\) and \(\square _q^*\) is the set of nonzero squares of \(\mathbb {F}_q\). We collect here the weight of some codewords, as a first approach to the weight distribution problem. The next proposition is from Remark 1.

Proposition 5

For every \(v\in \mathbb {F}_{q^2}^{n+1}\) and \(u\in \mathbb {F}_{q^2}\), the weights of \(c_{0,v}\) and \(c_{u,0}\) are \(\rm{wt}(c_{0,v})=\frac{q^{2(n+1)}-q^{2n}}{q^2-1},\) and \(\rm{wt}(c_{u,0})=\frac{q^{2(n+1)}-1}{q^2-1}-\mathcal {P}(\mathcal {H}_n),\) respectively.

Proposition 6

For every \(u\in \mathbb {F}_{q^2}^*\), let \(v_u=(-u,0,\ldots ,0)\in \mathbb {F}_{q^2}^{n+1}\). The weight of \(c_{u,v_u}\) is

$$\rm{wt}(c_{u,v_u})=\frac{q^{2(n+1)}-1}{q^2-1}-\left( q^2\mathcal {P}(\mathcal {H}_{n-1})+1\right) .$$

Proof

Let \(A_n\) be the number of \((x_0,\ldots ,x_{n})\in \mathbb {F}_{q^2}^{n+1}\) such that the first non-zero coordinate is 1 and \(u(x_0^{q+1}+\cdots +x_{n}^{q+1})-ux_0=0\). Then clearly \(\rm{wt}(c_{u,v_u})=\frac{q^{2(n+1)}-1}{q^2-1}-A_n\). Also, \(A_n=B_n+C_n\) where \(B_n\) is the number of solutions \((1,x_1,\ldots ,x_{n})\in \mathbb {F}_{q^2}^{n+1}\) of \(x_1^{q+1}+\cdots +x_{n}^{q+1}=0\) and \(C_n\) is the number of solutions \((0,x_1,\ldots ,x_{n})\in \mathbb {F}_{q^2}^{n+1}\) of \(x_1^{q+1}+\cdots +x_{n}^{q+1}=0\) such that the first non-zero coordinate equals 1. It is readily seen that \(B_n=(q^2-1)\mathcal {P}(\mathcal {H}_{n-1})+1,\) and \(C_n= \mathcal {P}(\mathcal {H}_{n-1}),\) whence the claim follows. \(\square \)

Proposition 7

For every a in \(\mathbb {F}_{q^2}\setminus \mathbb {F}_q\),the weight of \(c_{1,a e_1}\), where \(e_1\) is the first vector of the canonical basis of \(\mathbb {F}_{q^2}^{n+1}\), is

$$\rm{wt}(c_{1,ae_1})=\frac{q^{2(n+1)}-1}{q^2-1}-\mathcal {P}(\mathcal {H}_{n-1})$$

Proof

Let \(\tilde{A}_n\) be the number of solutions of \(x_0^{q+1}+\cdots +x_n^{q+1}+ax_0=0\) such that the first nonzero coordinate equals 1. Then \(\rm{wt}(c_{1,a e_1})=\frac{q^{2(n+1)}-1}{q^2-1}-\tilde{A}_n\) and \(\tilde{A}_n=\tilde{B}_n+\tilde{C}_n\), where \(\tilde{B}_n\) is the number of solutions \((1,x_1,\ldots ,x_{n})\in \mathbb {F}_{q^2}^{n+1}\) of \(x_1^{q+1}+\cdots +x_{n}^{q+1}+a+1=0\) and \(\tilde{C}_n\) is the number of solutions \((0,x_1,\ldots ,x_{n})\in \mathbb {F}_{q^2}^{n+1}\) of \(x_1^{q+1}+\cdots +x_{n}^{q+1}=0\) such that the first non-zero coordinate equals 1. Now, \(a\notin \mathbb {F}_q\) yields \(\tilde{B}_n=0\). On the other hand, \(\tilde{C}_n=\mathcal {P}(\mathcal {H}_{n-1})\) and the claim follows. \(\square \)

Lemma 3

Let q be odd. Then the number of \((n+1)\)-tuples \((x_0,\ldots ,x_n)\) such that \(x_0^{q+1}+\cdots +x_n^{q+1}+x_i=0\) and such that the first nonzero coordinate equals 1 and at most the i-th coordinate is nonzero, is

$$\begin{aligned} \begin{aligned} E_{i}=&[ (q^2-1)\cdot \mathcal {P}(\mathcal {H}_{n-i-1})+1]\cdot \left( \sum _{j=0}^i \tilde{E}_j\right) +\\&+\left[ q\cdot \frac{q^{2i}-1}{q^2-1}+1-\left( \sum _{j=0}^i \tilde{E}_j\right) \right] \cdot \mathcal {A}(\mathcal {H}_{n-i}); \end{aligned} \end{aligned}$$
(3)

where \(\tilde{E}_j\) is given by

$$\begin{aligned} {\left\{ \begin{array}{ll} 1 \text\,{ if }\, q \equiv 0 \pmod {3};\\ 2 \text\,{ if } \,q \equiv 1 \pmod {3};\\ 0 \text\,{ if }\, q \equiv 2 \pmod {3};\\ \end{array}\right. } \end{aligned}$$

if \(j=1\), and by

$$\begin{aligned} {\left\{ \begin{array}{ll} \mathcal {P}(\mathcal {H}_{j-2})\cdot (q^2-1)+1+2\cdot \frac{q-1}{2}\mathcal {A}(\mathcal {H}_{j-1}) \text{ if } q \equiv 0 \pmod {3};\\ \mathcal {A}(\mathcal {H}_{j-1})+2\cdot q\cdot \mathcal {A}(\mathcal {H}_{j-1}) \text{ if } q \equiv 2 \pmod {3};\\ (q-2)\mathcal {A}(\mathcal {H}_{j-1})+2(q^2-1)\mathcal {P}(\mathcal {H}_{j-2})+2 \text{ if } q \equiv 1 \pmod {3}.\\ \end{array}\right. } \end{aligned}$$

for \(j\ge 2\).

Proof

Write \(x_0^{q+1}+\cdots +x_n^{q+1}+x_i=X+Y\), where \(X=x_0^{q+1}+\cdots +x_i^{q+1}+x_i\) and \(Y=x_{i+1}^{q+1}+\cdots +x_n^{q+1}\). For an \((n+1)\)-tuple satisfying \(X+Y=0\), either \(X=0\) and \(Y=0\) or \(X\ne 0\). In both cases \(X=-Y\in \mathbb {F}_q\). Let \(\tilde{E}_j\), \(j\ge 1\), be the number of \((j+1)\)-tuples \((1, x_1,\ldots , x_j)\in \,\mathbb {F}_{q^2}^{j+1}\) such that \(x_1^{q+1}+\cdots +x_j^{q+1}+x_j+1=0\). Then \(X=0\) has \(\sum _{j=1}^i\tilde{E}_j\) solutions, while \(Y=0\) has \((q^2-1)\cdot \mathcal {P}(\mathcal {H}_{n-i-1})+1\) solutions. On the other hand, the number of \((i+1)\)-tuple \((x_0,\ldots , x_i)\) such that the first non-zero coordinate has value 1 and \(X\in \mathbb {F}_q\) is \(q\cdot \frac{q^{2i}-1}{q^2-1}+1\). Hence the case \(X\ne 0\) and \(X+Y=0\) occurs in \(\left[ q\cdot \frac{q^{2i}-1}{q^2-1}+1-\left( \sum _{j=0}^i \tilde{E}_j\right) \right] \cdot \mathcal {A}(\mathcal {H}_{n-i})\) cases.

To compute \(\tilde{E}_j\) observe that if \(x_1^{q+1}+\cdots +x_j^{q+1}+x_j+1=0\), then \(x_j\in \mathbb {F}_q\). If \(j=1\) then \(x_1^{q+1}+\cdots +x_j^{q+1}+x_j+1=0\) reads \(x_1^2+x_1+1=0\), which has one solution if \(p=3\), and two solutions if \(-3\in \square _q^*\), i.e. if \(q\equiv 1 \pmod {3}\); zero otherwise. Let \(j\ge 2\). Then \(x_1^{q+1}+\cdots +x_j^{q+1}+x_j+1=0\) reads \(x_1^{q+1}+\cdots +x_{j-1}^{q+1}+x_j^{2}+x_j+1=0\). For any choice of \(x_1,\ldots ,x_{j-1}\), let \(c=x_1^{q+1}+\cdots +x_{j-1}^{q+1}+1\). If \(c=1/4\) then the equation \(x_j^2+x_j+c=0\) has one solution in \(x_j\), whereas if \(1-4c\in \square _q^*\), there are two solutions in \(x_j\). The value \(c=1/4\) is reached when

$$\begin{aligned} x_1^{q+1}+\cdots +x_{j-1}^{q+1}+1=1/4. \end{aligned}$$

If \(p\ne 3\), this happens \(\mathcal {A}(\mathcal {H}_{j-1})\) times, whereas, if \(p= 3\) it occurs \([(q^2-1)\cdot \mathcal {P}(\mathcal {H}_{j-2})+1]\) times.

Assume now \(1-4c\in \square _q^*\). Then there exists \(w\in \mathbb {F}_q^*\) such that

$$\begin{aligned} 1-4(x_1^{q+1}+\cdots +x_{j-1}^{q+1}+1)=w^2. \end{aligned}$$
(4)

If \(w^2=-3\), (4) reads \(x_1^{q+1}+\cdots +x_{j-1}^{q+1}=0\), which yields \((q^2-1)\cdot \mathcal {P}(\mathcal {H}_{j-2})+1\) choices for \((x_1,\ldots ,x_{j-1})\). In the other case, that is \(w^2\ne -3\), there are \(\mathcal {A}(\mathcal {H}_{j-1})\) choices.

Since there are \(\frac{q-1}{2}\) nonzero squares in \(\mathbb {F}_q\) and \(-3\notin \square _q^*\) if and only if \(q\equiv 2 \pmod {3}\), the claim follows. \(\square \)

Proposition 8

Let qbe odd. Then the weight of \(c_{1,e_i}\), where \(e_i\) is the i-th vector of the standard basis of \(\mathbb {F}_{q^2}^{n+1}\), is

$$\begin{aligned} \rm{wt}(c_{1,e_i})=\frac{q^{2(n+1)}-1}{q^2-1}-(E_{i}+ \mathcal {P}(\mathcal {H}_{n-i-1})), \end{aligned}$$

where \(E_{i}\)is given by (3).

Proof

Since the number of solutions of the equation \(x_0^{q+1}+\cdots +x_i^{q+1}+x_i+1+x_{i+1}^{q+1}+\cdots +x_n^{q+1}=0\) such that their first non-zero component is at least the \((i+1)\)-th one is \(\mathcal {P}(\mathcal {H}_{n-i-1})\), the claim follows from Lemma 3. \(\square \)

5 Minimal codes from quadrics

For a quadratic form \(f\in \mathbb {F}_q[X_0,\ldots , X_n],\) with \(f=\sum _{i=0}^n a_i X_i^2+\sum _{i<j} a_{i,j} X_i X_j\), the associated variety \(V_p(f)\) is a quadric in \(\rm {\rm {PG}}(n,q)\). If f is non-degenerate, i.e. f cannot be reduced by a linear transformation to a quadratic form in less variables, \(V_p(f)\) is a non-singular quadric and it is denoted by \(\mathcal {Q}_n\). Up to projective equivalence there are one or two distinct non-singular quadrics according to n being even or odd; see [9, Chapter 1].

Proposition 9

  • If n is even a non-singular quadric \(\mathcal {Q}_n\) is projectively equivalent to a non-singular quadric \(\mathcal {P}_n\), called parabolic, where

    $$\begin{aligned} \mathcal {P}_n=V_p(X_0^2 + X_1 X_2 + \cdots + X_{n-1} X_n). \end{aligned}$$

  • If n is odd a non-singular quadric \(\mathcal {Q}_n\) is either projectively equivalent to a non-singular quadric \(\mathcal {E}_n\), called elliptic, or to a non-singular quadric \(\mathcal {H}_n\), called hyperbolic, where

    $$\begin{aligned} \mathcal {E}_n=V_p(g(X_0,X_1) + X_2 X_3 + \cdots + X_{n-1} X_n); \end{aligned}$$

    with \(g(X_0,X_1)=dX_0^2+X_0X_1+X_1^2\), irreducible over \(\mathbb {F}_q\), \(d \in \mathbb {F}_q^*\), and

    $$\begin{aligned} \mathcal {H}_n=V_p(X_0 X_1 + X_2 X_3 + \cdots + X_{n-1} X_n). \end{aligned}$$

The quadrics \(\mathcal {P}_n\), \(\mathcal {E}_n\) and \(\mathcal {H}_n\) as in Proposition 9 are said to be in canonical forms. We say that two non-singular quadrics have the same character if they are both parabolic (character 1), both hyperbolic (character 2) or both elliptic (character 0).

Proposition 10

Let \(n\ge 3\). The intersection of a non-singular quadric \(\mathcal {Q}_n\) with an hyperplane is either a non-singular quadric \(\mathcal {Q}_{n-1}\) of \(\rm {\rm {PG}}(n-1,q)\) or a cone \(\varPi _0 \mathcal {Q}_{n-2}\), where \(\mathcal {Q}_n\) and \(\mathcal {Q}_{n-2}\) have the same character.

Proposition 11

The maximum dimension of a subspace on a non-singular quadric \(\mathcal {Q}_n\)is either \(\frac{1}{2}(n-2)\), \(\frac{1}{2}(n-1)\), or \(\frac{1}{2}(n-3)\) according to \(\mathcal {Q}_n\)being respectively parabolic, hyperbolic or elliptic.

This results allow us to prove properties (a) and (b) of Theorem 1 hold for non-singular quadrics in canonical form.

Proposition 12

Let \(n\ge 3\).Then condition (a) of Theorem 1holds for non-singular quadrics of \(\rm {\rm {PG}}(n,q)\).

Proof

By Proposition 10, a non-singular quadric is a blocking set of \(\rm {PG}(n,q)\). Moreover, by Proposition 11, \(\mathcal {Q}_n\) cannot contain an hyperplane, whence it is a \((1,n-1)\)-blocking set. Finally, since the intersection of \(\mathcal {Q}_n\) with an hyperplane cannot be contained in a space of dimension \(n-2\) (see Proposition 10), the blocking set is also cutting. \(\square \)

Proposition 13

Let \(\mathcal {Q}_n=V_p(f)\)be a non-singular quadric in canonical form. Then Condition (b) of Theorem 1 holds.

Proof

Let \(v=(v_0,\ldots ,v_n)\in \mathbb {F}_q^{n+1}\setminus \{0\}\). We prove the claim separately for elliptic, parabolic and hyperbolic quadrics.

  1. (1)

    If the quadric is elliptic then \(n\ge 3\) and (up to projectivities) \(f(x)+v\cdot x\) reads \(g(x_0,x_1)+ \sum _{i=1}^{\frac{n-1}{2}}x_{2i}x_{2i+1}+\sum _{i=0}^nv_ix_i,\) where \(g(X_0,X_1)=dX_0^2+X_0X_1+X_1^2\) is an irreducible polynomial and \(d \in \mathbb {F}_q^*\). First, assume \(v_i=0\) for every \(i=2,\ldots ,n\). Then either \(v_0\ne 0\) or \(v_1\ne 0\). Assuming without loss of generalities \(v_0\ne 0\), then \(\bar{x}=(1,0,1,-v_0-g(1,0),0,\ldots ,0)\) satisfies \(f(\bar{x})=-v_0\ne 0\) and \(f(\bar{x})+v\cdot \bar{x}=0\). Assume now there exists \(i\in \{2,\ldots ,n\}\) such that \(v_i\ne 0\). Then, \(\bar{x}\) such that

    $$ \bar{x}_{j} = \left\{ {\begin{array}{*{20}l} 1 \hfill & {{\text{if}}\,j = 1,} \hfill \\ { - \frac{{v_{1} + g(0,1)}}{{v_{i} }}} \hfill & {{\text{if }}j = i,} \hfill \\ 0 \hfill & {{\text{otherwise,}}} \hfill \\ \end{array} } \right. $$

    satisfies \(f(\bar{x})=g(0,1)=1\ne 0\) and \(f(\bar{x})+v\cdot \bar{x}=0\).

  2. (2)

    If the quadric is parabolic then \(f(x)+v\cdot x\) reads \(x_0^2+\sum _{i=1}^{\frac{n}{2}}x_{2i-1} x_{2i}+\sum _{i=0}^nv_ix_i.\) First, assume \(v_i=0\) for every \(i=1,\ldots ,n\). Then \(v_0\ne 0 \) and \(\bar{x}=(-v_0,0,\ldots ,0)\) satisfies \(f(\bar{x})\ne 0\) and \(f(\bar{x})+v\cdot \bar{x}=0\). Assume now there exists \(i\in \{1\ldots ,n\}\) such that \(v_i\ne 0\). In this case if \(\bar{x}\) is defined by \(\bar{x}_0=1\), \(\bar{x}_i=-\frac{1}{v_i}\) and \(\bar{x}_j=0\) for \(j\ne 0,i\), then \(\bar{x}\) satisfies \(f(\bar{x})\ne 0\) and \(f(\bar{x})+v\cdot \bar{x}=0\).

  3. (3)

    If the quadric is hyperbolic then \(f(x)+v\cdot x\) reads \(\sum _{i=0}^{\frac{n-1}{2}}x_{2i} x_{2i+1}+\sum _{i=0}^nv_ix_i.\) Assume \(v_i\ne 0\), \(i\in \{0,\ldots ,n\}\), and let \(\bar{j}\in \{0,\ldots ,\frac{n-1}{2}\}\) such that \(2\bar{j},2\bar{j}+1\ne i\). Then \(\bar{x}\) such that

    $$ \bar{x}_{j} = \left\{ {\begin{array}{*{20}l} 1 \hfill & {{\text{if }}j = \overline{{2j}} {\text{ or }}j = 2\bar{j} + 1,} \hfill \\ { - \frac{{v_{{2\bar{j}}} + v_{{2\bar{j} + 1}} + 1}}{{v_{i} }},} \hfill & {{\text{if }}j = i,} \hfill \\ {0,} \hfill & {{\text{otherwise,}}} \hfill \\ \end{array} } \right. $$

    satisfies \(f(\bar{x})=1\ne 0\) and \(f(\bar{x})+v\cdot \bar{x}=0\).

\(\square \)

By Propositions 12 and 13, Theorem 1 applies and the codes \(\widetilde{\mathcal {C}}_f\) arising from non-singular quadrics in canonical form are \([(q^{n}-1)/(q-1),n+2]\) minimal codes over \(\mathbb {F}_{q}\). Note that in this case Lemma 2 does not apply, and indeed MAGMA evidences suggest that the AB condition holds.

6 Conclusion and open problems

In this paper we proved that Hermitian varieties and quadrics are cutting blocking sets, and hence they give place to minimal codes. It is worth noting that Theorem 1 and the construction provided in [1] yield two different families of minimal codes. However, while for the codes \(\widetilde{\mathcal {C}}_f\) Lemma 2 allows to argue about the AB condition, for the minimal codes arising from [1] this is not possible. In the following we list some open problems:

  1. 1.

    Determine the full weight distribution of the minimal codes \(\widetilde{\mathcal {C}}_f\) presented in this paper;

  2. 2.

    Study whether the minimal codes arising from Hermitian varieties and quadrics with the construction in [1] do not respect the AB condition.