# The build up construction for codes over a non-commutative non-unitary ring of order 9

Adel Alahmadi, Tamador Alihia, Patrick Solé

► To cite this version:

Adel Alahmadi, Tamador Alihia, Patrick Solé. The build up construction for codes over a non-commutative non-unitary ring of order 9. AIMS Mathematics, 2024, 9, pp.18278 - 18307. 10.3934/math.2024892. hal-04598333

HAL Id: hal-04598333

https://hal.science/hal-04598333

Submitted on 3 Jun 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 Attribution 4.0 International License
# The build up construction for codes over a non-commutative non-unitary ring of order 9

Adel Alahmadi, Tamador Alihia, Patrick Solé

► To cite this version:

Adel Alahmadi, Tamador Alihia, Patrick Solé. The build up construction for codes over a non-commutative non-unitary ring of order 9. AIMS Mathematics, 2024, 9, pp.18278 - 18307. 10.3934/math.2024892. hal-04598333

HAL Id: hal-04598333

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

Submitted on 3 Jun 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 Attribution 4.0 International License
<figure><img src="image_2.png" /></figure>

Research article

# The build up construction for codes over a non-commutative non-unitary ring of order 9

Adel Alahmadi<fnref n="1" />,*, Tamador Alihia<fnref n="1" />,<fnref n="2" /> and Patrick Solé<fnref n="3" />

**Abstract:** The build-up method is a powerful class of propagation rules that generate self-dual codes over finite fields and unitary rings. Recently, it was extended to non-unitary rings of order four to generate quasi self-dual codes. In the present paper we introduce three such propagation rules to generate self-orthogonal, one-sided self-dual, and self-dual codes over a special non-unitary ring of order 9. As an application, we classify the three categories of codes in lengths at most 7, up to monomial equivalence. Mass formulas for the three classes of codes considered ensure that the classification is complete.

**Keywords:** non-unitary rings; self-dual codes; build-up construction

**Mathematics Subject Classification:** 94B05, 16D10

## 1. Introduction

Historically, the classification of self-dual codes over unitary rings and finite fields has rested on two pillars: an algorithm to generate short length codes, and a mass formula to signal the completion of the classification [7, 15]. While the pionneers (Conway, Pless Sloane, and so on), were using various ad hoc methods like glueing theory to generate short codes [17], in recent years the *build up method* emerged as a systematic generation method [10, 13, 14]. By using a recursion on generator matrices, from a self-dual code of length *n*, it creates a self-dual code of length *n* + *h* (with *h* small and fixed). This is sometimes called a *propagation rule* of order *h*. For concreteness, one may take *h* = 2 for binary codes [6] and codes over a certain ring of order 4 [12], and *h* = 4 for ternary codes [13]. In [5], this technique was applied to a commutative non-unital ring with success.

<footnote n="1">¹ Research Group of Algebraic Structures and Applications, Department of Mathematics, Faculty of Science, King Abdulaziz University, Jeddah 21589, Saudi Arabia</footnote>

<footnote n="2">² Department of Mathematics, College of Science, Qassim University, Qassim 52373, Saudi Arabia</footnote>

<footnote n="3">³ I2M, (Aix Marseille University, CNRS, Centrale Marseille), Marseilles, France</footnote>

<footnote>* Correspondence: Email: analahmadi@kau.edu.sa</footnote>
<figure><img src="image_2.png" /></figure>

Research article

# The build up construction for codes over a non-commutative non-unitary ring of order 9

Adel Alahmadi<fnref n="1" />,*, Tamador Alihia<fnref n="1" />,<fnref n="2" /> and Patrick Solé<fnref n="3" />

**Abstract:** The build-up method is a powerful class of propagation rules that generate self-dual codes over finite fields and unitary rings. Recently, it was extended to non-unitary rings of order four to generate quasi self-dual codes. In the present paper we introduce three such propagation rules to generate self-orthogonal, one-sided self-dual, and self-dual codes over a special non-unitary ring of order 9. As an application, we classify the three categories of codes in lengths at most 7, up to monomial equivalence. Mass formulas for the three classes of codes considered ensure that the classification is complete.

**Keywords:** non-unitary rings; self-dual codes; build-up construction

**Mathematics Subject Classification:** 94B05, 16D10

## 1. Introduction

Historically, the classification of self-dual codes over unitary rings and finite fields has rested on two pillars: an algorithm to generate short length codes, and a mass formula to signal the completion of the classification [7, 15]. While the pionneers (Conway, Pless Sloane, and so on), were using various ad hoc methods like glueing theory to generate short codes [17], in recent years the *build up method* emerged as a systematic generation method [10, 13, 14]. By using a recursion on generator matrices, from a self-dual code of length *n*, it creates a self-dual code of length *n* + *h* (with *h* small and fixed). This is sometimes called a *propagation rule* of order *h*. For concreteness, one may take *h* = 2 for binary codes [6] and codes over a certain ring of order 4 [12], and *h* = 4 for ternary codes [13]. In [5], this technique was applied to a commutative non-unital ring with success.

<footnote n="1">¹ Research Group of Algebraic Structures and Applications, Department of Mathematics, Faculty of Science, King Abdulaziz University, Jeddah 21589, Saudi Arabia</footnote>

<footnote n="2">² Department of Mathematics, College of Science, Qassim University, Qassim 52373, Saudi Arabia</footnote>

<footnote n="3">³ I2M, (Aix Marseille University, CNRS, Centrale Marseille), Marseilles, France</footnote>

<footnote>* Correspondence: Email: analahmadi@kau.edu.sa</footnote>
In this paper, we initiate the study of self-dual codes over the ring $E_3$, defined on two generators $a, b$ by the relations

$$E_3 = \langle a, b | 3a = 3b = 0, a^2 = a, b^2 = b, ab = a, ba = b \rangle.$$

This ring is a non-unital, non commutative ring of order 9. This notation is consistent with the classification of rings of order $p^2$ for $p$, a prime of [9]. While the use of finite fields as alphabets in Coding Theory dates back to its inception in the 1940's, and the use of finite rings from the 1980's, it is only in recent years that non-unitary rings have been used as alphabets at the cost of theoretical hurdles [1–4].

We will use a definition of self-dual codes for non-commutative rings introduced in [2]. This new notion of self-dual codes coincides with that of QSD codes for that special ring. Also of interest are left self-dual (LSD) and right self-dual (RSD) codes, in agreement with the non-commutativity of the alphabet ring. In particular, we modify the propagation rules of [1] to produce self-orthogonal and self-dual codes, as well as one-sided self-dual codes. As an application, we classify the three types of codes considered in lengths at most 7. We derive mass formulas for the these three types that guarantee that the classification is complete.

The material is arranged as follows. The next section contains the preliminary notions and notations needed in the later sections. Section 3 derives building-up constructions for the three classes of codes mentioned. Section 4 applies these propagation rules to concrete classifications in short lengths. Section 5 concludes the article.

## 2. Preliminaries

Let $\mathbb{F}_3^n$ represent the vector space of $n$-tuples over the 3-element field $\mathbb{F}_3$. A ternary linear code $C$ of length $n$ and dimension $k$, denoted shortly as an $[n, k]_3$ code, is a $k$-dimensional subspace of $\mathbb{F}_3^n$.

The number of nonzero coordinates of a vector $\mathbf{x} \in \mathbb{F}_3^n$ is called its Hamming weight $wt(\mathbf{x})$. The Hamming distance $d(\mathbf{x}, \mathbf{y})$ between two vectors $\mathbf{x}, \mathbf{y} \in \mathbb{F}_3^n$ is defined by $d(\mathbf{x}, \mathbf{y}) = wt(\mathbf{x} - \mathbf{y})$. The minimum distance of a linear code $C$ is

$$d(C) = \min \{d(\mathbf{x}, \mathbf{y}) | \mathbf{x}, \mathbf{y} \in C, \mathbf{x} \neq \mathbf{y}\} = \min \{wt(\mathbf{c}) | \mathbf{c} \in C, \mathbf{c} \neq \mathbf{0}\}$$

A 3-ary linear code of length $n$, dimension $k$, and minimum distance $d$ is said to be an $[n, k, d]_3$ code.

### 2.1. Ring theory

Following [9], we define the ring $E_3$ of order 9 on two generators $a$ and $b$ by the relations:

$$E_3 = \langle a, b | 3a = 3b = 0, a^2 = a, b^2 = b, ab = a, ba = b \rangle.$$

Thus, $E_3$ has characteristic three, and consists of nine elements

$$E_3 = \{0, a, b, c, d, e, f, g, h\},$$

where

$$c = a + b, \quad d = 2b, \quad e = 2a, \quad f = e + b, \quad g = a + d, \quad \text{and} \quad h = d + e.$$
In this paper, we initiate the study of self-dual codes over the ring $E_3$, defined on two generators $a, b$ by the relations

$$E_3 = \langle a, b | 3a = 3b = 0, a^2 = a, b^2 = b, ab = a, ba = b \rangle.$$

This ring is a non-unital, non commutative ring of order 9. This notation is consistent with the classification of rings of order $p^2$ for $p$, a prime of [9]. While the use of finite fields as alphabets in Coding Theory dates back to its inception in the 1940's, and the use of finite rings from the 1980's, it is only in recent years that non-unitary rings have been used as alphabets at the cost of theoretical hurdles [1–4].

We will use a definition of self-dual codes for non-commutative rings introduced in [2]. This new notion of self-dual codes coincides with that of QSD codes for that special ring. Also of interest are left self-dual (LSD) and right self-dual (RSD) codes, in agreement with the non-commutativity of the alphabet ring. In particular, we modify the propagation rules of [1] to produce self-orthogonal and self-dual codes, as well as one-sided self-dual codes. As an application, we classify the three types of codes considered in lengths at most 7. We derive mass formulas for the these three types that guarantee that the classification is complete.

The material is arranged as follows. The next section contains the preliminary notions and notations needed in the later sections. Section 3 derives building-up constructions for the three classes of codes mentioned. Section 4 applies these propagation rules to concrete classifications in short lengths. Section 5 concludes the article.

## 2. Preliminaries

Let $\mathbb{F}_3^n$ represent the vector space of $n$-tuples over the 3-element field $\mathbb{F}_3$. A ternary linear code $C$ of length $n$ and dimension $k$, denoted shortly as an $[n, k]_3$ code, is a $k$-dimensional subspace of $\mathbb{F}_3^n$.

The number of nonzero coordinates of a vector $\mathbf{x} \in \mathbb{F}_3^n$ is called its Hamming weight $wt(\mathbf{x})$. The Hamming distance $d(\mathbf{x}, \mathbf{y})$ between two vectors $\mathbf{x}, \mathbf{y} \in \mathbb{F}_3^n$ is defined by $d(\mathbf{x}, \mathbf{y}) = wt(\mathbf{x} - \mathbf{y})$. The minimum distance of a linear code $C$ is

$$d(C) = \min \{d(\mathbf{x}, \mathbf{y}) | \mathbf{x}, \mathbf{y} \in C, \mathbf{x} \neq \mathbf{y}\} = \min \{wt(\mathbf{c}) | \mathbf{c} \in C, \mathbf{c} \neq \mathbf{0}\}$$

A 3-ary linear code of length $n$, dimension $k$, and minimum distance $d$ is said to be an $[n, k, d]_3$ code.

### 2.1. Ring theory

Following [9], we define the ring $E_3$ of order 9 on two generators $a$ and $b$ by the relations:

$$E_3 = \langle a, b | 3a = 3b = 0, a^2 = a, b^2 = b, ab = a, ba = b \rangle.$$

Thus, $E_3$ has characteristic three, and consists of nine elements

$$E_3 = \{0, a, b, c, d, e, f, g, h\},$$

where

$$c = a + b, \quad d = 2b, \quad e = 2a, \quad f = e + b, \quad g = a + d, \quad \text{and} \quad h = d + e.$$
These definitions immediately lead to the addition and the multiplication tables given as follow.

<table><caption>**Table 1.** Addition and multiplication tables for $E_3$.</caption><thead><tr><th>+</th><th>0</th><th>a</th><th>b</th><th>c</th><th>d</th><th>e</th><th>f</th><th>g</th><th>h</th></tr></thead><tbody><tr><th>0</th><td>0</td><td>a</td><td>b</td><td>c</td><td>d</td><td>e</td><td>f</td><td>g</td><td>h</td></tr><tr><th>a</th><td>a</td><td>e</td><td>c</td><td>f</td><td>g</td><td>0</td><td>b</td><td>h</td><td>d</td></tr><tr><th>b</th><td>b</td><td>c</td><td>d</td><td>g</td><td>0</td><td>f</td><td>h</td><td>a</td><td>e</td></tr><tr><th>c</th><td>c</td><td>f</td><td>g</td><td>h</td><td>a</td><td>b</td><td>d</td><td>e</td><td>0</td></tr><tr><th>d</th><td>d</td><td>g</td><td>0</td><td>a</td><td>b</td><td>h</td><td>e</td><td>c</td><td>f</td></tr><tr><th>e</th><td>e</td><td>0</td><td>f</td><td>b</td><td>h</td><td>a</td><td>c</td><td>d</td><td>g</td></tr><tr><th>f</th><td>f</td><td>b</td><td>h</td><td>d</td><td>e</td><td>c</td><td>g</td><td>0</td><td>a</td></tr><tr><th>g</th><td>g</td><td>h</td><td>a</td><td>e</td><td>c</td><td>d</td><td>0</td><td>f</td><td>b</td></tr><tr><th>h</th><td>h</td><td>d</td><td>e</td><td>0</td><td>f</td><td>g</td><td>a</td><td>b</td><td>c</td></tr></tbody></table><table><thead><tr><th>×</th><th>0</th><th>a</th><th>b</th><th>c</th><th>d</th><th>e</th><th>f</th><th>g</th><th>h</th></tr></thead><tbody><tr><th>0</th><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr><th>a</th><td>0</td><td>a</td><td>a</td><td>e</td><td>e</td><td>e</td><td>0</td><td>0</td><td>a</td></tr><tr><th>b</th><td>0</td><td>b</td><td>b</td><td>d</td><td>d</td><td>d</td><td>0</td><td>0</td><td>b</td></tr><tr><th>c</th><td>0</td><td>c</td><td>c</td><td>h</td><td>h</td><td>h</td><td>0</td><td>0</td><td>c</td></tr><tr><th>d</th><td>0</td><td>d</td><td>d</td><td>b</td><td>b</td><td>b</td><td>0</td><td>0</td><td>d</td></tr><tr><th>e</th><td>0</td><td>e</td><td>e</td><td>a</td><td>a</td><td>a</td><td>0</td><td>0</td><td>e</td></tr><tr><th>f</th><td>0</td><td>f</td><td>f</td><td>g</td><td>g</td><td>g</td><td>0</td><td>0</td><td>f</td></tr><tr><th>g</th><td>0</td><td>g</td><td>g</td><td>f</td><td>f</td><td>f</td><td>0</td><td>0</td><td>g</td></tr><tr><th>h</th><td>0</td><td>h</td><td>h</td><td>c</td><td>c</td><td>c</td><td>0</td><td>0</td><td>h</td></tr></tbody></table>

We may deduce from the multiplication table that this ring is non-commutative without identity and has unique maximal ideal $J_3 = \{0, f, g = 2f\}$ with residue field $E_3/J_3 \cong \mathbb{F}_3$.

As a result, we have the following $f$-adic decomposition. It can be checked by inspection that any element $i \in E_3$ can be expressed as $i = ax + fy$, for unique scalars $x, y \in \mathbb{F}_3$.

We have defined a natural action of $\mathbb{F}_3$ on the ring $E_3$ by the rule

$$\mathbf{r}0 = 0\mathbf{r} = 0, \quad \mathbf{r}1 = 1\mathbf{r} = \mathbf{r}, \quad \text{and} \quad \mathbf{r}2 = \mathbf{r} + \mathbf{r} = 2\mathbf{r} \quad \text{for all } \mathbf{r} \in E_3.$$

Note that, for all $\mathbf{r} \in E_3$, $\mathbf{x}, \mathbf{y} \in \mathbb{F}_3$, this action is “distributive” in the sense that $\mathbf{r}(\mathbf{x} \oplus \mathbf{y}) = \mathbf{r}\mathbf{x} + \mathbf{r}\mathbf{y}$, where $\oplus$ denote the addition in $\mathbb{F}_3$. When $\mathbf{x} \in \mathbb{F}_3^n$, and $\mathbf{r} \in E_3^n$, we will occasionally use the inner product notation $(\mathbf{x}, \mathbf{r})$ to indicate

$$(\mathbf{x}, \mathbf{r}) = x_1 r_1 + \cdots + x_n r_n.$$

We define the reduction map modulo $S$ as $\pi : E_3 \to E_3/J_3 \cong \mathbb{F}_3$ by

$$\pi(0) = \pi(f) = \pi(g) = 0,$$

$$\pi(a) = \pi(b) = \pi(h) = 1,$$

$$\pi(e) = \pi(d) = \pi(c) = 2.$$

This map is extended in the natural way in a map from $E_3^n$ to $\mathbb{F}_3^n$.

## 2.2. Codes over $E_3$

A linear $E_3$-code $C$ of length $n$ is a one-sided $E_3$-submodule of $E_3^n$. It may be thought of as the $E_3$-span of the rows of a matrix called a generator matrix (we assume that these rows belong to $C$). There are two ternary codes of length $n$ associated with the code $C$. The **residue code** $\text{res}(C)$ is just $\pi(C)$, and the torsion code $\text{tor}(C)$ is $\{\mathbf{x} \in \mathbb{F}_3^n | f\mathbf{x} \in C\}$.
These definitions immediately lead to the addition and the multiplication tables given as follow.

<table><caption>**Table 1.** Addition and multiplication tables for $E_3$.</caption><thead><tr><th>+</th><th>0</th><th>a</th><th>b</th><th>c</th><th>d</th><th>e</th><th>f</th><th>g</th><th>h</th></tr></thead><tbody><tr><th>0</th><td>0</td><td>a</td><td>b</td><td>c</td><td>d</td><td>e</td><td>f</td><td>g</td><td>h</td></tr><tr><th>a</th><td>a</td><td>e</td><td>c</td><td>f</td><td>g</td><td>0</td><td>b</td><td>h</td><td>d</td></tr><tr><th>b</th><td>b</td><td>c</td><td>d</td><td>g</td><td>0</td><td>f</td><td>h</td><td>a</td><td>e</td></tr><tr><th>c</th><td>c</td><td>f</td><td>g</td><td>h</td><td>a</td><td>b</td><td>d</td><td>e</td><td>0</td></tr><tr><th>d</th><td>d</td><td>g</td><td>0</td><td>a</td><td>b</td><td>h</td><td>e</td><td>c</td><td>f</td></tr><tr><th>e</th><td>e</td><td>0</td><td>f</td><td>b</td><td>h</td><td>a</td><td>c</td><td>d</td><td>g</td></tr><tr><th>f</th><td>f</td><td>b</td><td>h</td><td>d</td><td>e</td><td>c</td><td>g</td><td>0</td><td>a</td></tr><tr><th>g</th><td>g</td><td>h</td><td>a</td><td>e</td><td>c</td><td>d</td><td>0</td><td>f</td><td>b</td></tr><tr><th>h</th><td>h</td><td>d</td><td>e</td><td>0</td><td>f</td><td>g</td><td>a</td><td>b</td><td>c</td></tr></tbody></table><table><thead><tr><th>×</th><th>0</th><th>a</th><th>b</th><th>c</th><th>d</th><th>e</th><th>f</th><th>g</th><th>h</th></tr></thead><tbody><tr><th>0</th><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr><th>a</th><td>0</td><td>a</td><td>a</td><td>e</td><td>e</td><td>e</td><td>0</td><td>0</td><td>a</td></tr><tr><th>b</th><td>0</td><td>b</td><td>b</td><td>d</td><td>d</td><td>d</td><td>0</td><td>0</td><td>b</td></tr><tr><th>c</th><td>0</td><td>c</td><td>c</td><td>h</td><td>h</td><td>h</td><td>0</td><td>0</td><td>c</td></tr><tr><th>d</th><td>0</td><td>d</td><td>d</td><td>b</td><td>b</td><td>b</td><td>0</td><td>0</td><td>d</td></tr><tr><th>e</th><td>0</td><td>e</td><td>e</td><td>a</td><td>a</td><td>a</td><td>0</td><td>0</td><td>e</td></tr><tr><th>f</th><td>0</td><td>f</td><td>f</td><td>g</td><td>g</td><td>g</td><td>0</td><td>0</td><td>f</td></tr><tr><th>g</th><td>0</td><td>g</td><td>g</td><td>f</td><td>f</td><td>f</td><td>0</td><td>0</td><td>g</td></tr><tr><th>h</th><td>0</td><td>h</td><td>h</td><td>c</td><td>c</td><td>c</td><td>0</td><td>0</td><td>h</td></tr></tbody></table>

We may deduce from the multiplication table that this ring is non-commutative without identity and has unique maximal ideal $J_3 = \{0, f, g = 2f\}$ with residue field $E_3/J_3 \cong \mathbb{F}_3$.

As a result, we have the following $f$-adic decomposition. It can be checked by inspection that any element $i \in E_3$ can be expressed as $i = ax + fy$, for unique scalars $x, y \in \mathbb{F}_3$.

We have defined a natural action of $\mathbb{F}_3$ on the ring $E_3$ by the rule

$$ \mathbf{r}0 = 0\mathbf{r} = 0, \quad \mathbf{r}1 = 1\mathbf{r} = \mathbf{r}, \quad \text{and} \quad \mathbf{r}2 = \mathbf{r} + \mathbf{r} = 2\mathbf{r} \quad \text{for all} \quad \mathbf{r} \in E_3. $$

Note that, for all $\mathbf{r} \in E_3$, $\mathbf{x}, \mathbf{y} \in \mathbb{F}_3$, this action is “distributive” in the sense that $\mathbf{r}(\mathbf{x} \oplus \mathbf{y}) = \mathbf{r}\mathbf{x} + \mathbf{r}\mathbf{y}$, where $\oplus$ denote the addition in $\mathbb{F}_3$. When $\mathbf{x} \in \mathbb{F}_3^n$, and $\mathbf{r} \in E_3^n$, we will occasionally use the inner product notation $(\mathbf{x}, \mathbf{r})$ to indicate

$$ (\mathbf{x}, \mathbf{r}) = x_1 r_1 + \cdots + x_n r_n. $$

We define the reduction map modulo $S$ as $\pi : E_3 \to E_3/J_3 \cong \mathbb{F}_3$ by

$$ \pi(0) = \pi(f) = \pi(g) = 0, $$

$$ \pi(a) = \pi(b) = \pi(h) = 1, $$

$$ \pi(e) = \pi(d) = \pi(c) = 2. $$

This map is extended in the natural way in a map from $E_3^n$ to $\mathbb{F}_3^n$.

## 2.2. Codes over $E_3$

A linear $E_3$-code $C$ of length $n$ is a one-sided $E_3$-submodule of $E_3^n$. It may be thought of as the $E_3$-span of the rows of a matrix called a generator matrix (we assume that these rows belong to $C$). There are two ternary codes of length $n$ associated with the code $C$. The **residue code** $\text{res}(C)$ is just $\pi(C)$, and the torsion code $\text{tor}(C)$ is $\{\mathbf{x} \in \mathbb{F}_3^n | f\mathbf{x} \in C\}$.
It is easy to verify that $\mathrm{res}(C) \subseteq \mathrm{tor}(C)$ [3]. We denote the dimension of the residue code by $k_1$, and the dimension of the torsion code by $k_1 + k_2$. Such a code $C$ is of type $\{k_1, k_2\}$. A straightforward application of the first isomorphism theorem [3] shows that

$$|C| = |\mathrm{res}(C)| |\mathrm{tor}(C)| = 3^{2k_1+k_2}.$$

By a result similar to [3, Theorem 1], we can show that every code $C$ over $E_3$ of length $n$ and type $\{k_1, k_2\}$ is equivalent to a code with a generator matrix

$$\begin{bmatrix} aI_{k_1} & aX & Y \\ 0 & fI_{k_2} & fZ \end{bmatrix},$$

where $Y$ is a matrix with entries in $E_3$, $X$ and $Z$ are matrices with entries from $\mathbb{F}_3$, and $I_{k_1}, I_{k_2}$ are identity matrices.

In fact, generator matrices of $\mathrm{res}(C)$ and $\mathrm{tor}(C)$ are given by

$$[I_{k_1} \quad X \quad \pi(Y)] \quad \text{and} \quad \begin{bmatrix} I_{k_1} & X & \pi(Y) \\ 0 & I_{k_2} & Z \end{bmatrix},$$

respectively.

Define the inner product of $\mathbf{x}$ and $\mathbf{y}$ in $E_3^n$ as $(\mathbf{x}, \mathbf{y}) = x_1y_1 + x_2y_2 + \cdots + x_ny_n$, where $\mathbf{x} = (x_1, x_2, \ldots, x_n)$ and $\mathbf{y} = (y_1, y_2, \ldots, y_n)$.

The left dual code $C^{\perp L}$ of a code $C$ is the module defined as

$$C^{\perp L} = \{ \mathbf{y} \in E_3^n \mid \forall \mathbf{x} \in C, (\mathbf{y}, \mathbf{x}) = 0 \}.$$

The right dual code $C^{\perp R}$ of a code $C$ is the module defined as:

$$C^{\perp R} = \{ \mathbf{y} \in E_3^n \mid \forall x \in C, (\mathbf{x}, \mathbf{y}) = 0 \}.$$

Thus, the left (respectively, right) dual of a left (respectively, right) module is a left (respectively, right) module.

A left self-dual code $C$ satisfies $C = C^{\perp L}$. Likewise, a right self-dual code $C$ satisfies $C = C^{\perp R}$.

The two-sided dual of $C$, denoted by $C^{\perp}$, is given by $C^{\perp} = C^{\perp L} \cap C^{\perp R}$. We say that a code $C$ is self-dual (SD) iff $C = C^{\perp L} \cap C^{\perp R}$. A code $C$ is self-orthogonal (SO) if for all $x, y \in C, (\mathbf{x}, \mathbf{y}) = 0$.

Clearly, $C$ is a self-orthogonal code $C$, iff $C \subseteq C^{\perp L} \cap C^{\perp R}$.

Two $E_3$-codes are monomially equivalent if there is a monomial transformation of coordinates that maps one to the other. Here a monomial transformation is a matrix with entries in $\mathbb{F}_3$ and with exactly one element per row and per column. The parameters $(n, 3^k, d)$ of an $E_3$-code are identified with that of its image by $\phi$, defined in the next subsection.

## 2.3. Codes over $\mathbb{F}_9$

An additive code $C$ of length $n$ over $\mathbb{F}_9$ is an additive subgroup of $\mathbb{F}_9^n$. Thus, $C$ contains $3^k$ codewords for some integer $0 \le k \le 2n$, and is called an $(n, 3^k)$ code. If, furthermore, $C$ has minimum distance $d$, we write the parameters of $C$ as $(n, 3^k, d)$.
It is easy to verify that $\mathrm{res}(C) \subseteq \mathrm{tor}(C)$ [3]. We denote the dimension of the residue code by $k_1$, and the dimension of the torsion code by $k_1 + k_2$. Such a code $C$ is of type $\{k_1, k_2\}$. A straightforward application of the first isomorphism theorem [3] shows that

$$|C| = |\mathrm{res}(C)| |\mathrm{tor}(C)| = 3^{2k_1+k_2}.$$

