# Remarks on second and third weights of Projective Reed-Muller codes

Mrinmoy Datta  Department of Mathematics,
Indian Institute of Technology Hyderabad, Kandi, Sangareddy, Telangana, India
<EMAIL_ADDRESS>
###### Abstract.

Determining the weight distributions of the projective Reed-Muller codes is a
very hard problem and has been studied extensively in the literature. In this
article, we provide an alternative proof of the second weight of the
projective Reed-Muller codes $\mathrm{PRM}_{q}(d,m)$ where $m\geq 3$ and
$3\leq d\leq\frac{q+3}{2}$. We show that the second weight is attained by
codewords that correspond to hypersurfaces containing a hyperplane under the
hypothesis on $d$. Furthermore, we compute the second weight of
$\mathrm{PRM}_{q}(d,2)$ for $3\leq d\leq q-1$. Furthermore, we give an upper
bound for the third weight of $\mathrm{PRM}_{q}(d,2)$.

###### Key words and phrases:

Finite fields, Hypersurfaces, Rational points, Projective Reed-Muller codes

###### 2020 Mathematics Subject Classification:

Primary 14G05, 14G15, 11T06

The first named author is partially supported by the grant
DST/INT/RUS/RSF/P-41/2021 from the Department of Science and Technology, Govt.
of India

Dedicated to Professor Sudhir Ghorpade on the occasion of his 60th birthday.

##  1\. Introduction

The generalized Reed-Muller codes and the projective Reed-Muller codes have
been studied widely by coding theorists and mathematicians in the last few
decades. While the Reed-Muller codes were introduced by D.E. Muller and I.S.
Reed in 1954, the so-called generalized Reed-Muller codes, which are one of
the central objects of study in this article, were introduced by Kasami, Lin,
and Peterson [13] in 1968. While the above-mentioned codes have been used for
practical purposes in coding theory, they have also given rise to fundamental
problems in algebraic geometry, combinatorics, number theory, and many other
fields. A projective analog of the generalized Reed-Muller codes, namely, the
projective Reed-Muller codes, was introduced by Lachaud [14] in 1988. An
introduction to the codes mentioned above is given in Section 2.3.

As explained later, the determination of weight distributions of the
generalized Reed-Muller codes $RM(d,m)$ and the projective Reed-Muller codes
$PRM(d,m)$ are fascinating problems in mathematics. In this paper, we restrict
our attention to the case when $1\leq d<q$. In particular, the Hamming weights
of the Reed-Muller codes correspond to the number of
${\mathbb{F}}_{q}$-rational points on hypersurfaces defined over
${\mathbb{F}}_{q}$. The minimum weight of the Reed-Muller codes is well-known
due to a very old result by Ore (cf Theorem 3), while the second weight of the
Reed-Muller codes is known due to Olav Geil [6]. The minimum weight of
projective Reed-Muller codes were determined by Serre [19] and Sørensen. A
significant amount of work has been done towards computing the second weight
of the projective Reed-Muller codes. They can be found in [1, 2, 3, 4, 16, 17,
18] among others. The results in the above-mentioned literature will be
discussed later in this paper. However, the complete determination of the
second weight of projective Reed-Muller codes is beyond reach at this
moment.The complete picture towards the progress regarding the problem of
determination of the second weight of projective Reed-Muller codes could be
obtained from Table 3 in [3]. Similarly, some attempts have been made towards
finding the third weight of projective Reed-Muller codes in [16, 17].

In this article, we completely determine the the second weight of $PRM(d,m)$
when $m=2$. As it will be explained later, this amounts to the determination
of the second highest number of ${\mathbb{F}}_{q}$ rational points on a
projective plane curve of degree $d$. Moreover, we also compute an upper bound
for the third highest possible number of ${\mathbb{F}}_{q}$-rational points on
a projective plane curve of degree $d$. We remark that the second weight of
$PRM(d,m)$ is known for $d\leq\frac{q+3}{2}$, thanks to Carvalho and Neumann
[2, 3]. We give an alternative proof of this result which also shows that for
$d\leq\frac{q+3}{2}$ the codewards that attain the second weight correspond to
hypersurfaces that contains a hyperplane. Along the way, we also provide a
mild improvement of the Homma-Kim elementary bound for hypersurfaces of degree
$d\neq 2,\sqrt{q}+1$.

This article is organized as follows: In Section 2, we recall various bounds
on the number of ${\mathbb{F}}_{q}$-rational points on varieties defined over
${\mathbb{F}}_{q}$, with a strong emphasis on projective plane curves of given
degrees. We also recall the definitions of the Reed-Muller codes in a small
subsection. In Section 3, we provide a minor improvement of the so called
Homma-Kim elementary bound. As a result we give an alternative proof of the
second highest number of points on hypersurfaces defined over
${\mathbb{F}}_{q}$ in some special cases. Finally, in Section 4, we determine
the second highest number of ${\mathbb{F}}_{q}$-rational points on projective
plane curves of degree $d$, resulting in the determination of the second
weight of the corresponding Projective Reed-Muller codes. Furthermore, we
provide an upper bound on the third highest number of
${\mathbb{F}}_{q}$-rational points on projective plane curves.

##  2\. Notations and Preliminary results

Let ${\mathbb{F}}_{q}$ denote a finite field with $q$ elements, where
$q=p^{e}$, for some prime number $p$ and a positive integer $e$. For $m\geq
1$, we will denote by ${\mathbb{P}}^{m}$ (resp. ${\mathbb{A}}^{m})$ the
$m$-dimensional projective space (resp. affine space) defined over
$\bar{{\mathbb{F}}_{q}}$, an algebraic closure of ${\mathbb{F}}_{q}$. The set
of ${\mathbb{F}}_{q}$-rational points in ${\mathbb{P}}^{m}$ (resp.
${\mathbb{A}}^{m}$) will be denoted by ${\mathbb{P}}^{m}({\mathbb{F}}_{q})$
(resp. ${\mathbb{A}}^{m}({\mathbb{F}}_{q})$). By a projective hypersurface of
degree $d$ defined over ${\mathbb{F}}_{q}$ in ${\mathbb{P}}^{m}$, we will mean
the zero set of a homogeneous polynomial in $m+1$ variables of degree $d$ in
${\mathbb{P}}^{m}$. If $\mathcal{X}$ is a projective hypersurface in
${\mathbb{P}}^{m}$, we will denote by $\mathcal{X}({\mathbb{F}}_{q})$ the set
of all ${\mathbb{F}}_{q}$-rational points on $\mathcal{X}$. We will use
similar notations to describe affine hypersurfaces. Needless to say, a plane
projective (resp. affine) curve is a hypersurface in ${\mathbb{P}}^{2}$ (resp
${\mathbb{A}}^{2})$. We often denote by
$\widehat{{\mathbb{P}}^{m}({\mathbb{F}}_{q})}$ the set of all projective
hyperplanes in ${\mathbb{P}}^{m}$ defined over ${\mathbb{F}}_{q}$. For $m\geq
0$, we will use the notation $p_{m}$ to denote the cardinality of
${\mathbb{P}}^{m}({\mathbb{F}}_{q})$, that is, $p_{m}=q^{m}+\dots+1$.

Throughout this article, all our varieties (curves, hypersurfaces, etc.) and
polynomials are defined over ${\mathbb{F}}_{q}$ unless otherwise mentioned. We
are interested in the determination of good upper bounds on the number of
${\mathbb{F}}_{q}$-rational points on projective (resp. affine) hypersurfaces
of degree $d$ defined over ${\mathbb{F}}_{q}$ (as mentioned earlier, we will
omit to mention the field of definition of varieties from now on) in
${\mathbb{P}}^{m}$ (resp. ${\mathbb{A}}^{m}$). In what follows, we will always
assume that $2\leq d\leq q-1$. We devote the rest of the section to revisiting
the known results related to the number of ${\mathbb{F}}_{q}$-rational points
on varieties over finite fields.

