A Class of Almost MDS Codes
A Class of Almost MDS Codes
a r t i c l e i n f o a b s t r a c t
Article history: MDS codes and almost MDS (AMDS) codes are special
Received 30 October 2021 classes of linear codes, and have important applications in
Accepted 11 January 2022 communications, data storage, combinatorial theory, and
Available online 31 January 2022
secrete sharing. The objective of this paper is to present a
Communicated by Chaoping Xing
class of AMDS codes from some BCH codes and determine
MSC: their parameters. It turns out the proposed AMDS codes
94C10 are distance-optimal and dimension-optimal locally repairable
94B05 codes. The parameters of the duals of this class of AMDS
94A60 codes are also discussed.
© 2022 Elsevier Inc. All rights reserved.
Keywords:
Cyclic code
Linear code
MDS code
BCH code
Locally repairable code
1. Introduction
In coding theory, the Singleton bound is an upper bound on the size of an arbitrary
linear code with length n, size M , and minimum distance d. For an [n, k, d] code, the
Singleton bound says that d ≤ n − k + 1. If this equality holds, i.e., d = n − k + 1, then
* Corresponding author.
E-mail addresses: [email protected] (X. Geng), [email protected] (M. Yang),
[email protected] (J. Zhang), [email protected], [email protected] (Z. Zhou).
https://doi.org/10.1016/j.ffa.2022.101996
1071-5797/© 2022 Elsevier Inc. All rights reserved.
2 X. Geng et al. / Finite Fields and Their Applications 79 (2022) 101996
the code is called an maximum distance separable (MDS) code. If d = n − k, then the
code is called an almost MDS (AMDS for short) code [10]. A code is said to be a near
MDS (NMDS for short) code if the code and its dual code both are AMDS. MDS codes
achieve optimal parameters that allow correction of maximal number of errors for a given
code rate [6]. MDS and AMDS codes have important applications in communications,
data storage, combinatorial theory, and secret sharing [12].
In many cases, BCH codes are the best linear codes. In the past ten years, a lot of
progress on the study of BCH codes has been made (see, for example, [7][8][9][11][16]).
Recently, Ding and Tang studied a class of BCH codes C(q,n,δ,h) with q = 3m , length
n = q+1, design distance δ = 3 and h = 1, and proved this class of BCH codes are NMDS
codes [2]. They also obtained infinite families of 3-designs from the proposed NMDS
codes. Inspired by the work of Ding and Tang, the objective of this paper is to present a
class of AMDS codes from the BCH codes C(q,q+1,3,4) and determine their parameters. It
turns out the proposed AMDS codes are distance-optimal and dimension-optimal locally
repairable codes, which have important applications in distributed storage systems and
receive a lot of attention in recent years [14][15][5][1][13]. The parameters of the duals of
this class of AMDS codes are also discussed.
The rest of this paper is organized as follows. In Section 2, we present some prelim-
inaries on cyclic codes, BCH codes, AMDS codes, NMDS codes and locally repairable
codes. In Section 3, we propose a new class of AMDS codes from BCH codes over GF(3m )
with m being odd. Section 4 is devoted to some concluding remarks.
2. Preliminaries
2.1. Cyclic codes, BCH codes, almost MDS codes and near MDS codes
1 + A 1 x + A 2 x2 + · · · + A n xn .
X. Geng et al. / Finite Fields and Their Applications 79 (2022) 101996 3
The sequence (1, A1 , A2 , . . . , An ) is called the weight distribution of the code C. In ad-
dition, we call C a t-weight code if |Ai = 0 : 1 ≤ i ≤ n| = t.
Let n be a positive integer and Zn denote the set {0, 1, 2, ..., n −1}. Let s be an integer
with 0 ≤ s < n. The q-cyclotomic coset of s modulo n is defined by
where s is the smallest positive integer such that s ≡ sq s (mod n), and is the size of
the q-cyclotomic coset. The smallest integer in Cs is called the coset leader of Cs . Let
Γ(n,q) be the set of all the coset leaders. We have then Cs ∩ Ct = ∅ for any two distinct
elements s and t in Γ(n,q) , and
Cs = Zn . (1)
s∈Γ(n,q)
polynomial Mβ s (x) of β s over GF(q) is the monic polynomial of the smallest degree over
GF(q) with β s as a root. It is straightforward to see that this polynomial is given by
Mβ s (x) = x − β i ∈ GF(q)[x],
i∈Cs
where the least common multiple is computed over GF(q). It may happen that C(q,n,δ1 ,h)
and C(q,n,δ2 ,h) are identical for two distinct δ1 and δ2 . The maximum designed distance
of a BCH code is also called the Bose distance. When h = 1, the code C(q,n,δ,h) with
the generator polynomial in (2) is called a narrow-sense BCH code. If n = q m − 1, then
C(q,n,δ,h) is referred to as a primitive BCH code.
The Singleton defect of an [n, k, d] code C is defined by def(C) = n − k + 1 − d. Thus,
MDS codes are codes with defect 0. A code C is said to be almost MDS (AMDS for
short) if it has defect 1. Hence, AMDS codes have parameters [n, k, n − k]. AMDS codes
of dimension 1, n − 2, n − 1 and n are called trivial. Since it is easy to construct trivial
4 X. Geng et al. / Finite Fields and Their Applications 79 (2022) 101996
AMDS codes of arbitrary lengths, we will consider only nontrivial AMDS codes. See [3]
and [4] for some basic properties of AMDS codes.
Unlike MDS codes, the dual of an AMDS code may not be AMDS. A code C is said
to be near MDS (NMDS for short) if both C and C ⊥ are AMDS. By definition, C is near
NMDS if and only if C ⊥ is so. The next theorem follows from the definition of NMDS
codes.
Theorem 2.1 ([2]). An [n, k] code C over GF(q) is NMDS if and only if d(C) +d(C ⊥ ) = n,
where d(C) and d(C ⊥ ) denote the minimum distances of C and C ⊥ , respectively.
The i-th code symbol of a linear code C is said to have locality r, if xi in each codeword
x ∈ C can be recovered by r other coded symbols (i.e., xi is a function of some other r
symbols xi1 , xi2 , . . . , xir ). A linear code is said to have locality r if every code symbol
has locality at most r. An (n, k, d, q; r)-LRC (for short) is a linear code of code length
n, dimension k, minimum distance d and locality r over GF(q) [14].
For classical error-correcting codes, there are some tradeoffs between the code length,
dimension, and the minimum distance which can be characterized by some inequalities
(see [6] for details). Similarly, there are some tradeoffs between the locality and other
parameters of LRCs. The following two bounds gave such tradeoffs.
(q)
where kopt (n, d) denotes the largest possible dimension of a linear code with code length n,
minimum distance d and alphabet size q, where Z+ is the set of all nonnegative integers.
In this paper, for any given (n, k, d, q; r)-LRC, we say the code is dimension-optimal
if the paramters of the code meet the Cadambe-Mazumdar bound in (4). Similarly, an
(n, k, d, q; r)-LRC is said to be distance-optimal if the distance d achieves the Singleton-
like bound in (3).
The following is a simple result on the locality of cyclic codes whose proof can be
found in [15].
x4 y4 z 4
x y5 z 5
= x−5 y −5 z −5 [(y 9 − z 9 )(z 10 − x10 ) − (x9 − z 9 )(z 10 − y 10 )].
−5
x y −5 z −5
Lemma 3.2. Let q = 3m with m being odd. Let Uq+1 denote the set of all (q + 1)-th roots
of unity in GF(q 2 ). Suppose that x, y, z are three pairwise distinct elements in Uq+1 .
Then
x4 y4 z 4
x y5 z 5
= 0.
−5
x y −5 z −5
x4 y4 z 4
Proof. If
x5 y5 z 5
= 0, then it follows from Lemma 3.1 that
−5
x y −5 z −5
z 10 − x10 z 10 − y 10
= . (5)
x9 − z 9 y9 − z9
It is equivalent to
x10 − z 10 y 10 − z 10
= . (6)
xz(z 9 − x9 ) yz(z 9 − y 9 )
6 X. Geng et al. / Finite Fields and Their Applications 79 (2022) 101996
We are now ready to prove the following main result on the code C(q,q+1,3,4) .
Theorem 3.3. Let q = 3m with m ≥ 3 being odd. Then the BCH code C(q,q+1,3,4) is
⊥
an AMDS code with parameters [q + 1, q − 3, 4]. Moreover, its dual code C(q,q+1,3,4) has
⊥ ⊥
parameters [q + 1, 4, d ] with q − 9 ≤ d ≤ q − 3.
⊥
C(q,q+1,3,4) = {c(a,b) : a, b ∈ GF(q 2 )},
Trq2 /q (au4 + bu5 ) = au4 + bu5 + aq u−4 + bq u−5 = u−5 (bu10 + au9 + aq u + bq ). (7)
Consider the number of solutions of the equation bu10 + au9 + aq u + bq = 0 for u ∈ Uq+1 .
There are at most ten u ∈ Uq+1 such that Trq2 /q (au4 + bu5 ) = 0 if (a, b) = (0, 0). As a
result, for (a, b) = (0, 0) we have
X. Geng et al. / Finite Fields and Their Applications 79 (2022) 101996 7
wt(c(a,b) ) ≥ q + 1 − 10 = q − 9.
wt(c(a,b) ) = q + 1 − 4 = q − 3.
dx−5 + ey −5 + f z −5 = 0. (9)
x4 y4 z 4
x y5 z 5
= 0.
−5
x y −5 z −5
By Lemma 3.2, this is impossible. Thus the minimum distance d of C(q,q+1,3,4) is at least
4, i.e., d ≥ 4. On the other hand, by the Singleton bound, d ≤ 5. If d = 5, then C(q,q+1,3,4)
⊥ ⊥
is an MDS code. Thus C(q,q+1,3,4) is also an MDS code. However, C(q,q+1,3,4) can not be
an MDS code since d⊥ ≤ q − 3. Hence d = 4. We now conclude that C(q,q+1,3,4) is an
⊥
AMDS code with parameters [q + 1, q − 3, 4] and C(q,q+1,3,4) has parameters [q + 1, 4, d⊥ ]
⊥
with q − 9 ≤ d ≤ q − 3.
Furthermore, the following result shows that the AMDS code C(q,q+1,3,4) is an optimal
LRC.
8 X. Geng et al. / Finite Fields and Their Applications 79 (2022) 101996
implying dq−3
⊥ −1
= 2. According to the Singleton-like bound in (3), we have
k
d≤n−k− +2
r
q−3
= (q + 1) − (q − 3) − ⊥ +2
d −1
= 4.
That is to say that C(q,q+1,3,4) is distance-optimal. We now check its dimensional opti-
mality. Taking t = 1 on the right hand side of (4), one has
(q)
k ≤ min tr + kopt (n − t(r + 1), d)
t∈Z+
≤ (d⊥ − 1) + kopt (q + 1 − d⊥ , 4)
(q)
≤ d⊥ − 1 + q − 2 − d⊥
= q − 3,
where the third inequality holds due to the fact that kopt (q+1 −d⊥ , 4) ≤ q−2 −d⊥ , which
(q)
⊥
Example 3.5. The parameters of the codes C(q,q+1,3,4) and C(q,q+1,3,4) for 3 ≤ m ≤ 5 are
listed below:
⊥
m C(q,q+1,3,4) C(q,q+1,3,4)
3 [28, 24, 4] [28, 4, 24]
5 [244, 240, 4] [244, 4, 240]
7 [2188, 2184, 4] [2188, 4, 2184].
⊥
It is also easy to verify that C(q,q+1,3,4) and C(q,q+1,3,4) are both distance-optimal and
dimension-optimal LRCs for m = 3, 5, 7.
⊥
It can be seen from the example above that C(q,q+1,3,4) is also an AMDS code for
3 ≤ m ≤ 7. This motivates us to propose the following conjecture.
X. Geng et al. / Finite Fields and Their Applications 79 (2022) 101996 9
⊥
Conjecture 3.6. C(q,q+1,3,4) is an AMDS code with parameters [q + 1, 4, q − 3].
If Conjecture 3.6 is true, then C(q,q+1,3,4) becomes a NMDS code. In the following,
we give a sufficient and necessary condition for Conjecture 3.6 being true. Let N (a, b)
denote the number of solutions of the equation bu10 + au9 + aq u + bq = 0 in Uq+1 , where
a, b ∈ GF(q 2 ), (a, b) = (0, 0) and Uq+1 = {x ∈ GF(q 2 ) : xq+1 = 1}. It then follows from
the proof of Theorem 3.3 and (7) that
wt(c(a,b) ) = q + 1 − N (a, b)
⊥ ⊥
for any codeword c(a,b) in C(q,q+1,3,4) . Therefore, C(q,q+1,3,4) has minimum distance q − 3
if and only if N (a, b) ≤ 4 and there exists at least one pair (a, b) such that N (a, b) = 4.
The contribution of this paper was the study of the BCH code C(q,q+1,3,4) in Section 3,
where the parameters of the code were determined, and a bound on the minimum distance
⊥
of the dual of the code C(q,q+1,3,4) was given. Furthermore, the code C(q,q+1,3,4) over GF(q)
is a distance-optimal and dimension-optimal LRC. It would be possible to obtain more
AMDS codes from some other BCH codes. Finally, we invite the reader to prove or
disprove Conjecture 3.6.
Acknowledgments
The authors would like to thank the Editor and the anonymous Reviewers for giving
us invaluable comments and suggestions that greatly improved the quality of this paper.
This work was supported in part by the National Natural Science Foundation of China
under Grant Nos. 62071397 and 11971395, and also supported in part by projects of
central government to guide local scientific and technological development under Grant
No. 2021ZYD0001.
References
[1] V.R. Cadambe, A. Mazumdar, Bounds on the size of locally recoverable codes, IEEE Trans. Inf.
Theory 61 (11) (Nov. 2015) 5787–5794.
[2] C. Ding, C. Tang, Infinite families of near MDS codes holding t-designs, IEEE Trans. Inf. Theory
66 (9) (2020) 5419–5428.
[3] S. Dodunekov, I. Landgev, On near-MDS codes, J. Geom. 54 (1995) 30–43.
[4] A. Faldum, W. Willems, Codes of small defect, Des. Codes Cryptogr. 10 (March 1997) 341–350.
[5] P. Gopalan, C. Huang, H. Simitci, S. Yekhanin, On the locality of codeword symbols, IEEE Trans.
Inf. Theory 58 (11) (Aug. 2012) 6925–6934.
[6] W.C. Huffman, V. Pless, Fundamentals of Error-Correcting Codes, Cambridge University Press,
Cambridge, 2003.
[7] C. Li, P. Wu, F. Liu, On two classes of primitive BCH codes and some related codes, IEEE Trans.
Inf. Theory 65 (6) (June 2009) 3830–3840.
10 X. Geng et al. / Finite Fields and Their Applications 79 (2022) 101996
[8] S. Li, The minimum distance of some narrow-sense primitive BCH codes, SIAM J. Discrete Math.
31 (4) (April 2017) 2530–2569.
[9] Y. Liu, R. Li, Q. Fu, L. Lu, Y. Rao, Some binary BCH codes with length n = 2m + 1, Finite Fields
Appl. 55 (2019) 109–133.
[10] R. Pellikaan, X. Wu, S. Bulygin, et al., Codes, Cryptology and Curves with Computer Algebra,
2017.
[11] X. Shi, Q. Yue, Y. Wu, The dual-containing primitive BCH codes with the maximum designed
distance and their applications to quantum codes, Des. Codes Cryptogr. 87 (9) (2019) 2165–2183.
[12] D. Simos, Z. Varbanov, MDS codes, NMDS codes and their secret-sharing schems. (Accessed April
2018).
[13] I. Tamo, A. Barg, A family of optimal locally recoverable codes, IEEE Trans. Inf. Theory 60 (8)
(Aug. 2014) 4661–4676.
[14] P. Tan, Z. Zhou, H. Yan, U. Parampalli, Optimal cyclic locally repairable codes via cyclotomic
polynomials, IEEE Commun. Lett. 23 (2) (Feb. 2019) 202–205.
[15] P. Tan, C. Fan, C. Ding, Z. Zhou, The minimum linear locality of linear codes, arXiv:2102.00597,
2021.
[16] H. Yan, H. Liu, C. Li, S. Yang, Parameters of LCD BCH codes with two lengths, Adv. Math.
Commun. 12 (3) (2018) 579–594.