By a result similar to [3, Theorem 1], we can show that every code $C$ over $E_3$ of length $n$ and type $\{k_1, k_2\}$ is equivalent to a code with a generator matrix

$$\begin{bmatrix} aI_{k_1} & aX & Y \\ 0 & fI_{k_2} & fZ \end{bmatrix},$$

where $Y$ is a matrix with entries in $E_3$, $X$ and $Z$ are matrices with entries from $\mathbb{F}_3$, and $I_{k_1}, I_{k_2}$ are identity matrices.

In fact, generator matrices of $\mathrm{res}(C)$ and $\mathrm{tor}(C)$ are given by

$$[I_{k_1} \quad X \quad \pi(Y)] \quad \text{and} \quad \begin{bmatrix} I_{k_1} & X & \pi(Y) \\ 0 & I_{k_2} & Z \end{bmatrix},$$

respectively.

Define the inner product of $\mathbf{x}$ and $\mathbf{y}$ in $E_3^n$ as $(\mathbf{x}, \mathbf{y}) = x_1y_1 + x_2y_2 + \cdots + x_ny_n$, where $\mathbf{x} = (x_1, x_2, \dots, x_n)$ and $\mathbf{y} = (y_1, y_2, \dots, y_n)$.

The left dual code $C^{\perp L}$ of a code $C$ is the module defined as

$$C^{\perp L} = \{ \mathbf{y} \in E_3^n \mid \forall \mathbf{x} \in C, (\mathbf{y}, \mathbf{x}) = 0 \}.$$

The right dual code $C^{\perp R}$ of a code $C$ is the module defined as:

$$C^{\perp R} = \{ \mathbf{y} \in E_3^n \mid \forall x \in C, (\mathbf{x}, \mathbf{y}) = 0 \}.$$

Thus, the left (respectively, right) dual of a left (respectively, right) module is a left (respectively, right) module.

A left self-dual code $C$ satisfies $C = C^{\perp L}$. Likewise, a right self-dual code $C$ satisfies $C = C^{\perp R}$.

The two-sided dual of $C$, denoted by $C^{\perp}$, is given by $C^{\perp} = C^{\perp L} \cap C^{\perp R}$. We say that a code $C$ is self-dual (SD) iff $C = C^{\perp L} \cap C^{\perp R}$. A code $C$ is self-orthogonal (SO) if for all $x, y \in C, (\mathbf{x}, \mathbf{y}) = 0$.

Clearly, $C$ is a self-orthogonal code $C$, iff $C \subseteq C^{\perp L} \cap C^{\perp R}$.

Two $E_3$-codes are monomially equivalent if there is a monomial transformation of coordinates that maps one to the other. Here a monomial transformation is a matrix with entries in $\mathbb{F}_3$ and with exactly one element per row and per column. The parameters $(n, 3^k, d)$ of an $E_3$-code are identified with that of its image by $\phi$, defined in the next subsection.

## 2.3. Codes over $\mathbb{F}_9$

An additive code $C$ of length $n$ over $\mathbb{F}_9$ is an additive subgroup of $\mathbb{F}_9^n$. Thus, $C$ contains $3^k$ codewords for some integer $0 \le k \le 2n$, and is called an $(n, 3^k)$ code. If, furthermore, $C$ has minimum distance $d$, we write the parameters of $C$ as $(n, 3^k, d)$.
An additive code $C$ over $\mathbb{F}_9$ can be represented by a $k \times n$ generator matrix with entries from $\mathbb{F}_9$ whose rows span $C$, called a generator matrix. That is, $C$ is the $\mathbb{F}_3$-span of its rows.

Let $\omega \in \mathbb{F}_9$ be such that $\omega^2 = \omega + 1$. Since the polynomial $t^2 - t - 1$ is irreducible over $\mathbb{F}_3$, we can write $\mathbb{F}_9 = \mathbb{F}_3[\omega]$. The trace map, $\mathrm{Tr} : \mathbb{F}_9 \to \mathbb{F}_3$, is defined as $\mathrm{Tr}(x) = x + x^3$.

Every linear $E_3$-code $C$ is attached with an additive $\mathbb{F}_9$-code $\phi(C)$ by the alphabet substitution

$$ 
\begin{aligned}
& 0 \to 0, \quad a \to 2, \quad b \to \omega, \\
& c \to 2 + \omega, \quad d \to 2\omega, \quad e \to 1, \\
& f \to \omega + 1, \quad g \to 2(\omega + 1), \quad h \to 1 + 2\omega,
\end{aligned}
$$

extended naturally to $\mathbb{F}_9^n$. The parameters $(n, 3^k, d)$ of an $E_3$-code are identified with that of its image under $\phi$. It can be checked that, for all $\mathbf{x} \in E_3^n$, we have $\mathrm{Tr}(\phi(\mathbf{x})) = \pi(\mathbf{x})$, and thus $\mathrm{res}(C) = \mathrm{Tr}(\phi(C))$.

Similarly, we see that $\mathrm{tor}(C)$ is the so-called subfield subcode of $\phi(C)$, that is $\mathbb{F}_3^n \cap \phi(C)$.

## 2.4. Weight enumerators

We recall from [17] that the weight enumerator of any linear or additive code $C$ of length $n$ is the polynomial

$$ W_C(\mathbf{x}, \mathbf{y}) = x^n + \sum_{i=1}^{n} A_i x^{n-i} \mathbf{y}^i $$

where the sequence $A_1, \dots, A_n$ is the weight distribution of $C$. That is, $A_i$ is the number of codewords in $C$ of weight $i$.

**Lemma 1.** If $C$ is a linear code of length $n$ over $E_3$ with weight enumerator $W_C(\mathbf{x}, \mathbf{y})$, then the weight enumerator of the dual code $C^\perp$ is given by

$$ W_{C^{\perp}} = 3^{-n} W_C(\mathbf{x} + 8\mathbf{y}, \mathbf{x} - \mathbf{y}). $$

In particular, the weight enumerator of a self-dual code is invariant under the matrix group generated by $\frac{1}{3} \begin{pmatrix} 1 & 8 \\ 1 & -1 \end{pmatrix}$.

*Proof.* The first statement, analogous to the MacWilliams identity for linear codes over $\mathbb{F}_q$, follows from the general theory [17, Theorem 13], since our trace inner product $\phi(C)$ is an $(n, 3^{2k_1+k_2})$ additive code over $\mathbb{F}_9$ with

$$ W_C(\mathbf{x}, \mathbf{y}) = W_{\phi(C)}(\mathbf{x}, \mathbf{y}). $$

The second statement follows from the first, by noticing that, for a self-dual code, we have $W_{C^\perp} = W_C$. $\square$

## 2.5. Mass formulas

Let $\varphi_{n,k}$ denote the number of distinct self-orthogonal ternary codes having parameters $[n, k_1]$ (see [15, Theorem 4.7]). We define the Gaussian coefficient $\binom{k}{r}_3$ for $r \le k$ as

$$ \binom{k}{r}_3 = \frac{(3^k - 1)(3^{k-1} - 1)\dots(3^{k-r+1} - 1)}{(3^r - 1)(3^{r-1} - 1)\dots(3 - 1)} $$
An additive code $C$ over $\mathbb{F}_9$ can be represented by a $k \times n$ generator matrix with entries from $\mathbb{F}_9$ whose rows span $C$, called a generator matrix. That is, $C$ is the $\mathbb{F}_3$-span of its rows.

Let $\omega \in \mathbb{F}_9$ be such that $\omega^2 = \omega + 1$. Since the polynomial $t^2 - t - 1$ is irreducible over $\mathbb{F}_3$, we can write $\mathbb{F}_9 = \mathbb{F}_3[\omega]$. The trace map, $\mathrm{Tr} : \mathbb{F}_9 \to \mathbb{F}_3$, is defined as $\mathrm{Tr}(x) = x + x^3$.

Every linear $E_3$-code $C$ is attached with an additive $\mathbb{F}_9$-code $\phi(C)$ by the alphabet substitution

$$ 
\begin{array}{l}
0 \to 0, \quad a \to 2, \quad b \to \omega, \\
c \to 2 + \omega, \quad d \to 2\omega, \quad e \to 1, \\
f \to \omega + 1, \quad g \to 2(\omega + 1), \quad h \to 1 + 2\omega,
\end{array}
$$

extended naturally to $\mathbb{F}_9^n$. The parameters $(n, 3^k, d)$ of an $E_3$-code are identified with that of its image under $\phi$. It can be checked that, for all $\mathbf{x} \in E_3^n$, we have $\mathrm{Tr}(\phi(\mathbf{x})) = \pi(\mathbf{x})$, and thus $\mathrm{res}(C) = \mathrm{Tr}(\phi(C))$.

Similarly, we see that $\mathrm{tor}(C)$ is the so-called subfield subcode of $\phi(C)$, that is $\mathbb{F}_3^n \cap \phi(C)$.

## 2.4. Weight enumerators

We recall from [17] that the weight enumerator of any linear or additive code $C$ of length $n$ is the polynomial

$$ W_C(\mathbf{x}, \mathbf{y}) = x^n + \sum_{i=1}^{n} A_i x^{n-i} y^i $$

where the sequence $A_1, \dots, A_n$ is the weight distribution of $C$. That is, $A_i$ is the number of codewords in $C$ of weight $i$.

**Lemma 1.** If $C$ is a linear code of length $n$ over $E_3$ with weight enumerator $W_C(\mathbf{x}, \mathbf{y})$, then the weight enumerator of the dual code $C^\perp$ is given by

$$ W_{C^{\perp}} = 3^{-n} W_C(\mathbf{x} + 8\mathbf{y}, \mathbf{x} - \mathbf{y}). $$

In particular, the weight enumerator of a self-dual code is invariant under the matrix group generated by $\frac{1}{3} \begin{pmatrix} 1 & 8 \\ 1 & -1 \end{pmatrix}$.

*Proof.* The first statement, analogous to the MacWilliams identity for linear codes over $\mathbb{F}_q$, follows from the general theory [17, Theorem 13], since our trace inner product $\phi(C)$ is an $(n, 3^{2k_1+k_2})$ additive code over $\mathbb{F}_9$ with

$$ W_C(\mathbf{x}, \mathbf{y}) = W_{\phi(C)}(\mathbf{x}, \mathbf{y}). $$

The second statement follows from the first, by noticing that, for a self-dual code, we have $W_{C^\perp} = W_C$. $\square$

## 2.5. Mass formulas

Let $\varphi_{n,k}$ denote the number of distinct self-orthogonal ternary codes having parameters $[n, k_1]$ (see [15, Theorem 4.7]). We define the Gaussian coefficient $\binom{k}{r}_3$ for $r \le k$ as

$$ \binom{k}{r}_3 = \frac{(3^k - 1)(3^{k-1} - 1)\dots(3^{k-r+1} - 1)}{(3^r - 1)(3^{r-1} - 1)\dots(3 - 1)} $$
which gives the number of subspaces of dimension $r$ contained in a $k$-dimensional vector space over $\mathbb{F}_3$.

In what follows, we present a mass formula for self-orthogonal codes over $E_3$ which is a characteristic 3-version of [4, Theorem 8].

**Theorem 1.** For all lengths $n$, and for the type $\{k_1, k_2\}$, where $k_1 \ge 1$, the number of self-orthogonal codes over $E_3$ is

$$N_{SO}(n, k_1, k_2) = \varphi_{n,k_1} \binom{n-2k_1}{k_2} 3^{k_1(n-2k_1-k_2)}.$$

If $k_1 = 0$, then

$$N_{SO}(n, 0, k_2) = \binom{n}{k_2}.$$

The following mass formulas follow by the usual counting technique under group action. Corollaries 1–4 are a consequence of Theorem 1.

**Corollary 1.** For given length $n$ and type $\{k_1, k_2\}$, with $0 \le k_1, k_2 \le n$, we have

$$\sum_C \frac{1}{|Aut(C)|} = \frac{N_{SO}(n, k_1, k_2)}{2^n n!},$$

where $C$ runs over distinct representatives of equivalence classes under monomial column permutations of $SO$ codes of length $n$ and type $(k_1, k_2)$.

**Corollary 2.** For given length $n$ and type $\{k_1, k_2\}$, with $k_1 \ge 1$, we have

$$\sum_C \frac{1}{|Aut(C)|} = \frac{N_{SD}(n, k_1, k_2)}{2^n n!} = \frac{\varphi_{n,k_1}}{2^n n!},$$

where $C$ runs over distinct representatives of equivalence classes under monomial column permutations of $SD$ codes of length $n$ and type $\{k_1, k_2\}$.

**Corollary 3.** For given length $n$ and type $\{0, k_2\}$, with $k_2 \ge 1$, we have

$$\sum_C \frac{1}{|Aut(C)|} = \frac{N_{RSD}(n, k_1, k_2)}{2^n n!} = \frac{1}{2^n n!},$$

where $C$ runs over distinct representatives of equivalence classes under monomial column permutations of $RSD$ codes of length $n$ and type $\{0, k_2\}$.

**Corollary 4.** For given length $n$ and type $\{\frac{n}{2}, 0\}$, with $\frac{n}{2} \ge 1$, we have

$$\sum_C \frac{1}{|Aut(C)|} = \frac{N_{LSD}(n, k_1, k_2)}{2^n n!} = \frac{\varphi_{n, \frac{n}{2}}}{2^n n!},$$

where $C$ runs over distinct representatives of equivalence classes under monomial column permutations of $LSD$ codes of length $n$ and type $\{\frac{n}{2}, 0\}$.
which gives the number of subspaces of dimension $r$ contained in a $k$-dimensional vector space over $\mathbb{F}_3$.

In what follows, we present a mass formula for self-orthogonal codes over $E_3$ which is a characteristic 3-version of [4, Theorem 8].

**Theorem 1.** For all lengths $n$, and for the type $\{k_1, k_2\}$, where $k_1 \ge 1$, the number of self-orthogonal codes over $E_3$ is

$$N_{SO}(n, k_1, k_2) = \varphi_{n,k_1} \binom{n-2k_1}{k_2} 3^{k_1(n-2k_1-k_2)}.$$

If $k_1 = 0$, then

$$N_{SO}(n, 0, k_2) = \binom{n}{k_2}.$$

The following mass formulas follow by the usual counting technique under group action. Corollaries 1–4 are a consequence of Theorem 1.

**Corollary 1.** For given length $n$ and type $\{k_1, k_2\}$, with $0 \le k_1, k_2 \le n$, we have

$$\sum_C \frac{1}{|Aut(C)|} = \frac{N_{SO}(n, k_1, k_2)}{2^n n!},$$

where $C$ runs over distinct representatives of equivalence classes under monomial column permutations of $SO$ codes of length $n$ and type $(k_1, k_2)$.

**Corollary 2.** For given length $n$ and type $\{k_1, k_2\}$, with $k_1 \ge 1$, we have

$$\sum_C \frac{1}{|Aut(C)|} = \frac{N_{SD}(n, k_1, k_2)}{2^n n!} = \frac{\varphi_{n,k_1}}{2^n n!},$$

where $C$ runs over distinct representatives of equivalence classes under monomial column permutations of $SD$ codes of length $n$ and type $\{k_1, k_2\}$.

**Corollary 3.** For given length $n$ and type $\{0, k_2\}$, with $k_2 \ge 1$, we have

$$\sum_C \frac{1}{|Aut(C)|} = \frac{N_{RSD}(n, k_1, k_2)}{2^n n!} = \frac{1}{2^n n!},$$

where $C$ runs over distinct representatives of equivalence classes under monomial column permutations of $RSD$ codes of length $n$ and type $\{0, k_2\}$.

**Corollary 4.** For given length $n$ and type $\{\frac{n}{2}, 0\}$, with $\frac{n}{2} \ge 1$, we have

$$\sum_C \frac{1}{|Aut(C)|} = \frac{N_{LSD}(n, k_1, k_2)}{2^n n!} = \frac{\varphi_{n, \frac{n}{2}}}{2^n n!},$$

where $C$ runs over distinct representatives of equivalence classes under monomial column permutations of $LSD$ codes of length $n$ and type $\{\frac{n}{2}, 0\}$.
### 3. Construction

In this section we provide the building-up construction for self-orthogonal codes, (one-sided) self-dual, and self-dual codes over $E_3$. Our building-up construction needs the following theorems.

**Theorem 2.** Let $C$ be an $E_3$ code of length $n$, with residue code $C_1$ and torsion code $C_2$. The following hold:

* If $C$ is a linear code of length $n$ over $E_3$, then $C = aC_1 + fC_2$.

* If $C_1$ is self-orthogonal with $C_1 \subseteq C_2 \subseteq C_1^{\perp}$, then $C$ is a self-orthogonal code.

* If, furthermore, $|C| = 3^n$, then $C_2 = C_1^{\perp}$.

*Proof.* The first statement: It suffices to prove that $C \subseteq aC_1 + fC_2$.

Let $\mathbf{i} \in C$. We can write $\mathbf{i}$ in $f$-adic decomposition form as $\mathbf{i} = a\mathbf{x} + f\mathbf{y}$ where $\mathbf{x}, \mathbf{y} \in \mathbb{F}_3^n$.

Since $\pi(a\mathbf{x} + f\mathbf{y}) = \mathbf{x}$, it follows that $\mathbf{x} \in \mathrm{res}(C)$.

By following [3, Lemma 3], we have $a\mathbf{x} \in C$. Also by a linearity of $C$, we can see that $f\mathbf{y} \in C$, and hence $\mathbf{y} \in \mathrm{tor}(C)$.

This proves that $C \subseteq aC_1 + fC_2$.

The second statement: Suppose $\mathbf{i}_1, \mathbf{i}_2 \in C$. We can write $\mathbf{i}_1$ and $\mathbf{i}_2$ in $f$-adic decomposition form as $\mathbf{i}_1 = a\mathbf{x}_1 + f\mathbf{y}_1$ and $\mathbf{i}_2 = a\mathbf{x}_2 + f\mathbf{y}_2$ where $\mathbf{x}_1, \mathbf{x}_2 \in \mathrm{res}(C)$ and $\mathbf{y}_1, \mathbf{y}_2 \in \mathrm{tor}(C)$. Compute $(\mathbf{i}_1, \mathbf{i}_2)$,

$$ (a\mathbf{x}_1 + f\mathbf{y}_1, a\mathbf{x}_2 + f\mathbf{y}_2) = a^2(\mathbf{x}_1, \mathbf{x}_2) + af(\mathbf{x}_1, \mathbf{y}_2) + fa(\mathbf{x}_2, \mathbf{y}_1) + f^2(\mathbf{y}_1, \mathbf{y}_2) = a(\mathbf{x}_1, \mathbf{x}_2) + f(\mathbf{x}_2, \mathbf{y}_1). $$

Since $\mathrm{tor}(C) \subseteq \mathrm{res}(C)^{\perp}$, it follows that $(\mathbf{x}_1, \mathbf{x}_2) = (\mathbf{x}_2, \mathbf{y}_1) = 0$, which is self-orthogonal. Thus, $C$ is self-orthogonal.

The last statement: It follows that $C_2 = 3^{n-k_1} = C_1^{\perp}$. $\square$

The next result controls the linear structure of SO codes.

**Corollary 5.** For any SO codes $C$ over $E_3$ of length $n$, we have

(i) $\mathrm{tor}(C) \subseteq \mathrm{res}(C)^{\perp}$.

(ii) $\mathrm{res}(C)$ must be a self-orthogonal ternary code.

*Proof.* For (i), let $\mathbf{y} \in \mathrm{tor}(C)$, then $f\mathbf{y} \in C$ and $\mathbf{q} \in C$, we can write $\mathbf{q}$ in $f$-adic decomposition form as $\mathbf{q} = a\mathbf{u} + f\mathbf{v}$, where $\mathbf{u} \in \mathrm{res}(C)$ and $\mathbf{v} \in \mathrm{tor}(C)$.

$$ (f\mathbf{y}, a\mathbf{u} + f\mathbf{v}) = fa(\mathbf{y}, \mathbf{u}) = f(\mathbf{y}, \mathbf{u}) = 0. $$

Thus, $\mathbf{y} \in \mathrm{res}(C)^{\perp}$ and $\mathrm{tor}(C) \subseteq \mathrm{res}(C)^{\perp}$.

For (ii), By (i), and the fact that $\mathrm{res}(C) \subseteq \mathrm{tor}(C)$, it follows that

$$ \mathrm{res}(C) \subseteq \mathrm{tor}(C) \subseteq \mathrm{res}(C)^{\perp}. $$

The following theorem characterizes one-sided self-dual codes over $E_3$.

**Theorem 3.** For any linear code $C$ over $E_3$, we have
### 3. Construction

In this section we provide the building-up construction for self-orthogonal codes, (one-sided) self-dual, and self-dual codes over $E_3$. Our building-up construction needs the following theorems.

**Theorem 2.** Let $C$ be an $E_3$ code of length $n$, with residue code $C_1$ and torsion code $C_2$. The following hold:

* If $C$ is a linear code of length $n$ over $E_3$, then $C = aC_1 + fC_2$.

* If $C_1$ is self-orthogonal with $C_1 \subseteq C_2 \subseteq C_1^{\perp}$, then $C$ is a self-orthogonal code.

* If, furthermore, $|C| = 3^n$, then $C_2 = C_1^{\perp}$.

*Proof.* The first statement: It suffices to prove that $C \subseteq aC_1 + fC_2$.

Let $\mathbf{i} \in C$. We can write $\mathbf{i}$ in $f$-adic decomposition form as $\mathbf{i} = a\mathbf{x} + f\mathbf{y}$ where $\mathbf{x}, \mathbf{y} \in \mathbb{F}_3^n$.

Since $\pi(a\mathbf{x} + f\mathbf{y}) = \mathbf{x}$, it follows that $\mathbf{x} \in \mathrm{res}(C)$.

By following [3, Lemma 3], we have $a\mathbf{x} \in C$. Also by a linearity of $C$, we can see that $f\mathbf{y} \in C$, and hence $\mathbf{y} \in \mathrm{tor}(C)$.

This proves that $C \subseteq aC_1 + fC_2$.

The second statement: Suppose $\mathbf{i}_1, \mathbf{i}_2 \in C$. We can write $\mathbf{i}_1$ and $\mathbf{i}_2$ in $f$-adic decomposition form as $\mathbf{i}_1 = a\mathbf{x}_1 + f\mathbf{y}_1$ and $\mathbf{i}_2 = a\mathbf{x}_2 + f\mathbf{y}_2$ where $\mathbf{x}_1, \mathbf{x}_2 \in \mathrm{res}(C)$ and $\mathbf{y}_1, \mathbf{y}_2 \in \mathrm{tor}(C)$. Compute $(\mathbf{i}_1, \mathbf{i}_2)$,

$$ (a\mathbf{x}_1 + f\mathbf{y}_1, a\mathbf{x}_2 + f\mathbf{y}_2) = a^2(\mathbf{x}_1, \mathbf{x}_2) + af(\mathbf{x}_1, \mathbf{y}_2) + fa(\mathbf{x}_2, \mathbf{y}_1) + f^2(\mathbf{y}_1, \mathbf{y}_2) = a(\mathbf{x}_1, \mathbf{x}_2) + f(\mathbf{x}_2, \mathbf{y}_1). $$

Since $\mathrm{tor}(C) \subseteq \mathrm{res}(C)^{\perp}$, it follows that $(\mathbf{x}_1, \mathbf{x}_2) = (\mathbf{x}_2, \mathbf{y}_1) = 0$, which is self-orthogonal. Thus, $C$ is self-orthogonal.

The last statement: It follows that $C_2 = 3^{n-k_1} = C_1^{\perp}$. $\square$

The next result controls the linear structure of SO codes.

**Corollary 5.** For any SO codes $C$ over $E_3$ of length $n$, we have

(i) $\mathrm{tor}(C) \subseteq \mathrm{res}(C)^{\perp}$.

(ii) $\mathrm{res}(C)$ must be a self-orthogonal ternary code.

*Proof.* For (i), let $\mathbf{y} \in \mathrm{tor}(C)$, then $f\mathbf{y} \in C$ and $\mathbf{q} \in C$, we can write $\mathbf{q}$ in $f$-adic decomposition form as $\mathbf{q} = a\mathbf{u} + f\mathbf{v}$, where $\mathbf{u} \in \mathrm{res}(C)$ and $\mathbf{v} \in \mathrm{tor}(C)$.

$$ (f\mathbf{y}, a\mathbf{u} + f\mathbf{v}) = fa(\mathbf{y}, \mathbf{u}) = f(\mathbf{y}, \mathbf{u}) = 0. $$

Thus, $\mathbf{y} \in \mathrm{res}(C)^{\perp}$ and $\mathrm{tor}(C) \subseteq \mathrm{res}(C)^{\perp}$.

For (ii), By (i), and the fact that $\mathrm{res}(C) \subseteq \mathrm{tor}(C)$, it follows that

$$ \mathrm{res}(C) \subseteq \mathrm{tor}(C) \subseteq \mathrm{res}(C)^{\perp}. $$

The following theorem characterizes one-sided self-dual codes over $E_3$.

**Theorem 3.** For any linear code $C$ over $E_3$, we have
$$ (i) C^{\perp L} = a \operatorname{res}(C)^{\perp} + f \operatorname{res}(C)^{\perp}. $$

$$ (ii) C^{\perp R} = a \operatorname{tor}(C)^{\perp} + f \mathbb{F}_3^n. $$

*Proof.* For (i), we need to prove that $\operatorname{res}(C^{\perp L}) = \operatorname{res}(C)^{\perp} = \operatorname{tor}(C^{\perp L})$.

From the fact $\operatorname{res}(C^{\perp L}) \subseteq \operatorname{tor}(C^{\perp L})$, it follows that $\operatorname{res}(C^{\perp L}) \subseteq \operatorname{res}(C)^{\perp} \subseteq \operatorname{tor}(C^{\perp L})$.

Now, let $\mathbf{y} \in \operatorname{tor}(C^{\perp L})$, then $f\mathbf{y} \in C^{\perp L}$ and $\mathbf{x} \in \operatorname{res}(C)$, then $a\mathbf{x} \in C$. By definition of $C^{\perp L}$, we can see that

$$ (f\mathbf{y}, a\mathbf{x}) = f a(\mathbf{y}, \mathbf{x}) = f(\mathbf{y}, \mathbf{x}) = 0. $$

Thus, $\mathbf{y} \in \operatorname{res}(C)^{\perp}$ and $\operatorname{tor}(C^{\perp L}) \subseteq \operatorname{res}(C)^{\perp}$.

On the other hand, given $\mathbf{r} \in \operatorname{res}(C)^{\perp}$ and $\mathbf{i} \in C$, $\mathbf{i}$ may be expressed in $f$-adic decomposition form as $\mathbf{i} = a\mathbf{u} + f\mathbf{v}$, where $\mathbf{u} \in \operatorname{res}(C)$ and $\mathbf{v} \in \operatorname{tor}(C)$, respectively. It can be seen that

$$ (a\mathbf{r}, \mathbf{i}) = (a\mathbf{r}, a\mathbf{u} + f\mathbf{v}) = a(\mathbf{r}, \mathbf{u}) = 0 $$

by definition of $C^{\perp}$. Thus, $a\mathbf{r} \in C^{\perp L}$, and $\mathbf{r} \in \operatorname{res}(C^{\perp L})$. This implies that, $\operatorname{res}(C)^{\perp} \subseteq \operatorname{res}(C^{\perp L})$. Therefore,

