# 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] Petr Lisoněk, Layla Trummer. Algorithms for the minimum weight of linear codes. Advances in Mathematics of Communications, 2016, 10 (1) : 195-207. doi: 10.3934/amc.2016.10.195 [2] Liz Lane-Harvard, Tim Penttila. Some new two-weight ternary and quinary codes of lengths six and twelve. Advances in Mathematics of Communications, 2016, 10 (4) : 847-850. doi: 10.3934/amc.2016044 [3] Fengwei Li, Qin Yue, Fengmei Liu. The weight distributions of constacyclic codes. Advances in Mathematics of Communications, 2017, 11 (3) : 471-480. doi: 10.3934/amc.2017039 [4] Tim Alderson, Alessandro Neri. Maximum weight spectrum codes. Advances in Mathematics of Communications, 2019, 13 (1) : 101-119. doi: 10.3934/amc.2019006 [5] Alexander Barg, Arya Mazumdar, Gilles Zémor. Weight distribution and decoding of codes on hypergraphs. Advances in Mathematics of Communications, 2008, 2 (4) : 433-450. doi: 10.3934/amc.2008.2.433 [6] Long Yu, Hongwei Liu. A class of $p$-ary cyclic codes and their weight enumerators. Advances in Mathematics of Communications, 2016, 10 (2) : 437-457. doi: 10.3934/amc.2016017 [7] Zihui Liu, Xiangyong Zeng. The geometric structure of relative one-weight codes. Advances in Mathematics of Communications, 2016, 10 (2) : 367-377. doi: 10.3934/amc.2016011 [8] Nigel Boston, Jing Hao. The weight distribution of quasi-quadratic residue codes. Advances in Mathematics of Communications, 2018, 12 (2) : 363-385. doi: 10.3934/amc.2018023 [9] Christine A. Kelley, Deepak Sridhara. Eigenvalue bounds on the pseudocodeword weight of expander codes. Advances in Mathematics of Communications, 2007, 1 (3) : 287-306. doi: 10.3934/amc.2007.1.287 [10] Eimear Byrne. On the weight distribution of codes over finite rings. Advances in Mathematics of Communications, 2011, 5 (2) : 395-406. doi: 10.3934/amc.2011.5.395 [11] Sergio R. López-Permouth, Steve Szabo. On the Hamming weight of repeated root cyclic and negacyclic codes over Galois rings. Advances in Mathematics of Communications, 2009, 3 (4) : 409-420. doi: 10.3934/amc.2009.3.409 [12] Andries E. Brouwer, Tuvi Etzion. Some new distance-4 constant weight codes. Advances in Mathematics of Communications, 2011, 5 (3) : 417-424. doi: 10.3934/amc.2011.5.417 [13] Bram van Asch, Frans Martens. Lee weight enumerators of self-dual codes and theta functions. Advances in Mathematics of Communications, 2008, 2 (4) : 393-402. doi: 10.3934/amc.2008.2.393 [14] Lanqiang Li, Shixin Zhu, Li Liu. The weight distribution of a class of p-ary cyclic codes and their applications. Advances in Mathematics of Communications, 2019, 13 (1) : 137-156. doi: 10.3934/amc.2019008 [15] Martino Borello, Olivier Mila. Symmetries of weight enumerators and applications to Reed-Muller codes. Advances in Mathematics of Communications, 2019, 13 (2) : 313-328. doi: 10.3934/amc.2019021 [16] Pankaj Kumar, Monika Sangwan, Suresh Kumar Arora. The weight distributions of some irreducible cyclic codes of length $p^n$ and $2p^n$. Advances in Mathematics of Communications, 2015, 9 (3) : 277-289. doi: 10.3934/amc.2015.9.277 [17] David Keyes. $\mathbb F_p$-codes, theta functions and the Hamming weight MacWilliams identity. Advances in Mathematics of Communications, 2012, 6 (4) : 401-418. doi: 10.3934/amc.2012.6.401 [18] Andreas Klein, Leo Storme. On the non-minimality of the largest weight codewords in the binary Reed-Muller codes. Advances in Mathematics of Communications, 2011, 5 (2) : 333-337. doi: 10.3934/amc.2011.5.333 [19] Chengju Li, Qin Yue, Ziling Heng. Weight distributions of a class of cyclic codes from $\Bbb F_l$-conjugates. Advances in Mathematics of Communications, 2015, 9 (3) : 341-352. doi: 10.3934/amc.2015.9.341 [20] Masaaki Harada. New doubly even self-dual codes having minimum weight 20. Advances in Mathematics of Communications, 2020, 14 (1) : 89-96. doi: 10.3934/amc.2020007

2018 Impact Factor: 0.879