Abstract
Recently, linear codes constructed from defining sets have been investigated extensively and they have many applications. For an odd prime \(p\), we determine the complete weight enumerator and weight enumerator of a class of \(p\)-ary linear codes by choosing a proper defining set. The results show that they have at most two weights and are suitable for applications in secret sharing schemes.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1 Introduction
Throughout this paper, let \(p\) be an odd prime and \(q=p^{e}\) for a positive integer \(e\). Denote by \(\mathbb {F}_{q}\) a finite field with \(q\) elements. An \([n, \kappa , \delta ]\) linear code \(C\) over \(\mathbb {F}_{p}\) is a \(\kappa \)-dimensional subspace of \(\mathbb {F}_{p}^{n}\) with minimum distance \(\delta \) (see [20]). Let \(A_{i}\) denote the number of codewords with Hamming weight \(i\) in a linear code \(C\) of length \(n\). Then \(1+A_{1}z+A_{2}z^{2}+\cdots +A_{n}z^{n} \) is defined to be the weight enumerator of \(C\).
The complete weight enumerator of a code enumerates the codewords according to the number of symbols of each kind contained in each codeword. Let the elements of \(\mathbb {F}_{p} \) be denoted by \( w_{0}= 0 \), \( w_{1},\cdots ,w_{p-1} \), in some fixed order. Also, let \(\mathbb {F}_{p}^{*}\) denote \(\mathbb {F}_{p}\backslash \{0\}\). For a codeword \(\mathsf {c}=(c_{0},c_{1},\cdots ,c_{n-1})\in \mathbb {F}_{p}^{n}\), let \(w[\mathsf {c}]\) be the complete weight enumerator of \(\mathsf {c}\), which is defined as
where \(k_{j}\) is the number of components of \(\mathsf {c}\) equal to \(w_{j}\), \(\sum _{j = 0}^{p-1}k_{j}=n\). The complete weight enumerator of the code \(C\) is then
The weight enumerators of linear codes have been well studied in literature, see, for example, [11, 12, 22, 29, 30] and references therein. The information of the complete weight enumerators of linear codes is of vital use because they not only give the weight enumerators but also show the frequency of each symbol appearing in each codeword. Furthermore the complete weight enumerator has close relation to the deception probabilities of certain authentication codes [7], and is used to compute the Walsh transform of monomial and quadratic bent functions over finite fields [13]. Further research can be found in [2, 3, 8, 15, 16, 25, 26].
The authors of [6, 9, 10] gave the following generic construction of linear codes. Set \(D=\{d_{1},d_{2},\cdots ,d_{n}\}\subseteq \mathbb {F}_{q}^{*}\), where \(q=p^{e}\). Denote by \(\text {Tr}\) the absolute trace function from \( \mathbb {F}_{q} \) to \( \mathbb {F}_{p} \). A linear code associated with \(D\) is defined by
The set \(D\) is called the defining set of \(C_{D}\). This construction technique leads to a new research and was employed to construct linear codes with a few weights, see [1, 14, 17, 18, 23, 24, 27] for more details.
Motivated by the above construction and the idea of [23], we investigate a class of linear codes with defining set. Recall \(q=p^{e}\). Let \( d=\gcd (k,e) \) be the greatest common divisor of positive integers \( k \) and \( e \). Suppose that \( e/d \) is even with \( e = 2m \). The code is defined by
with defining set
The remainder of this paper is organized as follows. In Section 2, we describe the main results of this paper, additionally we give some examples. In Section 3, we briefly recall some definitions and results on cyclotomic numbers and exponential sums, then prove the main results. In Section 4, we make a conclusion.
2 Main results
In this section, we only introduce the complete weight enumerator and weight enumerator of \(C_{D_{b}}\) described in Section 1. The main results of this paper are presented below, whose proofs will be given in Section 3.
Theorem 1
If \( b = 0 \),then the code \( C_{D_{0}} \)of(1) is a \( [p^{e-1}-1, d ] \)linearcode and the following assertions hold.
-
(i)
Whenm/d ≡ 1 mod 2 andm/d≢0 mod p, its weight enumeratoris
$$1+ (p-1)p^{d-1} z^{(p-1) p^{e-2}} + (p^{d-1}-1) z^{(p-1) (p^{e-2}+ p^{m-1})} $$and its complete weight enumerator is
$$\begin{array}{@{}rcl@{}} && w_{0}^{p^{e-1}-1}+ \dfrac{p-1}{2} p^{d-1} w_{0}^{ p^{e-2}-1} {\left( { \prod_{\rho \in\mathbb{F}_{p}^{*} }w_{\rho}^{ p^{e-2}-\eta(\rho )p^{m-1}} + \prod_{\rho \in\mathbb{F}_{p}^{*} }w_{\rho}^{ p^{e-2}+\eta(\rho )p^{m-1}} } \right) }\\ &&+ (p^{d-1}-1) w_{0}^{ p^{e-2}-(p-1)p^{m-1}-1} \prod_{\rho \in\mathbb{F}_{p}^{*} }w_{\rho}^{ p^{e-2}+p^{m-1}}. \end{array} $$ -
(ii)
When m/d ≡ 1 mod 2 and m/d ≡ 0 mod p , the code \( C_{D_{0}} \) has only one non-zero weight (p − 1)(pe− 2 + pm− 1) and its complete weight enumerator is
$$w_{0}^{p^{e-1}-1}+ (p^{d}-1) w_{0}^{ p^{e-2}-(p-1)p^{m-1}-1} \prod_{\rho \in\mathbb{F}_{p}^{*} }w_{\rho}^{ p^{e-2}+p^{m-1}}. $$ -
(iii)
When m/d ≡ 0 mod 2 and m/d≢0 mod p, its weight enumerator is
$$1+ (p-1)p^{d-1} z^{(p-1) p^{e-2}} + (p^{d-1}-1) z^{(p-1) (p^{e-2}+ p^{m+d-1})} $$and its complete weight enumerator is
$$\begin{array}{@{}rcl@{}} &&w_{0}^{p^{e-1}-1}\!+\! \frac{p-1}{2}p^{d-1} w_{0}^{ p^{e-2}-1} {\!\left( {\prod_{\rho \in\mathbb{F}_{p}^{*} }w_{\rho}^{ p^{e-2}-\eta(\rho)p^{m+d-1}} \!+\! \prod_{\rho \in\mathbb{F}_{p}^{*} } w_{\rho}^{ p^{e-2}+\eta(\rho)p^{m+d-1}}} \right) } \\ &&+ (p^{d-1}-1) w_{0}^{ p^{e-2}-(p-1)p^{m+d-1}-1} \prod_{\rho \in\mathbb{F}_{p}^{*} }w_{\rho}^{ p^{e-2}+p^{m+d-1}}. \end{array} $$ -
(iv)
When m/d ≡ 0 mod 2 and m/d ≡ 0 mod p, the code \( C_{D_{0}} \) has only one non-zero weight (p − 1)(pe− 2 + pm + d− 1) and its complete weight enumerator is
$$w_{0}^{p^{e-1}-1}+ (p^{d}-1) w_{0}^{ p^{e-2}-(p-1)p^{m+d-1}-1} \prod_{\rho \in\mathbb{F}_{p}^{*} }w_{\rho}^{ p^{e-2}+p^{m+d-1}}. $$
Theorem 2
If \( b\in \mathbb {F}_{p}^{*} \), then thecode \( C_{D_{b}} \)of (1) is a \( [p^{e-1}, d, (p-1) p^{e-2} ] \)linearcode and the following assertions hold.
-
(i)
Whenm/d ≡ 1 mod 2 andm/d≢0 mod p, its weight enumeratoris
$$1+ (p^{d-1}-1) z^{(p-1) p^{e-2}} + (p-1)p^{d-1} z^{(p-1) p^{e-2}+ p^{m-1}} $$and its complete weight enumerator is
$$w_{0}^{p^{e-1}}+ (p^{d-1}-1) \prod_{\rho \in\mathbb{F}_{p} }w_{\rho}^{ p^{e-2}}+ p^{d-1} w_{0}^{ p^{e-2}-p^{m-1}} \sum_{\lambda \in\mathbb{F}_{p}^{*} } \prod_{\rho \in\mathbb{F}_{p}^{*} }w_{\rho}^{ p^{e-2}-\eta(b^{2}-\rho\lambda)p^{m-1}} . $$ -
(ii)
When m/d ≡ 0 mod 2 and m/d≢0 mod p, its weight enumerator is
$$1+ (p^{d-1}-1) z^{(p-1) p^{e-2}} + (p-1)p^{d-1} z^{(p-1) p^{e-2}+ p^{m+d-1}} $$and its complete weight enumerator is
$$w_{0}^{p^{e-1}}+ (p^{d-1}-1) \prod_{\rho \in\mathbb{F}_{p} }w_{\rho}^{ p^{e-2}} +p^{d-1} w_{0}^{ p^{e-2}-p^{m+d-1}} \sum_{\lambda \in\mathbb{F}_{p}^{*} } \prod_{\rho \in\mathbb{F}_{p}^{*} }w_{\rho}^{ p^{e-2}-\eta(b^{2}-\rho\lambda)p^{m+d-1}} . $$ -
(iii)
When m/d ≡ 0 mod p, the code \( C_{D_{b}} \) has only one non-zero weight (p − 1)pe− 2 and its complete weight enumerator is
$$w_{0}^{p^{e-1}}+ (p^{d}-1) \prod_{\rho \in\mathbb{F}_{p} }w_{\rho}^{ p^{e-2}}. $$
Some concrete examples are provided below to illustrate our results.
Example 1
Let \((p,m,k)=(5,2,2)\). Then \( d=\gcd (2m,k)= 2 \) and \( s=m/d = 1 \). If \( b = 0 \), the code \(C_{D_{0}}\) has parameters \([124, 2, 100]\), weight enumerator \( 1 + 20 z^{100} + 4 z^{120}\) and complete weight enumerator
If \( b = 1 \), the code \(C_{D_{1}}\) has parameters \([125, 2, 100]\), weight enumerator \( 1 + 4 z^{100} + 20 z^{105} \) and complete weight enumerator
These results are checked by Magma.
Example 2
Let \((p,m,k)=(3,3,1)\). Then \( d=\gcd (2m,k)= 1 \) and \( s=m/d = 3 \). If \( b = 0 \), the code \(C_{D_{0}}\) has parameters \([242, 1, 180]\), weight enumerator \( 1 + 2 z^{180} \) and complete weight enumerator \( w_{0}^{242}+ 2 w_{0}^{62}(w_{1} w_{2})^{90} \). If \( b = 1 \), the code \(C_{D_{1}}\) has parameters \([243, 1, 162]\), weight enumerator \( 1 + 2 z^{162} \) and complete weight enumerator \( w_{0}^{243}+ 2 (w_{0} w_{1} w_{2})^{81} \). These results are checked by Magma.
3 The proofs of the main results
3.1 Auxiliary results
In order to prove the results proposed in Section 2, we will use several results which are depicted and proved in the sequel. We start with the concepts of cyclotomic numbers and exponential sums over finite fields. Recall that \(q=p^{e}\). Let \(\theta \) be a primitive element of \(\mathbb {F}_{q}\) and \(q= Nh+ 1\) for integers \(N>1\), \(h>1\). The cyclotomic classes of order \(N\) in \(\mathbb {F}_{q}\) are the cosets \(C_{i}^{(N,q)}=\theta ^{i}\langle \theta ^{N}\rangle \) for \(i = 0,1,\cdots ,N-1\), where \(\langle \theta ^{N}\rangle \) denotes the subgroup of \(\mathbb {F}_{q}^{*}\) generated by \( \theta ^{N}\). For fixed \( i \) and \( j \), we define the cyclotomic number\( (i,j)^{(N,\,q)} \) to be the number of solutions of the equation
where \( 1=\theta ^{0} \) is the multiplicative unit of \( \mathbb {F}_{q} \). That is, \( (i,j)^{(N,\,q)} \) is the number of ordered pairs \( (u,v) \) such that
Now we review some results on cyclotomic numbers.
Lemma 1 ([21] )
When \(N = 2\) , the cyclotomic numbers are given by
-
(1)
h even: \((0,0)^{(2,\,r)} =\frac {h-2}{2} \) , \( (0,1)^{(2,\,r)} =(1,0)^{(2,\,r)} =(1,1)^{(2,\,r)} = \frac {h}{2}\) .
-
(2)
h odd: \((0,0)^{(2,\,r)} =(1,0)^{(2,\,r)} =(1,1)^{(2,\,r)} =\frac {h-1}{2} \) , \( (0,1)^{(2,\,r)} = \frac {h + 1}{2}\) .
Next, let us introduce group characters and exponential sums. For each \(b\in \mathbb {F}_{q}\), an additive character \(\chi _{b}\) of \(\mathbb {F}_{q} \) is defined by \( \chi _{b}(x)=\zeta _{p}^{\text {Tr}(bx)}\) for all \(x\in \mathbb {F}_{q} \), where \(\zeta _{p}=\exp \left (\frac {2\pi \sqrt {-1} }{p}\right )\) and \(\text {Tr}\) is the simplification of the trace function \( \text {Tr}^{e}_{1} \) from \( \mathbb {F}_{q} \) to \( \mathbb {F}_{p} \). For \(b = 1\), \(\chi _{1}\) is called the canonical additive character of \(\mathbb {F}_{q}\).
Let \(\eta _{e}\) denote the quadratic character of \(\mathbb {F}_{q} \). The quadratic Gauss sum \(G(\eta _{e},\chi _{1})\) is defined by
We denote \(G_{e}=G(\eta _{e}, \chi _{1} )\) and \(G=G(\eta , \chi _{1}^{\prime })\), where \( \eta \) and \(\chi _{1}^{\prime }\) are the quadratic character and canonical additive character of \(\mathbb {F}_{p}\), respectively. Moreover, it is well known that \(G_{e}=(-1)^{e-1}\sqrt {p^{*}}^{e}\) and \(G =\sqrt {p^{*}}\), where \(p^{*}= \eta (-1)p \). See [10, 19] for more information.
The following lemmas will be of special use in the sequel.
Lemma 2 (Theorem 5.33, [19])
Let \( q =p^{e}\)be oddand \(f(x)=a_{2}x^{2}+a_{1}x+a_{0}\in \mathbb {F}_{q}[x]\)with \(a_{2}\neq 0\).Then
where \( \eta _{e} \) is the quadratic character of \( \mathbb {F}_{q}\).
For \( \alpha ,\beta \in \mathbb {F}_{q} \) and any integer \( k \), the exponential sum \( S(\alpha ,\beta ) \) is defined by
We recall some results of \( S(\alpha ,\beta ) \) for \( \alpha \neq 0 \) and \( q \) odd.
Lemma 3 (Theorem 2, [4])
Let \( d=\gcd (k,e) \)and \( e/d \)beeven with \( e = 2m \).Then
where \( s=m/d \).
Lemma 4 (Theorem 4.7, [5])
Let \( \beta \neq 0 \) and \( e/d \) be even with \( e = 2m \) . Set \( f_{\alpha }(X)=\alpha ^{p^{k}} X^{p^{2k}} + \alpha X\) . Then \( S(\alpha ,\beta )= 0 \) unless the equation \( f_{\alpha }(X)=-\beta ^{p^{k}} \) is solvable. There are two possibilities.
-
(i)
If \( \alpha ^{(q-1)/(p^{d}+ 1)} \neq (-1)^{s} \) , then for any choice of \( \beta \in \mathbb {F}_{q} \) , the equation has a unique solution x 0 and
$$S(\alpha,\beta)=(-1)^{s}p^{m} \chi_{1}(-\alpha x_{0}^{p^{k}+ 1}). $$ -
(ii)
If \( \alpha ^{(q-1)/(p^{d}+ 1)} = (-1)^{s} \) and the equation is solvable with some solution x0 say, then
$$S(\alpha,\beta)=(-1)^{s + 1}p^{m+d} \chi_{1}(-\alpha x_{0}^{p^{k}+ 1}). $$
Lemma 5 (Theorem 4.1, [4])
For \( e = 2m \)theequation \( \alpha ^{p^{k}} X^{p^{2k} } +\alpha X = 0 \)issolvable for \( X \in \mathbb {F}_{q}^{*} \)ifand only if \( e/d \)iseven and
In such cases there are \( p^{2d}- 1 \) non-zero solutions.
3.2 The proofs of the theorems in Section 2
In this subsection, we will prove of our main results presented in Section 2. Recall that \( q=p^{e} \), \( d=\gcd (k,e) \), \( e/d \) is even with \( e = 2m \). The code \( C_{D_{b}} \) with \( b\in \mathbb {F}_{p} \), is defined by
where \( D_{b}=\{x\in \mathbb {F}_{q}^{*}:\text {Tr}(x)=b\} . \) It is trivial that \( C_{D_{b}} \) has length \( n_{0}=p^{e-1}-1 \) if \( b = 0 \) and \( n_{b}=p^{e-1} \) otherwise.
Observe that \(a = 0\) gives the zero codeword and the contribution to the complete weight enumerator is \({w_{0}^{n}}\). This value occurs only once. Hence, we may assume that \(a\in \mathbb {F}_{p^{d}}^{*}\) in the rest of this subsection.
For a codeword \( \mathsf {c}_{a} =(\text {Tr}(ax^{p^{k}+ 1}))_{x\in D_{b}} \) of \( C_{D_{b}} \) and \( \rho \in \mathbb {F}_{p} \), let \( n_{a}(b,\rho ) \) denote the number of components of \( \mathsf {c}_{a} \) that are equal to \( \rho \), i.e.,
For convenience, we compute
Then we have
Also it is easy to obtain the Hamming weight of \( \mathsf {c}_{a} \), that is
So we only consider \( \rho \in \mathbb {F}_{p}^{*} \) and \(a\in \mathbb {F}_{p^{d}}^{*}\) in the sequel.
Now it comes to determine the value of \( N_{a}(b,\rho ) \) for \( \rho \in \mathbb {F}_{p}^{*} \). By definition, we have
where
The following lemmas state the evaluations of \( A_{a}(\rho ) \) and \( B_{a}(b,\rho ) \).
Lemma 6
Let \( a\in \mathbb {F}_{p^{d}}^{*} \) and \( \rho \in \mathbb {F}_{p}^{*} \) . Denote \( s=m/d \) . Then
Proof
By (4),
A straightforward calculation gives that \( (az)^{(q-1)/(p^{d}+ 1)}= 1 \) for \( z\in \mathbb {F}_{p}^{*} \) and \( a\in \mathbb {F}_{p^{d}}^{*} \). Then the desired conclusion follows from Lemma 3.
For the later use, we set \( f_{a}(X)= a X^{p^{2k}} + a X \in \mathbb {F}_{q}[X] \) for \( a\in \mathbb {F}_{p^{d}}^{*} \).
Lemma 7
Let \( b \in \mathbb {F}_{p} \) and \( \rho \in \mathbb {F}_{p}^{*} \) . Suppose that \( e/d \) is even with \( e = 2m \) and \( s=m/d \) . Then for each \( a\in \mathbb {F}_{p^{d}}^{*} \) , the equation \( f_{a}(X)=-1 \) has a solution \( \gamma =-1/(2a) \) and so \( B_{a}(b,\rho ) \neq 0 \) . Denote \( \lambda := \text {Tr}(a^{-1}) \) . The evaluation of \( B_{a}(b,\rho ) \neq 0 \) partitions into the following two cases.
-
(i)
Ifb = 0,then
$$B_{a}(0,\rho)=\left\{\begin{array}{lll} (p-1) p^{m} && \textup{ if } s \textup{ is odd and } \lambda= 0,\\ - \left( p \eta(-\rho \lambda)+ 1\right) p^{m} && \textup{ if } s \textup{ is odd and } \lambda \neq 0,\\ (p-1) p^{m+d} && \textup{ if } s \textup{ is even and } \lambda= 0,\\ -\left( p \eta(-\rho \lambda)+ 1\right) p^{m+d} && \textup{ if } s \textup{ is even and } \lambda \neq 0. \end{array} \right. $$ -
(ii)
If b≠ 0, then
$$B_{a}(b,\rho)=\left\{\begin{array}{lll} - p^{m} && \textup{ if } s \textup{ is odd and } \lambda= 0,\\ -\left( p \eta(b^{2}-\rho \lambda)+ 1\right) p^{m} && \textup{ if } s \textup{ is odd and } \lambda \neq 0,\\ -p^{m+d} && \textup{ if } s \textup{ is even and } \lambda= 0,\\ -\left( p \eta(b^{2}-\rho \lambda)+ 1\right) p^{m+d} && \textup{ if } s \textup{ is even and } \lambda \neq 0 . \end{array} \right. $$
Proof
Let \( e/d \) be even. By (5),
For \( y,z\in \mathbb {F}_{p}^{*} \), it follows from Lemma 4 that \( S(az,y)= 0 \) unless the equation \( f_{az}(X)=-y^{p^{k}} \) is solvable. But for each \( a\in \mathbb {F}_{p^{d}}^{*} \), we can verify that \( \gamma =-1/(2a) \) is a solution of \( f_{a}(X)=a X^{p^{2k}} + a X =-1 \) and so \( z^{-1} \gamma y \) is a solution of \( f_{az}(X)=(az) X^{p^{2k}} + (az) X=-y^{p^{k}} \). This implies that \( B_{a}(b,\rho ) \neq 0 \).
For the evaluation of \( B_{a}(b,\rho ) \neq 0 \), we first consider the case that \( s \) is odd. In this case \( f_{az}(X) =-y^{p^{k}}\) has a unique solution \( z^{-1}\gamma y \) because \( f_{a}(X)=a X^{p^{2k}} + a X \) is a permutation polynomial over \( \mathbb {F}_{q} \) by Lemma 5 and \( \gamma \) is the unique solution of \( f_{a}(X) =-1\). Thus we have from Lemma 4 that
Plugging this into \( B_{a}(b,\rho ) \) of (6) gives that
where \( \lambda = \text {Tr}(a^{-1}) \).
If \(\lambda = 0 \), then \( B_{a}(b,\rho ) = -p^{m} \sum _{y\in \mathbb {F}_{p}^{*}}\sum _{z\in \mathbb {F}_{p}^{*}}\zeta _{p}^{ -by-\rho z} \) and the corresponding result then follows.
Now suppose that \(\lambda \neq 0 \) and we consider the following cases separately.
-
(i)
If b = 0, we have from Lemma 4 that
$$\begin{array}{@{}rcl@{}} B_{a}(0,\rho) & =& -p^{m} \sum_{z\in\mathbb{F}_{p}^{*}}\zeta_{p}^{ -\rho z} \sum_{y\in\mathbb{F}_{p}^{*}}\zeta_{p}^{-\frac{\lambda y^{2}}{4z} }\\ &=& -p^{m} \sum_{z\in\mathbb{F}_{p}^{*}}\zeta_{p}^{ -\rho z} {\left( {\sum_{y\in\mathbb{F}_{p} }\zeta_{p}^{-\frac{\lambda y^{2}}{4z} } - 1} \right) }\\ &=& -p^{m} \sum_{z\in\mathbb{F}_{p}^{*}}\zeta_{p}^{ -\rho z} \eta \left( -\frac{\lambda }{z}\right) G -p^{m}\\ &=& -p^{m} \eta(\rho \lambda ) G^{2} -p^{m} = - \left( p \eta(-\rho \lambda)+ 1\right) p^{m}. \end{array} $$ -
(ii)
If b≠ 0, then it follows from Lemma 4 again that
$$\begin{array}{@{}rcl@{}} B_{a}(b,\rho)&=& -p^{m} \sum_{z\in\mathbb{F}_{p}^{*}}\zeta_{p}^{ -\rho z} \sum_{y\in\mathbb{F}_{p}^{*}}\zeta_{p}^{-\frac{\lambda y^{2}}{4z}-by } \\ &=& -p^{m} \sum_{z\in\mathbb{F}_{p}^{*}}\zeta_{p}^{ -\rho z} \zeta_{p}^{\frac{ b^{2}}{\lambda} z } \eta \left( -\frac{\lambda }{z}\right) G - p^{m}\\ &=& -p^{m} \sum_{z\in\mathbb{F}_{p}^{*}}\zeta_{p}^{(\frac{b^{2}}{\lambda} -\rho) z} \eta\left (-\frac{\lambda }{z}\right) G -p^{m}\\ &=&\left\{\begin{array}{lll} - p^{m} && \textup{ if } b^{2}= \rho \lambda,\\ -(p \eta(b^{2}- \rho \lambda)+ 1 )p^{m} && \textup{ if } b^{2} \neq \rho \lambda. \end{array} \right. \end{array} $$
Therefore we conclude that \( B_{a}(b,\rho ) = -(p \eta (b^{2}-\rho \lambda )+ 1 )p^{m} \) for \( b \neq 0 \).
We now study the case that \(s \) is even. Since \( z^{-1}\gamma y \) is a solution to \( f_{az}(X) =-y^{p^{k}} \), we have from Lemma 4 that
By a similar argument as above, we obtain the desired conclusions and complete the whole proof of this lemma.
3.2.1 The first case that b = 0
In this subsection, we assume that \( b = 0 \). Recall that \( s=m/d \) and \( \lambda = \text {Tr}(a^{-1}) \) for \( a\in \mathbb {F}_{p^{d}}^{*} \). By (2), (3), Lemmas 6 and 7, we have the following two lemmas.
Lemma 8
Let \( a\in \mathbb {F}_{p^{d}}^{*} \) , then
Lemma 9
Let \( a\in \mathbb {F}_{p^{d}}^{*} \) and \( \rho \in \mathbb {F}_{p}^{*} \) , we have
Now we are in a position to prove Theorem 1.
Proof
Denote
The code \( C_{D_{0}} \) has length \( n_{0}= p^{e-1}-1 \) and dimension \( d \), since \( wt(\mathsf {c}_{a}) >0 \) for each \( a \in \mathbb {F}_{p^{d}}^{*} \). Observe that \( \lambda = \text {Tr}(a^{-1}) = \text {Tr}^{e}_{d} \left (\text {Tr}^{d}_{1}(a^{-1})\right )= 2s \text {Tr}^{d}_{1}(a^{-1}) \), where \( \text {Tr}^{e}_{d} \) is the trace function from \( \mathbb {F}_{p^{e}} \) to \( \mathbb {F}_{p^{d}} \). Therefore the calculation can be divided into four cases according to the values of \( p \) and \( s \). We only give the proof of two cases and the other two can be similarly treated.
-
(i)
When s is odd and \( p\nmid s \) , we have from the above two lemmas that wt(ca) takes two non-zero values w1 and w2 with frequencies \( A_{w_{1}} =p^{d-1}-1 \) and \( A_{w_{2}} =(p-1)p^{d-1} \) , respectively. Hence we get the weight enumerator of \( C_{D_{0}} \) . Note that for λ≠ 0 , η(−ρλ) = η(ρ) if \( -\lambda \in C_{0}^{(2,\,p)} \) and η(−ρλ) = −η(ρ) otherwise, so it is not hard to determine its complete weight enumerator from Lemma 9.
-
(ii)
When s is odd and p∣s , we have λ = 0 for all \( a\in \mathbb {F}_{p^{d}}^{*} \) and so all codewords ca , except the zero codeword, have the same weight w1 and the frequency is \( A_{w_{1}} =p^{d}-1 \) . Hence \( C_{D_{0}} \) has only one non-zero weight and its complete weight enumerator then follows from Lemma 9.
3.2.2 The second case that \(b \neq 0 \)
In this subsection, we assume that \( b\neq 0 \). By (3), Lemmas 6 and 7 again, it is easy to get the value of \( N_{a}(b,\rho ) \) for \( \rho \neq 0 \).
Lemma 10
For \( a\in \mathbb {F}_{p^{d}}^{*} \) , \( b \) and \( \rho \in \mathbb {F}_{p}^{*} \) , we have
In order to evaluate \( N_{a}(b,0) \), we need one more lemma given below.
Lemma 11
Let \( b\) and \(\lambda \in \mathbb {F}_{p}^{*} \) . Then
Proof
Write \( p = 2h + 1 \) with a positive integer \( h \). For fixed \( \lambda \in \mathbb {F}_{p}^{*} \),
Let \( d=b^{2}-\rho \lambda \). Then \( {\rho \lambda }/{d} + 1 = {b^{2}}/{d} \). According to Lemma 1, the number of \( \rho \in \mathbb {F}_{p}^{*}\) satisfying \( d \in C_{0}^{(2,\,p)} \) is
Similarly, the number of \( \rho \in \mathbb {F}_{p}^{*}\) satisfying \( d \in C_{1}^{(2,\,p)} \) is
It then follows that
giving the desired conclusion.
The following lemma follows from (2), Lemmas 10 and 11.
Lemma 12
For \( a\in \mathbb {F}_{p^{d}}^{*} \) and \( b \in \mathbb {F}_{p}^{*} \) , we have
Now we begin to prove Theorem 2.
Proof
Suppose that \( b \neq 0 \). By Lemmas 10 and 12, the proof is similar to that of Theorem 1 and so is omitted here.
4 Concluding remarks
In this paper, we employed exponential sums to present the complete weight enumerators and weight enumerators of the linear codes \( C_{D_{b}} \) in the two cases \( b = 0 \) and \( b \neq 0 \). As introduced in [28], any linear code over \( \mathbb {F}_{p} \) can be employed to construct secret sharing schemes with interesting access structures provided that
where \(w_{min}\) and \(w_{max}\) denote the minimum and maximum non-zero weights in \(C_{D}\), respectively. Assume that \( p \nmid s \). It can be verified that the linear codes in Theorems 1 and 2 satisfy the property \( {w_{min}}/{w_{max}}>{(p-1)}/{p} \) if \( m>1 \) and \( s \equiv 1 \mod 2\), or if \( m>d + 1 \) and \( s \equiv 0 \mod 2\). We remark that the dimensions of the codes in this paper are small compared with their lengths and this makes them suitable for applications in secret sharing schemes with interesting access structures.
References
Ahn, J., Ka, D., Li, C.: Complete weight enumerators of a class of linear codes. Des. Codes Crypt. 83, 83–99 (2017)
Bae, S., Li, C., Yue, Q.: On the complete weight enumerators of some reducible cyclic codes. Discret. Math. 338(12), 2275–2287 (2015)
Blake, I.F., Kith, K.: On the complete weight enumerator of Reed-Solomon codes. SIAM J. Discret. Math. 4(2), 164–171 (1991)
Coulter, R.S.: Explicit evaluations of some Weil sums. Acta Arithmetica 83(3), 241–251 (1998)
Coulter, R.S.: The number of rational points of a class of artincschreier curves. Finite Fields Appl. 8, 397–413 (2002)
Ding, C.: Linear codes from some 2-designs. IEEE Trans. Inf. Theory 61(6), 3265–3275 (2015)
Ding, C., Helleseth, T., Kløve, T., Wang, X.: A generic construction of Cartesian authentication codes. IEEE Trans. Inf. Theory 53(6), 2229–2235 (2007)
Ding, C., Wang, X.: A coding theory construction of new systematic authentication codes. Theor. Comput. Sci. 330, 81–99 (2005)
Ding, K., Ding, C.: Binary linear codes with three weights. IEEE Commun. Lett. 18(11), 1879–1882 (2014)
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)
Dinh, H.Q., Li, C., Yue, Q.: Recent progress on weight distributions of cyclic codes over finite fields. J. Algebra Comb. Discret. Struct. Appl. 2(1), 39–63 (2015)
Feng, K., Luo, J.: Weight distribution of some reducible cyclic codes. Finite Fields Appl. 14(2), 390–409 (2008)
Helleseth, T., Kholosha, A.: Monomial and quadratic bent functions over the finite fields of odd characteristic. IEEE Trans. Inf. Theory 52(5), 2018–2032 (2006)
Heng, Z., Yue, Q.: Complete weight distributions of two classes of cyclic codes. Cryptogr. Commun. 9(3), 323–343 (2017)
Kith, K.: Complete weight enumeration of Reed-Solomon codes. Master’s thesis, Department of Electrical and Computing Engineering, University of Waterloo (1989)
Kuzmin, A., Nechaev, A.: Complete weight enumerators of generalized Kerdock code and linear recursive codes over Galois ring. In: Workshop on Coding and Cryptography, pp. 332–336 (1999)
Li, C., Bae, S., Ahn, J., Yang, S., Yao, Z.: Complete weight enumerators of some linear codes and their applications. Des. Codes Crypt. 81, 153–168 (2016)
Li, C., Yue, Q., Fu, F.W.: Complete weight enumerators of some cyclic codes. Des. Codes Crypt. 80, 295–315 (2016)
Lidl, R., Niederreiter, H.: Finite Fields. Encyclopedia of Mathematics and its Applications, p 20. Addison-Wesley, Reading (1983)
MacWilliams, F.J., Sloane N.J.A.: The Theory of Error-Correcting Codes, vol. 16. North-Holland Publishing, Amsterdam (1977)
Storer, T.: Cyclotomy and Difference Sets. Markham Publishing Company, Markham (1967)
Vega, G.: The weight distribution of an extended class of reducible cyclic codes. IEEE Trans. Inf. Theory 58(7), 4862–4869 (2012)
Wang, Q., Li, F., Ding, K., Lin, D.: Complete weight enumerators of two classes of linear codes. Discret. Math. 340, 467–480 (2017)
Yang, S., Kong, X., Tang, C.: A construction of linear codes and their complete weight enumerators. Finite Fields Appl. 48, 196–226 (2017)
Yang, S., Yao, Z., Zhao, C.: The weight enumerator of the duals of a class of cyclic codes with three zeros. Applic. Algebra Eng. Commun. Comput. 26(4), 347–367 (2015)
Yang, S., Yao, Z., Zhao, C.: The weight distributions of two classes of \( p \)-ary cyclic codes with few weights. Finite Fields Appl. 44, 76–91 (2017)
Yang, S., Yao, Z.: Complete weight enumerators of a class of linear codes. Discret. Math. 340, 729–739 (2017)
Yuan, J., Ding, C.: Secret sharing schemes from three classes of linear codes. IEEE Trans. Inf. Theory 52(1), 206–212 (2006)
Zheng, D., Wang, X., Yu, L., Liu, H.: The weight enumerators of several classes of \(p\)-ary cyclic codes. Discret. Math. 338(7), 1264–1276 (2015)
Zhou, Z., Ding, C., Luo, J., Zhang, A.: A family of five-weight cyclic codes and their weight enumerators. IEEE Trans. Inf. Theory 59(10), 6674–6682 (2013)
Acknowledgements
The work is partially supported by the National Natural Science Foundation of China (11701317, 61772015, 61472457, 11571380), China Postdoctoral Science Foundation Funded Project (2017M611801) and Jiangsu Planned Projects for Postdoctoral Research Funds (1701104C). This work is also partially supported by Guangzhou Science and Technology Program (201607010144) and the Natural Science Foundation of Shandong Province of China (ZR2016AM04).
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Yang, S., Yue, Q., Wu, Y. et al. Complete weight enumerators of a class of two-weight linear codes. Cryptogr. Commun. 11, 609–620 (2019). https://doi.org/10.1007/s12095-018-0315-4
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s12095-018-0315-4