###  2.1. Rational points on affine hypersurfaces over finite fields

It is well-known that a nonzero polynomial of degree $d$ in one variable with
coefficients in a field $k$ has at most $d$ roots in $k$. When it comes to
finite fields, that is, when $k={\mathbb{F}}_{q}$, it is evident that a
polynomial in $m$ variables with coefficients in $k$ has finitely many
${\mathbb{F}}_{q}$-rational zeroes in an $m$-dimensional affine space over
${\mathbb{F}}_{q}$. The following result goes back to Ø. Ore, and is found in
[15, Theorem 6.13].

######  Theorem 2.1.

[15, Theorem 6.13] If $d<q$, then an affine hypersurface in ${\mathbb{A}}^{m}$
of degree $d$ has at most $dq^{m-1}$ many ${\mathbb{F}}_{q}$-rational points.

The bound in Theorem 2.1 is attained and corresponds to the minimum distance
of the generalized Reed-Muller codes. The next result, towards determination
of the second weight of generalized Reed-Muller codes, was proved by Geil in
[6, Proposition 2].

######  Theorem 2.2.

[6, Proposition 2] Suppose $m\geq 2$ and $S$ be an affine hypersurface in
${\mathbb{A}}^{m}$ of degree at most $d$. If $2\leq d<q$ and
$|S({\mathbb{F}}_{q})|<dq^{m-1}$, then $|S({\mathbb{F}}_{q})|\leq
dq^{m-1}-(d-1)q^{m-2}$.

While Theorem 2.2 appeared in 2008, the upper bound for large values of $q$
was established in 1995 by Cherdieu and Rolland [4]. They also proved the
following result.

######  Theorem 2.3.

[4, Theorem 2.1] Let $m\geq 2$ and $S$ be an affine hypersurface of degree $d$
in ${\mathbb{A}}^{m}$ that is a union of $d$ affine hyperplanes. If
$|S({\mathbb{F}}_{q})|=dq^{m-1}-(d-1)q^{m-2}$, then

  1. (a)

either Type I: $S$ is a union of $d$ affine hyperplanes passing through a
common codimension $2$ affine subspace in ${\mathbb{A}}^{m}$, or

  2. (b)

Type II: $S$ is a union of $d-1$ parallel hyperplanes and another hyperplane
intersecting each of the $d-1$ hyperplanes at distinct codimension $2$ affine
subspaces.

###  2.2. Rational points on projective hypersurfaces over finite fields

Having revisited some of the important results concerning affine hypersurfaces
over finite fields, we now turn our attention to projective hypersurfaces. The
first result to this end, resolving a conjecture by Tsfasman, was proved by
Serre in [19]. The result was independently proved by Sørensen in [21]. We
refer the reader to [5] for a more recent proof of the same.

######  Theorem 2.4 (Serre’s inequality, [19]).

Let $V$ be a projective hypersurface of degree $d$ in ${\mathbb{P}}^{m}$. If
$1\leq d\leq q$, then $|V({\mathbb{F}}_{q})|\leq dq^{m-1}+p_{m-2}$.

It is implicit in the proof of Serre’s inequality that the bound is attained
only by hypersurfaces of degree $d$ that are a union of $d$ distinct
hyperplanes in ${\mathbb{P}}^{m}$ containing a common projective linear
subspace of codimension two. In particular, when $m=2$, Serre’s inequality
says that a projective plane curve of degree $d$, with $d\leq q$, has at most
$dq+1$ many ${\mathbb{F}}_{q}$-rational points. Furthermore, the bound is
attained by the curves of degree $d$ that are a union of $d$ distinct lines
intersecting at a common point.

In a series of three papers [9, 10, 11], Homma and Kim proved the following
Theorem, settling completely a conjecture made by P. Sziklai towards the
maximum number of points on a projective plane curve that does not contain a
line. This result will play a crucial role in deriving our results in the
latter part of this article.

######  Theorem 2.5 ([9, 10, 11]).

Let $\mathcal{C}$ be a projective plane curve of degree $d$ defined over
${\mathbb{F}}_{q}$ containing no lines defined over ${\mathbb{F}}_{q}$. If
$2\leq d\leq q$ and $(d,q)\neq(4,4)$, then
$|\mathcal{C}({\mathbb{F}}_{q})|\leq(d-1)q+1$.

######  Remark 2.6.

For $2\leq d\leq q-1$, it is evident from the proofs in [10, 11], the curves
of degree $d$ attaining the bound in Theorem 2.5 can be divided into two main
classes.

  1. (a)

Frobenius Classical: In this case, the degrees of such curves are either $2$
or $q-1$. In the first case, when the curve is of degree two, it is, in fact,
a nonsingular conic.

  2. (b)

Frobenius Non-classical: In this case, if $q=p^{e}$, as mentioned above, the
possible degrees of curves attaining the bounds are $p^{h}+1$ for some
$\frac{e}{2}\leq h\leq e$.

It is beyond the scope of this article to go into the theory of Frobenius
classical curves. We refer the readers to [7, 20, 10, 11] and the references
therein for a detailed understanding of these notions. Let us illustrate the
above-mentioned criteria in two particular cases. First, let us assume that
$p$ is an odd prime. Also, suppose that $\mathcal{C}$ is a projective plane
curve of degree $d$, with $2\leq d<q-1$ and
$|\mathcal{C}({\mathbb{F}}_{q})|=(d-1)q+1$.

  1. (i)

If $q=p$, it follows that $\mathcal{C}$ must be a nonsigular conic.

  2. (ii)

If $q=p^{2}$, then either $d=2$ or $d=p+1$. It follows as above, that if
$d=2$, then $\mathcal{C}$ is a nonsingular conic. Hirschfeld, Storme, Thas and
Voloch showed that [8, Theorem] if $q$ is a perfect square, then any plane
curve of degree $\sqrt{q}+1$ that does not contain a line and admits
$q^{\frac{3}{2}}+1$ many ${\mathbb{F}}_{q}$-rational points is a nonsingular
Hermitian curve. Consequently, when $d=p+1$, the curve $\mathcal{C}$ is a
nonsingular Hermitian curve.

We remark that classifying all the projective plane curves attaining the bound
in Theorem 2.5 is a very interesting open problem.

When $m\geq 3$, the following result, popularly known as the _Homma-Kim
elementary bound_ [12, Theorem 1.2], gives an upper bound on the number of
${\mathbb{F}}_{q}$-rational points that a projective hypersurface of degree
$d$ may have in ${\mathbb{P}}^{m}$. This bound also occurs, albeit in a
different avatar, in [2, Proposition 1].

######  Theorem 2.7.

[12, Theorem 1.2] Let $\mathcal{X}$ be a projective hypersurface in
${\mathbb{P}}^{m}$ of degree $d$. If $\mathcal{X}$ does not contain a
hyperplane defined over ${\mathbb{F}}_{q}$, then
$|\mathcal{X}({\mathbb{F}}_{q})|\leq(d-1)q^{m-1}+dq^{m-2}+p_{m-3}$.

In the same paper, the authors illustrated some examples of hypersurfaces that
attain the elementary bound. Later, Tironi [22] has determined all the
hypersurfaces reaching without a linear component reaching the bound. Since we
are mostly interested in hypersurfaces of degree at most $q-1$, we partially
record his result below.

######  Theorem 2.8.

[22, Theorem 1] Let $2\leq d\leq q-1$, $m\geq 3$, and $\mathcal{X}$ be a
projective hypersurface of degree $d$ in ${\mathbb{P}}^{m}$ that attains the
Homma-Kim elementary bound. Then one of the following holds:

  1. (a)

$d=2$, and $\mathcal{X}$ is projectively equivalent to a cone over the
hyperbolic quadric surface, i.e., a surface in ${\mathbb{P}}^{3}$ given by the
vanishing set of $x_{0}x_{2}+x_{1}x_{3}$.

  2. (b)

