# The Mass Formula for Self-Orthogonal and Self-Dual Codes over a Non-Unitary Non-Commutative Ring

Adel Alahmadi, Altaf Alshuhail, Rowena Alma Betty, Lucky Galvez, Patrick

Solé

► To cite this version:

Adel Alahmadi, Altaf Alshuhail, Rowena Alma Betty, Lucky Galvez, Patrick Solé. The Mass Formula for Self-Orthogonal and Self-Dual Codes over a Non-Unitary Non-Commutative Ring. Mathematics , 2024, 12, pp.862. 10.3390/math12060862 . hal-04505889

HAL Id: hal-04505889

https://hal.science/hal-04505889v1

Submitted on 15 Mar 2024

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons CC BY 4.0 - Attribution - International License
Article

# The Mass Formula for Self-Orthogonal and Self-Dual Codes over a Non-Unitary Non-Commutative Ring

Adel Alahmadi<fnref n="1" />,*, Altaf Alshuhail<fnref n="1" />,<fnref n="2" />, Rowena Alma Betty<fnref n="3" />, Lucky Galvez<fnref n="3" /> and Patrick Solé<fnref n="4" />

**Abstract:** In this paper, we derive a mass formula for the self-orthogonal codes and self-dual codes over a non-commutative non-unitary ring, namely, $E_p = \langle a, b \mid pa = pb = 0, a^2 = a, b^2 = b, ab = a, ba = b \rangle$, where $a \neq b$ and $p$ is any odd prime. We also give a classification of self-orthogonal codes and self-dual codes over $E_p$, where $p = 3, 5$, and $7$, in short lengths.

**Keywords:** non-unitary non-commutative rings; left self-dual codes; self-dual codes; mass formula

**MSC:** 94B05; 16D10

## 1. Introduction

Mass formulas serve as important tools for classifying self-dual codes over finite fields [1–5] and unitary rings [6–11]. When generating nonequivalent self-dual codes, mass formulas serve as terminating flags for the computing effort. Recently, this methodology was extended to the non-unitary ring $I$, in the terminology of [12], where quasi self-dual codes, a special class of self-orthogonal codes, serve as the central objects for classification [13,14]. Even more recently, a satisfying definition of self-dual codes for non-unitary non commutative rings was introduced in [15]. It is the intersection of the right dual with the left dual. Thus, a non-commutative ring leads to three types of self-dual codes: left self-dual, right self-dual and self-dual.

In the present note, we present mass formulas for self-orthogonal codes, self-dual codes, and left self-dual codes over the non-commutative non-unitary ring of order $p^2$, for $p$ an odd prime, and type $E$ in the classification of Fine [12]. This ring is henceforth denoted by $E_p$. We apply them to the classification of these codes when $p = 3, 5, 7$ in short lengths. The proof techniques combine self-dual mass formula over finite field, and linear algebra over the ring $E_3$ which is reminiscent of that on chain rings of depth 2 [9,10].

The content is organized in the following manner: Section 2 introduces essential preliminary concepts and notations necessary for comprehending the remainder of the paper. In Section 3, the framework of linear codes over $E_p$ is established. Section 4 elaborates on the mass formulas. Section 5 is dedicated to the classification in short lengths for fixed types. Finally, Section 6 serves as the conclusion of the article.

## 2. Preliminaries

### 2.1. Codes over $\mathbb{F}_p$

Let $p$ be an odd prime number. A **linear code** $C$ of length $n$ and dimension $k$ over a finite field $\mathbb{F}_p$ is an $\mathbb{F}_p$-subspace of the vector space $\mathbb{F}_p^n$ of dimension $k$. Compactly, we call $C$ an $[n, k]$-code. The elements of a code are called **codewords**. Two codewords

<figure><img src="image_2.png" /></figure>

check for
updates

**Citation:** Alahmadi, A.; Alshuhail, A.; Betty, R.A.; Galvez, L.; Solé, P. The Mass Formula for Self-Orthogonal and Self-Dual Codes over a Non-Unitary Non-Commutative Ring. Mathematics **2024**, *12*, 862. https://doi.org/10.3390/math12060862

Academic Editor: Askar Tuganbaev

Received: 20 November 2023

Revised: 1 January 2024

Accepted: 5 January 2024

Published: 15 March 2024

<figure><img src="image_3.png" /></figure>

**Copyright:** © 2024 by the authors.
Licensee MDPI, Basel, Switzerland.
This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

<footnote n="1">¹ Research Group of Algebraic Structures and Applications, Department of Mathematics, Faculty of Science, King Abdulaziz University, Jeddah 21589, Saudi Arabia; ad.alshuhail@uoh.edu.sa</footnote>

<footnote n="2">² Department of Mathematics, Faculty of Science, University of Hail, Hail 55431, Saudi Arabia</footnote>

<footnote n="3">³ Institute of Mathematics, University of the Philippines-Diliman, Quezon City 1101, Philippines; rabetty@math.upd.edu.ph (R.A.B.); legalvez@math.upd.edu.ph (L.G.)</footnote>

<footnote n="4">⁴ I2M, (CNRS, University of Aix-Marseille, Centrale Marseille), 13009 Marseilles, France; sole@enst.fr</footnote>

<footnote>* Correspondence: analahmadi@kau.edu.sa</footnote>
x = (x₁, x₂, ..., xₙ) and y = (y₁, y₂, ..., yₙ) are orthogonal if their standard inner product (x, y) = Σn i=1 xᵢyᵢ is zero, and the vector space consisting of all vectors in Fp that are orthogonal to every codeword in C is called the **dual** of C, denoted by C⊥. C is said to be **self-orthogonal** (resp. **self-dual**) if C ⊆ C⊥ (resp. C = C⊥).

## 2.2. Additive Codes over $\mathbb{F}_{p^2}$

Let $\omega$ be a primitive element in $\mathbb{F}_{p^2}$, so that $\omega$ has order $r = p^2 - 1$ and $\omega^t \neq 1 \forall 0 \le t \le r$. Then $\mathbb{F}_{p^2} = \{0, 1, \omega, \omega^2, \dots, \omega^{r-1}\}$. The **trace map**, $\text{Tr} : \mathbb{F}_{p^2} \to \mathbb{F}_p$, is defined by $\text{Tr}(u) = u + u^p$. An **additive code** of length $n$ over $\mathbb{F}_{p^2}$ is $\mathbb{F}_p$-additive subgroup of $\mathbb{F}_{p^2}$ containing $p^k$ codewords for some integer $k$ in the range $0 \le k \le 2n$.

## 2.3. The Ring $E_p$

Following [12], we define a ring on two distinct generators $a, b$ by their relations

