# American Institute of Mathematical Sciences

February  2019, 13(1): 195-211. doi: 10.3934/amc.2019013

## Some two-weight and three-weight linear codes

 1 Shanghai Key Laboratory of Trustworthy Computing, East China Normal University, Shanghai 200062, China 2 Department of Mathematics, KAIST, Daejeon, 305-701, Korea 3 School of Mathematical Sciences, Qufu Normal University, Shandong 273165, China

* Corresponding author: Chengju Li

Received  August 2018 Published  December 2018

Fund Project: Chengju Li was supported by the National Natural Science Foundation of China under Grant 11701179, the Shanghai Sailing Program under Grant 17YF1404300, and the Foundation of Science and Technology on Information Assurance Laboratory under Grant KJ-17-007.
Shudi Yang was supported by the National Natural Science Foundation of China under Grants 11701317 and 11431015, China Postdoctoral Science Foundation Funded Project under Grant 2017M611801, and Jiangsu Planned Projects for Postdoctoral Research Funds under Grant 1701104C.

Let
 $\Bbb F_q$
be the finite field with
 $q = p^m$
elements, where
 $p$
is an odd prime and
 $m$
is a positive integer. For a positive integer
 $t$
, let
 $D \subset \Bbb F_q^t$
and let
 $\mbox{Tr}_m$
be the trace function from
 $\Bbb F_q$
onto
 $\Bbb F_p$
. We define a
 $p$
-ary linear code
 $\mathcal C_D$
by
 $\mathcal C_D = \{\textbf{c}(a_1,a_2, ..., a_t): a_1, a_2, ..., a_t ∈ \Bbb F_{p^m}\},$
where
 $\textbf{c}(a_1,a_2, ..., a_t) = \big(\mbox{Tr}_m(a_1x_1+a_2x_2+···+a_tx_t)\big)_{(x_1,x_2, ..., x_t)∈ D}.$
In this paper, we will present the weight enumerators of the linear codes
 $\mathcal C_D$
in the following two cases:
1.
 $D = \{(x_1,x_2, ..., x_t) ∈ \Bbb F_q^t \setminus \{(0,0, ..., 0)\}: \mbox{Tr}_m(x_1^2+x_2^2+···+x_t^2) = 0\}$
;
2.
 $D = \{(x_1,x_2, ..., x_t) ∈ \Bbb F_q^t: \mbox{Tr}_m(x_1^2+x_2^2+···+x_t^2) = 1\}$
.
It is shown that
 $\mathcal C_D$
is a two-weight code if
 $tm$
is even and three-weight code if
 $tm$
is odd in both cases. The weight enumerators of
 $\mathcal C_D$
in the first case generalize the results in [17] and [18]. The complete weight enumerators of
 $\mathcal C_D$
are also investigated.
Citation: Chengju Li, Sunghan Bae, Shudi Yang. Some two-weight and three-weight linear codes. Advances in Mathematics of Communications, 2019, 13 (1) : 195-211. doi: 10.3934/amc.2019013
##### References:

show all references

##### References:
Weight enumerators of Theorem 3.2 for odd $tm$
 Weight Frequency 0 1 $(p-1)p^{tm-2}$ $p^{tm-1}-1$ $(p-1)(p^{tm-2}-p^{\frac {tm-3} 2})$ $\frac {p-1} 2(p^{tm-1}+p^{\frac {tm-1} 2})$ $(p-1)(p^{tm-2}+p^{\frac {tm-3} 2})$ $\frac {p-1} 2(p^{tm-1}-p^{\frac {tm-1} 2})$
 Weight Frequency 0 1 $(p-1)p^{tm-2}$ $p^{tm-1}-1$ $(p-1)(p^{tm-2}-p^{\frac {tm-3} 2})$ $\frac {p-1} 2(p^{tm-1}+p^{\frac {tm-1} 2})$ $(p-1)(p^{tm-2}+p^{\frac {tm-3} 2})$ $\frac {p-1} 2(p^{tm-1}-p^{\frac {tm-1} 2})$