$$ \operatorname{res}(C^{\perp L}) = \operatorname{res}(C)^{\perp} = \operatorname{tor}(C^{\perp L}). $$

For (ii), suppose $\mathbf{y} \in \operatorname{tor}(C)^{\perp} \subseteq \operatorname{res}(C)^{\perp}$, and $\mathbf{i} \in C$, we can write $\mathbf{i}$ in $f$-adic decomposition form as $\mathbf{i} = a\mathbf{u} + f\mathbf{v}$, where $\mathbf{u} \in \operatorname{res}(C)$ and $\mathbf{v} \in \operatorname{tor}(C)$. By definition of $C^{\perp}$, we have

$$ (\mathbf{i}, a\mathbf{y}) = (a\mathbf{u} + f\mathbf{v}, a\mathbf{y}) = a(\mathbf{u}, \mathbf{y}) + f(\mathbf{v}, \mathbf{y}) = 0. $$

Thus, $a\mathbf{y} \in C^{\perp R}$, and $\mathbf{y} \in \operatorname{res}(C^{\perp R})$. This implies that, $\operatorname{tor}(C)^{\perp} \subseteq \operatorname{res}(C^{\perp R})$.

Conversely, let $\mathbf{x} \in \operatorname{res}(C^{\perp R})$, then $a\mathbf{x} \in C^{\perp R}$. Let $\mathbf{y} \in \operatorname{tor}(C)$, then $f\mathbf{y} \in C$. Observe that

$$ (f\mathbf{y}, a\mathbf{x}) = f a(\mathbf{y}, \mathbf{x}) = f(\mathbf{y}, \mathbf{x}) = 0. $$

Thus, $f\mathbf{y} \in C^{\perp}$ and $\mathbf{y} \in \operatorname{tor}(C)^{\perp}$. This implies that $\operatorname{res}(C^{\perp R}) = \operatorname{tor}(C)^{\perp}$.

Now to prove $\operatorname{tor}(C^{\perp R}) = \mathbb{F}_3^n$, it suffices to show that $\mathbb{F}_3^n \subseteq \operatorname{tor}(C^{\perp R})$.

Let $\mathbf{r} \in \mathbb{F}_3^n$, and $\mathbf{i} \in C$, we can write $\mathbf{i}$ in $f$-adic decomposition form as $\mathbf{i} = a\mathbf{u} + f\mathbf{v}$, where $\mathbf{u} \in \operatorname{res}(C)$ and $\mathbf{v} \in \operatorname{tor}(C)$. We can see that

$$ (\mathbf{i}, f\mathbf{r}) = (a\mathbf{u} + f\mathbf{v}, f\mathbf{r}) = a f(\mathbf{u}, \mathbf{r}) + f^2(\mathbf{v}, \mathbf{r}) = 0. $$

Thus, $f\mathbf{r} \in C^{\perp R}$, then $\mathbf{r} \in \operatorname{tor}(C^{\perp R})$, and so $\mathbb{F}_3^n \subseteq \operatorname{tor}(C^{\perp R})$. This completes the proof. $\square$

**Corollary 6.** For any linear code $C$ over $E_3$, we have

$$ (i) C \text{ is left self-dual (LSD) iff } C \text{ is of type } \left\{ \frac{n}{2}, 0 \right\}. $$

$$ (ii) C \text{ is right self-dual (RS D) iff } C = f \mathbb{F}_3^n. $$

The lengths of LSD codes can be determined completely.

**Corollary 7.** Left self-dual codes over $E_3$ of length $n$ occurs if and only if $n$ is a multiple of 4.

*Proof.* From Theorem 3, $C$ is left self-dual iff $\operatorname{res}(C)$ is a self-dual ternary code. Then, by [16, Theorem 3], a self-dual code over $\mathbb{F}_3$ of length $n$ exists only if $n$ is a multiple of 4. This completes the proof. $\square$
$$ (i) C^{\perp L} = a \operatorname{res}(C)^{\perp} + f \operatorname{res}(C)^{\perp}. $$

$$ (ii) C^{\perp R} = a \operatorname{tor}(C)^{\perp} + f \mathbb{F}_3^n. $$

*Proof.* For (i), we need to prove that $\operatorname{res}(C^{\perp L}) = \operatorname{res}(C)^{\perp} = \operatorname{tor}(C^{\perp L})$.

From the fact $\operatorname{res}(C^{\perp L}) \subseteq \operatorname{tor}(C^{\perp L})$, it follows that $\operatorname{res}(C^{\perp L}) \subseteq \operatorname{res}(C)^{\perp} \subseteq \operatorname{tor}(C^{\perp L})$.

Now, let $\mathbf{y} \in \operatorname{tor}(C^{\perp L})$, then $f\mathbf{y} \in C^{\perp L}$ and $\mathbf{x} \in \operatorname{res}(C)$, then $a\mathbf{x} \in C$. By definition of $C^{\perp L}$, we can see that

$$ (f\mathbf{y}, a\mathbf{x}) = f a(\mathbf{y}, \mathbf{x}) = f(\mathbf{y}, \mathbf{x}) = 0. $$

Thus, $\mathbf{y} \in \operatorname{res}(C)^{\perp}$ and $\operatorname{tor}(C^{\perp L}) \subseteq \operatorname{res}(C)^{\perp}$.

On the other hand, given $\mathbf{r} \in \operatorname{res}(C)^{\perp}$ and $\mathbf{i} \in C$, $\mathbf{i}$ may be expressed in $f$-adic decomposition form as $\mathbf{i} = a\mathbf{u} + f\mathbf{v}$, where $\mathbf{u} \in \operatorname{res}(C)$ and $\mathbf{v} \in \operatorname{tor}(C)$, respectively. It can be seen that

$$ (a\mathbf{r}, \mathbf{i}) = (a\mathbf{r}, a\mathbf{u} + f\mathbf{v}) = a(\mathbf{r}, \mathbf{u}) = 0 $$

by definition of $C^{\perp}$. Thus, $a\mathbf{r} \in C^{\perp L}$, and $\mathbf{r} \in \operatorname{res}(C^{\perp L})$. This implies that, $\operatorname{res}(C)^{\perp} \subseteq \operatorname{res}(C^{\perp L})$. Therefore,

$$ \operatorname{res}(C^{\perp L}) = \operatorname{res}(C)^{\perp} = \operatorname{tor}(C^{\perp L}). $$

For (ii), suppose $\mathbf{y} \in \operatorname{tor}(C)^{\perp} \subseteq \operatorname{res}(C)^{\perp}$, and $\mathbf{i} \in C$, we can write $\mathbf{i}$ in $f$-adic decomposition form as $\mathbf{i} = a\mathbf{u} + f\mathbf{v}$, where $\mathbf{u} \in \operatorname{res}(C)$ and $\mathbf{v} \in \operatorname{tor}(C)$. By definition of $C^{\perp}$, we have

$$ (\mathbf{i}, a\mathbf{y}) = (a\mathbf{u} + f\mathbf{v}, a\mathbf{y}) = a(\mathbf{u}, \mathbf{y}) + f(\mathbf{v}, \mathbf{y}) = 0. $$

Thus, $a\mathbf{y} \in C^{\perp R}$, and $\mathbf{y} \in \operatorname{res}(C^{\perp R})$. This implies that, $\operatorname{tor}(C)^{\perp} \subseteq \operatorname{res}(C^{\perp R})$.

Conversely, let $\mathbf{x} \in \operatorname{res}(C^{\perp R})$, then $a\mathbf{x} \in C^{\perp R}$. Let $\mathbf{y} \in \operatorname{tor}(C)$, then $f\mathbf{y} \in C$. Observe that

$$ (f\mathbf{y}, a\mathbf{x}) = f a(\mathbf{y}, \mathbf{x}) = f(\mathbf{y}, \mathbf{x}) = 0. $$

Thus, $f\mathbf{y} \in C^{\perp}$ and $\mathbf{y} \in \operatorname{tor}(C)^{\perp}$. This implies that $\operatorname{res}(C^{\perp R}) = \operatorname{tor}(C)^{\perp}$.

Now to prove $\operatorname{tor}(C^{\perp R}) = \mathbb{F}_3^n$, it suffices to show that $\mathbb{F}_3^n \subseteq \operatorname{tor}(C^{\perp R})$.

Let $\mathbf{r} \in \mathbb{F}_3^n$, and $\mathbf{i} \in C$, we can write $\mathbf{i}$ in $f$-adic decomposition form as $\mathbf{i} = a\mathbf{u} + f\mathbf{v}$, where $\mathbf{u} \in \operatorname{res}(C)$ and $\mathbf{v} \in \operatorname{tor}(C)$. We can see that

$$ (\mathbf{i}, f\mathbf{r}) = (a\mathbf{u} + f\mathbf{v}, f\mathbf{r}) = a f(\mathbf{u}, \mathbf{r}) + f^2(\mathbf{v}, \mathbf{r}) = 0. $$

Thus, $f\mathbf{r} \in C^{\perp R}$, then $\mathbf{r} \in \operatorname{tor}(C^{\perp R})$, and so $\mathbb{F}_3^n \subseteq \operatorname{tor}(C^{\perp R})$. This completes the proof. $\square$

**Corollary 6.** For any linear code $C$ over $E_3$, we have

$$ (i) C \text{ is left self-dual (LSD) iff } C \text{ is of type } \left\{ \frac{n}{2}, 0 \right\}. $$

$$ (ii) C \text{ is right self-dual (RS D) iff } C = f \mathbb{F}_3^n. $$

The lengths of LSD codes can be determined completely.

**Corollary 7.** Left self-dual codes over $E_3$ of length $n$ occurs if and only if $n$ is a multiple of 4.

*Proof.* From Theorem 3, $C$ is left self-dual iff $\operatorname{res}(C)$ is a self-dual ternary code. Then, by [16, Theorem 3], a self-dual code over $\mathbb{F}_3$ of length $n$ exists only if $n$ is a multiple of 4. This completes the proof. $\square$
The next theorem characterizes SD codes.

**Theorem 4.** Assume C is an $E_3$-code of length n, C is a SD code if and only if

$$C = a \operatorname{res}(C) + f \operatorname{res}(C)^{\perp};$$

moreover, $|C| = 3^n$.

*Proof.* We know that C is self-dual code over $E_3$ iff $C = C^{\perp} = C^{\perp R} \cap C^{\perp L}$. By Theorem 2, we can see that

$$C = a (\operatorname{res}(C^{\perp R}) \cap \operatorname{res}(C^{\perp L})) + f (\operatorname{tor}(C^{\perp R}) \cap \operatorname{tor}(C^{\perp L})).$$

Thus, by Theorem 3, it can be seen that

$$C = a \operatorname{tor}(C)^{\perp} + f \operatorname{res}(C)^{\perp} = a \operatorname{res}(C) + f \operatorname{res}(C)^{\perp}.$$

**Corollary 8.** For any linear code C over $E_3$, we have:

(1) If C is SD with $k_1 = 0$, then C is RSD.

(2) If C is SD with $k_2 = 0$, then C is LSD.

The next result bounds the minimum distances of SD and LSD codes.

**Corollary 9.** (i) The minimum distance $d(C)$ of a self-dual code over $E_3$ is less than or equal to $\min\{d(\operatorname{res}(C)), d(\operatorname{res}(C)^{\perp})\}$.

(ii) If C is a left self-dual code C over $E_3$, then the minimum distance $d(C)$ is equal to $d(\operatorname{res}(C))$.

*Proof.* For (i), by Theorem 4, we have $C = a \operatorname{res}(C) + f \operatorname{res}(C)^{\perp}$.

Let $d_1$ and $d_2$ denote the minimum distances of $\operatorname{res}(C)$ and $\operatorname{res}(C)^{\perp}$, respectively.

By definition of $\operatorname{tor}(C)$, we have $d(C) \le d_2$. By [3, Lemma 3], we have $a \operatorname{res}(C) \subseteq C$, which indicates that $d(C) \le d_1$. It follows that $d(C) \le \min\{d_1, d_2\}$.

For (ii), by Theorem 3, we have $C = a \operatorname{res}(C)^{\perp} + f \operatorname{res}(C)^{\perp}$, where $\operatorname{res}(C)^{\perp} = \operatorname{res}(C)$. This means that $d_1 = d_2$.

We now establish that $d(C) \ge d_1$. Assume $\mathbf{q}$ is in C and $wt(\mathbf{q}) = d$. Because $\mathbf{r} \in \operatorname{res}(C)^{\perp}$ and $\mathbf{s} \in \operatorname{res}(C)^{\perp}$, $\mathbf{q} = a\mathbf{r} + f\mathbf{s}$ by Theorem 2. We have the following three scenarios, which rely on $\mathbf{r}$ and $\mathbf{s}$, since C is nonzero:

(1) $wt(\mathbf{q}) = wt(a\mathbf{r}) = wt(\mathbf{r})$ if $\mathbf{r} \ne 0$ and $\mathbf{s} = 0$,

(2) $wt(\mathbf{q}) = wt(f\mathbf{s}) = wt(\mathbf{s})$ if $\mathbf{r} = 0$ and $\mathbf{s} \ne 0$,

(3) $wt(\mathbf{q}) = wt(a\mathbf{r} + f\mathbf{s}) \ge wt(a\mathbf{r}) = wt(\mathbf{r})$ if $\mathbf{r}, \mathbf{s} \ne 0$.

It follows that $d(C) \ge d_1$ since $d_1 = d_2$. Thus, from (i), we conclude that $d(C) = d_1$.

### 3.1. Construction of self-orthogonal codes

In this subsection, we present the build-up construction method for self-orthogonal codes over $E_3$. The following theorem is a propagation rule of order three which increases the number of generators by one.
The next theorem characterizes SD codes.

**Theorem 4.** Assume C is an $E_3$-code of length n, C is a SD code if and only if

$$C = a \operatorname{res}(C) + f \operatorname{res}(C)^{\perp};$$

$$\textit{moreover, } |C| = 3^n.$$

*Proof.* We know that C is self-dual code over $E_3$ iff $C = C^{\perp} = C^{\perp_R} \cap C^{\perp_L}$. By Theorem 2, we can see that

$$C = a (\operatorname{res}(C^{\perp_R}) \cap \operatorname{res}(C^{\perp_L})) + f (\operatorname{tor}(C^{\perp_R}) \cap \operatorname{tor}(C^{\perp_L})).$$

Thus, by Theorem 3, it can be seen that

$$C = a \operatorname{tor}(C)^{\perp} + f \operatorname{res}(C)^{\perp} = a \operatorname{res}(C) + f \operatorname{res}(C)^{\perp}.$$

**Corollary 8.** For any linear code C over $E_3$, we have:

(1) If C is SD with $k_1 = 0$, then C is RSD.

(2) If C is SD with $k_2 = 0$, then C is LSD.

The next result bounds the minimum distances of SD and LSD codes.

**Corollary 9.** (i) The minimum distance $d(C)$ of a self-dual code over $E_3$ is less than or equal to $\min\{d(\operatorname{res}(C)), d(\operatorname{res}(C)^{\perp})\}$.

(ii) If C is a left self-dual code C over $E_3$, then the minimum distance $d(C)$ is equal to $d(\operatorname{res}(C))$.

*Proof.* For (i), by Theorem 4, we have $C = a \operatorname{res}(C) + f \operatorname{res}(C)^{\perp}$.

Let $d_1$ and $d_2$ denote the minimum distances of $\operatorname{res}(C)$ and $\operatorname{res}(C)^{\perp}$, respectively.

By definition of $\operatorname{tor}(C)$, we have $d(C) \le d_2$. By [3, Lemma 3], we have $a \operatorname{res}(C) \subseteq C$, which indicates that $d(C) \le d_1$. It follows that $d(C) \le \min\{d_1, d_2\}$.

For (ii), by Theorem 3, we have $C = a \operatorname{res}(C)^{\perp} + f \operatorname{res}(C)^{\perp}$, where $\operatorname{res}(C)^{\perp} = \operatorname{res}(C)$. This means that $d_1 = d_2$.

We now establish that $d(C) \ge d_1$. Assume $\mathbf{q}$ is in C and $wt(\mathbf{q}) = d$. Because $\mathbf{r} \in \operatorname{res}(C)^{\perp}$ and $\mathbf{s} \in \operatorname{res}(C)^{\perp}$, $\mathbf{q} = a\mathbf{r} + f\mathbf{s}$ by Theorem 2. We have the following three scenarios, which rely on $\mathbf{r}$ and $\mathbf{s}$, since C is nonzero:

(1) $wt(\mathbf{q}) = wt(a\mathbf{r}) = wt(\mathbf{r})$ if $\mathbf{r} \ne 0$ and $\mathbf{s} = 0$,

(2) $wt(\mathbf{q}) = wt(f\mathbf{s}) = wt(\mathbf{s})$ if $\mathbf{r} = 0$ and $\mathbf{s} \ne 0$,

(3) $wt(\mathbf{q}) = wt(a\mathbf{r} + f\mathbf{s}) \ge wt(a\mathbf{r}) = wt(\mathbf{r})$ if $\mathbf{r}, \mathbf{s} \ne 0$.

It follows that $d(C) \ge d_1$ since $d_1 = d_2$. Thus, from (i), we conclude that $d(C) = d_1$.

### 3.1. Construction of self-orthogonal codes

In this subsection, we present the build-up construction method for self-orthogonal codes over $E_3$. The following theorem is a propagation rule of order three which increases the number of generators by one.
**Theorem 5.** Let $C_0$ be a self-orthogonal code over $E_3$ of length $n$ with generator matrix $\mathcal{G}_0 = (\mathbf{r}_i)$ where $\mathbf{r}_i$ is the $i$th row of $\mathcal{G}_0$, for $i = 1, 2, \dots, m$. Let $\mathbf{x} \in \mathbb{F}_3^n$ and $\alpha, \beta, \gamma \in E_3$, such that $\alpha + \beta + \gamma = 0$. Then the code $C$ with the following generator matrix

$$ \mathcal{G} = \begin{pmatrix} \alpha & \beta & 0 & \gamma \mathbf{x} \\ (\mathbf{x}, \mathbf{r}_1) & (\mathbf{x}, \mathbf{r}_1) & (\mathbf{x}, \mathbf{r}_1) & \mathbf{r}_1 \\ \vdots & \vdots & \vdots & \vdots \\ (\mathbf{x}, \mathbf{r}_m) & (\mathbf{x}, \mathbf{r}_m) & (\mathbf{x}, \mathbf{r}_m) & \mathbf{r}_m \end{pmatrix} $$

is a self-orthogonal code of length $n + 3$ if:

(i) $(\mathbf{x}, \mathbf{x}) = 1$, and $\alpha, \beta, \gamma \in E_3 \setminus J_3$; or

(ii) $(\mathbf{x}, \mathbf{x}) = -1$ and $(\alpha \neq 0, \beta = 0, \gamma = 2\alpha)$.

*Proof.* It suffices to show that the rows of $\mathcal{G}$ are orthogonal to each other. Let $\mathbf{y}_0 = (\alpha \ \beta \ 0 \ \gamma \mathbf{x})$, the first row of $\mathcal{G}$ and $\mathbf{y}_i = (\mathbf{x}, \mathbf{r}_i) (\mathbf{x}, \mathbf{r}_i) (\mathbf{x}, \mathbf{r}_i) \mathbf{r}_i$), the $i$-th row of $\mathcal{G}$, for $i = 1, 2, \dots, m$.

(i) If $(\mathbf{x}, \mathbf{x}) = 1$ and $\alpha, \beta, \gamma \in E_3 \setminus J_3$, then

$$ (\mathbf{y}_0, \mathbf{y}_0) = \alpha^2 + \beta^2 + \gamma^2(\mathbf{x}, \mathbf{x}) = \alpha^2 + \beta^2 + \gamma^2 = 0, $$

$$ (\mathbf{y}_0, \mathbf{y}_i) = \alpha(\mathbf{x}, \mathbf{r}_i) + \beta(\mathbf{x}, \mathbf{r}_i) + \gamma(\mathbf{x}, \mathbf{r}_i) = (\alpha + \beta + \gamma)(\mathbf{x}, \mathbf{r}_i) = 0, $$

$$ (\mathbf{y}_i, \mathbf{y}_j) = 3(\mathbf{x}, \mathbf{r}_i)(\mathbf{x}, \mathbf{r}_j) + (\mathbf{r}_i, \mathbf{r}_j) = 0, $$

for all $i, j = 1, 2, \dots, m$.

(ii) If $(\mathbf{x}, \mathbf{x}) = -1$ and $(\alpha \neq 0, \beta = 0, \gamma = 2\alpha)$, then

$$ (\mathbf{y}_0, \mathbf{y}_0) = \alpha^2 + (2\alpha)^2(\mathbf{x}, \mathbf{x}) = \alpha^2 - \alpha^2 = 0, $$

$$ (\mathbf{y}_0, \mathbf{y}_i) = \alpha(\mathbf{x}, \mathbf{r}_i) + 2\alpha(\mathbf{x}, \mathbf{r}_i) = 3\alpha(\mathbf{x}, \mathbf{r}_i) = 0, $$

$$ (\mathbf{y}_i, \mathbf{y}_j) = 3(\mathbf{x}, \mathbf{r}_i)(\mathbf{x}, \mathbf{r}_j) + (\mathbf{r}_i, \mathbf{r}_j) = 0, $$

for all $i, j = 1, 2, \dots, m$.

In both cases, we see that $C$ is a self-orthogonal code.

**Example 1.** We construct self-orthogonal codes of length 6 derived from length 3. By Theorem 2, we have the self-orthogonal $(3, 3^2, 3)$ code with generator matrix $\mathcal{G}_0$ given by

$$ \mathcal{G}_0 = (a \ b \ h). $$

Using Theorem 5 from $\mathcal{G}_0$, we get three non-equivalent monomial $SO(6, 3^4, 3)$ codes, with generator matrices:

$$ \left( \begin{array}{c|c} a & a \\ \hline f & f \end{array} \right) \left( \begin{array}{c|c} a & e \\ \hline a & b \end{array} \right) \left( \begin{array}{c|c} a & a \\ \hline a & a \end{array} \right), \quad \text{and} \quad \left( \begin{array}{c|c} a & b & 0 \\ \hline a & a & a \end{array} \right) \left( \begin{array}{c|c} h & 0 & 0 \\ \hline a & b & h \end{array} \right). $$

Their Hamming weight enumerators are

$$ W_1(x, y) = x^6 + 14x^3y^3 + 12x^2y^4 + 18xy^5 + 36y^6, $$
**Theorem 5.** Let $C_0$ be a self-orthogonal code over $E_3$ of length $n$ with generator matrix $\mathcal{G}_0 = (\mathbf{r}_i)$ where $\mathbf{r}_i$ is the $i$th row of $\mathcal{G}_0$, for $i = 1, 2, \dots, m$. Let $\mathbf{x} \in \mathbb{F}_3^n$ and $\alpha, \beta, \gamma \in E_3$, such that $\alpha + \beta + \gamma = 0$. Then the code $C$ with the following generator matrix

$$ \mathcal{G} = \begin{pmatrix} \alpha & \beta & 0 & \gamma \mathbf{x} \\ (\mathbf{x}, \mathbf{r}_1) & (\mathbf{x}, \mathbf{r}_1) & (\mathbf{x}, \mathbf{r}_1) & \mathbf{r}_1 \\ \vdots & \vdots & \vdots & \vdots \\ (\mathbf{x}, \mathbf{r}_m) & (\mathbf{x}, \mathbf{r}_m) & (\mathbf{x}, \mathbf{r}_m) & \mathbf{r}_m \end{pmatrix} $$

is a self-orthogonal code of length $n + 3$ if:

(i) $(\mathbf{x}, \mathbf{x}) = 1$, and $\alpha, \beta, \gamma \in E_3 \setminus J_3$; or

(ii) $(\mathbf{x}, \mathbf{x}) = -1$ and $(\alpha \neq 0, \beta = 0, \gamma = 2\alpha)$.

*Proof.* It suffices to show that the rows of $\mathcal{G}$ are orthogonal to each other. Let $\mathbf{y}_0 = (\alpha \ \beta \ 0 \ \gamma \mathbf{x})$, the first row of $\mathcal{G}$ and $\mathbf{y}_i = (\mathbf{x}, \mathbf{r}_i) (\mathbf{x}, \mathbf{r}_i) (\mathbf{x}, \mathbf{r}_i) \mathbf{r}_i$), the $i$-th row of $\mathcal{G}$, for $i = 1, 2, \dots, m$.

(i) If $(\mathbf{x}, \mathbf{x}) = 1$ and $\alpha, \beta, \gamma \in E_3 \setminus J_3$, then

$$ (\mathbf{y}_0, \mathbf{y}_0) = \alpha^2 + \beta^2 + \gamma^2(\mathbf{x}, \mathbf{x}) = \alpha^2 + \beta^2 + \gamma^2 = 0, $$

$$ (\mathbf{y}_0, \mathbf{y}_i) = \alpha(\mathbf{x}, \mathbf{r}_i) + \beta(\mathbf{x}, \mathbf{r}_i) + \gamma(\mathbf{x}, \mathbf{r}_i) = (\alpha + \beta + \gamma)(\mathbf{x}, \mathbf{r}_i) = 0, $$

$$ (\mathbf{y}_i, \mathbf{y}_j) = 3(\mathbf{x}, \mathbf{r}_i)(\mathbf{x}, \mathbf{r}_j) + (\mathbf{r}_i, \mathbf{r}_j) = 0, $$

for all $i, j = 1, 2, \dots, m$.

(ii) If $(\mathbf{x}, \mathbf{x}) = -1$ and $(\alpha \neq 0, \beta = 0, \gamma = 2\alpha)$, then

$$ (\mathbf{y}_0, \mathbf{y}_0) = \alpha^2 + (2\alpha)^2(\mathbf{x}, \mathbf{x}) = \alpha^2 - \alpha^2 = 0, $$

$$ (\mathbf{y}_0, \mathbf{y}_i) = \alpha(\mathbf{x}, \mathbf{r}_i) + 2\alpha(\mathbf{x}, \mathbf{r}_i) = 3\alpha(\mathbf{x}, \mathbf{r}_i) = 0, $$

$$ (\mathbf{y}_i, \mathbf{y}_j) = 3(\mathbf{x}, \mathbf{r}_i)(\mathbf{x}, \mathbf{r}_j) + (\mathbf{r}_i, \mathbf{r}_j) = 0, $$

for all $i, j = 1, 2, \dots, m$.

In both cases, we see that $C$ is a self-orthogonal code. $\square$

**Example 1.** We construct self-orthogonal codes of length 6 derived from length 3. By Theorem 2, we have the self-orthogonal $(3, 3^2, 3)$ code with generator matrix $\mathcal{G}_0$ given by

$$ \mathcal{G}_0 = (a \ b \ h). $$

Using Theorem 5 from $\mathcal{G}_0$, we get three non-equivalent monomial $SO(6, 3^4, 3)$ codes, with generator matrices:

$$ \left( \begin{array}{c|c} a & a \\ \hline f & f \end{array} \right) \left( \begin{array}{c|c} a & e \\ \hline a & b \end{array} \right), \quad \left( \begin{array}{c|c} a & a \\ \hline a & a \end{array} \right) \left( \begin{array}{c|c} a & 0 \\ \hline a & b \end{array} \right), \quad \text{and} \quad \left( \begin{array}{c|c} a & b \\ \hline a & a \end{array} \right) \left( \begin{array}{c|c} h & 0 \\ \hline a & b \end{array} \right). $$

