Next Article in Journal
Energy Diagnostics and Long-Time Behavior of Crank–Nicolson Schemes for Shallow Water Flows with Bottom Friction
Previous Article in Journal
Smooth SCAD: A Raised Cosine Thresholding Rule for Wavelet Denoising
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Hulls of Linear Codes over Non-Unitary Rings of Four Elements

1
Mathematics Department, Central China Normal University, Wuhan 430079, China
2
I2M, CNRS, Aix Marseille University, 13288 Marseilles, France
3
Research Group of Algebraic Structures and Applications (ASA), Mathematics Department, Faculty of Science, King Abdulaziz University, Jeddah 21589, Saudi Arabia
4
Department of Mathematics and Statistics, Faculty of Science, University of Jeddah, Jeddah 21589, Saudi Arabia
*
Author to whom correspondence should be addressed.
Mathematics 2026, 14(5), 788; https://doi.org/10.3390/math14050788
Submission received: 1 January 2026 / Revised: 12 February 2026 / Accepted: 20 February 2026 / Published: 26 February 2026

Abstract

In this paper, we explore the hull of linear codes over the non-unitary rings of order four, namely E , I and H . Initially, we determine the binary associated codes of the hull over each ring; then, we characterize the hulls in terms of these codes. Furthermore, we establish the connection between the hull of any linear code over these rings and the hull of its dual. Finally, we classify linear codes over each ring with prescribed hull sizes under permutation equivalence for short lengths.
MSC:
Primary 94B05; Secondary 16L30

1. Introduction

In coding theory, the Euclidean hull or simply the hull of a linear code over a finite field is the intersection of the code and its dual under the Euclidean inner product. In 1990, Assmus and Key introduced this notion, and they used it to classify finite projective planes [1]. This concept has gathered much interest from researchers due its role in computing automorphism groups of a linear code and determining the complexity of algorithms for studying the permutation equivalence of two linear codes [2,3]. Furthermore, the hull code generalizes the notions of linear complementary dual (LCD) codes, self-orthogonal and self-dual codes, which correspond to, respectively, a trivial hull, a hull equal to starting code, a hull equal to both the code and its dual.
Another motivation for the study of hull of linear codes emerged from the construction of entanglement-assisted quantum error correcting codes (EAQECCs) initiated by Bowen [4]. Following this, Brun et al. [5] proved that it is possible to construct quantum codes via any classical linear codes by using pre-shared entanglement between the encoder and decoder and relaxing the duality condition. Subsequently, the authors in [6] have shown that an EAQECC can be generated from a classical linear code of given hull dimension.
The characterization and classification of self-orthogonal and self-dual codes have continued to be a primary focus of research due to their diverse applications [7,8,9]. Pless [10] established the first classifications of binary self-orthogonal codes of odd length n for 3 n 19 and binary self-dual codes of even length with 2 n 20 , and followed by Bouyukliev et al. [11] gave a classification binary optimal self-orthogonal codes of length up to 40 and dimension up to 10. Furthermore, binary LCD codes were also classified by Araya and Harada [12] for small lengths based on the mass formula obtained in [13]. On the other hand, the classification of linear codes with various hulls of specified order over finite fields or unitary rings has received limited attention. Sendrier [14] derived a mass formula for linear codes over finite fields with prescribed hull dimensions, although its expression involves complex summation terms. Subsequently, Li and Shi [15] obtained a closed-form mass formula for binary linear codes with various hull dimensions, thereby simplifying Sendrier’s original expression. Also, they showed that almost all binary linear codes with a l-dimensional hull are odd-like codes with odd-like duals for fixed l. Dougherty and Saltürk [16] studied the hull of both linear and additive codes over four Frobenius rings of order 4 and derived formulas to count codes with hulls of a given size. However, to the best of our knowledge, no one has investigated hulls of codes over non-unitary rings. Therefore, the study of hulls of codes over non-unitary rings will be an interesting addition to further extend the boundaries of the non-unitary rings and add more research directions for further developments.
Recently, researchers have carried out extensive study of codes from finite fields and rings with unity to the non-unitary rings and explored numerous families of codes over this setting. For example, Alhamadi et al. [17] initiated the investigation of quasi self-dual (QSD) over the commutative, non-unitary, ring I of order four (note that a QSD code of length n over non-unitary rings of four elements is a self-orthogonal code of size 2 n ). Meanwhile, Kim and Roe constructed more QSD I -codes [18]. In [19,20], the authors explored QSD over the different non-unitary rings of four elements E and H , respectively, since every code over these three rings can be regarded as an additive F 4 -code.This allowed the authors of [21] to classify self-orthogonal and self-dual codes over both rings I and E , under permutation equivalence. In a similar way, QSD codes over H were classified in [19]. On the other hand, Shi et al. [22] introduced LCD codes over E . Later, the authors in [23] extended the study of LCD and self-dual codes to the non-commutative non-unitary ring of order prime square. The present study was motivated by the aforementioned identified research gap concerning the hulls of codes over the three non-unitary rings of order four, E, I and H. We further characterized the hull codes and the hull of their dual in terms of their associated binary codes. Also, we studied the right and left hulls of E -codes and examined their fundamental properties. We showed that the property of a code and its dual having identical hulls over a finite field remains valid over the ring E but not over the rings I and H . Additionally, we derived a mass formula for linear I -codes with various hull sizes and types. We classified all linear E -codes having left and right hulls of specific sizes, linear codes with a given hull order over both rings I and H , under permutation equivalence, for certain small lengths.
This manuscript consists of four sections. In Section 2, we have provided basic results on the hull for codes over finite field and given some foundational results about the three non-unitary rings of order four and the linear codes over them. Section 3 is devoted to the hull structure of linear codes and their dual over each ring. In Section 4, we have determined a mass formula for linear I -codes with various hull sizes and classify these codes up to length 4. Furthermore, we have classified E -codes with prescribed left and right hull sizes, as well as H -codes with given hull order, for certain small lengths under the permutation equivalence. The last section concludes this article and proposes several open problems for further study.

2. Preliminary

2.1. Additive and Linear Codes

Let F 2 to be the finite field of order 2. A linear code C of length n over F 2 is a k-dimensional subspace of F 2 n . We say C is a binary [ n , k ] -code if it has length n and dimension k over F 2 .
The dual of C with respect the standard inner product is denoted by C and is defined as
C = { x F 2 n | x , x = 0 , x C } .
The hull of a binary linear code C is Hull ( C ) = C C .
  • For any binary linear codes C 1 and C 2 , the relative hull of C 1 with respect to C 2 is denoted by Hull C 2 ( C 1 ) and defined as
Hull C 2 ( C 1 ) = C 1 C 2 .
It is clear that Hull ( C 1 ) = Hull C 1 ( C 1 ) .
The following proposition of [24] is helpful in our further study.
Proposition 1
([24]). Let C be a binary [ n , k ] -code and C be a binary [ n , k ] -code. Then,
k dim ( Hull C ( C ) ) = k dim ( Hull C ( C ) ) .
Denote by F 4 the finite field of order 4. An additive code over F 4 or an additive F 4 -code of length n is an F 2 -additive subgroup of F 4 n .
Suppose ω F 4 such that ω 2 = ω + 1 . Then, F 4 = F 2 [ ω ] . Let T be the trace map T : F 4 F 2 defined as T ( x ) = x + x 2 . Let x , y F 4 n ; then, the trace inner product is < x , y > T = T ( x · y 2 ) = T ( i = 1 n x i · y i 2 ) .
For any additive F 4 -code C , the trace dual C T of C is defined as C T = { x F 4 n | < x , y > T = 0 for any y C } , and the trace hull Hull T ( C ) of C is defined by Hull T ( C ) = C C T .

2.2. Codes over Non-Unitary Rings

This section introduces the basic definitions and results related to the given three non-unitary rings and linear codes over these rings.
Denote R to be one of three rings: E , I , H . Each ring is defined by relations on two generators a and b. For all three rings, we write c = a + b .
A linear code C over R (or simply called an R -code) of length n is defined as a left R -submodule of R n .
We equip R n with the standard inner product x , y = i = 1 n x i y i , where x = ( x 1 , x 2 , , x n ) , y = ( y 1 , y 2 , , y n ) R n . Under this inner product, we define the following two duals of a linear R -code C of length n.
(1).
The right dual: The right dual of an R -code C is defined by
C R = { y R n | x , y = 0 , x C } .
(2).
The left dual: The left dual of an R -code C is defined by
C L = { y R n | y , x = 0 , x C } .
An R -code C of length n is said to be left-nice (resp. right nice) if | C | | C L | = 4 n (resp. | C | | C R | = 4 n ).
The two-sided dual code (or simply the dual code) of an R -code C , denoted by C and defined as C = C R C L . Therefore, a linear R -code C is said to be self-orthogonal if C C and self-dual if C = C .

2.2.1. The Ring E