Weight enumerators of Theorem 3.2 for even $tm$
 Weight Frequency 0 1 $(p-1)p^{tm-2}$ $p^{tm-1}+(-1)^{(\frac {m(p-1)} 4+1)t}(p-1)p^{\frac {tm-2} 2}-1$ $(p-1)\big(p^{tm-2}+(-1)^{(\frac {m(p-1)} 4+1)t}p^{\frac {tm-2} 2}\big)$ $(p-1)\big(p^{tm-1}-(-1)^{(\frac {m(p-1)} 4+1)t}p^{\frac {tm-2} 2}\big)$
 Weight Frequency 0 1 $(p-1)p^{tm-2}$ $p^{tm-1}+(-1)^{(\frac {m(p-1)} 4+1)t}(p-1)p^{\frac {tm-2} 2}-1$ $(p-1)\big(p^{tm-2}+(-1)^{(\frac {m(p-1)} 4+1)t}p^{\frac {tm-2} 2}\big)$ $(p-1)\big(p^{tm-1}-(-1)^{(\frac {m(p-1)} 4+1)t}p^{\frac {tm-2} 2}\big)$
Weight enumerators of Theorem 4.1 for odd $tm$
 Weight Frequency 0 1 $(p-1)p^{tm-2}$ $p^{tm-1}-1$ $(p-1)p^{tm-2}+(-1)^{\frac {(p-1)(tm+3)} 4}p^{\frac {tm-1} 2}+p^{\frac {tm-3} 2}$ $\frac {p-1} 2(p^{tm-1}+p^{\frac {tm-1} 2})$ $(p-1)p^{tm-2}+(-1)^{\frac {(p-1)(tm+3)} 4}p^{\frac {tm-1} 2}-p^{\frac {tm-3} 2}$ $\frac {p-1} 2(p^{tm-1}-p^{\frac {tm-1} 2})$
 Weight Frequency 0 1 $(p-1)p^{tm-2}$ $p^{tm-1}-1$ $(p-1)p^{tm-2}+(-1)^{\frac {(p-1)(tm+3)} 4}p^{\frac {tm-1} 2}+p^{\frac {tm-3} 2}$ $\frac {p-1} 2(p^{tm-1}+p^{\frac {tm-1} 2})$ $(p-1)p^{tm-2}+(-1)^{\frac {(p-1)(tm+3)} 4}p^{\frac {tm-1} 2}-p^{\frac {tm-3} 2}$ $\frac {p-1} 2(p^{tm-1}-p^{\frac {tm-1} 2})$
Weight enumerators of Theorem 4.1 for even $tm$
 $2 \nmid \big(\frac {m(p-1)} 4+1\big)t$ Weight Frequency 0 1 $(p-1)p^{tm-2}$ $\frac {p+1} 2p^{tm-1}-\frac {p-1} 2 p^{\frac {tm-2} 2}-1$ $(p-1)p^{tm-2}+2p^{\frac {tm-2} 2}$ $\frac {p-1} 2\big(p^{tm-1}+p^{\frac {tm-2} 2}\big)$
 $2 \nmid \big(\frac {m(p-1)} 4+1\big)t$ Weight Frequency 0 1 $(p-1)p^{tm-2}$ $\frac {p+1} 2p^{tm-1}-\frac {p-1} 2 p^{\frac {tm-2} 2}-1$ $(p-1)p^{tm-2}+2p^{\frac {tm-2} 2}$ $\frac {p-1} 2\big(p^{tm-1}+p^{\frac {tm-2} 2}\big)$
Weight enumerators of Theorem 4.1 for even $tm$
 $2 \mid \big(\frac {m(p-1)} 4+1\big)t$ Weight Frequency 0 1 $(p-1)p^{tm-2}$ $\frac {p+1} 2p^{tm-1}+\frac {p-1} 2 p^{\frac {tm-2} 2}-1$ $(p-1)p^{tm-2}-2p^{\frac {tm-2} 2}$ $\frac {p-1} 2\big(p^{tm-1}-p^{\frac {tm-2} 2}\big)$
 $2 \mid \big(\frac {m(p-1)} 4+1\big)t$ Weight Frequency 0 1 $(p-1)p^{tm-2}$ $\frac {p+1} 2p^{tm-1}+\frac {p-1} 2 p^{\frac {tm-2} 2}-1$ $(p-1)p^{tm-2}-2p^{\frac {tm-2} 2}$ $\frac {p-1} 2\big(p^{tm-1}-p^{\frac {tm-2} 2}\big)$
Complete weight enumerators of Theorem 5.1 for odd $tm$
 $N_0=n-\sum_{\rho \in \Bbb F_p^*}N_\rho$ $N_\rho (\rho \in \Bbb F_p^*)$ Frequency 0 1 $p^{tm-2}$ $p^{tm-1}-1$ $p^{tm-2}-p^{\frac {tm-3} 2}$ $\frac {p-1} 2(p^{tm-1}+p^{\frac {tm-1} 2})$ $p^{tm-2}+p^{\frac {tm-3} 2}$ $\frac {p-1} 2(p^{tm-1}-p^{\frac {tm-1} 2})$
 $N_0=n-\sum_{\rho \in \Bbb F_p^*}N_\rho$ $N_\rho (\rho \in \Bbb F_p^*)$ Frequency 0 1 $p^{tm-2}$ $p^{tm-1}-1$ $p^{tm-2}-p^{\frac {tm-3} 2}$ $\frac {p-1} 2(p^{tm-1}+p^{\frac {tm-1} 2})$ $p^{tm-2}+p^{\frac {tm-3} 2}$ $\frac {p-1} 2(p^{tm-1}-p^{\frac {tm-1} 2})$
