Abstract
This paper establishes an extended theoretical framework centered on the duality of codes constructed over a special class of non-unital, commutative, local rings of order , where p is a prime satisfying or . The work expands the traditional scope of coding theory by developing and adapting a generalized recursive approach to produce quasi-self-dual and self-dual codes within this algebraic setting. While the method for code generation is rooted in the classical build-up technique, the primary focus is on the duality properties of the resulting codes—especially how these properties manifest under different congruence conditions on p. Computational examples are provided to illustrate the effectiveness of the proposed methods.
MSC:
94B05; 16D10
1. Introduction
The recursive extension approach is a well-established and powerful technique in coding theory, particularly effective in constructing self-dual codes over fields and rings [1,2,3]. It typically begins with a self-dual code of length n and incrementally enlarges it to construct a self-dual code of length , where t is small and fixed. This step-by-step process ensures that the extended code maintains the self-duality property. Although such strategies have been widely employed over commutative and unital rings, their adaptation to non-unital, commutative rings has also been examined, yielding promising results in works such as [4,5,6,7,8].
This work initiates a systematic study of self-dual and quasi-self-dual codes over the ring R, defined by two generators a and b, and governed by the following relations:
where p is a prime number. This ring is commutative, non-unital, and of order , aligning with known classifications of such rings as detailed in [9]. While finite fields and rings have long been used as alphabets in coding theory—dating back to the 1940s and 1980s, respectively—recent advances have expanded these ideas to non-unital rings of small order, such as four and nine [4,6].
In this study, we investigate a generalization of a recursive method to develop quasi-self-dual (QSD) codes over a particular class of non-unital, commutative rings of order , where p is an odd prime satisfying either or . These congruence conditions on p give rise to rich algebraic structures that support the formulation of error-correcting codes with desirable properties. Within the scope of this work, QSD codes are defined as self-orthogonal codes of length n and size . As with other local rings of order , the residue and torsion codes play a fundamental role in the structure and characterization of codes.
This paper is structured as follows: Section 2 introduces the foundational definitions and notations. Section 3 explores dual codes over R in the case where , while Section 4 focuses on the case . In Section 5, we apply a recursive design approach to present computational examples of self-dual and quasi-self-dual codes over R. Finally, Section 6 concludes with a summary and an outlook on potential future research directions.
2. Codes over a Commutative Non-Unital Local Ring of Order
Let R be a ring generated by a and b under certain relations as follows:
Thus, R has a characteristic p and consists of elements. It can be expressed as , where . R is commutative without being multiplicative, according to its ring representation, and it contains an unique maximal ideal , where . We can thus write R as
The reduction map modulo is defined as by , where . This map is extended in a natural way into a map from to
A linear R code of length n is defined as an R submodule of . It might be viewed as the R span of the rows in a matrix known as a generator matrix, where we assume that the rows are from . There are two codes of length n associated with the code . The residue code is just , and the torsion code is .
It is simple to verify the claim that [6]. The dimensions of the residue and torsion codes are denoted by and , respectively. This form of code, , is called type .
According to the first isomorphism theorem, .
The inner product of is defined as follows:
The module
is called the dual code of the code . If , then the R-code is said to be self-dual; moreover, is self-orthogonal if . We follow here conventions and methods similar to those discussed in [10,11].
According to [6] terminology, an R code of length n that is self-orthogonal and of size is referred to as a quasi-self-dual (QSD) code upon switching from a characteristic value of two to p.
With an R code, can be attached as an additive -code by the map
for , such that . One can easily see that for all .
We shall simply substitute codes over for codes in the proofs to extend a few conclusions from [7,12] in Theorem 1.
Theorem 1.
Let be a linear code over R. Let , and let n and be non-negative integers. Then, the following hold:
- (i)
- All linear codes over R of length n and type are equal to standard form codes within the generator matrix.where V is a matrix with entries in R; U and W are matrices with entries in ; and and are identity matrices.
- (ii)
We indicate the code of length n over R with the generator matrix G by if G is a matrix over R [13].
Theorem 2.
A linear code C of length n over R is self-orthogonal if and only if res is a self-orthogonal code over .
Proof.
Let and . For any codewords of the form and in C, we compute the inner product:
Using the ring relations , , and , this simplifies to:
Therefore, the inner product of two codewords in C lies in the ideal generated by b and depends only on the dot product of their residue components. Consequently, C is self-orthogonal if and only if is self-orthogonal over . □
Next, we adapt the construction of quasi-self-dual codes in [12] such that they may be applied to an odd prime number p.
Theorem 3.
If a code is linear of length n over the ring R, then is quasi-self-dual if and only if the following conditions hold:
- (i)
- is a self-orthogonal -code over .
- (ii)
- is an -code over .
Proof.
- (i)
- This follows directly from Theorem 2, which states that a code over R is self-orthogonal if and only if its residue code is self-orthogonal over . Hence, if is self-orthogonal, then so is .
- (ii)
- Since has dimension and has dimension , the total size of is:This confirms that has the correct size to be quasi-self-dual.
□
The following result parallels Theorems 3 through 5 in [7].
Theorem 4.
Let be a linear code of length n over the ring R, expressed in the form . Then is self-dual if and only if the following two conditions are satisfied:
- The residue code is self-dual over ;
- The torsion part satisfies .
When these conditions hold, the code admits the explicit decomposition:
and its cardinality is given by:
Additive Codes over
The additive code of length n over is an additive subgroup of . Thus, is referred to as a code as it comprises code words for some integer . In the event that has a minimum distance d, we write as the parameters of . A generator matrix is a generator matrix with entries from whose rows span that may be used to represent an additive code over . In other words, is the span of its rows.
In , let be a primitive element. Its order is , and its . Consequently, . The definition of the trace map is .
3. Results on Duality Codes over of Order , with as a Prime Number and
In this section, we study quasi-self-dual and self-dual codes over a ring R. We introduce a building-up method that serves as a powerful tool for generating codes of larger length while preserving their duality properties. Specifically, we extend the building-up technique previously developed for quasi-self-dual codes over commutative non-unital rings of order four [6], applying it to quasi-self-dual codes over commutative non-unital rings of order , where p is the power of an odd prime. To ensure the applicability of our construction, the element must be a square in the non-unital ring of order .
Lemma 1.
Let p be an odd prime; then, is a square in if and only if .
Proof.
It is known that is a square in if , where is Euler’s phi function. Equivalently, . Since p is odd, the result follows. □
Lemma 2.
Let be a finite field of characteristic p. If or , then a self-dual code of length n exists over if and only if .
Proof.
We may assume that the code appearing in the decomposition of in [14] (Theorem 4.2) is a Euclidean self-dual code over of length n. Let . Consider the generator matrix , where ; this defines a Euclidean self-dual code of length 2 over . This matrix gives rise to a self-dual code of length 2 over the ring. Consequently, a self-dual code of length over the ring can be constructed as the direct sum of k copies of . □
Lemma 3.
Using the notation introduced above, the following holds: If or , then a self-dual code of length n exists over R if and only if .
Lemma 4.
Let p be a power of an odd prime such that or . Then there exist elements such that
We now present a theorem describing the recursive build-up method. Starting from an initial quasi-self-dual code of length n, this method constructs a new quasi-self-dual code of length . The recursive build-up technique is particularly effective for generating quasi-self-dual codes of arbitrary large lengths over the ring R.
Theorem 5.
Let be a quasi-self-dual code over R of length n with generator matrix , where denotes the i-th row of for . Let and let (not both zero) satisfy the relation . Define for .
Consider the set of vectors given by:
The row span of these vectors forms a quasi-self-dual code over R of length if one of the following conditions holds:
- (i)
- and ;
- (ii)
- and .
Proof.
It suffices to show that the rows of are orthogonal to one another. Let = (), which is the first row of , and let = (), which is the st row of , for .
- (i)
- If and , thenfor all .
- (ii)
- If and , thenfor all .
In both cases, the rows of are orthogonal, thus proving that the resulting code is self-orthogonal.
Furthermore, the size of is given by:
This confirms that is quasi-self-dual. Hence, the constructed code , obtained by extending the quasi-self-dual code , is also quasi-self-dual. □
Theorem 6.
Any quasi-self-dual code of length n is obtained from some self-dual code of length (up to equivalence) by the construction in Theorem 5.
In the second type of construction, quasi-self-dual codes with two extra generators are also created.
Theorem 7.
Let be a quasi-self-dual code over R of length n with a generator matrix , where is the ith row of for . Let , and , not all zero, such that , and . Write for . Then, the row span of the vectors
is a quasi-self-dual code of length .
Proof.
Let , .
We see that , as .
Now, let for . Then,
Also, for ,
Thus, is a self-orthogonal code. Furthermore, since , is quasi-self-dual. As a result, the code that the build-up construction produced from the quasi-self-dual code is also quasi-self-dual. □
Corollary 1.
The number of options for u determines how many codes are created from a given , with Theorem 7 producing codes.
Remark 1.
The recursive construction techniques outlined in Theorems 5 and 7 are not applicable to the construction of self-dual codes over the ring R. This is due to the fact that the resulting code does not attain the required cardinality of , which is a necessary condition for self-duality over R.
Now, we offer the building-up structure below and establish that it holds for all self-dual codes over R with , or . The ensuing theorem constructs self-dual codes with an additional generator and a two-fold length increase.
Theorem 8.
Let be a self-dual code over R of length n with a generator matrix , where is the ith row of for . Let , , and , not all zero, such that and . Write for . Then, the row span of the following vectors
is a self-dual code of length if
- (i)
- , and ;
- (ii)
- and .
Proof.
Following the reasoning in Theorem 5, it is sufficient to verify that the vector is orthogonal to itself and to each vector for . Specifically,
given that . Hence, the code is self-orthogonal.
Let denote the subcode generated by the final m vectors. Define to be the -span of the set , where and .
Observe that the torsion part of can be expressed as
Since is self-dual, Theorem 4 ensures that . Moreover, by assumption, , which implies that .
It remains to verify that is self-dual. Given that is self-orthogonal, it follows that is also self-orthogonal, i.e., .
From Theorem 4, we know that . With two additional generators included in the matrix , the total size of becomes . Consequently, we deduce that , confirming that is indeed self-dual. □
Remark 2.
The approach described in Theorem 8 is not applicable to quasi-self-dual codes over the ring R due to a mismatch in cardinality requirements; specifically, such codes do not possess the size , which is essential for the method to be valid.
Corollary 2.
Let be a quasi-self-dual code over the ring R. Then, the minimum Hamming distance of is equal to that of its torsion component, i.e.,
Proof.
Define and as the minimum distances of the residue part and the torsion part , respectively. Due to the structure of and the linearity of code operations, we observe that and that . This inclusion implies that the minimum distance of cannot exceed that of :
To establish equality, consider any nonzero codeword . By Theorem 3, we can uniquely express in the form , with and . We now consider three exhaustive cases:
- If and , then and .
- If and , then and .
- If and , then , and by the weight properties of R, we have
In all three scenarios, the weight of any nonzero codeword in is bounded below by the weight of a nonzero element in . Thus,
Combining both inequalities yields the conclusion:
completing the proof. □
Corollary 3.
For a self-dual code over the ring R, expressed as , the minimum Hamming distance satisfies .
Proof.
The conclusion follows immediately from Corollary 2, noting that the minimum distance of the ambient space is 1. □
4. Results on Duality Codes over of Order , with as a Prime Number and
In this section, we investigate quasi-self-dual and self-dual codes over a ring R. We introduce a building-up construction for generating these codes, extending the existing method developed for linear codes over non-unital commutative rings of order nine [5]. Our generalization applies to linear codes over commutative non-unital rings of order , where p is a prime number satisfying .
Lemma 5.
Let be a finite field of characteristic p. If , then a self-dual code of length n exists over if and only if .
Lemma 6.
Using the notation introduced above, the following holds: If , then a self-dual code of length n exists over R if and only if .
Lemma 7.
Let p be a prime such that . Then there exist elements such that
The following theorem comprises the building-up constructions for quasi-self dual codes over R.
Theorem 9.
Let be a quasi-self-dual code of length n over R with a generator matrix , where is the i-th row of for . If , and (not all zero), such that , and , then the code with the generator matrix
is quasi-self-dual of length .
Proof.
We first show that is self-orthogonal. Define the vectors
and for ,
- Since and , the first vector is orthogonal to itself. Similarly, the second and third generators are orthogonal to themselves.
- The orthogonality between the first three generators and the last m vectors follows since
- For , we havethus the last m vectors are orthogonal to themselves and each other, by the self-orthogonality of .
- Finally, for any pair of vectors among the last m generators, the orthogonality conditionholds, confirming mutual orthogonality.
Therefore, is self-orthogonal. Moreover, since
it follows that is quasi-self-dual. □
The following theorem comprises the building-up constructions for quasi-self-dual codes over R with four extra lengths:
Theorem 10.
Let be a quasi-self-dual code over R of length n with a generator matrix , where is the ith row of for . Let , such that and for . For , define and . If , such that , then the code with the generator matrix
is quasi-self-dual of length .
Proof.
- First, we show that is self-orthogonal. Since , the first generator is orthogonal to itself. Similarly, the second generator is orthogonal to itself.
- The relation confirms that the first generator is orthogonal to the second generator.
- The identity shows that the first (or second) generator is orthogonal to each of the last m generators.
- Finally, the orthogonality among the last m generators follows from the computation:which holds by the self-orthogonality of .
Thus, is a self-orthogonal code.
Furthermore, since
the code is quasi-self-dual. □
The following section provides a construction method of order four for self-dual codes withfour generators.
Theorem 11.
Let be a self-dual code over R of length n with a generator matrix , where is the ith row of for . Let , such that and for . For , define and . If , such that , and by letting , the code with the generator matrix
is self-dual of length .
Proof.
The self-orthogonality of the code follows by analogy with the argument presented in Theorem 10, where the inner product structure over R ensures that each codeword satisfies the self-orthogonality condition. Moreover, the self-duality of follows similarly to Theorem 8, where the decomposition is established, along with verification of the size condition . □
5. Numerical Results and Examples
In this section, we demonstrate the application of the theories and constructions developed in the previous sections through several illustrative examples. The focus is on generating quasi-self-dual and self-dual codes over a commutative non-unital ring of order . Special attention is given to constructing codes of various lengths and types, while analyzing how parameters such as the choice of vectors and generator matrices influence the structure and weight distributions of the resulting codes. These examples not only showcase the versatility and effectiveness of the proposed methods but also provide a deeper insight into the process of constructing and analyzing quasi-self-dual codes. For a broader understanding of the general principles of coding theory that underpin these constructions, we refer the reader to [15,16].
All computations were performed using the computer algebra system [17].
Example 1.
Let and the ring R be defined by the relations
We begin with a quasi-self-dual code of length 4, denoted as a -type code, characterized by the following generator matrix:
The corresponding Hamming weight enumerator is . Using Theorem 5, we extend this code to quasi-self-dual codes of length 6. The generator matrix for the new code is
The Hamming weight enumerator for this code is
Example 2.
(Quasi-self-dual codes over the ring )
Let and define the ring R by the relations
We begin with a quasi-self-dual code of length 3, a -type code. The generator matrix is
The Hamming weight enumerator for this code is Applying Theorem 5(i), we extend this code to a quasi-self-dual code of length 5. The new generator matrix is
The weight distribution is [<0, 1>, <2, 12>, <3, 64>, <4, 456>, <5, 2592>].
Additionally, by applying Theorem 5(ii) with a different vector , we obtain another quasi-self-dual code of length 5 with a different weight distribution: [<0, 1>, <2, 8>, <3, 36>, <4, 524>, <5, 2556>].
From the previous example, we have the following remark:
Remark 3.
If two quasi-self-dual R-codes are monomially equivalent, they have the same residue code. However, the contrary is not true, as demonstrated by the example above.
Example 3.
Let and R be the ring defined by the relations
The generator matrix for the base code of length 4 is
By applying Theorem 7 and selecting parameters, we extend this code to length 6. The new generator matrix is
The corresponding weight distribution is
Example 4
(Self-Dual Code of Length 4 to Length 6).
Let and . Moreover, by using Theorem 7, we have
using Theorem 3, we construct quasi-self-dual codes with a length of 6 from a code of type with a generator matrix
and weight distribution .
Using as the base generator matrix and , we obtain a quasi-self-dual code of type with a generator matrix
and weight distribution
Using with , we obtain a quasi-self-dual code of type with a generator matrix
and weight distribution
Example 5.
Consider the case where . Starting with a self-dual code of length 2 over the ring R, with parameters and type , we define its generator matrix as follows:
This code yields the Hamming weight enumerator: .
Using part of Theorem 8, we have
with , we obtain a self-dual code with a generator matrix
and Hamming weight enumerators
Using part of Theorem 8, we have
with , we obtain a self-dual code with a generator matrix
which also exhibits the same Hamming weight enumerator:
From the previous example, we have the following lemma:
Lemma 8.
In the case of two self-dual codes ( and ) over R, they may be considered monomially equivalent only if their residue codes match.
6. Conclusions
This study focused on generating duality codes over a non-unital commutative ring R of order , specifically examining the cases where and , with p being an odd prime. By analyzing these two distinct scenarios, we explored the unique algebraic structures that arise in each case and their implications for the design and properties of duality codes.
The results provide valuable insights into how the congruence condition on p influences the construction of such codes, offering a deeper understanding of their potential applications in areas such as cryptography, coding theory, and secure communications. Our comparative analysis further highlights the versatility of duality codes over non-unital rings and lays a foundation for future advancements in the field.
For future research, the proposed building-up method could be extended to other classes of finite rings, including non-commutative or higher-order rings. Investigating the performance of the constructed codes under various channel models or within practical cryptographic protocols would also be a worthwhile direction. Furthermore, developing efficient encoding and decoding algorithms, as well as exploring connections with other algebraic structures (such as modules or lattices), presents a promising avenue for further study.
Funding
This research was supported by the Deanship of Graduate Studies and Scientific Research at Qassim University (Grant No. QU-APC-2025).
Data Availability Statement
Data can be made available upon request from the corresponding author.
Acknowledgments
The Researcher would like to thank the Deanship of Graduate Studies and Scientific Research at Qassim University for financial support (QU-APC-2025).
Conflicts of Interest
The author declares no conflicts of interest.
References
- Han, S.; Lee, H.; Lee, Y. Construction of self-dual codes over F2 + uF2. Bull. Korean Math. Soc. 2012, 49, 135–143. [Google Scholar] [CrossRef]
- Kim, J.-L.; Lee, Y. Euclidean and hermitian self-dual MDS codes over large finite fields. J. Comb. Theory Ser. 2004, 105, 79–95. [Google Scholar] [CrossRef]
- Kim, J.-L.; Lee, Y. An efficient construction of self-dual codes. Bull. Korean Math Soc. 2015, 52, 915–923. [Google Scholar] [CrossRef]
- Alahmadi, A.; Alihia, T.; Betty, R.A.; Galvez, L.; Solé, P. The build-up construction for codes over a commutative non-unitary ring of order 9. Mathematics 2024, 12, 860. [Google Scholar] [CrossRef]
- Alahmadi, A.; Alihia, T.; Solé, P. The build up construction for codes over a non-commutative non-unitary ring of order 9. AIMS Math. 2024, 9, 18278–18307. [Google Scholar] [CrossRef]
- Alahmadi, A.; Alkathiry, A.; Altassan, A.; Bonnecaze, A.; Shoaib, H.; Solé, P. The build-up construction over a commutative non-unital ring. Des. Codes Cryptogr. 2022, 90, 3003–3010. [Google Scholar] [CrossRef]
- Alahmadi, A.; Melaibari, A.; Solé, P. Duality of codes over non-unital rings of order four. IEEE Access 2023, 11, 53120–53133. [Google Scholar] [CrossRef]
- Alahmadi, A.; Alshuhail, A.; Solé, P. The mass formula for self-orthogonal and self-dual codes over a non-unitary commutative ring. AIMS Math. 2023, 8, 24367–24378. [Google Scholar] [CrossRef]
- Fine, B. Classification of finite rings of order p2. Math. Mag. 1993, 66, 248–252. [Google Scholar] [CrossRef]
- Rains, E.M.; Sloane, N.J.A. Self-dual codes. In Handbook of Coding Theory; Elsevier: Amsterdam, The Netherlands, 1998. [Google Scholar]
- Shi, M.; Alahmadi, A.; Solé, P. Codes and Rings: Theory and Practice; Elsevier: Amsterdam, The Netherlands; Academic Press: New York, NY, USA, 2017. [Google Scholar]
- Alahmadi, A.; Altassan, A.; Basaffar, W.; Bonnecaze, A.; Shoaib, H.; Solé, P. Quasi type IV codes over a non-unital ring. Appl. Algebra Eng. Commun. Comput. 2021, 32, 217–228. [Google Scholar] [CrossRef]
- Ling, S.; Xing, C. Coding Theory: A First Course; Cambridge University Press: Cambridge, UK, 2004. [Google Scholar]
- Ling, S.; Solé, P. On the algebraic structure of quasi-cyclic codes I. Finite fields. IEEE Trans. Inform. Theory 2001, 47, 2751–2760. [Google Scholar] [CrossRef]
- MacWilliams, F.J.; Sloane, N.J.A. The Theory of Error-Correcting Codes; North-Holland Mathematical Library; Elsevier: Amsterdam, The Netherlands, 1977. [Google Scholar]
- Hufman, W.C.; Pless, V. Fundamentals of Error-Correcting Codes; Cambridge University Press: Cambridge, UK, 2003. [Google Scholar]
- Bosma, W.; Cannon, J.; Playoust, C. The Magma algebra system. I. The user language. J. Symb. Comput. 1997, 24, 235–265. [Google Scholar] [CrossRef]
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 author. 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 (https://creativecommons.org/licenses/by/4.0/).