$q$ is a square and $d=\sqrt{q}+1$, and $\mathcal{X}$ is projectively
equivalent to a cone over the nondegenerate Hermitian surface, i.e., a surface
in ${\mathbb{P}}^{3}$ given by the vanishing set of
$x_{0}^{\sqrt{q}+1}+x_{1}^{\sqrt{q}+1}+x_{2}^{\sqrt{q}+1}+x_{3}^{\sqrt{q}+1}$.

Before we conclude this subsection, we revisit a very useful Lemma by Zanella.

######  Theorem 2.9 (Zanella’s Lemma).

[23] Let $S\subset{\mathbb{P}}^{m}({\mathbb{F}}_{q})$ and
$a=\max\\{|S({\mathbb{F}}_{q})\cap\Pi|:\Pi\in\hat{{\mathbb{P}}^{m}}({\mathbb{F}}_{q})\\}$,
then $|S({\mathbb{F}}_{q})|\leq aq+1$.

###  2.3. (Projective) Reed-Muller Codes

An $[n,k]_{q}$ linear code (or simply a code, when $n,k,q$ are clear from the
context) $C$ is a $k$-dimensional linear subspace of ${\mathbb{F}}_{q}^{n}$.
On the vector space ${\mathbb{F}}_{q}^{n}$, one defines a metric, known as the
Hamming metric, as follows: For ${\bf a}=(a_{1},\dots,a_{n}),{\bf
b}=(b_{1},\dots,b_{n})\in{\mathbb{F}}_{q}^{n}$, we define the Hamming distance
between ${\bf a}$ and ${\bf b}$, denoted $d({\bf a},{\bf b})$ as the number of
coordinates where they differ, namely, $d({\bf a},{\bf b})=\\#\\{i:a_{i}\neq
b_{i}\\}$. If $C$ is a code, then the minimum distance of $C$, denoted by
$d(C)$, is defined as

$d(C):=\\{d({\bf a},{\bf b}):{\bf a},{\bf b}\in C,{\bf a}\neq{\bf b}\\}.$

Given an element, also known as a codeword, ${\bf a}\in C$, we define the
Hamming weight of ${\bf a}$, denoted $w({\bf a})$, as $d({\bf a},0)$, that is,
the number of nonzero coordinates of ${\bf a}$. The minimum weight of a linear
code $C$, as clear from the nomenclature, is defined as the minimum of the
Hamming weights of all nonzero codewords of $C$. Using the linearity of the
codes, it is easy to prove that the minimum weight and the minimum distance of
a code are equal. An $[n,k,d]_{q}$ linear code with minimum weight $d$ is
called an $[n,k,d]_{q}$ linear code.

####  2.3.1. Generalized Reed-Muller codes

Let $m,d$ be positive integers and $n=q^{m}$. In this article, we will always
assume that $1\leq d\leq q-1$. We fix an enumeration $\\{P_{1},\dots,P_{n}\\}$
of the elements of ${\mathbb{A}}^{m}({\mathbb{F}}_{q})$. Let $R_{\leq d}$ be
the set of all polynomials in ${\mathbb{F}}_{q}[x_{1},\dots,x_{m}]$ of total
degree at most $d$. This makes $R_{\leq d}$ a vector space over
${\mathbb{F}}_{q}$. Define an evaluation map

$ev:R_{\leq d}\to{\mathbb{F}}_{q}^{n}\ \ \ \text{as}\ \ \
f\mapsto(f(P_{1}),\dots,f(P_{n})).$

The map $ev$ is a linear map and the image of $ev$ is a linear subspace of
${\mathbb{F}}_{q}^{n}$. We define the generalized Reed-Muller code, denoted by
$RM(d,m)$ as $ev(R_{\leq d})$. Note that the Hamming weights of a codeword of
$RM(d,m)$ corresponds to the number of zeroes of a polynomial of degree at
most $d$. Consequently, the minimum weight of $RM(d,m)$ is given by
$q^{m}-dq^{m-1}$, thanks to Theorem 2.1. Similarly, the second minimum weight
of $RM(d,m)$, that is, the smallest weight of a codeword having Hamming weight
larger than the minimum weight, is given by $q^{m}-dq^{m-1}+(d-1)q^{m-2}$, as
a consequence of Theorem 2.2. Determining the weight distributions of the
Reed-Muller codes is undoubtedly a fascinating problem. Mathematically
speaking, this reduces the problem of determining all possible number of
${\mathbb{F}}_{q}$-rational zeroes of a polynomial of degree at most $d$ in
$m$ variables.

####  2.3.2. Generalized Reed-Muller codes

Let $m,d$ be positive integers and $n=p_{m}:=q^{m}+q^{m-1}+\dots+1$. In this
article, we will always assume that $1\leq d\leq q-1$. We fix an enumeration
$\\{P_{1},\dots,P_{n}\\}$ of the elements of
${\mathbb{P}}^{m}({\mathbb{F}}_{q})$. Furthermore, we fix a representative of
each point in ${\mathbb{P}}^{m}({\mathbb{F}}_{q})$, by saying that the first
nonzero coordinate of each point is $1$. Let $S_{d}$ be the set of all
homogeneous polynomials in ${\mathbb{F}}_{q}[x_{0},x_{1},\dots,x_{m}]$ of
total degree $d$. This makes $S_{d}$ a vector space over ${\mathbb{F}}_{q}$.
Define an evaluation map

$ev:S_{d}\to{\mathbb{F}}_{q}^{n}\ \ \ \text{as}\ \ \
f\mapsto(f(P_{1}),\dots,f(P_{n})).$

The map $ev$ is a linear map, and the image of $ev$ is a linear subspace of
${\mathbb{F}}_{q}^{n}$. We define the projective Reed-Muller code, denoted by
$PRM(d,m)$ as $ev(S_{d})$. Note that the Hamming weights of a codeword of
$PRM(d,m)$ corresponds to the number of zeroes of a homogeneous polynomial of
degree $d$ in ${\mathbb{P}}^{m}({\mathbb{F}}_{q})$. Consequently, the minimum
weight of $PRM(d,m)$ is given by $p_{m}-dq^{m-1}-p_{m-2}$, thanks to Theorem
2.4. However, the complete determination of the second minimum weight of
$PRM(d,m)$, the smallest weight of a codeword of $PRM(d,m)$ having a Hamming
weight larger than the minimum weight, is not completely solved yet. One of
the prominent goals of this article is to determine the second weight of
$PRM(d,m)$ for $m=2$.

##  3\. Hypersurfaces

In this section, we consider the set $\mathscr{S}$ of hypersurfaces of degree
$d$, with $2\leq d\leq q-1$ in ${\mathbb{P}}^{m}$ that does not attain the
bound in Serre’s inequality and produce an upper bound for the number of
points on hypersurfaces that belong to $\mathscr{S}$. Sboui showed [17,
Theorem 4.2] that if $5\leq d\leq\frac{q+2}{2}$, then

$|\mathcal{X}({\mathbb{F}}_{q})|\leq dq^{m-1}+p_{m-2}-(d-2)q^{m-2},$

for all $\mathcal{X}\in\mathscr{S}$. Furthermore, in the same paper, he proved
that this bound is attained by a union of $d$ distinct hyperplanes. Carvalho
and Neumann further investigated this in [3], where they showed that the upper
bound holds for $2\leq d\leq\frac{q+3}{2}$. It is not known yet whether, in
the case $d=\frac{q+3}{2}$, the bound is still attained by hypersurfaces that
are the union of $d$ distinct hyperplanes. In this article, we give an
alternative proof of the above bound for $2\leq d\leq\frac{q+3}{2}$ using
Theorem 2.2 and a rudimentary improvement of Theorem 2.7. Moreover, our proof
also shows that the bound is attained by hypersurfaces that contain at least
one hyperplane. We begin with the following simple observation, the idea of
which is well-known among experts and appears in several forms in literature,
for example, in [3, Lemma 2.3(i)]. We include a proof for the sake of
completeness.