The ring E is defined by
E = a , b | 2 a = 2 b = 0 , a 2 = a , b 2 = b , a b = a , b a = b .
This ring is non-commutative and non-unital ring of characteristic two. Thus, E is local with maximal ideal J = { 0 , c } .
Let α E be the map of reduction modulo the maximal ideal J defined as α E : E E / J F 2 with α E ( 0 ) = α E ( c ) = 0 and α E ( a ) = α E ( b ) = 1 .
By inspection, a c-adic decomposition of any element r E can be expressed as r = a r 1 + c r 1 , for unique scalars r 1 , r 2 F 2 .
Two codes over F 2 of length n can be associated canonically with the E -code C . The residue code res E ( C ) and the torsion code tor E ( C ) are defined as:
res E ( C ) = { α E ( x ) | x C } tor E ( C ) = { y F 2 n | c y C } .
Note that residue and torsion codes of C satisfy: res E ( C ) tor E ( C ) . An E -code C is said of type { k 1 , k 2 } if res E ( C ) has dimension k 1 and tor E ( C ) has dimension k 1 + k 2 . Thus, | C | = | res E ( C ) | | tor E ( C ) | = 2 2 k 1 × 2 k 2 . If k 2 = 0 , the code C is considered to be free. Equivalently, res E ( C ) = tor E ( C ) . For our further investigations, we recall from [25] the following results.
Theorem 1
([25], Theorem 7). For any linear code C over E , we have C = a res E ( C ) c tor E ( C ) .
Corollary 1
([25], Corollary 5). If C is a linear code over E of length n, C = a tor E ( C ) c res E ( C ) .

2.2.2. The Ring I

The ring I is defined by
I = a , b | 2 a = 2 b = 0 , a 2 = b , a b = 0 .
Thus, I consists of the elements { 0 , a , b , c } . Moreover, this ring is commutative non-unitary ring of characteristic two. Thus, I is a local ring with maximal ideal m = { 0 , b } and each element of I can be written uniquely as a u + b v , where u, v F 2 .
Let α I be the map of reduction modulo the maximal ideal m defined as α I : I I / m F 2 with α I ( 0 ) = α I ( b ) = 0 and α I ( a ) = α I ( c ) = 1 . This mapping can be extended naturally from I n to F 2 n .
Two codes over F 2 of length n can be associated canonically with the I -code C . The residue code res I ( C ) and the torsion code tor I ( C ) are defined as:
res I ( C ) = { α I ( x ) | x C } , tor I ( C ) = { y F 2 n | b y C } .
Note that res I ( C ) tor I ( C ) and | C | = | res I ( C ) | | tor I ( C ) | = 2 2 k 1 + k 2 , where k 1 is the dimension of res I ( C ) and the dimension of tor I ( C ) is k 1 + k 2 . In this case, we say that C is of type { k 1 , k 2 } . If k 1 = 0 , then C is regarded as a free code, and res I ( C ) = tor I ( C ) .
Theorem 2
([25], Theorem 4). If C is a linear I -code of length n, then C = a res I ( C ) b F 2 n

2.2.3. The Ring H

Define the ring H as
H = a , b | 2 a = 2 b = 0 , a 2 = 0 , b 2 = b , a b = 0 .
H a commutative ring of characteristic 2 and has no identity element for multiplication. Moreover, it is a semi-local ring with two maximal ideals m a = { 0 , a } and m b = { 0 , b } .
Let α a : H F 2 be the map of reduction modulo m a , and α b : H F 2 be the map of reduction modulo m b . These maps are defined, respectively, as
α b ( 0 ) = α b ( b ) = 0 , α b ( a ) = α b ( c ) = 1 ,   and   α a ( 0 ) = α a ( a ) = 0 , α a ( b ) = α a ( c ) = 1 .
Two codes over F 2 of length n can be associated canonically with the H -code C .
  • The code C a is defined as C a : = α b ( C ) and the code C b defined as C b : = α a ( C ) . With this, C can be written as C = a C a b C b . Assume k a = dim ( C a ) and k b = dim ( C b ) .
The following theorem will be used in the later sections.
Theorem 3
([25], Theorem 22). For an H -code C = a C a b C b of length n, we have C = a F 2 n b C b .

3. Hulls of Codes over Non-Unitary Rings

This section investigates the hulls of linear codes and the hulls of their duals over the considered non-unitary rings. Moreover, their structures were determined and expressed in terms of their binary associated codes.
Definition 1.
For any linear R -code C , the left hull Hull L ( C ) (respectively, the right hull Hull R ( C ) ) of C is defined by Hull L ( C ) : = C C L (respectively, Hull R ( C ) : = C C R ).
  • Note that, if C is a linear R -code, then its left and right hull codes are also linear.
Definition 2.
The two-sided hull (or simply, the hull) code of a linear R -code C is defined as Hull ( C ) = C C .

3.1. The Hulls of E -Codes

3.1.1. Left and Right Hulls of E -Codes

We shall investigate the right-hull and left-hull for an E -code in the subsequent results.
Theorem 4.
Let C be a linear code of length n over E , then
1.
Hull L ( C ) = a Hull ( res E ( C ) ) c Hull res E ( C ) ( tor E ( C ) ) .
2.
Hull R ( C ) = a Hull tor E ( C ) ( res E ( C ) ) c tor E ( C ) .
Proof. 
For statement ( 1 ) . By Definition 4 and Theorem 9 of [25], we have
res E ( Hull L ( C ) ) = res E ( C C L ) = res E ( C ) res E ( C ) = Hull ( res E ( C ) ) .
And,
tor E ( Hull L ( C ) ) = tor E ( C C L ) = tor E ( C ) r e s E ( C ) = Hull res E ( C ) ( tor E ( C ) ) .
Moreover,
res E ( Hull R ( C ) ) = res E ( C C R ) = res E ( C ) tor E ( C ) = Hull tor E ( C ) ( res E ( C ) ) .
Also,
tor E ( Hull L ( C ) ) = tor E ( C C L ) = tor E ( C ) F 2 n = tor E ( C ) .
Hence, the expected results follow. □
Hereafter, suppose s = dim ( Hull tor E ( C ) ( res E ( C ) ) ) and t = dim ( H u l l ( res E ( C ) ) ) .
Corollary 2.
If C is an E -code of length n, then
| Hull R ( C ) | = 2 s + k 1 + k 2 and | Hull L ( C ) | = 2 s + t + k 2 .
Proof. 
The desired result follows immediately from Theorem 4. □
Theorem 5.
If C is an E -code, then the following two statements hold.
1.
Hull ( res E ( C ) ) Hull res E ( C ) ( tor E ( C ) ) . Furthermore, the equality holds if C is free.
2.
Hull tor E ( C ) ( res E ( C ) ) tor E ( C ) .
Proof. 
For the first statement, we have C L which is also linear over E . This implies that res E ( Hull L ( C ) ) tor E ( Hull L ( C ) ) . From the Statement 1 of Theorem 4, we have Hull ( res E ( C ) ) Hull res E ( C ) ( tor E ( C ) ) . Therefore, if C is free, then res E ( C ) = tor E ( C ) . Thus, Hull res E ( C ) ( tor E ( C ) ) = tor E ( C ) res E ( C ) = res E res E ( C ) = Hull ( res E ( C ) ) .
The second statement follows immediately from the linearity of C R over E and Statement 2 of Theorem 4. □
Definition 3.
A linear E -code C is said to be left self-dual (left-SD) (respectively, right self-dual (right-SD)) if C = C L (respectively, C = C R ).
Definition 4.
A left-nice E -code C is called left-LCD if Hull L ( C ) = 0 . Similarly, a right-nice E -code C is said to be right-LCD if it satisfies Hull R ( C ) = 0 .
  • Note that an E -code C is said to be left-SD if Hull L ( C ) = C = C L , and right-SD if Hull R ( C ) = C = C R . Therefore, if Hull L ( C ) = { 0 } , then C is said to be left-LCD. Similarly C is right-LCD if Hull R ( C ) = { 0 } .
Using the properties of left and right hull codes, we study left-SD, right-SD, right-LCD and left-LCD codes over E .
Lemma 1.
Let C be a linear code over E , then
(i).
C is left-SD if and only if tor E ( C ) = res E ( C ) = res E ( C ) .
(ii).
C is right-SD if and only if res E ( C ) = { 0 } and tor E ( C ) = F 2 n .
Proof. 
By previous definition and Theorems 1 and 4, Corollary 1, we have C is left-SD if and only if Hull L ( C ) = C and Hull L ( C ) = C L if and only if Hull ( res E ( C ) ) ) = res E ( C ) = res E ( C ) and Hull res E ( tor E ( C ) ) = tor E ( C ) = res E ( C ) . Equivalently, tor E ( C ) = res E ( C ) = res E ( C ) . This completes the proof of statement ( i ) .
On the other hand, C is right-SD if and only if Hull R ( C ) = C and Hull L ( C ) = C R if and only if H u l l tor E ( res E ( C ) ) = res E ( C ) = tor E ( C ) and tor E ( C ) = F 2 n . Equivalently, tor E ( C ) = F 2 n and res E ( C ) = { 0 } . Hence, the proof of statement ( i i ) is completed. □
Lemma 2.
Let C be a linear code over E of length n. Then, the following statements hold:
1. 
C is right-LCD if and only if C = 0 .
2. 
C is left-LCD if and only if C is free and Hull ( res E ( C ) ) = { 0 } .
Proof. 
Using Theorems 4 and 5, we have
C is right-LCD if and only if res E ( Hull R ( C ) ) = tor E ( Hull R ( C ) ) = { 0 } if and only if tor E ( C ) = Hull tor E ( C ) ( res E ( C ) ) = 0 . Equivalently, res E ( C ) = tor E ( C ) = 0 .
C is left-LCD if and only if res E ( Hull L ( C ) ) = tor E ( Hull L ( C ) ) = { 0 } if and only if Hull ( res E ( C ) ) = Hull res E ( C ) ( tor E ( C ) ) = 0 . Equivalently, Hull ( res E ( C ) ) = 0 and C is free (by Theorem 5). □