Their Hamming weight enumerators are

$$ W_1(x, y) = x^6 + 14x^3y^3 + 12x^2y^4 + 18xy^5 + 36y^6, $$
$$W_2(x, y) = x^6 + 16x^3y^3 + 64y^6,$$

and

$$W_3(x, y) = x^6 + 10x^3y^3 + 18xy^5 + 52y^6,$$

respectively.

**Remark 1.** The build-up construction method given in Theorem 5, cannot be also used for self-dual codes as the cardinality of the code $C$ is not $3^{n+3}$.

**Remark 2.** If any two self-orthogonal $E_3$-codes are monomially equivalent, then their residue and torsion codes are also monomially equivalent, but the converse is not necessarily true. For example, when $n = 3$ and type $\{1, 0\}$, the codes $C_1$ and $C_2$ with generator matrices $(a \ a \ a)$ and $(a \ b \ h)$, respectively. They have the same residue and torsion codes, but are not monomially equivalent.

## 3.2. Construction of one-sided self-dual codes

We will provide a construction approach for one-sided self-dual codes over $E_3$ in this subsection. Initially, this structure was provided for left self-dual codes with two extra generators and a length increase of four. We only need to take into consideration the situation in which the length $n$ is a multiple of 4, as a result of Corollary 7.

**Theorem 6.** Let $C_0$ be a left self-dual code over $E_3$ of length $n$ with generator matrix $G_0 = (\mathbf{r}_i)$ where $\mathbf{r}_i$ is the $i$-th row of $G_0$, for $i = 1, 2, \dots, m$. Let $\mathbf{x}_1, \mathbf{x}_2 \in \mathbb{F}_3^n$ such that $(\mathbf{x}_1, \mathbf{x}_2) = 0$, and $(\mathbf{x}_i, \mathbf{x}_i) = 2$ for $i = 1, 2$. For $1 \le i \le m$, define $u_i = (\mathbf{x}_1, \mathbf{r}_i)$ and $v_i = (\mathbf{x}_2, \mathbf{r}_i)$. If $\alpha \in E_3 \setminus J_3$, then the code $C$ with the following generator matrix

$$G = \begin{pmatrix} \alpha & 0 & 0 & 0 & 2\alpha\mathbf{x}_1 \\ 0 & \alpha & 0 & 0 & 2\alpha\mathbf{x}_2 \\ u_1 & v_1 & u_1 + v_1 & 2u_1 + v_1 & \mathbf{r}_1 \\ \vdots & \vdots & \vdots & \vdots & \vdots \\ u_m & v_m & u_m + v_m & 2u_m + v_m & \mathbf{r}_m \end{pmatrix}$$

is a left self-dual code of length $n + 4$.

*Proof.* Let $\mathbf{y}_0 = (\alpha \ 0 \ 0 \ 0 \ 2\alpha\mathbf{x}_1)$ and $\mathbf{y}'_0 = (0 \ \alpha \ 0 \ 0 \ 2\alpha\mathbf{x}_2)$. Then

$$(\mathbf{y}_0, \mathbf{y}_0) = \alpha^2 + (2\alpha)^2(\mathbf{x}_1, \mathbf{x}_1) = 0,$$

$$(\mathbf{y}'_0, \mathbf{y}'_0) = \alpha^2 + (2\alpha)^2(\mathbf{x}_2, \mathbf{x}_2) = 0,$$

$$(\mathbf{y}_0, \mathbf{y}'_0) = \alpha(\mathbf{x}_1, \mathbf{x}_2) = 0.$$

Now, for $1 \le i \le m$, let $\mathbf{y}_i = (u_i \ v_i \ u_i + v_i \ 2u_i + v_i \ \mathbf{r}_i)$. So, for $1 \le j \le m$,

$$(\mathbf{y}_i, \mathbf{y}_j) = u_i u_j + v_i v_j + (u_i + v_i)(u_j + v_j) + (2u_i + v_i)(2u_j + v_j) + (\mathbf{r}_i, \mathbf{r}_j) = 0.$$

Thus, $C$ is self-orthogonal and since $|C| = 9^2|C_0| = 3^{n+4}$, $C$ is left self-dual. $\square$
$$W_2(x, y) = x^6 + 16x^3y^3 + 64y^6,$$

and

$$W_3(x, y) = x^6 + 10x^3y^3 + 18xy^5 + 52y^6,$$

respectively.

**Remark 1.** The build-up construction method given in Theorem 5, cannot be also used for self-dual codes as the cardinality of the code $C$ is not $3^{n+3}$.

**Remark 2.** If any two self-orthogonal $E_3$-codes are monomially equivalent, then their residue and torsion codes are also monomially equivalent, but the converse is not necessarily true. For example, when $n = 3$ and type $\{1, 0\}$, the codes $C_1$ and $C_2$ with generator matrices $(a \ a \ a)$ and $(a \ b \ h)$, respectively. They have the same residue and torsion codes, but are not monomially equivalent.

## 3.2. Construction of one-sided self-dual codes

We will provide a construction approach for one-sided self-dual codes over $E_3$ in this subsection. Initially, this structure was provided for left self-dual codes with two extra generators and a length increase of four. We only need to take into consideration the situation in which the length $n$ is a multiple of 4, as a result of Corollary 7.

**Theorem 6.** Let $C_0$ be a left self-dual code over $E_3$ of length $n$ with generator matrix $G_0 = (\mathbf{r}_i)$ where $\mathbf{r}_i$ is the $i$-th row of $G_0$, for $i = 1, 2, \dots, m$. Let $\mathbf{x}_1, \mathbf{x}_2 \in \mathbb{F}_3^n$ such that $(\mathbf{x}_1, \mathbf{x}_2) = 0$, and $(\mathbf{x}_i, \mathbf{x}_i) = 2$ for $i = 1, 2$. For $1 \le i \le m$, define $u_i = (\mathbf{x}_1, \mathbf{r}_i)$ and $v_i = (\mathbf{x}_2, \mathbf{r}_i)$. If $\alpha \in E_3 \setminus J_3$, then the code $C$ with the following generator matrix

$$G = \begin{pmatrix} \alpha & 0 & 0 & 0 & 2\alpha\mathbf{x}_1 \\ 0 & \alpha & 0 & 0 & 2\alpha\mathbf{x}_2 \\ u_1 & v_1 & u_1 + v_1 & 2u_1 + v_1 & \mathbf{r}_1 \\ \vdots & \vdots & \vdots & \vdots & \vdots \\ u_m & v_m & u_m + v_m & 2u_m + v_m & \mathbf{r}_m \end{pmatrix}$$

is a left self-dual code of length $n + 4$.

*Proof.* Let $\mathbf{y}_0 = (\alpha \ 0 \ 0 \ 0 \ 2\alpha\mathbf{x}_1)$ and $\mathbf{y}'_0 = (0 \ \alpha \ 0 \ 0 \ 2\alpha\mathbf{x}_2)$. Then

$$(\mathbf{y}_0, \mathbf{y}_0) = \alpha^2 + (2\alpha)^2(\mathbf{x}_1, \mathbf{x}_1) = 0,$$

$$(\mathbf{y}'_0, \mathbf{y}'_0) = \alpha^2 + (2\alpha)^2(\mathbf{x}_2, \mathbf{x}_2) = 0,$$

$$(\mathbf{y}_0, \mathbf{y}'_0) = \alpha(\mathbf{x}_1, \mathbf{x}_2) = 0.$$

Now, for $1 \le i \le m$, let $\mathbf{y}_i = (u_i \ v_i \ u_i + v_i \ 2u_i + v_i \ \mathbf{r}_i)$. So, for $1 \le j \le m$,

$$(\mathbf{y}_i, \mathbf{y}_j) = u_i u_j + v_i v_j + (u_i + v_i)(u_j + v_j) + (2u_i + v_i)(2u_j + v_j) + (\mathbf{r}_i, \mathbf{r}_j) = 0.$$

Thus, $C$ is self-orthogonal and since $|C| = 9^2 |C_0| = 3^{n+4}$, $C$ is left self-dual.
Define $\hat{C}_0$ to be the span of the last $m$ rows of $\mathcal{G}$, and for every $y \in E_3$ write

$$T_y = (y, 0, 0, 0, 2y\mathbf{x}_1), \text{ and } U_y = (0, y, 0, 0, 2y\mathbf{x}_2).$$

The construction in Theorem 6 maybe demonstrated to be equivalent to

$$C = \bigcup_{t,u \in E_3 \setminus S} (T_t + U_u + \hat{C}_0).$$

**Example 2.** We construct a left self-dual code of length 8 derived from length 4. By Theorem 3, we have the left self-duall (4, 3⁴, 3) code with generator matrix $\mathcal{G}_1$ given by

$$\mathcal{G}_1 = \begin{pmatrix} a & 0 & a & a \\ 0 & a & a & e \end{pmatrix}.$$

Using Theorem 6 from $\mathcal{G}_1$ with $\alpha = a$, we get only one non-equivalent monomial left self-dual (8, 3⁸, 3) code with generator matrix

$$\mathcal{G}_{1,1} = \left( \begin{array}{c|c} a & 0 \ 0 \ 0 \ 0 \\ 0 & a \ 0 \ 0 \ 0 \\ \hline a & a & e & 0 \\ a & e & 0 & e \end{array} \begin{array}{c} e \ e \ 0 \ 0 \\ e \ a \ 0 \ 0 \\ \hline a & 0 & a & a \\ 0 & a & a & e \end{array} \right).$$

Its Hamming weight enumerator is

$$W_{1,1}(x,y) = x^8 + 64x^5y^3 + 96x^4y^4 + 1024x^2y^6 + 3072xy^7 + 2304y^8.$$

Repeating this process using $\mathcal{G}_{1,1}$ with $\mathbf{x}_1 = (1, 1, 0, 0, 0, 0, 0, 0)$, we get only three non-equivalent monomial left self-dual (12, 3¹², 3) codes with generator matrices

$$\mathcal{G}_{1,1,1} = \left( \begin{array}{c|c} a & 0 \ 0 \ 0 \ 0 \\ 0 & a \ 0 \ 0 \ 0 \\ \hline a & a & e & 0 \\ a & a & e & 0 \\ e & e & a & 0 \\ 0 & e & e & a \end{array} \begin{array}{c} e \ e \ 0 \ 0 \\ 0 \ 0 \ 0 \ e \\ \hline a & e & a & a \\ 0 & a & a & 0 \\ 0 & a & a & 0 \\ 0 & a & a & e \end{array} \right),$$

$$\mathcal{G}_{1,1,2} = \left( \begin{array}{c|c} a & 0 \ 0 \ 0 \ 0 \\ 0 & a \ 0 \ 0 \ 0 \\ \hline a & 0 & a & a \\ a & e & 0 & e \\ e & 0 & e & e \end{array} \begin{array}{c} e \ e \ 0 \ 0 \\ a & e & a & a \\ \hline a & 0 & 0 & 0 \\ 0 & a & 0 & 0 \\ 0 & a & 0 & 0 \\ 0 & a & a & e \end{array} \right),$$

and

$$\mathcal{G}_{1,1,3} = \left( \begin{array}{c|c} a & 0 \ 0 \ 0 \ 0 \\ 0 & a \ 0 \ 0 \ 0 \\ \hline a & a & e & 0 \\ a & 0 & a & a \\ e & 0 & e & e \end{array} \begin{array}{c} e \ e \ 0 \ 0 \\ 0 \ 0 \ 0 \ e \\ \hline a & e & e & e \\ 0 & a & 0 & 0 \\ 0 & a & a & e \end{array} \right).$$
Define $\hat{C}_0$ to be the span of the last $m$ rows of $\mathcal{G}$, and for every $y \in E_3$ write

$$T_y = (y, 0, 0, 0, 2y\mathbf{x}_1), \text{ and } U_y = (0, y, 0, 0, 2y\mathbf{x}_2).$$

The construction in Theorem 6 maybe demonstrated to be equivalent to

$$C = \bigcup_{t,u \in E_3 \setminus S} (T_t + U_u + \hat{C}_0).$$

**Example 2.** We construct a left self-dual code of length 8 derived from length 4. By Theorem 3, we have the left self-duall (4, 3⁴, 3) code with generator matrix $\mathcal{G}_1$ given by

$$\mathcal{G}_1 = \begin{pmatrix} a & 0 & a & a \\ 0 & a & a & e \end{pmatrix}.$$

Using Theorem 6 from $\mathcal{G}_1$ with $\alpha = a$, we get only one non-equivalent monomial left self-dual (8, 3⁸, 3) code with generator matrix

$$\mathcal{G}_{1,1} = \left( \begin{array}{c|c} a & 0 \ 0 \ 0 \ 0 \\ 0 & a \ 0 \ 0 \ 0 \\ \hline a & a & e & 0 \\ a & e & 0 & e \end{array} \begin{array}{c} e \ e \ 0 \ 0 \\ e \ a \ 0 \ 0 \\ \hline a & 0 & a & a \\ 0 & a & a & e \end{array} \right).$$

Its Hamming weight enumerator is

$$W_{1,1}(x,y) = x^8 + 64x^5y^3 + 96x^4y^4 + 1024x^2y^6 + 3072xy^7 + 2304y^8.$$

Repeating this process using $\mathcal{G}_{1,1}$ with $\mathbf{x}_1 = (1, 1, 0, 0, 0, 0, 0, 0)$, we get only three non-equivalent monomial left self-dual (12, 3¹², 3) codes with generator matrices

$$\mathcal{G}_{1,1,1} = \left( \begin{array}{c|c} a & 0 \ 0 \ 0 \ 0 \\ 0 & a \ 0 \ 0 \ 0 \\ \hline a & a & e & 0 \\ a & a & e & 0 \\ e & e & a & 0 \\ 0 & e & e & a \end{array} \begin{array}{c} e \ e \ 0 \ 0 \\ 0 \ 0 \ 0 \ e \\ \hline a & e & a & a \\ 0 & a & a & 0 \\ 0 & a & a & 0 \\ 0 & a & a & e \end{array} \right),$$

$$\mathcal{G}_{1,1,2} = \left( \begin{array}{c|c} a & 0 \ 0 \ 0 \ 0 \\ 0 & a \ 0 \ 0 \ 0 \\ \hline a & 0 & a & a \\ a & e & 0 & e \\ e & 0 & e & e \end{array} \begin{array}{c} e \ e \ 0 \ 0 \\ a & e & a & a \\ \hline a & 0 & 0 & 0 \\ 0 & a & 0 & 0 \\ 0 & a & 0 & 0 \end{array} \right),$$

and

$$\mathcal{G}_{1,1,3} = \left( \begin{array}{c|c} a & 0 \ 0 \ 0 \ 0 \\ 0 & a \ 0 \ 0 \ 0 \\ \hline a & a & e & 0 \\ a & 0 & a & a \\ e & 0 & e & e \end{array} \begin{array}{c} e \ e \ 0 \ 0 \\ 0 \ 0 \ 0 \ e \\ \hline a & e & e & e \\ 0 & a & 0 & 0 \\ 0 & a & a & e \end{array} \right).$$
Their Hamming weight enumerators are

$$W_{1,1,1}(x, y) = x^{12} + 96x^9y^3 + 144x^8y^4 + 3072x^6y^6 + 9216x^5y^7 + 6912x^4y^8 + 32768x^3y^9 \\ + 147456x^2y^{10} + 221184xy^{11} + 110592y^{12},$$

$$W_{1,1,2}(x, y) = x^{12} + 24x^9y^3 + 8x^8y^4 + 176x^7y^5 + 1112x^6y^6 + 4376x^5y^7 + 15272x^4y^8 \\ + 47776x^3y^9 + 132776x^2y^{10} + 208544xy^{11} + 121376y^{12},$$

and

$$W_{1,1,3}(x, y) = x^{12} + 32x^9y^3 + 1248x^6y^6 + 5184x^5y^7 + 14256x^4y^8 + 46976x^3y^9 + 134784x^2y^{10} \\ + 207360xy^{11} + 121600y^{12},$$

respectively.

**Corollary 10.** *The minimum Hamming weight of left self-dual codes over $E_3$ of length $n$ is a multiple of 3.*

*Proof.* Following Corollary 9, the minimum distance $d(C)$ of a left self-dual code $C$ is equal to $d(\mathrm{res}(C))$. Thus, by [11, Lemma 1], self-dual codes over $\mathbb{F}_3$ of length $n$ exist only if $n$ is a multiple of 4 and a minimum weight is a multiple of 3. $\square$

In the following theorem, we will now describe the general approach that we will utilize in finding construction methods for right self-dual codes over $E_3$.

**Theorem 7.** Let $C_0$ be a right self-dual code of length $n$ over $E_3$, with generator matrix $\mathcal{G}_0 = (\mathbf{r}_i)$, where $\mathbf{r}_i$ is the $i$-th row of $\mathcal{G}_0$, for $1 \le i \le m$. Then the code $C$ with the following generator matrix

$$\mathcal{G} = \begin{pmatrix} fI_h & 0 & \dots & 0 \\ 0 \\ \vdots \\ 0 \end{pmatrix} \quad \mathcal{G}_0$$

is a right self-dual code of length $n + h$.

*Proof.* We can show that $\mathcal{G}$ generates a self-orthogonal code $C$ in a similar way as given in Theorem 6. Now, according to $|C| = 3^h |C_0| = 3^{n+h}$, $C$ is self-dual. $\square$

**Corollary 11.** Every one-sided self-dual code is also self-dual.

*Proof.* Let $C$ be a left self-dual in order to demonstrate that every left self-dual is self-dual. $\mathrm{res}(C) = \mathrm{res}(C)^\perp$ and $\mathrm{tor}(C) = \mathrm{res}(C)^\perp$ are the results of Theorem 3. Hence, $C$ is a self-dual code according to Theorem 4.

To prove that every right self-dual is self-dual, let $C$ be right self-dual. Also, by Theorem 3, we see that $C = a\{0\} + f\mathbb{F}_3^n$. Observe that $\mathrm{tor}(C) = \mathrm{res}(C)^\perp$. Then, by Theorem 4, $C$ is a self-dual code. $\square$

**Example 3.** The linear code of length 4 with the two generators

$$\mathcal{G}_2 = \begin{pmatrix} a & 0 & a & a \\ 0 & a & a & e \end{pmatrix}$$

is a self-dual and left self-dual, but not right self-dual.
Their Hamming weight enumerators are

$$W_{1,1,1}(x, y) = x^{12} + 96x^9y^3 + 144x^8y^4 + 3072x^6y^6 + 9216x^5y^7 + 6912x^4y^8 + 32768x^3y^9 \\ + 147456x^2y^{10} + 221184xy^{11} + 110592y^{12},$$

$$W_{1,1,2}(x, y) = x^{12} + 24x^9y^3 + 8x^8y^4 + 176x^7y^5 + 1112x^6y^6 + 4376x^5y^7 + 15272x^4y^8 \\ + 47776x^3y^9 + 132776x^2y^{10} + 208544xy^{11} + 121376y^{12},$$

and

$$W_{1,1,3}(x, y) = x^{12} + 32x^9y^3 + 1248x^6y^6 + 5184x^5y^7 + 14256x^4y^8 + 46976x^3y^9 + 134784x^2y^{10} \\ +207360xy^{11} + 121600y^{12},$$

respectively.

**Corollary 10.** The minimum Hamming weight of left self-dual codes over $E_3$ of length $n$ is a multiple of 3.

*Proof.* Following Corollary 9, the minimum distance $d(C)$ of a left self-dual code $C$ is equal to $d(\text{res}(C))$. Thus, by [11, Lemma 1], self-dual codes over $\mathbb{F}_3$ of length $n$ exist only if $n$ is a multiple of 4 and a minimum weight is a multiple of 3. $\square$

In the following theorem, we will now describe the general approach that we will utilize in finding construction methods for right self-dual codes over $E_3$.

**Theorem 7.** Let $C_0$ be a right self-dual code of length $n$ over $E_3$, with generator matrix $\mathcal{G}_0 = (\mathbf{r}_i)$, where $\mathbf{r}_i$ is the $i$-th row of $\mathcal{G}_0$, for $1 \le i \le m$. Then the code $C$ with the following generator matrix

$$\mathcal{G} = \begin{pmatrix} fI_h & 0 & \dots & 0 \\ 0 \\ \vdots \\ 0 \end{pmatrix} \quad \mathcal{G}_0$$

is a right self-dual code of length $n + h$.

*Proof.* We can show that $\mathcal{G}$ generates a self-orthogonal code $C$ in a similar way as given in Theorem 6. Now, according to $|C| = 3^h |C_0| = 3^{n+h}$, $C$ is self-dual. $\square$

**Corollary 11.** Every one-sided self-dual code is also self-dual.

*Proof.* Let $C$ be a left self-dual in order to demonstrate that every left self-dual is self-dual. $\text{res}(C) = \text{res}(C)^\perp$ and $\text{tor}(C) = \text{res}(C)^\perp$ are the results of Theorem 3. Hence, $C$ is a self-dual code according to Theorem 4.

To prove that every right self-dual is self-dual, let $C$ be right self-dual. Also, by use Theorem 3, we see that $C = a\{0\} + f\mathbb{F}_3^n$. Observe that $\text{tor}(C) = \text{res}(C)^\perp$. Then, by Theorem 4, $C$ is a self-dual code. $\square$

**Example 3.** The linear code of length 4 with the two generators

$$\mathcal{G}_2 = \begin{pmatrix} a & 0 & a & a \\ 0 & a & a & e \end{pmatrix}$$

is a self-dual and left self-dual, but not right self-dual.
**Example 4.** The linear code of length 3 defined by

$$C = \left\{ \begin{array}{l} 000, f00, 0f0, 00f, g00, 0g0, 00g, ff0, f0f, 0ff, gg0, g0g, 0gg, gfg, \\ \qquad\quad ggf, fgg, ffg, fgf, gff, fg0, 0gf, f0g, gf0, 0gf, g0f, fff, ggg \end{array} \right\}$$

is a self-dual and right self-dual code, but not left self-dual.

**Remark 3.** We note that a similar construction method in Theorems 6 and 7 can be applied to self-dual codes over $E_3$.

### 3.3. Construction of self-dual codes

The following result constructs a self-dual code of length $n + 3$ from a self-dual code of length $n$.

**Theorem 8.** Let $C_0$ be a self-dual code over $E_3$ of length $n$ with generator matrix $\mathcal{G}_0 = (\mathbf{r}_i)$ where $\mathbf{r}_i$ is the $i$-th row of $\mathcal{G}_0$, for $i = 1, 2, \dots, m$. Let $\mathbf{x} \in \mathbb{F}_3^n$ and $\alpha, \beta, \gamma \in E_3$, such that $\alpha + \beta + \gamma = 0$. Let $\sigma \in J_3$, non-zero element. Then the code $C$ with the following generator matrix

$$\mathcal{G} = \left( \begin{array}{ccc|c} \alpha & \beta & 0 & \gamma \mathbf{x} \\ 0 & \sigma & 0 & 2\sigma \mathbf{x} \\ (\mathbf{x}, \mathbf{r}_1) & (\mathbf{x}, \mathbf{r}_1) & (\mathbf{x}, \mathbf{r}_1) & \mathbf{r}_1 \\ \vdots & \vdots & \vdots & \vdots \\ (\mathbf{x}, \mathbf{r}_m) & (\mathbf{x}, \mathbf{r}_m) & (\mathbf{x}, \mathbf{r}_m) & \mathbf{r}_m \end{array} \right)$$

is a self-dual code of length $n + 3$ if:

$$ (1) \ (\mathbf{x}, \mathbf{x}) = 1, \text{ and } (\alpha, \beta, \gamma \in E_3 \setminus J_3); \text{ or} $$

$$ (2) \ (\mathbf{x}, \mathbf{x}) = -1, \text{ and } (\alpha = 0, \beta \in E_3 \setminus J_3, \gamma = 2\beta). $$

*Proof.* We first show that $C$ is self-orthogonal. Let $\mathbf{y}_0 = (\alpha \ \beta \ 0 \ \gamma \mathbf{x})$, the first row of $\mathcal{G}$, and $\mathbf{y}'_0 = (0 \ \sigma \ 0 \ 2\sigma \mathbf{x})$, the second row of $\mathcal{G}$. For $1 \le i \le m$, let $\mathbf{y}_i = (\mathbf{x}, \mathbf{r}_i) (\mathbf{x}, \mathbf{r}_i) (\mathbf{x}, \mathbf{r}_i) (\mathbf{r}_i)$. Then,

(i) If $(\mathbf{x}, \mathbf{x}) = 1$ and $(\alpha, \beta, \gamma \in E_3 \setminus J_3)$, then

$$ (\mathbf{y}_0, \mathbf{y}_0) = \alpha^2 + \beta^2 + \gamma^2(\mathbf{x}, \mathbf{x}) = (\alpha^2 + \beta^2 + \gamma^2) = 0, $$

$$ (\mathbf{y}'_0, \mathbf{y}'_0) = \sigma^2 + (2\sigma)^2(\mathbf{x}, \mathbf{x}) = 0, $$

$$ (\mathbf{y}_0, \mathbf{y}'_0) = \beta\sigma + \gamma(2\sigma)(\mathbf{x}, \mathbf{x}) = 0, $$

$$ (\mathbf{y}'_0, \mathbf{y}_0) = \sigma\beta + 2\sigma\gamma(\mathbf{x}, \mathbf{x}) = \sigma + 2\sigma = 0, $$

$$ (\mathbf{y}_0, \mathbf{y}_i) = \alpha(\mathbf{x}, \mathbf{r}_i) + \beta(\mathbf{x}, \mathbf{r}_i) + \gamma(\mathbf{x}, \mathbf{r}_i) = (\alpha + \beta + \gamma) = 0, $$

$$ (\mathbf{y}'_0, \mathbf{y}_i) = (\sigma + 2\sigma)(\mathbf{x}, \mathbf{r}_i) = 0, $$

$$ (\mathbf{y}_i, \mathbf{y}_j) = 3(\mathbf{x}, \mathbf{r}_i)(\mathbf{x}, \mathbf{r}_j) + (\mathbf{r}_i, \mathbf{r}_j) = 0, $$

for all $i, j = 1, 2, \dots, m$.

(ii) If $(\mathbf{x}, \mathbf{x}) = -1$ and $(\alpha = 0, \beta \in E_3 \setminus J_3, \gamma = 2\beta)$, then

$$ (\mathbf{y}_0, \mathbf{y}_0) = \beta^2 + (2\beta)^2(\mathbf{x}, \mathbf{x}) = \beta^2 - \beta^2 = 0, $$
**Example 4.** The linear code of length 3 defined by

$$C = \left\{ \begin{array}{l} 000, f00, 0f0, 00f, g00, 0g0, 00g, ff0, f0f, 0ff, gg0, g0g, 0gg, gfg, \\ \qquad ggf, fgg, ffg, fgf, gff, fg0, 0gf, f0g, gf0, 0gf, g0f, fff, ggg \end{array} \right\}$$

is a self-dual and right self-dual code, but not left self-dual.

**Remark 3.** We note that a similar construction method in Theorems 6 and 7 can be applied to self-dual codes over $E_3$.

### 3.3. Construction of self-dual codes

The following result constructs a self-dual code of length $n + 3$ from a self-dual code of length $n$.

**Theorem 8.** Let $C_0$ be a self-dual code over $E_3$ of length $n$ with generator matrix $\mathcal{G}_0 = (\mathbf{r}_i)$ where $\mathbf{r}_i$ is the $i$-th row of $\mathcal{G}_0$, for $i = 1, 2, \dots, m$. Let $\mathbf{x} \in \mathbb{F}_3^n$ and $\alpha, \beta, \gamma \in E_3$, such that $\alpha + \beta + \gamma = 0$. Let $\sigma \in J_3$, non-zero element. Then the code $C$ with the following generator matrix

$$\mathcal{G} = \left( \begin{array}{ccc|c} \alpha & \beta & 0 & \gamma \mathbf{x} \\ 0 & \sigma & 0 & 2\sigma \mathbf{x} \\ (\mathbf{x}, \mathbf{r}_1) & (\mathbf{x}, \mathbf{r}_1) & (\mathbf{x}, \mathbf{r}_1) & \mathbf{r}_1 \\ \vdots & \vdots & \vdots & \vdots \\ (\mathbf{x}, \mathbf{r}_m) & (\mathbf{x}, \mathbf{r}_m) & (\mathbf{x}, \mathbf{r}_m) & \mathbf{r}_m \end{array} \right)$$

is a self-dual code of length $n + 3$ if:

$$ (1) \ (\mathbf{x}, \mathbf{x}) = 1, \text{ and } (\alpha, \beta, \gamma \in E_3 \setminus J_3); \text{ or} $$

$$ (2) \ (\mathbf{x}, \mathbf{x}) = -1, \text{ and } (\alpha = 0, \beta \in E_3 \setminus J_3, \gamma = 2\beta). $$

*Proof.* We first show that $C$ is self-orthogonal. Let $\mathbf{y}_0 = (\alpha \ \beta \ 0 \ \gamma \mathbf{x})$, the first row of $\mathcal{G}$, and $\mathbf{y}'_0 = (0 \ \sigma \ 0 \ 2\sigma \mathbf{x})$, the second row of $\mathcal{G}$. For $1 \le i \le m$, let $\mathbf{y}_i = (\mathbf{x}, \mathbf{r}_i) (\mathbf{x}, \mathbf{r}_i) (\mathbf{x}, \mathbf{r}_i) (\mathbf{r}_i)$. Then,

$$ (i) \text{ If } (\mathbf{x}, \mathbf{x}) = 1 \text{ and } (\alpha, \beta, \gamma \in E_3 \setminus J_3), \text{ then} $$

$$ (\mathbf{y}_0, \mathbf{y}_0) = \alpha^2 + \beta^2 + \gamma^2(\mathbf{x}, \mathbf{x}) = (\alpha^2 + \beta^2 + \gamma^2) = 0, $$

$$ (\mathbf{y}'_0, \mathbf{y}'_0) = \sigma^2 + (2\sigma)^2(\mathbf{x}, \mathbf{x}) = 0, $$

$$ (\mathbf{y}_0, \mathbf{y}'_0) = \beta\sigma + \gamma(2\sigma)(\mathbf{x}, \mathbf{x}) = 0, $$

$$ (\mathbf{y}'_0, \mathbf{y}_0) = \sigma\beta + 2\sigma\gamma(\mathbf{x}, \mathbf{x}) = \sigma + 2\sigma = 0, $$

$$ (\mathbf{y}_0, \mathbf{y}_i) = \alpha(\mathbf{x}, \mathbf{r}_i) + \beta(\mathbf{x}, \mathbf{r}_i) + \gamma(\mathbf{x}, \mathbf{r}_i) = (\alpha + \beta + \gamma) = 0, $$

$$ (\mathbf{y}'_0, \mathbf{y}_i) = (\sigma + 2\sigma)(\mathbf{x}, \mathbf{r}_i) = 0, $$

$$ (\mathbf{y}_i, \mathbf{y}_j) = 3(\mathbf{x}, \mathbf{r}_i)(\mathbf{x}, \mathbf{r}_j) + (\mathbf{r}_i, \mathbf{r}_j) = 0, $$

for all $i, j = 1, 2, \dots, m$.

$$ (ii) \text{ If } (\mathbf{x}, \mathbf{x}) = -1 \text{ and } (\alpha = 0, \beta \in E_3 \setminus J_3, \gamma = 2\beta), \text{ then} $$

$$ (\mathbf{y}_0, \mathbf{y}_0) = \beta^2 + (2\beta)^2(\mathbf{x}, \mathbf{x}) = \beta^2 - \beta^2 = 0, $$
$$ (\mathbf{y}'_0, \mathbf{y}_0) = \sigma\beta + (2\sigma)(2\beta)(\mathbf{x}, \mathbf{x}) = \sigma\beta - \sigma\beta = 0, $$

$$ (\mathbf{y}_0, \mathbf{y}_i) = \beta(\mathbf{x}, \mathbf{r}_i) + 2\beta(\mathbf{x}, \mathbf{r}_i) = 3\beta(\mathbf{x}, \mathbf{r}_i) = 0, $$

$$ (\mathbf{y}_i, \mathbf{y}_j) = 3(\mathbf{x}, \mathbf{r}_i)(\mathbf{x}, \mathbf{r}_j) + (\mathbf{r}_i, \mathbf{r}_j) = 0, $$

for all $i, j = 1, 2, \dots, m$.

In both cases, we see that $C$ is a self-orthogonal code. Since $|C| = 9^1 3^1 |C_0| = 3^{n+3}$, $C$ is a self-dual code of length $n+3$. $\square$

**Example 5.** We construct self-dual codes of length 7 derived from length 4. By Theorem 4, we have the self-dual $(4, 3^4, 1)$ code with generator matrix $\mathcal{G}_3 = \begin{pmatrix} a & 0 & a & a \\ 0 & f & 0 & 0 \\ 0 & 0 & f & g \end{pmatrix}$.

Using Theorem 8 from $\mathcal{G}_3$, we get five non-equivalent monomial self-dual codes with generator matrices:

$$ \begin{pmatrix} a & a & 0 & 0 & a & 0 & 0 \\ 0 & f & 0 & 0 & 0 & g & 0 \\ 0 & 0 & 0 & 0 & a & 0 & a \\ f & f & f & 0 & f & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & f & g \end{pmatrix}, \quad \begin{pmatrix} a & a & 0 & 0 & a & e & e \\ 0 & f & 0 & 0 & g & f & f \\ a & a & a & 0 & a & 0 & a \\ g & g & g & 0 & f & 0 & 0 \\ f & f & f & 0 & 0 & f & g \end{pmatrix}, \quad \begin{pmatrix} 0 & a & 0 & 0 & e & e & 0 \\ 0 & g & 0 & 0 & f & f & 0 \\ a & a & a & 0 & a & 0 & a \\ f & f & f & 0 & f & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & f & g \end{pmatrix}, \\ \begin{pmatrix} 0 & a & 0 & 0 & e & 0 & e \\ 0 & g & 0 & 0 & f & 0 & f \\ e & e & e & 0 & a & 0 & a \\ 0 & 0 & 0 & 0 & f & 0 & 0 \\ f & f & f & 0 & 0 & f & g \end{pmatrix}, \quad \begin{pmatrix} 0 & a & 0 & 0 & 0 & 0 & e \\ 0 & g & 0 & 0 & 0 & 0 & f \\ 0 & 0 & 0 & 0 & a & 0 & a \\ 0 & 0 & 0 & 0 & f & 0 & 0 \\ g & g & g & 0 & 0 & f & g \end{pmatrix}. $$

Their Hamming weight enumerators are

$$ W_1(x, y) = x^7 + 2x^6y + 12x^5y^2 + 64x^4y^3 + 116x^3y^4 + 312x^2y^5 + 880xy^6 + 800y^7, $$

$$ W_2(x, y) = x^7 + 12x^5y^2 + 40x^4y^3 + 90x^3y^4 + 240x^2y^5 + 724xy^6 + 1080y^7, $$

$$ W_3(x, y) = x^7 + 2x^5y^2 + 24x^4y^3 + 38x^3y^4 + 52x^2y^5 + 236xy^6 + 376y^7, $$

$$ W_4(x, y) = x^7 + 2x^6y + 6x^5y^2 + 40x^4y^3 + 56x^3y^4 + 48x^2y^5 + 256xy^6 + 320y^7, $$

and

$$ W_5(x, y) = x^7 + 2x^6y + 34x^4y^3 + 122x^3y^4 + 162x^2y^5 + 208xy^6 + 200y^7, $$

respectively.

**Theorem 9.** Two self-dual $E_3$-codes are monomially equivalent if and only if their residue codes are also equivalent.

*Proof.* Let $C_1$ and $C_2$ be two monomially equivalent codes over $E_3$, then their residue codes are also equivalent as $a \operatorname{res}(C_1) \subseteq C_1$ and $a \operatorname{res}(C_2) \subseteq C_2$.

Conversely, Let $C_1$ and $C_2$ be two self-dual $E_3$-codes, and $\operatorname{res}(C_1)$ and $\operatorname{res}(C_2)$ monomially equivalent codes. Then, there is a monomial matrix $M$ sends a code $\operatorname{res}(C_1)$ into the equivalent code such that

$$ \operatorname{res}(C_2) = \operatorname{res}(C_1)M = \{uM : u \in \operatorname{res}(C_1)\}. $$
$$ (\mathbf{y}'_0, \mathbf{y}_0) = \sigma\beta + (2\sigma)(2\beta)(\mathbf{x}, \mathbf{x}) = \sigma\beta - \sigma\beta = 0, $$

$$ (\mathbf{y}_0, \mathbf{y}_i) = \beta(\mathbf{x}, \mathbf{r}_i) + 2\beta(\mathbf{x}, \mathbf{r}_i) = 3\beta(\mathbf{x}, \mathbf{r}_i) = 0, $$

$$ (\mathbf{y}_i, \mathbf{y}_j) = 3(\mathbf{x}, \mathbf{r}_i)(\mathbf{x}, \mathbf{r}_j) + (\mathbf{r}_i, \mathbf{r}_j) = 0, $$

for all $i, j = 1, 2, \dots, m$.

In both cases, we see that $C$ is a self-orthogonal code. Since $|C| = 9^1 3^1 |C_0| = 3^{n+3}$, $C$ is a self-dual code of length $n+3$. $\square$

**Example 5.** We construct self-dual codes of length 7 derived from length 4. By Theorem 4, we have the self-dual (4, 3⁴, 1) code with generator matrix $\mathcal{G}_3 = \begin{pmatrix} a & 0 & a & a \\ 0 & f & 0 & 0 \\ 0 & 0 & f & g \end{pmatrix}$.

Using Theorem 8 from $\mathcal{G}_3$, we get five non-equivalent monomial self-dual codes with generator matrices:

$$ \begin{pmatrix} a & a & 0 & 0 & a & 0 & 0 \\ 0 & f & 0 & 0 & 0 & g & 0 \\ 0 & 0 & 0 & a & 0 & a & a \\ f & f & f & 0 & f & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & f & g \end{pmatrix}, \quad \begin{pmatrix} a & a & 0 & 0 & a & e & e \\ 0 & f & 0 & 0 & g & f & f \\ a & a & a & a & 0 & a & a \\ g & g & g & 0 & f & 0 & 0 \\ f & f & f & 0 & 0 & f & g \end{pmatrix}, \quad \begin{pmatrix} 0 & a & 0 & 0 & e & e & 0 \\ 0 & g & 0 & 0 & f & f & 0 \\ a & a & a & a & 0 & a & a \\ f & f & f & 0 & f & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & f & g \end{pmatrix}, \\ \begin{pmatrix} 0 & a & 0 & 0 & e & 0 & e \\ 0 & g & 0 & 0 & f & 0 & f \\ e & e & e & a & 0 & a & a \\ 0 & 0 & 0 & 0 & f & 0 & 0 \\ f & f & f & 0 & 0 & f & g \end{pmatrix}, \quad \begin{pmatrix} 0 & a & 0 & 0 & 0 & 0 & e \\ 0 & g & 0 & 0 & 0 & 0 & f \\ 0 & 0 & 0 & 0 & a & 0 & a \\ 0 & 0 & 0 & 0 & f & 0 & 0 \\ g & g & g & 0 & 0 & 0 & f & g \end{pmatrix}. $$

Their Hamming weight enumerators are

$$ W_1(x, y) = x^7 + 2x^6y + 12x^5y^2 + 64x^4y^3 + 116x^3y^4 + 312x^2y^5 + 880xy^6 + 800y^7, $$

$$ W_2(x, y) = x^7 + 12x^5y^2 + 40x^4y^3 + 90x^3y^4 + 240x^2y^5 + 724xy^6 + 1080y^7, $$

$$ W_3(x, y) = x^7 + 2x^5y^2 + 24x^4y^3 + 38x^3y^4 + 52x^2y^5 + 236xy^6 + 376y^7, $$

$$ W_4(x, y) = x^7 + 2x^6y + 6x^5y^2 + 40x^4y^3 + 56x^3y^4 + 48x^2y^5 + 256xy^6 + 320y^7, $$

and

$$ W_5(x, y) = x^7 + 2x^6y + 34x^4y^3 + 122x^3y^4 + 162x^2y^5 + 208xy^6 + 200y^7, $$

respectively.

**Theorem 9.** Two self-dual $E_3$-codes are monomially equivalent if and only if their residue codes are also equivalent.

*Proof.* Let $C_1$ and $C_2$ be two monomially equivalent codes over $E_3$, then their residue codes are also equivalent as $a \text{ res}(C_1) \subseteq C_1$ and $a \text{ res}(C_2) \subseteq C_2$.

Conversely, Let $C_1$ and $C_2$ be two self-dual $E_3$-codes, and $\text{res}(C_1)$ and $\text{res}(C_2)$ monomially equivalent codes. Then, there is a monomial matrix $M$ sends a code $\text{res}(C_1)$ into the equivalent code such that

$$ \text{res}(C_2) = \text{res}(C_1)M = \{uM : u \in \text{res}(C_1)\}. $$
The set of all monomials such that $\mathrm{res}(C_2) = \mathrm{res}(C_1)$ forms the automorphism group $G(\mathrm{res}(C_1))$ of the code $\mathrm{res}(C_1)$, and as $\mathrm{res}(C_2)^\perp = \mathrm{res}(C_1)^\perp M$.

Thus, from Theorem 4, we have

$$C_2 = a \mathrm{res}(C_2) + f \mathrm{res}(C_2)^\perp = a \mathrm{res}(C_1)M + f \mathrm{res}(C_1)^\perp M = C_1 M. \quad (3.1)$$

By Eq (3.1), we have $C_2 = C_1 M$, proving that $C_1$ and $C_2$ are monomially equivalent. $\square$

**Remark 4.** Every one-sided self-dual code is also a self-dual code, but not conversely as the next example shows.

**Example 6.** The linear code with the three generators $\mathcal{G} = \begin{pmatrix} a & 0 & a & a \\ 0 & f & 0 & 0 \\ 0 & 0 & f & g \end{pmatrix}$, is a self-dual code, but neither left- nor right-self-dual.

# 4. Computational results

In this section, we use the multilevel constructs in Theorems 2–4 to categorize self-orthogonal, (one-sided) self-dual, and self-dual $E_3$-codes of length $n < 8$ with residue dimension $k_1 = 0, 1, 2$. All the computer calculations in this section were performed in Magma [8].

## 4.1. Length 1

There is one right self-dual code over $E_3$ of type $\{0, 1\}$, with generator matrix in Table 2.

<table><caption>**Table 2.** RSD codes over $E_3$ of type $\{0, 1\}$.</caption><thead><tr><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th></tr></thead><tbody><tr><td>(f)</td><td>2</td><td>[1, 2]</td></tr></tbody></table>

## 4.2. Length 2

There is one right self-dual code over $E_3$ of type $\{0, 2\}$, with generator matrix in Table 3.

<table><caption>**Table 3.** RSD codes over $E_3$ of type $\{0, 2\}$.</caption><thead><tr><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th></tr></thead><tbody><tr><td>(f 0)<br>0 f</td><td>8</td><td>[1, 4, 4]</td></tr></tbody></table>

## 4.3. Length 3

For type $\{0, 2\}$, there are three distinct self-orthogonal codes over $E_3$, with generator matrices in Table 4.
The set of all monomials such that $\mathrm{res}(C_2) = \mathrm{res}(C_1)$ forms the automorphism group $G(\mathrm{res}(C_1))$ of the code $\mathrm{res}(C_1)$, and as $\mathrm{res}(C_2)^\perp = \mathrm{res}(C_1)^\perp M$.

Thus, from Theorem 4, we have

$$C_2 = a \operatorname{res}(C_2) + f \operatorname{res}(C_2)^\perp = a \operatorname{res}(C_1)M + f \operatorname{res}(C_1)^\perp M = C_1 M. \quad (3.1)$$

By Eq (3.1), we have $C_2 = C_1 M$, proving that $C_1$ and $C_2$ are monomially equivalent. $\square$

**Remark 4.** Every one-sided self-dual code is also a self-dual code, but not conversely as the next example shows.

**Example 6.** The linear code with the three generators $\mathcal{G} = \begin{pmatrix} a & 0 & a & a \\ 0 & f & 0 & 0 \\ 0 & 0 & f & g \end{pmatrix}$, is a self-dual code, but neither left- nor right-self-dual.

# 4. Computational results

In this section, we use the multilevel constructs in Theorems 2–4 to categorize self-orthogonal, (one-sided) self-dual, and self-dual $E_3$-codes of length $n < 8$ with residue dimension $k_1 = 0, 1, 2$. All the computer calculations in this section were performed in Magma [8].

## 4.1. Length 1

There is one right self-dual code over $E_3$ of type $\{0, 1\}$, with generator matrix in Table 2.

<table><caption>**Table 2.** RSD codes over $E_3$ of type $\{0, 1\}$.</caption><thead><tr><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th></tr></thead><tbody><tr><td>(f)</td><td>2</td><td>[1, 2]</td></tr></tbody></table>

## 4.2. Length 2

There is one right self-dual code over $E_3$ of type $\{0, 2\}$, with generator matrix in Table 3.

<table><caption>**Table 3.** RSD codes over $E_3$ of type $\{0, 2\}$.</caption><thead><tr><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th></tr></thead><tbody><tr><td>(f 0)<br>0 f</td><td>8</td><td>[1, 4, 4]</td></tr></tbody></table>

## 4.3. Length 3

For type $\{0, 2\}$, there are three distinct self-orthogonal codes over $E_3$, with generator matrices in Table 4.
<table><caption>**Table 4.** SO codes over $E_3$ of type {0, 2}.</caption><thead><tr><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th></tr></thead><tbody><tr><td>(f 0 0)<br>0 f f)</td><td>8</td><td>[1, 2, 2, 4]</td><td>(f 0 f)<br>0 f f)</td><td>12</td><td>[1, 0, 6, 2]</td></tr><tr><td>(f 0 0)<br>0 f f)</td><td>16</td><td>[1, 4, 4, 0]</td><td></td><td></td><td></td></tr></tbody></table>

For type {0, 3}, there is one right self-dual code over $E_3$, with generator matrix in Table 5.

<table><caption>**Table 5.** RSD codes over $E_3$ of type {0, 3}.</caption><thead><tr><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th></tr></thead><tbody><tr><td>(f 0 0)<br>0 f 0<br>0 0 f)</td><td>48</td><td>[1, 6, 12, 8]</td></tr></tbody></table>

For type {1, 0}, there are two distinct self-orthogonal codes over $E_3$, with generator matrices in Table 6.

<table><caption>**Table 6.** SO codes over $E_3$ of type {1, 0}.</caption><thead><tr><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th></tr></thead><tbody><tr><td>(a a a)</td><td>12</td><td>[1, 0, 0, 8]</td><td>(a b h)</td><td>6</td><td>[1, 0, 0, 8]</td></tr></tbody></table>

For type {1, 1}, there is one distinct self-dual code over $E_3$, with generator matrix in Table 7.

<table><caption>**Table 7.** SD codes over $E_3$ of type {1, 1}.</caption><thead><tr><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th></tr></thead><tbody><tr><td>(a a a)<br>0 g f)</td><td>12</td><td>[1, 0, 6, 20]</td></tr></tbody></table>

### 4.4. Length 4

For type {0, 4}, there is one right self-dual code over $E_3$, with generator matrix in Table 8.
<table><caption>**Table 4.** SO codes over $E_3$ of type {0, 2}.</caption><thead><tr><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th></tr></thead><tbody><tr><td>(f 0 0)<br>0 f f)</td><td>8</td><td>[1, 2, 2, 4]</td><td>(f 0 f)<br>0 f f)</td><td>12</td><td>[1, 0, 6, 2]</td></tr><tr><td>(f 0 0)<br>0 f f)</td><td>16</td><td>[1, 4, 4, 0]</td><td></td><td></td><td></td></tr></tbody></table>

For type {0, 3}, there is one right self-dual code over $E_3$, with generator matrix in Table 5.

<table><caption>**Table 5.** RSD codes over $E_3$ of type {0, 3}.</caption><thead><tr><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th></tr></thead><tbody><tr><td>(f 0 0)<br>0 f 0<br>0 0 f)</td><td>48</td><td>[1, 6, 12, 8]</td></tr></tbody></table>

For type {1, 0}, there are two distinct self-orthogonal codes over $E_3$, with generator matrices in Table 6.

<table><caption>**Table 6.** SO codes over $E_3$ of type {1, 0}.</caption><thead><tr><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th></tr></thead><tbody><tr><td>(a a a)</td><td>12</td><td>[1, 0, 0, 8]</td><td>(a b h)</td><td>6</td><td>[1, 0, 0, 8]</td></tr></tbody></table>

For type {1, 1}, there is one distinct self-dual code over $E_3$, with generator matrix in Table 7.

<table><caption>**Table 7.** SD codes over $E_3$ of type {1, 1}.</caption><thead><tr><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th></tr></thead><tbody><tr><td>(a a a)<br>0 g f)</td><td>12</td><td>[1, 0, 6, 20]</td></tr></tbody></table>

