1.
Introduction
Massey [1] introduced reversible codes that are known to exhibit useful properties in certain retrieval systems and data storage. Moreover, some reversible codes have been proven to possess excellent solid burst error correction capability and high transmission efficiency [2,3]. It has also recently been observed that reversible codes have broad applications in various areas of mathematics, including cryptography [4,5], and the theory of DNA codes [6,7,8].
Interestingly, the class of reversible codes is closely connected to that of BCH codes because it is an important subclass of BCH codes. It is also closely related to the class of linear complementary dual codes (LCD codes, in short) introduced by Massey in [9]. In fact, Yang and Massey proved that a cyclic code is a reversible code if and only if it is an LCD code [10]. This interconnection between reversible codes, BCH codes, and LCD codes adds to their importance and potential applications in various domains.
The Rosenbloom-Tsfasman metric, also known as the RT-metric, was first introduced by Rosenbloom and Tsfasman [11] in the field of coding theory. It was later introduced into the theory of uniform distributions by Skriganov [12] and Martin and Stinson [13]. RT-metric is a generalization of the classical Hamming metric, and it has immediately attracted the attention of many coding theorists, resulting in extensive research on codes equipped with this metric. The majority of research on codes in this metric focuses on various bounds [14], linearity [15,16,17], weight distribution and MacWilliam's identities [18,19,20,21], groups of automorphisms [22], maximum distance separability [23], burst error enumeration [24,25,26], normality [27], covering properties [28], construction of self-dual codes [29], and existence of LCD codes [30] over various algebraic structures.
In the context of coding theory [11] and its corresponding notion in uniform distributions [12], the goal is to construct an RT-metric code with codewords that are maximally distant from each other, aiming for the smallest RT-distance between any two codewords to be as large as possible. Additionally, there is a desire for the RT-metric code to be as large as possible, akin to codes in the classical Hamming metric. However, these two objectives often conflict. Therefore, the aim is to achieve the maximum number of codewords with the greatest possible minimum distance or the largest minimum distance for a given number of codewords. Codes meeting these criteria are termed maximum distance separable (MDS) codes. Rosenbloom and Tsfasman [11] initially defined MDS codes over Fq with the ρ-metric in relation to potential information theoretic applications. Furthering their theory, Skriganov [12] related these codes to uniform distributions. An [n,k,dρ]q code in the RT-metric that attains the Singleton bound is considered an MDS code, meaning dρ=n−k+1. Marka and Selvaraj [31] demonstrated that optimal codes in Fnq are MDS, and vice versa.
As a result of this intriguing distinction of MDS codes in the RT metric, there arises a significant need for comprehensive study of MDS codes in this metric, such as the existence of MDS reversible codes. This paper aims to address this specific problem by investigating the presence of MDS reversible codes and subsequently exploring their properties if they are found to exist.
2.
Preliminaries
Let u=(u1,u2,…,un) and v=(v1,v2,…,vn) be any two vectors in Fnq. The ρ-distance or RT-distance between them is denoted by dρ(u,v), defined as dρ(u,v)=max{i|ui≠vi,1≤i≤n}. A q-ary RT-metric code of length n refers to a subset of the space Fnq equipped with this metric. If this subset is a subspace, it is referred to as a linear RT-metric code. A generator matrix G of a k-dimensional linear code C in Fnq is a k×n matrix such that its rows form a basis for C. The coordinates of any set of k linearly independent columns of G represent the information set for code C.
To derive MacWilliam's type relations for codes in the RT-metric, an essential inner product was introduced in [19] on the matrix space Matm×s(Fq). This particular inner product holds great importance in the investigation of codes in the RT-metric, as it influences various intriguing results. For instance, it indicates that the dual of an MDS code, under this specific inner product will also be an MDS code, which represents one of the noteworthy results in this context.
For α=(α1,α2,...,αn),β=(β1,β2,...,βn)∈Fnq, the inner product of α and β is given by
Then, the dual C⊥ of the code C can be defined as
An RT-metric code C is categorized based on certain properties. If C is contained within its dual code C⊥, it is referred to as self-orthogonal. A self-dual code, on the other hand, satisfies the condition C=C⊥. In contrast, for a code to be LCD, there are no non-zero codewords in common between C and its dual C⊥. C is termed reversible if for every codeword c=(v1,v2,…,vn) in C, its reverse Flip(c)=(vn,vn−1,…,v2,v1) is also an element of C and c is self-reversible if c=Flip(c).
2.1. Notations
Let P=(pij)m×n be a matrix of size m×n. Then, we use the following notation (see Table 1) throughout this study.
Let P and Q be square matrices of order n. If PPT=In=PTP, then P is called orthogonal. If P=PT, then P is called symmetric. P is called centrosymmetric if P=PS. Furthermore, the following properties are straightforward:
● Rn=Flip(In);
● RTn=RSn=Rn;
● R2n=In;
● PS=RnPRn;
● (PT)S=(PS)T;
● (PS)S=P;
● (P+Q)S=PS+QS;
● (PQ)S=QSPS;
● Flip(P)=PRn.
3.
Some properties of reversible codes
Lemma 3.1. If C is a reversible code of length n with dimension k over Fq with generator matrix G, then GS is also a generator matrix of C.
Proof. Consider C as a reversible code with generator matrix G. Since C is reversible, Flip(G) is also a generator matrix of C. If Rk is non-singular, then GS = RkFlip(G) is also a generator matrix of C. Thus, the lemma holds true.
Theorem 3.1. Let C be a linear code of even length n over Fq, with a generator matrix in the form G=[A|AS]. Then, C is reversible.
Proof.
Suppose C is not reversible. Then, Flip(G) cannot be a generator matrix of C. However, as Rk is non-singular, it implies that GS=RkFlip(G) is also not a generator matrix of C, leading to a contradiction. Therefore, C must be reversible.
Theorem 3.2. Let C be a linear code of odd length n over Fq, with a generator matrix G in the form G=[A|y|AS], where y is a column vector such that y=yS. Then, C is reversible.
Proof. The proof is similar to that of Theorem 3.1.
Theorem 3.3. Let C be a reversible code of length n with dimension k over Fnq. Then:
(i) If C has an odd length n, then we can express a generator matrix of C in the form G=[A|y|AS], where y is a column vector such that y=yS if and only if the total number of self-reversible codewords in code C is q⌈k2⌉.
(ii) If C has an even length n, then we can represent a generator matrix of C in the form G=[A|AS] if and only if the total number of self-reversible codewords in C is q⌈k2⌉.
Proof. Let C be a reversible code of length n with dimension k over Fnq.
(ⅰ) Let us assume that G=[A|y|AS] represents a generator matrix for a reversible code C with an odd length n, where A is a matrix and y is a column vector satisfying y=yS.
Case A: Assume k is even. Then, no self-reversible codeword exists as a row of generator matrix G=[A|y|AS]. Therefore, ri=Flip(rk−i+1),∀i∈{1,2,…,k}, where ri is the ith row of G. Since C is reversible, ci=ri+rk−i+1(i=1,2,…,k2) are k2 distinct self-reversible codewords. All distinct self-reversible codewords thus form a subspace of dimension k2 of C, leading to a total of qk2 self-reversible codewords.
Case B: Assume k is odd. Then, exactly one self-reversible codeword exists as a row of generator matrix G=[A|y|AS] which is the (k+12)th row of G. Therefore, ri=Flip(rk−i+1),∀i∈{1,2,…,k−12}, where ri is the ith row of G. Since C is reversible, ci=ri+rk−i+1(i=1,2,…,k−12) and the (k+12)th row vectors as self-reversible codewords in G are k+12 distinct self-reversible codewords. Therefore, all distinct self-reversible codewords form a subspace of dimension k+12 of C, resulting in a total of qk+12 self-reversible codewords.
From Cases A and B, we can conclude that the total number of self-reversible codewords in code C is q⌈k2⌉.
Conversely, assume that the total number of self-reversible codewords in code C is q⌈k2⌉.
Case A: Suppose k is even, and the total number of self-reversible codewords in C is qk2. Let U={u1,u2,…,uk2} be a linearly independent subset of all self-reversible codewords in C. This subset forms a subspace with dimension k2 of C. Since C is reversible, every self-reversible codeword of subspace U can be written as ui=vi+Flip(vi)(i=1,2,…,k2). Then, the sets Wi=<vi,Flip(vi)>, for i=1,2,…,k2, span distinct subspaces of dimension 2 of C. For each j, Wj∩∑i≠jWi={0}, for i,j=1,2,…,k2. Thus, B=∪k2i=1Wi, it contains k linearly independent codewords, and the direct sum of Wi's forms the basis of C, i.e., B=W1⨁W2⨁…⨁Wk2 is a basis of C.
Case B: Suppose k is odd and the total number of self-reversible codewords in C is qk+12. Let t be one of the self-reversible codewords in C. Therefore, the subset t forms a subspace of dimension 1 of C. Let U={u1,u2,…,uk−12} be a linearly independent subset of all self-reversible codewords in C and it is disjoint from the subspace t in C. This subset forms a subspace with dimension k−12 of C. Since C is reversible, every self-reversible codeword of subspace U can be written as ui=vi+Flip(vi)(i=1,2,…,k−12). Then, the sets Wi=<vi,Flip(vi)>,fori=1,2,…,k−12, span distinct subspaces of dimension 2 of C. For each j, Wj∩∑i≠jWi={0}, for i,j=1,2,…,k−12. Thus, B=∪k−12i=1Wi, it contains k−1 linearly independent codewords, and the direct sum of Wi's and t forms a basis of C, i.e., B=W1⨁W2⨁…⨁Wk−12⨁t is a basis of C.
(ⅱ) The proof is similar to that for 3.3(i).
Example 3.1. Consider a [7,3,4] reversible code C over GF(3) whose generator matrix is given by
The total number of self-reversible codewords in C is q⌈k2⌉=9 as the generators are (0,0,0,1,0,0,0) and (0,0,1,0,1,0,0). It is also to be observed that the generator matrix G above is in the form [A|y|AS]. This example follows from Theorem 3.3(i).
Example 3.2. Consider a [6,4,2] reversible code C over GF(2) whose generator matrix is given by
The total number of self-reversible codewords in C is q⌈k2⌉=4. It is also to be observed that the generator matrix G above is in the form G=[A|AS]. This example follows from Theorem 3.3(ii).
Remark 3.1. Some of the reversible codes with a generator matrix G cannot be represented in the form G=[A|y|AS] or G=[A|AS], because the total number of self-reversible codewords in C is not equal to q⌈k2⌉. This can be seen from the following examples (Examples 3.3 and 3.4).
Example 3.3. The matrix G given by
is a generator matrix for an [8,4,1] binary reversible code C in the RT-metric. However, this generator matrix G cannot be written in the form of [A|AS] for any matrix A. It is also to be noted that the total number of self-reversible codewords in C is 8, which is not equal to q⌈k2⌉=4.
Example 3.4. The matrix G given by
is a generator matrix for a [5,3,3] ternary reversible code C in the RT-metric. However, this generator matrix G cannot be written in the form of G=[A|y|AS] for any matrix A. It is also to be noted that the total number of self-reversible codewords in C is 3, which is not equal to q⌈k2⌉=9.
Theorem 3.4. Let C be a self-reversible code of length n with dimension k over Fnq. Then:
(i) If C has an odd length n, then we can find a generator matrix of C in the form G=[A|y|Flip(A)], where y is a column vector, if and only if the total number of self-reversible codewords in C is qk.
(ii) If C has an even length n, then we can find a generator matrix of C in the form G=[A|Flip(A)] if and only if the total number of self-reversible codewords in C is qk.
Proof. The proof of this theorem is similar to the proof of Theorem 3.3.
Theorem 3.5. Let C be an [n,k,d]q reversible code with the total number of self-reversible codewords q⌈k2⌉. Then, the dual C⊥ of C is an [n,n−k,d⊥]q reversible code, with the total number of self-reversible codewords q⌈n−k2⌉.
Proof. The proof of Theorem 3.5 is straightforward, relying on notations and basic algebraic manipulations.
4.
Reversible MDS codes in the RT-metric
Theorem 4.1. Let C be a code of length n with dimension k (where k≤n2) in the RT-metric, whose generator matrix is in the form G=[Ak|Y|ASk], where Y is a k×(n−2k) matrix. Then, C is MDS if and only if Ak is non-singular.
Proof. Suppose that C is a code of length n with dimension k (where k≤n2) in the RT-metric, whose generator matrix is in the form G=[Ak|Y|ASk], where Y is a k×(n−2k) matrix. Let C be an MDS code. Assume in contrary that Ak is singular. Then, ASk is also singular. Consequently, there exist at least two codewords x and z in C with the last k positions being the same, i.e., x=(x1,x2,…,xn−k,xn−k+1,…,xn) and z=(z1,z2,…,zn−k,xn−k+1,…,xn). According to [31], "an (n,K,dρ)q code is MDS if and only if its partition number is n−dρ+1." Thus, none of the two codewords have the same (n−dρ+1)-tuple as their last n−dρ+1 coordinates, which leads to a contradiction. Hence, Ak is non-singular.
Conversely, assume that Ak is non-singular. Then, (ASk)−1 is also non-singular. Thus, (ASk)−1G is a generator matrix of C in the following form: (ASk)−1G=[(ASk)−1Ak|(ASk)−1Y|(ASk)−1ASk]=[(ASk)−1Ak|(ASk)−1Y|Ik]. Hence, C is an MDS.
The following examples (Examples 5 and 6) illustrate Theorem 4.1.
Example 4.1. Consider a [10,4,7] linear code C over GF(2) whose generator matrix is given by
Here, d1=7, d2=8, d3=9, and d4=10. It is also to be observed that the generator matrix G above is in the form [Ak|Y|ASk] and that Ak is invertible.
Example 4.2. Consider a [6,3,4] reversible code C over GF(3) whose generator matrix is given by
Here, d1=4, d2=5, and d3=6. It is also to be observed that the generator matrix G above is in the form G=[Ak|ASk] and that Ak is invertible.
Corollary 4.1. Let C be a code of length n with dimension k (where k≤n2) in the RT-metric, whose generator matrix is in the form G=[Ak|Y|ASk], where Y is a k×(n−2k) matrix. Then, C is RMDS if and only if Ak is non-singular and Y is centrosymmetric.
Proof. If we assume that C is RMDS in the RT-metric, from Theorem 4.1, Ak is non-singular. It is sufficient to prove that Y is centrosymmetric. As C is reversible, from Lemma 1, GS is also a generator matrix of C. Note that the rows of GS=[Ak|YS|ASk] and those of G=[Ak|Y|ASk] generate the same code C. This implies that Y=YS or Y is centrosymmetric.
Conversely, assume that Ak is non-singular and Y is centrosymmetric. G=[Ak|Y|ASk] is a generator matrix of C, and (ASk)−1G=[(ASk)−1Ak|(ASk)−1Y|(ASk)−1ASk] is a generator matrix of C. This implies that G′=[Bk|Y1|Ik] is a generator matrix of C, where Bk=(ASk)−1Ak and Y1=(ASk)−1Y. It is sufficient to prove that C is reversible, that is, to prove Y1=BkYS1 and (Flip(Bk))2=BkBSk=BSkBk=Ik. In [32], Theorem 3 states that the linear code C is RMDS code in the RT-metric if and only if Y1=BkYS1 and (Flip(Bk))2=BkBSk=BSkBk=Ik. Thus, Bk=(ASk)−1AkandBSk=A−1kR−1kAkRk.
The following example (Example 4.3) illustrates Corollary 4.1.
Example 4.3. Consider an [11,4,8] reversible code C over GF(2) whose generator matrix is given by
Here, d1=8, d2=9, d3=10, and d4=11. It is also to be observed that the generator matrix G above is in the form [Ak|Y|ASk]. Thus, Ak is invertible and Y is centrosymmetric.
Theorem 4.2. Let C be a code of even length n with dimension k (n>k>n/2) in the RT-metric, where its generator matrix is in the form G=[A|AS], with Ak representing the first k×k square matrix of G. Then, the C is RMDS if and only if Ak is non-singular.
Proof. The proof is similar to the proof of Theorem 4.1. The following example (Example 4.4) illustrates Theorem 4.2.
Example 4.4. Consider a [6,4,3] reversible code C over GF(2) whose generator matrix is given by
Here, d1=3, d2=4, d3=5, and d4=6. It is also to be observed that the generator matrix G above is in the form G=[A|AS] and that Ak is invertible.
Theorem 4.3. Let C be a code of odd length n, with dimension k where n>k>n2, in the RT-metric. Its generator matrix is in the form G=[A|y|AS], where Ak represents the first k×k square matrix of G. Then, the C is RMDS if and only if Ak is non-singular and y is a column centrosymmetric vector.
Proof. The proof is similar to the proof of Corollary 1. The following example (Example 4.5) illustrates Theorem 4.3.
Example 4.5. Consider a [3,2,2] reversible code C over GF(5) whose generator matrix is given by
Here, d1=2 and d2=3. It is also to be observed that the generator matrix G above is in the form G=[A|y|AS] and that Ak is invertible.
Theorem 4.4. Every self-reversible [n=2k,k,dρ] code C in the RT-metric is MDS.
Proof. Let C be any self-reversible [n=2k,k,dρ]q code with even length n=2k. Then, by using Definition 3 in [27], there exists a partition number l=k such that C is of type (k+1,k+2,…2k). Hence, C is MDS. The following example (Example 4.6) illustrates Theorem 4.4.
Example 4.6. Consider a [6,3,4] reversible code C over GF(2) whose generator matrix is given by
Here, d1=4, d2=5, and d3=6. It is also to be observed that the generator matrix G above is in the form G=[Ak|Flip(Ak)] and that Ak is invertible.
Theorem 4.5. Every self-reversible [n=2k−1,k,dρ] code C with odd length n=2k−1 in the RT-metric is MDS.
Proof. The proof of this theorem is similar to the proof of Theorem 4.4. The following example (Example 4.7) illustrates Theorem 4.5.
Example 4.7. Consider a [5,3,3] reversible code C over GF(3) whose generator matrix is given by
Here, d1=4, d2=5, and d3=6. It is also to be observed that the generator matrix G above is in the form G=[A|Flip(A)] and that Ak is invertible.
5.
Self-dual reversible codes in the RT-metric
Theorem 5.1. If C is an [n=2k,k,dρ] reversible code over Fq in the RT-metric with a minimum distance dρ=1, then C cannot be self-dual in the RT-metric.
Proof. The proof of Theorem 5.1 is straightforward, relying on notations and basic algebraic manipulations.
Remark 5.1. If C is an [n=2k,k,dρ] self-dual code over Fq in the RT-metric with a minimum distance of dρ=1, then C cannot be reversible. This can be seen from the following examples (Examples 5.1 and 5.2).
Example 5.1. Consider a [6,3,1] linear code C over GF(2) whose generator matrix is given by
Here, d1=1, d2=3, and d3=5. It can be observed that C is a [6,3,1] self-dual code in the RT-metric over GF(2), but it is not reversible.
Example 5.2. Consider a [4,2,1] linear code C over GF(5) whose generator matrix is given by
Here, d1=1 and d2=3. It can be observed that C is a [4,2,1] self-dual code in the RT-metric over GF(5), but it is not reversible.
Theorem 5.2. Let C be an [n=2k,k,dρ] binary reversible code in the RT-metric, with a generator matrix in the form [Ak|ASk]. Then, C is self-dual if and only if it satisfies one of the following conditions:
(i) AkFlip(ATk)=(AkFlip(ATk))T;
(ii) Flip(AkATk) is symmetric;
(iii) AkATk is centrosymmetric.
Proof. Consider:
(i) Suppose C is self-dual [29], which implies that
(ii) Consider
(iii) Consider
Example 5.3. Consider a [6,3,3] reversible code C over GF(2) whose generator matrix is given by
Here, d1=3, d2=5, and d3=6. It is also to be observed that the generator matrix G above is in the form G=[Ak|ASk] and that Flip(AkATk) is symmetric.
Theorem 5.3. Let C be an [n=2k,k,dρ] non-binary reversible code in the RT-metric, with a generator matrix in the form [Ak|ASk]. Then, C is self-dual if and only if it satisfies one of the following conditions:
(i) AkFlip(ATk)=−(AkFlip(ATk))T;
(ii) Flip(AkATk) is skew-symmetric.
Proof. The proof of this theorem is similar to the proof of 5.2.
Example 5.4. Consider a [4,2,3] reversible code C over GF(5) whose generator matrix is given by
Here, d1=3 and d2=4. It is also to be observed that the generator matrix G above is in the form G=[Ak|ASk] and that Flip(AkATk) is skew-symmetric.
Theorem 5.4. Every binary self-reversible [n=2k,k,dρ] code C in the RT-metric is SR-MDS.
Proof. The proof of Theorem 5.4 is straightforward, relying on notations and basic algebraic manipulations.
Example 5.5. Consider a [4,2,3] binary self-reversible code C over GF(2) whose generator matrix is given by
Here, d1=3 and d2=4. It is also to be observed that the generator matrix G above is in the form G=[Ak|Flip(Ak)], and that C is self-dual.
6.
Some constructions of reversible codes in the RT-metric
Theorem 6.1. Let G be a generator matrix of a self-dual code of length n. Then,
generates an SR code of length 2n in the RT-metric.
Theorem 6.2. Let C be an [n1,k,d,R] RMDS code with a generator matrix in the form [AS|A] in the RT-metric. Then,
generates an RMDS code [2(n1+n2),n1+n2,dρ+n2,R+n2] with covering radius R+n.
Proof. Consider
7.
Conclusions
In this study, we provided some basic properties of reversible linear codes and obtained a condition for a reversible code to be an MDS code. Furthermore, we established some necessary and sufficient conditions for a reversible code to be self-dual. Finally, some constructions of reversible codes in the RT-metric were proposed.
Author contributions
Conceptualization: Bodigiri Sai Gopinadh formulated the initial research problem and developed the overarching mathematical framework. Validation: Venkatrajam Marka independently verified the correctness of the mathematical results, played a pivotal role in problem discussion, and providing continuous supervision. Both authors have read and approved the final version of the manuscript for publication.
Use of AI tools declaration
The authors declare they have not used Artificial Intelligence (AI) tools in the creation of this article.
Conflict of interest
The authors declare no conflicts of interest.