######  Proposition 3.1.

Suppose $m\geq 2$ is an integer. Let $\mathcal{X}$ be a hypersurface in
${\mathbb{P}}^{m}$ of degree $d$, with $2\leq d\leq q-1$. If $\mathcal{X}$
contains a hyperplane and $|\mathcal{X}({\mathbb{F}}_{q})|<dq^{m-1}+p_{m-2}$,
then

$|\mathcal{X}({\mathbb{F}}_{q})|\leq dq^{m-1}+p_{m-2}-(d-2)q^{m-2}.$

###### Proof.

Let $\Pi$ be a hyperplane contained in $\mathcal{X}$. If $d=2$, then
$\mathcal{X}$ is a quadratic hypersurface, and the upper bound is a
consequence of Serre’s inequality. So we may assume that $d\geq 3$. With a
suitable linear change of coordinates, we may assume that $\Pi$ is the
hyperplane at infinity. Then $\mathcal{X}^{\prime}:=\mathcal{X}\setminus\Pi$
is an affine hypersurface of degree at most $d-1$ in ${\mathbb{A}}^{m}$. Note
that,

(1)
$|\mathcal{X}({\mathbb{F}}_{q})|=|\Pi({\mathbb{F}}_{q})|+|\mathcal{X}^{\prime}({\mathbb{F}}_{q})|.$

Theorem 2.1 implies
$|\mathcal{X}^{\prime}({\mathbb{F}}_{q})|\leq(d-1)q^{m-1}$. However, if the
equality occurs, then $|\mathcal{X}({\mathbb{F}}_{q})|=dq^{m-1}+p_{m-2}$,
which contradicts to our hypothesis. Thus
$|\mathcal{X}^{\prime}({\mathbb{F}}_{q})|<(d-1)q^{m-1}$. From Theorem 2.2, we
have $|\mathcal{X}^{\prime}({\mathbb{F}}_{q})|\leq(d-1)q^{m-1}-(d-2)q^{m-2}$.
Using (1), we see that $|\mathcal{X}({\mathbb{F}}_{q})|\leq
dq^{m-1}+p_{m-2}-(d-2)q^{m-2}$, as desired. ∎

######  Remark 3.2.

Note that the Homma-Kim elementary bound is stronger than the one in the above
proposition when $3\leq d\leq\frac{q+3}{2}$. Indeed, we have

$\displaystyle\left(dq^{m-1}+p_{m-2}-(d-2)q^{m-2}\right)-\left((d-1)q^{m-1}+dq^{m-2}+p_{m-3}\right)$
$\displaystyle=q^{m-1}+q^{m-2}-2(d-1)q^{m-2}$
$\displaystyle=q^{m-2}(q+3-2d)\geq 0$

when $d\leq\frac{q+3}{2}$. In particular,

(2) $(d-1)q^{m-1}+dq^{m-2}+p_{m-3}<dq^{m-1}+p_{m-2}-(d-2)q^{m-2}\ \ \
\mathrm{if}\ \ d\leq\frac{q+2}{2}.$

From now on, we will always assume that $q\geq 3$. Consequently, we see that
$2\leq\frac{q+1}{2}$. Now, let us analyze the case when $q$ is a square. One
can see easily that when $q\geq 4$, then $\sqrt{q}+1<\frac{q+3}{2}$ and hence
the strict inequality works. In particular, the Homma-Kim elementary bound and
Proposition 3.1 shows that, if $2\leq d\leq\frac{q+3}{2}$, and $\mathcal{X}$
is a hypersurface in ${\mathbb{P}}^{m}$ such that
$|\mathcal{X}({\mathbb{F}}_{q})|<dq^{m-1}+p_{m-2}$, then
$|\mathcal{X}({\mathbb{F}}_{q})|\leq dq^{m-1}+p_{m-2}-(d-2)q^{m-2}$. Moreover,
if $d\leq\frac{q+2}{2}$, then bound is attained by $\mathcal{X}$ only if
$\mathcal{X}$ contains a hyperplane. We note that this was already proved by
Sboui (cf. [17, Theorem 4.2]) using a different methodology. We will extend
all these observations to the case when $d\leq\frac{q+3}{2}$ using an
improvement of Homma-Kim elementary bound.

As explained in Theorem 2.8, the Homma-Kim elementary bound is only attained
by some special hypersurfaces of degree $d=2$ and $d=\sqrt{q}+1$. It is a
natural question to ask for a better upper bound in the cases when $d\neq 2$
and $\sqrt{q}+1$. Below, we present a mild improvement of the elementary bound
in these cases. To warm up, let us first investigate the case when $m=3$.

######  Lemma 3.3.

Let $3\leq d\leq q-1$ and $\mathcal{X}$ be a surface of degree $d$ in
${\mathbb{P}}^{3}$ containing no planes. If $d\neq\sqrt{q}+1$, then

$|\mathcal{X}({\mathbb{F}}_{q})|\leq(d-1)q^{2}+dq+1-(d-2).$

###### Proof.

Let $\mathcal{X}$ be a surface in ${\mathbb{P}}^{3}$ and $\deg\mathcal{X}=d$.
If $\mathcal{X}$ contains a line $\ell$ defined over ${\mathbb{F}}_{q}$, then
we see that

(3)
$|\mathcal{X}({\mathbb{F}}_{q})|=|\ell({\mathbb{F}}_{q})|+\sum_{\Pi\in\mathcal{B}(\ell)}|\mathcal{X}({\mathbb{F}}_{q})\cap(\Pi\setminus\ell)|,$

where $\mathcal{B}(\ell)$ denotes the set of all planes in ${\mathbb{P}}^{3}$
containing $\ell$. Note that $|\mathcal{B}(\ell)|=q+1$. Suppose that
$\Pi\in\mathcal{B}(\ell)$. Then $\Pi\setminus\ell$ is an affine plane, and
since $d\leq q-1$, by hypothesis, $\mathcal{X}$ does not contain
$\Pi\setminus\ell$. Furthermore, since $\mathcal{X}$ contains $\ell$, it
follows that $\mathcal{X}\cap(\Pi\setminus\ell)$ is an affine curve of degree
at most $d-1$. Now Theorem 2.1 implies that
$|\mathcal{X}({\mathbb{F}}_{q})\cap(\Pi\setminus\ell)|\leq(d-1)q$. If it so
happens that $|\mathcal{X}({\mathbb{F}}_{q})\cap(\Pi\setminus\ell)|=(d-1)q$
for all $\Pi\in\mathcal{B}(\ell)$, then we see from (3) that
$|\mathcal{X}({\mathbb{F}}_{q})|=(d-1)q^{2}+dq+1$. But Theorem 2.8 shows that,
in this case, $d$ must be equal to $2$ or $\sqrt{q}+1$, a contradiction to our
hypothesis. Thus there exists $\Pi_{0}\in\mathcal{B}(\ell)$ such that
$|\mathcal{X}({\mathbb{F}}_{q})\cap(\Pi_{0}\setminus\ell)|<(d-1)q$. From
Theorem 2.2, we have
$|\mathcal{X}({\mathbb{F}}_{q})\cap(\Pi_{0}\setminus\ell)|\leq(d-1)q-(d-2)$.
Consequently, from (3), we have

$|\mathcal{X}({\mathbb{F}}_{q})|\leq(q+1)+(d-1)q-(d-2)+q(d-1)q=(d-1)q^{2}+dq+1-(d-2).$