### 4.4. Length 4

For type {0, 4}, there is one right self-dual code over $E_3$, with generator matrix in Table 8.
<table><caption>**Table 8.** RSD codes over $E_3$ of type {0, 4}.</caption><thead><tr><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th></tr></thead><tbody><tr><td><table><tr><td>f</td><td>0</td><td>0</td><td>0</td></tr><tr><td>0</td><td>f</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>f</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>f</td></tr></table></td><td>96</td><td>[1, 8, 24, 32, 16]</td></tr></tbody></table>

For type {1, 0}, there are four distinct self-orthogonal codes over $E_3$, with generator matrices in Table 9.

<table><caption>**Table 9.** SO codes over $E_3$ of type {1, 0}.</caption><thead><tr><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th></tr></thead><tbody><tr><td>(a 0 a a)</td><td>24</td><td>[1, 0, 0, 8, 0]</td><td>(a 0 b h)</td><td>12</td><td>[1, 0, 0, 8, 0]</td></tr><tr><td>(a f a a)</td><td>12</td><td>[1, 0, 0, 2, 6]</td><td>(a f b h)</td><td>6</td><td>[1, 0, 0, 2, 6]</td></tr></tbody></table>

For type {1, 1}, there are six distinct self-orthogonal codes over $E_3$, with generator matrices in Table 10.

<table><caption>**Table 10.** SO codes over $E_3$ of type {1, 1}.</caption><thead><tr><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th></tr></thead><tbody><tr><td>(a 0 a a)<br>0 f 0 0</td><td>24</td><td>[1, 2, 0, 8, 16]</td><td>(a 0 b h)<br>0 f 0 0</td><td>12</td><td>[1, 2, 0, 8, 16]</td></tr><tr><td>(a 0 a a)<br>0 f f g</td><td>12</td><td>[1, 0, 0, 14, 12]</td><td>(a 0 b h)<br>0 f f g</td><td>6</td><td>[1, 0, 0, 14, 12]</td></tr><tr><td>(a 0 a a)<br>0 0 f g</td><td>24</td><td>[1, 0, 6, 20, 0]</td><td>(a f a a)<br>f 0 0 g</td><td>12</td><td>[1, 0, 6, 2, 18]</td></tr></tbody></table>

For type {1, 2}, there is only one distinct self-dual codes over $E_3$, with generator matrix in Table 11.
<table><caption>**Table 8.** RSD codes over $E_3$ of type {0, 4}.</caption><thead><tr><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th></tr></thead><tbody><tr><td><table><tr><td>f</td><td>0</td><td>0</td><td>0</td></tr><tr><td>0</td><td>f</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>f</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>f</td></tr></table></td><td>96</td><td>[1, 8, 24, 32, 16]</td></tr></tbody></table>

For type {1, 0}, there are four distinct self-orthogonal codes over $E_3$, with generator matrices in Table 9.

<table><caption>**Table 9.** SO codes over $E_3$ of type {1, 0}.</caption><thead><tr><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th></tr></thead><tbody><tr><td>(a 0 a a)</td><td>24</td><td>[1, 0, 0, 8, 0]</td><td>(a 0 b h)</td><td>12</td><td>[1, 0, 0, 8, 0]</td></tr><tr><td>(a f a a)</td><td>12</td><td>[1, 0, 0, 2, 6]</td><td>(a f b h)</td><td>6</td><td>[1, 0, 0, 2, 6]</td></tr></tbody></table>

For type {1, 1}, there are six distinct self-orthogonal codes over $E_3$, with generator matrices in Table 10.

<table><caption>**Table 10.** SO codes over $E_3$ of type {1, 1}.</caption><thead><tr><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th></tr></thead><tbody><tr><td>(a 0 a a)<br>0 f 0 0</td><td>24</td><td>[1, 2, 0, 8, 16]</td><td>(a 0 b h)<br>0 f 0 0</td><td>12</td><td>[1, 2, 0, 8, 16]</td></tr><tr><td>(a 0 a a)<br>0 f f g</td><td>12</td><td>[1, 0, 0, 14, 12]</td><td>(a 0 b h)<br>0 f f g</td><td>6</td><td>[1, 0, 0, 14, 12]</td></tr><tr><td>(a 0 a a)<br>0 0 f g</td><td>24</td><td>[1, 0, 6, 20, 0]</td><td>(a f a a)<br>f 0 0 g</td><td>12</td><td>[1, 0, 6, 2, 18]</td></tr></tbody></table>

For type {1, 2}, there is only one distinct self-dual codes over $E_3$, with generator matrix in Table 11.
<table><caption>**Table 11.** SD codes over $E_3$ of type {1, 2}.</caption><thead><tr><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th></tr></thead><tbody><tr><td><table><tr><td>a</td><td>0</td><td>a</td><td>a</td></tr><tr><td>0</td><td>b</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>b</td><td>d</td></tr></table></td><td>24</td><td>[1, 2, 6, 32, 40]</td></tr></tbody></table>

For type {2, 0}, there is only one left self-dual code over $E_3$, with generator matrix in Table 12.

<table><caption>**Table 12.** LSD codes over $E_3$ of type {2, 0}.</caption><thead><tr><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th></tr></thead><tbody><tr><td><table><tr><td>a</td><td>0</td><td>a</td><td>a</td></tr><tr><td>0</td><td>a</td><td>a</td><td>e</td></tr></table></td><td>48</td><td>[1, 0, 0, 32, 48]</td></tr></tbody></table>

### 4.5. Length 5

For type {0, 5}, there is one right self-dual code over $E_3$, with generator matrix in Table 13.

<table><caption>**Table 13.** RSD codes over $E_3$ of type {0, 5}.</caption><thead><tr><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th></tr></thead><tbody><tr><td><table><tr><td>f</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr><td>0</td><td>f</td><td>0</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>f</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>0</td><td>f</td></tr></table></td><td>3840</td><td>[1, 10, 40, 80, 80, 32]</td></tr></tbody></table>

For type {1, 0}, there are six distinct self-orthogonal codes, with generator matrices in Table 14.

<table><caption>**Table 14.** SO codes over $E_3$ of type {1, 0}.</caption><thead><tr><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th></tr></thead><tbody><tr><td>(a 0 0 a a)</td><td>96</td><td>[1, 0, 0, 8, 0, 0]</td><td>(a 0 0 b h)</td><td>48</td><td>[1, 0, 0, 8, 0, 0]</td></tr><tr><td>(a f 0 a a)</td><td>24</td><td>[1, 0, 0, 2, 6, 0]</td><td>(a f 0 b h)</td><td>12</td><td>[1, 0, 0, 2, 6, 0]</td></tr><tr><td>(a f f a a)</td><td>24</td><td>[1, 0, 0, 2, 0, 6]</td><td>(a f f b h)</td><td>12</td><td>[1, 0, 0, 2, 0, 6]</td></tr></tbody></table>

For type {1, 2}, there are ten distinct self-orthogonal codes, with generator matrices in Table 15.
<table><caption>**Table 11.** SD codes over $E_3$ of type {1, 2}.</caption><thead><tr><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th></tr></thead><tbody><tr><td><table><tr><td>a</td><td>0</td><td>a</td><td>a</td></tr><tr><td>0</td><td>b</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>b</td><td>d</td></tr></table></td><td>24</td><td>[1, 2, 6, 32, 40]</td></tr></tbody></table>

For type {2, 0}, there is only one left self-dual code over $E_3$, with generator matrix in Table 12.

<table><caption>**Table 12.** LSD codes over $E_3$ of type {2, 0}.</caption><thead><tr><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th></tr></thead><tbody><tr><td><table><tr><td>a</td><td>0</td><td>a</td><td>a</td></tr><tr><td>0</td><td>a</td><td>a</td><td>e</td></tr></table></td><td>48</td><td>[1, 0, 0, 32, 48]</td></tr></tbody></table>

### 4.5. Length 5

For type {0, 5}, there is one right self-dual code over $E_3$, with generator matrix in Table 13.

<table><caption>**Table 13.** RSD codes over $E_3$ of type {0, 5}.</caption><thead><tr><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th></tr></thead><tbody><tr><td><table><tr><td>f</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr><td>0</td><td>f</td><td>0</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>f</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>0</td><td>f</td></tr></table></td><td>3840</td><td>[1, 10, 40, 80, 80, 32]</td></tr></tbody></table>

For type {1, 0}, there are six distinct self-orthogonal codes, with generator matrices in Table 14.

<table><caption>**Table 14.** SO codes over $E_3$ of type {1, 0}.</caption><thead><tr><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th></tr></thead><tbody><tr><td>(a 0 0 a a)</td><td>96</td><td>[1, 0, 0, 8, 0, 0]</td><td>(a 0 0 b h)</td><td>48</td><td>[1, 0, 0, 8, 0, 0]</td></tr><tr><td>(a f 0 a a)</td><td>24</td><td>[1, 0, 0, 2, 6, 0]</td><td>(a f 0 b h)</td><td>12</td><td>[1, 0, 0, 2, 6, 0]</td></tr><tr><td>(a f f a a)</td><td>24</td><td>[1, 0, 0, 2, 0, 6]</td><td>(a f f b h)</td><td>12</td><td>[1, 0, 0, 2, 0, 6]</td></tr></tbody></table>

For type {1, 2}, there are ten distinct self-orthogonal codes, with generator matrices in Table 15.
<table><caption>**Table 15.** SO codes over $E_3$ of type {1, 2}.</caption><thead><tr><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th></tr></thead><tbody><tr><td><table><tr><td>a</td><td>0</td><td>0</td><td>a</td><td>a</td></tr><tr><td>0</td><td>f</td><td>0</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td></tr></table></td><td>96</td><td>[1, 4, 4, 8, 32, 32]</td><td><table><tr><td>a</td><td>0</td><td>0</td><td>b</td><td>h</td></tr><tr><td>0</td><td>f</td><td>0</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td></tr></table></td><td>48</td><td>[1, 4, 4, 8, 32, 32]</td></tr><tr><td><table><tr><td>a</td><td>0</td><td>0</td><td>a</td><td>a</td></tr><tr><td>0</td><td>f</td><td>f</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>f</td><td>g</td></tr></table></td><td>48</td><td>[1, 0, 8, 20, 12, 40]</td><td><table><tr><td>a</td><td>0</td><td>0</td><td>a</td><td>a</td></tr><tr><td>0</td><td>f</td><td>0</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>f</td><td>f</td><td>g</td></tr></table></td><td>24</td><td>[1, 2, 0, 14, 40, 24]</td></tr><tr><td><table><tr><td>a</td><td>0</td><td>0</td><td>b</td><td>h</td></tr><tr><td>0</td><td>f</td><td>f</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>f</td><td>g</td></tr></table></td><td>12</td><td>[1, 2, 0, 14, 40, 24]</td><td><table><tr><td>a</td><td>0</td><td>0</td><td>a</td><td>a</td></tr><tr><td>0</td><td>f</td><td>f</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>f</td><td>f</td><td>g</td></tr></table></td><td>24</td><td>[1, 0, 2, 20, 30, 28]</td></tr><tr><td><table><tr><td>a</td><td>0</td><td>0</td><td>b</td><td>h</td></tr><tr><td>0</td><td>f</td><td>f</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>f</td><td>f</td><td>g</td></tr></table></td><td>12</td><td>[1, 0, 2, 20, 30, 28]</td><td><table><tr><td>a</td><td>0</td><td>0</td><td>a</td><td>a</td></tr><tr><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>f</td><td>g</td></tr></table></td><td>48</td><td>[1, 2, 6, 32, 40, 0]</td></tr><tr><td><table><tr><td>a</td><td>f</td><td>f</td><td>a</td><td>a</td></tr><tr><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>f</td><td>g</td></tr></table></td><td>24</td><td>[1, 2, 6, 14, 22, 36]</td><td><table><tr><td>a</td><td>f</td><td>g</td><td>a</td><td>a</td></tr><tr><td>g</td><td>0</td><td>0</td><td>0</td><td>f</td></tr><tr><td>f</td><td>0</td><td>0</td><td>0</td><td>g</td></tr></table></td><td>24</td><td>[1, 0, 6, 2, 18, 0]</td></tr></tbody></table>

For type {1, 3}, there is only one distinct self-dual codes over $E_3$, with generator matrix in Table 16.

<table><caption>**Table 16.** SD codes over $E_3$ of type {1, 3}.</caption><thead><tr><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th></tr></thead><tbody><tr><td><table><tr><td>a</td><td>0</td><td>0</td><td>a</td><td>a</td></tr><tr><td>0</td><td>f</td><td>0</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>f</td><td>g</td></tr></table></td><td>96</td><td>[1, 4, 10, 44, 104, 80]</td></tr></tbody></table>

## 4.6. Length 6

For type {0, 6}, there is one right self-dual code over $E_3$, with generator matrix in Table 17.
<table><caption>**Table 15.** SO codes over $E_3$ of type {1, 2}.</caption><thead><tr><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th></tr></thead><tbody><tr><td><table><tr><td>a</td><td>0</td><td>0</td><td>a</td><td>a</td></tr><tr><td>0</td><td>f</td><td>0</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td></tr></table></td><td>96</td><td>[1, 4, 4, 8, 32, 32]</td><td><table><tr><td>a</td><td>0</td><td>0</td><td>b</td><td>h</td></tr><tr><td>0</td><td>f</td><td>0</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td></tr></table></td><td>48</td><td>[1, 4, 4, 8, 32, 32]</td></tr><tr><td><table><tr><td>a</td><td>0</td><td>0</td><td>a</td><td>a</td></tr><tr><td>0</td><td>f</td><td>f</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>f</td><td>g</td></tr></table></td><td>48</td><td>[1, 0, 8, 20, 12, 40]</td><td><table><tr><td>a</td><td>0</td><td>0</td><td>a</td><td>a</td></tr><tr><td>0</td><td>f</td><td>0</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>f</td><td>f</td><td>g</td></tr></table></td><td>24</td><td>[1, 2, 0, 14, 40, 24]</td></tr><tr><td><table><tr><td>a</td><td>0</td><td>0</td><td>b</td><td>h</td></tr><tr><td>0</td><td>f</td><td>f</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>f</td><td>g</td></tr></table></td><td>12</td><td>[1, 2, 0, 14, 40, 24]</td><td><table><tr><td>a</td><td>0</td><td>0</td><td>a</td><td>a</td></tr><tr><td>0</td><td>f</td><td>f</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>f</td><td>f</td><td>g</td></tr></table></td><td>24</td><td>[1, 0, 2, 20, 30, 28]</td></tr><tr><td><table><tr><td>a</td><td>0</td><td>0</td><td>b</td><td>h</td></tr><tr><td>0</td><td>f</td><td>f</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>f</td><td>f</td><td>g</td></tr></table></td><td>12</td><td>[1, 0, 2, 20, 30, 28]</td><td><table><tr><td>a</td><td>0</td><td>0</td><td>a</td><td>a</td></tr><tr><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>f</td><td>g</td></tr></table></td><td>48</td><td>[1, 2, 6, 32, 40, 0]</td></tr><tr><td><table><tr><td>a</td><td>f</td><td>f</td><td>a</td><td>a</td></tr><tr><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>f</td><td>g</td></tr></table></td><td>24</td><td>[1, 2, 6, 14, 22, 36]</td><td><table><tr><td>a</td><td>f</td><td>g</td><td>a</td><td>a</td></tr><tr><td>g</td><td>0</td><td>0</td><td>0</td><td>f</td></tr><tr><td>f</td><td>0</td><td>0</td><td>0</td><td>g</td></tr></table></td><td>24</td><td>[1, 0, 6, 2, 18, 0]</td></tr></tbody></table>

For type {1, 3}, there is only one distinct self-dual codes over $E_3$, with generator matrix in Table 16.

<table><caption>**Table 16.** SD codes over $E_3$ of type {1, 3}.</caption><thead><tr><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th></tr></thead><tbody><tr><td><table><tr><td>a</td><td>0</td><td>0</td><td>a</td><td>a</td></tr><tr><td>0</td><td>f</td><td>0</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>f</td><td>g</td></tr></table></td><td>96</td><td>[1, 4, 10, 44, 104, 80]</td></tr></tbody></table>

## 4.6. Length 6

For type {0, 6}, there is one right self-dual code over $E_3$, with generator matrix in Table 17.
<table><caption>**Table 17.** RSD codes over $E_3$ of type {0, 6}.</caption><thead><tr><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th></tr></thead><tbody><tr><td><table><tr><td>f</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr><td>0</td><td>f</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>0</td><td>f</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>f</td></tr></table></td><td>46080</td><td>[1, 6, 12, 16, 48, 96, 64]</td></tr></tbody></table>

For type {1, 3}, there are 13 distinct self-orthogonal codes, with generator matrices in Table 18.

<table><caption>**Table 18.** SO codes over $E_3$ of type {1, 3}.</caption><thead><tr><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th></tr></thead><tbody><tr><td><table><tr><td>a</td><td>a</td><td>0</td><td>0</td><td>0</td><td>a</td></tr><tr><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>0</td><td>f</td><td>0</td></tr></table></td><td>576</td><td>[1, 6, 12, 16, 48, 96, 64]</td><td><table><tr><td>a</td><td>b</td><td>0</td><td>0</td><td>0</td><td>h</td></tr><tr><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>0</td><td>f</td><td>0</td></tr></table></td><td>288</td><td>[1, 6, 12, 16, 48, 96, 64]</td></tr><tr><td><table><tr><td>a</td><td>a</td><td>0</td><td>0</td><td>0</td><td>a</td></tr><tr><td>f</td><td>0</td><td>f</td><td>0</td><td>0</td><td>g</td></tr><tr><td>0</td><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>0</td><td>f</td><td>0</td></tr></table></td><td>96</td><td>[1, 4, 4, 14, 68, 104, 48]</td><td><table><tr><td>a</td><td>b</td><td>0</td><td>0</td><td>0</td><td>h</td></tr><tr><td>f</td><td>0</td><td>f</td><td>0</td><td>0</td><td>g</td></tr><tr><td>0</td><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>0</td><td>f</td><td>0</td></tr></table></td><td>48</td><td>[1, 4, 4, 14, 68, 104, 48]</td></tr><tr><td><table><tr><td>a</td><td>a</td><td>0</td><td>0</td><td>0</td><td>a</td></tr><tr><td>f</td><td>0</td><td>0</td><td>0</td><td>0</td><td>g</td></tr><tr><td>0</td><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>0</td><td>f</td><td>0</td></tr></table></td><td>192</td><td>[1, 4, 10, 44, 104, 80, 0]</td><td><table><tr><td>a</td><td>a</td><td>0</td><td>0</td><td>0</td><td>a</td></tr><tr><td>f</td><td>0</td><td>f</td><td>0</td><td>0</td><td>g</td></tr><tr><td>f</td><td>0</td><td>0</td><td>f</td><td>0</td><td>g</td></tr><tr><td>f</td><td>0</td><td>0</td><td>0</td><td>f</td><td>g</td></tr></table></td><td>72</td><td>[1, 0, 6, 28, 54, 102, 52]</td></tr><tr><td><table><tr><td>a</td><td>b</td><td>0</td><td>0</td><td>0</td><td>h</td></tr><tr><td>f</td><td>0</td><td>f</td><td>0</td><td>0</td><td>g</td></tr><tr><td>f</td><td>0</td><td>0</td><td>f</td><td>0</td><td>g</td></tr><tr><td>f</td><td>0</td><td>0</td><td>0</td><td>f</td><td>g</td></tr></table></td><td>36</td><td>[1, 0, 6, 28, 54, 102, 52]</td><td><table><tr><td>a</td><td>a</td><td>a</td><td>a</td><td>a</td><td>a</td></tr><tr><td>f</td><td>0</td><td>0</td><td>g</td><td>0</td><td>0</td></tr><tr><td>f</td><td>0</td><td>0</td><td>g</td><td>0</td><td>0</td></tr><tr><td>f</td><td>0</td><td>0</td><td>g</td><td>0</td><td>0</td></tr></table></td><td>96</td><td>[1, 0, 2, 0, 0, 4, 20]</td></tr><tr><td><table><tr><td>a</td><td>b</td><td>h</td><td>a</td><td>b</td><td>h</td></tr><tr><td>f</td><td>0</td><td>0</td><td>g</td><td>0</td><td>0</td></tr><tr><td>f</td><td>0</td><td>0</td><td>g</td><td>0</td><td>0</td></tr><tr><td>f</td><td>0</td><td>0</td><td>g</td><td>0</td><td>0</td></tr></table></td><td>16</td><td>[1, 0, 2, 0, 0, 4, 20]</td><td><table><tr><td>a</td><td>a</td><td>a</td><td>a</td><td>a</td><td>a</td></tr><tr><td>f</td><td>f</td><td>0</td><td>g</td><td>g</td><td>0</td></tr><tr><td>f</td><td>f</td><td>0</td><td>g</td><td>g</td><td>0</td></tr><tr><td>f</td><td>f</td><td>0</td><td>g</td><td>g</td><td>0</td></tr></table></td><td>96</td><td>[1, 0, 0, 0, 6, 0, 20]</td></tr><tr><td><table><tr><td>a</td><td>b</td><td>h</td><td>a</td><td>b</td><td>h</td></tr><tr><td>f</td><td>f</td><td>0</td><td>g</td><td>g</td><td>0</td></tr><tr><td>f</td><td>f</td><td>0</td><td>g</td><td>g</td><td>0</td></tr><tr><td>f</td><td>f</td><td>0</td><td>g</td><td>g</td><td>0</td></tr></table></td><td>8</td><td>[1, 0, 0, 0, 6, 0, 20]</td><td><table><tr><td>a</td><td>a</td><td>a</td><td>a</td><td>a</td><td>a</td></tr><tr><td>g</td><td>f</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr><td>g</td><td>0</td><td>f</td><td>0</td><td>0</td><td>0</td></tr><tr><td>g</td><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td></tr></table></td><td>96</td><td>[1, 0, 12, 16, 18, 24, 172]</td></tr><tr><td><table><tr><td>a</td><td>b</td><td>h</td><td>a</td><td>b</td><td>h</td></tr><tr><td>g</td><td>f</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr><td>g</td><td>0</td><td>f</td><td>0</td><td>0</td><td>0</td></tr><tr><td>g</td><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td></tr></table></td><td>48</td><td>[1, 0, 12, 16, 18, 24, 172]</td><td></td><td></td></tr></tbody></table>

For type {1, 4}, there are two distinct self-dual codes over $E_3$, with generator matrices in Table 19.
<table><caption>**Table 17.** RSD codes over $E_3$ of type {0, 6}.</caption><thead><tr><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th></tr></thead><tbody><tr><td><table><tr><td>f</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr><td>0</td><td>f</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>0</td><td>f</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>f</td></tr></table></td><td>46080</td><td>[1, 6, 12, 16, 48, 96, 64]</td></tr></tbody></table>

For type {1, 3}, there are 13 distinct self-orthogonal codes, with generator matrices in Table 18.

<table><caption>**Table 18.** SO codes over $E_3$ of type {1, 3}.</caption><thead><tr><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th></tr></thead><tbody><tr><td><table><tr><td>a</td><td>a</td><td>0</td><td>0</td><td>0</td><td>a</td></tr><tr><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>0</td><td>f</td><td>0</td></tr></table></td><td>576</td><td>[1, 6, 12, 16, 48, 96, 64]</td><td><table><tr><td>a</td><td>b</td><td>0</td><td>0</td><td>0</td><td>h</td></tr><tr><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>0</td><td>f</td><td>0</td></tr></table></td><td>288</td><td>[1, 6, 12, 16, 48, 96, 64]</td></tr><tr><td><table><tr><td>a</td><td>a</td><td>0</td><td>0</td><td>0</td><td>a</td></tr><tr><td>f</td><td>0</td><td>f</td><td>0</td><td>0</td><td>g</td></tr><tr><td>0</td><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>0</td><td>f</td><td>0</td></tr></table></td><td>96</td><td>[1, 4, 4, 14, 68, 104, 48]</td><td><table><tr><td>a</td><td>b</td><td>0</td><td>0</td><td>0</td><td>h</td></tr><tr><td>f</td><td>0</td><td>f</td><td>0</td><td>0</td><td>g</td></tr><tr><td>0</td><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>0</td><td>f</td><td>0</td></tr></table></td><td>48</td><td>[1, 4, 4, 14, 68, 104, 48]</td></tr><tr><td><table><tr><td>a</td><td>a</td><td>0</td><td>0</td><td>0</td><td>a</td></tr><tr><td>f</td><td>0</td><td>0</td><td>0</td><td>0</td><td>g</td></tr><tr><td>0</td><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>0</td><td>f</td><td>0</td></tr></table></td><td>192</td><td>[1, 4, 10, 44, 104, 80, 0]</td><td><table><tr><td>a</td><td>a</td><td>0</td><td>0</td><td>0</td><td>a</td></tr><tr><td>f</td><td>0</td><td>f</td><td>0</td><td>0</td><td>g</td></tr><tr><td>f</td><td>0</td><td>0</td><td>f</td><td>0</td><td>g</td></tr><tr><td>f</td><td>0</td><td>0</td><td>0</td><td>f</td><td>g</td></tr></table></td><td>72</td><td>[1, 0, 6, 28, 54, 102, 52]</td></tr><tr><td><table><tr><td>a</td><td>b</td><td>0</td><td>0</td><td>0</td><td>h</td></tr><tr><td>f</td><td>0</td><td>f</td><td>0</td><td>0</td><td>g</td></tr><tr><td>f</td><td>0</td><td>0</td><td>f</td><td>0</td><td>g</td></tr><tr><td>f</td><td>0</td><td>0</td><td>0</td><td>f</td><td>g</td></tr></table></td><td>36</td><td>[1, 0, 6, 28, 54, 102, 52]</td><td><table><tr><td>a</td><td>a</td><td>a</td><td>a</td><td>a</td><td>a</td></tr><tr><td>f</td><td>0</td><td>0</td><td>g</td><td>0</td><td>0</td></tr><tr><td>f</td><td>0</td><td>0</td><td>g</td><td>0</td><td>0</td></tr><tr><td>f</td><td>0</td><td>0</td><td>g</td><td>0</td><td>0</td></tr></table></td><td>96</td><td>[1, 0, 2, 0, 0, 4, 20]</td></tr><tr><td><table><tr><td>a</td><td>b</td><td>h</td><td>a</td><td>b</td><td>h</td></tr><tr><td>f</td><td>0</td><td>0</td><td>g</td><td>0</td><td>0</td></tr><tr><td>f</td><td>0</td><td>0</td><td>g</td><td>0</td><td>0</td></tr><tr><td>f</td><td>0</td><td>0</td><td>g</td><td>0</td><td>0</td></tr></table></td><td>16</td><td>[1, 0, 2, 0, 0, 4, 20]</td><td><table><tr><td>a</td><td>a</td><td>a</td><td>a</td><td>a</td><td>a</td></tr><tr><td>f</td><td>f</td><td>0</td><td>g</td><td>g</td><td>0</td></tr><tr><td>f</td><td>f</td><td>0</td><td>g</td><td>g</td><td>0</td></tr><tr><td>f</td><td>f</td><td>0</td><td>g</td><td>g</td><td>0</td></tr></table></td><td>96</td><td>[1, 0, 0, 0, 6, 0, 20]</td></tr><tr><td><table><tr><td>a</td><td>b</td><td>h</td><td>a</td><td>b</td><td>h</td></tr><tr><td>f</td><td>f</td><td>0</td><td>g</td><td>g</td><td>0</td></tr><tr><td>f</td><td>f</td><td>0</td><td>g</td><td>g</td><td>0</td></tr><tr><td>f</td><td>f</td><td>0</td><td>g</td><td>g</td><td>0</td></tr></table></td><td>8</td><td>[1, 0, 0, 0, 6, 0, 20]</td><td><table><tr><td>a</td><td>a</td><td>a</td><td>a</td><td>a</td><td>a</td></tr><tr><td>g</td><td>f</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr><td>g</td><td>0</td><td>f</td><td>0</td><td>0</td><td>0</td></tr><tr><td>g</td><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td></tr></table></td><td>96</td><td>[1, 0, 12, 16, 18, 24, 172]</td></tr><tr><td><table><tr><td>a</td><td>b</td><td>h</td><td>a</td><td>b</td><td>h</td></tr><tr><td>g</td><td>f</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr><td>g</td><td>0</td><td>f</td><td>0</td><td>0</td><td>0</td></tr><tr><td>g</td><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td></tr></table></td><td>48</td><td>[1, 0, 12, 16, 18, 24, 172]</td><td></td><td></td></tr></tbody></table>

For type {1, 4}, there are two distinct self-dual codes over $E_3$, with generator matrices in Table 19.
<table><caption>**Table 19.** SD codes over $E_3$ of type {1, 4}.</caption><thead><tr><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th></tr></thead><tbody><tr><td><table><tr><td>a</td><td>a</td><td>0</td><td>0</td><td>0</td><td>a</td></tr><tr><td>0</td><td>f</td><td>0</td><td>0</td><td>0</td><td>g</td></tr><tr><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>0</td><td>f</td><td>0</td></tr></table></td><td>576</td><td>[1, 6, 18, 64, 192, 288, 160]</td><td><table><tr><td>a</td><td>a</td><td>a</td><td>a</td><td>a</td><td>a</td></tr><tr><td>0</td><td>f</td><td>0</td><td>0</td><td>0</td><td>g</td></tr><tr><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td><td>g</td></tr><tr><td>0</td><td>0</td><td>0</td><td>f</td><td>0</td><td>g</td></tr><tr><td>0</td><td>0</td><td>0</td><td>0</td><td>f</td><td>g</td></tr></table></td><td>1440</td><td>[1, 0, 30, 40, 90, 60, 508]</td></tr></tbody></table>

### 4.7. Length 7

For type {0, 7}, there is one right self-dual code over $E_3$, with generator matrix in Table 20.

<table><caption>**Table 20.** RSD codes over $E_3$ of type {0, 7}.</caption><thead><tr><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th></tr></thead><tbody><tr><td><table><tr><td>f</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr><td>0</td><td>f</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>f</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>f</td></tr></table></td><td>604800</td><td>[1, 14, 84, 280, 560, 672, 448, 128]</td></tr></tbody></table>

For type {1, 5}, there are two distinct self-dual codes over $E_3$, with generator matrices in Table 21.

<table><caption>**Table 21.** SD codes over $E_3$ of type {1, 5}.</caption><thead><tr><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th></tr></thead><tbody><tr><td><table><tr><td>a</td><td>a</td><td>0</td><td>a</td><td>a</td><td>a</td><td>a</td></tr><tr><td>0</td><td>f</td><td>0</td><td>0</td><td>0</td><td>0</td><td>g</td></tr><tr><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td><td>g</td></tr><tr><td>0</td><td>0</td><td>0</td><td>0</td><td>f</td><td>0</td><td>g</td></tr><tr><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>f</td><td>g</td></tr></table></td><td>2880</td><td>[1, 2, 30, 100, 170, 240, 628, 1016]</td></tr><tr><td><table><tr><td>a</td><td>a</td><td>0</td><td>0</td><td>0</td><td>0</td><td>a</td></tr><tr><td>0</td><td>f</td><td>0</td><td>0</td><td>0</td><td>0</td><td>g</td></tr><tr><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>f</td><td>0</td></tr></table></td><td>4608</td><td>[1, 8, 30, 100, 320, 672, 736, 320]</td></tr></tbody></table>

### 4.8. Examples

According to the mass formula in subsection 2.5, we enumerate all equivalent codes obtained under the action of the monomial group, and illustrate how the mass formula can be used in the classification of $E_3$-codes, that is, we find representatives for the equivalence classes of $E_3$-codes for each length and type. The following examples illustrate our results.
<table><caption>**Table 19.** SD codes over $E_3$ of type {1, 4}.</caption><thead><tr><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th></tr></thead><tbody><tr><td><table><tr><td>a</td><td>a</td><td>0</td><td>0</td><td>0</td><td>a</td></tr><tr><td>0</td><td>f</td><td>0</td><td>0</td><td>0</td><td>g</td></tr><tr><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>0</td><td>f</td><td>0</td></tr></table></td><td>576</td><td>[1, 6, 18, 64, 192, 288, 160]</td><td><table><tr><td>a</td><td>a</td><td>a</td><td>a</td><td>a</td><td>a</td></tr><tr><td>0</td><td>f</td><td>0</td><td>0</td><td>0</td><td>g</td></tr><tr><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td><td>g</td></tr><tr><td>0</td><td>0</td><td>0</td><td>f</td><td>0</td><td>g</td></tr><tr><td>0</td><td>0</td><td>0</td><td>0</td><td>f</td><td>g</td></tr></table></td><td>1440</td><td>[1, 0, 30, 40, 90, 60, 508]</td></tr></tbody></table>

## 4.7. Length 7

For type {0, 7}, there is one right self-dual code over $E_3$, with generator matrix in Table 20.

