Weight distribution of a class of $p$-ary codes
Abstract
Let be a prime, and let be a positive integer such that is a primitive root modulo . Define , where , and let be the finite field of order with as its prime subfield. Denote by the trace function from to . For and , let be the set of nonzero solutions in to the equation . Writing , we define the code . In this paper, we investigate the weight distribution of for all and , with a focus on general odd primes . When , we establish that is a two-weight code for any and compute its weight distribution. For , we determine all possible weights of codewords in , demonstrating that it has at most distinct nonzero weights. Additionally, we prove that the dual code is optimal with respect to the sphere packing bound. These findings extend prior results to the broader case of any odd prime .
Cite
@article{arxiv.2503.19141,
title = {Weight distribution of a class of $p$-ary codes},
author = {Kaimin Cheng and Du Sheng},
journal= {arXiv preprint arXiv:2503.19141},
year = {2025}
}
Comments
13 pages