$$E_p = \langle a, b \mid pa = pb = 0, a^2 = a, b^2 = b, ab = a, ba = b \rangle.$$

Thus, $E_p$ consists of $p^2$ elements and has characteristic $p$. We also define a natural action of $\mathbb{F}_p$ on $E_p$ by the rule $rx = xr$, for all $r \in E_p$ and for all $x \in \mathbb{F}_p$.

**Lemma 1.** The ring $E_p$ does not contain a unity element.

**Proof.** Assume, by contradiction, that there is a unique element $e$ in $E_p$ such that $eu = ue = u$ for every $0 \neq u \in E_p$. Since $E_p$ is generated by $a$ and $b$, $e$ can be written as

$$e = ai + bj, \text{ for some } 0 \le i, j \le p-1.$$

Choose $u = a$. By assumption,

$$(ai + bj)a = a(ai + bj) = a,$$

which implies $e = a$. Also, choose $u = a + b$. Then

$$a(a + b) = a^2 + ab = a + a = 2a \neq a + b.$$

So $a$ is not the unity of $E_p$, which leads to an inconsistency. Therefore, $E_p$ is a non-unital ring. $\square$

From the ring representation of $E_p$ and Lemma 1, $E_p$ is a non-commutative ring without multiplicative identity. Moreover, $E_p$ contains a unique maximal ideal

$$J_p = \{e_{xy} \mid e_{xy} = ax + by \text{ with } x + y \equiv 0 \pmod{p} \text{ where } 0 \le x, y < p\} = \langle e = a - b \rangle.$$

Thus, we can write $E_p$ as

$$E_p = \{c_{xy} = ax + ey \mid x, y \in \mathbb{F}_p\}. \qquad (1)$$

Define the reduction map modulo $J_p$ as $\alpha : E_p \to E_p/J_p \cong \mathbb{F}_p$ by $\alpha(ax + ey) = x$ where $0 \le x < p$. This map can be extended in the natural way from $E_p^n$ to $\mathbb{F}_p^n$.

## 3. Codes over $E_p$

A **linear code** $C$ of length $n$ over $E_p$, or simply an $E_p$-code, is a one-sided $E_p$-submodule of $E_p^n$. We denote the (Hamming) weight of $x \in E_p^n$ by $wt(x)$ and adapt the notation

$$[<0, 1>, \dots, <i, A_i>, \dots, <n, A_n>],$$

where $A_i$ is the number of codewords of Hamming weight $i$, for the weight distribution of a code over $E_p$ as in Magma [16]. The inner product between two vectors $x =$
$(x_1, \dots, x_n), \mathbf{y} = (y_1, \dots, y_n) \in E_p^n$ is defined as $(\mathbf{x}, \mathbf{y}) = \sum_{i=1}^n x_i y_i$. For an $E_p$-code $C$, the **right dual** of $C$, defined as

$$C^{\perp R} = \{ \mathbf{y} \in E_p^n | \forall \mathbf{x} \in C, (\mathbf{x}, \mathbf{y}) = 0 \},$$

is a right module of $E_p^n$, while the **left dual** of $C$, defined as

$$C^{\perp L} = \{ \mathbf{y} \in E_p^n | \forall \mathbf{x} \in C, (\mathbf{y}, \mathbf{x}) = 0 \},$$

is a left module of $E_p^n$. The two-sided dual of $C$ is $C^{\perp} = C^{\perp R} \cap C^{\perp L}$. The code $C$ is said to be **self-orthogonal** if every a codeword in $C$ is orthogonal to every codeword in $C$, that is, $C \subseteq C^{\perp}$. If $C = C^{\perp R}$ (resp. $C = C^{\perp L}$) then $C$ is **right self-dual (RSD)** (resp. **left self-dual (LSD)**). If $C = C^{\perp}$, then $C$ is **self-dual (SD)**.

Using the map $\phi : E_p \mapsto \mathbb{F}_{p^2}$ defined as

$$\phi(0) = 0, \phi(a) = \omega, \text{ and } \phi(b) = -\omega + 1, \qquad (2)$$

we can attach to an $E_p$-code $C$ an additive $\mathbb{F}_{p^2}$-code $\phi(C) = \{(\phi(c_1), \phi(c_2), \dots, \phi(c_n)) \mid (c_1, c_2, \dots, c_n) \in C\}$. It can be easily seen that $\mathrm{Tr}(\phi(u)) = \alpha(u)$ for all $u \in E_p$.

**Lemma 2.**

(i) For any positive integer $n$, there exist a self-orthogonal code over $E_p$ of length $n$.

(ii) For any odd prime $p$, there is a left self-orthogonal code $(C \subseteq C^{\perp L})$ over $E_p$.

**Proof.**

(i) Consider $J_p$ as linear code over $E_p$ of length 1. To prove the self-orthogonality of $J_p$, for all $(ai + bj), (ai' + bj') \in J_p$, we have that

$$(ai + bj, ai' + bj') = a((i' + j')i) + b((i' + j')j),$$

$$(ai' + bj', ai + bj) = a((i + j)i') + b((i + j)j').$$

Since $(ai + bj), (ai' + bj') \in J_p$, it follows that, $i + j \equiv 0$ and $i' + j' \equiv 0 \pmod p$. Then, $J_p \subseteq J_p^{\perp R} \cap J_p^{\perp L} = J_p^{\perp}$. Taking the direct sum of $n$ copies of this code yields a self-orthogonal code of any length $n$.

(ii) Let $p$ be a prime and let $\mathbf{1}_p$ denote the all-one codeword of length $p$. The repetition code of length $p$ is then defined by $R_p = \{u(\mathbf{1}_p) \mid u \in E_p\}$. Clearly $R_p$ is a linear code over $E_p$. Since $E_p$ has characteristic $p$, then we have that $R_p \subseteq R_p^{\perp L}$.

<figure><img src="image_4.png" /></figure>

Let $C$ be linear code over $E_p$. We define the **residue code** of $C$ as

$$\mathbf{res}(C) = \{ \mathbf{x} \in \mathbb{F}_p^n \mid \exists \mathbf{y} \in \mathbb{F}_p^n \text{ such that } a\mathbf{x} + e\mathbf{y} \in C \}.$$

and the **torsion code** of $C$ as

$$\mathbf{tor}(C) = \{ \mathbf{y} \in \mathbb{F}_p^n \mid e\mathbf{y} \in C \}.$$

From Equation (2), we have $\mathbf{res}(C) = \mathrm{Tr}(\phi(C))$ and $\mathbf{tor}(C)$ is the subfield subcode of $\phi(C)$ defined by $\phi(C) \cap \mathbb{F}_p^n$. Let $\alpha_C$ be the restriction of $\alpha$ to $C$. We have that $\mathbf{tor}(C) = \mathrm{Ker} \alpha_C$, and that $\mathbf{res}(C) = \mathrm{Im} \alpha_C$. Let $\mathrm{dim}(\mathbf{res}(C)) = k_1$ and $k_2 = \mathrm{dim}(\mathbf{tor}(C)) - k_1$. We say that $C$ is linear code of **type** $\{k_1, k_2\}$. It can be seen that $C$ is **free** as an $E_p$-module if and only if $\mathbf{res}(C) = \mathbf{tor}(C)$. By the first isomorphism theorem applied to $\alpha_C$ we have $|C| = p^{2k_1+k_2}$.

In Theorem 1, we will extend a few results from [15,17] by simply substituting codes over $\mathbb{F}_p$ for binary codes in the proofs.
**Theorem 1.** Suppose $C$ is a linear code over $E_p$. Let $k_1, k_2, n$ be non-negative integers with $k_1 + k_2 \le n$. Then the following hold:

(i) Every linear code $C$ over $E_p$ of length $n$ and type $\{k_1, k_2\}$ is equivalent to a code with generator matrix in standard form

$$ \begin{bmatrix} aI_{k_1} & aA + eB \\ 0 & eZ \end{bmatrix} \qquad (3) $$

where $I_{k_1}$ is the identity matrix, the matrices $A, B$ and $Z$ have entries from $\mathbb{F}_p$.

(ii) $a \mathbf{res}(C) \subseteq C$ and $\mathbf{res}(C) \subseteq \mathbf{tor}(C)$.

(iii) $C = a \mathbf{res}(C) \oplus e \mathbf{tor}(C)$

(iv) $C^{\perp R} = a \mathbf{tor}(C)^{\perp} \oplus e \mathbb{F}_p^n$.

(v) $C^{\perp L} = a \mathbf{res}(C)^{\perp} \oplus e \mathbf{res}(C)^{\perp}$.

(vi) $C^{\perp} = a \mathbf{tor}(C)^{\perp} \oplus e \mathbf{res}(C)^{\perp}$.

If $G$ is a $k \times n$ matrix over $E_p$, we denote by $E_p^k G$ the code of length $n$ over $E_p$ with generator matrix $G$.

Next, we make a modification on the construction of self-orthogonal codes, (left or right) self-dual codes, and self-dual codes in [15], to be suitable for an odd prime $p$.

**Theorem 2.** If $C = aC_1 \oplus eC_2$ is a linear code over $E_p$ such that $C_1$ and $C_2$ be arbitrary linear codes over $\mathbb{F}_p$, then

(i) $C$ is a self-orthogonal code if and only if $C_1 \subseteq C_2 \subseteq C_1^{\perp}$;

(ii) $C$ is a self-dual if and only if $C_1 \subseteq C_2 = C_1^{\perp}$;

(iii) $C$ is a left self-dual if and only if $C_1 = C_2 = C_1^{\perp}$;

(iv) $C$ is a right self-dual if and only if $C = e \mathbb{F}_p^n$.

**Proof.** First, we will prove that $C_1 = \mathbf{res}(C)$ and $C_2 = \mathbf{tor}(C)$. Observe that $C_1 = \alpha(aC_1) \subseteq \mathbf{res}(C)$. Let $\mathbf{x} \in \mathbf{res}(C)$. Then $ax + e0 \in C$, so $\mathbf{x} \in C_1$, thus, we have $\mathbf{res}(C) = C_1$. Now, $eC_2 \subseteq C$, so by definition of torsion code, $C_2$ is a subset of $\mathbf{tor}(C)$. Let $\mathbf{y} \in \mathbf{tor}(C)$. Since the zero vector is in $C_1$, $\mathbf{ey} = a\mathbf{0} + \mathbf{ey} \in C$. Therefore, $\mathbf{y} \in C_2$.

(i) Let $C$ be a self-orthogonal code. Note that $C_1 \subseteq C_2$. Suppose that $\mathbf{z} \in C_2$. Since $C$ is self-orthogonal, for all $ax + ey \in C$, we have

$$ 0 = (ax + ey, ez) = e(x, z). $$

Hence $C_2 \subseteq C_1^{\perp}$. Conversely, to prove the self-orthogonality of $C$, for all $\mathbf{x}, \mathbf{x}' \in C_1$ and for all $\mathbf{y}, \mathbf{y}' \in C_2$ we have