<table><caption>**Table 20.** RSD codes over $E_3$ of type {0, 7}.</caption><thead><tr><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th></tr></thead><tbody><tr><td><table><tr><td>f</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr><td>0</td><td>f</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>f</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>f</td></tr></table></td><td>604800</td><td>[1, 14, 84, 280, 560, 672, 448, 128]</td></tr></tbody></table>

For type {1, 5}, there are two distinct self-dual codes over $E_3$, with generator matrices in Table 21.

<table><caption>**Table 21.** SD codes over $E_3$ of type {1, 5}.</caption><thead><tr><th>Generator matrix</th><th>|Aut(C)|</th><th>Weight distribution</th></tr></thead><tbody><tr><td><table><tr><td>a</td><td>a</td><td>0</td><td>a</td><td>a</td><td>a</td><td>a</td></tr><tr><td>0</td><td>f</td><td>0</td><td>0</td><td>0</td><td>0</td><td>g</td></tr><tr><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td><td>g</td></tr><tr><td>0</td><td>0</td><td>0</td><td>0</td><td>f</td><td>0</td><td>g</td></tr><tr><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>f</td><td>g</td></tr></table></td><td>2880</td><td>[1, 2, 30, 100, 170, 240, 628, 1016]</td></tr><tr><td><table><tr><td>a</td><td>a</td><td>0</td><td>0</td><td>0</td><td>0</td><td>a</td></tr><tr><td>0</td><td>f</td><td>0</td><td>0</td><td>0</td><td>0</td><td>g</td></tr><tr><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>0</td><td>f</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>f</td><td>0</td></tr></table></td><td>4608</td><td>[1, 8, 30, 100, 320, 672, 736, 320]</td></tr></tbody></table>

## 4.8. Examples

According to the mass formula in subsection 2.5, we enumerate all equivalent codes obtained under the action of the monomial group, and illustrate how the mass formula can be used in the classification of $E_3$-codes, that is, we find representatives for the equivalence classes of $E_3$-codes for each length and type. The following examples illustrate our results.
**Example 7.** Let $C$ be the set of self-orthogonal codes over $E_3$ of length 3 and type $\{1, 0\}$ given by the following generator matrices:

$$ ((a \ a \ a), (a \ b \ h)). $$

The codes in $C$ are inequivalent and they have an automorphism group of order 12 and 6 respectively. Therefore, from Corollary 1,

$$ \sum_{1}^{2} \frac{1}{|Aut(C)|} = \frac{1}{12} + \frac{1}{6} = \frac{1}{4} = \frac{N_{SO}(n, k_1, k_2)}{2^n n!} = \frac{4 \times 3 \times 1}{6 \times 8} = \frac{1}{4}. $$

It demonstrates that, up to monomial equivalency, there exist precisely two self-orthogonal codes.

**Example 8.** Let $C$ be the set of left self-dual codes over $E_3$ of length 4 and type $\{2, 0\}$ given by the following generator matrix: $$ \begin{pmatrix} a & 0 & a & a \\ 0 & a & a & e \end{pmatrix}. $$

The code in $C$ has an automorphism group of order 48. Therefore, by Corollary 4,

$$ \sum_{1}^{1} \frac{1}{|Aut(C)|} = \frac{1}{48} = \frac{\varphi_{n, \frac{n}{2}}}{2^n n!} = \frac{8 \times 1 \times 1}{24 \times 16} = \frac{1}{48}. $$

It demonstrates that, up to monomial equivalency, there exist only one left self-dual code.

**Example 9.** Let $C$ be the set of self-dual codes over $E_3$ of length 7 and type $\{1, 5\}$ given by the following generator matrices:

$$ \left( \begin{pmatrix} a & a & 0 & 0 & 0 & 0 & a \\ 0 & f & 0 & 0 & 0 & 0 & g \\ 0 & 0 & f & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & f & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & f & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & f & 0 \end{pmatrix}, \begin{pmatrix} a & a & 0 & a & a & a & a \\ 0 & f & 0 & 0 & 0 & 0 & g \\ 0 & 0 & f & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & f & 0 & 0 & g \\ 0 & 0 & 0 & 0 & f & 0 & g \\ 0 & 0 & 0 & 0 & 0 & f & g \end{pmatrix} \right). $$

The codes in $C$ are inequivalent and they have an automorphism group of order 4608 and 2880 respectively. Therefore, from Corollary 2, we have

$$ \sum_{1}^{2} \frac{1}{|Aut(C)|} = \frac{1}{4608} + \frac{1}{2880} = 0.000564 = \frac{\varphi_{n,k_1}}{2^7 7!} = \frac{364}{128 \times 5040} = 0.000564, $$

which shows that there are exactly two self-dual codes, up to monomial equivalence.

Next, we use our build-up construction methods mentioned in Sections 3.1–3.3 to obtain SO, RSD, LSD, and SD codes over $E_3$. It is possible to discover several self-dual codes of suitable lengths in a fairly effective manner, as demonstrated by our computation. The partial classification results are summarized in Table 22 below.
**Example 7.** Let $C$ be the set of self-orthogonal codes over $E_3$ of length 3 and type $\{1, 0\}$ given by the following generator matrices:

$$ ((a \ a \ a), (a \ b \ h)). $$

The codes in $C$ are inequivalent and they have an automorphism group of order 12 and 6 respectively. Therefore, from Corollary 1,

$$ \sum_{1}^{2} \frac{1}{|Aut(C)|} = \frac{1}{12} + \frac{1}{6} = \frac{1}{4} = \frac{N_{SO}(n, k_1, k_2)}{2^n n!} = \frac{4 \times 3 \times 1}{6 \times 8} = \frac{1}{4}. $$

It demonstrates that, up to monomial equivalency, there exist precisely two self-orthogonal codes.

**Example 8.** Let $C$ be the set of left self-dual codes over $E_3$ of length 4 and type $\{2, 0\}$ given by the following generator matrix: $$ \begin{pmatrix} a & 0 & a & a \\ 0 & a & a & e \end{pmatrix}. $$

The code in $C$ has an automorphism group of order 48. Therefore, by Corollary 4,

$$ \sum_{1}^{1} \frac{1}{|Aut(C)|} = \frac{1}{48} = \frac{\varphi_{n, \frac{n}{2}}}{2^n n!} = \frac{8 \times 1 \times 1}{24 \times 16} = \frac{1}{48}. $$

It demonstrates that, up to monomial equivalency, there exist only one left self-dual code.

**Example 9.** Let $C$ be the set of self-dual codes over $E_3$ of length 7 and type $\{1, 5\}$ given by the following generator matrices:

$$ \left( \begin{pmatrix} a & a & 0 & 0 & 0 & 0 & a \\ 0 & f & 0 & 0 & 0 & 0 & g \\ 0 & 0 & f & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & f & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & f & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & f & 0 \end{pmatrix}, \begin{pmatrix} a & a & 0 & a & a & a & a \\ 0 & f & 0 & 0 & 0 & 0 & g \\ 0 & 0 & f & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & f & 0 & 0 & g \\ 0 & 0 & 0 & 0 & f & 0 & g \\ 0 & 0 & 0 & 0 & 0 & f & g \end{pmatrix} \right). $$

The codes in $C$ are inequivalent and they have an automorphism group of order 4608 and 2880 respectively. Therefore, from Corollary 2, we have

$$ \sum_{1}^{2} \frac{1}{|Aut(C)|} = \frac{1}{4608} + \frac{1}{2880} = 0.000564 = \frac{\varphi_{n,k_1}}{2^7 7!} = \frac{364}{128 \times 5040} = 0.000564, $$

which shows that there are exactly two self-dual codes, up to monomial equivalence.

Next, we use our build-up construction methods mentioned in Sections 3.1–3.3 to obtain SO, RSD, LSD, and SD codes over $E_3$. It is possible to discover several self-dual codes of suitable lengths in a fairly effective manner, as demonstrated by our computation. The partial classification results are summarized in Table 22 below.
<table><caption>**Table 22.** Classification of SO, RSD, LSD, and SD codes using the building method in Section 3.</caption><thead><tr><th>n</th><th>Code</th><th>Construction</th><th>Length of constructed code</th><th>x</th><th>d(C)</th><th>Weight distribution</th></tr></thead><tbody><tr><td rowspan="2">1</td><td rowspan="2">(f)</td><td>Theorem 5</td><td>4</td><td>(1)</td><td>1</td><td>[1, 2, 0, 8, 16]</td></tr><tr><td>Theorem 7</td><td>5</td><td>(0)</td><td>1</td><td>[1, 10, 40, 80, 80, 32]</td></tr><tr><td rowspan="3">2</td><td rowspan="3">(f 0 0<br>0 f 0)</td><td>Theorem 5</td><td>5</td><td>(10)</td><td>1</td><td>[1, 4, 4, 8, 32, 32]</td></tr><tr><td>Theorem 7</td><td>6</td><td>(11)<br>(00)</td><td>2<br>1</td><td>[1, 0, 8, 20, 12, 40]<br>[1, 6, 12, 16, 48, 96, 64]</td></tr><tr><td>Theorem 5</td><td>6</td><td>(001)</td><td>1</td><td>[1, 12, 60, 160, 240, 192, 64]</td></tr><tr><td rowspan="8">3</td><td rowspan="8">(f 0 0 0<br>0 f 0 0<br>0 0 f 0)</td><td>Theorem 7</td><td>7</td><td>(000)</td><td>1</td><td>[1, 14, 84, 280, 560, 672, 448, 128]</td></tr><tr><td>Theorem 5</td><td>6</td><td>(020)<br>(002)<br>(111)<br>(221)<br>(110)<br>(210)</td><td>2<br>3<br>2<br>2<br>2<br>2</td><td>[1, 0, 2, 20, 30, 28, 162]<br>[1, 0, 0, 16, 0, 0, 64]<br>[1, 0, 14, 20, 48, 160, 0]<br>[1, 0, 10, 0, 24, 68, 140]<br>[1, 0, 6, 28, 0, 48, 160]<br>[1, 0, 2, 32, 48, 64, 96]</td></tr><tr><td>Theorem 6</td><td>7</td><td>(110)(120)</td><td>2</td><td>[1, 0, 6, 52, 48, 192, 960]</td></tr><tr><td>Theorem 7</td><td>6</td><td>(000)</td><td>1</td><td>[1, 6, 18, 64, 192, 288, 160]</td></tr><tr><td>Theorem 8</td><td>6</td><td>(100)<br>(110)</td><td>2<br>1</td><td>[1, 0, 12, 40, 36, 240, 400]<br>[1, 6, 12, 64, 30, 150, 466]</td></tr><tr><td rowspan="6">4</td><td rowspan="6">(f 0 0 0 0<br>0 f 0 0<br>0 0 f 0<br>0 0 0 f 0)</td><td>Theorem 5</td><td>7</td><td>(0100)<br>(1111)<br>(1100)</td><td>2<br>1<br>1</td><td>[1, 8, 24, 40, 80, 192, 256, 128]<br>[1, 2, 12, 40, 50, 60, 220, 344]<br>[1, 4, 12, 52, 124, 168, 208, 160]</td></tr><tr><td>Theorem 7</td><td>7</td><td>(0000)</td><td>1</td><td>[1, 14, 84, 280, 560, 672, 448, 128]</td></tr><tr><td>Theorem 5</td><td>7</td><td>(1000)<br>(2211)<br>(1212)<br>(1010)</td><td>1<br>2<br>2<br>1</td><td>[1, 2, 6, 40, 56, 48, 256, 320]<br>[1, 0, 2, 16, 34, 76, 232, 368]<br>[1, 0, 2, 24, 38, 52, 236, 376]<br>[1, 2, 6, 40, 56, 48, 256, 320]</td></tr><tr><td>Theorem 6</td><td>8</td><td>(1100), (1200)<br>(1010), (0102)<br>(2001), (0110)</td><td>1<br>2<br>2</td><td>[1, 2, 6, 64, 152, 288, 1312, 2816, 1920]<br>[1, 0, 10, 40, 192, 412, 1084, 2850, 1972]<br>[1, 0, 2, 40, 78, 164, 1012, 2784, 2480]</td></tr><tr><td>Theorem 5</td><td>7</td><td>(1000)<br>(2211)<br>(1212)<br>(1010)</td><td>1<br>2<br>2<br>1</td><td>[1, 2, 6, 40, 56, 48, 256, 320]<br>[1, 0, 2, 16, 34, 76, 232, 368]<br>[1, 0, 2, 24, 38, 52, 236, 376]<br>[1, 2, 6, 40, 56, 48, 256, 320]</td></tr><tr><td>Theorem 6</td><td>8</td><td>(1100), (1200)<br>(1010), (0102)<br>(2001), (0110)</td><td>1<br>2<br>2</td><td>[1, 2, 6, 64, 152, 288, 1312, 2816, 1920]<br>[1, 0, 10, 40, 192, 412, 1084, 2850, 1972]<br>[1, 0, 2, 40, 78, 164, 1012, 2784, 2480]</td></tr></tbody></table>

*Continued on next page*
<table><caption>**Table 22.** Classification of SO, RSD, LSD, and SD codes using the building method in Section 3.</caption><thead><tr><th>n</th><th>Code</th><th>Construction</th><th>Length of constructed code</th><th>x</th><th>d(C)</th><th>Weight distribution</th></tr></thead><tbody><tr><td rowspan="2">1</td><td rowspan="2">(f)</td><td>Theorem 5</td><td>4</td><td>(1)</td><td>1</td><td>[1, 2, 0, 8, 16]</td></tr><tr><td>Theorem 7</td><td>5</td><td>(0)</td><td>1</td><td>[1, 10, 40, 80, 80, 32]</td></tr><tr><td rowspan="3">2</td><td rowspan="3">(f 0 0<br>0 f)</td><td>Theorem 5</td><td>5</td><td>(10)</td><td>1</td><td>[1, 4, 4, 8, 32, 32]</td></tr><tr><td>Theorem 7</td><td>6</td><td>(11)<br>(00)</td><td>2<br>1</td><td>[1, 0, 8, 20, 12, 40]<br>[1, 6, 12, 16, 48, 96, 64]</td></tr><tr><td>Theorem 5</td><td>6</td><td>(001)</td><td>1</td><td>[1, 12, 60, 160, 240, 192, 64]</td></tr><tr><td rowspan="8">3</td><td rowspan="8">(f 0 0 0<br>0 f 0 0<br>0 0 f)</td><td>Theorem 7</td><td>7</td><td>(000)</td><td>1</td><td>[1, 14, 84, 280, 560, 672, 448, 128]</td></tr><tr><td>Theorem 5</td><td>6</td><td>(020)<br>(002)<br>(111)<br>(221)<br>(110)<br>(210)</td><td>2<br>3<br>2<br>2<br>2<br>2</td><td>[1, 0, 2, 20, 30, 28, 162]<br>[1, 0, 0, 16, 0, 0, 64]<br>[1, 0, 14, 20, 48, 160, 0]<br>[1, 0, 10, 0, 24, 68, 140]<br>[1, 0, 6, 28, 0, 48, 160]<br>[1, 0, 2, 32, 48, 64, 96]</td></tr><tr><td>Theorem 6</td><td>7</td><td>(110)(120)</td><td>2</td><td>[1, 0, 6, 52, 48, 192, 962, 960]</td></tr><tr><td>Theorem 7</td><td>6</td><td>(000)</td><td>1</td><td>[1, 6, 18, 64, 192, 288, 160]</td></tr><tr><td>Theorem 8</td><td>6</td><td>(100)<br>(110)</td><td>2<br>1</td><td>[1, 0, 12, 40, 36, 240, 400]<br>[1, 6, 12, 64, 30, 150, 466]</td></tr><tr><td rowspan="4">4</td><td rowspan="4">(f 0 0 0 0<br>0 f 0 0<br>0 0 f 0<br>0 0 0 f)</td><td>Theorem 5</td><td>7</td><td>(0100)<br>(1111)<br>(1100)</td><td>2<br>1<br>1</td><td>[1, 8, 24, 40, 80, 192, 256, 128]<br>[1, 2, 12, 40, 50, 60, 220, 344]<br>[1, 4, 12, 52, 124, 168, 208, 160]</td></tr><tr><td>Theorem 7</td><td>7</td><td>(0000)</td><td>1</td><td>[1, 14, 84, 280, 560, 672, 448, 128]</td></tr><tr><td>Theorem 5</td><td>7</td><td>(1000)<br>(2211)<br>(1212)<br>(1010)</td><td>1<br>2<br>2<br>1</td><td>[1, 2, 6, 40, 56, 48, 256, 320]<br>[1, 0, 2, 16, 34, 76, 232, 368]<br>[1, 0, 2, 24, 38, 52, 236, 376]<br>[1, 2, 6, 40, 56, 48, 256, 320]</td></tr><tr><td>Theorem 6</td><td>8</td><td>(1100), (1200)<br>(1010), (0102)<br>(2001), (0110)</td><td>1<br>2<br>2</td><td>[1, 2, 6, 64, 152, 288, 1312, 2816, 1920]<br>[1, 0, 10, 40, 192, 412, 1084, 2850, 1972]<br>[1, 0, 2, 40, 78, 164, 1012, 2784, 2480]</td></tr></tbody></table>

*Continued on next page*
<table><thead><tr><th>n</th><th>Code</th><th>Construction</th><th>Length of constructed code</th><th>x</th><th>d(C)</th><th>Weight distribution</th></tr></thead><tbody><tr><td rowspan="4">4</td><td rowspan="4">$\begin{pmatrix} a & 0 & a & a \\ 0 & f & 0 & 0 \\ 0 & 0 & f & g \end{pmatrix}$</td><td rowspan="4">Theorem 8</td><td rowspan="4">7</td><td>(1000)</td><td>1</td><td>[1, 2, 12, 64, 116, 312, 880, 800]</td></tr><tr><td>(1221)</td><td>2</td><td>[1, 0, 12, 40, 90, 240, 724, 1080]</td></tr><tr><td>(1010)</td><td>1</td><td>[1, 2, 6, 40, 56, 48, 256, 320]</td></tr><tr><td>(1100)</td><td>2</td><td>[1, 0, 2, 24, 38, 52, 236, 376]</td></tr><tr><td rowspan="4">5</td><td rowspan="4">$\begin{pmatrix} a & 0 & a & a \\ 0 & a & a & e \end{pmatrix}$</td><td rowspan="2">Theorem 5</td><td rowspan="2">7</td><td>(1100)</td><td>3</td><td>[1, 0, 0, 40, 48, 0, 256, 384]</td></tr><tr><td>(1212)</td><td>3</td><td>[1, 0, 0, 16, 24, 72, 280, 336]</td></tr><tr><td rowspan="2">Theorem 8</td><td rowspan="2">7</td><td>(0001)</td><td>1</td><td>[1, 6, 12, 40, 240, 672, 832, 384]</td></tr><tr><td>(1111)</td><td>2</td><td>[1, 0, 6, 52, 48, 192, 928, 960]</td></tr><tr><td></td><td></td><td>Theorem 6</td><td>8</td><td>(1100), (0011)</td><td>3</td><td>[1, 0, 0, 34, 96, 0, 1024, 3072, 2304]</td></tr><tr><td rowspan="4">5</td><td rowspan="4">$\begin{pmatrix} f & 0 & 0 & 0 & 0 \\ 0 & f & 0 & 0 & 0 \\ 0 & 0 & f & 0 & 0 \\ 0 & 0 & 0 & f & 0 \\ 0 & 0 & 0 & 0 & f \end{pmatrix}$</td><td rowspan="2">Theorem 5</td><td rowspan="2">8</td><td>(10000)</td><td>1</td><td>[1, 10, 40, 88, 160, 352, 640, 640, 256]</td></tr><tr><td>(11110)</td><td>1</td><td>[1, 4, 16, 64, 130, 160, 340, 784, 688]</td></tr><tr><td rowspan="2">Theorem 7</td><td rowspan="2">8</td><td>(00000)</td><td>1</td><td>[1, 16, 112, 448, 1120, 1792, 1792, 1024, 256]</td></tr><tr><td></td><td></td><td></td></tr><tr><td rowspan="4">5</td><td rowspan="4">$\begin{pmatrix} a & 0 & 0 & a & a \\ 0 & f & 0 & 0 & 0 \\ 0 & 0 & f & 0 & 0 \\ 0 & 0 & 0 & f & g \end{pmatrix}$</td><td rowspan="2">Theorem 5</td><td rowspan="2">8</td><td>(11110)</td><td>2</td><td>[1, 0, 6, 16, 60, 36, 388, 696, 984]</td></tr><tr><td>(10000)</td><td>1</td><td>[1, 4, 10, 52, 136, 160, 352, 832, 640]</td></tr><tr><td rowspan="2">Theorem 6</td><td rowspan="2">9</td><td>(22000)</td><td>1</td><td>[1, 2, 2, 28, 86, 128, 340, 848, 752]</td></tr><tr><td>(00011)</td><td>1</td><td>[1, 4, 10, 52, 136, 160, 352, 832, 640]</td></tr><tr><td rowspan="2"></td><td rowspan="2"></td><td rowspan="2">Theorem 6</td><td rowspan="2">9</td><td>(01100), (01200)</td><td>1</td><td>[1, 4, 10, 76, 280, 592, 1888, 5440, 7552, 3840]</td></tr><tr><td>(01100), (00011)</td><td>2</td><td>[1, 0, 18, 60, 108, 720, 1416, 2160, 7200, 8000]</td></tr></tbody></table>

*Continued on next page*
<table><thead><tr><th>n</th><th>Code</th><th>Construction</th><th>Length of constructed code</th><th>x</th><th>d(C)</th><th>Weight distribution</th></tr></thead><tbody><tr><td rowspan="4">4</td><td rowspan="4">$\begin{pmatrix} a & 0 & a & a \\ 0 & f & 0 & 0 \\ 0 & 0 & f & g \end{pmatrix}$</td><td rowspan="4">Theorem 8</td><td rowspan="4">7</td><td>(1000)</td><td>1</td><td>[1, 2, 12, 64, 116, 312, 880, 800]</td></tr><tr><td>(1221)</td><td>2</td><td>[1, 0, 12, 40, 90, 240, 724, 1080]</td></tr><tr><td>(1010)</td><td>1</td><td>[1, 2, 6, 40, 56, 48, 256, 320]</td></tr><tr><td>(1100)</td><td>2</td><td>[1, 0, 2, 24, 38, 52, 236, 376]</td></tr><tr><td rowspan="4">5</td><td rowspan="4">$\begin{pmatrix} a & 0 & a & a \\ 0 & a & a & e \end{pmatrix}$</td><td rowspan="2">Theorem 5</td><td rowspan="2">7</td><td>(1100)</td><td>3</td><td>[1, 0, 0, 40, 48, 0, 256, 384]</td></tr><tr><td>(1212)</td><td>3</td><td>[1, 0, 0, 16, 24, 72, 280, 336]</td></tr><tr><td rowspan="2">Theorem 8</td><td rowspan="2">7</td><td>(0001)</td><td>1</td><td>[1, 6, 12, 40, 240, 672, 832, 384]</td></tr><tr><td>(1111)</td><td>2</td><td>[1, 0, 6, 52, 48, 192, 928, 960]</td></tr><tr><td></td><td>Theorem 6</td><td>8</td><td>(1100), (0011)</td><td>3</td><td>[1, 0, 0, 34, 96, 0, 1024, 3072, 2304]</td></tr><tr><td rowspan="4">5</td><td rowspan="4">$\begin{pmatrix} f & 0 & 0 & 0 & 0 \\ 0 & f & 0 & 0 & 0 \\ 0 & 0 & f & 0 & 0 \\ 0 & 0 & 0 & f & 0 \\ 0 & 0 & 0 & 0 & f \end{pmatrix}$</td><td rowspan="2">Theorem 5</td><td rowspan="2">8</td><td>(10000)</td><td>1</td><td>[1, 10, 40, 88, 160, 352, 640, 640, 256]</td></tr><tr><td>(11110)</td><td>1</td><td>[1, 4, 16, 64, 130, 160, 340, 784, 688]</td></tr><tr><td rowspan="2">Theorem 7</td><td rowspan="2">8</td><td>(00000)</td><td>1</td><td>[1, 16, 112, 448, 1120, 1792, 1792, 1024, 256]</td></tr><tr><td></td><td></td><td></td></tr><tr><td rowspan="4">5</td><td rowspan="4">$\begin{pmatrix} a & 0 & 0 & a & a \\ 0 & f & 0 & 0 & 0 \\ 0 & 0 & f & 0 & 0 \\ 0 & 0 & 0 & f & g \end{pmatrix}$</td><td rowspan="2">Theorem 5</td><td rowspan="2">8</td><td>(11110)</td><td>2</td><td>[1, 0, 6, 16, 60, 36, 388, 696, 984]</td></tr><tr><td>(10000)</td><td>1</td><td>[1, 4, 10, 52, 136, 160, 352, 832, 640]</td></tr><tr><td rowspan="2">Theorem 6</td><td rowspan="2">9</td><td>(22000)</td><td>1</td><td>[1, 2, 2, 28, 86, 128, 340, 848, 752]</td></tr><tr><td>(00011)</td><td>1</td><td>[1, 4, 10, 52, 136, 160, 352, 832, 640]</td></tr><tr><td rowspan="2"></td><td rowspan="2"></td><td rowspan="2">Theorem 6</td><td rowspan="2">9</td><td>(01100), (01200)</td><td>1</td><td>[1, 4, 10, 76, 280, 592, 1888, 5440, 7552, 3840]</td></tr><tr><td>(01100), (00011)</td><td>2</td><td>[1, 0, 18, 60, 108, 720, 1416, 2160, 7200, 8000]</td></tr></tbody></table>

Continued on next page
<table><thead><tr><th>n</th><th>Code</th><th>Construction</th><th>Length of constructed code</th><th>x</th><th>d(C)</th><th>Weight distribution</th></tr></thead><tbody><tr><td rowspan="4">5</td><td rowspan="4">$\begin{pmatrix} a & 0 & 0 & a & a \\ 0 & f & 0 & 0 & 0 \\ 0 & 0 & f & 0 & 0 \\ 0 & 0 & 0 & f & g \end{pmatrix}$</td><td>Theorem 6</td><td>9</td><td>(11112), (10001)</td><td>1</td><td>[1, 2, 2, 44, 158, 320, 1340, 4808, 8048, 4960]</td></tr><tr><td rowspan="5">Theorem 8</td><td rowspan="5">8</td><td>(11110)</td><td>2</td><td>[1, 0, 8, 64, 120, 176, 880, 2688, 2624]</td></tr><tr><td>(10000)</td><td>1</td><td>[1, 4, 16, 88, 244, 544, 1504, 2560, 1600]</td></tr><tr><td>(00011)</td><td>1</td><td>[1, 4, 10, 44, 116, 176, 396, 816, 624]</td></tr><tr><td>(11111)</td><td>2</td><td>[1, 0, 14, 40, 60, 320, 472, 480, 800]</td></tr><tr><td>(00021)</td><td>1</td><td>[1, 4, 6, 40, 148, 384, 544, 640, 384]</td></tr><tr><td rowspan="6">6</td><td rowspan="6">$\begin{pmatrix} f & 0 & 0 & 0 & 0 & 0 \\ 0 & f & 0 & 0 & 0 & 0 \\ 0 & 0 & f & 0 & 0 & 0 \\ 0 & 0 & 0 & f & 0 & 0 \\ 0 & 0 & 0 & 0 & f & 0 \\ 0 & 0 & 0 & 0 & 0 & f \end{pmatrix}$</td><td>Theorem 5</td><td>9</td><td>(100000)</td><td>1</td><td>[1, 12, 60, 168, 336, 672, 1344, 1920, 1536, 512]</td></tr><tr><td rowspan="3">Theorem 7</td><td rowspan="3">9</td><td>(111100)</td><td>1</td><td>[1, 6, 24, 96, 258, 420, 660, 1464, 2256, 1376]</td></tr><tr><td>(110000)</td><td>1</td><td>[1, 8, 32, 116, 380, 872, 1376, 1664, 1472, 640]</td></tr><tr><td>(000000)</td><td>1</td><td>[1, 18, 144, 672, 2016, 4032, 5376, 4608, 2304, 512]</td></tr><tr><td rowspan="5">$\begin{pmatrix} a & a & 0 & 0 & 0 & a \\ 0 & f & 0 & 0 & 0 & g \\ 0 & 0 & f & 0 & 0 & 0 \\ 0 & 0 & 0 & f & 0 & 0 \\ 0 & 0 & 0 & 0 & f & 0 \end{pmatrix}$</td><td>Theorem 5</td><td>9</td><td>(111100)</td><td>1</td><td>[1, 2, 6, 28, 92, 156, 460, 1472, 2376, 1968]</td></tr><tr><td rowspan="3">Theorem 7</td><td rowspan="3">9</td><td>(100000)</td><td>1</td><td>[1, 6, 14, 32, 120, 368, 908, 1800, 2192, 1120]</td></tr><tr><td>(001111)</td><td>2</td><td>[1, 0, 10, 30, 90, 136, 276, 1296, 1888, 2834]</td></tr><tr><td>(000022)</td><td>1</td><td>[1, 4, 6, 30, 136, 324, 654, 1462, 2352, 1592]</td></tr></tbody></table>

