English

Weight distribution of a class of $p$-ary codes

Cryptography and Security 2025-03-26 v1

Abstract

Let pp be a prime, and let NN be a positive integer such that pp is a primitive root modulo NN. Define q=peq = p^e, where e=ϕ(N)e = \phi(N), and let Fq\mathbb{F}_q be the finite field of order qq with Fp\mathbb{F}_p as its prime subfield. Denote by Tr\mathrm{Tr} the trace function from Fq\mathbb{F}_q to Fp\mathbb{F}_p. For αFp\alpha \in \mathbb{F}_p and βFq\beta \in \mathbb{F}_q, let DD be the set of nonzero solutions in Fq\mathbb{F}_q to the equation Tr(xq1N+βx)=α\mathrm{Tr}(x^{\frac{q-1}{N}} + \beta x) = \alpha. Writing D={d1,,dn}D = \{d_1, \ldots, d_n\}, we define the code Cα,β={(Tr(d1x),,Tr(dnx)):xFq}\mathcal{C}_{\alpha,\beta} = \{(\mathrm{Tr}(d_1 x), \ldots, \mathrm{Tr}(d_n x)) : x \in \mathbb{F}_q\}. In this paper, we investigate the weight distribution of Cα,β\mathcal{C}_{\alpha,\beta} for all αFp\alpha \in \mathbb{F}_p and βFq\beta \in \mathbb{F}_q, with a focus on general odd primes pp. When β=0\beta = 0, we establish that Cα,0\mathcal{C}_{\alpha,0} is a two-weight code for any αFp\alpha \in \mathbb{F}_p and compute its weight distribution. For β0\beta \neq 0, we determine all possible weights of codewords in Cα,β\mathcal{C}_{\alpha,\beta}, demonstrating that it has at most p+1p+1 distinct nonzero weights. Additionally, we prove that the dual code C0,0\mathcal{C}_{0,0}^{\perp} is optimal with respect to the sphere packing bound. These findings extend prior results to the broader case of any odd prime pp.

Keywords

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