Now, suppose that $\mathcal{X}$ does not contain any line. So for each plane
$\Pi$ in ${\mathbb{P}}^{3}$, we see that $\mathcal{X}\cap\Pi$ is a plane curve
of degree $d$ not containing any lines. Since $d\leq q-1$, Theorem 2.5 shows
that $|\mathcal{X}({\mathbb{F}}_{q})\cap\Pi|\leq(d-1)q+1$ for each plane $\Pi$
in ${\mathbb{P}}^{3}$ defined over ${\mathbb{F}}_{q}$. Using Zanella’s Lemma,
we see that $|\mathcal{X}({\mathbb{F}}_{q})|\leq((d-1)q+1)q+1=(d-1)q^{2}+q+1$,
which is strictly smaller than the desired bound. ∎

We are now ready to state and prove the main result of this section.

######  Proposition 3.4.

Suppose $3\leq d\leq q-1$ and $m\geq 3$. Let $\mathcal{X}$ be a hypersurface
of degree $d$ in ${\mathbb{P}}^{m}$ containing no hyperplanes. If
$d\neq\sqrt{q}+1$, then

$|\mathcal{X}({\mathbb{F}}_{q})|\leq(d-1)q^{m-1}+dq^{m-2}+p_{m-3}-(d-2)q^{m-3}.$

###### Proof.

We prove this by induction on $m$. When $m=3$, the assertion follows from
Proposition 3.3. Thus we may assume that $m>3$, $\mathcal{X}$ a hypersurface
of degree $d$ defined over ${\mathbb{F}}_{q}$ in ${\mathbb{P}}^{m}$ without a
${\mathbb{F}}_{q}$-linear component and our assertion is true for all
projective spaces of dimension less than $m$. We distinguish the proof into
two cases:

Case 1: $\mathcal{X}$ contains a linear subspace of codimension $2$. If
$\mathcal{X}$ contains a linear subspace $\mathcal{L}$ of codimension two,
then we see that

(4)
$|\mathcal{X}({\mathbb{F}}_{q})|=|\mathcal{L}({\mathbb{F}}_{q})|+\sum_{\Pi\in\mathcal{B}(\mathcal{L})}|\mathcal{X}({\mathbb{F}}_{q})\cap(\Pi\setminus\mathcal{L})|,$

where $\mathcal{B}(\mathcal{L})$ denotes the set of all hyperplanes in
${\mathbb{P}}^{m}$ containing $\mathcal{L}$ defined over ${\mathbb{F}}_{q}$.
Thus $|\mathcal{B}(\mathcal{L})|=q+1$. Suppose that
$\Pi\in\mathcal{B}(\mathcal{L})$. Then $\Pi\setminus\mathcal{L}$ is an affine
space of dimension $m-1$, and since $d\leq q-1$ by hypothesis, $\mathcal{X}$
does not contain $\Pi\setminus\mathcal{L}$. Furthermore, since $\mathcal{X}$
contains $\mathcal{L}$, it follows that
$\mathcal{X}\cap(\Pi\setminus\mathcal{L})$ is an affine hypersurface of degree
at most $d-1$. Now, Theorem 2.1 implies that
$|\mathcal{X}({\mathbb{F}}_{q})\cap(\Pi\setminus\mathcal{L})|\leq(d-1)q^{m-2}$.
If $|\mathcal{X}({\mathbb{F}}_{q})\cap(\Pi\setminus\mathcal{L})|=(d-1)q^{m-2}$
for all $\Pi\in\mathcal{B}(\mathcal{L})$, then we see from (4) that
$|\mathcal{X}({\mathbb{F}}_{q})|=(d-1)q^{m-1}+dq^{m-2}+p_{m-3}$. Now Theorem
2.8 implies that $d$ must equal $2$ or $\sqrt{q}+1$, contradicting our
hypothesis. Thus there exists $\Pi_{0}\in\mathcal{B}(\ell)$ such that
$|\mathcal{X}({\mathbb{F}}_{q})\cap(\Pi_{0}\setminus\ell)|<(d-1)q^{m-2}$.
Theorem 2.2, shows that
$|\mathcal{X}({\mathbb{F}}_{q})\cap(\Pi_{0}\setminus\ell)|\leq(d-1)q^{m-2}-(d-2)q^{m-3}$.
Consequently, from (4), we have

$|\mathcal{X}({\mathbb{F}}_{q})|\leq
p_{m-2}+(d-1)q^{m-2}-(d-2)q^{m-3}+q(d-1)q^{m-2}=(d-1)q^{m-1}+dq^{m-2}+1-(d-2)q^{m-3}.$

Case 2: $\mathcal{X}$ does not contain a linear subspace of codimension $2$.
In this case, for each hyperplane $\Pi$ in ${\mathbb{P}}^{m}$ defined over
${\mathbb{F}}_{q}$, we see that $\mathcal{X}\cap\Pi$ is a hypersurface of
degree $d$ not containing any hyperplanes in $\Pi\cong{\mathbb{P}}^{m-1}$
defined over ${\mathbb{F}}_{q}$. From induction hypothesis, we have
$|\mathcal{X}({\mathbb{F}}_{q})\cap\Pi|\leq(d-1)q^{m-2}+dq^{m-3}+p_{m-4}-(d-2)q^{m-4}$
for each hyperplane $\Pi$ in ${\mathbb{P}}^{m}$ defined over
${\mathbb{F}}_{q}$. From Zanella’s lemma, we see that

$\displaystyle|\mathcal{X}({\mathbb{F}}_{q})|$
$\displaystyle\leq((d-1)q^{m-2}+dq^{m-3}+p_{m-4}-(d-2)q^{m-4})q+1$
$\displaystyle=(d-1)q^{m-1}+dq^{m-2}+p_{m-3}-(d-2)q^{m-3}.$

This completes the proof. ∎

######  Remark 3.5.

  1. (a)

First, it is easy to see that $(d-1)q^{m-1}+dq^{m-2}+p_{m-3}\leq
dq^{m-1}+p_{m-2}-(d-2)q^{m-2}$ whenever $2\leq d\leq\frac{q+3}{2}$.
Furthermore, equality holds only when $d=\frac{q+3}{2}$.

  2. (b)

Note that
$(d-1)q^{m-1}+dq^{m-2}+p_{m-3}-(d-2)q^{m-3}<dq^{m-1}+p_{m-2}-(d-2)q^{m-2}$,
when $3\leq d\leq\frac{q+3}{2}$. Indeed, for $3\leq d\leq\frac{q+3}{2}$, we
have

$\displaystyle\left(dq^{m-1}+p_{m-2}-(d-2)q^{m-2}\right)-\left((d-1)q^{m-1}+dq^{m-2}+p_{m-3}-(d-2)q^{m-3}\right)$
$\displaystyle=q^{m-1}-(2d-3)q^{m-2}+(d-2)q^{m-3}>q^{m-2}(q-2d+3)\geq 0.$

The strict inequality above results from the assumption that $d>2$. We remark
that in the case when $d=2$, the Homma-Kim elementary bound is attained, and
consequently, there is no scope for any improvement in this case. Furthermore,
the inequality $3\leq d\leq\frac{q+3}{2}$, indicates that our bound applies
when $q\geq 3$.

We conclude the section by summarizing all the results presented in section.

######  Theorem 3.6.

Suppose $q\geq 3$, $d\geq 3$, and $m\geq 3$. Let $\mathcal{X}$ be a
hypersurface of degree $d$ defined over ${\mathbb{F}}_{q}$ in
${\mathbb{P}}^{m}$. Moreover, assume that
$|\mathcal{X}({\mathbb{F}}_{q})|<dq^{m-1}+p_{m-2}$. Then we have the
following:

  1. (a)

$|\mathcal{X}({\mathbb{F}}_{q})|\leq dq^{m-1}+p_{m-2}-(d-2)q^{m-2}$, when
$3\leq d\leq\frac{q+3}{2}$. Moreover, equality holds only if $\mathcal{X}$
contains a hyperplane.

  2. (b)

