You are on page 1of 26

DETERMINING HULLS OF GENERALIZED REED-SOLOMON

CODES FROM ALGEBRAIC GEOMETRY CODES

XUE JIA, QIN YUE, HUAN SUN, AND JUNZHEN SUI

Abstract. In this paper, we provide conditions that hulls of generalized Reed-


Solomon (GRS) codes are also GRS codes from algebraic geometry codes. If the
conditions are not satisfied, we provide a method of linear algebra to find the bases
of hulls of GRS codes and give formulas to compute their dimensions. Besides,
arXiv:2401.13394v1 [cs.IT] 24 Jan 2024

we explain that the conditions are too good to be improved by some examples.
Moreover, we show self-orthogonal and self-dual GRS codes.

1. Introduction
Let Fq be a finite field with q elements and Fq [z] be the polynomial ring over
Fq , where q is a power prime. An [n, k, d] linear code C over Fq is a k-dimensional
subspace of Fnq with length n and minimum distance d. It is well known that the
parameters n, k, and d satisfy the Singleton bound: d ≤ n − k + 1. A linear code
with d = n − k + 1 is called a maximum distance separable (MDS) code, which is
extensively used in communications and has good applications in minimum storage
codes and quantum codes [2, 5–8, 10–12, 15, 18, 23, 26]. An important class of MDS
codes are generalized Reed-Solomon (GRS) codes, which can be encoded and decoded
efficiently. Moreover, some of the most important codes for practical use (such as
BCH codes and Goppa codes) can be represented as subcodes of GRS codes in a
natural way.
For two vectors x = (x1 , . . . , xn ) and y = (y1, . . . , yn ) of Fnq , the Euclidean inner
P
product of x and y is defined as hx, yi = ni=1 xi yi . Let C be a linear code over Fq ,
then the Euclidean dual code of C is defined by

C ⊥ = {x ∈ Fnq | hx, yi = 0 for all y ∈ C}.

The Euclidean hull of C is defined as Hull(C) = C ∩ C ⊥ , which was originally in-


troduced in 1990 by Assmus et al. [1] to classify finite projective planes. Extensive
research has shown that hulls of linear codes play an important role in coding theory.

2010 Mathematics Subject Classification. 94B05.


Key words and phrases. Hull, Generalized Reed-Solomon code, Rational algebraic geometry code,
Self-orthogonal code, Self-dual code.
The paper is supported by the National Natural Science Foundation of China ( No. 62172219 and
No. 12171420), the Natural Science Foundation of Shandong Province under Grant ZR2021MA046,
the Natural Science Foundation of Jiangsu Province under Grant BK20200268, the Innovation Pro-
gram for Quantum Science and Technology under Grant 2021ZD0302902.
1
2 JIA, YUE, SUN, AND SUI

Specifically, the hull of a linear code has become a central issue for the complexity of
algorithms for computing the automorphism group of a linear code and for checking
permutation equivalence of two linear codes [13, 14, 20–22]. There has been a large
number of studies on the hulls of linear codes, such as [4, 8, 9]. Recently, researchers
have focused their attention on Euclidean and Hermitian hulls of GRS codes due to
the wide applications in quantum communications [3, 8, 9, 25].
It is very interesting to consider some cases of hulls of linear codes. The linear
code C satisfying Hull(C) = {0} is called a linear complementary dual (LCD) code,
which has been intensively investigated in [2, 11, 17, 23]. The linear code C satisfying
Hull(C) = C (resp. C ⊥ ) is called a self-orthogonal (resp. dual-containing) code. In
particular, the linear code C satisfying C = C ⊥ is called a self-dual code. As everyone
knows, an [n, k, d] code C is self-dual, equivalent to dim(Hull(C)) = n2 for an even
integer n. Considerable research efforts have been devoted to the construction of
MDS self-orthogonal and MDS self-dual codes [5–7, 12, 15, 18, 24–26].
Lately, Gao et al. [9] gave a method to explore the Euclidean hulls of GRS codes
in terms of Goppa codes. Specifically, if GRSk (α, v) is a k-dimensional GRS code
over Fq associated with α and v and v = (v1 , . . . , vn ) satisfies vi = g(αi )−1 for a
polynomial g(z) ∈ Fq [z] of degree k, i = 1, . . . , n, then GRSk (α, v) is called a GRS
code via Goppa code. They determined the hulls of GRS codes via Goppa codes and
showed the hulls are also GRS codes via Goppa codes. Most recently, by expressing
a Reed-Solomon code RSk (α) as a rational algebraic geometry code, Chen et al. [3]
completely determined the dimension of the hull RSk (α) ∩ RSk (α)⊥ in terms of the
degree of some polynomials. However, they did not decide the specific form of the
hull. Based on [3] and [9], we shall provide conditions that hulls of GRS codes are
also GRS codes from algebraic geometry codes, which generalize the results in [9]. If
the conditions are not satisfied, then we shall give a method of linear algebra to find
the bases of hulls of GRS codes and give formulas to compute the dimensions of their
hulls. Besides, we explain that the conditions are too good to be improved by some
examples. Moreover, we show self-orthogonal or self-dual GRS codes.
This paper is organized as follows. In section 2, we recall some definitions and
important results about rational function fields. In section 3, we first represent a
GRS code and its dual code as rational algebraic geometric codes, then we provide
conditions that hulls of GRS codes are also GRS codes. If they are not satisfied,
we give a method to find the bases of the hulls and give formulas to compute the
dimensions of their hulls. Moreover, we show self-orthogonal and self-dual GRS codes.
In section 4, we conclude the paper.

2. Preliminaries
2.1. Rational function field.
HULLS OF GENERALIZED REED-SOLOMON CODES 3

In this subsection, we shall recall some basic knowledge and important results of
rational function fields (in detail, see [19]).

2.1.1. Rational function field and place.


In this paper, we always assume that F = Fq (z) is the rational function field over
Fq , where z is transcendental over Fq and Fq is called the field of constants of F/Fq .
For an irreducible monic polynomial p(z) ∈ Fq [z], the corresponding valuation ring
of F/Fq is defined by
 
f (z)
Op(z) := f (z), g(z) ∈ Fq [z], p(z) ∤ g(z) ; (2.1)
g(z)

and it has a unique maximal ideal Pp(z) = Op(z) \ Op(z) defined by
 
f (z)
Pp(z) = f (z), g(z) ∈ Fq [z], p(z)|f (z), p(z) ∤ g(z) , (2.2)
g(z)

where Op(z) is the group of units of Op(z) .
There is another valuation ring of F/Fq , namely
 
f (z)
O∞ := f (z), g(z) ∈ Fq [z], deg f (z) ≤ deg g(z) (2.3)
g(z)
with a unique maximal ideal
 
f (z)
P∞ = f (z), g(z) ∈ Fq [z], deg f (z) < deg g(z) . (2.4)
g(z)
In (2.2), the maximal ideal Pp(z) = (p(z)) is a principal ideal and is called a place
of F/Fq , where p(z) is called a prime element for Pp(z) ; in (2.4), the maximal ideal
P∞ = ( x1 ) is also a principal ideal and is called the infinite place of F/Fq , where x1 is
called a prime element for P∞ . Denote
PF := {P | P is a place of F/Fq } .
In general, for a place P ∈ PF and a prime element t for P , it is well known that
every 0 6= x ∈ F has a unique representation x = tn u with u ∈ OP∗ and n ∈ Z. Then
we define a discrete valuation of F/Fq as vP : F → Z ∪ {∞} such that vP (x) := n
and vP (0) := ∞, thus vP (xy) = vP (x) + vP (y) and vP (u) = 0 for u ∈ OP∗ . For a
place P ∈ PF , we have OP = {x ∈ F | vP (x) ≥ 0}, OP∗ = {x ∈ F | vP (x) = 0}, and
P = {x ∈ F | vP (x) > 0}. For x ∈ F and P ∈ PF , we say P is a zero of x of order m
if vP (x) = m > 0; P is a pole of x of order m if vP (x) = −m < 0.
Let P be a place of F/Fq and OP be its valuation ring. Since P is a maximal ideal,
the residue class ring OP /P is a field. Define the residue class map with respect to
P as follows:
F −→ OP /P ∪ {∞}
x ∈ OP 7−→ x(P ),
x ∈ F \ OP 7−→ ∞,
4 JIA, YUE, SUN, AND SUI

where x(P ) := x + P is the residue class of x modulo P . It is clear that OP ⊇ Fq


and deg P := [OP /P : Fq ] is called the degree of P . A place of degree one of F/Fq is
called a rational place of F/Fq . In the rational function field F , deg Pp(z) = deg p(z),
deg P∞ = 1, and all rational places are Pz−α and P∞ , where α ∈ Fq .

2.1.2. Divisor, the Riemann-Roch space, the Riemann-Roch Theorem.


The divisor group Div(F ) of F/Fq is defined by
X
Div(F ) = {D | D = nP P with nP ∈ Z, almost all nP = 0}.
P ∈PF
P
The zero element of Div(F ) is the divisor 0 := P ∈PF rP P, all rP = 0. The support
of a divisor D is defined as supp(D) := {P ∈ PF | nP 6= 0}. For a place Q ∈ PF and
P
a divisor D = nP P ∈ Div(F ), define vQ (D) := nQ and
X
D= vP (D)P.
P ∈PF

A partial ordering on Div(F ) is defined by

D1 ≤ D2 ⇐⇒ vP (D1 ) ≤ vP (D2 ) for all P ∈ PF .

A divisor D ≥ 0 is called positive (or effective). The degree of a divisor D is defined


P
as deg D := P ∈PF vP (D) deg P .
By [19, Corollary 1.3.4], a nonzero element x ∈ F has only finitely many zeros and
poles in PF . Let 0 6= x ∈ F and denote by Z (resp. N) the set of zeros (resp. poles)
of x in PF . Then we define
X
(x)0 := vP (x)P, the zero divisor of x,
P ∈Z
X
(x)∞ := (−vP (x)) P, the pole divisor of x,
P ∈N
X
(x) := (x)0 − (x)∞ = vP (x)P, the principal divisor of x.
P ∈PF

It is clear that (x)0 ≥ 0, (x)∞ ≥ 0. By vP (xy) = vP (x) + vP (y), (xy) = (x) + (y).
Since the elements in Fq have no zeros and no poles, there is a characterization of the
elements in Fq :
x ∈ Fq ⇐⇒ (x) = 0.
The set of divisors
P rinc(F ) := {(x) | 0 6= x ∈ F }
is called the group of principal divisors of F/Fq , which is a subgroup of Div(F ).
P P
For two divisors D1 = P ∈PF vP (D1 )P and D2 = P ∈PF vP (D2 )P , we define the
following operations:
X
D1 + D2 = (vP (D1 ) + vP (D2 ))P ;
P ∈PF
HULLS OF GENERALIZED REED-SOLOMON CODES 5