*Continued on next page*
<table><thead><tr><th>n</th><th>Code</th><th>Construction</th><th>Length of constructed code</th><th>x</th><th>d(C)</th><th>Weight distribution</th></tr></thead><tbody><tr><td rowspan="4">5</td><td rowspan="4">$\begin{pmatrix} a & 0 & 0 & a & a \\ 0 & f & 0 & 0 & 0 \\ 0 & 0 & f & 0 & 0 \\ 0 & 0 & 0 & f & g \end{pmatrix}$</td><td>Theorem 6</td><td>9</td><td>(11112), (10001)</td><td>1</td><td>[1, 2, 2, 44, 158, 320, 1340, 4808, 8048, 4960]</td></tr><tr><td rowspan="5">Theorem 8</td><td rowspan="5">8</td><td>(11110)</td><td>2</td><td>[1, 0, 8, 64, 120, 176, 880, 2688, 2624]</td></tr><tr><td>(10000)</td><td>1</td><td>[1, 4, 16, 88, 244, 544, 1504, 2560, 1600]</td></tr><tr><td>(00011)</td><td>1</td><td>[1, 4, 10, 44, 116, 176, 396, 816, 624]</td></tr><tr><td>(11111)</td><td>2</td><td>[1, 0, 14, 40, 60, 320, 472, 480, 800]</td></tr><tr><td>(00021)</td><td>1</td><td>[1, 4, 6, 40, 148, 384, 544, 640, 384]</td></tr><tr><td rowspan="6">6</td><td rowspan="6">$\begin{pmatrix} f & 0 & 0 & 0 & 0 & 0 \\ 0 & f & 0 & 0 & 0 & 0 \\ 0 & 0 & f & 0 & 0 & 0 \\ 0 & 0 & 0 & f & 0 & 0 \\ 0 & 0 & 0 & 0 & f & 0 \\ 0 & 0 & 0 & 0 & 0 & f \end{pmatrix}$</td><td>Theorem 5</td><td>9</td><td>(100000)</td><td>1</td><td>[1, 12, 60, 168, 336, 672, 1344, 1920, 1536, 512]</td></tr><tr><td rowspan="3">Theorem 7</td><td rowspan="3">9</td><td>(111100)</td><td>1</td><td>[1, 6, 24, 96, 258, 420, 660, 1464, 2256, 1376]</td></tr><tr><td>(110000)</td><td>1</td><td>[1, 8, 32, 116, 380, 872, 1376, 1664, 1472, 640]</td></tr><tr><td>(000000)</td><td>1</td><td>[1, 18, 144, 672, 2016, 4032, 5376, 4608, 2304, 512]</td></tr><tr><td rowspan="5">$\begin{pmatrix} a & a & 0 & 0 & 0 & a \\ 0 & f & 0 & 0 & 0 & g \\ 0 & 0 & f & 0 & 0 & 0 \\ 0 & 0 & 0 & f & 0 & 0 \\ 0 & 0 & 0 & 0 & f & 0 \end{pmatrix}$</td><td>Theorem 5</td><td>9</td><td>(111100)</td><td>1</td><td>[1, 2, 6, 28, 92, 156, 460, 1472, 2376, 1968]</td></tr><tr><td rowspan="3">Theorem 7</td><td rowspan="3">9</td><td>(100000)</td><td>1</td><td>[1, 6, 14, 32, 120, 368, 908, 1800, 2192, 1120]</td></tr><tr><td>(001111)</td><td>2</td><td>[1, 0, 10, 30, 90, 136, 276, 1296, 1888, 2834]</td></tr><tr><td>(000022)</td><td>1</td><td>[1, 4, 6, 30, 136, 324, 654, 1462, 2352, 1592]</td></tr></tbody></table>

*Continued on next page*
<table><thead><tr><th>n</th><th>Code</th><th>Construction</th><th>Length of constructed code</th><th>x</th><th>d(C)</th><th>Weight distribution</th></tr></thead><tbody><tr><td rowspan="10">6</td><td rowspan="10">$\begin{pmatrix} a & a & 0 & 0 & 0 & a \\ 0 & f & 0 & 0 & 0 & g \\ 0 & 0 & f & 0 & 0 & 0 \\ 0 & 0 & 0 & f & 0 & 0 \\ 0 & 0 & 0 & 0 & f & 0 \\ 0 & 0 & 0 & 0 & 0 & f \\ 0 & 0 & 0 & 0 & 0 & g \\ 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 \end{pmatrix}$</td><td>Theorem 5</td><td>9</td><td>(111011)</td><td>1</td><td>[1, 2, 14, 68, 140, 440, 1112, 1424, 1760, 1600]</td></tr><tr><td>Theorem 6</td><td>10</td><td>(110000)</td><td>1</td><td>[1, 6, 18, 72, 240, 432, 672, 1536, 2304, 1280]</td></tr><tr><td>Theorem 7</td><td>9</td><td>(110000), (120000)</td><td>1</td><td>[1, 6, 18, 96, 432, 1152, 3072, 9216, 18432, 18944, 7680]</td></tr><tr><td>Theorem 8</td><td>9</td><td>(110000), (001100)</td><td>1</td><td>[1, 2, 18, 96, 228, 936, 2856, 4992, 11520, 22400, 16000]</td></tr><tr><td>Theorem 5</td><td>9</td><td>(111110), (211110)</td><td>2</td><td>[1, 0, 12, 36, 138, 516, 1464, 4584, 10650, 20936, 20712]</td></tr><tr><td>Theorem 5</td><td>9</td><td>(110000), (211110)</td><td>2</td><td>[1, 0, 18, 60, 162, 720, 2064, 4320, 9144, 20960, 21600]</td></tr><tr><td>Theorem 5</td><td>9</td><td>(000000)</td><td>1</td><td>[1, 12, 66, 252, 840, 2352, 4704, 5952, 4224, 1280]</td></tr><tr><td>Theorem 5</td><td>9</td><td>(111100)</td><td>1</td><td>[1, 2, 8, 80, 248, 416, 1232, 4448, 8000, 5248]</td></tr><tr><td>Theorem 5</td><td>9</td><td>(100000)</td><td>1</td><td>[1, 6, 20, 88, 336, 992, 2752, 5760, 6656, 3072]</td></tr><tr><td>Theorem 5</td><td>9</td><td>(111011)</td><td>1</td><td>[1, 2, 14, 68, 140, 440, 1112, 1424, 1760, 1600]</td></tr><tr><td>Theorem 5</td><td>9</td><td>(110000)</td><td>1</td><td>[1, 6, 18, 72, 240, 432, 672, 1536, 2304, 1280]</td></tr><tr><td>Theorem 5</td><td>9</td><td>(111101)</td><td>1</td><td>[1, 2, 12, 70, 134, 402, 1192, 1484, 1584, 1680]</td></tr><tr><td>$\begin{pmatrix} a & a & a & a & a & a \\ 0 & f & 0 & 0 & 0 & g \\ 0 & 0 & f & 0 & 0 & g \\ 0 & 0 & 0 & f & 0 & g \\ 0 & 0 & 0 & 0 & f & g \end{pmatrix}$</td><td>Theorem 5</td><td>9</td><td>(001212)</td><td>1</td><td>[1, 2, 6, 28, 92, 156, 460, 1472, 2376, 1968]</td></tr></tbody></table>

Continued on next page
<table><thead><tr><th>n</th><th>Code</th><th>Construction</th><th>Length of constructed code</th><th>x</th><th>d(C)</th><th>Weight distribution</th></tr></thead><tbody><tr><td rowspan="10">6</td><td rowspan="10">(a a 0 0 0 a)<br>0 f 0 0 0 g<br>0 0 f 0 0 0<br>0 0 0 f 0 0<br>0 0 0 0 f 0</td><td rowspan="5">Theorem 5</td><td rowspan="5">9</td><td>(111011)</td><td>1</td><td>[1, 2, 14, 68, 140, 440, 1112, 1424, 1760, 1600]</td></tr><tr><td>(110000)</td><td>1</td><td>[1, 6, 18, 72, 240, 432, 672, 1536, 2304, 1280]</td></tr><tr><td>(110000), (120000)</td><td>1</td><td>[1, 6, 18, 96, 432, 1152, 3072, 9216, 18432, 18944, 7680]</td></tr><tr><td>(110000), (001100)</td><td>1</td><td>[1, 2, 18, 96, 228, 936, 2856, 4992, 11520, 22400, 16000]</td></tr><tr><td>(111110), (211110)</td><td>2</td><td>[1, 0, 12, 36, 138, 516, 1464, 4584, 10650, 20936, 20712]</td></tr><tr><td rowspan="5">Theorem 6</td><td rowspan="5">10</td><td>(110000), (211110)</td><td>2</td><td>[1, 0, 18, 60, 162, 720, 2064, 4320, 9144, 20960, 21600]</td></tr><tr><td>(110000), (211110)</td><td>2</td><td>[1, 12, 66, 252, 840, 2352, 4704, 5952, 4224, 1280]</td></tr><tr><td>(000000)</td><td>1</td><td>[1, 2, 8, 80, 248, 416, 1232, 4448, 8000, 5248]</td></tr><tr><td>(111100)</td><td>1</td><td>[1, 6, 20, 88, 336, 992, 2752, 5760, 6656, 3072]</td></tr><tr><td>(100000)</td><td>1</td><td>[1, 2, 14, 68, 140, 440, 1112, 1424, 1760, 1600]</td></tr><tr><td rowspan="4">Theorem 7</td><td rowspan="4">9</td><td>(111011)</td><td>1</td><td>[1, 6, 18, 72, 240, 432, 672, 1536, 2304, 1280]</td></tr><tr><td>(110000)</td><td>1</td><td>[1, 2, 12, 70, 134, 402, 1192, 1484, 1584, 1680]</td></tr><tr><td>(111101)</td><td>1</td><td>[1, 2, 6, 28, 92, 156, 460, 1472, 2376, 1968]</td></tr><tr><td>(a a a a a a)<br>0 f 0 0 0 g<br>0 0 f 0 0 g<br>0 0 0 f 0 g<br>0 0 0 0 f g</td><td>Theorem 5</td><td>9</td><td>(001212)</td><td>1</td><td>[1, 2, 6, 28, 92, 156, 460, 1472, 2376, 1968]</td></tr></tbody></table>

*Continued on next page*
<table><thead><tr><th>n</th><th>Code</th><th>Construction</th><th>Length of constructed code</th><th>x</th><th>d(C)</th><th>Weight distribution</th></tr></thead><tbody><tr><td rowspan="4">6</td><td rowspan="4">$\begin{pmatrix} a & a & a & a & a & a \\ 0 & f & 0 & 0 & 0 & g \\ 0 & 0 & f & 0 & 0 & g \\ 0 & 0 & 0 & f & 0 & g \\ 0 & 0 & 0 & 0 & f & g \end{pmatrix}$</td><td>Theorem 5</td><td>9</td><td>(100000)</td><td>2</td><td>[1, 0, 20, 38, 60, 320, 410, 1218, 938, 3556]</td></tr><tr><td rowspan="4">Theorem 6</td><td rowspan="4">10</td><td>(111100)</td><td>2</td><td>[1, 0, 18, 36, 90, 360, 600, 504, 1512, 3440]</td></tr><tr><td>(210000)</td><td>2</td><td>[1, 0, 14, 40, 114, 320, 904, 1560, 1448, 2160]</td></tr><tr><td>(111110), (121110)</td><td>2</td><td>[1, 0, 18, 60, 162, 720, 2064, 4320, 9144, 20960, 21600]</td></tr><tr><td>(110000), (001100)</td><td>1</td><td>[1, 2, 18, 96, 228, 936, 2856, 4992, 11520, 22400, 16000]</td></tr><tr><td rowspan="4">Theorem 7</td><td rowspan="4">9</td><td>(210111), (000021)</td><td>1</td><td>[1, 4, 6, 48, 246, 636, 1980, 7488, 17664, 21056, 9920]</td></tr><tr><td>(110000), (120000)</td><td>2</td><td>[1, 0, 30, 72, 138, 1020, 3228, 4800, 6240, 19136, 24384]</td></tr><tr><td>(110000), (000011)</td><td>2</td><td>[1, 0, 12, 54, 156, 678, 2184, 4440, 8868, 21008, 21648]</td></tr><tr><td>(000000)</td><td>1</td><td>[1, 6, 42, 228, 690, 1320, 2268, 4488, 6576, 4064]</td></tr><tr><td rowspan="3">Theorem 8</td><td rowspan="3">9</td><td>(100000)</td><td>2</td><td>[1, 0, 26, 70, 240, 980, 1330, 2622, 4718, 9696]</td></tr><tr><td>(111100)</td><td>2</td><td>[1, 0, 36, 60, 270, 900, 1848, 2160, 4248, 10160]</td></tr><tr><td>(002121)</td><td>1</td><td>[1, 2, 8, 80, 248, 416, 1232, 4448, 8000, 5248]</td></tr><tr><td></td><td></td><td>(002121)</td><td>2</td><td>[1, 0, 14, 40, 114, 320, 904, 1560, 1448, 2160]</td></tr></tbody></table>
<table><thead><tr><th>n</th><th>Code</th><th>Construction</th><th>Length of constructed code</th><th>x</th><th>d(C)</th><th>Weight distribution</th></tr></thead><tbody><tr><td rowspan="4">6</td><td rowspan="4">$\begin{pmatrix} a & a & a & a & a & a \\ 0 & f & 0 & 0 & 0 & g \\ 0 & 0 & f & 0 & 0 & g \\ 0 & 0 & 0 & f & 0 & g \\ 0 & 0 & 0 & 0 & f & g \end{pmatrix}$</td><td rowspan="4">Theorem 5</td><td rowspan="4">9</td><td>(100000)</td><td>2</td><td>[1, 0, 20, 38, 60, 320, 410, 1218, 938, 3556]</td></tr><tr><td>(111100)</td><td>2</td><td>[1, 0, 18, 36, 90, 360, 600, 504, 1512, 3440]</td></tr><tr><td>(210000)</td><td>2</td><td>[1, 0, 14, 40, 114, 320, 904, 1560, 1448, 2160]</td></tr><tr><td>(111110), (121110)</td><td>2</td><td>[1, 0, 18, 60, 162, 720, 2064, 4320, 9144, 20960, 21600]</td></tr><tr><td rowspan="4">Theorem 6</td><td rowspan="4">10</td><td>(110000), (001100)</td><td>1</td><td>[1, 2, 18, 96, 228, 936, 2856, 4992, 11520, 22400, 16000]</td></tr><tr><td>(210111), (000021)</td><td>1</td><td>[1, 4, 6, 48, 246, 636, 1980, 7488, 17664, 21056, 9920]</td></tr><tr><td>(110000), (120000)</td><td>2</td><td>[1, 0, 30, 72, 138, 1020, 3228, 4800, 6240, 19136, 24384]</td></tr><tr><td>(110000), (000011)</td><td>2</td><td>[1, 0, 12, 54, 156, 678, 2184, 4440, 8868, 21008, 21648]</td></tr><tr><td>Theorem 7</td><td>9</td><td>(000000)</td><td>1</td><td>[1, 6, 42, 228, 690, 1320, 2268, 4488, 6576, 4064]</td></tr><tr><td rowspan="2">Theorem 8</td><td rowspan="2">9</td><td>(100000)</td><td>2</td><td>[1, 0, 26, 70, 240, 980, 1330, 2622, 4718, 9696]</td></tr><tr><td>(111100)</td><td>2</td><td>[1, 0, 36, 60, 270, 900, 1848, 2160, 4248, 10160]</td></tr><tr><td></td><td></td><td>(002121)</td><td>1</td><td>[1, 2, 8, 80, 248, 416, 1232, 4448, 8000, 5248]</td></tr><tr><td></td><td></td><td>(002121)</td><td>2</td><td>[1, 0, 14, 40, 114, 320, 904, 1560, 1448, 2160]</td></tr></tbody></table>
# 5. Conclusions

In this study, we have derived and used propagation rules over a certain non-unital ring of order 9 to generate self-orthogonal, one-sided self-dual and self-dual codes. Combining this generating technique with mass formulas we have classified these three classes of codes in length at most 7 up to monomial equivalence. It is an open problem to know if, alike what happens in [4], all codes in the three families can be generated by this technique up to some mild type condition.

In order to expand the classification results to longer lengths, more processing power or more efficient automorphism algorithms may be required due to the combinatorial explosion of codes in the three families.

# Use of AI tools declaration

The authors declare they have not used Artificial Intelligence (AI) tools in the creation of this article.

# Acknowledgments

This research work was funded by Institutional Fund Projects under grant No. (IFPRC-105-130-2020). Therefore, authors gratefully acknowledge technical and financial support from the Ministry of Education and King Abdulaziz University, Jeddah, Saudi Arabia.

# Conflict of interest

All authors declare no conflicts of interest in this paper.

# References

1. A. Alahmadi, A. Altassan, H. Shoaib, A. Alkathiry, A. Bonnecaze, P. Solé, The build-up construction of quasi self-dual codes over a non-unital ring, *J. Algebra Appl.*, **21** (2022), 2250143. https://doi.org/10.1142/S0219498822501432

2. A. Alahmadi, A. Melaibari, P. Solé, Duality of codes over non-unital rings of order four, *IEEE Access*, **11** (2023), 53120–53133. https://doi.org/10.1109/ACCESS.2023.3261131

3. A. Alahmadi, A. Altassan, W. Basaffar, H. Shoaib, A. Bonnecaze P. Solé, Type IV codes over a non-unital ring, *J. Algebra Appl.*, **21** (2022), 2250142. https://doi.org/10.1142/S0219498822501420

4. A. Alahmadi, A. Alshuhail, R. A. Betty, L. Galvez, P. Solé, Mass formula for self-orthogonal and self-dual codes over non-unital rings of order four, *Mathematics*, **11** (2023), 4736. https://doi.org/10.3390/math11234736

5. A. Alahmadi, T. Alihia, R. A. Betty, L. Galvez, P. Solé, The build-up construction for codes over a commutative non-unitary ring of order 9, *Mathematics*, **12** (2024), 860. https://doi.org/10.3390/math12060860

6. C. Aguilar-Melchor, P. Gaborit, J. Kim, L. Sok, P. Solé, Classification of extremal and s-extremal binary self-dual codes of length 38, *IEEE Trans. Inform. Theory*, **58** (2012), 2253–2262. https://doi.org/10.1109/TIT.2011.2177809
# 5. Conclusions

In this study, we have derived and used propagation rules over a certain non-unital ring of order 9 to generate self-orthogonal, one-sided self-dual and self-dual codes. Combining this generating technique with mass formulas we have classified these three classes of codes in length at most 7 up to monomial equivalence. It is an open problem to know if, alike what happens in [4], all codes in the three families can be generated by this technique up to some mild type condition.

In order to expand the classification results to longer lengths, more processing power or more efficient automorphism algorithms may be required due to the combinatorial explosion of codes in the three families.

## Use of AI tools declaration

The authors declare they have not used Artificial Intelligence (AI) tools in the creation of this article.

## Acknowledgments

This research work was funded by Institutional Fund Projects under grant No. (IFPRC-105-130-2020). Therefore, authors gratefully acknowledge technical and financial support from the Ministry of Education and King Abdulaziz University, Jeddah, Saudi Arabia.

## Conflict of interest

All authors declare no conflicts of interest in this paper.

## References

1. A. Alahmadi, A. Altassan, H. Shoaib, A. Alkathiry, A. Bonnecaze, P. Solé, The build-up construction of quasi self-dual codes over a non-unital ring, *J. Algebra Appl.*, **21** (2022), 2250143. https://doi.org/10.1142/S0219498822501432

2. A. Alahmadi, A. Melaibari, P. Solé, Duality of codes over non-unital rings of order four, *IEEE Access*, **11** (2023), 53120–53133. https://doi.org/10.1109/ACCESS.2023.3261131

3. A. Alahmadi, A. Altassan, W. Basaffar, H. Shoaib, A. Bonnecaze P. Solé, Type IV codes over a non-unital ring, *J. Algebra Appl.*, **21** (2022), 2250142. https://doi.org/10.1142/S0219498822501420

4. A. Alahmadi, A. Alshuhail, R. A. Betty, L. Galvez, P. Solé, Mass formula for self-orthogonal and self-dual codes over non-unital rings of order four, *Mathematics*, **11** (2023), 4736. https://doi.org/10.3390/math11234736

5. A. Alahmadi, T. Alihia, R. A. Betty, L. Galvez, P. Solé, The build-up construction for codes over a commutative non-unitary ring of order 9, *Mathematics*, **12** (2024), 860. https://doi.org/10.3390/math12060860

6. C. Aguilar-Melchor, P. Gaborit, J. Kim, L. Sok, P. Solé, Classification of extremal and s-extremal binary self-dual codes of length 38, *IEEE Trans. Inform. Theory*, **58** (2012), 2253–2262. https://doi.org/10.1109/TIT.2011.2177809
7. J. M. P. Balmaceda, R. A. L. Betty, F. R. Nemenzo, Mass formula for self-dual codes over $Z_{p^2}$, *Discrete Math.*, **308** (2008), 2984–3002. https://doi.org/10.1016/j.disc.2007.08.024

8. W. Bosma, J. Cannon, C. Playoust, The Magma algebra system. I. The user language, *J. Symb. Comput.*, **24** (1997), 235–265. https://doi.org/10.1006/jsco.1996.0125

9. B. Fine, Classification of finite rings of order $p^2$, *Math. Magazine*, **66** (1993), 248–252. https://doi.org/10.1080/0025570X.1993.11996133

10. S. Han, H. Lee, Y. Lee, Construction of self-dual codes over $F_2 + uF_2$, *Bull. Korean Math. Soc.*, **49** (2012), 135–143.

11. M. Harada, M. Kitazume, M. Ozeki, Ternary code construction of unimodular lattices and self-dual codes over $\mathbb{Z}_6$, *J. Algebraic Comb.*, **16** (2002), 209–223. https://doi.org/10.1023/A:1021185314365

12. W. C. Hufman, V. Pless, *Fundamentals of error-correcting codes*, Cambridge: Cambridge University Press, 2003. https://doi.org/10.1017/CBO9780511807077

13. J. L. Kim, Y. Lee, Euclidean and Hermitian self-dual MDS codes over large finite fields, *J. Comb. Theory, Ser. A*, **105** (2004), 79–95. https://doi.org/10.1016/j.jcta.2003.10.003

14. J. L. Kim, Y. Lee, An efficient construction of self-dual codes, *Bull. Korean Math Soc.*, **52** (2015), 915–923.

15. K. H. Kim, Y. H. Park, The mass formula of self-orthogonal codes over $GF(q)$, *Korean J. Math.*, **25** (2017), 201–209. https://doi.org/10.11568/kjm.2017.25.2.201

16. C. Mallows, V. Pless, N. J. Sloane, Self-dual codes over $GF(3)$, *SIAM J. Appl. Math.*, **31** (1976), 649–666.

17. F. J. MacWilliams, N. J. A. Sloane, *The theory of error-correcting codes*, North-Holland Mathematical Library, Elsevier, 1977.

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

AIMS Press

©2024 the Author(s), licensee AIMS Press. This
is an open access article distributed under the
terms of the Creative Commons Attribution License
(http://creativecommons.org/licenses/by/4.0)
7. J. M. P. Balmaceda, R. A. L. Betty, F. R. Nemenzo, Mass formula for self-dual codes over $\mathbb{Z}_{p^2}$, *Discrete Math.*, **308** (2008), 2984–3002. https://doi.org/10.1016/j.disc.2007.08.024

8. W. Bosma, J. Cannon, C. Playoust, The Magma algebra system. I. The user language, *J. Symb. Comput.*, **24** (1997), 235–265. https://doi.org/10.1006/jsco.1996.0125

9. B. Fine, Classification of finite rings of order $p^2$, *Math. Magazine*, **66** (1993), 248–252. https://doi.org/10.1080/0025570X.1993.11996133

10. S. Han, H. Lee, Y. Lee, Construction of self-dual codes over $F_2 + uF_2$, *Bull. Korean Math. Soc.*, **49** (2012), 135–143.

11. M. Harada, M. Kitazume, M. Ozeki, Ternary code construction of unimodular lattices and self-dual codes over $\mathbb{Z}_6$, *J. Algebraic Comb.*, **16** (2002), 209–223. https://doi.org/10.1023/A:1021185314365

12. W. C. Hufman, V. Pless, *Fundamentals of error-correcting codes*, Cambridge: Cambridge University Press, 2003. https://doi.org/10.1017/CBO9780511807077

13. J. L. Kim, Y. Lee, Euclidean and Hermitian self-dual MDS codes over large finite fields, *J. Comb. Theory, Ser. A*, **105** (2004), 79–95. https://doi.org/10.1016/j.jcta.2003.10.003

14. J. L. Kim, Y. Lee, An efficient construction of self-dual codes, *Bull. Korean Math Soc.*, **52** (2015), 915–923.

15. K. H. Kim, Y. H. Park, The mass formula of self-orthogonal codes over $GF(q)$, *Korean J. Math.*, **25** (2017), 201–209. https://doi.org/10.11568/kjm.2017.25.2.201

16. C. Mallows, V. Pless, N. J. Sloane, Self-dual codes over $GF(3)$, *SIAM J. Appl. Math.*, **31** (1976), 649–666.

17. F. J. MacWilliams, N. J. A. Sloane, *The theory of error-correcting codes*, North-Holland Mathematical Library, Elsevier, 1977.

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

AIMS Press

©2024 the Author(s), licensee AIMS Press. This
is an open access article distributed under the
terms of the Creative Commons Attribution License
(http://creativecommons.org/licenses/by/4.0)