Abstract
Cyclic codes have efficient encoding and decoding algorithms. The decoding error probability and the undetected error probability are usually bounded by or given from the weight distributions of the codes. Most research focuses on determining the weight distributions of cyclic codes with few nonzeros using quadratic forms and exponential sums, but is often limited to low moments. In this paper, we focus on the application of higher moments of the exponential sum to determine the weight distributions of a class of ternary cyclic codes with three nonzeros, combining quadratic forms with MacWilliams' identities. Another application of this paper is to emphasize the computer algebra system Magma for the investigation of higher moments. Finally, the result is verified by an example using Matlab.
Introduction
In coding theory, cyclic codes are highly valued for their efficient encoding and decoding algorithms. However, determining their weight distribution—the frequency of codewords with a specific number of non-zero entries—is a notoriously difficult problem. This distribution is vital because it directly determines a code's error-detection and error-correction capabilities. While researchers have successfully determined weight distributions for codes with one or two nonzeros, codes with three or more nonzeros are significantly more complex.
Methodology: The Power of Five Moments
This paper addresses a specific class of ternary cyclic codes (over $\mathbb{F}_3$) of length $l = 3^m - 1$ (where $m$ is even) with nonzeros defined by $\pi^{-2}, \pi^{-(p+1)},$ and $\pi^{-(p^2+1)}$. The core technical approach involves transforming the weight counting problem into the evaluation of exponential sums $S(\alpha, \beta, \gamma)$.
Previous attempts often relied on "low moments" of exponential sums, which provide insufficient information for complex codes. The authors push into "higher moments" (up to the 5th moment) to solve the distribution. The jump from the 4th to the 5th moment provides the critical extra constraints needed to uniquely determine the frequencies of the seven nonzero weights identified in this class.
Computational Synergy with Magma
Calculating the 5th moment involves solving complex systems of equations in five variables ($x, y, z, w, u$) over finite fields. To handle this, the authors utilize the Magma computer algebra system to identify irreducible components of projective varieties. This allows them to count the number of solutions to the underlying equation systems that would be analytically intractable by hand.
These results are then combined with MacWilliams’ identities, which relate the weight distribution of a linear code to that of its dual code, yielding the final weight frequencies.
Key Results and Verification
The primary result is the determination that this class of ternary cyclic codes has exactly seven nonzero weights. The authors observe that the weights appear to be symmetric around a central value ($p^{m-1}(p-1)$), suggesting that the linear part of the exponential position acts as a "center" in the formation of weights.
For the specific case of $m=6$ (a code of length 728), the nonzero weights ($i$) and their frequencies ($A_i$) were calculated as:
- $A_{486}$: 124,245,576
- $A_{468}$: 128,432,304
- $A_{504}$: 119,277,522
- $A_{432}$: 8,591,310
- $A_{540}$: 6,866,496
- $A_{324}$: 4,732
- $A_{648}$: 2,548
These theoretical results were perfectly verified by numerical simulations conducted in Matlab.
Conclusion and Future Work
This study highlights a modern workflow in coding theory: using high-level theoretical tools alongside heavy-duty computational algebra to solve problems that are analytically difficult. However, limitations remain. Calculating higher moments becomes exponentially more difficult as the number of nonzeros increases or the field size grows. Future work may focus on extending these results to odd values of $m$ or larger prime fields, which would require re-evaluating the quadratic forms and exponential sum properties.
Summary updated