$|\mathcal{X}({\mathbb{F}}_{q})|\leq(d-1)q^{m-1}+dq^{m-2}+p_{m-3}-(d-2)q^{m-3}$,
whenever $\frac{q+3}{2}<d\leq q-1$.

###### Proof.

Let $\mathcal{X}$ be a hypersurface satisfying the hypothesis. If
$\mathcal{X}$ contains a hyperplane defined over ${\mathbb{F}}_{q}$, then
Proposition 3.1 shows that $|\mathcal{X}({\mathbb{F}}_{q})|\leq
dq^{m-1}+p_{m-2}-(d-2)q^{m-2}$. If $\mathcal{X}$ does not contain any
hyperplane defined over ${\mathbb{F}}_{q}$, then Proposition 3.4 implies that
$|\mathcal{X}({\mathbb{F}}_{q})|\leq(d-1)q^{m-1}+dq^{m-2}+p_{m-3}-(d-2)q^{m-3}.$
Thus

(5)
$|\mathcal{X}({\mathbb{F}}_{q})|\leq\max\\{dq^{m-1}+p_{m-2}-(d-2)q^{m-2},(d-1)q^{m-1}+dq^{m-2}+p_{m-3}-(d-2)q^{m-3}\\}.$

The inequalities in (a) and (b) now follow from Remark 3.5. Furthermore, if
equality occurs in (a), then Remark 3.5 shows that $\mathcal{X}$ must contain
a hyperplane. ∎

It is conceivable that a major improvement of Homma-Kim elementary bound in
all cases when $d\neq 2$ or $\sqrt{q}+1$, combined with Theorem 2.2 will
answer the question for determining all the hypersurfaces in
${\mathbb{P}}^{m}$, with $m\geq 3$, that admit the second highest number of
${\mathbb{F}}_{q}$-rational points.

##  4\. Plane curves

In the previous section, we have partially answered the question of
determination of the second highest number of ${\mathbb{F}}_{q}$-rational
points on hypersurfaces of a given degree. It turns out that we can answer the
question completely for projective plane curves. Furthermore, we present some
new results on the third highest number of ${\mathbb{F}}_{q}$-rational points
on projective plane curves. Throughout $3\leq d\leq q-1$.

###  4.1. Second highest number of ${\mathbb{F}}_{q}$-rational points on
projective plane curves

Let us denote by $\mathscr{C}$ the set of projective plane curves of degree
$d$. It follows from Theorem 2.4 that a curve in $\mathscr{C}$ admits at most
$dq+1$ many ${\mathbb{F}}_{q}$-rational points in ${\mathbb{P}}^{2}$. As
mentioned before, any curve attaining this bound will be given by a union of
$d$ distinct lines having a point in common. Let us denote by
$\mathscr{C}_{1}$ the set of all such curves. As evident from the context, we
want to determine the highest number of points a curve
$\mathcal{C}\in\mathscr{C}\setminus\mathscr{C}_{1}$ may admit. Sboui proved
[17, Theorem 4.2] that $|\mathcal{C}({\mathbb{F}}_{q})|\leq dq-d+3$, for any
$\mathcal{C}\in\mathscr{C}\setminus\mathscr{C}_{1}$ with $5\leq
d\leq\frac{q+2}{2}$. We show that this bound works for all curves of degree at
most $q-1$.

######  Theorem 4.1.

Suppose $\mathcal{C}$ is a plane projective curve of degree $d$, with $3\leq
d\leq q-1$. If $|\mathcal{C}({\mathbb{F}}_{q})|<dq+1$, then
$|\mathcal{C}({\mathbb{F}}_{q})|\leq dq-d+3$.

###### Proof.

If $\mathcal{C}$ contains a line defined over ${\mathbb{F}}_{q}$, then
Proposition 3.1 applies with $m=2$ and proves the assertion. If $\mathcal{C}$
does not contain any line defined over ${\mathbb{F}}_{q}$, then Theorem 2.5
shows that $|\mathcal{C}({\mathbb{F}}_{q})|\leq(d-1)q+1$. Note that

$(dq-d+3)-\left((d-1)q+1\right)=q-d+2>0.$

The last equality is true since $d\leq q-1$ by hypothesis. ∎

We now characterize all curves of degree $d$ with $3\leq d\leq q-1$ that
attain the bound in Theorem 4.1. First, we have the following Proposition that
rules out all curves that are not a union of lines.

######  Proposition 4.2.

If $\mathcal{C}$ is a projective plane curve of degree $d$, with $d\leq q-1$,
containing an irreducible component of degree at least two, then
$|\mathcal{C}({\mathbb{F}}_{q})|\leq(d-1)q+2$. In particular, if $\mathcal{C}$
is not a union of lines defined over ${\mathbb{F}}_{q}$, then
$|\mathcal{C}({\mathbb{F}}_{q})|<dq-d+3$.

###### Proof.

If $\mathcal{C}$ does not contain any lines defined over ${\mathbb{F}}_{q}$,
then Theorem 2.5 applies and proves the assertion. Thus, we may assume that
$\mathcal{C}$ contains a line defined over ${\mathbb{F}}_{q}$. We may write
$\mathcal{C}=\mathcal{L}\cup\mathcal{N}$, where $\mathcal{L}$ is the union of
all lines defined over ${\mathbb{F}}_{q}$, contained in $\mathcal{C}$, whereas
$\mathcal{N}$ is the union of all components of $\mathcal{C}$ containing no
lines defined over ${\mathbb{F}}_{q}$. Let $\deg\mathcal{N}=s$ and
$\deg\mathcal{L}=d-s$. By our hypothesis, we have $s\geq 2$. Using Theorem 2.4
and Theorem 2.5, we obtain,

$|\mathcal{L}({\mathbb{F}}_{q})|\leq(d-s)q+1\ \ \ \text{and}\ \ \
|\mathcal{N}({\mathbb{F}}_{q})|\leq(s-1)q+1.$

Consequently,
$|\mathcal{C}({\mathbb{F}}_{q})|\leq|\mathcal{L}({\mathbb{F}}_{q})|+|\mathcal{N}({\mathbb{F}}_{q})|\leq(d-1)q+2$.

Since $d\leq q-1$, we have
$\left(dq-d+3\right)-\left((d-1)q+2\right)=(q-d+1)>0$, completing the proof. ∎

######  Theorem 4.3.

Let $3\leq d\leq q-1$. If $\mathcal{C}$ is a curve defined over
${\mathbb{F}}_{q}$ admitting $dq-d+3$ points in
${\mathbb{P}}^{2}({\mathbb{F}}_{q})$, then $\mathcal{C}$ is a union of $d$
lines $\ell_{1},\dots,\ell_{d}$ such that $\ell_{1},\dots,\ell_{d-1}$
intersect at a common point $P$ and $\ell_{d}$ intersect each of
$\ell_{1},\dots,\ell_{d}$ at a point different from $P$. In particular, there
are $(q^{2}+q+1)q^{2}{q+1\choose d-1}$ many distinct curves attaining the
bound in Theorem 4.1.

###### Proof.

First, if $\mathcal{C}$ is not a union of lines, then Proposition 4.2 shows
that $|\mathcal{C}({\mathbb{F}}_{q})|<dq-d+3$. Thus, $\mathcal{C}$ is a union
of lines. Moreover, if $\mathcal{C}$ is a union of at most $d-1$ lines, then
Theorem 2.4 shows that $|\mathcal{C}({\mathbb{F}}_{q})|\leq(d-1)q+1<dq-d+3$.
This shows that $\mathcal{C}$ is a union of $d$ distinct lines, say
$\ell_{1},\dots,\ell_{d}$. It is evident from Proposition 3.1, that
$\mathcal{C}^{\prime}=\mathcal{C}\setminus\ell_{1}$ is an affine curve of
degree $d-1$, with $|\mathcal{C}^{\prime}({\mathbb{F}}_{q})|=(d-1)q-(d-2)$.
From Theorem 2.3, we see that there are two possibilities:

  1. (a)