3.1.2. The Two-Sided Hull of E -Codes

Based on the properties of the associated codes of E -codes, we determine the hull codes over E in the following theorem.
Theorem 6.
If C is a linear E -code, then
Hull ( C ) = a Hull tor E ( C ) ( res E ( C ) ) c Hull res E ( C ) ( tor E ( C ) ) .
Proof. 
Since C and C are linear E -codes, Hull ( C ) is also a linear over E . By Theorem 1, we have Hull ( C ) = a res E ( Hull ( C ) c tor E ( Hull ( C ) ) . Therefore,
res E ( Hull ( C ) ) = res E ( C C ) = res E ( C ) res E ( C ) = res E ( C ) tor E ( C ) = Hull tor E ( C ) ( res E ( C ) ) .
And,
tor E ( Hull ( C ) ) = tor E ( C C ) = tor E ( C ) tor E ( C ) = tor E ( C ) res E ( C ) = Hull res E ( C ) ( tor E ( C ) ) .
Consequently, these achieve the desired outcome. □
Corollary 3.
If C is an E -code, then
Hull ( C ) = Hull L ( C ) H u l l R ( C ) .
Proof. 
By Theorem 4, we have
res E ( Hull L ( C ) H u l l R ( C ) ) = res E ( Hull L ( C ) ) res E ( Hull R ( C ) = Hull ( res E ( C ) Hull tor E ( C ) ( res E ( C ) )
= res E ( C ) res E ( C ) tor E ( C ) = res E ( C ) tor E ( C ) .
The last equality follows from res E ( C ) tor E ( C ) . Therefore,
tor E ( Hull L ( C ) H u l l R ( C ) ) = tor E ( Hull L ( C ) ) tor E ( Hull R ( C ) = Hull res E ( C ) ( tor E ( C ) ) tor E ( C )
= tor E ( C ) res E ( C ) tor E ( C ) = tor E ( C ) res E ( C ) .
By combining these results with Theorem 7 in [25], the desired result follows. □
Theorem 7.
If C is a linear code over E , then
Hull tor E ( C ) ( res E ( C ) ) Hull ( res E ( C ) ) Hull res E ( C ) ( tor E ( C ) ) .
Furthermore, equality holds when the code C is free.
Proof. 
To prove the first inclusion, we have tor E ( C ) res E ( C ) . Therefore, res E ( C ) tor E ( C ) res E ( C ) res E ( C ) . Thus, Hull tor E ( C ) ( res E ( C ) = res E ( C ) tor E ( C ) Hull ( res E ( C ) ) = res E ( C ) res E ( C ) .
Statement 1 of Theorem 5 establishes the second inclusion, that is Hull ( res E ( C ) ) Hull res E ( C ) ( tor E ( C ) ) . Hence, Hull tor E ( C ) ( res E ( C ) ) Hull ( res E ( C ) ) Hull res E ( C ) ( tor E ( C ) ) .
If C is free, then res E ( C ) = tor E ( C ) . So, res E ( C ) = tor E ( C ) . Consequently, Hull tor E ( C ) ( res E ( C ) = Hull res E ( C ) ( res E ( C ) and Hull res E ( C ) ( tor E ( C ) = Hull res E ( C ) ( res E ( C ) . These together with Hull res E ( C ) ( res E ( C ) = Hull ( res E ( C ) ) yield the desired result. □
Proposition 2.
Let C be a linear code over E of length n and type { k 1 , k 2 } , then dim ( tor E ( Hull ( C ) ) = s + k 2 .
Proof. 
By Proposition 1, we have
dim ( res E ( C ) ) dim ( Hull tor E ( C ) ( res E ( C ) ) ) = dim ( tor E ( C ) ) dim ( Hull res E ( C ) ( tor E ( C ) ) ) . Since dim ( res E ( C ) ) = k 1 , dim ( tor E ( C ) ) = k 1 + k 2 and dim ( Hull tor E ( C ) ( res E ( C ) ) ) = s , we get
k 1 s = k 1 + k 2 dim ( Hull res E ( C ) ( tor E ( C ) ) ) .
Hence, dim ( tor E ( Hull ( C ) ) = dim ( Hull res E ( C ) ( tor E ( C ) ) ) = s + k 2 . Therefore, the proof is completed. □
Corollary 4.
If C is a linear code over E of type { k 1 , k 2 } , then Hull ( C ) is of type { s , k 2 } .
Proof. 
The proof follows by applying from definition of the type of a linear E -code, Theorem 6 and Proposition 2. □
Proposition 3.
If C is a linear code over E of length n and type { k 1 , k 2 } , then | Hull ( C ) | = 2 k 2 + 2 s .
Proof. 
From Theorem 6, we have
| Hull ( C ) | = | Hull tor E ( C ) ( res E ( C ) ) | | Hull res E ( C ) ( tor E ( C ) ) | = 2 s × 2 s + k 2 .
Hence, the proof is completed. □
Next, we determine the conditions for E -code to be self-orthogonal, self-dual or LCD by analyzing the properties of its hull code.
Lemma 3.
Let C be a linear code over E . Then, C is self-orthogonal code over E if and only if res E ( C ) is a binary self-orthogonal code and tor E ( C ) res ( C ) .
Proof. 
By definition, C is self-orthogonal over E if and only if Hull ( C ) = C , if and only if res E ( Hull ( C ) ) = res E ( C ) and tor E ( Hull ( C ) ) = tor E ( C ) . By Theorem 1 and Corollary 1, this is equivalent to H u l l tor E ( C ) ( res E ( C ) ) res E ( C ) and H u l l res E ( C ) ( tor E ( C ) ) = tor E ( C ) . Equivalently, tor E ( C ) ) res E ( C ) and res E ( C ) tor E ( C ) res E ( C ) . Hence, Hull ( C ) = C if and only if tor E ( C ) ) res E ( C ) and res E ( C ) is a binary self-orthogonal code. □
Lemma 4.
Let C be a linear code over E . Then, C is self-dual if and only if tor E ( C ) = res E ( C ) .
Proof. 
By Corollary 1, Theorems 1 and 6, we have
C is self-dual if and only if Hull ( C ) = C and Hull ( C ) = C if and only if res E ( Hull ( C ) ) = res E ( C ) = res E ( C ) and tor E ( Hull ( C ) ) = tor E ( C ) = tor E ( C ) .
This equivalent to Hull tor E ( C ) ( res E ( C ) ) = res E ( C ) , Hull tor E ( C ) ( res E ( C ) ) = tor E ( C ) and Hull res E ( C ) ( tor E ( C ) ) = tor E ( C ) , Hull res E ( C ) ( tor E ( C ) ) = res E ( C ) . Equivalently, tor E ( C ) = res E ( C ) . □
Lemma 5.
Let C = a res E ( C ) c tor E ( C ) be an E -code of length n. Then, C is LCD if and only if it is free and Hull ( res E ( C ) ) = 0 .
Proof. 
C is an LCD E -code if and only if Hull ( C ) = { 0 } . By Theorem 6, this is equivalent to Hull tor E ( C ) ( res E ( C ) ) = Hull res E ( C ) ( tor E ( C ) ) = 0 . Theorem 7 and Corollary 4 imply that k 2 = 0 and Hull ( res E ( C ) ) = { 0 } . Therefore, the proof is completed. □
Through the subsequent example, we show that the freeness condition in Lemma 5 is essential.
Example 1.
Let C be an E -code of length 3 and type 1 , 1 defined as
C = 000 , a a 0 , b b 0 , b a 0 , a b 0 , c 00 , 0 c 0 , c c 0 .
Therefore,
res E ( C ) = 000 , 110 and tor E ( C ) = 000 , 100 , 010 , 110 .
And,
res E ( C ) = 000 , 110 and tor E ( C ) = 000 , 001 .
Therefore,
H u l l tor E ( C ) ( res E ( C ) ) = 0 and Hull t o r E ( C ) ( res E ( C ) ) = 000 , 110 .
By Theorem 6, we have Hull ( C ) = 000 , c c 0 , proving that C is not LCD. However, H u l l tor E ( C ) ( res E ( C ) ) = 0 . Note that C is not a free code.
Corollary 5.
LCD codes over E are always free.
Proof. 
The result follows immediately from Lemma 5. □
For any linear code over a finite field, its hull coincides with the hull of its dual. The following proposition shows that this property also holds for codes over E . However, in general this does not hold for codes over I and H .
Proposition 4.
Any linear E -code C satisfies
Hull ( C ) = Hull ( C ) .
Proof. 
By Definition 3 and Corollary 9 in [25], we have
Hull ( C ) = C ( C ) = C C = Hull ( C ) .
This completes the proof. □
Define the map λ E from E to F 4 by λ E ( 0 ) = 0 , λ E ( a ) = ω , λ E ( b ) = ω 2 , and λ E ( c ) = 1 .
The map λ E can be extended naturally to a map from E n to F 4 n . Moreover, to every E -code C of length n, there is an additive F 4 -code λ E ( C ) .
Theorem 8.
Let C be a linear code over E . Then,
λ E ( Hull ( C ) ) = Hull T ( λ E ( C ) ) .
Proof. 
By applying λ E on Hull ( C ) , we get λ E ( Hull ( C ) ) = λ E ( C C ) = λ E ( C ) λ E ( C ) . By Theorem 12 of [25], we have λ E ( C ) = λ E ( C ) T . This implies that λ E ( Hull ( C ) ) = λ E ( C ) λ E ( C ) T . Hence, λ E ( Hull ( C ) ) = Hull T ( λ E ( C ) ) . □
Now, we state the following theorem which relates the number of linear codes over E with hulls of a given size to the number of additive codes over F 4 with trace hulls of specific cardinality.
Theorem 9.
The number of linear codes over E where Hull ( C ) has cardinality 2 k 2 + 2 s is equal to the number of additive codes λ E ( C ) over F 4 where Hull T ( λ E ( C ) ) has size 2 k 2 + 2 s .
Proof. 
This is a direct consequence of Theorem 8. □

3.2. The Hull of I -Codes

In the following result, we characterize the residue and torsion codes of the hulls of an I -code and its dual, thereby establishing their cardinalities.
Theorem 10.
If C is a linear I -code, then the associated codes of Hull ( C ) are given by:
res I ( Hull ( C ) ) = Hull ( res I ( C ) ) and tor I ( Hull ( C ) ) = tor I ( C ) .
Proof. 
By applying the definition of the residue and torsion codes of C and Theorem 2, we have
res I ( Hull ( C ) ) = res I ( C ) res I ( C ) = res I ( C ) res I ( C ) = Hull ( res I ( C ) ) .
And,
tor I ( Hull ( C ) ) = tor I ( C ) tor I ( C ) = tor I ( C ) F 2 n = tor I ( C ) .
Hence, the proof is derived. □
Proposition 5.
Let C be an I -code C of type { k 1 , k 2 } and l = dim ( Hull ( res I ( C ) ) ) , then Hull ( C ) has cardinality 2 l × 2 k 1 + k 2 .
Proof. 
Since C is a linear I -code, Hull ( C ) is also linear over I , therefore
| Hull ( C ) | = | res I ( Hull ( C ) ) | × | tor I ( Hull ( C ) ) | = | Hull ( res I ( C ) ) | × | tor I ( C ) | = 2 l × 2 k 1 + k 2 .
This completes the proof. □
Next, we characterize the residue and torsion codes for the hull of the dual of an I -code.
Theorem 11.
Let C be a linear code over I of length n; then, the associated codes of Hull ( C ) are
res I ( Hull ( C ) ) = Hull ( res I ( C ) ) and tor I ( Hull ( C ) ) = F 2 n .
Proof. 
Note that Hull ( C ) = C ( C ) . By Theorem 3 of [25], res I ( ( C ) ) = ( res I ( C ) ) = ( res I ( C ) ) = res I ( C ) and tor I ( ( C ) ) = F 2 n . Furthermore,
res I ( Hull ( C ) ) = res I ( C ) res I ( ( C ) ) = ( res I ( C ) ) res I ( C ) = Hull ( res I ( C ) ) .
And,
tor I ( Hull ( C ) ) = tor I ( C ) tor I ( ( C ) ) = F 2 n F 2 n = F 2 n .
Theorem 12.
Let C be a linear code over I of length n, then
Hull ( C ) = a Hull ( res I ( C ) ) b F 2 n .
Proof. 
Let x Hull ( C ) ; then, by Theorem 1 of [25], x = a u + b v where u res I ( Hull ( C ) ) and v F 2 n . By Theorem 11, we have res I ( Hull ( C ) ) = Hull ( res I ( C ) ) . This yields u res I ( Hull ( C ) ) . Consequently, x a Hull ( res I ( C ) ) + b F 2 n . This proves that Hull ( C ) a Hull ( res I ( C ) ) b F 2 n .
Furthermore, | Hull ( C ) | = | res I ( Hull ( C ) ) | × | tor I ( Hull ( C ) ) | = | Hull ( res I ( C ) ) | × | F 2 n | , the last equality follows from Theorem 11. Hence, Hull ( C ) = a Hull ( res I ( C ) ) b F 2 n . □
It is evident that, for a linear code C over finite fields or the ring E , we have Hull ( C ) = Hull ( C ) . However, this property does not generalize to codes over I as shown in the example bellow.
Example 2.
Let C be the linear I -code of length 2 defined by C = { 00 , a a , b b , c c } . Then, C = C = { 00 , a a , 0 b , b 0 , b b , a c , c a , c c } .
Therefore, Hull ( C ) = C and Hull ( C ) = C . This proves that Hull ( C ) Hull ( C ) .
Theorem 13.
If C is an I -code of length n, then Hull ( C ) Hull ( C ) . Furthermore, equality holds if tor I ( C ) = F 2 n .
Proof. 
Let x Hull ( C ) , then by Theorem 1 of [25], x = a u + b v where u res I ( Hull ( C ) ) and v F 2 n . By Theorem 10, we have res I ( Hull ( C ) ) = Hull ( res I ( C ) ) . This implies that x a Hull ( res I ( C ) ) + b F 2 n = Hull ( C ) (by Theorem 12). Thus, x Hull ( C ) . Hence, Hull ( C ) Hull ( C ) .
Furthermore, if tor I ( C ) = F 2 n , then by Theorems 10 and 11, tor I ( Hull ( C ) ) = tor I ( Hull ( C ) ) . Consequently,
| Hull ( C ) | = | Hull ( res I ( C ) ) | × | F 2 n | = | res I ( Hull ( C ) ) | × | tor I ( Hull ( C ) ) | = | Hull ( C ) | .
We conclude that Hull ( C ) = Hull ( C ) . □
In the following results, we establish self-orthogonal, LCD and self-dual codes over I via their hull codes.
Lemma 6.
A linear I -code C is self-orthogonal if and only if res I ( C ) is a binary self-orthogonal code.
Proof. 
By the definition of self-orthogonal code over I and Theorem 10, we have
C is self-orthogonal if and only if Hull ( C ) = C if and only if res I ( Hull ( C ) ) = res I ( C ) and tor I ( Hull ( C ) ) = tor I ( C ) if and only if Hull ( res I ( C ) ) = res I ( C ) . Equivalently, res I ( C ) is a binary self-orthogonal code. □
Lemma 7.
Let C be a linear code of length n over I . Then, C is self-dual if and only if res I ( C ) is a binary self-dual code and tor E ( C ) = F 2 n .
Proof. 
From the definition of self-dual code over I , Theorems 2 and 10, we have
C is self-dual if and only if Hull ( C ) = C = C if and only if res I ( Hull ( C ) ) = res I ( C ) , res I ( Hull ( C ) ) = res I ( C ) and tor I ( ( Hull ( C ) ) ) = tor I ( C ) , tor I ( ( Hull ( C ) ) ) = tor I ( C ) if and only if Hull ( res I ( C ) ) = res I ( C ) = res I ( C ) and tor I ( C ) = F 2 n . Hence, the desired result follows. □
Lemma 8.
An I -code C is LCD over I if and only if C is the zero code.
Proof. 
The code C is LCD if and only if Hull ( C ) = { 0 } . Equivalently, res I ( Hull ( C ) ) = tor I ( Hull ( C ) ) = { 0 } . Since tor I ( C ) res I ( C ) and by Theorem 10, this equivalent to res I ( C ) = tor I ( C ) = 0 . □
Define the map λ I from I to F 4 as follows
λ I ( 0 ) = 0 , λ I ( a ) = ω , λ I ( b ) = 1 and λ I ( c ) = ω 2 .
This map can be extended naturally to a map from I n to F 4 n . Moreover, to every I -code C of length n, there is an additive F 4 -code λ I ( C ) .
We note that Theorem 8 cannot be generalized to codes over I , as the next example illustrates.
Example 3.
Let C be the linear code C of length 2 over I defined by C = { 00 , a a , b 0 , 0 b , b b , a c , c a , c c } . Then, C = C , λ I ( C ) = { 00 , 10 , 01 , 11 , w w , w w 2 , w 2 w , w 2 w 2 } and λ I ( C ) T = { 00 , 0 w } . Therefore, λ I ( Hull ( C ) ) = λ I ( C ) and Hull T ( λ I ( C ) ) = λ I ( C ) λ I ( C ) T = { 00 , 0 w } . It is easy to see that λ I ( Hull ( C ) ) Hull T ( λ I ( C ) ) .
From our previous study, one can see that if R { E , I } and C is a linear R -code of type { k 1 , k 2 } , then Hull ( C ) has type { t 1 , t 2 } , where t 1 = s , t 2 = k 2 if R = E and t 1 = l , t 2 = k 1 + k 2 l if R = I .
Let C be an E -code; then, Hull ( C ) C always implies t i k i . But this is not true for codes over I . For example, let C be the linear I -code of length 2 and type { 1 , 1 } with generator matrix G = a b 0 b . Then, res I ( C ) = { 00 , 10 } and tor I ( C ) = { 00 , 01 , 10 , 11 } . Thus, by Theorem 10, res I ( Hull ( C ) ) = Hull ( res I ( C ) ) = { 0 } and tor I ( Hull ( C ) ) = tor I ( C ) . Consequently, C has type { 1 , 1 } and Hull ( C ) has type { 0 , 2 } . We note that t 2 = 2 and k 2 = 1 and 2 1 .

3.3. The Hull of H -Codes

In what follows, we determine the hull of H -codes and their dual.
Theorem 14.
Let C = a C a b C b be an H -code of length n, then
Hull ( C ) = a C a b Hull ( C b ) .
Moreover, | Hull ( C ) | = 2 k a + dim ( Hull ( C b ) ) .
Proof. 
Since Hull ( C ) is a linear H -code, then we have
α a ( H u l l ( C ) ) = α a ( C C ) = α a ( C ) α a ( C ) = C b C b = Hull ( C b ) .
And,
α b ( H u l l ( C ) ) = α b ( C C ) = α b ( C ) α b ( C ) = α b ( C ) F 2 n = C a F 2 n = C a .
Furthermore, since Hull ( C ) is a linear H -code, then Hull ( C ) = a α b ( Hull ( C ) ) b α a ( Hull ( C ) ) = a C a + b Hull ( C b ) .
Theorem 15.
For any H -code C = a C a b C b of length n, we have
Hull ( C ) = a F 2 n b Hull ( C b ) .
Proof. 
By Theorem 3, we have α a ( ( C ) ) = ( α a ( C ) ) = ( ( α a ( C ) ) ) = ( C b ) = C b and α b ( ( C ) ) = F 2 n .
Using a similar procedure to the proof of Theorem 14, we obtain
α a ( Hull ( C ) ) = α a ( C ( C ) ) = α a ( C ) α a ( ( C ) ) = C b C b = Hull ( C b ) .
Also,
α b ( Hull ( C ) ) = α b ( C ( C ) ) = α b ( C ) α b ( ( C ) ) = F 2 n F 2 n = F 2 n .
Therefore, Hull ( C ) = a α b ( Hull ( C ) ) b α a ( Hull ( C ) ) = a F 2 n b Hull ( C b ) . Hence, the result is derived. □
The following example illustrates that the hull of an H -code and the hull of its dual are not generally equal.
Example 4.
Let C = a C a b C b be an H -code of length 3, where C a and C b are the binary codes generated by the following matrices, respectively.
G a = 1 1 0 G b = 1 0 1 0 1 1
Therefore, C can be written as C = { 000 , a a 0 , b 0 b , 0 b b , b b 0 , c a b , a c b , c c 0 } and by Theorem 3, we have C = a F 2 3 { b b b , c b b , b c b , b b c , c c b , b c c , c b c , c c c } , and C = a F 2 3 D where, D = { b 0 b , 0 b b , b b 0 , b b a , a b b , b a b , 0 c c , c 0 c , c c 0 , c a b , a c b , c b 0 , b c 0 , b c a , c b a , c c a , 0 c b , 0 b c , a b c , a c c , c 0 b , b 0 c , b a c , c a c } . Furthermore, Hull ( C ) = { 000 , a a 0 } and Hull ( C ) = a F 2 3 . This proves that Hull ( C ) H u l l ( C ) .
Theorem 16.
Let C be an H -code of length n, then Hull ( C ) Hull ( C ) . Furthermore, equality holds if C a = F 2 n .
Proof. 
Since C a F 2 n , then by Theorems 3 and 15, we have Hull ( C ) Hull ( C ) . Therefore, the equality holds if C a = F 2 n . □
Next, we investigate self-orthogonal, LCD, and self-dual codes over H through their hull codes.
Lemma 9.
For any linear H -code C of length n, we have C which is self-orthogonal over H if and only if the code C b is self-orthogonal.
Proof. 
By definition and Theorem 14, C is self-orthogonal if and only if Hull ( C ) = C . This is equivalent to α a ( Hull ( C ) ) = α a ( C ) and α b ( Hull ( C ) ) = α a ( C ) . Equivalently, Hull ( C b ) = C b . Hence, the proof is derived. □
Lemma 10.
Let C be a linear code over H , then C is an LCD code if and only if C a = 0 and Hull ( C b ) = { 0 } .
Proof. 
By definition and Theorems 14 and 15, we have C which is LCD if and only if Hull ( C ) = 0 if and only if α a ( Hull ( C ) ) = 0 and α b ( Hull ( C ) ) = 0 . Equivalently, C a = 0 and Hull ( C b ) = 0 . □
Lemma 11.
An H -code C is self-dual if and only if C a = F 2 n and C b is a binary self-dual code.
Proof. 
From the definition of self-dual codes over H , Theorems 3, 14 and 15, we have
C is self-dual if and only if Hull ( C ) = C and Hull ( C ) = C if and only if α a ( Hull ( C ) ) = α a ( C ) = α a ( C ) and α b ( Hull ( C ) ) = α b ( C ) = α b ( C ) . Equivalently, C a = F 2 n and Hull ( C b ) = C b = C b . Hence, the proof is completed. □
Consider the map λ H from H to F 4 , defined by
λ H ( 0 ) = 0 , λ H ( a ) = ω , λ H ( b ) = 1 and λ H ( c ) = ω 2 .
Thus, the map λ H can be extended naturally to a map from H n to F 4 n , and to each H -code C of length n, there is an additive F 4 -code λ H ( C ) .
It is noteworthy that Theorem 8 does not generalize to codes over H . A counterexample is given in the following.
Example 5.
Let C be the linear code C of length 2 where C = a C a + b C b = { 00 , a 0 , 0 b , a b } with C a = { 00 , 10 } and C b = { 00 , 10 } . Therefore, by Theorem 14 Hull ( C ) = a C a + b Hull ( C b ) = { 00 , a 0 } , so λ H ( Hull ( C ) ) = { 00 , w 0 } . Thus, Hull T ( λ H ( C ) ) = { 0001 } . Obviously, λ H ( Hull ( C ) ) Hull T ( λ H ( C ) ) .

4. Classification of R -Codes with Various Hull Sizes

One of the fundamental topics in coding theory is the classification of linear codes. Alahmadi et al. [21] established mass formulas for self-orthogonal and self-dual codes over the non-unitary rings E and I , and later classified quasi self-dual codes over H in [19]. In [23], the authors presented the classification of LCD codes over a finite non-unitary local ring of prime square order.
In this section, we establish the general mass formula for linear codes over the non-unitary ring I with various hull orders. Additionally, we provide a classification of linear codes over E with given left and right hull sizes, and over H with a given hull size, for short lengths. All computations were performed using MAGMA V2-29-4 [26].
An R -code C is permutation-equivalent to an R -code D if and only if there exists a coordinate permutation from C to D .
The mass formula of number of binary [ n , k ] -codes with k -dimensional hull is given in [14]. We recall it in the following theorem.
Theorem 17
([14], Theorem 2). Define A n , k , k as the number of binary [ n , k ] -codes with k -dimensional hull. Then,
A n , k , k = j = k k n 2 j k j 2 j k 2 ( 1 ) j k 2 j k 2 σ n , k .
where i j 2 is the 2-ary Gaussian binomial coefficient, n m is the usual binomial coefficient and σ n , k is the number of binary self-orthogonal [ n , k ] -codes.

4.1. Classification over E

Suppose dim ( H u l l ( res E ( C ) ) ) = t and dim ( Hull tor E ( C ) ( res E ( C ) ) ) = s . In this subsection we classify all permutation inequivalent non-trivial linear codes over the ring E of length at most 4 and type ( k 1 , k 2 ) with a left hull of size 2 t + t where t = s + k 2 and a right hull of size 2 s + k 1 + k 2 . Therefore, we list them in Table 1 and Table 2 for t + t 4 and s { 0 , 1 , 2 } . The number of these codes is denoted by Number E .
Example 6.
For n = 4 , { k 1 , k 2 } = { 1 , 1 } , s = 0 , and ( t , t ) = ( 1 , 2 ) .
There are exactly five inequivalent E -codes of type { 1 , 1 } with a right hull of size 4 generated by the following matrices:
a 0 0 0 c 0 0 0 0 c 0 0 , a a 0 0 c 0 c 0 0 c c 0 , a a a 0 c 0 c 0 0 c 0 0 , a a a a c 0 c c 0 c 0 0 , a a 0 0 c 0 0 0 0 c 0 0 .
The first four codes have an automorphism group of order two, while the fifth code has an automorphism group of order four.
On the other hand, there are three inequivalent E -codes with a left hull of size 8 generated by the matrices bellow:
a a 0 0 c c 0 0 0 0 c 0 , a a 0 0 c c 0 0 0 0 c c , a a a a c 0 0 c 0 c c 0 .
Here, the first two codes have an automorphism group of order four, whereas the third E -code has an automorphism group of order eight.

4.2. Classification over I

This subsection derives a mass formula for linear codes over I of given type and length with prescribed hull size. In the following theorem, we determine the number of I -codes with hull codes of given sizes.
Theorem 18.
Let N I l ( n , k 1 , k 2 ) denote the number of distinct I -codes of length n and type k 1 , k 2 , with a hull of size 2 l + k 1 + k 2 . Then, we have
N I l ( n , k 1 , k 2 ) = 2 k 1 ( n k 1 k 2 ) n k 1 k 2 2 A n , k 1 , l .
Proof. 
For any I -code C of type k 1 , k 2 and length n. Define a map F : res I ( C ) F 2 n / tor I ( C ) by: for each x res I ( C ) , F ( x ) = y F 2 n | a x + b y C . Obviously, C = { a x + b y | x res I ( C ) , y F ( x ) } . Then,
There are 2 k 1 ( n k 1 k 2 ) choices for the map F. The residue code is contained in n k 1 k 2 2 possible torsion codes. Proposition 5 implies that | Hull ( C ) | = 2 l + k 1 + k 2 . Therefore, by Theorem 17, there are A n , k 1 , l residue codes with l-dimensional hull.
  • Hence, the number of I -codes of length n and type k 1 , k 2 with a hull of cardinality 2 l + k 1 + k 2 is equal to the product of the previous three independent factors. □
The corollary bellow follows from the counting technique under the group action and Theorem 18.
Corollary 6.
For any given n , k 1 , k 2 with 0 k 1 , k 2 n , we have
C n ! | A u t ( C ) | = N I l ( n , k 1 , k 2 ) .
where A u t ( C ) is the automorphism group of C and C runs over distinct representatives of equivalence classes under a permutation action of I -codes of length n and type { k 1 , k 2 } , with a hull of size 2 l + k 1 + k 2 .
Example 7.
Let l = 2 and T be the set of inequivalent I -codes of length 4 and type 2 , 1 whose hull code has a size 2 5 . The generator matrices of these codes are given as follows:
{ a 0 a b 0 a 0 a 0 0 b 0 , a 0 a b 0 a 0 a 0 0 0 b , a 0 a b 0 a 0 a 0 0 b b , a 0 c 0 0 a b c 0 0 b 0 , a 0 c 0 0 a b c 0 0 0 b , a 0 a 0 0 a b c 0 0 b b , a 0 a b 0 a 0 c 0 0 b b } .
The I -codes generated by the first five codes have an automorphism group of order four, while those generated by the last two have an automorphism group of order eight. Therefore,
C T 4 ! | A u t ( C ) | = 5 ( 24 4 ) + 2 ( 24 8 ) = 36 .
From Theorem 18, we have
N I 2 ( 4 , 2 , 1 ) = 2 2 ( 4 2 1 ) × 4 2 1 2 × A 4 , 2 , 2 = 4 × 3 × 3 = 36 ,
this shows that there are seven I -codes of length 4 and type 2 , 1 , with a hull of size 2 5 , up to permutation equivalence.
Alahmadi et al. [21] determined the mass formulas for self-orthogonal codes over I . Next, we determine such number from the number of linear I -codes with prescribed hull size given in Theorem 18.
Proposition 6.
The number of self-orthogonal I -codes of length n and type { k 1 , k 2 } is equal to
2 k 1 ( n k 1 k 2 ) n k 1 k 2 2 σ n , k 1 .
Proof. 
By Lemma 6, an I -code is self-orthogonal if and only if its residue code is binary self-orthogonal. Thus, a binary self-orthogonal [ n , k 1 ] -code is an [ n , k 1 ] -code with k 1 -dimensional hull. By Theorem 17, A n , k 1 , k 1 = σ n , k 1 . Hence, the desired result follows immediately from Theorem 18 by taking l = k 1 . □
  • In Table 3, we classify all inequivalent non-zero I -codes with prescribed lengths and types, with a hull of size 2 l + k 1 + k 2 where 0 l 3 , under permutation equivalence. The number of such codes is denoted by N u m b e r I ( l ) .

4.3. Classification over H

To classify linear H -codes of order 2 k a + k b with hull codes of size 2 k a + m , we have to find all codes that are permutation equivalent to a C a + b C b for each pair ( C a , C b ) (with C b which is a m-dimensional hull).
Here, we write SDR for System of Distinct Representatives, where its elements are representative of subsets (the double cosets) in a set (the group S n ) partition. By applying Theorem 6 in [19] and Theorem 14, we have the following corollary, its proof left as an exercise.
Corollary 7.
Let T a be the set of all (permutation) inequivalent binary codes of length n and T b m be the set of all (permutation) inequivalent binary codes of length n with m-dimensional hull. Then, the set of all H -codes of length n and size 2 k a + k b with hull codes of order 2 k a + m is the disjoint union
C a T a C b T b m A C a , C b .
where A C a , C b : = { a C a + b σ ( C b ) | σ runs over an SDR of Aut ( C a ) S n / Aut ( C b ) } and Aut ( C a ) , Aut ( C b ) denote the permutation groups of C a and C b , respectively.
Based on Lemma 10 and Corollary 7, we have the classification algorithm for H -codes of length n and size 2 k a + k b with hull codes of cardinality 2 k a + m as follows:
  • Find a list of all inequivalent binary [ n , k a ] -codes and stored as T a .
  • Find a list of all inequivalent binary [ n , k b ] -codes with m-dimensional hull and stored as T b m .
  • For every pair ( C a , C b ) T a × T b m
    Compute the groups Aut ( C a ) and Aut ( C b ) .
    Find a list σ 1 , σ 2 , , σ r of representatives of Aut ( C a ) S n / Aut ( C b ) } .
    For i = 1 r , compute a C a + b σ i ( C b ) .
The number of codes in T a can be obtained from https://mathe2.uni-bayreuth.de/frib/codes/tables_6.html (20 December 2025) and the classification of codes in T b 0 and T b 1 are available in http://www.math.is.tohoku.ac.jp/~mharada/LCD2/ (25 December 2025) and https://ahu-coding.github.io/code3/ (10 December 2025), respectively.
Example 8.
For n = 3 , k a = 1 , k b = 2 and m = 1 , let S be the set of H -codes of length n having the following additive generator matrices:
S = a a 0 b 0 b 0 b 0 , a a 0 b 0 0 0 b b , a 0 0 b 0 b 0 b 0 , a 0 0 b b 0 0 0 b , a a a b 0 b 0 b 0 .
By Theorem 14, the hull of these codes have the following matrices, respectively:
a a 0 b 0 b , a a 0 0 b b , a 0 0 b 0 b , a 0 0 b b 0 , a a a b 0 b .
These show that the hull of each H -code in S has a size 4. Hence, there are exactly five inequivalent codes over H of length n and size 8 with a hull of size 4.
The classification of non-zero inequivalent H -codes of order 2 k a + k b with a hull of size 2 k a + m , where m { 0 , 1 } is summarized in Table 4. The number of such codes is denoted by N u m b e r H ( m ) .

5. Conclusions

In this manuscript, we studied the hulls of linear codes over R . We characterized these hulls in terms of their associated binary codes. Moreover, we established the hull of the dual codes over R . Also, we investigated both the left and right hulls of E -codes and determined their residue and torsion codes. Furthermore, we derived a mass formula of linear I -code with prescribed hull order. Thus, we classified linear codes with various hull sizes over the considered rings for short lengths under permutation equivalence. In future work, we plan to investigate the symplectic hull over these rings (see ref. [27]).) and extend the present study to other non-unitary rings appearing in Fine’s classification [28].

Author Contributions

Conceptualization, S.M.; methodology, S.M., P.S.; Software, S.M.; validation, S.M., P.S., A.A. and A.M.; investigation, S.M. and P.S.; resources, S.M., P.S. and A.A.; data curation, S.M.; writing—original draft preparation, S.M. writing—review and editing, S.M. and P.S; visualization, S.M., P.S., A.A. and A.M.; supervision, P.S. and A.A.; funding acquisition, A.A. All authors have read and agreed to the published version of the manuscript.

Funding

Funded by the Deanship of Scientific Research (DSR), King Abdulaziz University, Jeddah, Saudi Arabia under grant no. (KEP-Msc-10-130-41).

Data Availability Statement

The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding author.

Acknowledgments

This project was funded by the Deanship of Scientific Research (DSR), King Abdulaziz University, Jeddah, Saudi Arabia under grant no. (KEP-Msc-10-130-41). The authors, therefore, acknowledge with thanks DSR technical and financial support.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Assmus, E.F., Jr.; Key, J.D. Affine and projective planes. Discret. Math. 1990, 83, 161–187. [Google Scholar] [CrossRef] [Scilit]
  2. Leon, J.S. Permutation group algorithms based on partitions, I: Theory and algorithms. J. Symb. Comput. 1991, 12, 533–583. [Google Scholar] [CrossRef] [Scilit]
  3. Sendrier, N. Finding the permutation between equivalent linear codes: The support splitting algorithm. IEEE Trans. Inf. Theory 2000, 46, 1193–1203. [Google Scholar] [CrossRef] [Scilit]
  4. Bowen, G. Entanglement required in achieving entanglement-assisted channel capacities. Phys. Rev. A. 2002, 66, 052313-1–052313-8. [Google Scholar] [CrossRef] [Scilit]
  5. Brun, T.; Devetak, I.; Hsieh, M.H. Correcting quantum errors with entanglement. Science 2006, 314, 436–439. [Google Scholar] [CrossRef] [Scilit]
  6. Guenda, K.; Jitman, S.; Gulliver, T.A. Constructions of good entanglement-assisted quantum error correcting codes. Des. Codes Cryptogr. 2018, 86, 121–136. [Google Scholar] [CrossRef] [Scilit]
  7. Calderbank, A.R.; Rains, E.M.; Shor, P.; Sloane, N.J. Quantum error correction via codes over GF(4). IEEE Trans. Inf. Theory 1998, 44, 1369–1387. [Google Scholar] [CrossRef] [Scilit]
  8. Ketkar, A.; Klappenecker, A.; Kumar, S.; Sarvepalli, P.K. Nonbinary stabilizer codes over finite fields. IEEE Trans. Inf. Theory 2006, 52, 4892–4914. [Google Scholar] [CrossRef] [Scilit]
  9. Li, Y.; Zhu, S.; Martánez-Moro, E. The hull of two classical propagation rules and their applications. IEEE Trans. Inf. Theory 2023, 69, 6500–6511. [Google Scholar] [CrossRef] [Scilit]
  10. Pless, V. A classification of self-orthogonal codes over GF(2). Discret. Math. 1972, 3, 209–246. [Google Scholar] [CrossRef] [Scilit]
  11. Bouyukliev, I.; Bouyuklieva, S.; Gulliver, T.A.; Ostergard, P.R.J. Classification of optimal binary self-orthogonal codes. J. Combinat. Math. Combinat. Comput. 2006, 59, 33. [Google Scholar]
  12. Araya, M.; Harada, M. On the classification of linear complementary dual codes. Discret. Math. 2019, 342, 270–278. [Google Scholar] [CrossRef] [Scilit]
  13. Carlet, C.; Mesnager, S.; Tang, C.; Qi, Y. New characterization and parametrization of LCD codes. IEEE Trans. Inf. Theory 2019, 65, 39–49. [Google Scholar] [CrossRef] [Scilit]
  14. Sendrier, N. On the dimension of the hull. SIAM J. Discrete Math. 1997, 10, 282–293. [Google Scholar] [CrossRef] [Scilit]
  15. Li, S.; Shi, M. Characterization and classification of binary linear codes with various hull dimensions from an improved mass formula. IEEE Trans. Inf. Theory 2023, 70, 3357–3372. [Google Scholar] [CrossRef] [Scilit]
  16. Dougherty, S.T.; Saltürk, E. The number of codes over rings of order 4 containing a hull of given type. Adv. Math. Commun. 2025, 19, 11–35. [Google Scholar] [CrossRef] [Scilit]
  17. 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] [Scilit]
  18. Kim, J.L.; Roe, Y.G. Construction of quasi-self-dual codes over a commutative non-unital ring of order 4. Appl. Algebra Engrg. Comm. Comput. 2022, 353, 393–406. [Google Scholar] [CrossRef] [Scilit]
  19. Alahmadi, A.; Alkathiry, A.; Altassan, A.; Basaffar, W.; Bonnecaze, A.; Shoaib, H.; Solé, P. Type IV codes over a non-local non-unital ring. Proyecciones 2020, 39, 963–978. [Google Scholar] [CrossRef] [Scilit]
  20. Deb, S.; Kikani, I.; Gupta, M.K. On the classification of codes over non-unital ring of order 4. Discret. Math. Algorithms Appl. 2022, 16, 2350076. [Google Scholar] [CrossRef] [Scilit]
  21. Alahmadi, A.; Alshuhail, A.; Betty, R.A.; Galvez, L.; Solé, P. Mass formula for self-orthogonal and self-dual codes over non-unital rings of order four. Mathematics 2023, 11, 4736. [Google Scholar] [CrossRef] [Scilit]
  22. Shi, M.; Li, S.; Kim, J.L.; Solé, P. LCD and ACD codes over a noncommutative non-unital ring with four elements. Cryptogr. Commun. 2022, 14, 627–640. [Google Scholar] [CrossRef] [Scilit]
  23. Kushwaha, A.; Debnath, I.; Prakash, O. Classification of LCD and self-dual codes over a finite non-unital local ring. arXiv 2025, arXiv:2501.03016. [Google Scholar]
  24. Anderson, S.E.; Camps-Moreno, E.; López, H.H.; Matthews, G.L.; Ruano, D.; Soprunov, I. Relative hulls and quantum codes. IEEE Trans. Inf. Theory 2024, 70, 3190–3201. [Google Scholar] [CrossRef] [Scilit]
  25. 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] [Scilit]
  26. Bosma, W.; Cannon, J.; Playoust, C. The magma algebra system I: The user language. J. Symb. Comput. 1997, 24, 235–265. [Google Scholar] [CrossRef] [Scilit]
  27. Li, Y.; Zhu, S. On symplectic hulls of linear codes and related applications. J. Appl. Math. Comput. 2024, 70, 2603–2622. [Google Scholar] [CrossRef] [Scilit]
  28. Fine, B. Classification of finite rings of order p2. Math. Mag. 1993, 66, 248–252. [Google Scholar] [CrossRef] [Scilit]
Table 1. The number of inequivalent E -codes with a left hull of size 2 t + t .
Table 1. The number of inequivalent E -codes with a left hull of size 2 t + t .
n { k 1 , k 2 } ( t , t ) Number E Propertiesn { k 1 , k 2 } ( t , t ) Number E Properties
2 { 0 , 1 } ( 0 , 1 ) 2 4 { 1 , 1 } ( 1 , 2 ) 3
{ 0 , 2 } ( 0 , 2 ) 1 { 1 , 2 } ( 0 , 2 ) 3
{ 1 , 0 } ( 0 , 0 ) 1left-LCD ( 1 , 2 ) 3
( 1 , 1 ) 1 ( 1 , 3 ) 2
{ 2 , 0 } ( 0 , 0 ) 1left-LCD { 1 , 3 } ( 0 , 3 ) 2
3 { 1 , 0 } ( 0 , 0 ) 1left-LCD ( 1 , 3 ) 2
( 1 , 1 ) 1 { 2 , 0 } ( 0 , 0 ) 4left-LCD
{ 1 , 1 } ( 0 , 1 ) 2 ( 1 , 1 ) 1
( 1 , 1 ) 2 ( 2 , 2 ) 1
( 1 , 2 ) 1 { 2 , 1 } ( 0 , 1 ) 5
{ 1 , 2 } ( 0 , 2 ) 2 ( 1 , 1 ) 1
( 1 , 2 ) 2 ( 2 , 2 ) 2
{ 2 , 0 } ( 0 , 0 ) 2left-LCD { 2 , 2 } ( 0 , 2 ) 1
( 1 , 1 ) 1 ( 1 , 2 ) 1
( 2 , 2 ) 1
{ 2 , 1 } ( 0 , 1 ) 2 { 3 , 0 } ( 0 , 0 ) 2left-LCD
( 1 , 1 ) 1 ( 1 , 1 ) 2
4 { 1 , 0 } ( 0 , 0 ) 2left-LCD { 3 , 1 } ( 0 , 1 ) 2
{ 1 , 1 } ( 1 , 1 ) 3 ( 1 , 1 ) 2
Table 2. The number of inequivalent E -codes with a right hull of size 2 s + k 1 + k 2 .
Table 2. The number of inequivalent E -codes with a right hull of size 2 s + k 1 + k 2 .
n { k 1 , k 2 } s Number E Propertiesn { k 1 , k 2 } s Number E Properties
2 { 0 , 1 } 02 5 { 0 , 1 } 05
{ 0 , 2 } 01right-SD { 0 , 2 } 010
{ 1 , 0 } 02 { 0 , 3 } 010
{ 1 , 1 } 02 { 0 , 4 } 05
{ 2 , 0 } 01 { 0 , 5 } 01right-SD
3 { 0 , 1 } 03 { 1 , 0 } 03
{ 0 , 2 } 03 12
{ 0 , 3 } 01right-SD { 1 , 1 } 07
{ 1 , 0 } 02 14
{ 1 , 1 } 04 { 1 , 2 } 011
11 14
{ 1 , 2 } 03 { 1 , 3 } 012
{ 2 , 0 } 02 12
11
{ 2 , 1 } 03 { 1 , 4 } 05
4 { 0 , 1 } 04 { 2 , 0 } 05
{ 0 , 2 } 06 14
{ 0 , 3 } 04 { 2 , 1 } 012
{ 0 , 4 } 01right-SD 17
{ 1 , 0 } 02 21
12 { 2 , 2 } 016
{ 1 , 1 } 05 15
13 { 2 , 3 } 010
{ 1 , 2 } 07 { 3 , 0 } 05
13 14
{ 1 , 3 } 04 21
{ 2 , 0 } 04 { 3 , 1 } 010
11 12
{ 2 , 1 } 06 { 3 , 2 } 010
{ 2 , 2 } 05 { 4 , 0 } 02
{ 3 , 0 } 02 12
12 { 4 , 0 } 02
{ 3 , 1 } 04 12
{ 4 , 1 } 04
Table 3. The number of inequivalent I -codes with a hull of size 2 l + k 1 + k 2 .
Table 3. The number of inequivalent I -codes with a hull of size 2 l + k 1 + k 2 .
n { k 1 , k 2 } Number I ( 0 ) Propertiesn { k 1 , k 2 } Number I ( 1 ) Propertiesn { k 1 , k 2 } Number I ( 2 ) Properties
2 { 0 , 1 } 2SO [21]2 { 1 , 0 } 2QSD [21]4 { 2 , 0 } 10SO [21]
{ 0 , 2 } 1QSD [21] { 1 , 1 } 1SD [21] { 2 , 1 } 7SO
{ 1 , 0 } 2 3 { 1 , 0 } 4SO [21] { 2 , 2 } 1SD [21]
{ 1 , 1 } 1 { 1 , 1 } 6QSD [21]5 { 2 , 0 } 36SO [21]
{ 2 , 0 } 1 { 1 , 2 } 1SO [21] { 2 , 1 } 62SO [21]
3 { 0 , 1 } 3SO [21] { 2 , 0 } 4 { 2 , 2 } 17SO [21]
{ 0 , 2 } 3SO [21] { 2 , 1 } 1 { 2 , 3 } 1SO [21]
{ 0 , 3 } 1QSD [21]4 { 1 , 0 } 9SO [21] { 3 , 0 } 36
{ 1 , 0 } 5 { 2 , 0 } 16 { 3 , 1 } 14
{ 1 , 1 } 6 { 3 , 0 } 9 { 3 , 2 } 1
{ 1 , 2 } 2 { 1 , 1 } 23SO [21]6 { 2 , 0 } 154SO
{ 2 , 0 } 5 { 1 , 2 } 14QSD [21] { 2 , 1 } 470SO
{ 2 , 1 } 2 { 1 , 3 } 2SO [21] { 2 , 2 } 317QSD
{ 3 , 0 } 1 { 2 , 1 } 12 { 2 , 3 } 57SO
4 { 0 , 1 } 4SO [21] { 2 , 2 } 1 { 2 , 4 } 3SO
( 0 , 2 ) 6SO [21] { 3 , 1 } 2 { 3 , 0 } 310
{ 0 , 3 } 4SO [21] { 3 , 1 } 273
{ 0 , 4 } 1SO [21] { 3 , 2 } 42
{ 1 , 0 } 8 { 3 , 3 } 2
{ 1 , 1 } 18 { 4 , 0 } 154
{ 1 , 2 } 12 { 4 , 1 } 46
{ 1 , 3 } 2 { 4 , 2 } 3
{ 2 , 0 } 24
{ 2 , 1 } 22
{ 2 , 2 } 4
{ 3 , 0 } 10
{ 3 , 1 } 2
{ 4 , 0 } 1
Table 4. The number of inequivalent H -codes of size 2 k a + k b with a hull of size 2 k a + m .
Table 4. The number of inequivalent H -codes of size 2 k a + k b with a hull of size 2 k a + m .
n ( k b , k b ) | T a | | T b 0 | Number H ( 0 ) Propertiesn ( k b , k b ) | T a | | T b 1 | Number H ( 1 ) Properties
2 ( 0 , 1 ) 111LCD2 ( 0 , 1 ) 111SO
( 0 , 2 ) 111LCD ( 1 , 1 ) 212QSD [19]
( 1 , 0 ) 212SO ( 2 , 1 ) 111SD
( 1 , 1 ) 213 3 ( 0 , 1 ) 111SO
( 1 , 2 ) 212 ( 0 , 2 ) 111
( 2 , 0 ) 111QSD ( 1 , 1 ) 315SO
( 2 , 1 ) 111 ( 1 , 2 ) 315
( 2 , 2 ) 111 ( 2 , 1 ) 315QSD [19]
3 ( 0 , 1 ) 122LCD ( 2 , 2 ) 315
( 0 , 2 ) 122LCD ( 3 , 1 ) 111SO
( 0 , 3 ) 111LCD ( 3 , 2 ) 111
( 1 , 0 ) 313SO4 ( 0 , 1 ) 122SO
( 1 , 1 ) 328 ( 0 , 2 ) 111
( 1 , 2 ) 328 ( 0 , 3 ) 122
( 1 , 3 ) 313 ( 1 , 1 ) 4212SO
( 2 , 0 ) 313SO ( 1 , 2 ) 4111
( 2 , 1 ) 328 ( 1 , 3 ) 4212
( 2 , 2 ) 328 ( 2 , 1 ) 6222SO
( 2 , 3 ) 313 ( 2 , 2 ) 6123
( 3 , 0 ) 111SO ( 2 , 3 ) 6222
( 3 , 1 ) 122 ( 3 , 1 ) 4212QSD [19]
( 3 , 2 ) 122 ( 3 , 2 ) 4111
( 3 , 3 ) 111 ( 3 , 3 ) 4212
4 ( 0 , 1 ) 122LCD ( 4 , 1 ) 122SO
( 0 , 2 ) 144LCD ( 4 , 2 ) 111
( 0 , 3 ) 122LCD ( 4 , 3 ) 122
( 0 , 4 ) 411LCD5 ( 0 , 1 ) 122SO
( 1 , 0 ) 414SO ( 0 , 2 ) 144
( 1 , 1 ) 4214 ( 0 , 3 ) 144
( 1 , 2 ) 4430 ( 0 , 4 ) 122
( 1 , 3 ) 4214 ( 1 , 1 ) 5220SO
( 1 , 4 ) 414 ( 1 , 2 ) 5448
( 2 , 0 ) 616SO ( 1 , 3 ) 5448
( 2 , 1 ) 6224 ( 1 , 4 ) 5220
( 2 , 2 ) 6456 ( 2 , 1 ) 10257SO
( 2 , 3 ) 6224 ( 2 , 2 ) 102160
( 2 , 4 ) 616 ( 2 , 3 ) 104160
( 3 , 0 ) 414SO ( 2 , 4 ) 10257
( 3 , 1 ) 4214 ( 3 , 1 ) 10257SO
( 3 , 2 ) 4430 ( 3 , 2 ) 104160
( 3 , 3 ) 4214 ( 3 , 3 ) 104160
( 3 , 4 ) 414 ( 3 , 4 ) 10257
( 4 , 0 ) 111SO ( 4 , 1 ) 5220QSD [19]
( 4 , 1 ) 122 ( 4 , 2 ) 5448
( 4 , 2 ) 144 ( 4 , 3 ) 5448
( 4 , 3 ) 122 ( 4 , 4 ) 5220
( 4 , 4 ) 111 ( 5 , 1 ) 122SO
( 5 , 2 ) 144
( 5 , 3 ) 144
( 5 , 4 ) 122
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.

Share and Cite

MDPI and ACS Style

Manseri, S.; Sole, P.; Alahmadi, A.; Melaibari, A. Hulls of Linear Codes over Non-Unitary Rings of Four Elements. Mathematics 2026, 14, 788. https://doi.org/10.3390/math14050788

AMA Style

Manseri S, Sole P, Alahmadi A, Melaibari A. Hulls of Linear Codes over Non-Unitary Rings of Four Elements. Mathematics. 2026; 14(5):788. https://doi.org/10.3390/math14050788

Chicago/Turabian Style

Manseri, Sarra, Patrick Sole, Adel Alahmadi, and Asmaa Melaibari. 2026. "Hulls of Linear Codes over Non-Unitary Rings of Four Elements" Mathematics 14, no. 5: 788. https://doi.org/10.3390/math14050788

APA Style

Manseri, S., Sole, P., Alahmadi, A., & Melaibari, A. (2026). Hulls of Linear Codes over Non-Unitary Rings of Four Elements. Mathematics, 14(5), 788. https://doi.org/10.3390/math14050788

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop