arXiv:1208.1627v2 [] 12 Sep 2012

On the Hermitian curve, its intersections with
some conics and their applications to affinevariety codes and Hermitian codes
Chiara Marcolla (chiara.marcolla@unitn.it)
Department of Mathematics, University of Trento, Italy
Marco Pellegrini (pellegrini@mail.dm.unipi.it)
Department of Mathematics, University of Pisa, Italy
Massimiliano Sala (maxsalacodes@gmail.com)
Department of Mathematics, University of Trento, Italy

Abstract
For any affine-variety code we show how to construct an ideal whose solutions correspond to codewords with any assigned weight. We classify completely the intersections of the Hermitian curve with lines and parabolas (in the Fq2 affine plane).
Starting from both results, we are able to obtain geometric characterizations for
small-weight codewords for some families of Hermitian codes over any Fq2 . From
the geometric characterization, we obtain explicit formulae. In particular, we determine the number of minimum-weight codewords for all Hermitian codes with d ≤ q
and all second-weight codewords for distance-3, 4 codes.
Keywords: Affine-variety code, hamming weight, Hermitian code, Hermitian
curve, linear code, minimum-weight words, parabola.

1

Introduction

For any q, the Hermitian curve H is the planar curve defined over Fq2 by
the affine equation xq+1 = y q + y.
This curve has genus g = q(q−1)
and has q 3 rational affine points, plus one
2
point at infinity, so it has q 3 + 1 rational points over Fq2 and therefore it is a
maximal curve [RS94]. This is the best known example of maximal curve and
there is a vast literature on its properties, see [HKT08] for a recent survey.
Moreover, the Goppa code [Gop88] constructed on this curve is by far the most
studied, due to the simple basis of its Riemann-Roch space [Sti93], which can
be written explicitly. The Goppa construction has been generalized in [FL98]
to the so-called affine-variety codes.

2

Hermitian curves, intersection with conics, affine-variety codes.

Although a lot of research has been devoted to geometric properties of H,
here we present in this paper a classification result, providing for any q the
number of possible intersection points between any parabola and H. Moreover, we can characterize precisely the parabolas obtaining a given intersection
number and so we can count them.
In this paper we also provide an algebraic and geometric description for
codewords of a given weight belonging to any fixed affine-variety codes. The
specialization of our results to the Hermitian case permits us to give explicit
formulae for the number of some small-weight codewords. We expand on our
2006 previous result [SP06], where we proved the intimate connection between
curve intersections and minimum-weight codewords.
The paper is organized as follows:
• In Section 2 we provide our notation, our first preliminary results on the
algebraic characterization of fixed-weight codewords of any-affine variety
codes and some easy results on the intersection between the Hermitian
curve and any line.
• In Section 3 the main result is Theorem 3.1, where we provide a complete
classification of intersections between H and any parabola y = ax2 +
bx + c (a 6= 0). The proof is divided in three main parts. In the first
part of Section 3 we lay down some preliminary lemmas and we skecth
our proving argument, that is, the use of the authomorphism group for
H. In Subsection 3.1 we deal with the odd-characteristic case and in
Subsection 3.2 we deal with the even-characteristic case.
• In the beginning of Section 4 we provide a division of Hermitian codes
in four phases, which is a slight modification of the division in [HvLP98],
and we give our algebraic characterization of fixed-weight codewords of
any Hermitian codes. We study in deep the first phase (that is, d ≤ q) in
Subsection 4.2 and we use these results to completely classify geometrically the minimum-weight codewords for all first-phase codes in Subsection 4.3. In Subsection 4.4 we can count some special configurations of
second weight codewords for any first-phase code and finally in Subsection 4.5 we can count the exact number of second-weight codewords for
the special case when d = 3, 4. Most results in this section rely on our
results on intersection properties of H (with some special conics).
• In Section 5 we show how we computed specific examples and tested
experimentally all our counting results in several finite fields. We provide
all details to let the reader check our computations.
• In Section 6 we draw some conclusions and propose some open problems.

C. Marcolla, M. Pellegrini, M. Sala

2
2.1

3

Preliminary results
Known facts on Hermitian curve and Affine-variety code

From now on we consider Fq2 the finite field with q 2 elements, and Fq the
finite field with q elements, where q is a power of a prime. We call α a (fixed)
primitive element of Fq2 , and we consider β = αq+1 as a primitive element of
Fq . From now on q, q 2 , α and β are understand.
For any q, the Hermitian curve H = Hq is the curve defined over Fq2 by
the affine equation
xq+1 = y q + y

(1)

This curve has genus g = q(q−1)
and has n = q 3 rational affine points, denoted
2
by P1 , . . . , Pn . For any x ∈ Fq2 , the equation (1) has exactly q distinct solutions in Fq2 . The curve contains also one point at infinity P∞ , so it has q 3 + 1
rational points over Fq2 [RS94].
Let k ≥ 1. For any ideal I in a polynomial ring Fq [X], where X =
{x1 , . . . , xk }, we denote by V(I) ⊂ (Fq )k its variety, that is, the set of its
common roots. For any Z ⊂ (Fq )k we denote by I(Z) ⊂ Fq [X] the vanishing
ideal of Z, that is, I(Z) = {f ∈ Fq [x] | f (Z) = 0}.
Let g1 , . . . , gs ∈ Fq [X], we denote by I = hg1 , . . . , gs i the ideal generated
by the gi ’s. Let {xq1 − x1 , . . . , xqk − xk } ⊂ I. Then I is zero-dimensional and
radical [Sei74]. Let V(I) = {P1 , . . . , Pn }. We have an isomorphism of Fq vector
spaces (an evaluation map):
φ : R = Fq [x1 , . . . , xk ]/I −→ (Fq )n
f

(2)

7−→ (f (P1 ), . . . , f (Pn )).

Let L ⊆ R be an Fq vector subspace of R with dimension r.
Definition 2.1. The affine–variety code C(I, L) is the image φ(L) and the
affine–variety code C ⊥ (I, L) is its dual code.
Our definition is slightly different from to that in [FL98] and follows instead that in [MOS12]. Let L be linearly generated by b1 , . . . , br then the
matrix


b1 (P1 ) b1 (P2 ) . . . b1 (Pn )


..
.. 
 .
H =  ..
. ···
. 


br (P1 ) br (P2 ) . . . br (Pn )
is a generator matrix for C(I, L) and a parity–check matrix for C ⊥ (I, L).
For more recent results on affine-variety codes see [Gei08,MOS12,Lax12].

4
2.2

Hermitian curves, intersection with conics, affine-variety codes.

First results on words of given weight

Let 0 ≤ w ≤ n and C be a linear code. The Aw (C) = |{c ∈ C | w(c) = w}|.
Let z̄ ∈ (Fq )n , z̄ = (z̄1 , . . . , z̄n ). Then
⊥

z̄ ∈ C(I, L)

T

⇐⇒ H z̄ = 0 ⇐⇒

n
X

z̄i bj (Pi ) = 0 j = 1, . . . , r

(3)

i=1

Proposition 2.2 ([Pel06]). Let 1 ≤ w ≤ n.
Let Jw be the ideal in Fq [x1,1 , . . . x1,k , . . . , xw,1 , . . . xw,k , z1 , . . . , zw ] generated by
w
X

zi bj (Pi )

j = 1, . . . , r

(4)

i=1

gh (xi,1 , . . . xi,k )
ziq−1

i = 1, . . . , w and h = 1, . . . , s

− 1 i = 1, . . . , w

Y

(5)
(6)

((xj,l − xi,l )q−1 − 1)

1 ≤ j < i ≤ w.

(7)

1≤l≤k

Then any solution of Jw corresponds to a codeword of C ⊥ (I, L) with weight
w. Moreover,
|V(Jw )|
.
Aw (C ⊥ (I, L)) =
w!
Proof. Let σ be a permutation, σ ∈ Sn . It induces a permutation σ̂ acting over {x1,1 , . . . , x1,k , . . . , xw,1 , . . . xw,k , z1 , . . . , zw } as σ̂(xi,l ) = xσ̂(i),l and
σ̂(zi ) = zσ̂(i) . It is easy to show that Jw is invariant w.r.t. any σ̂, since each of
(4), (5), (6) and (7) is so.
Let Q = (x1,1 , . . . x1,k , . . . , xw,1 , . . . xw,k , z 1 , . . . , z w ) ∈ V(Jw ). We can associate a codeword to Q in the following way. For each i = 1, . . . , w, Pri =
(xi,1 , . . . xi,k ) is in V(I), by (5). We can assume r1 < r2 < . . . < rw , via a
permutation σ̂ if necessary. Note that (7) ensures that for each (i, j), with
i 6= j, we have Pri 6= Prj , since there is a l such that xi,l 6= xj,l . Since z q−1
=1
i
n
(6), z i ∈ Fq \ {0}. Let c ∈ (Fq ) be
c = (0, . . . , 0, z 1 , 0, . . . , 0, z i , 0, . . . , 0, z w , 0, . . . , 0).
↑

↑

↑

Pr1

Pri

Prw

We have that c ∈ C ⊥ (I, L), since (4) is equivalent to (3).
Reversing the previous argument, we can associate to any codeword a solution
of Jw . By invariance of Jw , we actually have w! distinct solutions for any
codeword. So, to get the number of codewords of weight w, we divide |V(Jw )|
by w!.

5

C. Marcolla, M. Pellegrini, M. Sala

Note that this approach is a generalization of the approach in [Sal07] to determinate the number of words having given weight for a cyclic code.
2.3

Intersection between the Hermitian curve H and a line
We consider the norm and the trace, the two functions defined as follows.
F

m

F

m

Definition 2.3. The norm NFqq and the trace TrFqq are two functions from
Fqm to Fq such that
F

m

NFqq (x) = x1+q+···+q

m−1

F

m

TrFqq (x) = x + xq + · · · + xq

m−1

We denote with N and Tr, respectively, the norm and the trace from Fq2
to Fq . It is clear that H = {N(x) = Tr(y) | x, y ∈ Fq2 }.
We can define a similar curve H0 = {N(x) = −Tr(y) | x, y ∈ Fq2 } and, using
the next lemma, it is easy to see that also H0 contains q 3 affine rational points.
A well-known fact is the following [LN86].
Lemma 2.4. For any t ∈ Fq , the equation Tr(y) = y q + y = t has exactly
q distinct solutions in Fq2 . The equation N(x) = xq+1 = t has exactly q + 1
distinct solutions, if t 6= 0, otherwise it has just one solution.
Proof. The trace is a linear surjective function between two Fq -vector spaces
of dimension, respectively, 2 and 1. Thus, dim(ker(Tr)) = 1, and this means
that for any t ∈ Fq the set of solutions of the equation Tr(y) = y q + y = t is
non-empty and then it has the same cardinality of Fq , that is, q.
The equation xq+1 = 0 has obviously only the solution x = 0. If t 6= 0,
since t ∈ Fq , we can write t = β i , so that x = αi+j(q−1) are all solutions. We
can assign j = 0, . . . , q, and so we have q + 1 distinct solutions.
Lemma 2.5. Let L be any vertical line {x = t}, with t ∈ Fq2 . Then L intersects H in q affine points.
Proof. For any t ∈ Fq2 , tq+1 ∈ Fq , and so the equation y q + y = tq+1 has
exactly q distinct solutions by applying Lemma 2.4.
Lemma 2.6. In the affine plane (Fq2 )2 , the total number of non-vertical lines
is q 4 . Of these, (q 4 − q 3 ) intersect H in (q + 1) points and q 3 are tangent to
H, i.e. they intersect H in only one point.
Proof. Let L any non-vertical line, then L = {y = ax + b}, with a, b ∈ Fq2 .
We have q 2 choices for both a and b, so the total number is q 4 . Then
H ∩ L = {(x, ax + b) | aq xq + bq + ax + b = xq+1 , x ∈ Fq2 }.
Let c = c(a, b) = aq+1 + bq + b, then c ∈ Fq . We have two distinct cases:

6

Hermitian curves, intersection with conics, affine-variety codes.

• c = 0. Then aq xq + bq + ax + b = xq+1 becomes aq xq − aq+1 + ax = xq+1 ,
which gives x = aq , that is, L is tangent.
• c 6= 0. Then aq xq +bq +ax+b = xq+1 becomes xq+1 −aq xq +aq+1 −ax = c,
which gives (x − aq )q+1 = c. Since c = (αq+1 )r for 1 ≤ r ≤ q − 1, we have
x = aq + αr+i(q−1) for any 0 ≤ i ≤ q.
The number of pairs (a, b) satisfying c(a, b) = 0 is q 3 , because they correspond
to the affine points of H0 , and those satisfying c 6= 0 are (q 4 − q 3 ).
Corollary 2.7. Let L be any horizontal line {y = b}, with b ∈ Fq2 . Then
if Tr(b) = 0, L intersects H in one affine point, otherwise, if Tr(b) 6= 0, L
intersects H in q + 1 affine points.
Proof. Apply Lemma 2.6 with a = 0.

7

C. Marcolla, M. Pellegrini, M. Sala

3

Intersection between Hermitian curve H and parabolas
We recall the definition of the Hermitian curve H on Fq2 , i.e.
xq+1 = y q + y.

Given two curves X and Y lying in the affine plane (Fq )2 it is interesting
to know the number of (affine plane) points that lie in both curves, disregarding multiplicity and other similar notions. We call this number their planar
intersection. This knowledge may have applications for the codes constructed
from X and Y . As regards H, it is interesting for coding theory applications
[Cou11,BR12a,BR12b,FM11] to consider an arbitrary parabola y = ax2 +bx+c
over Fq2 and to compute their planar intersection. Moreover, it is essential to
know precisely the number of parabolas having a given planar intersection
with H. Only partial results were known [DD10,DDK09], we present here for
the first time a complete classification in the following theorem.
Theorem 3.1. For q odd, the only possible planar intersections of H and a
parabola are {0, 1, q−1, q, q+1, 2q−1, 2q}. For any possible mutual intersection
we provide in the next tables the exact number of parabolas sharing that value.
0

1

q−1

q 2 (q + 1) (q−1)
2

q 2 (q + 1) q(q−3)
2

q 2 (q + 1) q(q−1)
2

#H∩ parabola
# parabolas

#H∩ parabola
# parabolas

2

q

q+1

q 2 (q + 1)(q 2 − q + 1)

q 2 (q + 1) q(q−1)(q−3)
2

2q − 1

2q

q 2 (q + 1) q(q−1)
2

q 2 (q + 1) (q−1)
2

#H∩ parabola
# parabolas

For q even, the only possible planar intersections of H and a parabola are
{1, q − 1, q + 1, 2q − 1}. For any possible mutual intersection we provide in the
next tables the exact number of parabolas sharing that value.
#H∩ parabola
# parabolas

#H∩ parabola
# parabolas

1

q−1

q 3 (q + 1)( 2q − 1)

q 3 (q + 1)(q − 1) 2q

q+1

2q − 1

q 3 (q + 1)(q − 1)( 2q − 1)

q 3 (q + 1) 2q

8

Hermitian curves, intersection with conics, affine-variety codes.

We begin with some simple lemmas.
Lemma 3.2. Let t ∈ F∗q2 , then there is a solution of xq−1 = t if and only if
N(t) = 1. In this case, xq−1 = t has exactly (q − 1) distinct solutions in Fq2 .
Proof. We consider the function f : Fq2 → Fq2 such that f (x) = xq−1 . We
want to prove that t ∈ Im(f ) ⇐⇒ N(t) = 1.
We can note that if t = αλ(q−1) for any λ, then x = αλ is a solution of
xq−1 = t. We claim that the solutions are:
x = αλ+k(q+1) con 0 ≤ k ≤ q − 2.
In fact (αλ+k(q+1) )q−1 = αλ(q−1) = t per 0 ≤ k ≤ q − 2. So if the equation
xq−1 = t has at least one solution, then it has at least q − 1 distinct solutions.
Since the equation degree is q − 1, then it has exactly q − 1 distinct solutions.
Further we can note that if t ∈ Im(f ) =⇒ N(t) = 1. In fact N(t) =
tq+1 = (xq−1 )q+1 = 1.
So Im(f ) ⊂ {N(t) = 1}. But |Im(f )| = q + 1 and |{N(t) = 1}| = q + 1
hence Im(f ) = {N(t) = 1}.
Remark 3.3. We note that 4N(a) = N(2a) for any a ∈ Fq2 .
Lemma 3.4. If q is odd and 4N(a) = 1 then a is a square in Fq2 .
Proof. Let a = αk , so that 4N(a) = 1 =⇒ 4αk(q+1) = 1 =⇒ 4β k = 1.
Since 4 is a square in Fq , we have
4 = β 2t =⇒ β 2t+k = 1 =⇒ 2t + k ≡ 0

mod q − 1,

so that k is even and a is a square.
We recall a well-known result in linear algebra:
Lemma 3.5. Let f : V → W be a linear function and f (ā) = a ∈ Im(f ).
Then f −1 (a) = ā + ker(f ) and
dim ker(f ) + dim Im(f ) = dim V
Lemma 3.6. For any a ∈ Fq2 , let f : Fq2 → Fq2 , f (x) = 2ax − xq . Then f is
Fq -linear.
Proof.
f (c + d) = 2ac − cq + 2ad − dq = f (c) + f (d).

∀ c, d ∈ Fq2
∀ c ∈ Fq 2

∀ k ∈ Fq

f (kc) = 2akc − k q cq = 2akc − kcq = kf (c).

9

C. Marcolla, M. Pellegrini, M. Sala

Thanks to Lemma 3.6 and Lemma 3.5 we have the following corollary:
Corollary 3.7. Let f : Fq2 → Fq2 such that f (x) = 2ax − xq . Then the
equation f (x) = k has q distinct solutions if k ∈ Im(f ), otherwise it has 0
solutions.
Lemma 3.8. Let y = ax2 + bx + c̄ and y = ax2 + bx + c be two parabolas. If
Tr(c̄) = Tr(c), then the planar intersections between the Hermitian curve H
and the parabolas are the same.
Proof. From {y = ax2 + bx + c̄} ∩ H and {y = ax2 + bx + c} ∩ H, we obtain
by direct substitution respectively xq+1 = aq x2q + ax2 + bq xq + bx + Tr(c̄) and
xq+1 = aq x2q + ax2 + bq xq + bx + Tr(c). If Tr(c̄) = Tr(c), the two equations are
identical.
We define the function Fa : Fq2 → Fq such that
Fa (x) = N(x) − Tr(ax2 ).

(8)

We can note that the following propriety holds for the function Fa :
Lemma 3.9. If ω ∈ Fq , then Fa (ωx) = ω 2 Fa (x).
Proof. Since ω ∈ Fq , we have Fa (ωx) = N(ωx) − Tr(a(ωx)2 ) = ω q+1 xq+1 −
a ω 2q x2q − aω 2 x2 = ω 2 (xq+1 − aq x2q − ax2 ) = ω 2 Fa (x).
q

We consider the automorphism group Aut(H) of the Hermitian curve. Any
automorphism σ ∈ Aut(H) has the following form, as in [Xin95]:
  

x
x + γ

σ  = 
q+1
q
y
 y + γ x + δ
with (γ, δ) ∈ H,  ∈ F∗q2 . If we choose  = 1 we obtain the following automorphisms

 x 7−→ x + γ
with (γ, δ) ∈ H,
(9)
 y 7−→ y + γ q x + δ
that form the subgroup Γ with q 3 elements, see Section II of [Sti88].
The reason why we are interested in the curve automorphisms is the following. If we apply any σ to any curve χ in the affine plane, then the planar
intersections between σ(χ) and H will be the same as the planar intersections
between χ and H. So, if we find out the number of intersections between χ
and H, we will automatically have the number of intersection between σ(χ)
and H for all σ ∈ Aut(H). This is convenient because we can isolate special
classes of parabolas that act as representatives in the orbit {σ(χ)}σ∈Γ . These

10

Hermitian curves, intersection with conics, affine-variety codes.

special types of parabolas may be easier to handle.
Two special cases of interest are parabolas of the form y = ax2 and
y = ax2 + c.
If we apply (9) to y = ax2 , we obtain
y = ax2 + x(2aγ − γ q ) + aγ 2 − δ.

(10)

while if we apply (9) to y = ax2 + c we obtain
y = ax2 + x(2aγ − γ q ) + aγ 2 − δ + c.

(11)

In the general case, if we have y = ax2 +bx+c and apply the automorphism
(9) we obtain
y = ax2 + (2aγ − γ q + b)x + aγ 2 + bγ − δ + c.

(12)

We need to study two distinct cases depending on the field characteristic.
Subsection 3.1 is devoted to the proof of the odd case of Theorem 3.1,
while Subsection 3.2 is devoted to the proof of the even case of Theorem 3.1.
3.1

Odd characteristic

In this subsection, q is always odd.
First, we consider a parabola of the form y = ax2 + c. Intersecting it with
the Hermitian curve, we obtain xq+1 = aq x2q + ax2 + Tr(c) which is equivalent
to
N(x) − Tr(ax2 ) = Fa (x) = Tr(c)

(13)

Now we have to study the number of solutions of (13). From this equation we
get aq x2q − xq+1 + ax2 = −Tr(c), that is,
x2 (aq x2q−2 − xq−1 + a) = −Tr(c).

(14)

Now we set xq−1 = t and we need to factorize the polynomial aq t2 − t + a in
Fq2 [t]. We obtain
p
√
1 ± 1 − 4N(a)
1± ∆
t1,2 =
=
2aq
2aq
where we set ∆ = 1 − 4N(a), that is,
√ !
√ !
1
+
∆
1
−
∆
aq x2 xq−1 −
xq−1 −
= −Tr(c).
q
q
2a
2a

(15)

C. Marcolla, M. Pellegrini, M. Sala

11

Since ∆ ∈ Fq , there is z ∈ Fq2 such that ∆ = z 2 , and so the polynomial is in
Fq2 [x].
We note that ∆ = 0 ⇐⇒ N(2a) = 1. So, in this special case, (15) becomes
aq x2 (xq−1 − 2a)2 = −Tr(c). We have proved the following lemma:
Lemma 3.10. By intersecting a parabola y = ax2 + c with N(2a) = 1 and the
Hermitian curve, we obtain the following equation
aq x2 (xq−1 − 2a)2 = −Tr(c).
Recall that α is a primitive element of Fq2 and β = αq+1 is a primitive
element of Fq .
Lemma 3.11. Let x = αj β i , with j = 0, . . . , q and i = 0, . . . , q − 2. Then
• If 4N(a) 6= 1, then all non-zero values Fa (αj β i ) are the elements of F∗q .
• If 4N(a) = 1, then all non-zero values Fa (αj β i ) are half of the elements
of F∗q .
Proof. We fix an index j such that Fa (αj ) 6= 0. The set of the values
{Fa (αj β i )}0≤i≤q−2 = {β 2i Fa (αj )}0≤i≤q−2 contains half of the elements of F∗q ,
q−1
2
is an integer) and so β 2( 2 ) = αq −1 = 1.
since q is odd (and q−1
2
If 4N(a) 6= 1, by varying j, we can obtain every element of F∗q .
In fact, Fa (x) = −x2 (aq x2q−2 + a − xq−1 ), so
Fa (αj ) = N(αj ) − Tr(a(αj )2 ) = β j − aα2j − aq α2jq = β j − β rj ,
where 0 ≤ rj ≤ q 2 − 2 and β 2i Fa (αj ) = β 2i+j − β 2i+rj , that are all elements of
F∗q .
By Lemma 3.10, if 4N(a) = 1 then Fa (x) becomes −aq x2 (xq−1 − 2a)2 , so
β 2i Fa (αj ) = −aq β 2i (αjq − 2aαj )2 , that are half of the elements of F∗q .
Now we study the number of solutions of equation (13).
We consider two cases: when Tr(c) = 0 and when Tr(c) 6= 0.
∗ Case Tr(c) = 0. By Lemma 3.8, it is enough to study the case c = 0,
which is the intersection between H and y = ax2 . By (15) we have
√ !
√ !
1
+
∆
∆
1
−
aq x2 xq−1 −
xq−1 −
= 0.
q
q
2a
2a
We must differentiate our argument depending on ∆. Recall that ∆ ∈ Fq .
- ∆ = 0. By Lemma 3.10, (15) becomes
aq x2 (xq−1 − 2a)2 = 0.
So we have always one solution x = 0 and the solutions of {xq−1 = 2a},
which are q − 1, since N(2a) = 1 and so we can apply Lemma 3.2.

12

Hermitian curves, intersection with conics, affine-variety codes.

Therefore, in this case, we have q points of intersections between the
parabola and the Hermitian curve H.
Since N(2a) = 1, we have (q + 1) distinct a’s.
- ∆ = 1. That is, N(2a) = 0 ⇐⇒ a = 0, but this is impossible.
- ∆ ∈ Fq \{0, 1}. We note that any element in Fq can always be written
as z 2 with z 2 ∈ Fq2 . In order to study the solutions of (15), we can
study the solutions of the following equations
xq−1 =

1±z
.
2aq

(16)

By Lemma
3.2 we know that xq−1 =

if N 1+z
= 1. Note that
2aq

N

1+z
2aq


= 1 ⇐⇒

1+z
2aq

have solutions if and only

1 − z2
= 1 ⇐⇒ 1+z = (1−z)q ⇐⇒ −z = z q
(1 − z)q+1

We obtain the same result for xq−1 = 1−z
.
2aq
If z is a solution of (16) and z ∈ Fq , then z satisfy simultaneously
z q = z and z q = −z. Since q is odd, this is possible only when z = 0,
which implies ∆ = 0, that is not admissible.
Returning to count the intersection points, thanks to the previous
discussion of the solution of (16), we have to consider two distinct
cases:
−1 =
(1) z = z q , that is, z ∈ Fq . It is easy to prove that there are q−1
2
q−3
2
possible
values
of
z
,
since
z
=
6
0,
1.
So
we
have
(q
+
1) q−3
2
2
values of a such that we have only one point of intersection (with
x = 0).
(2) z = −z q . The equation −z = z q has only one solution in Fq ,
so the other q − 1 solutions are in Fq2 \Fq . For such z, we have
2(q − 1) + 1 = 2q − 1 points of intersection. That is, q − 1
solutions from equation xq−1 = 1−z
, q−1 solutions from equation
2aq
1+z
q−1
x
= 2aq and one point from x = 0.
It is simple to verify that the z 2 such that z ∈ Fq2 \Fq are q−1
. So
2
we have (q + 1) q−1
values
of
a
such
that
we
have
exactly
2q
−1
2
points of intersection.
Now we apply the automorphism and we want to calculate how many
different parabolas we can obtain. Applying (9) to y = ax2 we obtain (10).
For the moment, we restrict our counting argument to the case ∆ 6= 0.
We can note that if ∆ 6= 0, we have a maximal orbit, that is, all possible
parabolas are distinct (they are q 3 because Γ has q 3 elements). In other
words, we claim that it is impossible that we obtain two equal parabolas

C. Marcolla, M. Pellegrini, M. Sala

13

with (γ, δ) 6= (γ̄, δ̄). To prove that, we have to solve the following system:


2aγ̄ − γ̄ q = 2aγ − γ q







aγ̄ 2 − δ̄ = aγ 2 − δ


γ q+1 = δ q + δ





γ̄ q+1 = δ̄ q + δ̄




 1 − 4aq+1 6= 0.

However, 2aγ̄ − γ̄ q = 2aγ − γ q ⇐⇒ 2a(γ̄ − γ) = γ̄ q − γ q = (γ̄ − γ)q =⇒
4aq+1 (γ̄ − γ)q (γ̄ − γ) = (γ̄ − γ)(γ̄ − γ)q ⇐⇒ 4aq+1 = 1. And it is
impossible, because ∆ 6= 0.
So when ∆ 6= 0 we have exactly q 3 distinct parabolas that have the same
planar intersections with H as y = ax2 has.
∗ Case y = ax2 + c, with Tr(c) 6= 0. As in previous case, we have to
differentiate depending on ∆.
- If ∆ = z 2 and z ∈ Fq , we know that Fa (x) vanishes only if x = 0. If
x 6= 0, then by Lemma 3.11, Fa (β i αj ) = β 2i Fa (αj ) can assume every
value of F∗q . But j can assume q + 1 distinct values, so every value of
F∗q is obtained q + 1 times. So the equation Fa (x) = Tr(c) has exactly
q + 1 solutions.
- If ∆ = z 2 and z ∈ Fq2 \Fq , we know that Fa (x) = 0 has 2q − 1
solutions. So there are exactly two distinct values of j such that
Fa (αj ) = 0, and so every value in F∗q is obtained q − 1 times. So the
equation Fa (x) = Tr(c) has exactly q − 1 solutions.
- If ∆ = 0 we have 4aq+1 = 1.
So (8) can be written as aq x2 (xq−1 − 2a)2 = −Tr(c), that is,
x2 (xq−1 − 2a)2 = −4aTr(c) = −4aβ r

(17)

for some fixed r with 1 ≤ r ≤ q − 1.
Note that (17) can be written as f (x)2 = −4aTr(c), where f is as in
Lemma 3.6, that is, f (x) = xq − 2ax.
We note that −4aβ r is always a square in Fq2 . In fact −4β r is a
square because lies in Fq , and also a is a square by Lemma 3.4. Let
us write −4aβ r = α2h , so (17) becomes x(xq−1 − 2a) = ± α h . Clearly,
2
0 ≤ h ≤ q 2−1 .
We consider the “positive” case:
f (x) = xq − 2ax = α h .

(18)

It is simple to prove that if x is a solution of equation xq − 2ax =
αh , then −x is a solution of the equation xq − 2ax = −αh . So by

14

Hermitian curves, intersection with conics, affine-variety codes.

Corollary 3.7 the equation Fa (x) = Tr(c) has 0 solutions if αh is not
in Im(f ) or 2q solution if αh is in Im(f ).
We consider a parabola y = ax2 + bx + c and apply the automorphism (9)
and we obtain (12).
Note that, for any k ∈ Fq2 ,
2aγ − γ q + b = k =⇒ 2abq + b = 2ak q + k.

(19)

1 q
1
1
In fact bq = (k−2aγ+γ q )q = k q − 2a
γ +γ = k q + 2a
(−γ q +2aγ) = k q + 2a
(k−b).

A consequence is that 2aγ − γ q + b = 0 =⇒ 2abq + b = 0.
We consider two distinct cases 2aγ − γ q + b = 0 and 2aγ − γ q + b 6= 0.
2aγ − γ q + b 6= 0.
Theorem 3.12. Let y = ax2 + bx + c be a parabola with 2abq + b 6= 0 and
N(2a) = 1. Then there exists a γ such that for any δ if we apply the automorphism (9) we obtain y = ax2 + (2aγ − γ q + b)x + aγ 2 + bγ − δ + c, with
2aγ − γ q + b 6= 0. We can write any such parabola as y = (ux + uv)2 where
a = u2 and v q + 2av 6= 0.
Proof. Thanks to (19) with k 6= 0 we have that, since 2abq + b 6= 0, then ∃ γ
such that 2aγ − γ q + b 6= 0.
Let k ∈ Fq2 such that 2aγ − γ q + b = k 6= 0. Using Corollary 3.7, if there exists
at least one solution of 2aγ − γ q = k − b, then there exists q solutions. So we
have at least q different γ’s that verify the previous equation.
To prove that any parabola as in (12) can be written as y = (ux + uv)2
with a = u2 and v q + 2av 6= 0, it is sufficient to prove that the solutions of the
following system contain all c’s.



2aγ − γ q + b = 2av 6= 0




 aγ 2 + bγ − δ + c = av 2 6= 0


γ q+1 = δ q + δ




 1 − 4aq+1 = 0
Using (19) the first equation of system 2aγ − γ q + b = 2av implies that v q +
2av 6= 0. In fact if we consider (19) with k = 2av, we have 0 6= 2abq + b =
2ak q + k = 2a(2av)q + 2av = v q + 2av.
By the second equation we have c = δ + av 2 − aγ 2 − bγ. So for any γ (and
there are q possible γ’s), there are q distinct δ’s (by the curve equation). So
we have q 2 different c’s, that is, all possible c’s.

15

C. Marcolla, M. Pellegrini, M. Sala

Finally, we can write (12) as y = a(x + v)2 . By Lemma 3.4, a = u2 is a square
so y = (ux + uv)2 .
Theorem 3.13. Let a, v ∈ Fq2 such that N(2a) = 1 and v q + 2av 6= 0. Then
the Hermitian curve H intersects a parabola y = a(x + v)2 in q points.
Proof. We have to solve the system

 y = (ux + uv)2
=⇒ xq+1 = (ux + uv)2q + (u + uv)2
 xq+1 = y q + y
By a change of variables z = ux + uv, we obtain ( z−uv
)q+1 = z 2q + z 2 , so we
u
have
−(uv)z q − (uv)q z + (uv)q+1 = uq+1 z 2q + uq+1 z 2 − z q+1 = uq+1 (z q − 2uq+1 z)2 .
Since N(2a) = 1 and a = u2 , we have uq+1 = ± 21 we have
1 q
(z − z)2 = N(uv) − Tr(z(uv)q )
2
1
− (z q + z)2 = N(uv) − Tr(z(uv)q )
2

(20)
(21)

We consider two cases:
∗ If uq+1 = 12 , we can note that (z q − z)2 is not a square in Fq if z q − z 6= 0.
In fact, if we suppose by contradiction that (z q − z)2 = β 2r , then z q − z =
β r ∈ Fq but also z q + z ∈ Fq , so −2z ∈ Fq ⇐⇒ z ∈ Fq and so z q − z = 0,
which is a contradiction.
∗ If uq+1 = − 21 , we can note that (z q + z)2 is a square in Fq , because
z q + z ∈ Fq .
Let t = N(uv) − Tr(z(uv)q ). So t ∈ Fq . Thanks to (20) we have 2t = (z q − z)2 ,
while (21) becomes −2t = (z q + z)2 .
So we have q−1
values of t (that are all the non-squares) and t = 0 when
2
q−1
1
q+1
u
= 2 , and 2 values of t (that are all the squares) and t = 0 when
uq+1 = − 21 .
Now we consider separately the case t = 0 and t 6= 0.
- We claim that if t = 0 and uq+1 = ± 12 =⇒ z ∈ Fq . We show only the
case uq+1 = 12 . With these assumptions (20) becomes
−(uv)z q − (uv)q z + (uv)q+1 = 0 ⇐⇒ z =

(uv)q+1
.
(uv)q + uv

16

Hermitian curves, intersection with conics, affine-variety codes.

We can note that since v q + 2av 6= 0, then (uv)q + uv 6= 0. In fact suppose
1
that v q + 2av = 0, so (uv)q + uv = − 2u
2av + uv = 0.
(uv)q+1
We have to verify that z q = z. Indeed z q = uv+(uv)
q = z.
Similar calculations (here omitted) show the case u = − 21 .
- We claim that if t 6= 0 and uq+1 = ± 21 =⇒ z 6∈ Fq . With these assumptions, we show only the case uq+1 = 21 . We have (z q − z)2 = 2t = α2r , that
is, z q = z ± αr . Now we substitute z q in −(uv)z q − (uv)q z + (uv)q+1 = t
and we obtain −(uv)(±αr + z) − (uv)q z + (uv)q+1 = 21 α2r , that is,
(uv)q+1 − 21 α2r ∓ uvαr
z=
Tr(uv)

(22)

We can note that αqr = −αr , in fact 2t = α2r ∈ Fq , so (α2r )q = α2r , that
is, αrq = ±αr but αr 6∈ Fq (since 2t is not a square in Fq ) so αqr = −αr .
We have thus proved
z=

(uv)q+1 − 21 α2r ± (uv)q αr
(uv)q+1 − 12 α2r ∓ uvαr
and z q =
Tr(uv)
Tr(uv)

Now we have to verify that the two z’s as in (22) are solutions of (20).
We have z q − z = ±αr and N(uv) − Tr(z(uv)q ) = t. So
±αr = z q − z ⇐⇒ ±Tr(uv)αr = ±(uv)q αr ± uvαr
and
(uv)q+1 − z(uv)q − z q (uv) = t
⇐⇒ (uv)q+1 Tr(uv) − (uv)q ((uv)q+1 − 12 α2r ± uvαr )+
−uv((uv)q+1 − 12 α2r ± uvαr ) = Tr(uv)t
⇐⇒ (uv)q+1 Tr(uv) + tTr(uv) − (uv)2q+1 − (uv)q+2 = Tr(uv)t
⇐⇒ (uv)q+1 Tr(uv) − (uv)2q+1 − (uv)q+2 = 0.

So the z’s are solutions of (20).
Similar calculations (omitted here) show the case uq+1 = − 21 .
Therefore, we have two solutions for any t not a square in F∗q and we have only
one solution when t = 0. That is, we get a total of q−1
2 + 1 = q intersections.
2
1
q+1
The same holds for the case with u
= −2.

C. Marcolla, M. Pellegrini, M. Sala

17

Now we consider the second case.
2aγ − γ q + b = 0.
We note that if 2aγ − γ q + b = 0 then 2abq + b = 0, and so (12) is actually
y = ax2 + c. Now we apply the automorphism (9) to the parabola y = ax2 + c
and we obtain (11). Now if
- ∆ 6= 0.
The parabolas in (10) are all distinct.
The values of c such that Tr(c) 6= 0 are exactly q 2 − q, but we must
be careful and not count twice the same parabola. In particular, if two
parabolas share a and b, then they are in the same orbit if Tr(c) = Tr(c0 ).
So we must consider only one of these for any non-zero trace Tr(c). These
values are q − 1. Summarizing:
∗ If ∆ = z 2 and z ∈ Fq (and Tr(c) 6= 0), then the number of parabolas
with q + 1 intersection is
1
q−3 3
q (q − 1) = q 3 (q 2 − 1)(q − 3).
(q + 1)
} 2
|
{z 2 } | {z
b,c
a

∗ If ∆ = z 2 and z q + z = 0 (and Tr(c) 6= 0), then the number of
parabolas with q − 1 intersection is
q−1 3
1
q (q − 1) = q 3 (q + 1)(q − 1)2 .
(q + 1)
} 2
|
{z 2 } | {z
b,c
a

- ∆ = 0, that is, 4aq+1 = 1.
We want to understand how many different parabolas of the type
y = ax2 + bx + c̄ (with a fixed) we can obtain. So we have to study the
number of pairs (b, c̄).
We note that
Tr(c̄) = aq b2 + Tr(c).
In fact
Tr(c̄) = (aγ 2 − δ)q + aγ 2 − δ + Tr(c)
= (aγ 2 )q + aγ 2 − γ q+1 + Tr(c) = aq γ 2 (γ q−1 − 2a)2 + Tr(c).
Let Tr(c) = k, with k ∈ F∗q . Let us consider two distinct cases:
- Tr(c) = Tr(c̄). By (23) we have that Tr(c) = Tr(c̄) ⇐⇒ b = 0.

(23)

18

Hermitian curves, intersection with conics, affine-variety codes.

So the pairs (0, c̄) are exactly q 2 − q, because they correspond to all
c̄ ∈ Fq2 such that Tr(c̄) 6= 0.
- Tr(c) 6= Tr(c̄). Then Tr(c̄) = aq b2 + k.
Since b = 2aγ − γ q , then, by considering all possible γ’s, we obtain
q − 1 distinct b’s.
In fact, we can consider the function f : Fq2 → Fq2 such that f (γ) =
2aγ − γ q . By Corollary 3.7, for any t ∈ Im(f ), the equation f (γ) = t
has q distinct solutions.
2
Since we are interested in the case b 6= 0, we have (q q−q) = q − 1
different b’s. We can note that if b is a solution of the equation 2aγ −
γ q = 0, also −b is.
Since we are interested in the pairs (b2 , c̄), we note that we have to
consider the equation Tr(c̄) = aq b2 + k, so the pairs (b2 , c̄) are exactly
q−1 2
(q − q). In fact there are exactly q−1
distinct b2 and for any
2
2
2
pairs (b , k) we have exactly q distinct c̄ ’s. While the possible k’s are
exactly q − 1 (because Tr(c) 6= 0).
(q 2 − q) = (q − 1)(q 2 − q).
All possible pairs (b, c̄) are 2 q−1
2
We fix a and we obtain exactly (q − 1)(q 2 − q) + q 2 − q = q 2 (q − 1)
parabolas of the type y = ax2 + bx + c̄.
In conclusion if ∆ = 0 and Tr(c) 6= 0, then we have q 2 (q + 1) q−1
2
parabolas with 2q or 0 intersections.
The last type of parabolas cannot be easily counted and so we obtain their
number by difference.
Claim 3.14. The parabolas that have q intersections with the Hermitian curve
H are q 2 (q + 1)(q 2 − q + 1).
Proof. The number of total parabolas is q 4 (q 2 −1). By summing all parabolas
that we already counted we obtain


q−1
q
q−1
2
2
+q
(q − 1 + q − 3) + (q − 1 + q − 3) + q − q + 1 =
q (q+1) 2
2
2
2
= q 2 (q + 1)(q 2 (q − 1)) = q 4 (q 2 − 1).
But this is exactly the number of parabolas, so we counted them all.
We have proved the following theorems, depending on the condition
Tr(c) = 0 or Tr(c) 6= 0.
Theorem 3.15. Let q be odd. The Hermitian curve H intersects a parabola
y = ax2 + c with Tr(c) = 0 in 2q − 1, q or 1 points.
Moreover, we have
q 3 parabolas that intersect H in 2q − 1 points.
(q + 1) q−1
2
q 2 (q + 1)(q 2 − q + 1) parabolas that intersect H in q points.

19

C. Marcolla, M. Pellegrini, M. Sala

(q + 1) q−3
q 3 parabolas that intersect H in one point.
2
Theorem 3.16. Let q be odd. The Hermitian curve H intersects a parabola
y = ax2 + c with Tr(c) 6= 0 in 2q, q + 1, q − 1 or 0 points.
Moreover, we have
parabolas that intersect H in 2q points.
q 2 (q + 1) q−1
2
q 3 (q + 1)(q − 1) q−3
parabolas that intersect H in q + 1 points.
2
2

q 3 (q + 1) (q−1)
parabolas that intersect H in q − 1 points.
2
parabolas that intersect H in 0 point.
q 2 (q + 1) q−1
2
Therefore, thanks to Theorem 3.15 and to Theorem 3.16, we obtain the
first half of Theorem 3.1.
3.2

Even characteristic

In this subsection, q is always even.
In this case we claim that it is enough to consider just two special cases:
y = ax2 and y = ax2 + c. Before studing the two cases, we consider the
following lemma:
Lemma 3.17. Let x = αj β i , with j = 0, . . . , q and i = 0, . . . , q − 2; then the
values Fa (αj β i ) that are not zero are all the elements of F∗q .
Proof. Fixing a index j, we have Fa (αj β i ) = β 2i Fa (αj ); if Fa (αj ) = 0 we
have finished, otherwise (by Lemma 3.9) β 2i Fa (αj ) are all elements of F∗q ,
because also β 2 is a primitive element of Fq .
We divide the study into two parts.
∗ Case y = ax2 . We intersect H with y = ax2 . As in (14), we obtain
x2 (aq x2q−2 − xq−1 + a) = 0. We set xq−1 = t and we have to solve the
equation aq t2 − t + a = 0. Setting z = taq we obtain
z 2 + z + aq+1 = 0.
It is known that this equation has solutions in a field of characteristic
F 2
even if and only if TrFq2 (aq+1 ) = 0 [D.93]. And this latter condition holds,
since we have
F

2

F

2

TrFq2 (aq+1 ) = TrFq2 (TrFqq (aq+1 )) = TrFq2 (0) = 0.
F

F

We also have N(t) = 1, in fact tq+1 = (xq−1 )q+1 = 1, then we have
z q+1 = N(z) = N(aq ) = aq

2 +q

= aq+1 = N(a)

20

Hermitian curves, intersection with conics, affine-variety codes.

and so the equation becomes
z 2 + z + z q+1 = 0.
since t 6= 0, z 6= 0, then we must have
z q + z = 1.
We can note that, since aq+1 ∈ Fq , then it is possible to calculate its trace
from Fq to F2 , and we obtain
TrFq2 (aq+1 ) = TrFq2 (z q+1 ) = TrFq2 (z 2 +z) = z+z 2 +z 2 +z 4 +. . .+z q/2 +z q = z+z q ;
F

F

F

If it is equal to 0, we have a contradiction, then there is not any solution
x ∈ Fq2 . On the other hand if it is equal to 1, then we have solutions.
When the solutions exist, since z q+1 = aq+1 , a solution z is aαj(q−1) ,
0
for some j, and the other is z + 1, which we can write as aαj (q−1) . From
j
each of these we have the corresponding t = ( αa )q−1 and so the x’s are
αj+i(q+1)
a

=

αj β i
a

and

αj

0 +i(q+1)

a

0

=

αj β i
,
a

with i = 0, . . . , q − 2.

We can summarize:
F

- If TrFq2 (aq+1 ) = 0, there is only one solution. This happens when
a = 0, which it is not acceptable, and for other 2q − 1 values of aq+1 ,
so the possible values of a are ( 2q − 1)(q + 1).
F
- If TrFq2 (aq+1 ) = 1, there are 2q−1 solutions. This happens for 2q values
of aq+1 , so the possible values of a are 2q (q + 1).
As in the odd case, we apply the automorphism (9) to the parabolas
of type y = ax2 and we can see that distinct automorphisms generate
distinct parabolas. We omit the easy adaption of our earlier proof.
So we have proved the following theorem:
Theorem 3.18. The Hermitian curve H and the parabola y = ax2 intersects in either one point or 2q − 1 points.
Moreover, from the application of (9) to these parabolas, we obtain:
q 3 ( 2q − 1)(q + 1) parabolas with one point of intersection with H.
q 3 2q (q + 1) parabolas with 2q − 1 points of intersection with H.
* Case y = ax2 + c with Tr(c) 6= 0. We consider the equation (8). We divide
the problem into two parts:
F

- If TrFq2 (aq+1 ) = 0, we know that Fa (x) is equal to zero only for
x = 0. If x 6= 0, then by Lemma 3.17 if we fix j we have that
Fa (x) = Fa (αj β i ) = β 2i Fa (αj ) are all the elements of F∗q . But j can
assume q + 1 distinct values, so any value of F∗q can be obtained q + 1

21

C. Marcolla, M. Pellegrini, M. Sala

times. So, the equation Fa (x) = Tr(c) has exactly q + 1 solutions.
F

- If TrFq2 (aq+1 ) = 1, Fa (x) = 0 has 2q − 1 solutions. So, if we fix an
index j, the values of Fa (αj β i ) = β 2i Fa (αj ) are all equal to zero or
are all the elements of F∗q . There are exactly two distinct values of
j that give zero, so any non-zero value of Fq can be obtained q − 1
times. So, the equation Fa (x) = Tr(c) has exactly q − 1 solutions.
We apply the automorphism (9) to the parabola y = ax2 + c and we obtain (11). These are all distinct and different from those of Theorem 3.18,
because the planar intersection of H and the previous parabolas are different. The values of c such that Tr(c) 6= 0 are exactly q 2 −q, but we must
be careful and not count twice the same parabola. In particular, if two
parabolas share a and b, then they are in the same orbit if Tr(c) = Tr(c̄).
So we must consider only one of these for any non-zero value of Tr(c).
These values are q − 1.
Summarizing, we have proved the following theorem:
Theorem 3.19. The Hermitian curve H and the parabola y = ax2 + c
with Tr(c) 6= 0 intersect in either q + 1 or q − 1 points.
Moreover, from the application of (9) to these parabolas, we obtain:
q 3 ( 2q − 1)(q + 1)(q − 1) parabolas (with TrFq2 (aq+1 ) = 0) with q + 1 points
of intersection with H.
F
q 3 2q (q + 1)(q − 1) parabolas (with TrFq2 (aq+1 ) = 1) with q − 1 points of
intersection with H.
F

By summing all parabolas that we have found in Theorem 3.18 and Theorem 3.19, we obtain
q
q
q
q 
− 1 + + (q − 1)( − 1 + ) =
q 3 (q + 1)
2
2
2
2
= q 3 (q + 1)(q − 1)(1 + q − 1) = q 4 (q 2 − 1).
Since this is exactly the total number of the parabolas, this means that
we actually considered all parabolas, and so we obtain the second half of
Theorem 3.1.
4

Small-weight codewords of Hermitian Codes

We recall that an affine-variety code is Im(φ(L)), where φ is as (2). We
consider a special case of affine-variety code, which is a Hermitian code.
2

2

Let I = hy q + y − xq+1 , xq − x, y q − yi ⊂ Fq2 [x, y] and let R = Fq2 [x, y]/I.
We take L ⊆ R generated by
Bm,q = {xr y s + I | qr + (q + 1)s ≤ m, 0 ≤ s ≤ q − 1, 0 ≤ r ≤ q 2 − 1},

22

Hermitian curves, intersection with conics, affine-variety codes.

Table 1
The four “phases”of Hermitian codes
Phase

m

Distance d

Dimension k

0 ≤ m ≤ q2 − 2

1

m = aq + b

a+1 a>b

0≤b≤a≤q−1

a+2 a=b

⇐⇒ d ≤ q

q3 −

a(a+1)
2

− (b + 1)

b≤q−2

q 2 − 1 ≤ m ≤ 2q 2 − 2q − 2
m = 2q 2 − q − aq − b − 1

2

1≤a≤q−1

(q − a)q − b a < b
(q − a)q

q3 − m +

q(q−1)
2

−1

q3 − m +

q(q−1)
2

−1

a≥b

0≤b≤q−1

3

2q 2 − 2q − 1 ≤ m ≤ q 3 − 1

m − q2 + q + 1

q3 ≤ m < q3 + q2 − q − 1
m = q 3 + aq + b

4

q 3 + aq + b − 2g

a<b

q 3 + aq + a + 1 − 2g b ≤ a

0 ≤ a ≤ q − 1,

k ≥ g − aq − b

0≤b≤q−2

where m is an integer such that 0 ≤ m ≤ q 3 + q 2 − q − 2. For simplicity, we also
write xr y s for xr y s + I. We consider the evaluation map (2) φ : R → (Fq2 )n .
We have the following affine–variety codes C(I, L) = SpanFq2 hφ(Bm,q )i and we
denote by C(m, q) = (C(I, L))⊥ its dual. Then the affine–variety code C(m, q)
is called the Hermitian code with parity-check matrix H.




H=




f1 (P1 ) . . . f1 (Pn )

..
.. 
..
.
.
.  where fj ∈ Bm,q

fi (P1 ) . . . fi (Pn )

(24)

The Hermitian codes can be divided in four phases ([Pel]), any of them having
specific explicit formulae linking their dimension and their distance, as in
Table 1.
In the remainder of this paper we focus on the first phase. This case can be
characterised by the condition d ≤ q.

23

C. Marcolla, M. Pellegrini, M. Sala

4.1

Corner codes and edge codes
The first-phase Hermitian codes can be either edge codes or corner codes.

Definition 4.1. Let 2 ≤ d ≤ q and let 1 ≤ j ≤ d − 1.
Let Ld0 = {1, x, . . . , xd−2 }, Ld1 = {y, xy, . . . , xd−3 y}, . . . , Ldd−2 = {y d−2 }.
Let l1d = xd−1 , . . . , ljd = xd−j y j−1 .
• If Bm,q = Ld0 t · · · t Ldd−2 , then we say that C(m, q) is a corner code
and we denote it by Hd0 .
• If Bm,q = Ld0 t · · · t Ldd−2 t {l1d , . . . , ljd }, then we say that C(m, q) is an
edge code and we denote it by Hdj .
From classical results in Table 1 we have
Theorem 4.2. Let 2 ≤ d ≤ q, 1 ≤ j ≤ d − 1. Then

d(Hd0 ) = d(Hdj ) = d,

dimFq2 (Hd0 ) = n−

d(d − 1)
d(d − 1)
, dimFq2 (Hdj ) = n−
−j
2
2

In other words, all φ(xr y s ) are linearly independent (i.e. H has maximal rank)
and for any distance d there are exactly d Hermitian codes (one corner code
and d − 1 edge codes). We can represent the above codes as in the following
picture, where we consider the five smallest non-trivial codes (for any q ≥ 3).
H20 is a [n, n − 1, 2] code.
Bm,q = L20 = {1}, so the paritycheck matrix of H20 is (1, . . . , 1).
H21 is a [n, n − 2, 2] code.
Bm,q = L20 t l12 = {1, x}
H30 is a [n, n − 3, 3] code.
Bm,q = L30 t L31 = {1, x, y}
H31 is a [n, n − 4, 3] code.
Bm,q = L30 t L31 t l13 = {1, x, y, x2 }
H32 is a [n, n − 5, 3] code.
Bm,q = L30 t L31 t {l13 , l23 }
{1, x, y, x2 , xy}

=

24
4.2

Hermitian curves, intersection with conics, affine-variety codes.

First results for the first phase
Ideal Jw of Proposition 2.2 for C(m, q) is
Jw =

D nP
w

o


, xq+1
− yiq − yi i=1,...,w ,
i
r
s
n 2
o x y ∈Bnm,q 2
o
n 2
o
q −1
zi
−1
, xqi − xi
, yiq − yi
,
i=1,...,w
i=1,...,w
nQ
o Ei=1,...,w
2
q 2 −1
− 1)((yi − yj )q −1 − 1 .
1≤i<j≤w ((xi − xj )
r s
i=1 zi xi yi

(25)

Let w ≥ v ≥ 1. Let Q = (x1 , . . . , xw , y 1 , . . . , y w , z 1 , . . . , z w ) ∈ V(Jw ). We
say that Q is in v-block position if we can partition {1, . . . , n} in v blocks
I1 , . . . , Iv such that
xi = xj ⇐⇒ ∃ 1 ≤ h ≤ v such that i, j ∈ Ih .
W.l.o.g. we can assume |I1 | ≤ · · · ≤ |Iv | and I1 = {1, . . . , u}. It is simple to
prove the following numerical lemma.
Lemma 4.3. We always have u+v ≤ w +1. If u ≥ 2 and v ≥ 2, then v ≤ b w2 c
and u + v ≤ b w2 c + 2.
We need the following technical lemma [Pel].
Lemma 4.4. Let us consider the edge code Hdj with 1 ≤ j ≤ d − 1 and
3 ≤ d ≤ w ≤ 2d − 3. Let Q = (x1 , . . . , xw , y 1 , . . . , y w , z 1 , . . . , z w ) be a solution
of Jw in v-block position, with v ≤ w, then exactly one of the following cases
holds:
(a) u = 1

v>d

w ≥d+1

(b) v = 1, that is, x̄1 = · · · = x̄w
If d = 2 and w = 2, then (a) holds for H21 .
Proof. We denote for all 1 ≤ h ≤ v
Xh = x̄i if i ∈ Ih ,

Zh =

X

z̄i ,

Yh,δ =

i∈Ih

X

ȳiδ z̄i with 1 ≤ δ ≤ u − 1

i∈Ih

(a) u = 1. We have to prove, by contradiction, that v > d.
w
Let v ≤ d. Since Q ∈ V(Jw ), then Lw
0 (Q) = l1 (Q) = 0, that is
0=

w
X
i=1

x̄ri z̄i =

X
i∈Ih

Xhr z̄i =

v
X
h=1

Xhr Zh

0 ≤ r ≤ d − 1.

(26)

25

C. Marcolla, M. Pellegrini, M. Sala

We can consider only the first v equations of (26), because v ≤ d, so


 
1 ... 1

 Z1


v

X
 X1 . . . X v  
.. 
r

Xh Zh = 0 0 ≤ r ≤ v − 1 ⇐⇒ 
.  = 0(27)
 ..
..  




.
.
.
.
.
h=1

 Zv
X1v−1 . . . Xvv−1
The above matrix is a Vandermonde matrix, so it has maximal rank v.
Therefore, the solution of (27) is (Z1 , . . . , Zv ) = (0, . . . , 0). Since u = 1,
then Z1 = z 1 = 0, which contradicts z i ∈ Fq2 \ {0}. So if v > d then
w ≥ d + 1.
(b) u ≥ 2. We suppose by contradiction that v ≥ 2.
We consider Proposition 2.2. A subset of equations of condition (4) is the
following system, where 0 ≤ r ≤ v
P
P
v
w
r
r




z̄
=
0
x̄


h=1 Xh Zh = 0
i=1 i i






 Pv X r Y = 0
 Pw x̄r ȳ z̄ = 0
i
i
h h,1
h=1
i=1 i
(28)
⇐⇒
.
.


..
..










 Pv X r Y
 Pw x̄r ȳ u−1 z̄ = 0
=0
i=1

i

i i

h=1

h h,u−1

In fact system (28) is a subset of (4) if and only if deg(x̄vi ȳiu−1 ) ≤ d − 1
for any i = 1, . . . , w. That is, v + (u − 1) ≤ d − 1 ⇐⇒ v + u ≤ d.
To verify it, since v ≥ 2, it is sufficient to apply Lemma 4.3 and we obtain
u + v ≤ b w2 c + 2 ≤ b 2d−3
c + 2 = d.
2
By system (28) we obtain u Vandermonde matrices (all having rank v).
Therefore, the solutions of these systems are zero-solutions. So, in the
particular case h = 1, we have Z1 = Y1,1 = . . . = Y1,u−1 = 0, that is
P


u

 

z̄
=
0
1
.
.
.
1

i=0 i





 z̄1 

 Pu ȳ z̄ = 0
 ȳ1 . . . ȳu  
. 
i=0 i i

⇐⇒ 
 ..  = 0


.
.
.

..

 .. . . . ..   



 z̄u


 Pu ȳ u−1 z̄ = 0
ȳ u−1 . . . ȳ u−1
i=0

i

i

1

u

Since the ȳi ’s are all distinct (because the x̄i ’s are all equal), we obtain
a Vandermonde matrix, and so z̄1 = · · · = z̄u = 0, but it is impossible
because z̄i ∈ Fq2 \ {0}. Therefore v = 1.
The case H21 is trivial.

26
4.3

Hermitian curves, intersection with conics, affine-variety codes.

Minimum-weight codewords

This is the first result relating intersection of lines with H and small-weight
codewords presented in [SP06].
Corollary 4.5. Let us consider the edge code Hdj with 1 ≤ j ≤ d − 1.
If Q = (x1 , . . . , xd , y 1 , . . . , y d , z 1 , . . . , z d ) ∈ V(Jd ), then x̄1 = · · · = x̄d . In
other words, the points that correspond to a minimum-weight word lie in the
intersection of the Hermitian curve H and a vertical line.
Whereas if d ≥ 4 and Q = (x1 , . . . , xd+1 , y 1 , . . . , y d+1 , z 1 , . . . , z d+1 ) ∈ V(Jd+1 ),
then one of the following cases holds
(a) x̄i 6= x̄j with i 6= j for 1 ≤ i, j ≤ d + 1
(b) x̄1 = · · · = x̄d+1 .
Proof. We are in the hypotheses of Lemma 4.4. So if w = d then u 6= 1.
So v = 1. Whereas, if w = d + 1 then there are two possibilities. In case
(a) of Lemma 4.4, all the x̄i ’s are different, since v = d + 1, or, case (b),
x̄1 = · · · = x̄d+1 .
Now we can prove the following theorem for edge codes.
Theorem 4.6. The number of minimum weight words of an edge code Hdj is
 
q
Ad = q (q − 1)
.
d
2

2

Proof. By Proposition 2.2 we know that Jd represents all words of minimum
weight. The first set of ideal basis (25) has exactly d(d−1)
+ j equations, where
2
1 ≤ j ≤ d − 1. So, if j = 1, this set implies the following system:



z̄1 + · · · + z̄d = 0







 x̄1 z̄1 + · · · + x̄d z̄d = 0




ȳ z̄ + · · · + ȳd z̄d = 0


 1 1
x̄21 z̄1 + · · · + x̄2d z̄d = 0



.

 ..






ȳ1d−2 z̄1 + · · · + ȳdd−2 z̄d = 0





 x̄d−1 z̄1 + · · · + x̄d−1 z̄d = 0
1
d

(29)

Whereas, if j > 1 then we have to add the first j −1 of following equations:

C. Marcolla, M. Pellegrini, M. Sala



x̄d−2 ȳ1 z̄1 + · · · + x̄d−2

d ȳd z̄d = 0

 1
..
.



 x̄ ȳ d−2 z̄ + · · · + x̄ ȳ d−2 z̄ = 0
1 1
1
d d
d

27

(30)

But x̄1 = . . . = x̄d , since we are in the hypotheses of Corollary 4.5. So the
system becomes



 z̄1 + · · · + z̄d = 0



 ȳ1 z̄1 + · · · + ȳd z̄d = 0
.

 ..




 d−2
ȳ1 z̄1 + · · · + ȳdd−2 z̄d = 0

(31)


We have q 2 choice for the x̄i ’s and, by Lemma 2.5, we have dq d! different
ȳi ’s, since for any choice of the x̄i ’s there are exactly q possible values for the
ȳi ’s, but we need just d of them and any permutation of these will be again a
solution. Now we have to calculate the solutions for the z̄i ’s.
We write the system (31) as a matrix, which is a Vandermonde matrix with
rank d − 1. This means that the solution space has linear dimension 1 because
1 = d − (d − 1) = number of variables − rank of matrix. So the solutions are
(a1 α, a2 α, . . . , ad−1 α) with α ∈ F∗q2 , where aj are fixed since they depend on ȳi .
 
So the number of the z’s is |F∗q2 | = q 2 − 1, then Ad = d!1 q 2 (q 2 − 1) dq d ! .
We consider now corner codes. We have the following geometric characterisation.
Proposition 4.7. Let us consider the corner code Hd0 , then the points
(x̄1 , ȳ1 ), . . . , (x̄d , ȳd ) corresponding to minimum-weight words lie on the same
line.
Proof. The minimum-weight words of a corner code have to verify the first
condition set of Jw , which has d(d−1)
equations. That is,
2



 z̄1 + · · · + z̄d = 0





x̄1 z̄1 + · · · + x̄d z̄d = 0





 ȳ1 z̄1 + · · · + ȳd z̄d = 0


x̄21 z̄1 + · · · + x̄2d z̄d = 0



 ..


.





 ȳ d−2 z̄1 + · · · + ȳ d−2 z̄d = 0
1
d

(32)

28

Hermitian curves, intersection with conics, affine-variety codes.

This system is the same as (29), but with a missing equation. This means that
(32) have all solutions of system (29) and other solutions.
If we consider a subset of (32):


z̄1 + · · · + z̄d = 0






x̄ z̄ + · · · + x̄d z̄d = 0


 1 1
x̄21 z̄1 + · · · + x̄2d z̄d = 0



.

 ..




 d−2
x̄1 z̄1 + · · · + x̄d−2
d z̄d = 0

(33)

we note that the z̄i ’s are all non-zero if all x̄i ’s are distinct (or all are equal).
Therefore, we have only two possibilities for the x̄i ’s: either are all different
or they coincide. The same consideration is true for the ȳi ’s, in fact when we
consider (32) and we exchange x with y, we obtain again (32).
So we have an alternative:
• The x̄i ’s are all equal or the ȳi ’s are all equal, so our proposition is true.
• The x̄i ’s and the ȳi ’s are all distinct. We prove that lye in the intersection
of a non-horizontal line.
Let y = βx+λ be a non-vertical line passing for two points in a minimum
weight configuration. We can do an affine transformation of this type:

 x = x0
 y = y 0 + ax0 a ∈ F 2
q

such that at least two of the y 0 ’s are equal and not all y’s are coincident.
Substituting the above transformation in (32) and applying some operations between the equations, we obtain a system that is equivalent to
(32). But this new system have all y 0 ’s equal (or all distinct), so the y 0 ’s
have to be all equal. Hence we can conclude that the points lie on the
same line.

We finally prove the following theorem:
Theorem 4.8. The number of words having weight d of a corner code Hd0 is

 3
q
q −d+1
Ad = q (q − 1)
.
d−1
d
2

2

Proof. Again, the points corresponding to minimum-weight words of a corner code have to verify (32). By above proposition, we know that these points

29

C. Marcolla, M. Pellegrini, M. Sala

lie in the intersections of any line and the Hermitian curve H.
Let Q = (x1 , . . . , xd , y 1 , . . . , y d , z 1 , . . . , z d ) ∈ V(Jd ) such that x1 = . . . =
xd , that is, the points (x̄i , ȳi ) lie on a vertical line. We know that the number
of such Q’s is
 
q
2 2
q (q − 1)
d! .
d
Now we have to calculate the number of solutions Q ∈ V(Jd ) such that (x̄i , ȳi )
lie on a non-vertical line.

By Lemma 2.6 we know that the number of the ȳi ’s and x̄i ’s is (q 4 −q 3 ) q+1
d !,
d
since for any choice of the ȳi ’s there are exactly q + 1 possible values for the
x̄i ’s, but we need just d of this (and the system is invariant). As regards the
number of the z̄i ’s, we have to calculate the number of solutions of system
(32).
We apply an affine transformation to the system (32) to obtain a horizontal
line, that is, to have all the x̄i ’s different and all the ȳi ’s are equal, so we
obtain a system equivalent to system (31). Therefore we have a Vandermonde
matrix, hence the number of the z̄i ’s is q 2 − 1. So
Ad =

1
d!

q 2 (q 2 − 1)

= q 2 (q 2 − 1)

4.4

q
d



d ! + (q 4 − q 3 )(q 2 − 1)

q+1
d

 
d!

 q3 −d+1
q
.
d−1
d

Second-weight codewords

In this section we state more theorems for edge and corner codes previously
consider in [Mar08]. We study the case when the xi ’s coincide or when the yi ’s
coincide.
Theorem 4.9. The number of words of weight d + 1 with y1 = . . . = yd+1 of
a corner code Hd0 is:


q+1
2
4
2
(q − q)(q − (d + 1)q + d)
.
d+1
Whereas for an edge code Hdj with 1 ≤ j ≤ d − 1 is:


q+1
2
(q − q)
.
d+1
Proof.
We have q 2 choice for the ȳi ’s and, by Corollary 2.7, we have

q+1
(d + 1)! different x̄i ’s, since for any choice of the ȳi ’s there are exactly
d+1
q + 1 possible values for the x̄i ’s, but we need just (d + 1) of them and any
permutation of these will be again a solution.
Now we have to calculate the solutions for the z̄i ’s, in the two distinct cases.

30

Hermitian curves, intersection with conics, affine-variety codes.

∗ Case Hd0 . By Proposition 2.2 we know that Jd represents all words of
minimum weight. The first set of ideal basis (25) has exactly d(d−1)
equa2
tions, which is system (32) with more variables, that is, instead of x̄d , ȳd
and z̄d , we have, respectively, x̄d+1 , ȳd+1 and z̄d+1 . Since ȳ1 = . . . = ȳd+1 ,
the said variation of system (32) is



z̄1 + · · · + z̄d+1 = 0






x̄ z̄ + · · · + x̄d+1 z̄d+1 = 0

 1 1
(34)
x̄21 z̄1 + · · · + x̄2d+1 z̄d+1 = 0



.

..





 x̄d−2 z̄ + · · · + x̄d−2 z̄
1
1
d+1 d+1 = 0
We can note that, if we write the system (34) as a matrix adding these
d−1
two equations xd−1
+ . . . + xd+1
= 0 and xd1 + . . . + xdd+1 = 0 we obtain a
1
Vandermonde matrix. So all rows of (34) are linearly independent. This
means that the solution space has linear dimension 2 because 2 = (d +
1) − (d − 1) = number of variables − rank of matrix. So the number of
the z’s is
q 2 ( for zd+1 ) · q 2 ( for zd ) − #(zi = 0 for at least an i).
We want to calculate the number of zi = 0 for at least one i.
Since the matrix H has maximum rank, we can apply the Gauss elimination to the system (34)



z̄1 + · · · + z̄d+1 = 0






h z̄ + . . . + h2,d z̄d + h2,d+1 + z̄d+1 = 0

 2,2 2
..
(35)
.




 hd−1,d−2 z̄d−2 + hd−1,d−1 z̄d−1 + hd−1,d z̄d + hd−1,d+1 z̄d+1 = 0




h
z̄
+h
z̄ + h
z̄
=0
d−1,d−1 d−1

d−1,d d

d−1,d+1 d+1

If we solve the system (35) we obtain
hd−1,d−1 z̄d−1 + hd−1,d z̄d + hd−1,d+1 z̄d+1 = 0

(36)

First of all we consider the case z̄d−1 = 0, that is
hd−1,d z̄d + hd−1,d+1 z̄d+1 = 0 ⇐⇒ z̄d = −

hd−1,d+1
z̄d+1
hd−1,d

(37)

The equation (37) in the variable z̄d+1 ∈ Fq2 has exactly q 2 solutions. In

31

C. Marcolla, M. Pellegrini, M. Sala

particular, we have the pair (z̄d , z̄d+1 ) = (0, 0) and other q 2 − 1 ways to
choose the variable z̄d+1 .
We have similar condition when z̄d = 0 and z̄d+1 = 0. As before we have
the pairs (z̄d−1 , z̄d+1 ) = (0, 0) and (z̄d−1 , z̄d ) = (0, 0) and other q 2 − 1 ways
to choose z̄d−1 and q 2 − 1 ways to choose z̄d .
So the equation (36) has exactly 3(q 2 −1)+|{(z̄d−1 , z̄d , z̄d+1 ) = (0, 0, 0)}| =
3q 2 − 2 solutions.
Now we consider the second last line of the system (35): hd−1,d−2 z̄d−2 +
hd−1,d−1 z̄d−1 + hd−1,d z̄d + hd−1,d+1 z̄d+1 = 0, that is,
z̄d−2 = −(kd−1 z̄d−1 + kd z̄d + kd+1 z̄d+1 )

(38)

First of all we have to study the case z̄d−2 = 0. We just studied the case
in which all variables z̄d−1 = z̄d = z̄d+1 = 0, so we have to study the case
kd
z̄d−1 + kd+1
z̄d =
when all variables are different from zero, that is, kkd−1
d+1
∗
2
−z̄d+1 = k ∈ Fq2 . So the equation (38) has exactly (q − 1) solutions.
We repeat the argument for each of system’s equations (35), that are
(d − 2), if we do not count the last equation. Therefore
#(z̄i = 0 for at least one i) = 3q 2 − 2 + (d − 2)(q 2 − 1) = (d + 1)q − d
So the system (35) has exactly q 4 −(d+1)q +d solutions, then the number
of words of weight d + 1 with y1 = . . . = yd+1 of Hd0 is:


q+1
(q − q)(q − (d + 1)q + d)
.
d+1
2

4

2

∗ Case Hdj . In this case the first set of ideal basis (25) contains exactly
d(d−1)
+ j equations, where 1 ≤ j ≤ d − 1. So, if j = 1, this set implies
2
the system (29) with more variables, that is, instead of x̄d , ȳd and z̄d , we
have, respectively, x̄d+1 , ȳd+1 and z̄d+1 . Whereas, if j > 1 then we have
to add the first j − 1 of equations (30) with more variables.
Since ȳ1 = . . . = ȳd+1 , the system becomes


 z̄1 + · · · + z̄d+1 = 0





x̄ z̄ + · · · + x̄d+1 z̄d+1 = 0


 1 1
x̄21 z̄1 + · · · + x̄2d+1 z̄d+1 = 0



..


.




 d−1
x̄1 z̄1 + · · · + x̄d−1
d+1 z̄d+1 = 0

(39)

This means that the solution space has linear dimension d − (d − 1) = 1.
So the number of the z’s is |F∗q2 | = q 2 − 1, then the number of words of

32

Hermitian curves, intersection with conics, affine-variety codes.

weight d + 1 with y1 = . . . = yd+1 of Hdj is:


q+1
2
2
(q − 1)(q − q)
.
d+1

Theorem 4.10. The number of words of weight d + 1 with x1 = . . . = xd+1
of a corner code Hd0 and of an edge code Hdj is:


q
2 4
2
q (q − (d + 1)q + d)
.
d+1
Proof. By Proposition 2.2 we know that Jd represents all words of minimum
weight. For an edge code the first set of ideal basis (25) implies, if j = 1 the
system (29) with more variables 1 and if j > 1 we have to add the first
j − 1 of equations (30) with more variables. Whereas, for a corner code, the
first set of ideal basis (25) implies the system (32) with more variables. But
x̄1 = . . . = x̄d+1 , so the systems becomes


z̄1 + · · · + z̄d+1 = 0





 ȳ1 z̄1 + · · · + ȳd+1 z̄d+1 = 0
..


.




 d−2
d−2
z̄d+1 = 0
ȳ1 z̄1 + · · · + ȳd+1

(40)


q
We have q 2 choice for the x̄i ’s and, by Lemma 2.5, we have d+1
(d + 1)!
different ȳi ’s, since for any choice of the x̄i ’s there are exactly q possible values
for the ȳi ’s, but we need just d + 1 of them and any permutation of these will
be again a solution. And we have (q 4 − (d + 1)q 2 + d) possible z̄i ’s which is
exactly the situation met in Theorem 4.9.
Theorem 4.11. The number of words of weight d + 1 of a corner code Hd0
with (xi , yi ) lying on a non-vertical line is:


q+1
4
3
4
2
(q − q )(q − (d + 1)q + d)
.
d+1
Theorem 4.12. The number of words of weight d + 1 of an edge code Hdj with
(xi , yi ) lying on a non-vertical line is:


q+1
4
3
2
(q − q )(q − 1)
.
d+1
1

instead of x̄d , ȳd and z̄d , we have, respectively, x̄d+1 , ȳd+1 and z̄d+1 . This is true
every time that we write with more variables

C. Marcolla, M. Pellegrini, M. Sala

33

The proofs are similar to those of the statements as in Section 4.2 and the
previous theorems and so are omitted.
In other cases, we have to consider the intersection of the curve with higher
degree curves and the formulae get more complicated. For example the cubic
found in [Cou11,BR12a].
Now we are going to study some special cases of Hermitian codes, that is,
we count the number of words having weight d + 1 for any Hermitian code
having distance d = 3 or d = 4. In the following subsection we are going to
prove these theorems:
Theorem 4.13. The number of words of weight 4 of a corner code H30 is:
1
A4 =
4

 3 



q
2 q+1
3
2
(q + 1) − q
(3q + 2q − 8) (q − 1)(q 3 − 3).
3
3

The number of words of weight 4 of an edge code H31 is:
 
 
2q
X
q
k
q 4 (q 2 − 1)2 (q − 1)2
4
2
2
A4 = q
(q − 4q + 3) +
+ (q − 1)
Nk
.
4
4
8
k=4
2

Where Nk is the number of parabolas and non-vertical lines that intersect H
in exactly k points.
The number of words of weight 4 of an edge code H32 is:


q+1
A4 = q (q − 1)
(2q 3 − 3q 2 − 4q + 9).
4
2

Theorem 4.14. The number of words of weight 5 of a corner code H40 is:
 
1 2 q
A5 = q
(q 3 − 4)(q 2 − 1)(q 2 − 4).
5
4
The number of words of weight 5 of all edge codes H4j for 1 ≤ j ≤ 3 is:


q+1
A5 = q (q − 1)
(2q 3 − 4q 2 − 5q + 16).
5
2

The formula for A4 of H31 in Theorem 4.13 contains some implicit values
Nk ’s. To derive explicit values it is enough to consider Theorem 3.1.

34
4.5

Hermitian curves, intersection with conics, affine-variety codes.

The complete investigation for d = 3, 4.

In this subsection we will study separately the following cases: H03 , H13 , H23 ,
H04 , {H4j }1≤j≤3 .
Study of H03 .
Now we count the number of words with weight w = 4. In this case, the first
condition set of Jw becomes:



z + z2 + z3 + z4 = 0

 1
x1 z1 + x2 z2 + x3 z3 + x4 z4 = 0



y z + y z + y z + y z = 0
1 1

2 2

3 3

4 4

We notice that this is a linear system in zi . We first choose 4 points Pi = (xi , yi )
on H and then we calculate the number of solutions in zi ’s. The coefficient
matrix is


1 1 1 1




 x1 x2 x3 x4  .


y1 y2 y3 y4

This matrix cannot have rank 1. If the rank is 2, this means that all Pi ’s lie
on a same line. The vector space of solutions has dimension 2, so that we have
q 4 − 4(q 2 − 1) − 1 solutions in zi ’s (we have to exclude the zero solution and
solutions with one zi = 0).
Otherwise, the rank is 3. In this case, we have 3 points on a same line,
say P1 , P2 , P3 , if and only if we have a square submatrix of order 3 whose
determinant is 0, but this implies that z4 = 0, which is not admissible. If we
choose 4 points such that no 3 of them lie on a same line, all zi ’s can be nonzero and we get a codeword. The vector space of solutions has dimension 1,
so that we have q 2 − 1 solutions in zi ’s (we have to exclude the zero solution).
If the rank is 2, the total number of solutions (in xi , yi , zi ) is
  


q+1
2 q
4
3
q
+ (q − q )
(q 4 − 4q 2 + 3).
4
4
If the rank is 3, the total number of solutions (in xi , yi , zi ) is
 3 
 


q
q+1
2 q
3
4
3
−q
(q − q) − (q − q )
(q 3 − q − 1)+
4
3
3
 


q
q+1
4
3
−q
− (q − q )
(q 2 − 1).
4
4
2

35

C. Marcolla, M. Pellegrini, M. Sala

Putting together, we get the total number of codewords of weight 4 of H03 :
 



 3 
q+1
q
3
4
3
3
2 q
(q − q) − (q − q )
(q − q − 1) (q 2 − 1)+
−q
A4 =
3
3
4


  
q+1
4
3
2 q
+ (q − q )
(q 4 − 5q 2 + 4).
+ q
4
4
Doing the calculations we obtain the first part of Theorem 4.13.
Study of H13 .
We count the number of words with weight w = 4. In this case, the first
condition set of Jw becomes:



z1 + z2 + z3 + z4 = 0




x z + x z + x z + x z = 0
1 1

2 2

3 3

4 4



y1 z1 + y2 z2 + y3 z3 + y4 z4 = 0




 x2 z + x2 z + x2 z + x2 z = 0
4 4
3 3
2 2
1 1
As above, we first choose 4 points Pi = (xi , yi ) on H and then we calculate
the number of solutions in zi ’s. The coefficient matrix is


1 1 1 1




 x1 x 2 x3 x4 
.

(41)


 y1 y2 y3 y4 


2 2 2 2
x1 x 2 x3 x4
Now we study the rank of the matrix according to “v-blocks”.
If all xi ’s are equal, we have 4 points on a vertical line; the rank is 2 (see
below) and the number of codewords is (see case H03 )
 
2 q
q
(q 4 − 4q 2 + 3).
4
If only three xi ’s are equal, we have 3 points on a vertical line and another
one outside, but this configuration is impossible for H03 (that is, we do not have
codewords associated to it), and it is also impossible for H13 , since H13 ⊂ H03 .
If we have two pairs of equal xi ’s (for instance, x1 = x2 6= x3 = x4 ), we
can have codewords. In this case, we deduce
z1 + z2 = 0, z3 + z4 = 0,
z1 (y1 − y2 ) + z3 (y3 − y4 ) = 0,

36

Hermitian curves, intersection with conics, affine-variety codes.



2
so that we have q2 ways to choose {x1 , x3 }, 2q ways to choose {y1 , y2 }, 2q
ways to choose {y3 , y4 }, q 2 − 1 ways to choose z1 , this determines all zi . The
number of codewords in this case is
q 4 (q 2 − 1)2 (q − 1)2
.
8
If only two xi ’s are equal, say x1 = x2 , we can show that we have z1 +z2 = 0,
z3 = 0, z4 = 0, which is not admissible.
If we have all xi ’s distinct, the submatrix


1 1 1 1




 x1 x2 x3 x 4 


2 2 2 2
x1 x2 x3 x 4
has rank 3, but if the whole matrix (41) has rank 4 we can only have the zero
solution, which is not admissible. Thus, (41) must have rank 3, that is, the
yi ’s row must be linearly dependent on the other rows. This means that
∃a, b, c ∈ Fq2

| ∀i = 1, . . . , 4 yi = ax2i + bxi + c,

that is, all Pi ’s lie on a same parabola (or on a same non-vertical line, when
a = 0). In this case, the number of codewords is
2q
X

 
k
(q − 1)
Nk
,
4
k=4
2

where Nk is the number of parabolas and non-vertical lines that intersect H
in exactly k points.
Putting all together we get A4 , that is, the second part of Theorem 4.13.
Study of H23 .
We count the number of words with weight w = 4. In this case, the first
condition set of Jw becomes:



z1 + z2 + z3 + z4 = 0






x z + x2 z2 + x3 z3 + x4 z4 = 0

 1 1
y1 z1 + y2 z2 + y3 z3 + y4 z4 = 0





x21 z1 + x22 z2 + x23 z3 + x24 z4 = 0




x y z + x y z + x y z + x y z = 0
1 1 1
2 2 2
3 3 3
4 4 4
As above, we first choose 4 points Pi = (xi , yi ) on H and then we calculate

37

C. Marcolla, M. Pellegrini, M. Sala

the number of solutions in zi ’s. The coefficient matrix is


1


 x1


 y1

 2
 x1

x1 y1

1

1

1





x4 


y2 y3 y4  .

2
2
2 
x2 x3 x4 

x2 y2 x3 y3 x4 y4
x2

x3

(42)

Now we study the rank of the matrix according to “v-blocks”.
If all xi ’s are equal, we have 4 points on a vertical line; the rank is 2 (see
below) and the number of codewords is (see case H13 )
 
q
q
(q 4 − 4q 2 + 3).
4
2

If only three xi ’s are equal, we have 3 points on a vertical line and another
one outside, but this configuration is impossible (as above).
If we have two pairs of equal xi ’s (for instance, x1 = x2 6= x3 = x4 ), we
can deduce
z1 + z2 = 0, z3 + z4 = 0,
and then

 z (y − y ) + z (y − y )
=0
1 1
2
3 3
4
 x z (y − y ) + x z (y − y ) = 0
1 1 1
2
3 3 3
4
but this system in the unknown y1 −y2 , y3 −y4 has determinant z1 z3 (x3 −x1 ) 6= 0,
so that y1 = y2 , which is impossible.
If only two xi ’s are equal, say x1 = x2 , we can show that we have z1 +z2 = 0,
z3 = 0, z4 = 0, which is not admissible.
If we have all xi ’s distinct, the submatrix




1 1 1 1




 x1 x2 x3 x4 


2 2 2 2
x1 x2 x3 x4
has rank 3, but if the whole matrix (42) has rank 4 we can only have the zero
solution, that is not admissible. Thus, (42) must have rank 3, that is, the yi ’s
and xi yi rows must be linearly dependent on the other rows. This means that
y = ax2 + bx + c and xy = dx2 + ex + f , then ax3 + (b − d)x2 + (c − e)x − f = 0.
But this equation can have at most 3 distinct solutions, and we need 4, then
we must have a = 0, b = d, c = e, f = 0, that is, y = bx + c: all Pi ’s lie on a

38

Hermitian curves, intersection with conics, affine-variety codes.

same non-vertical line, and the number of codewords is


q+1
4
3
(q − q )
(q 2 − 1).
4
Putting all together we get A4 , that is, the last part of Theorem 4.13.
Study of H04 .
We count the number of words with weight w = 5. We have a linear system
in zi with a (6 × 5) matrix. If its rank is 5, we can only have the zero solution,
which is not admissible. Thus, its rank must be at most 4; this means that we
have at least 2 relationships of linear dependency, say

 xy = a + bx + cy + dx2
 y 2 = e + f x + gy + hx2
we need to find 5 points on the intersection of 2 different conics, but this means
that the 2 conics must be degenerate, they must have a common line, and all
5 points belong to this line. We could distinguish between vertical lines and
non-vertical lines, but in both cases the rank of the matrix is exactly 3. So,
the number of codewords is



 
q+1
4
3
2 q
A5 = (q − q )
+q
(q 4 − 5q 2 + 4).
5
5
Doing the calculations we obtain the first part of Theorem 4.14.
Study of H14 , H24 , H34 .
To count the number of words with weight w = 5, we remember that
H04 ⊇ H14 ⊇ H24 ⊇ H34 ⊇ H05
and the first and the last code have all words with weight 5 corresponding to
5 points on a line. We notice that for a vertical line the rank of the matrix is
3, while for a non-vertical line the rank of the matrix is 4. So, the number of
codewords is
 


q+1
2 q
4
2
4
3
(q − 5q + 4) + (q − q )
(q 2 − 1).
A5 = q
5
5
Doing the calculations we obtain the last part of Theorem 4.14.
5

Computational verification

We have verified all our formulas for the number of small weight codewords, that is, Theorems 4.6, 4.8, 4.9, 4.11, 4.12, 4.13, 4.14.

C. Marcolla, M. Pellegrini, M. Sala

39

The verification has been done by computing a Gröbner basis of ideal Jw
for the corresponding case, as in Subsection 4.2, and counting the number
of its solutions as in [CCT08]. As software package we used Singular and
MAGMA [GPS07,MAG] and all our programmes and their digital certificates
are available under request.
6

Conclusions and open problems

The so-called first-phase codes have nice geometric properties that allow
their study, as first realized in [Pel06] and [SP06]. In particular, the fact that
all minimum-weight codewords lie on intersections of lines and H is essential. Recent research has widened this approach to intersection with degree-2
and degree-3 curves [Cou11,BR12b], unfortunately without reaching an exact
formula for higher weights. We believe that only complete classifications of intersections of H and higher degree curves can lead to the determination of the
full weight distribution of first-phase Hermitian codes. We invite the reader
to pursue this approach further.
As regards the other phases, it seems that only a part of the second phase
can be described in a similar way. Therefore, probably a radically different
approach is needed for phase-3, 4 codes in order to determine their weight
distribution completely. Alas, we have no suggestions as to how reach this.
Acknowledgements
This work was partially presented in 2006 at two conferences: [Pel06] and
[SP06], in 2010 at Workshop on Coding & Cryptography, Cork (Ireland), in
2011 at the Mzuni Math Workshop, Mzuzu University (Malawi) and at WCC
[PMS11].
The seminal idea behind our starting point (Proposition 2.2) was in the
second author’s PhD thesis [Pel], which was studied in deep and generalized
in the first author Master’s thesis and PhD thesis [Mar08,Mar]. The first two
authors would like to thank their supervisor, the third author.
The authors would like to thank C. Traverso for seminal discussions in
2005 on the relation between small-weight codewords and variety points.
References
[BR12a] E. Ballico and A. Ravagnani, On Goppa codes on the Hermitian curve,
Arxiv preprint arXiv:1202.0894 (2012).
[BR12b]

, On the geometry of Hermitian one-point codes, Arxiv preprint
arXiv:1203.3162 (2012).

40

Hermitian curves, intersection with conics, affine-variety codes.

[CCT08] M. Caboara, F. Caruso, and C. Traverso, Gröbner bases in public key
cryptography, Proc. of ISSAC 2008, to appear, 2008.
[Cou11]

A. Couvreur, The dual minimum distance of arbitrary-dimensional
algebraic–geometric codes, Journal of Algebra (2011).

[D.93]

Jungnickel D., Finite fields:
Wissenschaftsverlag, 1993.

[DD10]

G. Donati and N. Durante, On the intersection of a Hermitian curve with
a conic, Designs, Codes and Cryptography 57 (2010), no. 3, 347–360.

structure

and

arithmetics,

BI

[DDK09] G. Donati, N. Durante, and G. Korchmaros, On the intersection pattern
of a unital and an oval in pg (2, q2), Finite Fields and Their Applications
15 (2009), no. 6, 785–795.
[FL98]

J. Fitzgerald and R. F. Lax, Decoding affine variety codes using Gröbner
bases, Des. Codes Cryptogr. 13 (1998), no. 2, 147–158.

[FM11]

C. Fontanari and C. Marcolla, On the geometry of small weight codewords
of dual algebraic geometric codes, Arxiv preprint arXiv:1104.1320 (2011).

[Gei08]

O. Geil, Evaluation codes from an affine-variety codes perspective,
Advances in Algebraic Geometry codes (C.Munuera D. Ruano E.
Martinez-Moro, ed.), World Scientific, 2008, pp. p.153–180.

[Gop88]

V. D. Goppa, Geometry and codes, Mathematics and its Applications
(Soviet Series), vol. 24, Kluwer Academic Publishers Group, Dordrecht,
1988, Translated from the Russian by N. G. Shartse.

[GPS07] G.-M. Greuel, G. Pfister, and H. Schönemann, Singular 3.0. A computer
algebra system for polynomial computations, http://www.singular.unikl.de, 2007, Centre for Computer Algebra, University of Kaiserslautern.
[HKT08] J.W.P. Hirschfeld, G. Korchmáros, and F. Torres, Algebraic curves over
a finite field, Princeton Univ Pr, 2008.
[HvLP98] T. Høholdt, J. H. van Lint, and R. Pellikaan, Algebraic geometry of codes,
Handbook of coding theory, Vol. I, II (V. S. Pless and W.C. Huffman,
eds.), North-Holland, 1998, pp. 871–961.
[Lax12]

Robert F. Lax, Generic interpolation polynomial for list decoding, Finite
Fields and Their Applications 18 (2012), no. 1, 167–178.

[LN86]

R. Lidl and H. Niederreiter, Introduction to finite fields and their
applications, Cambridge University Press, Cambridge, 1986.

[MAG]

MAGMA: Computational Algebra System for Algebra, Number Theory
and Geometry, The University of Sydney Computational Algebra Group.,
http://magma.maths.usyd.edu.au/magma.

[Mar]

C. Marcolla, Ph.D. thesis, University of Trento, Work in progress.

C. Marcolla, M. Pellegrini, M. Sala

[Mar08]

41

, Parole di peso piccolo dei codici Hermitiani, Master’s thesis
(laurea specialistica), University of Trento, Department of Mathematics,
2008.

[MOS12] C. Marcolla, E. Orsini, and M. Sala, Improved decoding of affine-variety
codes, Journal of Pure and Applied Algebra 216 (2012), no. 7, 1533–1565.
[Pel]

M. Pellegrini, On the weight distribution of some Goppa AG codes, Ph.D.
thesis, University of Pisa, Work in progress.

[Pel06]

, On the weight distribution of Hermitian codes, Workshop
D1: Groebner bases in cryptography, coding theory and algebraic
combinatorics, Linz (2006).

[PMS11] M. Pellegrini, C. Marcolla, and M. Sala, On the weights of affine-variety
codes and some Hermitian codes, Proc. of WCC 2011, Paris (2011), 273–
282.
[RS94]

H.G. Ruck and H. Stichtenoth, A characterization of Hermitian function
fields over finite fields, Journal fur die Reine und Angewandte Mathematik
457 (1994), 185–188.

[Sal07]

M. Sala, Gröbner basis techniques to compute weight distributions of
shortened cyclic codes, Journal of Algebra and Its Applications 6 (2007),
no. 3, 403–404.

[Sei74]

A. Seidenberg, Constructions in algebra, Trans. Amer. Math. Soc. 197
(1974), 273–313.

[SP06]

M. Sala and M. Pellegrini, The number of minimum weight words for any
Hermitian code with d ≤ q, Third Workshop on Coding and Systems,
Zurich (2006).

[Sti88]

H. Stichtenoth, A note on Hermitian codes over GF(q 2 ), IEEE Trans.
Inform. Theory 34 (1988), no. 5, 1345–1348.

[Sti93]

, Algebraic function fields and codes, Universitext, Springer-Verlag,
Berlin, 1993.

[Xin95]

C. Xing, On automorphism groups of the Hermitian codes, Information
Theory, IEEE Transactions on 41 (1995), no. 6, 1629–1635.