$\ell_{2},\dots,\ell_{d}$ meet at a common point $P$. By construction
$P\notin\ell_{1}$. Thus, $\mathcal{C}$ satisfies the assertion.

  2. (b)

$\ell_{3},\dots,\ell_{d}$ are parallel lines in ${\mathbb{A}}^{2}$ and
$\ell_{2}$ intersects each of $\ell_{3},\dots,\ell_{d}$ at a point111If $d=3$,
then this configuration is same as that in (a).. It is now evident that
$\ell_{1},\ell_{3},\dots,\ell_{d}$ intersect at a common point in
${\mathbb{P}}^{2}$, and $\ell_{2}$ intersects each of them, proving the
assertion.

It is now trivial to count the number of curves attaining the bound. ∎

###  4.2. Towards the third highest number of points on projective plane
curves

In this subsection, we investigate the question of determining the third
highest number of ${\mathbb{F}}_{q}$-rational points that a projective plane
curve of degree $d$ may have in ${\mathbb{P}}^{2}$. In particular, if
$\mathscr{C}^{\prime}=\\{\mathcal{C}\in\mathscr{C}:|\mathcal{C}({\mathbb{F}}_{q})|<dq-d+3\\}$,
then we look for the value of

$\max_{\mathcal{C}\in\mathscr{C}^{\prime}}|\mathcal{C}({\mathbb{F}}_{q})|.$

A lot of work to this end has been done by A. Sboui and his collaborators (cf.
[16, 17, 18]). In particular, they have obtained the first three highest
numbers of points on hypersurfaces of degree $d$ in ${\mathbb{P}}^{m}$, which
are the union of $d$ distinct hyperplanes. Following the notations in [17],
let us denote by $N_{i}^{\ell}$ the $i$-th highest number of
${\mathbb{F}}_{q}$-rational points that a curve of degree $d$ given by the
union of $d$ distinct lines may have in ${\mathbb{P}}^{2}$, for $i=1,2,3$. In
particular, for $3\leq d\leq q$, we have, thanks to [17, Theorem 3.10],

$N_{1}^{\ell}=dq+1,\ \ N_{2}^{\ell}=dq-d+3\ \ \text{and}\ \ \
N_{3}^{\ell}=dq+1-2(d-3).$

To put the above information in perspective, for $i=1,2,3$, let us denote by
$N_{i}$ the $i$-th highest number of ${\mathbb{F}}_{q}$-rational points on a
projective plane curve of degree $d$. It is evident from Theorem 2.4 and
Theorem 4.1 that for $3\leq d\leq q-1$, we have,

$N_{1}=N_{1}^{\ell}\ \ \ \text{and}\ \ \ N_{2}=N_{2}^{\ell}.$

Clearly, $N_{3}\geq N_{3}^{\ell}$. Moreover, it was proved in [17, Theorem
4.2] that $N_{3}=N_{3}^{\ell}$ for $5\leq d\leq\frac{q}{3}+2$. Thereafter,
Rodier and Sboui claimed in [16, Corollary 11] that when $q$ is a prime, then
$N_{3}=N_{3}^{\ell}$ for $4<d<q-2$. We remark that this observation is
incorrect. Indeed, the plane curve $\mathcal{C}$ of degree $d$ which is a
union of $d-1$ lines $\ell_{1},\dots,\ell_{d-1}$ passing through a common
point $P$, with $\ell_{1}$ having multiplicity $2$ satisfies,

$|\mathcal{C}({\mathbb{F}}_{q})|=(d-1)q+1.$

Note that $(d-1)q+1<N_{2}$, as observed in the proof of Theorem 4.1. Also,
when $d>\frac{q+6}{2}$, we see that $N_{3}^{\ell}<(d-1)q+1$. Thus, the above-
mentioned result fails when $q$ is a prime and $q\geq 11$. Even though the
determination of $N_{3}$ for $3\leq d\leq q-1$, for an arbitrary prime power
$q$, is beyond reach, we present some upper bounds for $N_{3}$. We are now
ready to present an upper bound for $N_{3}$.

######  Theorem 4.4.

For $3\leq d\leq q-1$, we have

(6) $N_{3}=\begin{cases}dq+1-2(d-3)\ \ &\text{if}\ \ d\leq\frac{q+5}{2}\\\
\leq(d-1)q+2\ \ \ &\text{if}\ \ d\geq\frac{q+6}{2}\end{cases}$

###### Proof.

Let $\mathcal{C}\in\mathscr{C}^{\prime}$. If $\mathcal{C}$ is a union of $d$
distinct lines, then $|\mathcal{C}({\mathbb{F}}_{q})|\leq
N_{3}^{\ell}=dq+1-2(d-3)$, thanks to [17, Theorem 3.10]. It follows from
Serre’s inequality that if $\mathcal{C}$ is a union of at most $d-1$ distinct
lines, then $|\mathcal{C}({\mathbb{F}}_{q})|\leq(d-1)q+1$. Thus, we may
conclude that if $\mathcal{C}$ is a union of lines, then

(7) $|\mathcal{C}({\mathbb{F}}_{q})|\leq\max\\{(d-1)q+1,dq+1-2(d-3)\\}$

If $\mathcal{C}$ is not a union of lines, then Proposition 4.2 implies that

(8) $|\mathcal{C}({\mathbb{F}}_{q})|\leq(d-1)q+2.$

Since $dq+1-2(d-3)\geq(d-1)q+2$ when $d\leq\frac{q+5}{2}$, the assertion
follows. ∎

######  Remark 4.5.

As already mentioned above, for every $d$, with $2\leq d\leq q+2$, there exist
curves (given by a union of $d-1$ distinct lines passing through a common
point, one among them having multiplicity $2$) with exactly $(d-1)q+1$ many
points. In particular, Theorem 4.4 implies that either $N_{3}=(d-1)q+1$ or
$N_{3}=(d-1)q+2$, whenever $d\geq\frac{q+6}{2}$. The proof of Proposition 4.2
shows that a curve $\mathcal{C}$, that is not a union of lines, has $(d-1)q+2$
many points if and only if $\mathcal{C}=\mathcal{L}\cup\mathcal{N}$, where
$\mathcal{L}$ is the union of lines contained in $\mathcal{C}$, and
$\mathcal{N}$ is the union of all line-free components of $\mathcal{C}$,
satisfying:

  1. (C1)

$2\leq\deg\mathcal{N}=d-s\leq d-1$,

  2. (C2)

$|\mathcal{N}({\mathbb{F}}_{q})|=(d-s-1)q+1$,

  3. (C3)

$\deg\mathcal{L}=s\geq 1$, and $\mathcal{L}$ is a union of $s$ lines passing
through a common point and

  4. (C4)

$\mathcal{L}({\mathbb{F}}_{q})\cap\mathcal{N}({\mathbb{F}}_{q})=\emptyset$.

Unfortunately, a classification of plane curves of degree $d$ with
$\sqrt{q}+1<d<q-1$ is unknown. However, partial results can be obtained to
determine $N_{3}$. We begin with the following Lemma, which should be well-
known, but we did not find a proper reference in the literature. We include a
proof for the sake of completeness.

######  Lemma 4.6.

Let $\mathcal{Q}$ be a nonsingular conic, and $\mathcal{L}$ be a union of $s$
distinct lines passing through a common point $P$. If
$(\mathcal{L}\cap\mathcal{Q})({\mathbb{F}}_{q})$ is empty, then
$s\leq\frac{q+1}{2}$.

###### Proof.

By hypothesis $P\notin\mathcal{Q}$. Note that the $q+1$ lines through $P$ pass
cover all the points on $\mathcal{Q}$. Since $\mathcal{Q}$ contains no lines,
there must be at least $\frac{q+1}{2}$ lines through $P$ that intersect
$\mathcal{Q}$ at an ${\mathbb{F}}_{q}$-rational point. Thus
$s\leq\frac{q+1}{2}$. ∎