$$ \begin{aligned} (\mathbf{c}, \mathbf{c}') &= (ax + ey, ax' + ey') \\ &= a(\mathbf{x}, \mathbf{x}') + 0(\mathbf{x}, \mathbf{y}') + e(\mathbf{y}, \mathbf{x}') + 0(\mathbf{y}, \mathbf{y}') \\ &= a(0) + 0 + e(0) + 0 = 0, \end{aligned} $$

since $C_1 \subseteq C_2 \subseteq C_1^{\perp}$.

(ii) Let $C$ be a self-dual code. Then from the preceding case, $C_1 \subseteq C_2 \subseteq C_1^{\perp}$. Now, let $\mathbf{x} \in C_1^{\perp}$ be arbitrary. From Theorem 1 (vi), we have $ex \in C$. Hence, $\mathbf{x} \in \mathbf{tor}(C) = C_2$. It follows that $C_2 = C_1^{\perp}$. For the converse, suppose that $C_1 \subseteq C_2 = C_1^{\perp}$. From the preceding case, we have $C \subseteq C^{\perp}$. Since $|C| = p^{2k_1+k_2}$ and $C_2 = C_1^{\perp}$, $p^{k_1+(n-k_1)} = p^n$. It follows that $C = C^{\perp}$.

(iii) $C$ is left self-dual code if and only if $C_1 = C_1^{\perp} = C_2$, by Theorem 1 (iii) and (v).

(iv) $C$ is right self-dual code if and only if $C_1 = C_2^{\perp}$ (by Theorem 1 (iii) and (iv)). Equiv- alently, we have $C_1^{\perp} = (C_2^{\perp})^{\perp} = C_2 = \mathbb{F}_p^n$ if and only if $C_1 = \{0\}$ if and only if $C = e \mathbb{F}_p^n$.

□
### 4. Computation of the Mass Formula

At the start, we define the notion of equivalence of codes. Two codes $\mathcal{C}$ and $\mathcal{C}'$ over $E_p$ are **monomially equivalent** if there is an $n \times n$ monomial matrix $M$ (with exactly one entry $\in \{1, -1\}$ in each row and column and all other entries are zero) such that $\mathcal{C}' = \{cM : c \in \mathcal{C}\}$. The **monomial automorphism** group $Aut(\mathcal{C})$ of code $\mathcal{C}$ consists of all $M$ such that $\mathcal{C} = CM$. Let $M_n$ be the signed symmetric group of order $|M_n| = 2^n n!$. The number of codes equivalent to a code $\mathcal{C}$ of length $n$ is

$$ \frac{|M_n|}{|Aut(\mathcal{C})|} $$

The mass formula for self-orthogonal codes is given by

$$ \sum_{\mathcal{C}} \frac{|M_n|}{|Aut(\mathcal{C})|'} $$

where the sum runs through all inequivalent self-orthogonal codes $\mathcal{C}$ over $E_p$ of length $n$.

We apply a similar approach to that used for the computation of a mass formula in [7]. Let $C_1$ be a code over $\mathbb{F}_p$ of length $n$ with dimension $k_1$ and generator matrix

$$ [ \begin{matrix} I_{k_1} & A \end{matrix} ], \qquad (4) $$

and $C_2$ be a code over $\mathbb{F}_p$ of length $n$ with dimension $k_1 + k_2$ and generator matrix

$$ \begin{bmatrix} I_{k_1} & A \\ 0 & Z \end{bmatrix}, \qquad (5) $$

where $A \in M_{k_1 \times (n-k_1)}(\mathbb{F}_p)$, and $Z \in M_{k_2 \times (n-k_2)}(\mathbb{F}_p)$ is of full row rank. Observe that $C_1 \subseteq C_2$, and the code with generator matrix (3) has residue code $C_1$ and torsion code $C_2$.

We need the following lemmas to count the number free self-orthogonal $E_p$-codes.

**Lemma 3.** If $\mathcal{C}$ is a free $E_p$-code of length $n$, then the matrix $B$ in Theorem 1 (i) is unique.

**Proof.** Suppose $\mathcal{C}$ is a free code and there exist $B_1, B_2 \in M_{k_1 \times (n-k_1)}(\mathbb{F}_p)$ such that

$$ E_p^{k_1} [aI_{k_1} aA + eB_1] = E_p^{k_1} [aI_{k_1} aA + eB_2]. \qquad (6) $$

Then $aA + eB_1 = aA + eB_2$. Hence, $B_1 = B_2$. $\square$

For the remainder of this section, assume that $C_1 \subseteq C_1^\perp$. Then

$$ I_{k_1} + AA^T = 0, \qquad (7) $$

and

$$ ZA^T = 0. \qquad (8) $$

It follows from (7) that $A$ is of full row rank.

**Lemma 4.** The map $f_A$ defined by

$$ f_A : M_{k_1 \times m}(\mathbb{F}_p) \to M_{k_1 \times k_1}(\mathbb{F}_p) \\ X \mapsto AX^T $$

is a surjective linear map.

**Proof.** Note that $f_A$ is a linear map by properties of matrix. To prove the surjective condition, choose an arbitrary matrix $G$ in $M_{k_1 \times k_1}(\mathbb{F}_p)$. Consider the matrix $-G^T A$ in $M_{k_1 \times m}(\mathbb{F}_p)$. We have
$$f_A(-G^T A) = A(-G^T A)^T = -AA^T G = I_{k_1}(G) = G.$$

<figure><img src="image_5.png" /></figure>

Now, let us consider the sets

$$\mathbf{X} = \{C \mid C \text{ be a self-orthogonal } E_p\text{-code, with } \mathbf{res}(C) = C_1 = \mathbf{tor}(C)\},$$

$$\mathbf{X}' = \{C' \mid C' \text{ be a self-orthogonal } E_p\text{-code, with } \mathbf{res}(C') = C_1, \mathbf{tor}(C') = C_2\}.$$

**Lemma 5.** If $C' \in \mathbf{X}'$, then $|\{C \in \mathbf{X} \mid C \subseteq C'\}| = p^{k_1 k_2}$.

**Proof.** By Theorem 1 (i), $C'$ has a generator matrix (3). Consider the map

$$\mu : M_{k_1 \times k_2}(\mathbb{F}_p) \to \{C \in \mathbf{X} \mid C \subseteq C'\}$$

$$M \mapsto E_p^{k_1} [a I_{k_1} \quad aA + e(B + MZ)].$$

Clearly, $\mu$ is well defined. Now, we will show that $\mu$ is bijective. Suppose $M_1, M_2 \in M_{k_1 \times k_2}(\mathbb{F}_p)$ such that $\mu(M_1) = \mu(M_2)$. Then $aA + e(B + M_1Z) = aA + e(B + M_2Z)$. Since $Z$ is of full row rank, we conclude $M_1 = M_2$, which shows that $\mu$ is injective. Now, suppose that $C \in \mathbf{X}$ such that $C \subseteq C'$. By Theorem 1 (i), $C = E_p^{k_1} [a I_{k_1} \quad aA + eF]$, for some matrix $F$. The inclusion $C \subseteq C'$ implies that

$$aA + eF = aA + e(B + MZ)$$

for some matrix $M$ of size $k_1 \times k_2$. So $F = B + MZ$, which shows that $\mu$ is surjective, and hence, $\mu$ is bijective. Therefore,

$$|\{C \in \mathbf{X} \mid C \subseteq C'\}| = |M_{k_1 \times k_2}(\mathbb{F}_p)| = p^{k_1 k_2}.$$

<figure><img src="image_6.png" /></figure>

**Lemma 6.** If $C \in \mathbf{X}$, then there is a unique code $C' \in \mathbf{X}'$, such that $C \subseteq C'$.

**Proof.** By Theorem 1 (i) and Lemma 3, $C$ has a generator matrix $[aI_{k_1} \quad aA + eB]$ for some unique matrix $B$. Then the code $C'_0$ with a generator matrix

$$\begin{bmatrix} aI_{k_1} & aA + eB \\ 0 & eZ \end{bmatrix} \qquad (9)$$

satisfies $\mathbf{res}(C'_0) = C_1$, and $\mathbf{tor}(C'_0) = C_2$. Since $C \in \mathbf{X}$, (8) implies that $C'_0$ is a self-orthogonal code, hence $C'_0 \in \mathbf{X}'$. Now, suppose that $C' \in \mathbf{X}'$ and $C \subseteq C'$. By Theorem 1 (i), we have that $E_p^{k_2} [0 \quad eZ] \subseteq C'$. This, together with $C \subseteq C'$ forces $C'_0 \subseteq C'$. Since $|C'_0| = |C'|$, we have $C'_0 = C'$. $\square$

Let $\sigma_p(n, k_1)$ be the number of self-orthogonal codes of length $n$ and dimension $k_1$ over $\mathbb{F}_p$, which is found in [18–20].

In [21], the number of subspaces of dimension $k$ contained in an $n$-dimensional vector space over $\mathbb{F}_p$ is given by the Gaussian coefficient $\begin{bmatrix} j \\ i \end{bmatrix}_p$ for $i \le j$, where

$$\begin{bmatrix} j \\ i \end{bmatrix}_p = \frac{(p^j - 1)(p^j - p) \dots (p^j - p^{i-1})}{(p^i - 1)(p^i - p) \dots (p^i - p^{i-1})}.$$

Let $\sigma_{E_p}(n, k_1, k_2)$ be the number of distinct self-orthogonal codes over $E_p$ of length $n$. Mass formulas are useful for finding all inequivalent codes of given length. Our goal now is to compute $\sigma_{E_p}(n, k_1, k_2)$.
**Theorem 3.** For all codes of length $n$ with type $\{k_1, 0\}$, the number of free self-orthogonal codes over $E_p$ is

$$ \sigma_{E_p}(n, k_1, 0) = \sigma_p(n, k_1) p^{k_1(n-2k_1)}. \qquad (10) $$

**Proof.** We may assume without loss of generality that $C_1$ is a code with generator matrix (4). If $C$ is a self-orthogonal code of length $n$ over $E_p$ of type $\{k_1, 0\}$, then by setting $C_1 = \text{res}(C) = \text{tor}(C)$, $C_1$ satisfies Theorem 2 (i). We have $\sigma_p(n, k_1)$ codes $C_1$, which is the number of self-orthogonal codes over $\mathbb{F}_p$. By Theorem 1 (i), $C$ has generator matrix $[a I_{k_1} \ aA + eB]$. Finally, we have

$$ a^2 I_{k_1} + a^2 AA^T + aeAB^T + eaBA^T + e^2 BB^T = 0, $$

so,

$$ a(I_{k_1} + AA^T) + e(BA^T) = 0. $$

Since $C_1 \subseteq C_1^{\perp}$, then $I_{k_1} + AA^T = 0$. Now, we have find the number of the matrix $B$ which satisfies $AB^T = 0$. Setting $m = n - k_1$ in the linear map $f_A$ in Lemma 4,

$$ |\{B \in M_{k_1 \times n-k_1}(\mathbb{F}_p) | AB^T = 0 \}| = |\text{Ker } f_A| = \frac{|M_{k_1 \times n-k_1}(\mathbb{F}_p)|}{|\text{Im } f_A|} = \frac{p^{k_1(n-k_1)}}{p^{k_1^2}}. \qquad (11) $$

<figure><img src="image_7.png" /></figure>

**Example 1.** We consider the case $n = 3$, and $p = 3$. In Table 1, we give the list of inequivalent self-orthogonal codes over the ring $E_3$ of type $\{1, 0\}$. Using the mass formula in Theorem 3, we have the following computations:

$$ \sum_{i=1}^{3} \frac{1}{|\text{Aut}(C_i)|} = \frac{1}{12} + \frac{1}{6} = \frac{4 \cdot 3^{1(3-2)}}{48} = \frac{\sigma_{E_3}(3, 1, 0)}{2^3 \cdot 3!}. \qquad (12) $$

In the next theorem, we give the number of self-orthogonal codes over $E_p$.

**Theorem 4.** The number of self-orthogonal codes over $E_p$ of length $n$ with type $\{k_1, k_2\}$ is given by

$$ \sigma_{E_p}(n, k_1, k_2) = \sigma_p(n, k_1) \left[ \frac{n-2k_1}{k_2} \right]_p p^{k_1(n-2k_1-k_2)}. \qquad (13) $$

**Proof.** We may assume without loss of generality that $C_1$ and $C_2$ are codes with generator matrices (4) and (5), respectively. Let $C$ be a self-orthogonal code of length $n$ over $E_p$ of type $\{k_1, k_2\}$. By setting $C_1 = \text{res}(C)$ and $C_2 = \text{tor}(C)$, $C_1$ and $C_2$ satisfy Theorem 2 (i). Then, there are $\sigma_p(n, k_1)$ self-orthogonal codes $C_1$ and we have $\left[ \frac{n-2k_1}{k_2} \right]_p$ codes $C_2$ such that $C_1 \subseteq C_2 \subseteq C_1^{\perp}$. Now, we have to compute $|X'|$. By Lemmas 5 and 6, we have

$$ \begin{aligned} p^{k_1 k_2} |X'| &= \sum_{C' \in X'} |\{C \in X | C \subseteq C'\}| \\ &= \sum_{C \in X} |\{C' \in X' | C \subseteq C'\}| \\ &= \sum_{C \in X} 1 \\ &= |X|. \end{aligned} $$

From Theorem 3, we have that $|X| = p^{k_1(n-2k_1)}$. Therefore, $|X'| = p^{k_1(n-2k_1-k_2)}$. $\square$

**Remark 1.** Let $C$ be an $E_p$-code of length $n$ and of type $\{0, m\}$, where $m \le n$. Then $C$ will be a self-orthogonal code. Furthermore, if $m = n$, then $C$ will be self-dual.
The following results derive the mass formula for the SD codes and the LSD codes over $E_p$, respectively.

**Theorem 5.** For a given integer $n \ge 2$ we have the identity

$$ \sum_C \frac{1}{|Aut(C)|} = \frac{\sigma_p(n, k)}{2^n n!}, $$

where $C$ runs over distinct representatives of equivalence classes under monomial action of SD $E_p$-codes of length $n$ and type $\{k, n - 2k\}$.

**Proof.** From Theorem 2 (ii), the number of SD $E_p$-codes depends on the number of self-orthogonal codes over $\mathbb{F}_p$, and $\mathbf{tor}(C) = \mathbf{res}(C)^\perp$. $\square$

**Example 2.** We consider the case $n = 3$, and $p = 3$. In Table 1, we give the list of inequivalent self-orthogonal codes over $E_3$ of type $\{1, 1\}$. Using the mass formula in Theorem 5, we make the following computations,

$$ \sum_{i=1} \frac{1}{|Aut(C_i)|} = \frac{1}{12} = \frac{\sigma_{E_3}(3, 1, 1)}{48} = \frac{\sigma_3(3, 1)}{48}. \qquad (14) $$

**Corollary 1.** For a given even integer $n \ge 2$, we have the identity

$$ \sum_C \frac{1}{|Aut(C)|} = \frac{\sigma_p(n, n/2)}{2^n n!}, $$

where $C$ runs over distinct representatives of equivalence classes under monomial action of left SD $E_p$-codes of length $n$ and type $\{n/2, 0\}$.

**Proof.** From Theorem 2 (iii), the number of left self-dual $E_p$-codes depends on the number of self-dual codes over $\mathbb{F}_p$, with $\mathbf{tor}(C) = \mathbf{res}(C)$. Thus, the result follows. $\square$

**Proposition 1.** For all codes $C$ of length $n$, there is a unique right self-dual $E_p$-code.

**Proof.** The result follows from Theorem 2 (iv), where $C = e \mathbb{F}_p^n$ is the unique code. $\square$

<table><caption>**Table 1.** Self-orthogonal codes of length $n \le 4$ over $E_3$.</caption><thead><tr><th>Length</th><th>Type</th><th>Generator Matrices</th><th>|Aut(C)|</th><th>Weight Distribution</th><th>RSD Code</th><th>LSD Code</th><th>SD Code</th></tr></thead><tbody><tr><td>1</td><td>{0, 1}</td><td>(e)</td><td>2</td><td>[&lt;0, 1&gt;, &lt;1, 2&gt;]</td><td>✓</td><td></td><td>✓</td></tr><tr><td rowspan="2">2</td><td>{0, 1}</td><td>( e 0 )</td><td>4</td><td>[&lt;0, 1&gt;, &lt;1, 2&gt;]</td><td rowspan="2">✓</td><td rowspan="2"></td><td rowspan="2">✓</td></tr><tr><td>{0, 2}</td><td>eI<sub>2</sub></td><td>8</td><td>[&lt;0, 1&gt;, &lt;1, 4&gt;, &lt;2, 4&gt;]</td></tr><tr><td rowspan="6">3</td><td rowspan="2">{1, 0}</td><td>( a a a )</td><td>12</td><td>[&lt;0, 1&gt;, &lt;3, 8&gt;]</td><td rowspan="6">✓</td><td rowspan="6"></td><td rowspan="6">✓</td></tr><tr><td>( a c<sub>11</sub> c<sub>12</sub> )</td><td>6</td><td>[&lt;0, 1&gt;, &lt;3, 8&gt;]</td></tr><tr><td rowspan="2">{0, 1}</td><td>( e 0 0 )</td><td>16</td><td>[&lt;0, 1&gt;, &lt;1, 2&gt;]</td></tr><tr><td>( e 0 0 )</td><td>16</td><td>[&lt;0, 1&gt;, &lt;1, 4&gt;, &lt;2, 4&gt;]</td></tr><tr><td rowspan="2">{0, 2}</td><td>eI<sub>3</sub></td><td>48</td><td>[&lt;0, 1&gt;, &lt;1, 6&gt;, &lt;2, 12&gt;, &lt;3, 8&gt;]</td></tr><tr><td></td><td>12</td><td>[&lt;0, 1&gt;, &lt;2, 6&gt;, &lt;3, 20&gt;]</td></tr><tr><td rowspan="2">{1, 1}</td><td rowspan="2"></td><td>( a a a )</td><td>12</td><td></td><td rowspan="2">✓</td><td rowspan="2"></td><td rowspan="2">✓</td></tr><tr><td>( 0 2e e )</td><td></td><td></td></tr></tbody></table>
<table><caption>Table 1. *Cont.*</caption><thead><tr><th>Length</th><th>Type</th><th>Generator Matrices</th><th>|Aut(C)|</th><th>Weight Distribution</th><th>RSD Code</th><th>LSD Code</th><th>SD Code</th></tr></thead><tbody><tr><td rowspan="10">4</td><td rowspan="4">{1,0}</td><td>( a a a 0 )</td><td>24</td><td>[&lt;0, 1&gt;, &lt;3, 8&gt;]</td><td></td><td></td><td></td></tr><tr><td>( a c<sub>11</sub> c<sub>12</sub> 0 )</td><td>12</td><td>[&lt;0, 1&gt;, &lt;3, 8&gt;]</td><td></td><td></td><td></td></tr><tr><td>( a a a e )</td><td>12</td><td>[&lt;0, 1&gt;, &lt;3, 8&gt;]</td><td></td><td></td><td></td></tr><tr><td>( a c<sub>11</sub> c<sub>12</sub> e )</td><td>6</td><td>[&lt;0, 1&gt;, &lt;3, 2&gt;, &lt;4, 6&gt;]</td><td></td><td></td><td></td></tr><tr><td rowspan="2">{2,0}</td><td>( a 0 2a 2a )</td><td>48</td><td>[&lt;0, 1&gt;, &lt;3, 32&gt;, &lt;4, 48&gt;]</td><td></td><td>✓</td><td></td></tr><tr><td>( 0 a 2a a )</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>{0,1}</td><td>( e 0 0 0 )</td><td>96</td><td>[&lt;0, 1&gt;, &lt;1, 2&gt;]</td><td></td><td></td><td></td></tr><tr><td>{0,2}</td><td>( e 0 0 0 )</td><td>64</td><td>[&lt;0, 1&gt;, &lt;1, 4&gt;, &lt;2, 4&gt;]</td><td></td><td></td><td></td></tr><tr><td rowspan="3">{0,3}</td><td>( e 0 0 0 )</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>( 0 e 0 0 )</td><td>96</td><td>[&lt;0, 1&gt;, &lt;1, 6&gt;, &lt;2, 12&gt;, &lt;3, 8&gt;]</td><td></td><td></td><td></td></tr><tr><td>( 0 0 e 0 )</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>{0,4}</td><td>e I<sub>4</sub></td><td>384</td><td>[&lt;0, 1&gt;, &lt;1, 8&gt;, &lt;2, 24&gt;, &lt;3, 32&gt;, &lt;4, 16&gt;]</td><td>✓</td><td></td><td>✓</td></tr></tbody></table>

## 5. Classification

We classify self-orthogonal codes and self-dual codes of length $n \le 4$ with given residue of dimension $k_1 = 0, 1, 2$, where $p = 3, 5$. Also, we classify self-orthogonal codes and self-dual codes of length $n \le 3$ with given residue of dimension $k_1 = 0, 1$, where $p = 7$ using the building method discussed in Theorem 2. To carry out the classification, we represent codes over $E_p$ by their associated additive codes over $\mathbb{F}_{p^2}$ under the mapping $\phi$ defined in (2), and considered the action of the group of monomial matrices (with 1 and $-1$ as nonzero entries) to directly calculate the automorphism group. These calculations are performed using MAGMA [16]. See Tables 1–3 for a summary of our results for $p = 3, 5, 7$, respectively.

<table><caption>Table 2. Self-orthogonal codes of length $n \le 4$ over $E_5$.</caption><thead><tr><th>Length</th><th>Type</th><th>Generator Matrices</th><th>|Aut(C)|</th><th>Weight Distribution</th><th>RSD Code</th><th>LSD Code</th><th>SD Code</th></tr></thead><tbody><tr><td>1</td><td>{0,1}</td><td>(e)</td><td>2</td><td>[&lt;0, 1&gt;, &lt;1, 4&gt;]</td><td>✓</td><td></td><td>✓</td></tr><tr><td rowspan="3">2</td><td>{0,1}</td><td>(e 0)</td><td>4</td><td>[&lt;0, 1&gt;, &lt;1, 4&gt;]</td><td></td><td></td><td></td></tr><tr><td>{0,2}</td><td>eI<sub>2</sub></td><td>8</td><td>[&lt;0, 1&gt;, &lt;1, 8&gt;, &lt;2, 16&gt;]</td><td>✓</td><td></td><td>✓</td></tr><tr><td>{1,0}</td><td>( a 2a )</td><td>4</td><td>[&lt;0, 1&gt;, &lt;2, 24&gt;]</td><td></td><td>✓</td><td>✓</td></tr><tr><td rowspan="6">3</td><td>{0,1}</td><td>( e 0 0 )</td><td>16</td><td>[&lt;0, 1&gt;, &lt;1, 4&gt;]</td><td></td><td></td><td></td></tr><tr><td>{0,2}</td><td>( eI<sub>2</sub> 0 )</td><td>16</td><td>[&lt;0, 1&gt;, &lt;1, 8&gt;, &lt;2, 16&gt;]</td><td></td><td></td><td></td></tr><tr><td>{0,3}</td><td>eI<sub>3</sub></td><td>48</td><td>[&lt;0, 1&gt;, &lt;1, 12&gt;, &lt;2, 48&gt;, &lt;3, 64&gt;]</td><td>✓</td><td></td><td>✓</td></tr><tr><td rowspan="2">{1,0}</td><td>( a 2a 0 )</td><td>8</td><td>[&lt;0, 1&gt;, &lt;2, 24&gt;]</td><td></td><td></td><td></td></tr><tr><td>( a 2a e )</td><td>2</td><td>[&lt;0, 1&gt;, &lt;2, 4&gt;, &lt;3, 20&gt;]</td><td></td><td></td><td></td></tr><tr><td rowspan="2">{1,1}</td><td>( a 0 2a )</td><td>8</td><td>[&lt;0, 1&gt;, &lt;1, 4&gt;, &lt;2, 24&gt;, &lt;3, 96&gt;]</td><td></td><td></td><td>✓</td></tr><tr><td>( 0 e 0 )</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td rowspan="12">4</td><td rowspan="12">{1,0}</td><td>( a 2a 0 0 )</td><td>32</td><td>[&lt;0, 1&gt;, &lt;2, 24&gt;]</td><td></td><td></td><td></td></tr><tr><td>( a a 2a 2a )</td><td>16</td><td>[&lt;0, 1&gt;, &lt;4, 24&gt;]</td><td></td><td></td><td></td></tr><tr><td>( a 2a e 0 )</td><td>4</td><td>[&lt;0, 1&gt;, &lt;2, 4&gt;, &lt;3, 20&gt;]</td><td></td><td></td><td></td></tr><tr><td>( a 2a e e )</td><td>4</td><td>[&lt;0, 1&gt;, &lt;2, 4&gt;, &lt;3, 20&gt;]</td><td></td><td></td><td></td></tr><tr><td>( a c<sub>11</sub> c<sub>21</sub> c<sub>21</sub> )</td><td>4</td><td>[&lt;0, 1&gt;, &lt;4, 24&gt;]</td><td></td><td></td><td></td></tr><tr><td>( a c<sub>14</sub> c<sub>22</sub> c<sub>21</sub> )</td><td>2</td><td>[&lt;0, 1&gt;, &lt;4, 24&gt;]</td><td></td><td></td><td></td></tr><tr><td>( a c<sub>12</sub> c<sub>22</sub> c<sub>22</sub> )</td><td>4</td><td>[&lt;0, 1&gt;, &lt;4, 24&gt;]</td><td></td><td></td><td></td></tr><tr><td>( a c<sub>13</sub> 2a c<sub>21</sub> )</td><td>4</td><td>[&lt;0, 1&gt;, &lt;4, 24&gt;]</td><td></td><td></td><td></td></tr><tr><td>( a c<sub>11</sub> 2a c<sub>22</sub> )</td><td>4</td><td>[&lt;0, 1&gt;, &lt;4, 24&gt;]</td><td></td><td></td><td></td></tr><tr><td>( a 2a e 2e )</td><td>4</td><td>[&lt;0, 1&gt;, &lt;2, 4&gt;, &lt;4, 20&gt;]</td><td></td><td></td><td></td></tr><tr><td rowspan="2">{2,0}</td><td>( a 0 2a 0 )</td><td>32</td><td>[&lt;0, 1&gt;, &lt;2, 48&gt;, &lt;4, 576&gt;]</td><td>✓</td><td></td><td>✓</td></tr><tr><td>( 0 a 0 2a )</td><td></td><td></td><td></td><td></td><td></td></tr></tbody></table>
<table><caption>**Table 3.** Self-orthogonal codes of length $n \le 3$ over $E_7$.</caption><thead><tr><th>Length</th><th>Type</th><th>Generator Matrices</th><th>|Aut(C)|</th><th>Weight Distribution</th><th>RSD Code</th><th>LSD Code</th><th>SD Code</th></tr></thead><tbody><tr><td>1</td><td>{0,1}</td><td>(e)</td><td>2</td><td>[&lt;0, 1&gt;, &lt;1, 6&gt;]</td><td>✓</td><td></td><td>✓</td></tr><tr><td rowspan="2">2</td><td>{0,1}</td><td>(e 0)</td><td>4</td><td>[&lt;0, 1&gt;, &lt;1, 6&gt;]</td><td></td><td></td><td></td></tr><tr><td>{0,2}</td><td>eI<sub>2</sub></td><td>8</td><td>[&lt;0, 1&gt;, &lt;1, 12&gt;, &lt;2, 36&gt;]</td><td>✓</td><td></td><td>✓</td></tr><tr><td rowspan="7">3</td><td>{0,1}</td><td>( e 0 0 )</td><td>16</td><td>[&lt;0, 1&gt;, &lt;1, 6&gt;]</td><td></td><td></td><td></td></tr><tr><td>{0,2}</td><td>( e 0 0 )<br>0 e 0</td><td>16</td><td>[&lt;0, 1&gt;, &lt;1, 12&gt;, &lt;2, 36&gt;]</td><td></td><td></td><td></td></tr><tr><td>{0,3}</td><td>eI<sub>3</sub></td><td>48</td><td>[&lt;0, 1&gt;, &lt;1, 18&gt;, &lt;2, 108&gt;, &lt;3, 216&gt;]</td><td>✓</td><td></td><td>✓</td></tr><tr><td rowspan="3">{1,0}</td><td>( a 2a 3a )</td><td>6</td><td>[&lt;0, 1&gt;, &lt;3, 48&gt;]</td><td></td><td></td><td></td></tr><tr><td>( 2a b c<sub>35</sub> )</td><td>2</td><td>[&lt;0, 1&gt;, &lt;3, 48&gt;]</td><td></td><td></td><td></td></tr><tr><td>( 4a 6b c<sub>53</sub> )</td><td>2</td><td>[&lt;0, 1&gt;, &lt;3, 48&gt;]</td><td></td><td></td><td></td></tr><tr><td rowspan="2">{1,1}</td><td>( a 2a 3a )</td><td rowspan="2">6</td><td rowspan="2">[&lt;0, 1&gt;, &lt;2, 18&gt;, &lt;3, 324&gt;]</td><td rowspan="2"></td><td rowspan="2"></td><td rowspan="2">✓</td></tr><tr><td>( 0 e 4e )</td></tr></tbody></table>

## 6. Conclusions and Open Problems

In this paper, we have given a mass formula to classify certain self-orthogonal codes over the non-unitary non-commutative ring $E_p$, with $p$ an odd prime. Particularly, we were considering the two main cases of classification self-orthogonal codes, and SD codes under monomial action. In the previous section, concrete classifications in short lengths are given. Extension of these results to higher lengths would require more programming or more computing power. Similar theoretical and experimental questions remain open for other non-unitary non-commutative rings in the Rhagavandran list [12,22] in an odd characteristic.

**Author Contributions:** Conceptualization, A.A. (Adel Alahmadi), R.A.B., L.G. and P.S.; methodology, A.A. (Adel Alahmadi), R.A.B., L.G. and P.S.; validation, A.A. (Adel Alahmadi), A.A. (Altaf Alshuhail), R.A.B., L.G. and P.S.; investigation, A.A. (Adel Alahmadi), A.A. (Altaf Alshuhail), R.A.B., L.G. and P.S.; resources, A.A. (Adel Alahmadi); writing—original draft preparation, A.A. (Adel Alahmadi), A.A. (Altaf Alshuhail) and P.S.; writing—review and editing, R.A.B. and L.G.; supervision, A.A. (Adel Alahmadi) and P.S. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research was funded by The Deanship of Scientific Research (DSR) at King Abdulaziz University (KAU), Jeddah, Saudi Arabia, under grant no. (KEP.-PhD: 99-130-1443).

**Data Availability Statement:** Data are available upon request to the corresponding author.

**Acknowledgments:** The Deanship of Scientific Research (DSR) at King Abdulaziz University (KAU), Jeddah, Saudi Arabia has funded this project, under grant no. (KEP.-PhD: 99-130-1443).

**Conflicts of Interest:** The authors declare no conflict of interest.

## References

1. Conway, J.H.; Pless, V. On the enumeration of self-dual codes. *J. Comb. Theory Ser. A* **1980**, 28, 26–53. [CrossRef]

2. Huffman, W.C.; Pless, V. *Fundamentals of Error-Correcting Codes*; Cambridge University Press: Cambridge, MA, USA, 2003.

3. Leon, J.S.; Pless, V.; Sloane, N.J.A. Self-dual codes over GF(5). *J. Comb. Theory Ser. A* **1982**, 32, 178–194. [CrossRef]

4. Mallows, C.L.; Pless, V.; Sloane, N.J.A. Self-dual codes over GF(3). *SIAM J. Appl. Math.* **1976**, 31, 649–666. [CrossRef]

5. Rains, E.M.; Sloane, N.J.A. Self-dual codes, Chapter 3. In *Handbook of Coding Theory, I*; Pless, V.S., Hufman, W.C., Eds.; Elsevier: North Holland, The Netherlands, 1998.

6. Balmaceda, J.M.; Betty, R.A.; Nemenzo, F. Mass formula for self-dual codes over $\mathbb{Z}_{p^2}$. *Discret. Math.* **2008**, 308, 2984–3002. [CrossRef]

7. Betty, R.A.; Munemasa, A. Mass formula for self-orthogonal codes over $\mathbb{Z}_{p^2}$. *J. Comb. Inf. Syst. Sci.* **2009**, 34, 51–66.

8. Choi, W.-H. Mass formula of self-dual codes over galois rings GR(p², 2). *Korean J. Math.* **2016**, 24, 751–764. [CrossRef]

9. Gaborit, P. Mass formulas for self-dual codes over $\mathbb{Z}_4$ and $F_q + uF_q$ rings. *IEEE Trans. Inf. Theory* **1996**, 42, 1222–1228. [CrossRef]

10. Dougherty, S.T.; Gaborit, P.; Harada, M.; Solé, P. Type II codes over $\mathbb{F}_2 + u\mathbb{F}_2$. *IEEE Trans. Inf. Theory* **1999**, 45, 32–45. [CrossRef]
11. Fields, J.; Gaborit, P.; Leon, J.; Pless, V. All self-dual $\mathbb{Z}_4$ codes of length 15 or less are known. *IEEE Trans. Inf. Theory* **1998**, *44*, 311–322. [CrossRef]

12. Fine, B. Classification of finite rings of order $p^2$. *Math. Mag.* **1993**, *66*, 248–252. [CrossRef]

13. 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. [CrossRef]

14. 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. [CrossRef]

15. Alahmadi, A.; Melaibari, A.; Solé, P. Duality of codes over non-unital rings of order four. *IEEE Access* **2023**, *11*, 53120–53133. [CrossRef]

16. Bosma, W.; Cannon, J.; Playoust, C. The Magma algebra system. I. The user language. *J. Symb. Comput.* **1997**, *24*, 235–265. [CrossRef]

17. Alahmadi, A.; Altassan, A.; Basaffar, W.; Shoaib, H.; Bonnecaze, A.; Solé, P. Type IV codes over a non-unital ring. *J. Algebra Its Appl.* **2022**, *21*, 2250142. [CrossRef]

18. Kim, K.H.; Park, Y.H. The mass formula of self-orthogonal codes over GF($q$). *Korean J. Math.* **2017**, *25*, 201–209.

19. Pless, V. Number of isotropic subspaces in a finite geometry. *Atti Della Accad. Naz. Dei Lincei-Rend.-Cl. Sci.-Fis.-Mat. Nat.* **1965**, *39*, 418–421.

20. Pless, V. On the uniqueness of the golay codes. *J. Comb. Theory* **1968**, *5*, 215–228. [CrossRef]

21. Van Lint, J.; Wilson, R. *A Course in Combinatorics*, 2nd ed.; Cambridge University Press: Cambridge, UK, 2001.

22. Raghavendran, R. A class of finite rings. *Compos. Math.* **1970**, *22*, 49–57.

**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.