X
D1 ∩ D2 = min{vP (D1 ), vP (D2 )}P ;
P ∈PF
X
D1 ∪ D2 = max{vP (D1 ), vP (D2 )}P.
P ∈PF

For a divisor A ∈ Div(F ), define the Riemann-Roch space associated with A as

L (A) := {x ∈ F | (x) ≥ −A} ∪ {0} = {x ∈ F | vP (x) ≥ −vP (A) for all P ∈ PF }.

It is well known that L (A) is a vector space over Fq and the integer ℓ(A) := dim L (A)
is called the dimension of the divisor A. In terms of Riemann-Roch space, we list the
following properties in [19] for later use:
(1) If A < 0, then L (A) = {0} and ℓ(A) = 0.
(2) All principal divisors have degree zero. More precisely: let x ∈ F \ Fq and (x)0
resp. (x)∞ denote the zero resp. pole divisor of x. Then

deg(x)0 = deg(x)∞ .

(3) If A′ ∈ Div(F ) is a divisor satisfying A′ = A + (x) for some x ∈ F , then


L (A) ∼
= L (A′ ), ℓ(A) = ℓ(A′ ), and deg A = deg A′ .
(4) Let D1 and D2 be two divisors of F/Fq . Then

L (D1 ) ∩ L (D2 ) = L (D1 ∩ D2 ).

Now there is a very important fact to help us understand the above concepts.
(z)
For 0 6= x ∈ F , x = a · fg(z) with a ∈ Fq \ {0}, where f (z), g(z) ∈ Fq [z] are monic
and relatively prime, i.e., gcd(f (z), g(z)) = 1. Let
r
Y s
Y
ni
f (z) = pi (z) , g(z) = qj (z)mj
i=1 j=1

with pairwise distinct irreducible monic polynomials pi (z), qj (z) ∈ Fq [z] and positive
integers ni , mj , i = 1, . . . , r, j = 1, . . . , s. Then the principal divisor of x in Div(F )
appears thus :
r
X s
X
(x) = ni Pi − mj Qj + (deg g(z) − deg f (z))P∞ ,
i=1 j=1

where Pi and Qj are the places corresponding to pi (z) and qj (z), respectively.
One of the most important problems in the theory of algebraic function fields is
to calculate the dimension of a divisor. The answer to the problem will be given
by the Riemann-Roch Theorem. Since the description of the Riemann-Roch Theo-
rem involves many concepts, we shall introduce the theorem briefly here. Readers
interested in this can refer to section 1.5 in [19].
The genus g of F/Fq is defined as g := max{deg A − ℓ(A) + 1 | A ∈ Div(F )}. [19,
Example 1.4.18] tells us the rational function field F has genus g = 0, which is to say
the genus g in this paper is always equal to 0.
6 JIA, YUE, SUN, AND SUI

Theorem 2.1. (Riemann-Roch Theorem) ( [19, Theorem 1.5.15]) Let W be a canon-


ical divisor of F/Fq . Then for each divisor A ∈ Div(F ),
ℓ(A) = deg A + 1 − g + ℓ(W − A).

In fact, for a canonical divisor W , deg W = 2g − 2 = −2 by [19, Corollary 1.5.16]


and g = 0. If A is a divisor of F/Fq with deg A > 2g − 2 = −2, then ℓ(A) =
deg A + 1 − g = deg A + 1.

2.2. Rational algebraic geometry code.


In this subsection, we shall recall definitions and properties of rational algebraic
geometric (AG) codes and generalized Reed-Solomon codes (in detail, see [19]).
Let F = Fq (z) be the rational function field (genus g = 0), P1 , . . . , Pn pairwise
distinct places of F/Fq of degree one, D = P1 + · · · + Pn , and G a divisor of F/Fq
such that supp(G) ∩ supp(D) = ∅. Consider the evaluation map
evD : L (G) → Fnq , x 7→ (x(P1 ), . . . , x(Pn )),
which is a Fq -linear map with ker(evD ) = L (G−D). The rational algebraic geometry
code CL (D, G) associated with the divisors D and G of the rational function field F
is defined by
CL (D, G) := {(x(P1 ), . . . , x(Pn )) | x ∈ L (G)} = evD (L (G)) ⊆ Fnq .
Moreover, CL (D, G) is a code with parameters [n, k, d], where
k = ℓ(G) − ℓ(G − D) and d ≥ n − deg G.
And if deg G < n and {x1 , . . . , xk } is a basis of L (G), then dim(ker(evD )) = 0,
the evaluation evD : L (G) → CL (D, G) is injective, and CL (D, G) has a generator
matrix:  
x1 (P1 ) x1 (P2 ) · · · x1 (Pn )
 
 x2 (P1 ) x2 (P2 ) · · · x2 (Pn ) 
M =  .. .. .. .
 (2.5)
 . . . 
xk (P1 ) xk (P2 ) · · · xk (Pn )

Proposition 2.2. ( [19, Proposition 2.3.2]) Let C = CL (D, G) be a rational AG


code over Fq with parameters n and k. Then
(1) k = 0 if and only if deg G < 0, and k = n if and only if deg G > n − 2.
(2) For 0 ≤ deg G ≤ n − 2, k = 1 + deg G.
(3) C ⊥ is also a rational AG code.

Proposition 2.3. ( [19, Proposition 2.2.10]) Let CL (D, G) be a rational AG code.


Then
CL (D, G)⊥ = CL (D, D − G + (η)),
where η is a Weil differential (see [19, Definition 1.5.6]) such that vPi (η) = −1 and
ηPi (1) = 1 for i = 1, . . . , n.
HULLS OF GENERALIZED REED-SOLOMON CODES 7

Lemma 2.4. ( [19, Lemma 2.3.6]) Consider the rational function field F = Fq (z)
and n distinct elements α1 , . . . , αn ∈ Fq . Let Pi := Pz−αi be the rational places of
Q
z − αi and h(z) = ni=1 (z − αi ). Then there exists a Weil differential η of F/Fq with

(η) = (h′ (z)) − (h(z)) − 2P∞

satisfying
vPi (η) = −1 and ηPi (1) = 1, i = 1, . . . , n,
where h′ (z) ∈ Fq [z] is the derivative of the polynomial h(z).

Remark 2.5. In this paper, we always assume that gcd(n, q) = 1, so that deg h′ (z) =
n − 1 to omit unnecessary discussion.

There is an important result in the following research.

Lemma 2.6. ( [3, Lemma 7]) Let G1 and G2 be two divisors of the rational function
field F satisfying deg(G1 ∩ G2 ) > −2. Let D = P1 + · · · + Pn be a divisor of F/Fq ,
where P1 , . . . , Pn are pairwise distinct places of F/Fq of degree one. Then
(1) L (G1 ) + L (G2 ) = L (G1 ∪ G2 ).
(2) If supp(Gi ) ∩ supp(D) = ∅, i = 1, 2, then

CL (D, G1 ) + CL (D, G2) = CL (D, G1 ∪ G2 ).

Now we recall the definition of a generalized Reed-Solomon code, which is closely


related to a rational algebraic geometric code.

Definition 2.7. Let n be a positive integer with 1 < n < q. Let α = (α1 , . . . , αn ),
where αi are distinct elements of Fq , and v = (v1 , . . . , vn ), where vi are nonzero (not
necessarily distinct) elements of Fq , i = 1, . . . , n. For 1 ≤ k < n, the generalized
Reed-Solomon (GRS for short) code is defined by

GRSk (α, v) = {(v1 f (α1 ), . . . , vn f (αn )) : f (z) ∈ Fq [z], deg f (z) ≤ k − 1}. (2.6)

If vi = 1 for i = 1, . . . , n, then GRSk (α, v) is called a Reed-Solomon (RS) code. It


is clear that GRSk (α, v) has a generator matrix as follows:
 
v1 v2 ··· vn
 
 v1 α1 v2 α2 · · · vn αn 
 .. .. .. . (2.7)
 
 . . . 
v1 α1k−1 v2 α2k−1 · · · vn αnk−1
It is well known that GRSk (α, v) is an [n, k, n − k + 1] MDS code. In fact, all rational
AG codes over Fq of length n ≤ q are GRS codes [19, Proposition 2.3.3 (a)] .

Lemma 2.8.

GRSk (α, v) ∩ GRSk (α, v)⊥ = (GRSk (α, v) + GRSk (α, v)⊥ )⊥ .
8 JIA, YUE, SUN, AND SUI

Proof. It is clear that GRSk (α, v) ⊆ GRSk (α, v) + GRSk (α, v)⊥ , then

(GRSk (α, v) + GRSk (α, v)⊥ )⊥ ⊆ GRSk (α, v)⊥ .

Similarly,
(GRSk (α, v) + GRSk (α, v)⊥ )⊥ ⊆ GRSk (α, v).

Then
(GRSk (α, v) + GRSk (α, v)⊥ )⊥ ⊆ GRSk (α, v) ∩ GRSk (α, v)⊥ .

On the other hand,

dim(GRSk (α, v) + GRSk (α, v)⊥ )⊥ = n − dim(GRSk (α, v) + GRSk (α, v)⊥ )
= dim(GRSk (α, v)) + dim(GRSk (α, v)⊥ ) − dim(GRSk (α, v) + GRSk (α, v)⊥ )
= dim(GRSk (α, v) ∩ GRSk (α, v)⊥ ).

Therefore, we obtain the desired result. 

Chen et al. [3] expressed a k-dimensional Reed-Solomon (RS) code RSk (α) over
Fq associated with α = (α1 , . . . , αn ) as a rational algebraic geometry code, and they
completely determined the dimension of the hull RSk (α) ∩ RSk (α)⊥ in terms of the
degree of the derivative of h(z) and some relevant polynomials. Gao et al. [9] gave a
necessary and sufficient condition that the dual code of a GRS code via Goppa code
is also a GRS code via Goppa code. Under the above condition, they showed that
hulls of GRS codes via Goppa codes are also GRS codes via Goppa codes. Naturally,
we shall consider the following questions.
Questions:
(1) What is the hull of a GRS code denoted by a rational algebraic geometry code?
(2) What is the condition that the hull of a GRS code denoted by a rational
algebraic geometry code is also a GRS code?
In this paper, we shall provide conditions that hulls of GRS codes denoted by
rational algebraic geometry codes are also GRS codes. If they are not satisfied, we
shall give a method of linear algebra to find the bases of hulls of GRS codes.

3. Hulls of generalized Reed-Solomon Codes


In this section, we first represent a GRS code and its dual code as rational algebraic
geometry codes. After that, we shall provide conditions that hulls of GRS codes are
also GRS codes from algebraic geometric codes. If the conditions are not satisfied,
then we shall give a method of linear algebra to find the bases of hulls of GRS
codes and give formulas to compute their dimensions. Besides, we explain that the
conditions are too good to be improved by some examples.
In this paper, we always assume the following notations:
HULLS OF GENERALIZED REED-SOLOMON CODES 9

F∗q = Fq \{0} consists of all non-zero elements of Fq .


F = Fq (z) is the rational function field over Fq .
v = (v1 , . . . , vn ), where vi , i = 1, . . . , n, are nonzero elements of Fq .
α = (α1 , . . . , αn ), where αi , i = 1, . . . , n, are distinct elements of Fq .
Q
h(z) = ni=1 (z − αi ) ∈ Fq [z].
h′ (z) ∈ Fq [z] is the derivative of the polynomial h(z).
Pi := Pz−αi are the rational places of the irreducible polynomials z − αi , i = 1, . . . , n.
P∞ is the infinite place of F/Fq defined by (2.4).
D = P1 + · · · + Pn = (h(z)) + nP∞ ∈ Div(F ).

Proposition 3.1. Let a GRS code GRSk (α, v) be defined by Definition 2.7. Then
the k-dimensional GRS code GRSk (α, v) can be represented by a rational algebraic
geometry code as follows:

GRSk (α, v) = CL (D, (k − 1)P∞ + (s(z))),


1
where s(z) ∈ Fq [z] is a polynomial with 0 ≤ deg s(z) < n and s(αi ) = vi
∈ F∗q ,
i = 1, . . . , n.

Proof. Note that the k-dimensional GRS code GRSk (α, v) has a generator matrix de-
fined by (2.7). According to Lagrange interpolation, there exists a unique polynomial
s(z) ∈ Fq [z] with 0 ≤ deg s(z) < n such that
1
s(αi ) = ∈ F∗q , i = 1, 2, . . . , n.
vi
1 z k−1
Then it is easy to verify that { s(z) , s(z) , . . . , zs(z) } is a basis of L ((k − 1)P∞ + (s(z))).
In fact, by Theorem 2.1 and deg((k − 1)P∞ + (s(z))) = k − 1 > −2, dim(L ((k −
1)P∞ + (s(z)))) = deg((k − 1)P∞ + (s(z))) + 1 = k. On the other hand, there are k
1 z k−1
Fq -linearly independent elements: s(z) , s(z) , . . . , zs(z) , in L ((k − 1)P∞ + (s(z))). Then
1 z k−1
{ s(z) , s(z) , . . . , zs(z) } is a basis of L ((k − 1)P∞ + (s(z))).
Hence CL (D, (k − 1)P∞ + (s(z))) has the generator matrix as (2.7), i.e.,

GRSk (α, v) = CL (D, (k − 1)P∞ + (s(z))).

Remark 3.2. Recall the k-dimensional GRS code via Goppa code GRSk (α, v) in [9],
where v = (v1 , . . . , vn ) satisfies vi = g(αi )−1 for a polynomial g(z) ∈ Fq [z] of degree k,
i = 1, . . . , n. What is different is that the polynomial g(z) ∈ Fq [z] in [9] is of degree
k, while the polynomial s(z) ∈ Fq [z] in Proposition 3.1 is of degree less than n, which
is not necessarily k.

Proposition 3.3. Let GRSk (α, v) be the GRS code in Proposition 3.1. Then

GRSk (α, v)⊥ = CL (D, (k − 1)P∞ + (s(z)))⊥ = CL (D, (n − k − 1)P∞ + (t(z)))


10 JIA, YUE, SUN, AND SUI

if and only if
s(z)t(z) = u(z)h(z) + h′ (z), (3.1)
where u(z) ∈ Fq [z] is of degree at most n − 2 and t(z) ∈ Fq [z] is a polynomial with
′ (α )
0 ≤ deg t(z) < n and t(αi ) = hs(α i
i)
, i = 1, 2, . . . , n.

Proof. By Proposition 2.3, Lemma 2.4, and the principal divisor (h(z)) = D − nP∞ ,
GRSk (α, v)⊥ = CL (D, (k − 1)P∞ + (s(z)))⊥
= CL (D, D − ((k − 1)P∞ + (s(z))) + (h′ (z)) − (h(z)) − 2P∞ )
= CL (D, −(s(z)) + (h′ (z)) + (n − k − 1)P∞ ).

By the proof of Proposition 3.1, it is easy to check that { hs(z) s(z) s(z) n−k−1
′ (z) , h′ (z) z, . . . , h′ (z) z }
′ ⊥
is a basis of L (−(s(z)) + (h (z)) + (n − k − 1)P∞ ), then GRSk (α, v) has a generator
matrix:  
s(α1 ) s(αn )
h (α1 )
′ · · · h (αn )

