Abstract
In this paper, we investigate the m-spotty weight enumerators over the mixed alphabet . Specifically, we construct the Gray map from to , where with and . Based on this framework, we establish the MacWilliams identity for the m-spotty weight enumerators between a linear code and its dual over , by employing the generalized Hadamard transform and the canonical additive character of . Finally, an example is presented to illustrate and validate the theoretical results.
1. Introduction
In coding theory, it is customary to use generating functions that enumerate codewords by their Hamming weights to evaluate the probability of decoding errors over noisy channels. This generating function, which takes the form of a polynomial, is known as the weight enumerator. In 1963, MacWilliams established a fundamental relation between the weight enumerators of a linear code and its dual, now known as the MacWilliams identity. This identity has become one of the cornerstones of algebraic coding theory, providing a powerful connection between a code and its dual [1,2,3,4,5].
Error control codes play a vital role in enhancing the reliability of communication and data storage systems. To address more complex noise environments, spotty and m-spotty byte error models were introduced [6]. These models, which generalize the classical bit-level error model introduced by Shannon, allow for the detection and correction of localized byte errors and thus require generalized weight functions beyond the standard Hamming weight.
In recent years, many researchers have extended the MacWilliams identities to a variety of weights and algebraic structures, including finite rings. For instance, Suzuki et al. [7] derived the MacWilliams identity for binary m-spotty weight enumerators. Siap and Özen [8,9] generalized these results to finite fields and to rings such as with , and further to with . They also established the corresponding identities for RT-weight enumerators over arbitrary finite fields [10,11]. Moreover, Siap [12] obtained the MacWilliams identity for m-spotty Lee weight enumerators over . Subsequently, Sharma and Sharma [12] investigated m-spotty weight enumerators over integer modular rings and two-byte error control codes, deriving several applications and their associated MacWilliams identities. A general overview of such developments can be found in [13].
In this work, we continue this line of research by introducing the m-spotty weight and the associated weight enumerators over the mixed ring , where denotes the ring of integers modulo p and with and . We then establish the MacWilliams identity for linear codes over this mixed alphabet and their duals. The paper is organized as follows. Section 2 recalls basic concepts and preliminaries. Section 3 presents the MacWilliams identity for m-spotty weight enumerators over . Section 4 concludes the paper.
2. Preliminaries
Let R be a finite commutative ring. A linear code of length n over R is an R-submodule of . A matrix G is called a generator matrix of the linear code if the rows of G generate as an R-module. For any vector , the Hamming weight of is defined as For any and , the Hamming distance between and is
2.1. The MacWilliams Identity over the Finite Field
Let denote the finite field with q elements, where q is a prime power. An linear code over is a k-dimensional subspace of , where d is the minimum nonzero Hamming weight of . Let denote the number of codewords in with Hamming weight i, where . Then the vector is called the weight distribution of , and the polynomial is the weight enumerator of . The dual code of a linear code is defined by , where for vectors and .
The MacWilliams identity establishes the relation between the weight enumerators of a code and its dual.
Theorem 1.
Let be an linear code over with weight enumerator . Let denote the weight enumerator of its dual code . Then
2.2. Codes over the Mixed Ring
Throughout this paper, let denote the ring of integers modulo p, and let where and . For any vectors in , their inner product is defined as
For any element , define the projection . For and , define A linear code of type over is defined as a -submodule of under the above multiplication.
The dual code of a linear code of type over is given by
The Gray map is defined by
where the component map is given by
2.3. The m-Spotty Weight over
Let be a codeword of length . The i-th byte of c is denoted by . For a byte of length b, if at most t errors occur in that byte, then such an error is called an m-spotty byte error or a -error, where [14].
Definition 1.
Let be an error vector, and let be its i-th byte (). Them-spotty weight of e is defined as
where denotes the smallest integer not less than x [14]. If , then , i.e., the standard Hamming weight. If , then the m-spotty Hamming weight coincides with the usual Hamming weight over .
For , errors may occur in both components and . Since it is difficult to compute the m-spotty weight directly on , we apply the mapping to convert elements in and then compute the m-spotty weight by counting the nonzero components.
Definition 2.
For any element define . Let be a linear code of type over and . Then them-spotty weight enumerator of is defined by
where denotes the m-spotty weight distribution of .
In , let . The canonical additive character of is for . Any element can be uniquely expressed as
Then the canonical additive character on is defined as
Consequently, for any element , where and , the corresponding character is
3. MacWilliams Identity for m-Spotty Weight over
In this section, we establish the MacWilliams identity for the m-spotty weight over . Based on Lemmas 2.1, 2.2, and 2.8 in [8], and by following their proof techniques, we derive the following lemmas.
Lemma 1.
Let be an ideal of , and let χ be a character over . Then the sum of the character values of all elements in H equals zero, i.e.,
Lemma 2.
For any , let χ be a character over . Then
Proof.
There are three cases to consider:
- If , then
- If and , then by Lemma 1, we havewhere denotes the ideal generated by v.
- If and , then similarly, Lemma 1 implies
This completes the proof. □
Lemma 3.
Let be a linear code over , and let denote its dual code. Let be a function, and define
called the generalized Hadamard transform of . Then
Proof.
Since , then
For the first half to the right of the equal sign, since , then . By Lemma 2, it is easy to know that the first half is equal to
And for the latter half, since , then , From Lemma 2, we know that . Therefore
Hence
This means that . □
Lemma 4.
Let and let χ be a character over . Then
where .
Proof.
We first define , , where . Then
For the first half, according to the definition of m-spotty weight for any t, we have
- If , then or . After substituting these in, we can obtain
- If , then or . After substituting these in, we can obtain
Obviously the degrees of and are and , respectively. The second half of the proof is similar to the first half, then we have
This completes the proof. □
Theorem 2.
Let be a linear code over . Then the relation between the m-spotty weight enumerator of and its dual is
Proof.
Let , then by Lemma 4 we have
According to Lemma 3, for any , we have
This implies that . □
Next, we provide a specific example to illustrate our theorem. For convenience, let and . We consider the MacWilliams identity for the m-spotty weight of composite ring .
Example 1.
Let be a linear code over with generation matrix
We can verify that the row vector of the matrix is linearly independent and . The m-spotty weight for codewords of can be obtained in Table 1. From this, we can obtain the m-spotty weight distribution of , as shown in Table 2.
Table 1.
The m-spotty weight of codewords of .
Table 2.
Weight distribution of .
Then we can easily calculate the m-spotty weight enumerators of c by the weight distribution Therefore, by Theorem 2, we can obtain
This is the m-spotty weight counter for the corresponding dual code .
4. Conclusions
In this paper, we introduced the concepts of error control codes and MacWilliams identities, and defined the m-spotty weight over the mixed alphabet via a Gray map from to . By constructing additive characters and employing the generalized Hadamard transform, we derived the MacWilliams identity relating the m-spotty weight enumerators of a code and its dual over . Finally, we provided an explicit example to verify the theoretical results.
Author Contributions
Writing—original draft preparation, J.W. and A.J.; writing—review and editing, P.S. All authors have read and agreed to the published version of the manuscript.
Funding
This research is supported by the Natural Science Foundation of Anhui Province Higher School (2023AH051697, 2023AH051682, 2022AH020099).
Data Availability Statement
No new data were created or analyzed in this study.
Conflicts of Interest
The authors declare no conflicts of interest.
References
- MacWilliams, J. A Theorem on the Distribution of Weights in a Systematic Code. Bell Syst. Tech. J. 1963, 42, 79–94. [Google Scholar] [CrossRef] [Scilit]
- Özen, M.; Siap, V. The MacWilliams identity for m-spotty weight enumerators of linear codes over finite fields. Comput. Math. Appl. Int. J. 2011, 61, 1000–1004. [Google Scholar] [CrossRef] [Scilit]
- Sharma, A.; Sharma, A.K. On MacWilliams type identities for r-fold joint m-spotty weight enumerators. Discret. Math. 2012, 312, 3316–3327. [Google Scholar] [CrossRef] [Scilit]
- Sharma, A.; Sharma, A.K. MacWilliams type identities for some new m-spotty weight enumerators. IEEE Trans. Inf. Theory 2012, 58, 3912–3924. [Google Scholar] [CrossRef] [Scilit]
- Shi, M.; Wang, D.; Solé, P. Linear codes over F3+uF3+u2F3: MacWilliams identities, optimal ternary codes from one-Lee weight codes and two-Lee weight codes. J. Appl. Math. Comput. 2016, 51, 527–544. [Google Scholar] [CrossRef] [Scilit]
- Umanesan, G.; Fujiwara, E. A class of random multiple bits in a byte error correcting and single byte error detecting (St/bEC-SbED) codes. IEEE Trans. Comput. 2003, 52, 835–847. [Google Scholar] [CrossRef]
- Suzuki, K.; Kashiyama, T.; Fujiwara, E. A general class of m-spotty weight enumerator. IEICE Trans. Fundam. Electron. Commun. Comput. Sci. 2007, 90, 1418–1427. [Google Scholar]
- Siap, I. MacWilliams identity for m-spotty Lee weight enumerators. Appl. Math. Lett. 2010, 23, 13–16. [Google Scholar] [CrossRef] [Scilit]
- Siap, V.; Özen, M. A MacWilliams Type identity for m-spotty Rosenbloom-Tsfasman weight enumerators over Frobenius rings. In Proceedings of the CMMSE 2013: 13th International Conference on Mathematical Methods in Science and Engineering, Almeria, Spain, 23–27 June 2013; pp. 1236–1241. [Google Scholar]
- Özen, M.; Shi, M.; Siap, V. An identity between the m-spotty Rosenbloom-Tsfasman weight numerators over finite commutative Frobenius rings. Bull. Korean Math. Soc. 2015, 52, 809–823. [Google Scholar] [CrossRef] [Scilit]
- Özen, M.; Siap, V. The MacWilliams identity for m-spotty Rosenbloom-Tsfasman weight enumerator. J. Frankl. Inst. 2014, 351, 743–750. [Google Scholar] [CrossRef] [Scilit]
- Sharma, A.; Sharma, A.K. On some new m-spotty Lee weight enumerators. Des. Codes Cryptogr. 2014, 71, 119–152. [Google Scholar] [CrossRef] [Scilit]
- Shi, M.; Choie, Y.; Sharma, A.; Solé, P. Codes and Modular Fors: A Dictionary; World Scientific: Singapore, 2020. [Google Scholar]
- Siap, I. An identity between the m-spotty weight enumerators of a linear code and its dual. Turk. J. Math. 2012, 36, 641–650. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.