Complete weight enumerators of Theorem 5.1 for even $tm$
 $N_0=n-\sum_{\rho \in \Bbb F_p^*}N_\rho$ $N_\rho (\rho \in \Bbb F_p^*)$ Frequency 0 1 $p^{tm-2}$ $p^{tm-1}+(-1)^{(\frac {m(p-1)} 4+1)t}(p-1)p^{\frac {tm-2} 2}-1$ $p^{tm-2}+(-1)^{(\frac {m(p-1)} 4+1)t}p^{\frac {tm-2} 2}$ $(p-1)\big(p^{tm-1}-(-1)^{(\frac {m(p-1)} 4+1)t}p^{\frac {tm-2} 2}\big)$
 $N_0=n-\sum_{\rho \in \Bbb F_p^*}N_\rho$ $N_\rho (\rho \in \Bbb F_p^*)$ Frequency 0 1 $p^{tm-2}$ $p^{tm-1}+(-1)^{(\frac {m(p-1)} 4+1)t}(p-1)p^{\frac {tm-2} 2}-1$ $p^{tm-2}+(-1)^{(\frac {m(p-1)} 4+1)t}p^{\frac {tm-2} 2}$ $(p-1)\big(p^{tm-1}-(-1)^{(\frac {m(p-1)} 4+1)t}p^{\frac {tm-2} 2}\big)$
 [1] Dandan Wang, Xiwang Cao, Gaojun Luo. A class of linear codes and their complete weight enumerators. Advances in Mathematics of Communications, 2021, 15 (1) : 73-97. doi: 10.3934/amc.2020044 [2] Fengwei Li, Qin Yue, Xiaoming Sun. The values of two classes of Gaussian periods in index 2 case and weight distributions of linear codes. Advances in Mathematics of Communications, 2021, 15 (1) : 131-153. doi: 10.3934/amc.2020049 [3] Xiangrui Meng, Jian Gao. Complete weight enumerator of torsion codes. Advances in Mathematics of Communications, 2020  doi: 10.3934/amc.2020124 [4] Shudi Yang, Xiangli Kong, Xueying Shi. Complete weight enumerators of a class of linear codes over finite fields. Advances in Mathematics of Communications, 2021, 15 (1) : 99-112. doi: 10.3934/amc.2020045 [5] Hongming Ru, Chunming Tang, Yanfeng Qi, Yuxiao Deng. A construction of $p$-ary linear codes with two or three weights. Advances in Mathematics of Communications, 2021, 15 (1) : 9-22. doi: 10.3934/amc.2020039 [6] Vito Napolitano, Ferdinando Zullo. Codes with few weights arising from linear sets. Advances in Mathematics of Communications, 2020  doi: 10.3934/amc.2020129 [7] Shanding Xu, Longjiang Qu, Xiwang Cao. Three classes of partitioned difference families and their optimal constant composition codes. Advances in Mathematics of Communications, 2020  doi: 10.3934/amc.2020120 [8] Jong Yoon Hyun, Boran Kim, Minwon Na. Construction of minimal linear codes from multi-variable functions. Advances in Mathematics of Communications, 2021, 15 (2) : 227-240. doi: 10.3934/amc.2020055 [9] Agnaldo José Ferrari, Tatiana Miguel Rodrigues de Souza. Rotated $A_n$-lattice codes of full diversity. Advances in Mathematics of Communications, 2020  doi: 10.3934/amc.2020118 [10] San Ling, Buket Özkaya. New bounds on the minimum distance of cyclic codes. Advances in Mathematics of Communications, 2021, 15 (1) : 1-8. doi: 10.3934/amc.2020038 [11] Karan Khathuria, Joachim Rosenthal, Violetta Weger. Encryption scheme based on expanded Reed-Solomon codes. Advances in Mathematics of Communications, 2021, 15 (2) : 207-218. doi: 10.3934/amc.2020053 [12] Nicola Pace, Angelo Sonnino. On the existence of PD-sets: Algorithms arising from automorphism groups of codes. Advances in Mathematics of Communications, 2021, 15 (2) : 267-277. doi: 10.3934/amc.2020065 [13] Sabira El Khalfaoui, Gábor P. Nagy. On the dimension of the subfield subcodes of 1-point Hermitian codes. Advances in Mathematics of Communications, 2021, 15 (2) : 219-226. doi: 10.3934/amc.2020054 [14] Tingting Wu, Li Liu, Lanqiang Li, Shixin Zhu. Repeated-root constacyclic codes of length $6lp^s$. Advances in Mathematics of Communications, 2021, 15 (1) : 167-189. doi: 10.3934/amc.2020051 [15] Saadoun Mahmoudi, Karim Samei. Codes over $\frak m$-adic completion rings. Advances in Mathematics of Communications, 2020  doi: 10.3934/amc.2020122 [16] Hongwei Liu, Jingge Liu. On $\sigma$-self-orthogonal constacyclic codes over $\mathbb F_{p^m}+u\mathbb F_{p^m}$. Advances in Mathematics of Communications, 2020  doi: 10.3934/amc.2020127 [17] Ivan Bailera, Joaquim Borges, Josep Rifà. On Hadamard full propelinear codes with associated group $C_{2t}\times C_2$. Advances in Mathematics of Communications, 2021, 15 (1) : 35-54. doi: 10.3934/amc.2020041 [18] Yuan Cao, Yonglin Cao, Hai Q. Dinh, Ramakrishna Bandi, Fang-Wei Fu. An explicit representation and enumeration for negacyclic codes of length $2^kn$ over $\mathbb{Z}_4+u\mathbb{Z}_4$. Advances in Mathematics of Communications, 2021, 15 (2) : 291-309. doi: 10.3934/amc.2020067 [19] Hai Q. Dinh, Bac T. Nguyen, Paravee Maneejuk. Constacyclic codes of length $8p^s$ over $\mathbb F_{p^m} + u\mathbb F_{p^m}$. Advances in Mathematics of Communications, 2020  doi: 10.3934/amc.2020123 [20] Juntao Sun, Tsung-fang Wu. The number of nodal solutions for the Schrödinger–Poisson system under the effect of the weight function. Discrete & Continuous Dynamical Systems - A, 2021  doi: 10.3934/dcds.2021011

2019 Impact Factor: 0.734