1) s(αn )
 hs(α
 
′ (α ) 1
1
α · · · α
h′ (αn ) n 
H= 
.. ..
.

 . . 
s(α1 ) n−k−1 s(αn ) n−k−1
α
h′ (α1 ) 1
··· α
h′ (αn ) n

According to Lagrange interpolation again, there exists a polynomial t(z) ∈ Fq [z]


with 0 ≤ deg t(z) < n such that
h′ (αi )
t(αi ) = , s(αi )t(αi ) = h′ (αi ), i = 1, 2, . . . , n.
s(αi )
Hence h(z) | (s(z)t(z) − h′ (z)), i.e.,
s(z)t(z) = u(z)h(z) + h′ (z),

where u(z) ∈ Fq [z] is of degree at most n − 2 (by convention, we set deg 0 = −∞).
Moreover,
GRSk (α, v)⊥ = CL (D, (n − k − 1)P∞ + (t(z))),
which completes the proof. 

Remark 3.4. If s(z) ∈ Fq [z] is a polynomial of degree k such that s(αi ) = v1i ∈ F∗q ,
i = 1, 2, . . . , n, then (k − 1)P∞ + (s(z)) = (s(z))0 − P∞ and −(s(z)) + (h′ (z)) + (n −
k − 1)P∞ = (h′ (z)) + (n − 1)P∞ − (s(z))0 . From [19, Proposition 2.3.11], we know
that CL (D, −(s(z)) + (h′ (z)) + (n − k − 1)P∞ ) is just the Goppa code with the Goppa
polynomial s(z), while CL (D, (k − 1)P∞ + (s(z))) is the dual code of Goppa code, i.e.,
the GRS code GRSk (α, v) via Goppa code in [9].

In the following, we always assume that GRSk (α, v) = CL (D, (k − 1)P∞ + (s(z)))
and GRSk (α, v)⊥ = CL (D, (n − k − 1)P∞ + (t(z))) be the two GRS codes in Propo-
sitions 3.1 and 3.3, respectively, where

s(z)t(z) = u(z)h(z) + h′ (z)


HULLS OF GENERALIZED REED-SOLOMON CODES 11

and deg u(z) ≤ n − 2. Define


(
−1, if u(z) = 0,
ε= (3.2)
deg u(z), if u(z) 6= 0.
Then deg s(z) + deg t(z) = n + ε.
According to Lemmas 2.6 and 2.8, we can transform the problem of studying the
hull of a GRS code into the problem of studying the sum of a GRS code and its dual
code.

Theorem 3.5. If k + ε − deg d(z) − 1 < deg s(z) < k + 2ε , then


Hull(GRSk (α, v)) = CL (D, (d(z)) + (deg d(z) + deg s(z) − k − ε − 1)P∞ ) (3.3)
is a GRS code.
If k + 2ε ≤ deg s(z) < k + deg d(z) + 1, then
Hull(GRSk (α, v)) = CL (D, (d(z)) + (k + deg d(z) − deg s(z) − 1)P∞ ) (3.4)
is a GRS code.
Moreover, if k + ε − deg d(z) − 1 < deg s(z) < k + deg d(z) + 1, then the hull of
GRSk (α, v) is also a GRS code.

Proof. Denote divisors


G1 = (k − 1)P∞ + (s(z)) = (s(z))0 + (k − 1 − deg s(z))P∞ (3.5)
and
G2 = (n − k − 1)P∞ + (t(z)) = (t(z))0 + (n − k − 1 − deg t(z))P∞ .
In fact, deg s(z) + deg t(z) = n + ε and
G2 = (t(z))0 + (deg s(z) − ε − k − 1)P∞ . (3.6)
In the following, we consider the condition deg(G1 ∩ G2 ) > −2 in Lemma 2.6 in
two cases.
Case 1: deg s(z) < k + 2ε . It is clear that
G1 ∩ G2 = (d(z))0 + min{k − 1 − deg s(z), deg s(z) − ε − k − 1}P∞ .
Suppose that k − 1 − deg s(z) ≤ deg s(z) − ε − k − 1. Then deg s(z) ≥ k + 2ε ,
which is contradictory. Hence G1 ∩ G2 = (d(z))0 + (deg s(z) − ε − k − 1)P∞ and
deg(G1 ∩ G2 ) = deg d(z) + deg s(z) − ε − k − 1. Then deg(G1 ∩ G2 ) > −2 if and only
if k + ε − deg d(z) − 1 < deg s(z) < k + 2ε .
If k + ε − deg d(z) − 1 < deg s(z) < k + 2ε , then by deg l(z) + deg d(z) = deg s(z) +
deg t(z) = n + ε,

G1 ∪ G2 = (l(z))0 + max{k − 1 − deg s(z), deg s(z) − ε − k − 1}P∞


= (l(z))0 + (k − 1 − deg s(z))P∞
= (l(z)) + (n + ε − deg d(z) + k − 1 − deg s(z))P∞ .
12 JIA, YUE, SUN, AND SUI

Hence by Lemmas 2.6 and 2.8,


Hull(GRSk (α, v)) = GRSk (α, v) ∩ GRSk (α, v)⊥ = (GRSk (α, v) + GRSk (α, v)⊥ )⊥
= (CL (D, G1 ) + CL (D, G2 ))⊥ = CL (D, G1 ∪ G2 )⊥
= CL (D, (l(z)) + (n + ε + k − deg d(z) − deg s(z) − 1)P∞ )⊥ .
By l(z)d(z) = s(z)t(z) = u(z)h(z) + h′ (z) and Proposition 3.3,

Hull(GRSk (α, v)) = CL (D, (d(z)) + (deg d(z) + deg s(z) − k − ε − 1)P∞ )

is a GRS code.
Case 2: deg s(z) ≥ k + 2ε . It is clear that
deg(G1 ∩ G2 ) = deg((d(z))0 + (k − 1 − deg s(z))P∞ )
= deg d(z) + k − 1 − deg s(z).
Then deg(G1 ∩ G2 ) > −2 if and only if k + 2ε ≤ deg s(z) < k + deg d(z) + 1.
If k + 2ε ≤ deg s(z) < k + deg d(z) + 1, similarly,

G1 ∪ G2 = (l(z)) + (n + deg s(z) − deg d(z) − k − 1)P∞

and

Hull(GRSk (α, v)) = CL (D, (d(z)) + (k + deg d(z) − deg s(z) − 1)P∞ )

is a GRS code.
Moreover, if k + ε − deg d(z) − 1 < deg s(z) < k + deg d(z) + 1, then the hull of
GRSk (α, v) is also a GRS code. 

Remark 3.6. In Theorem 3.5, we need the condition: 2 deg d(z) + 2 > ε.

In the following, we always assume the following notations.


s(z) = s0 + s1 z + · · · + sµ z µ ∈ Fq [z] with sµ 6= 0.
t(z) = t0 + t1 z + · · · + tν z ν ∈ Fq [z] with tν 6= 0.
d(z) = gcd(s(z), t(z)) ∈ Fq [z] is the greatest common divisor of s(z) and t(z).
l(z) = lcm(s(z), t(z)) ∈ Fq [z] is the least common multiply of s(z) and t(z).
deg s(z) = µ and deg t(z) = ν, where µ + ν = n + ε and ε is defined by (3.2).
deg d(z) = δ.
If the conditions in Theorem 3.5 are not satisfied, then we shall give a method
of linear algebra to find the bases of hulls of GRS codes and exactly compute the
dimensions of the hulls.
If the conditions in Theorem 3.5 are not satisfied, then one of the following three
statements holds:
(1) 2 deg d(z) + 2 > ε and deg s(z) ≤ k + ε − deg d(z) − 1.
(2) 2 deg d(z) + 2 > ε and deg s(z) ≥ k + deg d(z) + 1.
(3) 2 deg d(z) + 2 ≤ ε.
HULLS OF GENERALIZED REED-SOLOMON CODES 13

Now we shall consider the above three cases. Recall that GRSk (α, v) and GRSk (α, v)⊥
have generator matrices:
 1 1
  1 
s(α1 ) s(α2 )
· · · s(α1n ) t(α1 )
1
t(α2 )
· · · t(α1n )
 α1 α αn   α1 α2 αn 
 s(α1 ) s(α22 ) · · · s(α n)
  t(α1 ) t(α2 )
· · · t(α n)

 .
 .. .. ..   and  ..
 .. ..  ,
 . .   . . .  
αk−1 αk−1 αk−1 αn−k−1 αn−k−1 αn−k−1
1
s(α1 )
2
s(α2 )
· · · s(α
n
)
1
t(α )
2
t(α )
· · · n
t(αn )
n k×n
1 2 (n−k)×n

respectively, where
s(z) = s0 + s1 z + · · · + sµ z µ , t(z) = t0 + t1 z + · · · + tν z ν ∈ Fq [z],
and s(z)t(z) = u(z)h(z) + h′ (z), sµ tν 6= 0, deg s(z) + deg t(z) = n + ε.
Now we find two polynomials
f (z) = f0 + f1 z + · · · + fk−1 z k−1 , g(z) = g0 + g1 z + · · · + gn−k−1z n−k−1 ∈ Fq [z]
such that
   
f (α1 ) f (α2 ) (αn ) g(α1 ) g(α2 ) n)
,
s(α1 ) s(α2 )
, . . . , fs(αn)
= ,
t(α1 ) t(α2 )
, . . . , g(α
t(αn ) ∈ Hull(GRSk (α, v)),
which is equivalent to
f (αi ) g(αi )
= , f (αi )t(αi ) = g(αi )s(αi ), i = 1, . . . , n,
s(αi ) t(αi )
which is equivalent to
f (z)t(z) − g(z)s(z) ≡ 0 (mod h(z)),
which is equivalent to
f (z)t(z) − g(z)s(z) = r(z)h(z), (3.7)
where r(z) ∈ Fq [z] and deg r(z) depends on the higher degree of either f (z)t(z) or
g(z)s(z).
In fact, deg(f (z)t(z)) ≤ k − 1 + deg t(z) = k − 1 + n + ε − deg s(z), deg(g(z)s(z)) ≤
n − k − 1 + deg s(z). It is clear that n − k − 1 + deg s(z) < k − 1 + n + ε − deg s(z)
if and only if deg s(z) < k + 2ε . Hence
• If deg s(z) < k + 2ε , then deg r(z) ≤ k + ε − deg s(z) − 1 in (3.7).
• If deg s(z) ≥ k + 2ε , then deg r(z) ≤ deg s(z) − k − 1 in (3.7).
Now we consider the first case
2 deg d(z) + 2 > ε and deg s(z) ≤ k + ε − deg d(z) − 1.
Then the conditions in Theorem 3.5 are not satisfied, deg s(z) < k + 2ε , and deg r(z) ≤
k + ε − deg s(z) − 1 in (3.7). To find f (z) and g(z) in (3.7), we consider two cases.

Case 1. f (z)t(z) = g(z)s(z).


Pk−1 i P
If f (z) = i=0 fi z and g(z) = n−k−1
j=0 gj z j ∈ Fq [z] satisfy f (z)t(z) = g(z)s(z),
(z)
then fs(z) = g(z)
t(z)
∈ L (G1 ) ∩ L (G2 ). By the proof of Theorem 3.5 and deg s(z) ≤
14 JIA, YUE, SUN, AND SUI

k + ε − deg d(z) − 1, deg(G1 ∩ G2 ) ≤ −2 and L (G1 ) ∩ L (G2 ) = {0}. Hence


f (z) = g(z) = 0.
On the other hand, the equality t(z)f (z) = s(z)g(z) induces that the system of
equations has only zero solution:
 T
A f0 f1 · · · fk−1 −g0 −g1 · · · −gn−k−1 = 0,

where
 
t0 0 ··· 0 s0 0 ··· 0
 .. .. 

 t1 t0 . s1 s0 .  
.. .
0 .. s1
 
 . t1 s0 
 . . 

 tν .. t0 sµ .. s1  
 .. 
A=

 0 tν t1 0 sµ .  = (A1 , . . . , An ) (3.8)
 .. 

 0 0 . 0 0 sµ  
 .. .. .. .. .. .. 
 . . . . . . 
0 0 · · · tν 0 0 ··· 0
| {z } | {z }
k columns n−k columns

is an (n + ε + k − µ) × n coefficient matrix, each Ai is the i-th column vector of A,


and T is a transpose transformation. Then rank(A) = n because the above system
has only zero solution.
Case 2. f (z)t(z) − g(z)s(z) = r(z)h(z), where 0 6= r(z) ∈ Fq [z] and deg r(z) ≤
k + ε − deg s(z) − 1.
By d(z) = gcd(s(z), t(z)) and gcd(h(z), s(z)t(z)) = 1, d(z) | r(z) and r(z) =
d(z)r(z). Hence
f (z)t(z) − g(z)s(z) = r(z)d(z)h(z), (3.9)
Pn+δ i
where 0 ≤ deg r(z) ≤ k + ε − deg s(z) − deg d(z) − 1 := γ. Let d(z)h(z) = i=0 bi z
and
Bi = (0, . . . , 0, b0 , b1 , . . . , bn+δ , 0, . . . , 0)T ∈ Fn+ε+k−µ
q , (3.10)
| {z }
i 0′ s

where i = 0, 1, . . . , γ = k + ε − deg s(z) − deg d(z) − 1. Set

B = (B0 , . . . , Bγ ) (3.11)

to be an (n + ε + k − µ) × (γ + 1) matrix, where each Bi is defined by (3.10).


By Case 1, if there is a polynomial r(z) satisfying (3.9), then (f (z), g(z)) must
P
be unique. If there is a polynomial r(z) = γi=0 ci z i such that a unique pair (f (z) =
Pk−1 i Pn−k−1 i
i=0 fi z , g(z) = i=0 gi z ) satisfies (3.9), then
γ k−1 n−k−1
X X X
ci Bi = fi Ai+1 − gi Ai+k+1 ∈ L(A1 , . . . , An ),
i=0 i=0 i=0
HULLS OF GENERALIZED REED-SOLOMON CODES 15

P
where L(A1 , . . . , An ) is a subspace generated by A1 , . . . , An . Conversely, if γi=0 ci Bi ∈
P
L(A1 , . . . , An ), then there is an polynomial r(z) = γi=0 ci z i such that a unique pair
(f (z), g(z)) satisfies (3.9). Let
γ
X
Ω = {r(z) = ci z i ∈ Fq [z] : r(z) satisfies (3.9)} (3.12)
i=0

be an Fq -linear subspace, then there is an isomorphism between two Fq -linear spaces:


Ω −→ L(A1 , . . . , An ) ∩ L(B0 , . . . , Bγ )
γ γ
X X
i
r(z) = ci z 7−→ ci Bi ,
i=0 i=0

and there is an isomorphism between two Fq -linear spaces:


L(A1 , . . . , An ) ∩ L(B0 , . . . , Bγ ) −→ Hull(GRSk (α, v))
γ
X f (α1 ) f (αn )
ci Bi 7−→ ( ,..., ),
i=0
s(α1 ) s(αn )
P Pk−1 P (α1 ) (αn ) 1) n)
where γi=0 ci Bi = i=0 fi Ai+1 − n−k−1
i=0 gi Ai+k+1 and ( fs(α1)
, . . . , fs(αn)
) = ( g(α
t(α1 )
, . . . , g(α
t(αn )
).
In the following, we choose all non-zero polynomials of distinct degrees in Ω
r1 (z), r 2 (z), . . . , re (z), (3.13)
where 0 ≤ deg r 1 (z) < deg r 2 (z) < · · · < deg r e (z) ≤ γ = k+ε−deg s(z)−deg d(z)−1
and each r i (z) is a polynomial of the i-th lowest degree in Ω. We shall prove that
(3.13) is a basis of Ω.
It is clear that the elements in (3.13) are linearly independent over Fq . Now we
proceed by induction on the degree of every polynomial r(z) ∈ Ω and prove that it
can be linearly expressed by {r 1 (z), . . . , re (z)}.
If deg r(z) = deg r1 (z), then there is a ∈ F∗q such that r(z) − ar 1 (z) ∈ Ω with
deg(r(z) − ar 1 (z)) < deg r 1 (z). Since r 1 (z) is a polynomial of the lowest degree in
Ω, r(z) = ar 1 (z). We assume that the statement holds for every polynomial in Ω of
degree less than deg rd (z), d ≤ e. Now let r(z) ∈ Ω with deg r(z) = deg r d (z), then
there is a ∈ F∗q such that r(z) − ar d (z) ∈ Ω with deg(r(z) − ar d (z)) < deg r d (z). The
induction hypothesis immediately yields the desired result. So (3.13) is a basis of Ω.
By the above two isomorphisms, we can obtain that f1 (z), . . . , fe (z) are corre-
sponding to r 1 (z), . . . , r e (z), respectively, so there is a basis of Hull(GRSk (α, v)) as
follows:
fi (α1 ) fi (αn )
( ,..., ), i = 1, . . . , e.
s(α1 ) s(αn )
Now we have an algorithm to find a basis of Hull(GRSk (α, v)).

Algorithm 3.7. If 2 deg d(z) + 2 > ε and deg s(z) ≤ k + ε − deg d(z) − 1, then we
consider the matrix
(A|B) = (A1 , . . . , An |B0 , . . . , Bγ ),
16 JIA, YUE, SUN, AND SUI

where A and B are defined by (3.8) and (3.11), respectively.


(1) If there is the first smallest number i1 , 0 ≤ i1 ≤ γ, such that columns A1 , . . . , An ,
B0 , . . . , Bi1 are linearly dependent over Fq , then there is (r1 (z), f1 (z), g1 (z)) satisfying
(3.9).
(2) If there is the second smallest number i2 , i1 < i2 ≤ γ, such that columns
A1 , . . . , An , B0 , . . . , Bi1 −1 , Bi1 +1 , . . . , Bi2 are linearly dependent over Fq , then there is
(r 2 (z), f2 (z), g2 (z)) satisfying (3.9).
(3) And so on, there are polynomials f1 (z), f2 (z), . . . , fe (z) ∈ Fq [z] such that
  
fi (α1 ) fi (αn )
,..., i = 1, . . . , e
s(α1 ) s(αn )
is a basis of Hull(GRSk (α, v)).

Theorem 3.8. Let GRSk (α, v) = CL (D, (k − 1)P∞ + (s(z))) and GRSk (α, v)⊥ =
CL (D, (n − k − 1)P∞ + (t(z))) be the two GRS codes in Propositions 3.1 and 3.3,
respectively. If 2 deg d(z) + 2 > ε and deg s(z) ≤ k + ε − deg d(z) − 1, then

dim(Hull(GRSk (α, v))) = n + γ + 1 − rank (A|B),

where γ = k + ε − deg s(z) − deg d(z) − 1, A and B are defined by (3.8) and (3.11),
respectively.

If 2 deg d(z) + 2 > ε and deg s(z) ≥ k + deg d(z) + 1 or 2 deg d(z) + 2 ≤ ε, we have
similar formulas for the dimensions of hulls of GRS codes.

Theorem 3.9. Let GRSk (α, v) = CL (D, (k − 1)P∞ + (s(z))) and GRSk (α, v)⊥ =
CL (D, (n − k − 1)P∞ + (t(z))) be the two GRS codes in Propositions 3.1 and 3.3,
respectively.
(1) If 2 deg d(z) + 2 > ε and deg s(z) ≥ k + deg d(z) + 1, then

dim(Hull(GRSk (α, v))) = n + γ ′ + 1 − rank (A′ |B ′ ),

where γ ′ = deg s(z) − k − deg d(z) − 1, A′ and B ′ are defined as follows.


 
t0 0 · · · 0 s0 0 ··· 0
 .. .. 
 t1 t0 . s1 s0 . 
 
 .. .
t0 ..

 . t1 s1 0 
 . .. 
 ν ..
 t t1 sµ . s0  

 0 t .. 
A′ =  ν . 0 sµ s1   = (A′1 , . . . , A′n ) (3.14)

 0 0 .. 
 tν 0 0 .  
 .. .. .. .. .. .. 
 . . . . . . 
0 0 ··· 0 0 0 · · · sµ
| {z } | {z }
k columns n−k columns
HULLS OF GENERALIZED REED-SOLOMON CODES 17

is an (n + µ − k) × n matrix, where each A′i is the i-th column vector of A′ ; and


B ′ = (B0′ , . . . , Bγ′ ′ ) (3.15)
Pn+δ
is an (n + µ − k) × (γ ′ + 1) matrix, where d(z)h(z) = i=0 bi z i and each Bi′ is the
i-th column vector of B ′ defined by
Bi′ = (0, . . . , 0, b0 , b1 , . . . , bn+δ , 0, . . . , 0)T ∈ Fqn+µ−k , (3.16)
| {z }
i 0′ s

i = 0, 1, . . . , γ = deg s(z) − k − deg d(z) − 1.
(2) If 2 deg d(z) + 2 ≤ ε and deg s(z) < k + 2ε , then
dim(Hull(GRSk (α, v))) = n + γ + 1 − rank (A|B),
where γ = k + ε − deg s(z) − deg d(z) − 1, A and B are defined by (3.8) and (3.11),
respectively.
(3) If 2 deg d(z) + 2 ≤ ε and deg s(z) ≥ k + 2ε , then
dim(Hull(GRSk (α, v))) = n + γ ′ + 1 − rank (A′ |B ′ ),
where γ ′ = deg s(z) − k − deg d(z) − 1, A′ and B ′ are defined by (3.14) and (3.15),
respectively.

Proof. (1) By the proof of Theorem 3.5 and deg s(z) ≥ k+deg d(z)+1, deg(G1 ∩G2 ) ≤
−2 and L (G1 ) ∩ L (G2 ) = {0}. On the other hand, by 2 deg d(z) + 2 > ε and
deg s(z) ≥ k + deg d(z) + 1, deg s(z) > k + 2ε and deg r(z) ≤ deg s(z) − k − 1 in (3.7).
Hence the equality t(z)f (z) = s(z)g(z) induces that the system of equations has
only zero solution:
 T

A f0 f1 · · · fk−1 −g0 −g1 · · · −gn−k−1 = 0,
where A′ is an (n + µ − k) × n matrix defined by (3.14). Then rank(A′ ) = n because
the above system has only zero solution.
Let r(z) = d(z)r(z) in (3.7). Then
f (z)t(z) − g(z)s(z) = r(z)d(z)h(z).
By deg r(z) ≤ deg s(z) − k − 1, 0 ≤ deg r(z) = deg r(z) − deg d(z) ≤ deg s(z) − k −
Pn+δ i
deg d(z) − 1 = γ ′ . Then let d(z)h(z) = i=0 bi z ,
Bi′ = (0, . . . , 0, b0 , b1 , . . . , bn+δ , 0, . . . , 0)T ∈ Fn+µ−k
q ,
| {z }
i 0′ s

where i = 0, 1, . . . , γ ′ = deg s(z) − k − deg d(z) − 1, and


B ′ = (B0′ , . . . , Bγ′ ′ )
an (n + µ − k) × (γ ′ + 1) matrix, where each Bi′ is the i-th column vector of B ′ . The
remainder of the proof is omitted because of the similarity.
(2) If 2 deg d(z) + 2 ≤ ε and deg s(z) < k + 2ε , then deg s(z) < k + ε − deg d(z) − 1
and by the proof of Theorem 3.5, deg(G1 ∩ G2 ) = deg d(z) + deg s(z) − ε − k − 1 < −2
18 JIA, YUE, SUN, AND SUI

and L (G1 ) ∩ L (G2 ) = {0}. On the other hand, by deg s(z) < k + 2ε , deg r(z) ≤
k + ε − deg s(z) − 1 in (3.7).
Hence the equality t(z)f (z) = s(z)g(z) induces that the system of equations has
only zero solution:
 T
A f0 f1 · · · fk−1 −g0 −g1 · · · −gn−k−1 = 0,

where A is an (n + ε + k − µ) × n matrix defined by (3.8). Then rank(A) = n because


the above system has only zero solution.
Let r(z) = d(z)r(z) in (3.7). Then
f (z)t(z) − g(z)s(z) = r(z)d(z)h(z).
By deg r(z) ≤ k + ε − deg s(z) − 1, 0 ≤ deg r(z) = deg r(z) − deg d(z) ≤ k + ε −
Pn+δ i
deg s(z) − deg d(z) − 1 = γ. Then let d(z)h(z) = i=0 bi z and
B = (B0 , . . . , Bγ )
an (n + ε + k − µ) × (γ + 1) matrix, where each Bi is the i-th column vector of B
defined by (3.10). The remainder of the proof is omitted because of the similarity.
(3) The proof of (3) is similar to the proof of (2), so we omit it. 
If 2 deg d(z) + 2 > ε and deg s(z) ≥ k + deg d(z) + 1, we can find a basis of
Hull(GRSk (α, v)) by the following algorithm.

Algorithm 3.10. If 2 deg d(z) + 2 > ε and deg s(z) ≥ k + deg d(z) + 1, then we
consider the matrix
(A′ |B ′ ) = (A′1 , . . . , A′n |B0′ , . . . , Bγ′ ′ ),
where γ ′ = deg s(z) − k − deg d(z) − 1, A′ and B ′ are defined by (3.14) and (3.15),
respectively.
(1) If there is the first smallest number i1 , 0 ≤ i1 ≤ γ ′ , such that columns
A′1 , . . . , A′n , B0′ , . . . , Bi′1 are linearly dependent over Fq , then there is (r1 (z), f1 (z), g1 (z))
satisfying (3.9).
(2) If there is the second smallest number i2 , i1 < i2 ≤ γ ′ , such that columns
A′1 , . . . , A′n , B0′ , . . . , Bi′1 −1 , Bi′1 +1 , . . . , Bi′2 are linearly dependent over Fq , then there is
(r 2 (z), f2 (z), g2 (z)) satisfying (3.9).
(3) And so on, there are polynomials f1 (z), f2 (z), . . . , fe (z) ∈ Fq [z] such that
  
fi (α1 ) fi (αn )
,..., i = 1, . . . , e
s(α1 ) s(αn )
is a basis of Hull(GRSk (α, v)).

Remark 3.11. If 2 deg d(z) + 2 ≤ ε and deg s(z) < k + 2ε , then the algorithm for
finding a basis of Hull(GRSk (α, v)) is just Algorithm 3.7.
If 2 deg d(z) + 2 ≤ ε and deg s(z) ≥ k + 2ε , then the algorithm for finding a basis of
Hull(GRSk (α, v)) is just Algorithm 3.10.
HULLS OF GENERALIZED REED-SOLOMON CODES 19

Corollary 3.12. Let GRSk (α, v) = CL (D, (k − 1)P∞ + (s(z))) and GRSk (α, v)⊥ =
CL (D, (n − k − 1)P∞ + (t(z))) be the two GRS codes in Propositions 3.1 and 3.3,
respectively.
If 2 deg d(z) + 2 > ε and deg s(z) ≤ k + ε − deg d(z) − 1 or 2 deg d(z) + 2 ≤ ε and
deg s(z) < k + 2ε , and the rank of the matrix (A|B) is equal to n + γ + 1, where A and
B are defined by (3.8) and (3.11), respectively, then Hull(GRSk (α, v)) is an LCD
code.
If 2 deg d(z) + 2 > ε and deg s(z) ≥ k + deg d(z) + 1 or 2 deg d(z) + 2 ≤ ε and
deg s(z) ≥ k + 2ε , and the rank of the matrix (A′ |B ′ ) is equal to n + γ ′ + 1, where A′
and B ′ are defined by (3.14) and (3.15), respectively, then Hull(GRSk (α, v)) is an
LCD code.

Remark 3.13. Corollary 3.12 shows that Hull(GRSk (α, v)) may be an LCD code
if the conditions in Theorem 3.5 are not satisfied. Then there is a question:
If the conditions in Theorem 3.5 are not satisfied, is it possible that the hull of
GRSk (α, v) is a self-orthogonal code or a self-dual code?

In the following, we shall provide some examples to show that the conditions that
hulls of GRS codes are also GRS codes in Theorem 3.5 are good enough and can not
be changed. It means that if the conditions in Theorem 3.5 are not satisfied, then
hulls of GRS codes may be GRS codes or not GRS codes.

Example 3.14. Let q = 32 , F∗q = hγi, and h(z) = z 7 + γz 6 + γ 2 z 5 + γ 3 z 4 + 2z 3 +


γ 5 z 2 + γ 6 z + γ 7 ∈ Fq [z]. Then h′ (z) = z 6 + γ 6 z 4 + γ 3 z 3 + γz + γ 6 = (z 3 + γ 3 z 2 + γ 5 z +
γ)(z 3 + γ 7 z 2 + γ 3 z + γ 5 ) ∈ Fq [z] is an irreducible factorization over Fq .
Let s(z) = z 3 + γ 3 z 2 + γ 5 z + γ and t(z) = z 3 + γ 7 z 2 + γ 3 z + γ 5 ∈ Fq [z]. Then
gcd(s(z), t(z)) = 1. Let α = (α1 , α2 , . . . , α7 ) = (1, γ 2, γ 3 , γ 4 , γ 5 , γ 6 , γ 7 ) and v =
(v1 , v2 , . . . , v7 ) = (γ 2 , γ 3 , 1, γ 7 , γ 3 , γ 5 , γ), where αi are the roots of h(z) and vi =
(s(αi ))−1 , i = 1, . . . , 7. Then GRS5 (α, v) is a [7, 5, 3] linear code, the column of the
matrix (A|B) is full rank, where A and B are defined by (3.8) and (3.11), respectively,
and Hull(GRSk (α, v)) = {0} by Magma [16].

Example 3.15. Let q = 24 , F∗q = hγi, and h(z) = z 11 + γ 13 z 10 + γ 6 z 8 + γ 5 z 7 +


γ 7 z 6 + γ 8 z 5 + γz 3 + z 2 + γz ∈ Fq [z]. Then h′ (z) = z 10 + γ 5 z 6 + γ 8 z 4 + γz 2 + γ =
(z + γ 9 )2 (z 2 + γ 8 z + γ 8 )2 (z 2 + γ 12 z + γ 6 )2 ∈ Fq [z] is an irreducible factorization over
Fq .
Let s(z) = (z + γ 9 )2 (z 2 + γ 8 z + γ 8 )2 and t(z) = (z 2 + γ 12 z + γ 6 )2 ∈ Fq [z]. Then
gcd(s(z), t(z)) = 1. Let α = (α1 , α2 , . . . , α11 ) = (γ 2 , γ 3 , γ 4 , γ 5 , γ 6 , γ 8 , γ 10 , γ 11 , γ 13 , γ 14 , 0)
and v = (v1 , v2 , . . . , v11 ) = (γ 8 , γ 8 , γ 8 , γ 9 , γ 12 , γ 5 , γ 5 , 1, γ 5, γ 14 , γ 11 ), where αi are the
roots of h(z) and vi = (s(αi ))−1 , i = 1, . . . , 11. Then GRS8 (α, v) is a [11, 8, 4] linear
code and Hull(GRS8 (α, v)) is a [11, 1, 10] linear code with a generator matrix
 
4 12 9 9 14 11 14
1 γ 0 γ 1 γ γ γ γ γ γ .
20 JIA, YUE, SUN, AND SUI

Remark 3.16. Note that in Examples 3.14 and 3.15, u(z) = 0 and the conditions in
Theorem 3.5 are not satisfied. Moreover, Example 3.15 shows that Hull(GRS8 (α, v))
is not a GRS code as the third component of the 1-dimensional generator matrix is
zero, which further shows that the conditions in Theorem 3.5 are good enough.

Example 3.17. Let q = 52 , F∗q = hγi, and h(z) = z 7 + z 6 + γ 15 z 5 + γ 4 z 4 + γ 20 z 3 +


γ 13 z 2 + γz + γ 13 ∈ Fq [z]. Then zh(z) + h′ (z) = z 8 + z 7 + γ 17 z 6 + γ 23 z 5 + γ 20 z 4 +
γ 23 z 3 + 2z 2 + γ 7 z + γ = (z + γ)(z + γ 2 )(z + γ 22 )(z 5 + γ 4 z 4 + z 3 + 4z 2 + γz + 1) ∈ Fq [z]
is an irreducible factorization over Fq .
Let s(z) = (z + γ)(z + γ 2 )(z + γ 22 ) and t(z) = z 5 + γ 4 z 4 + z 3 + 4z 2 + γz + 1 ∈ Fq [z].
Then gcd(s(z), t(z)) = 1. Let α = (α1 , α2 , . . . , α7 ) = (1, γ, γ 2 , γ 4 , γ 5 , γ 6 , γ 7 ) and
v = (v1 , v2 , . . . , v7 ) = (3, γ 10 , γ 20 , γ 2 , 2, 2, γ 4 ), where αi are the roots of h(z) and
vi = (s(αi ))−1 , i = 1, . . . , 7. Then GRS3 (α, v) is a [7, 3, 5] linear code, the column
of the matrix (A|B) is full rank, where A and B are defined by (3.8) and (3.11),
respectively, and Hull(GRSk (α, v)) = {0} by Magma [16].

Example 3.18. Let q = 24 , F∗q = hγi, and h(z) = z 11 + γ 12 z 8 + γ 11 z 7 + γ 9 z 5 + γ 7 z 3 +


γ 6 z 2 + γ 5 z + γ 4 ∈ Fq [z]. Then h(z) + h′ (z) = z 11 + z 10 + γ 12 z 8 + γ 11 z 7 + γ 11 z 6 + γ 9 z 5 +
γ 9 z 4 + γ 7 z 3 + γ 10 z 2 + γ 5 z + γ 8 = (z + 1)(z 2 + γ 3 z + 1)(z 8 + γ 3 z 7 + γ 13 z 6 + γ 8 z 5 +
γz 4 + γ 14 z 3 + γ 4 z 2 + γ 13 z + γ 8 ) ∈ Fq [z] is an irreducible factorization over Fq .
Let s(z) = (z + 1)(z 2 + γ 3 z + 1) and t(z) = z 8 + γ 3 z 7 + γ 13 z 6 + γ 8 z 5 + γz 4 + γ 14 z 3 +
γ 4 z 2 + γ 13 z + γ 8 ∈ Fq [z]. Then gcd(s(z), t(z)) = 1. Let α = (α1 , α2 , . . . , α11 ) =
(γ 11 , γ 12 , γ 2 , γ 13 , γ 14 , γ 4 , γ 5 , γ 6 , γ 8 , γ 9 , γ 10 ) and v = (v1 , v2 , . . . , v11 ) = (γ 14 , γ 10 , γ 5 , γ 11 ,
γ 9 , γ 2 , γ, 1, 1, γ 3, γ), where αi are the roots of h(z) and vi = (s(αi ))−1 , i = 1, . . . , 11.
Then GRS4 (α, v) is a [11, 4, 8] linear code and Hull(GRS4 (α, v)) is a [11, 1, 10] lin-
ear code with a generator matrix
 
0 1 1 γ 10 γ 9 γ 14 γ 8 γ 7 γ 6 γ 11 γ 13 .

Remark 3.19. Note that in Examples 3.17 and 3.18, u(z) 6= 0 and the conditions in
Theorem 3.5 are not satisfied. Moreover, Example 3.18 shows that Hull(GRS4 (α, v))
is not a GRS code as the first component of the 1-dimensional generator matrix is
zero, which further shows that the conditions in Theorem 3.5 are good enough.

4. Self-orthogonal and self-dual GRS codes


In Section 3, Theorem 3.5 gives the conditions that hulls of GRS codes are also GRS
codes. In this section, we shall give some corollaries of Theorem 3.5. Specifically,
we shall provide methods for constructing self-orthogonal or self-dual GRS codes.
Besides, we give some examples to support our findings by Magma [16].

Corollary 4.1. Let GRSk (α, v) = CL (D, (k − 1)P∞ + (s(z))) and GRSk (α, v)⊥ =
CL (D, (n − k − 1)P∞ + (t(z))) be the two GRS codes in Propositions 3.1 and 3.3,
respectively. Let 2 deg d(z) + 2 > ε.
HULLS OF GENERALIZED REED-SOLOMON CODES 21

(1) If k +ε−deg d(z)−1 < deg s(z) < k + 2ε and deg s(z)−(k +ε−deg d(z)−1) = 1,
then GRSk (α, v) is an LCD code; if k + 2ε ≤ deg s(z) < k + deg d(z) + 1 and
k + deg d(z) + 1 − deg s(z) = 1, then GRSk (α, v) is an LCD code.
(2) If k + 2ε ≤ deg s(z) < k + deg d(z) + 1 and gcd(s(z), t(z)) = s(z), then
GRSk (α, v) is a self-orthogonal code. Moreover, t(z) = λ(z)s(z) and Equation (3.1)
is changed to
λ(z)s(z)2 = u(z)h(z) + h′ (z), (4.1)
where λ(z) ∈ Fq [z] is a polynomial.
If k+ε−deg d(z)−1 < deg s(z) < k+ 2ε and gcd(s(z), t(z)) = t(z), then GRSk (α, v)
is a dual-containing code.
(3) If k + 2ε ≤ deg s(z) < k + deg d(z) + 1, gcd(s(z), t(z)) = s(z), and n = 2k,
then GRSk (α, v) is a self-dual code. Moreover, t(z) = λs(z) and Equation (3.1) is
changed to
λs(z)2 = u(z)h(z) + h′ (z), (4.2)
where λ ∈ F∗q , u(z) ∈ Fq [z] is a nonzero polynomial with 0 ≤ deg u(z) ≤ n − 2 and
deg u(z) is even.

Proof. (1) If k + ε − deg d(z) − 1 < deg s(z) < k + 2ε , then Equation (3.3) holds by
Theorem 3.5. Moreover, if deg s(z) − (k + ε − deg d(z) − 1) = 1,

deg((d(z))+(deg d(z)+deg s(z)−k−ε−1)P∞ ) = deg d(z)+deg s(z)−k−ε−1 = −1 < 0.

Therefore, by Proposition 2.2, dim(Hull(GRSk (α, v))) = 0. Another result can be


proved similarly.
(2) If k + 2ε ≤ deg s(z) < k + deg d(z) + 1, then Equation (3.4) holds by Theorem
3.5. Moreover, if gcd(s(z), t(z)) = s(z), then by (3.4),

Hull(GRSk (α, v)) = CL (D, (s(z)) + (k − 1)P∞ ) = GRSk (α, v),

which infers that GRSk (α, v) ⊆ GRSk (α, v)⊥ , i.e., GRSk (α, v) is a self-orthogonal
code. By gcd(s(z), t(z)) = s(z), we can assume that t(z) = λ(z)s(z) for some poly-
nomial λ(z) ∈ Fq [z], then Equation (3.1) can be rewritten as

λ(z)s(z)2 = u(z)h(z) + h′ (z).

If k + ε − deg d(z) − 1 < deg s(z) < k + 2ε and gcd(s(z), t(z)) = t(z), then
GRSk (α, v)⊥ ⊆ GRSk (α, v), i.e., GRSk (α, v) is a dual-containing code.
(3) If k + 2ε ≤ deg s(z) < k + deg d(z) + 1, gcd(s(z), t(z)) = s(z), and n = 2k, then
GRSk (α, v) is a self-orthogonal code by (2) and
n
dim(Hull(GRSk (α, v))) = dim(GRSk (α, v)) = k = ,
2
which infers that GRSk (α, v) is a self-dual code. Moreover, by (4.1),

2 deg s(z) = n + ε − deg λ(z) ≤ 2k + ε.


22 JIA, YUE, SUN, AND SUI

On the other hand, 2 deg s(z) ≥ 2k + ε by k + 2ε ≤ deg s(z), then 2 deg s(z) = 2k + ε
and deg λ(z) = 0. Besides, by ε = 2(deg s(z) − k), u(z) is a nonzero polynomial of
an even degree (otherwise, u(z) = 0 and ε = −1, which is contradictory). Therefore,
we obtain Equation (4.2). 

Remark 4.2. Corollary 4.1 shows self-orthogonal and self-dual GRS codes. Specifi-
cally, we can select polynomials h(z), u(z) ∈ Fq [z] with deg u(z) ≤ n − 2 such that

u(z)h(z) + h′ (z) = λ(z)s(z)2

for some polynomials λ(z) and s(z) ∈ Fq [z] with deg s(z) ≥ k + 2ε . Then let α =
(α1 , . . . , αn ), where αi are the roots of h(z), i = 1, . . . , n. Let v = (v1 , . . . , vn ), where
vi = (s(αi ))−1 , i = 1, . . . , n. By Corollary 4.1 (2), GRSk (α, v) is a self-orthogonal
code.
On the other hand, we can select polynomials h(z), u(z) ∈ Fq [z] with 0 ≤ deg u(z) ≤
n − 2 such that
u(z)h(z) + h′ (z) = λs(z)2

for λ ∈ F∗q and some polynomial s(z) ∈ Fq [z] with deg s(z) ≥ k + 2ε . Then let
α = (α1 , . . . , αn ), where αi are the roots of h(z), i = 1, . . . , n. Let v = (v1 , . . . , vn ),
where vi = (s(αi ))−1 , i = 1, . . . , n. By Corollary 4.1 (3), GRSk (α, v) is a self-dual
code.

Corollary 4.3. In (3.1), let u(z) = 0. If k−deg d(z)−2 < deg s(z) < k+deg d(z)+1,
then the hull of GRSk (α, v) is also a GRS code. Moreover, if k − deg d(z) − 2 <
deg s(z) < k, then

Hull(GRSk (α, v)) = CL (D, (d(z)) + (deg d(z) + deg s(z) − k)P∞ );

if k ≤ deg s(z) < k + deg d(z) + 1, then

Hull(GRSk (α, v)) = CL (D, (d(z)) + (k + deg d(z) − deg s(z) − 1)P∞ ).
Q
Example 4.4. Let q = 23 , F∗q = hγi, and h(z) = z 7 − 1 = 6i=0 (z − γ i ) ∈ Fq [z].
Then h′ (z) = z 6 ∈ Fq [z].
(1) Let s(z) = z 2 and t(z) = z 4 ∈ Fq [z]. Then gcd(s(z), t(z)) = s(z). Let α =
(α1 = γ 0 , α2 = γ 1 , . . . , α7 = γ 6 ) and v = (v1 , . . . , v7 ), where vi = (s(αi ))−1 =
γ −2(i−1) , i = 1, . . . , 7. By Corollary 4.1 (2), if 1 ≤ k ≤ 2, then GRSk (α, v) is a
self-orthogonal code. Specifically, Hull(GRS1 (α, v)) = GRS1 (α, v) are both [7, 1, 7]
GRS codes over Fq , i.e., GRS1 (α, v) is a self-orthogonal code over Fq , and they have
a generator matrix as follows:
 
5 3 6 4 2 .
1 γ γ γ γ γ γ
HULLS OF GENERALIZED REED-SOLOMON CODES 23

Hull(GRS2 (α, v)) = GRS2 (α, v) are both [7, 2, 6] GRS codes over Fq , i.e., GRS2 (α, v)
is a self-orthogonal code over Fq , and they have a generator matrix as follows:
!
1 0 γ4 γ5 γ5 1 γ4
.
0 1 γ γ γ3 1 γ3
(2) Let s(z) = z 4 and t(z) = z 2 ∈ Fq [z]. Then gcd(s(z), t(z)) = t(z). Let α =
(α1 = γ 0 , α2 = γ 1 , . . . , α7 = γ 6 ) and v = (v1 , . . . , v7 ), where vi = (s(αi ))−1 =
γ −4(i−1) , i = 1, . . . , 7. By Corollary 4.1 (2), if 4 < k < 7, then GRSk (α, v) is a dual-
containing code. Specifically, Hull(GRS5 (α, v)) = GRS5 (α, v)⊥ are both [7, 2, 6]
GRS codes over Fq , i.e., GRS5 (α, v)⊥ is a self-orthogonal code over Fq , and they
have a generator matrix as follows:
!
1 0 γ4 γ5 γ5 1 γ4
.
0 1 γ γ γ3 1 γ3
Hull(GRS6 (α, v)) = GRS6 (α, v)⊥ are both [7, 1, 7] GRS codes over Fq , i.e., GRS6 (α, v)⊥
is a self-orthogonal code over Fq , and they have a generator matrix as follows:
 
1 γ5 γ3 γ γ6 γ4 γ2 .

Corollary 4.5. In (3.1), let deg u(z) = 0. If k − deg d(z) − 1 < deg s(z) < k +
deg d(z) + 1, then the hull of GRSk (α, v) is also a GRS code. Moreover,
Hull(GRSk (α, v)) = CL (D, (d(z)) + (deg d(z) − 1 − |deg s(z) − k|)P∞ ).

Example 4.6. Let q = 52 and F∗q = hγi.


(1) Let h(z) = z 4 + γ 5 z 3 + γ 14 z 2 + γ 23 z + γ 8 = (z − γ 8 )(z − 4)(z − γ 17 )(z −
γ 19 ) ∈ Fq [z]. Then h(z) + h′ (z) = ((z + γ 2 )(z + γ 15 ))2 ∈ Fq [z] by Magma [16]. Let
s(z) = (z + γ 2 )(z + γ 15 ) ∈ Fq [z], α = (α1 , α2 , α3 , α4 ) = (γ 8 , 4, γ 17 , γ 19 ), and v =
(v1 , v2 , v3 , v4 ) = (4, γ 11 , 4, γ 7 ), where αi are the roots of h(z) and vi = (s(αi ))−1 , i =
1, . . . , 4. Then Hull(GRS2 (α, v)) = GRS2 (α, v) are both [4, 2, 3] GRS codes over
Fq , i.e., GRS2 (α, v) is a self-dual code over Fq , and they have a generator matrix as
follows: !
1 0 γ 21 1
.
0 1 4 γ 21
(2) Let h(z) = z 4 + γ 23 z 3 + γ 17 z 2 + 3z + γ 23 = (z − γ 5 )(z − γ 9 )(z − γ 15 )(z −
3) ∈ Fq [z]. Then h(z) + h′ (z) = ((z + γ 9 )(z + γ 19 ))2 ∈ Fq [z] by Magma [16]. Let
s(z) = (z + γ 9 )(z + γ 19 ) ∈ Fq [z], α = (α1 , α2 , α3 , α4 ) = (γ 5 , γ 9 , γ 15 , 3), and v =
(v1 , v2 , v3 , v4 ) = (4, γ 9 , γ 7 , 4), where αi are the roots of h(z) and vi = (s(αi ))−1 , i =
1, . . . , 4. Then Hull(GRS2 (α, v)) = GRS2 (α, v) are both [4, 2, 3] GRS codes over
Fq , i.e., GRS2 (α, v) is a self-dual code over Fq , and they have a generator matrix as
follows: !
1 0 γ3 γ3
.
0 1 γ 15 γ 3
24 JIA, YUE, SUN, AND SUI

Corollary 4.7. In (3.1), let deg u(z) = 1. If k −deg d(z) < deg s(z) < k + deg d(z) +
1, then the hull of GRSk (α, v) is also a GRS code. Moreover, if k − deg d(z) <
deg s(z) ≤ k, then
Hull(GRSk (α, v)) = CL (D, (d(z)) + (deg d(z) + deg s(z) − k − 2)P∞ );
if k + 1 ≤ deg s(z) < k + deg d(z) + 1, then
Hull(GRSk (α, v)) = CL (D, (d(z)) + (k + deg d(z) − deg s(z) − 1)P∞ ).

Example 4.8. Let q = 52 and F∗q = hγi.


(1) Let h(z) = z 4 +γ 3 z 3 +γ 22 z 2 +γ 17 z+γ 11 = (z−γ)(z−γ 7 )(z−γ 13 )(z−γ 14 ) ∈ Fq [z].
Then zh(z) + h′ (z) = (z + γ 9 )(z 2 + γ 9 z + γ 16 )2 ∈ Fq [z] by the Magma program. Let
s(z) = z 2 + γ 9 z + γ 16 ∈ Fq [z], α = (α1 , α2 , α3 , α4 ) = (γ, γ 7 , γ 13 , γ 14 ), and v =
(v1 , v2 , v3 , v4 ) = (γ 5 , 2, 3, γ), where αi are the roots of h(z) and vi = (s(αi ))−1 , i =
1, . . . , 4. By Corollary 4.1 (2), if k = 1, then GRSk (α, v) is a self-orthogonal code.
Specifically, Hull(GRS1 (α, v)) = GRS1 (α, v) are both [4, 1, 4] GRS codes over Fq ,
i.e., GRS1 (α, v) is a self-orthogonal code over Fq , and they have a generator matrix
as follows:  
13 20 .
1 γ γ γ
(2) Let h(z) = z 4 + γ 4 z 3 + 3z 2 + γz + γ 3 = (z − γ 3 )(z − γ 9 )(z − γ 19 )(z − γ 20 ) ∈
Fq [z]. Then zh(z) + h′ (z) = (z + γ 17 )(z + γ 14 )4 ∈ Fq [z] by Magma [16]. Let
s(z) = (z + γ 17 )(z + γ 14 )2 ∈ Fq [z], α = (α1 , α2 , α3 , α4 ) = (γ 3 , γ 9 , γ 19 , γ 20 ), and
v = (v1 , v2 , v3 , v4 ) = (γ 10 , γ 2 , γ 16 , γ 8 ), where αi are the roots of h(z) and vi =
(s(αi ))−1 , i = 1, . . . , 4. By Corollary 4.1 (2), if k = 3, then GRSk (α, v) is a dual-
containing code. Specifically, Hull(GRS3 (α, v)) = GRS3 (α, v)⊥ are both [4, 1, 4]
GRS codes over Fq , i.e., GRS3 (α, v)⊥ is a self-orthogonal code over Fq , and they
have a generator matrix as follows:
 
1 γ 16 2 γ 22 .

Corollary 4.9. In (3.1), let deg u(z) = 2 and deg d(z) ≥ 1. If k − deg d(z) + 1 <
deg s(z) < k+deg d(z)+1, then the hull of GRSk (α, v) is also a GRS code. Moreover,
if k − deg d(z) + 1 < deg s(z) < k + 1, then
Hull(GRSk (α, v)) = CL (D, (d(z)) + (deg d(z) + deg s(z) − k − 3)P∞ );
if k + 1 ≤ deg s(z) < k + deg d(z) + 1, then
Hull(GRSk (α, v)) = CL (D, (d(z)) + (k + deg d(z) − deg s(z) − 1)P∞ ).

Example 4.10. Let q = 72 and F∗q = hγi. Let h(z) = z 4 + z = z(z − γ 8 )(z −
γ 24 )(z − γ 40 ) ∈ Fq [z]. Then z 2 h(z) + h′ (z) = ((z + γ 8 )(z + γ 24 )(z + γ 40 ))2 ∈ Fq [z] by
Magma [16]. Let s(z) = (z + γ 8 )(z + γ 24 )(z + γ 40 ) ∈ Fq [z], α = (α1 , α2 , α3 , α4 ) =
(0, γ 8 , γ 24 , γ 40 ), and v = (v1 , v2 , v3 , v4 ) = (γ 24 , γ 8 , γ 8 , γ 8 ), where αi are the roots of
h(z) and vi = (s(αi ))−1 , i = 1, . . . , 4. Then Hull(GRS2 (α, v)) = GRS2 (α, v) are
HULLS OF GENERALIZED REED-SOLOMON CODES 25

both [4, 2, 3] GRS codes over Fq , i.e., GRS2 (α, v) is a self-dual code over Fq , and
they have a generator matrix as follows:
!
1 0 γ 8 γ 16
.
0 1 γ 16 γ 32

5. Conclusion and future work


This study aims to determine hulls of GRS codes. First of all, a GRS code and its
dual code are represented as rational algebraic geometric codes. Then the conditions
that hulls of GRS codes are also GRS codes are provided by using the language of
algebraic geometry codes. If the conditions are not satisfied, a method for finding
the bases of hulls of GRS codes and formulas to compute the hull dimension are
given. Besides, some examples are provided to show the conditions are too good to
be improved. Moreover, some self-orthogonal GRS codes and self-dual GRS codes
are shown, which generalize results in [9].
An interesting question to be considered in the future is the search for Hermitian
hulls of GRS codes.

References
[1] E. F. Assmus and J. D. Key, “Affine and projective planes,” Discrete Math. vol. 83, pp. 161-187,
1990.
[2] B. Chen and H. Liu, “New constructions of MDS codes with complementary duals,” IEEE
Trans. Inf. Theory, vol. 64, no. 8, pp. 5776-5782, 2018.
[3] B. Chen, S. Ling, and H. Liu, “Hulls of Reed-Solomon Codes via Algebraic Geometry Codes,”
IEEE Trans. Inf. Theory, vol. 69, no. 2, pp. 1005-1014, 2023.
[4] H. Chen, “On the hull-variation problem of equivalent linear codes,” IEEE Trans. Inf. Theory,
vol. 69, no. 5, pp. 2911-2922, 2023.
[5] H. Chen, “New MDS entanglement-assisted quantum codes from MDS Hermitian self-
orthogonal codes,” Des. Codes Cryptogr, vol. 91, no. 8, pp. 2665-2676, 2023.
[6] H. Chen, “Many Non-Reed-Solomon Type MDS codes from arbitrary genus algebraic curves,”
https://doi.org/10.48550/arXiv.2208.05732.
[7] W. Fang and F. Fu, “Some new constructions of quantum MDS codes,” IEEE Trans. Inf.
Theory, vol. 65, no. 12, pp. 7840-7847, 2019.
[8] W. Fang, F. Fu, L. Li, and S. Zhu, “Euclidean and Hermitian hulls of MDS codes and their
applications to EAQECCs,” IEEE Trans. Inf. Theory, vol. 66, no. 6, pp. 3527-3537, 2019.
[9] Y. Gao, Q. Yue, X. Huang, and J. Zhang, “Hulls of generalized Reed-Solomon codes via goppa
codes and their applications to quantum codes,” IEEE Trans. Inf. Theory, vol. 67, no. 10, pp.
6619-6626, 2021.
[10] D. Han, and Y. Ren, “The maximal length of q-ary MDS elliptic codes is close to q/2,” Inter-
national Mathematics Research Notices, https://doi.org/10.1093/imrn/rnad271, 2023.
[11] L. Jin, “Construction of MDS codes with complementary duals,” IEEE Trans. Inf. Theory, vol.
63, no. 5, pp. 2843-2847, 2017.
[12] L. Jin, and C. Xing, “New MDS self-dual codes from generalized Reed-Solomon codes,” IEEE
Trans. Inf. Theory, vol. 63, no. 3, pp. 1434-1438, 2017.
26 JIA, YUE, SUN, AND SUI

[13] J. Leon, “Computing automorphism groups of error-correcting codes,” IEEE Trans. Inf. Theory,
vol. 28, no. 3, pp. 496-511, 1982.
[14] J. Leon, “Permutation group algorithms based on partition,” I: Theory and algorithms. J.
Symb. Comput, vol. 12, pp. 533-583, 1991.
[15] K. Lebed, H. Liu, and J. Luo, “Construction of MDS self-dual codes over finite fields,” Finite
Fields Appl, vol. 59, pp. 199-207, 2019.
[16] Magma Calculator, Magma Computational Algebra System, 2023. Avaliable:
http://magma.maths.usyd.edu.au/calc/.
[17] J. L. Massey, “Linear codes with complementary duals,” Discrete Math, pp. 337-342, 1992.
[18] Y. Ren and D. Han, “On MDS geometric Fq -linear Fqt -codes,” Discrete Math, vol. 346,
no.113125, 2022.
[19] H. Stichtenoth, “Algebraic Function Fields and Codes,” Berlin, Germany: Springer-Verlag,
2009.
[20] N. Sendrier, “Finding the permutation between equivalent codes: the support splitting algo-
rithm,” IEEE Trans. Inf. Theory, vol. 46, no. 4, pp. 1193-1203, 2000.
[21] N. Sendrier, “On the dimension of the hull,” SIAM J. Discrete Math, vol. 10, no. 2, pp. 282-293,
1997.
[22] N. Sendrier and G. Skersys, “On the computation of the automorphism group of a linear code,”
in: Proc. IEEE Int. Symp. Inf. Theory, Washington, DC, USA, 13, 2001.
[23] X. Shi, Q. Yue, and S. Yang, “New LCD MDS codes constructed from generalized Reed-Solomon
codes,” J. Algebra Appl, vol. 18, no. 8, 1950150, 2019.
[24] Y. Wu and Q. Yue, “Factorizations of binomial polynomials and enumerations of LCD and
self-dual constacyclic codes,” IEEE Trans. Inf. Theory, vol. 65, no. 3, pp. 1740-1751, 2019.
[25] Y. Wu and Q. Yue, “New Galois hulls of generalized Reed-Solomon codes,” Finite Fields Appl,
vol. 83, no. 102084, 2022.
[26] H. Yan, “A note on the construction of MDS self-dual codes,” Cryptogr. Commun, vol. 11, no.
2, pp. 259-268, 2019.

School of Mathematics, Nanjing University of Aeronautics and Astronautics, Nanjing, 211100, P.


R. China and State Key Laboratory of Cryptology, P.O. Box 5159, Beijing 100878, P. R. China
Email address: jiaxue0904@163.com

School of Mathematics, Nanjing University of Aeronautics and Astronautics, Nanjing, 211100, P.


R. China and State Key Laboratory of Cryptology, P.O. Box 5159, Beijing 100878, P. R. China
Email address: yueqin@nuaa.edu.cn

School of Mathematics, Nanjing University of Aeronautics and Astronautics, Nanjing, 211100, P.


R. China and State Key Laboratory of Cryptology, P.O. Box 5159, Beijing 100878, P. R. China
Email address: sunhuan6558@163.com

School of Mathematics and Information Science, Henan Normal University, Xinxiang, 453007,
China
Email address: suijunzhen@163.com

You might also like