Abstract
Applied in communication, data storage system, secret sharing schemes, authentication codes and association schemes, linear codes attract much attention. In this paper, a class of three-weight linear codes is obtained by the defining sets over finite fields of odd characteristic. The parameters and weight distributions of linear codes are determined by the additive characters, multiplicative characters and Gauss sums. Further, most of linear codes obtained are minimal, which can be used to construct secret sharing schemes.
Similar content being viewed by others
Explore related subjects
Discover the latest articles, news and stories from top researchers in related subjects.Avoid common mistakes on your manuscript.
1 Introduction
Let \(\mathbb {F}_q\) be the finite field with q elements and \(\mathbb {F}_q^*=\mathbb {F}_q\backslash {\{0\}}\), where \(q=p^m\), p is a prime and m is a positive integer. A linear code C with parameters \(\left[ n,k,d \right]\) over \(\mathbb {F}_p\) is a k-dimensional subspace of \(\mathbb {F}_p^n\) with length n and minimum Hamming distance d. Let \(A_i\) denote the number of codewords with Hamming weight i in a code C of length n. The weight enumerator of C is defined by \(1+A_1z+A_2z^2+...+A_nz^n\). The sequence \((1,A_1,A_2,...,A_n )\) is called the weight distribution of C. A code is said to be a t-weight code if the number of nonzero \(A_i\) in the sequence \((A_1,A_2,... ,A_n )\) is equal to t. The weight distribution of a code contains crucial information about the error correcting capability and the probability of error detection and correction with respect to some algorithms. Hence, the weight distribution attracts much attention in coding theory [1,2,3,4,5,6].
Linear codes with few weights have important applications in secret sharing schemes [7, 8], authentication codes [9], association schemes [10] and strongly regular graphs [11]. There are two generic constructions of linear codes from functions. Let \(Tr=\sum \nolimits _{k=0}^{m-1}x^{p^k}\) be the trace function from \(\mathbb {F}_q\) to \(\mathbb {F}_p\). Then the first one [12] is obtained by considering a code C(f) over \(\mathbb {F}_p\) involving a polynomial f from \(\mathbb {F}_q\) to \(\mathbb {F}_q\) defined by
where \(f(0)=0\). The code C(f) from f is a linear code of length \(q-1\) and its dimension is upper bounded by 2m. This generic construction has a long history and its importance is supported by Delsarte’s Theorem [13]. The second generic construction of linear codes from functions [14] is obtained by fixing a set \(D=\{d_1,d_2,...,d_n\}\) in \(\mathbb {F}_q\) and by defining a linear code involving D as follows:
The set D is called the defining set of \(C_D\). This construction is generic in the sense that any code could be produced by selecting the defining set \(D\subseteq \mathbb {F}_q\). The code quality in terms of parameters is closely related to the choice of the set D. The defining set D can be given by functions, i.e., \(D=\{x\in \mathbb {F}_q^*:f(x)=0\}\), where \(f(x)=Tr(F(x))\) is a function from \(\mathbb {F}_q\) to \(\mathbb {F}_p\) and \(F(x)\in \mathbb {F}_q\left[ x\right]\). From the choice of F(x) or f(x), many linear codes can be constructed. Ding [15] presented a survey on recent results on constructing binary linear codes with this method from Boolean functions and proposed some open problems on this construction of binary linear codes. Xiang et al. [16] presented the weight distribution of \(C_D\) for the case \(F(x)=x^{p+1}-x\). Ling et al. [17] constructed a class of three-weight and five-weight linear codes for the case \(F(x)=x^2+x\). Many papers used different functions of special forms in constructing linear codes with few weights [18,19,20,21,22,23,24,25].
Motivated by the above construction, Li et al. [26] defined a p-ary linear code by
where \(D\subseteq \mathbb {F}_{q}^2\) is also called a defining set. And several classes of two-weight and three-weight linear codes and their explicit weight enumerators were presented when \(D=\{(x,y)\in \mathbb {F}_{q}^2\backslash \{(0,0)\}:Tr(R(x,y)=0)\}\), where \(R(x,y)=x^{N_1}+y^{N_2}\), \(N_1,\ N_2\in \{1,2, p^{\frac{m}{2}+1}\}\). Jian et al. [27] studied several classes of two-weight and three-weight linear codes of the form (1) for the two cases \(R(x,y)=x+y^{p^u+1}\) and \(R(x,y)=x^2+y^{p^u+1}\). Hu et al. [28] studied \(C_D\) of the form (1) with the defining set given by
In this paper, we extend their results by choosing the defining set given by
where p is an odd prime. We mainly use certain exponential sums to determine the parameters and weight distributions of linear codes with the form (1). In particular, most of the linear codes obtained are minimal, which can be used to construct secret sharing schemes [18].
The rest of this paper is organized as follows. Section 2 introduces some results on additive characters, multiplicative characters and Gauss sums. Section 3 introduces some auxiliary results for determining the parameters and weight distributions of linear codes. Section 4 presents a class of three-weight linear codes from defining sets. Section 5 makes a conclusion.
2 Preliminaries
In this section, we introduce some basic results on additive characters, multiplicative characters and Gauss sums.
Definition 1
For \(a\in \mathbb {F}_q\), the trace function Tr(a) of a over \(\mathbb {F}_p\) is defined by
where \(q=p^m\). Note that \(a^q=a\) for each \(a\in \mathbb {F}_q\).
Lemma 1
[29] For \(a,b\in \mathbb {F}_q , c\in \mathbb {F}_p\), the trace function Tr satisfies the following properties:
Definition 2
An additive character of \(\mathbb {F}_q\) is a homomorphism from the additive group \(\mathbb {F}_q\) into the multiplicative group composed by the p-th roots of unity in the complex numbers.
For each \(a\in \mathbb {F}_q\), the function defined by
is an additive character of \(\mathbb {F}_q\), where \(\zeta _p=e^{2\pi \sqrt{-1}/p}\). When \(a=1\), \(\chi _1\) is called the canonical additive character of \(\mathbb {F}_q\). Note that \(\chi _a(x)=\chi _1(ax)\).
Lemma 2
[29] Let \(\chi _1\) be a canonical additive character of \(\mathbb {F}_q\), then the orthogonal property of additive characters is given by
Some results of multiplicative characters and Gauss sums are given below.
Definition 3
Let \(\alpha\) be a primitive element of \(\mathbb {F}_q\). For each \(j=0,1,...,q-2\), the function given by
is a multiplicative character of \(\mathbb {F}_q\). When \(j=(q-1)/2\), \(\psi _{(q-1)/2}\) is called the quadratic multiplicative character of \(\mathbb {F}_q\), which is denoted by \(\eta\). When \(j=(p-1)/2\) and \(q=p\), \(\psi _{(p-1)/2}\) is called the quadratic multiplicative character of \(\mathbb {F}_p\), which is denoted by \(\bar{\eta }\).
Definition 4
Let \(\chi _1\) be a canonical additive character of \(\mathbb {F}_q\) and \(\eta\) be a quadratic multiplicative character of \(\mathbb {F}_q\). The Gauss sum over \(\mathbb {F}_q\) is defined by
Let \(\bar{\chi }_1\) be a canonical additive character of \(\mathbb {F}_p\) and \(\bar{\eta }\) be a quadratic multiplicative character of \(\mathbb {F}_p\). The Gauss sum over \(\mathbb {F}_p\) is defined by
Lemma 3
[29] Let \(\mathbb {F}_q\) be a finite field with \(q=p^m\), where p is an odd prime and \(m\in \mathbb {N}\). Let \(\eta\) be a quadratic multiplicative character of \(\mathbb {F}_q\) and \(\chi _1\) be a canonical additive character of \(\mathbb {F}_q\). Then
The following lemma on exponential sums is of use.
Lemma 4
[29] Let \(\chi\) be a nontrivial additive character of \(\mathbb {F}_q\) with q odd, and let \(f(x)=a_2x^2+a_1x+a_0\in \mathbb {F}_q\left[ x\right]\) with \(a_2\ne 0\), then
where \(\eta\) is a quadratic multiplicative character of \(\mathbb {F}_q\).
3 Auxiliary results
This section gives some lemmas for determining the parameters and weight distributions of linear codes \(C_D\) with the form (1), where the defining set D is defined in (2).
From now on we fix the following notations.
-
\(q=p^m\), where p is an odd prime and m is a positive integer.
-
Tr is the trace function from \(\mathbb {F}_q\) to \(\mathbb {F}_p\).
-
\(\zeta _p=e^{2\pi \sqrt{-1}/p}\).
-
\(u\in \mathbb {F}_p\).
-
\(\bar{\chi }_1\) is a canonical additive character of \(\mathbb {F}_p\), \(\bar{\eta }\) is a quadratic multiplicative character of \(\mathbb {F}_p\).
-
\(S_p=\{x^2:x\in \mathbb {F}_p^*\}\), \(NS_p=\mathbb {F}_p^*\backslash S_p\).
Let \(n_0=\sharp \{(x,y)\in {\mathbb {F}_q^2}:Tr(x^p+xy)=u\}\), then
where
Let \(N_0=\sharp \{(x,y)\in {\mathbb {F}_q^2}:Tr(x^p+xy)=u,Tr(ax+by)=0\}\), then
where
The Hamming weight of a codeword \(c_{a,b}\) in \(C_D\) with the form (1) is
The following lemmas give the values of \(\varOmega _1\), \(\varOmega _2\) and \(\varOmega _3\).
Lemma 5
Let \(\bar{\chi }_1\) be a canonical additive character of \(\mathbb {F}_p\), \(\bar{\eta }\) be a quadratic multiplicative character of \(\mathbb {F}_p\). Then
Proof
From Lemma 3, if \(p\equiv 1(mod\ 4)\), \(\bar{\eta }(-1)=1\), \(G(\bar{\eta },\bar{\chi }_1)=p^{\frac{1}{2}}\), then \(\bar{\eta }(-1)G^2(\bar{\eta },\bar{\chi }_1)=p\). If \(p\equiv 3(mod\ 4)\), \(\bar{\eta }(-1)=-1\), \(G(\bar{\eta },\bar{\chi }_1)=\sqrt{-1}p^{\frac{1}{2}}\), then \(\bar{\eta }(-1)G^2(\bar{\eta }, \bar{\chi }_1)=(-1)(\sqrt{-1})^2p=p\). Hence, this lemma follows. \(\square\)
Lemma 6
Let \(\varOmega _1=\sum \limits _{x,y\in {\mathbb {F}_{p^m}}}\sum \limits _{w_1\in {\mathbb {F}_p^{*}}} \zeta _p^{w_1(Tr(x^p+xy)-u)}\), then
Proof
From Lemma 2,
Hence, this lemma follows. \(\square\)
Lemma 7
Let \(\varOmega _2=\sum \limits _{x,y\in {\mathbb {F}_{p^m}}}\sum \limits _{w_2\in {\mathbb {F}_p^{*}}} \zeta _p^{w_2Tr(ax+by)}\), where \(a, b\in \mathbb {F}_q\), then
Proof
From Lemma 2, we have
Hence, this lemma follows. \(\square\)
Lemma 8
Let \(\varOmega _3=\sum \limits _{x,y\in {\mathbb {F}_{p^m}}}\sum \limits _{w_1\in {\mathbb {F}_p^{*}}} \zeta _p^{w_1(Tr(x^p+xy)-u)}\sum \limits _{w_2\in {\mathbb {F}_p^{*}}} \zeta _p^{w_2Tr(ax+by)}\), where \(a, b\in \mathbb {F}_q\).
(1) When \(u=0\),
(2) When \(u\ne 0\),
where \(B=Tr^2(b)-4uTr(ab)\).
Proof
We evaluate the values of \(\varOmega _3\) by the results of exponential sums.
We further evaluate the above exponential sum. Let \(t_1=Tr(ab)\), \(t_2=Tr(b)\).
(1) Case \(u=0\).
When \(t_1=0\),
When \(t_1\ne 0\), then
We further evaluate the above exponential sum by distinguishing the cases that \(t_2=0\) and \(t_2\ne 0\).
If \(t_2=0\), then
If \(t_2\ne 0\), from Definition 4 and Lemma 5, then
(2) Case \(u\ne 0\).
When \(t_1=0\),
When \(t_1\ne 0\), then
We further evaluate the above exponential sum by distinguishing the cases that \(t_2^2-4ut_1\ne 0\) and \(t_2^2-4ut_1=0\).
If \(t_2^2-4ut_1\ne 0\), from Definition 4 and Lemma 5, then
If \(t_2^2-4ut_1=0\), then
Hence, this lemma follows. \(\square\)
4 A class of three-weight linear codes
In this section, we consider the linear codes \(C_D\) with the form (1) from the defining set D defined in (2). Then we obtain a class of three-weight linear codes. The parameters and the weight distributions of the linear codes are given in the following theorem.
Theorem 1
Let p be an odd prime, \(D=\{(x,y)\in {\mathbb {F}_q^2\backslash \{(0,0)\}}:Tr(x^p+xy)=u\}\), where \(u\in \mathbb {F}_p\) and \(q=p^m\).
(1) When \(u=0\), the code \(C_D\) defined by (1) is a three-weight linear code with parameters \(\left[ p^{2m-1}+(p-1)p^{m-1}-1,2m,(p-1)p^{2m-2}\right]\), whose weight distribution is listed in Table 1.
(2) When \(u\ne 0\), then the code \(C_D\) defined by (1) is a three-weight linear code with parameters \(\left[ p^{2m-1}-p^{m-1},2m,(p-1)p^{2m-2}-2p^{m-1}\right]\), whose weight distribution is listed in Table 2.
Proof
Then the length n of the linear code \(C_D\) is given by
(1) When \(u=0\), it follows from (4), Lemmas 6, 7 and 8 that the Hamming weight \(w(c_{a,b})\) of the nonzero codeword \(c_{a,b}\) is given by
Through the above analysis, let \(w_1=(p-1) p^{2m-2},\ w_2=(p-1)p^{2m-2}+(p-1)p^{m-1},\ w_3=(p-1)p^{2m-2}+(p-2) p^{m-1}\), and \(A_{w_1}\), \(A_{w_2}\), \(A_{w_3}\) denote the numbers of codewords with weights \(w_1\), \(w_2\), \(w_3\) respectively.
When \(Tr(ab)=0\) and \(Tr(b)=0\), the number of codewords with weight \(w_1\) can be obtained.
where
The values of \(\varLambda _1,\ \varLambda _2\) and \(\varLambda _3\) are as follows:
From Lemma 2, then
Through the above results, we can obtain:
Then by Pless Power Moments [30], we have
Solving the above system of linear equations, we have \(A_{w_2}=p^{2m-1}+(p-2)p^{2m-2}-(p-1)p^{m-1}\) and \(A_{w_3}=(p-1)p^{2m-1}-(p-1) p^{2m-2}\). Hence, we have the weight distribution in Table 1.
(2) When \(u\ne 0\), then it follows from (4), Lemmas 6, 7 and 8 that the Hamming weight \(w(c_{a,b})\) of the nonzero codeword \(c_{a,b}\) is given by
where \(B=Tr^2(b)-4uTr(ab)\). Let \(w_1=(p-1) p^{2m-2},\ w_2=(p-1)p^{2m-2}-p^{m-1},\ w_3=(p-1) p^{2m-2}-2 p^{m-1}\). With the same technique as \(u=0\), we have \(A_{w_1}=\frac{p-1}{2}p^{2m-1}+p^{2m-2}+\frac{p-1}{2} p^{m-1}-1,\ A_{w_2}=2(p-1) p^{2m-2},\ A_{w_3}=\frac{p+1}{2}p^{2m-1}-(2p-1)p^{2m-2}-\frac{p-1}{2} p^{m-1}\). Hence, we have the corresponding weight distribution in Table 2. \(\square\)
The results of Theorem 1 are verified by Magma.
Example 1
Let \(p=3,\ m=2,\ u=0\), then the code \(C_D\) in Theorem 1(1) has parameters \(\left[ 32,4,18\right]\) and weight enumerator \(1+14z^{18}+36z^{21}+30z^{24}\).
Example 2
Let \(p=5,\ m=2,\ u=0\), then the code \(C_D\) in Theorem 1(1) has parameters \(\left[ 144,4,100\right]\) and weight enumerator \(1+44z^{100}+400z^{115}+180z^{120}\).
Example 3
Let \(p=3,\ m=2,\ u=1\), then the code \(C_D\) in Theorem 1(2) has parameters \(\left[ 24,4,12\right]\) and weight enumerator \(1+6z^{12}+36z^{15}+38z^{18}\).
Example 4
Let \(p=5,\ m=2,\ u=1\), then the code \(C_D\) in Theorem 1(2) has parameters \(\left[ 120,4,90\right]\) and weight enumerator \(1+140z^{90}+200z^{95}+284z^{100}\).
Minimal linear codes have interesting applications in secret sharing schemes [8, 31]. A sufficient condition [32] for a linear code to be minimal is given in the following lemma.
Lemma 9
[18] Every nonzero codeword of a linear code C over \(\mathbb {F}_p\) is minimal, provided that
where \(w_{max}\) and \(w_{min}\) denote the maximum and minimum nonzero weights in C, respectively.
For the code \(C_D\) of Theorem 1, we have
(1) when \(u=0,\ m\ge 2\),
(2) when \(u\ne 0,\ m\ge 3\),
Then it follows from Lemma 9 that all the nonzero codewords of \(C_D\) are minimal if \(m\ge 3\). Hence, these codes can be used to construct secret sharing schemes.
Remark
Some interesting linear codes with three weights were presented in [16,17,18,19, 21,22,23,24, 26,27,28, 33, 34]. We list lengths of known three-weight linear codes in Table 3. Note that some of our codes have been presented in [17] when \(p\mid m\). However, parameters of our codes are more flexible. Our codes in Theorem 1 are not covered in previous papers and most of our codes are new.
5 Conclusion
In this paper, we generalized the results of [28], and obtained a class of three-weight linear codes over finite fields of odd characteristic. The parameters and weight distributions of linear codes were determined by some results of exponential sums. Further, most of linear codes obtained are minimal, which can be used to construct secret sharing schemes. It would be interesting to construct linear codes with good properties by new methods and present more applications of linear codes.
References
Ding, C., Yin, J.: Algebraic constructions of constant composition codes. IEEE Trans. Inf. Theory 51(4), 1585–1589 (2005)
Ding, C., Yang, J.: Hamming weights in irreducible cyclic codes. Discret. Math. 313(4), 434–446 (2013)
Li, S., Feng, T., Ge, G.: On the weight distribution of cyclic codes with Niho exponents. IEEE Trans. Inf. Theory 60(7), 3903–3912 (2014)
Ma, C., Zeng, L., Liu, Y., Feng, D., Ding, C.: The weight enumerator of a class of cyclic codes. IEEE Trans. Inf. Theory 57(1), 397–402 (2011)
Vega, G.: The weight distribution of an extended class of reducible cyclic codes. IEEE Trans. Inf. Theory 58(7), 4862–4869 (2012)
Zeng, X., Hu, L., Jiang, W., Yue, Q., Cao, X.: The weight distribution of a class of p-ary cyclic codes. Finite Fields Appl. 16, 56–73 (2010)
Anderson, R., Ding, C., Helleseth, T., Klove, T.: How to build robust shared control systems. Des. Codes Cryptogr. 15(2), 111–124 (1998)
Carlet, C., Ding, C., Yuan, J.: Linear codes from perfect nonlinear mappings and their secret sharing schemes. IEEE Trans. Inf. Theory 51(6), 2089–2102 (2005)
Ding, C., Wang, X.: A coding theory construction of new systematic authentication codes. Theor. Comput. Sci. 330(1), 81–99 (2005)
Calderbank, A.R., Goethals, J.M.: Three-weight codes and association schemes. Philips J. Res. 39, 143–152 (1984)
Calderbank, A.R., Kantor, W.M.: The geometry of two-weight codes. Bull. Lond. Math. Soc. 18, 97–122 (1986)
Mesnager, S.: Linear codes with few weights from weakly regular bent functions based on a generic construction. Cryptogr. Commun. 9, 71–84 (2017)
Delsarte, P.: On triple-sum-sets and two or three weights codes. IEEE Trans. Inf. Theory 21(5), 575–576 (1975)
Ding, C., Niederreiter, H.: Cyclotomic linear codes of order 3. IEEE Trans. Inf. Theory 53(6), 2274–2277 (2007)
Ding, C.: A construction of binary linear codes from Boolean functions. Discret. Math. 339, 2288–2303 (2016)
Xiang, C., Tang, C., Feng, K.: A class of linear codes with a few weights. Cryptogr. Commun. 9(1), 93–116 (2017)
Ling, F., Wang, Q., Lin, D.: A class of three-weight and five-weight linear codes. Discret. Appl. Math. 241(6), 25–38 (2018)
Ding, K., Ding, C.: A class of two-weight and three-weight codes and their applications in secret sharing. IEEE Trans. Inf. Theory 61(11), 5835–5842 (2015)
Ding, C.: Linear codes from some 2-designs. IEEE Trans. Inf. Theory 61(6), 3265–3275 (2015)
Li, C., Bae, S., Ahn, J., Yang, S., Yao, Z.: Complete weight enumerators of some linear codes and their applications. Des. Codes Cryptogr. 81(1), 153–168 (2016)
Tang, C., Qi, Y., Huang, D.: Two-weight and three-weight linear codes from square functions. IEEE Commun. Lett. 20(1), 29–32 (2015)
Tang, C., Li, N., Qi, Y., Zhou, Z., Helleseth, T.: Linear codes with two or three weights from weakly regular bent functions. IEEE Trans. Inf. Theory 62(3), 1166–1176 (2016)
Yang, S., Yao, Z.: Complete weight enumerators of a family of three-weight linear codes. Des. Codes Cryptogr. 82(3), 663–674 (2017)
Zhou, Z., Li, N., Fan, C., Helleseth, T.: Linear codes with two or three weights from quadratic bent functions. Des. Codes Cryptogr. 81, 283–295 (2016)
Zhou, Z., Tang, C., Li, X., Ding, C.: Binary LCD codes and self-orthogonal codes from a generic construction. IEEE Trans. Inf. Theory 65(1), 16–27 (2019)
Li, C., Yue, Q., Fu, F.: A construction of several classes of two-weight and three-weight linear codes. Appl. Algebra Eng. Commun. Comput. 28, 11–30 (2017)
Jian, G., Lin, Z., Feng, R.: Two-weight and three-weight linear codes based on Weil sums. Finite Fields Appl. 57, 92–107 (2019)
Hu, Z., Wang, L., Li, N., Zeng, X.: Several classes of linear codes with few weights from the closed butterfly structure. Finite Fields Appl. 76(2), 101926 (2021)
Lidl, R., Niederreiter, H., Cohn, P.M.: Finite fields. Cambridge University Press, Cambridge (1997)
Huffman, W., Pless, V.: Fundamentals of error-correcting codes. Cambridge University Press, Cambridge (1997)
Yuan, J., Ding, C.: Secret sharing schemes from three classes of linear codes. IEEE Trans. Inf. Theory 52(1), 206–212 (2006)
Heng, Z., Ding, C., Zhou, Z.: Minimal linear codes over finite fields. Finite Fields Appl. 54, 176–196 (2018)
Ding, K., Ding, C.: Binary linear codes with three weights. IEEE Commun. Lett. 18(11), 1879–1882 (2014)
Zhu, X., Yang, F.: A class of linear codes with two weights or three weights from some planar functions. J. Appl. Math. Comput. 56, 235–252 (2018)
Acknowledgements
The authors are very grateful to the anonymous reviewers and the Editor, for their valuable comments and suggestions that improved the presentation and quality of this paper. This paper was supported by Zhejiang provincial Natural Science Foundation of China (No. LY21A010013).
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
About this article
Cite this article
Duan, B., Han, G. & Qi, Y. A class of three-weight linear codes over finite fields of odd characteristic. AAECC 35, 359–375 (2024). https://doi.org/10.1007/s00200-022-00554-7
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00200-022-00554-7