######  Proposition 4.7.

Suppose $2\leq d\leq q-1$. If $q=p$ or $q=p^{2}$, then

$N_{3}=\begin{cases}dq+1-2(d-3)\ \ \mathrm{if}\ \ d\leq\frac{q+5}{2}\\\
(d-1)q+1\ \ \ \ \mathrm{if}\ \ d\geq\frac{q+6}{2}\end{cases}.$

###### Proof.

The value of $N_{3}$ when $d\leq\frac{q+5}{2}$ is already determined in
Theorem 4.4. Thus we investigate the case when $d\geq\frac{q+6}{2}$. Let
$\mathcal{C}$ be a projective plane curve of degree $d$ and
$\mathcal{C}=\mathcal{L}\cup\mathcal{N}$, where $\mathcal{L}$ denotes the
union of lines contained in $\mathcal{C}$, whereas $\mathcal{N}$ is the line
free component of $\mathcal{C}$. Suppose $\deg\mathcal{L}=s$. It is evident
from Theorem 2.5 that if $s=0$, then
$|\mathcal{C}({\mathbb{F}}_{q})|\leq(d-1)q+1$, and we are done. So we may
assume that $s\geq 1$. In view of Remark 4.5, we suppose that $\mathcal{L}$
and $\mathcal{N}$ satisfy (C1) - (C3). We will show that in both cases, when
$q=p$ or $q=p^{2}$, the condition (C4) can not be satisfied. First, assume
that $d-s=2$. Since $d\geq\frac{q+6}{2}$, it follows that
$s\geq\frac{q+2}{2}$. Lemma 4.6 shows that
$\mathcal{L}({\mathbb{F}}_{q})\cap\mathcal{N}({\mathbb{F}}_{q})\neq\emptyset$.

  1. (a)

If $q=p$ and $d\leq q-1$, from Remark 2.6, we see that $\mathcal{N}$ must be
nonsingular plane conic. As observed above, in this case (C1)-(C4) can not be
satisfied simultaneously, and hence
$|\mathcal{C}({\mathbb{F}}_{q})|\leq(d-1)q+1$.

  2. (b)

If $q=p^{2}$, we have $d-s=2$ or $d-s=p+1$. When $d-s=2$, then we are done. If
$d-s=p+1$, the curve $\mathcal{N}$ is, in fact, a Hermitian curve. Since any
line in ${\mathbb{P}}^{2}({\mathbb{F}}_{q})$ intersects the Hermitian curve at
an ${\mathbb{F}}_{q}$-rational point, we see that (C4) is violated. Thus
$|\mathcal{C}({\mathbb{F}}_{q})|\leq(d-1)q+1$.

This completes the proof. ∎

We leave it to the reader to translate the results of Section 3 and Section 4
in terms of the determination of the corresponding weights of the projective
Reed-Muller codes. As it is clear from the context, the complete determination
of the second and third weights of the projective Reed-Muller codes is
intrinsically related to the determination of good upper bounds on the number
of ${\mathbb{F}}_{q}$-rational points on hypersurfaces that are absolutely
irreducible. We remark that these problems are difficult problems and will
require significant research in the future.

Acknowledgement The author is grateful to Professor Bhaskar Bagchi for some
intriguing discussions on the topic of this article.

## References

  * [1] S. Ballet and R. Rolland, On low weight codewords of generalized affine and projective Reed-Muller codes, _Des. Codes Cryptogr._ , 73 (2014), 271 – 297.
  * [2] C. Carvalho and V. G. L. Neumann, The next-to-minimal weights of binary projective Reed-Muller codes _IEEE Trans. Inform. Theory_ 62 (2016), No. 11, 6300 -6303.
  * [3] C. Carvalho and V. G. L. Neumann, On the next-to-minimal weight of projective Reed-Muller codes. _Finite Fields Appl._ 50 (2018), 382-390.
  * [4] J. P. Cherdieu and R. Rolland, On the number of points of some hypersurfaces in ${\mathbb{F}}_{q}^{n}$. _Finite Fields Appl._ 2 (1996), No.2, 214-224.
  * [5] M. Datta and S. R. Ghorpade, On a conjecture of Tsfasman and an inequality of Serre for the number of points on hypersurfaces over finite fields. _Mosc. Math. J._ , 15 (2015), 715-725.
  * [6] O. Geil, On the second weight of generalized Reed-Muller codes, _Des. Codes Cryptogr._ 48 (2008), No. 3, 323-330.
  * [7] A. Hefez and J. F. Voloch, Frobenius non classical curves. _Arch. Math_ 54, 263–273 (1990).
  * [8] J.W.P. Hirschfeld, L. Storme, J. A. Thas, and J. F. Voloch, A characterization of Hermitian curves. _J. Geom_ , 41, 72–78 (1991).
  * [9] M. Homma and S.J. Kim, Around Sziklai’s conjecture on the number of points of a plane curve over a finite field, _Finite Fields Appl._ 15 (2009) 468-474.
  * [10] M. Homma and S.J. Kim, Sziklai’s conjecture on the number of points of a plane curve over a finite field, II, in: G. McGuire, G.L. Mullen, D. Panario, I.E. Shparlinski (Eds.), Finite Fields: Theory and Applications, in: _Contemp. Math._ , 518, Amer. Math. Soc., Providence, 2010, pp. 225-234.
  * [11] M. Homma and S.J. Kim, Sziklai’s conjecture on the number of points of a plane curve over a finite field, III, _Finite Fields Appl._ 16 (2010) 315-319.
  * [12] M. Homma and S. J. Kim, An elementary bound for the number of points of a hypersurface over a finite field. _Finite Fields Appl._ 20 (2013), 76–83.
  * [13] T. Kasami, Shu Lin and W. Peterson, New generalizations of the Reed-Muller codes – I: Primitive codes, _IEEE Trans. Inform. Theory_ , 14 (1968), No. 2, 189-199.
  * [14] G. Lachaud, Projective Reed-Muller codes, _in Coding Theory and Applications_ (Cachan, 1986), Lecture Notes in Comput. Sci., 311, Springer, Berlin, 1988, 125–129.
  * [15] R. Lidl and H. Niederreiter, Finite Fields, 2nd Ed., Enc. of Math. and its Appl., Vol. 20, Cambridge University Press, Cambridge, 199
  * [16] F. Rodier and A. Sboui, Highest numbers of points of hypersurfaces over finite fields and generalized Reed-Muller codes. _Finite Fields Appl._ 14 (2008), No.3, 816–822.
  * [17] A. Sboui, Special numbers of rational points on hypersurfaces in the $n$-dimensional projective space over a finite field _Discrete Math._ 309 (2009), No. 16, 5048–5059.
  * [18] A. Sboui, Second highest number of points of hypersurfaces in ${\mathbb{F}}_{q}^{n}$ _Finite Fields Appl._ 13 (2007), No. 3, 444 - 449.
  * [19] J.-P. Serre, Lettre à M. Tsfasman du 24 Juillet 1989, _Journées Arithmétiques_ (Luminy, 1989). Astérisque No. 198-200 (1991), 351–353
  * [20] K. O. Stöhr and J. F Voloch, Weierstrass points and curves over finite fields _Proc. London Math. Soc._ (3) 52 (1986), No. 1, 1–19.
  * [21] A. B. Sørensen, Projective Reed-Muller codes, _IEEE Trans. Inform. Theory_ 37 (1991), No. 6, 1567-1576.
  * [22] A. L. Tironi, Hypersurfaces achieving the Homma-Kim bound. _Finite Fields Appl._ 48 (2017), 103–116.
  * [23] C. Zanella, Linear sections of the finite Veronese varieties and authentication systems defined using geometry, _Des. Codes Cryptogr._ 13 (1998), No. 2, 199-212.