# The Build-Up Construction for Codes over a Commutative Non-Unitary Ring of Order 9

Adel Alahmadi, Tamador Alihia, Rowena Alma Betty, Lucky Galvez, Patrick Solé

► To cite this version:

Adel Alahmadi, Tamador Alihia, Rowena Alma Betty, Lucky Galvez, Patrick Solé. The Build-Up Construction for Codes over a Commutative Non-Unitary Ring of Order 9. Mathematics, 2024, 10.3390/math12060860. [hal-04505915](https://hal.science/hal-04505915v1)

HAL Id: hal-04505915

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

Submitted on 15 Mar 2024

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

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

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

Distributed under a Creative Commons Attribution 4.0 International License
Article

# The Build-Up Construction for Codes over a Commutative Non-Unitary Ring of Order 9

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

**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 4, to generate quasi self-dual codes. In the present paper, we introduce three such propagation rules to generate self-orthogonal, self-dual and quasi self-dual codes over a special non-unitary ring of order 9. As an application, we classify the three categories of codes completely in length at most 3, and partially in lengths 4 and 5, up to monomial equivalence.

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

**MSC:** 94B05; 16D10

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

### check for updates

**Citation:** Alahmadi, A.; Alihia, T.; Alma Betty, R.; Galvez, L.; Solé, P. The Build-Up Construction for Codes over a Commutative Non-Unitary Ring of Order 9. Mathematics **2024**, *12*, 860.
https://doi.org/10.3390/math12060860

Academic Editor: Abdelmejid Bayad

Received: 11 December 2023

Revised: 9 January 2024

Accepted: 22 January 2024

Published: 15 March 2024

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

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

## 1. Introduction

A potent way for creating self-dual codes over finite fields and unitary rings is the build-up method [1–3]. 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, *h* = 2 for binary codes [4] and codes over a certain ring of order 4 [1], and *h* = 4 for ternary codes [2].

Recently, this technique was extended to certain non-unitary rings of order 4 [5,6], with self-dual codes replaced by self-orthogonal codes of length *n* and of order 2ⁿ, the so-called quasi self-dual (QSD) codes defined in [7].

In the present work, we modify this technique to produce self-orthogonal and self-dual codes, as well as QSD codes over the ring $I_3$, a non-unital, commutative ring of order 9. This notation is consistent with the classification in [8] of rings of order $p^2$, for a prime *p*. Following [7], QSD codes are defined over the ring $I_3$ as self-orthogonal codes of length *n* and size 3ⁿ. We derive propagation rules of order 3 for self-orthogonal codes (Theorem 4) and of order 4 for self-dual and quasi self-dual codes (Theorems 7 and 9). As an upshot of these rules, we classify completely self-orthogonal, QSD and self-dual codes up to length 3, and partially up to length 5. The classification is made under monomial action. The mass formulas for the three types of codes considered are used as a stopping criteria for code generation.

The rest of the paper is set up as follows. The next section contains the preliminary notions and notations needed in the latter sections. The three propagation rules are derived in Section 3. Section 4 contains some classification results. Section 5 concludes the article and points out directions for further research.

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

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

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

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

<footnote>* Correspondence: analahmadi@kau.edu.sa</footnote>
## 2. Preliminaries

Let $\mathbb{F}_3$ denote the finite field of order 3, and let $\mathbb{F}_3^n$ be the vector space of $n$-tuples over $\mathbb{F}_3$. A ternary linear code $\mathcal{C}$ of length $n$ and dimension $k$, denoted simply as an $[n, k]_3$ code, is a $k$-dimensional subspace of $\mathbb{F}_3^n$. The **dual** of a ternary linear code is denoted by $\mathcal{C}^{\perp}$ and is defined as

$$ \mathcal{C}^{\perp} = \{ \mathbf{y} \in \mathbb{F}_3^n \mid \forall \mathbf{x} \in \mathcal{C}, (\mathbf{x}, \mathbf{y}) = 0 \}, $$

where $(\mathbf{x}, \mathbf{y}) = \sum_{i=1}^{n} x_i y_i$ denotes the standard inner product. A code $\mathcal{C}$ is **self-orthogonal** if it is included in its dual, that is, $\mathcal{C} \subseteq \mathcal{C}^{\perp}$.

The number of nonzero coordinates of a vector $\mathbf{x} \in \mathbb{F}_3^n$ is called its **(Hamming) weight**, denoted by $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 $\mathcal{C}$ is

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

A ternary linear code of length $n$, dimension $k$ and minimum distance $d$ is said to be an $[n, k, d]_3$ code. The weight distribution of a code $\mathcal{C}$ is a sequence $[A_0, A_1, \dots, A_n]$ where $A_i$ denotes the number of codewords of weight $i$.

### 2.1. The Ring $I_3$

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

$$ I_3 = \langle a, b \mid 3a = 3b = 0, a^2 = b, ab = 0 \rangle. $$

Thus, the ring $I_3$ has the characteristic 3, and consists of nine elements:

$$ \begin{gathered} I_3 = \{0, a, b, c, d, e, f, g, h\}, \\ \text{where } c = a + b, \ d = 2b, \ e = 2a \\ f = e + b, \ g = a + d, \ \text{and } h = d + e. \end{gathered} $$

These definitions immediately lead to the addition and the multiplication tables given as follow (Tables 1 and 2).

<table><caption>**Table 1.** Addition table for the ring $I_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><caption>**Table 2.** Multiplication table for the ring $I_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>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>b</td><td>0</td><td>b</td><td>0</td><td>d</td><td>d</td><td>b</td><td>d</td></tr><tr><th>b</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>c</th><td>0</td><td>b</td><td>0</td><td>b</td><td>0</td><td>d</td><td>d</td><td>b</td><td>d</td></tr><tr><th>d</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>e</th><td>0</td><td>d</td><td>0</td><td>d</td><td>0</td><td>b</td><td>b</td><td>d</td><td>b</td></tr><tr><th>f</th><td>0</td><td>d</td><td>0</td><td>d</td><td>0</td><td>b</td><td>b</td><td>d</td><td>b</td></tr><tr><th>g</th><td>0</td><td>b</td><td>0</td><td>b</td><td>0</td><td>d</td><td>d</td><td>b</td><td>d</td></tr><tr><th>h</th><td>0</td><td>d</td><td>0</td><td>d</td><td>0</td><td>b</td><td>b</td><td>d</td><td>b</td></tr></tbody></table>

We can deduce from this table that this ring is commutative without unity and has a unique maximal ideal $S = \{0, b, d\}$, with a residue field $I_3/S \simeq \mathbb{F}_3$. As a result, we have the following b-adic decomposition. It can be checked by inspection that any element $i \in I_3$ can be expressed as

$$i = ax + by$$

for unique scalars $x, y \in \mathbb{F}_3$.

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

$$r0 = 0r = 0, r1 = 1r = r, \text{ and } r2 = r + r = r \text{ for all } r \in I_3.$$

Note that for all $r \in I_3$, $x, y \in \mathbb{F}_3$, this action is "distributive" in the sense that $r(x \oplus y) = rx + ry$, where $\oplus$ denotes the addition in $\mathbb{F}_3$. When $x = (x_1, \dots, x_n) \in \mathbb{F}_3^n$ and $r = (r_1, \dots, r_n) \in I_3^n$, we will occasionally use the inner product notation $(\mathbf{x}, \mathbf{r})$ to indicate

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

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

$$\pi(0) = \pi(b) = \pi(d) = 0,$$

$$\pi(a) = \pi(c) = \pi(g) = 1,$$

$$\pi(e) = \pi(f) = \pi(h) = 2.$$

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

## 2.2. Codes over $I_3$

A linear $I_3$ code $C$ of length $n$ is defined as an $I_3$ submodule of $I_3^n$. It may be thought of as the $I_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** $res(C)$ is just $\pi(C)$, and the **torsion code** $tor(C)$ is $\{\mathbf{x} \in \mathbb{F}_3^n | b\mathbf{x} \in C\}$.

It is easy to verify that $res(C) \subseteq tor(C)$ [7]. 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 said to be of **type** $\{k_1, k_2\}$. A straightforward application of the first isomorphism theorem [7] shows that

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

Define the **inner product** of $\mathbf{x} = (x_1, \dots, x_n)$, $\mathbf{y} = (y_1, \dots, y_n) \in I_3^n$ as $(\mathbf{x}, \mathbf{y}) = x_1 y_1 + \dots + x_n y_n$. The dual code $C^\perp$ of the code $C$ is the module defined as

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

An $I_3$ code $C$ is **self-dual** (SD) if $C = C^\perp$. If for all $\mathbf{x}, \mathbf{y} \in C$, $(\mathbf{x}, \mathbf{y}) = 0$, then $C$ is **self-orthogonal** (SO). Following the terminology introduced in [6], upon passing from charac-
teristic 2 to 3, an $I_3$ code of length $n$ that is self-orthogonal and of size $3^n$ is called a **quasi self-dual** (QSD) code.

Two $I_3$ codes are **monomially equivalent** if there is a monomial permutation that maps one to the other.

In the following, we give an example of a quasi self-dual (QSD) code.

**Example 1.** The $I_3$ code with generator matrix $$ \begin{pmatrix} c & c & d & a \\ b & 0 & b & b \\ 0 & b & b & d \end{pmatrix} $$ is quasi self-dual, with residue code generated by $(1 \ 1 \ 0 \ 1)$ and torsion code generated by $$ \begin{pmatrix} 1 & 1 & 0 & 1 \\ 1 & 0 & 1 & 1 \\ 0 & 1 & 1 & 2 \end{pmatrix} $$. The residue code is self-orthogonal.

**Example 2.** Let $R_3 = \{000, aaa, bbb, ccc, ddd, eee, fff, ggg, hhh\}$, the repetition code of length 3, with weight distribution $[1, 0, 0, 8]$. Clearly, it is self-orthogonal but not quasi self-dual, as its size is $9 < 3^n = 27$.

However, as an $I_3$ code of length 1, $S = \{0, b, d\}$ is of size $3 = 3^1$ and is, thus, quasi self-dual.

## 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 a 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$. The trace map, $\mathrm{Tr}: \mathbb{F}_9 \to \mathbb{F}_3$, is defined as $\mathrm{Tr}(x) = x + x^3$.

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

$$ \begin{align*} 0 &\mapsto 0, \quad a \mapsto 2, \quad b \mapsto \omega^2 \\ c &\mapsto \omega, \quad d \mapsto 2\omega^2, \quad e \mapsto 1 \\ f &\mapsto 2+\omega, \quad g \mapsto 1+2\omega, \quad h \mapsto 2\omega, \end{align*} $$

where $\mathbb{F}_9 = \mathbb{F}_3[\omega]$, extended naturally to $\mathbb{F}_9^n$. The **parameters** $(n, 3^k, d)$ of an $I_3$ code are identified with that of its image under $\phi$. It can be checked that for all $\mathbf{x} \in I_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. Mass Formulas

We recall the mass formulas for ternary codes [9–11].

**Theorem 1.** Let $\varphi_{n,k}$ be the number of self-orthogonal ternary codes having parameters $[n,k]$. Then:

(i) If $n \ge 3$ is odd, then

$$ \varphi_{n,k} = \frac{\prod_{i=0}^{k-1} 3^{n-1-2i} - 1}{\prod_{i=1}^{k} 3^i - 1}; $$

(ii) If $n \ge 2$ is even, then

$$ \varphi_{n,k} = \begin{cases} \frac{(3^{n-k}-3^{n/2-k}+3^{n/2}-1) \prod_{i=1}^{k-1} 3^{n-2i}-1}{\prod_{i=1}^{k} 3^{i-1}} & : \text{ if } (-1)^{\frac{n}{2}} \text{ is square} \\ \frac{(3^{n-k}+3^{n/2-k}-3^{n/2}-1) \prod_{i=1}^{k-1} 3^{n-2i}-1}{\prod_{i=1}^{k} 3^{i-1}} & : \text{ if } (-1)^{\frac{n}{2}} \text{ is not square.} \end{cases} $$
These formulas are valid for $k \ge 1$.

We define the Gaussian coefficient $\begin{bmatrix} n \\ k \end{bmatrix}_q$ for $k \le n$ as

$$ \begin{bmatrix} n \\ k \end{bmatrix}_q = \frac{(q^n - 1)(q^n - q) \cdots (q^n - q^{k-1})}{(q^k - 1)(q^k - q) \cdots (q^k - q^{k-1})}, $$

which gives the number of subspaces of dimension $k$ contained in an $n$-dimensional vector space over $\mathbb{F}_q$.

In what follows, we present a mass formula for SO codes, which is a characteristic 3-version of Theorem 7 in [12].

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

$$ \mathcal{N}_{\text{SO}}(n, k_1, k_2) = \varphi_{n, k_1} \begin{bmatrix} n - k_1 \\ k_2 \end{bmatrix}_3 3^{k_1(n - k_1 - k_2)}. $$

The following follows from the usual counting technique under the group action.

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

$$ \sum_C \frac{1}{|\text{Aut}(C)|} = \frac{\mathcal{N}_{\text{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 a given length $n$ and type $\{k_1, k_2\}$, with $0 \le k_1, k_2 \le n$, we have

$$ \sum_C \frac{1}{|\text{Aut}(C)|} = \frac{\mathcal{N}_{\text{QSD}}(n, k_1, k_2)}{2^n n!} = \frac{\varphi_{n, k_1} \begin{bmatrix} k_1 + k_2 \\ k_2 \end{bmatrix}_3 3^{k_1^2}}{2^n n!}, $$

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

**Corollary 3.** For a given length $n$ and type $\{\frac{n}{2}, \frac{n}{2}\}$, with $0 \le \frac{n}{2}$, we have

$$ \sum_C \frac{1}{|\text{Aut}(C)|} = \frac{\mathcal{N}_{\text{SD}}(n, \frac{n}{2}, \frac{n}{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 SD codes of length $n$ and type $\{\frac{n}{2}, \frac{n}{2}\}$.

### 3. Constructions

#### 3.1. Construction of Self-Orthogonal Codes

In this section, we present the build-up construction method for self-orthogonal codes over $I_3$. We begin by a result similar to Theorem 1 in [7]. The proof is omitted here.

**Lemma 1.** Let $C$ be an $I_3$ linear code of type $\{k_1, k_2\}$ and length $n$. Then, a generator matrix $\mathcal{G}$ of the code is of the form

$$ \begin{bmatrix} aI_{k_1} & aX & Y \\ 0 & bI_{k_2} & bZ \end{bmatrix}, $$
where $Y$ is a matrix with entries in $I_3$, $X$ and $Z$ are matrices with entries in $\mathbb{F}_3$ and $I_{k_1}, I_{k_2}$ are identity matrices.

Before presenting the construction methods, we look first at a characterization of self-orthogonal codes over $I_3$.

**Theorem 3.** A linear code $C$ of length $n$ over $I_3$ is self-orthogonal if and only if $\mathrm{res}(C)$ is a ternary self-orthogonal code.

**Proof.** Using similar proof to Theorem 1 in [13], it can be shown that every codeword $\mathbf{i} \in C$ can be written as $\mathbf{i} = au + bv$ for some $\mathbf{u} \in \mathrm{res}(C)$ and $\mathbf{v} \in \mathbb{F}_3^n$, and if $\mathbf{u} \in \mathrm{res}(C)$, then $au + bv \in C$ for some $\mathbf{v} \in \mathbb{F}_3^n$. If $\mathbf{i}_1, \mathbf{i}_2 \in C$, then we can write $\mathbf{i}_1$ and $\mathbf{i}_2$ in b-adic decomposition form as $\mathbf{i}_1 = a\mathbf{x}_1 + b\mathbf{y}_1$ and $\mathbf{i}_2 = a\mathbf{x}_2 + b\mathbf{y}_2$ where $\mathbf{x}_1, \mathbf{x}_2 \in \mathrm{res}(C)$ and $\mathbf{y}_1, \mathbf{y}_2 \in \mathbb{F}_3^n$. We compute $(\mathbf{i}_1, \mathbf{i}_2)$ as

$$ (a\mathbf{x}_1 + b\mathbf{y}_1, a\mathbf{x}_2 + b\mathbf{y}_2) = a^2(\mathbf{x}_1, \mathbf{x}_2) + ab(\mathbf{x}_1, \mathbf{y}_2) + ab(\mathbf{x}_2, \mathbf{y}_1) + b^2(\mathbf{y}_1, \mathbf{y}_2) = b(\mathbf{x}_1, \mathbf{x}_2). $$

By the relation between $C$ and $\mathrm{res}(C)$, the result follows. $\square$

The following theorem gives a propagation rule of order 3 for self-orthogonal codes.

**Theorem 4.** Let $C_0$ be a self-orthogonal code over $I_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} \in \mathbb{F}_3^n$ and $\alpha, \beta, \gamma \in I_3$, not all zero, such that $\alpha + \beta + \gamma = 0$. Then the code $C$, with the following generator matrix

$$ 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 self-orthogonal of length $n+3$ if

$$ (i) \quad (\mathbf{x}, \mathbf{x}) = 1, \text{ and } \alpha^2 + \beta^2 + \gamma^2 = 0, \text{ or} $$

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

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

$$ (i) \quad \text{If } (\mathbf{x}, \mathbf{x}) = 1 \text{ and } \alpha^2 + \beta^2 + \gamma^2 = 0, \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}_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) \quad \text{If } (\mathbf{x}, \mathbf{x}) = -1 \text{ and } \alpha^2 + \beta^2 - \gamma^2 = 0, \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}_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$.

In both cases, we see that $C$ is a self-orthogonal code. $\square$
**Corollary 4.** Let $C_0$ be a quasi self-dual code over $I_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} \in \mathbb{F}_3^n$ and $\alpha, \beta, \gamma \in I_3$, not all zero, such that $\alpha + \beta + \gamma = 0$. Let $\sigma, \tau, \mu \in S = \{0, b, d\}$, not all zero, such that $\sigma + \tau + \mu = 0$. Then the code $C$, with the following generator matrix

$$ G = \begin{pmatrix} \alpha & \beta & 0 & \gamma \mathbf{x} \\ 0 & \sigma & \tau & \mu \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 quasi self-dual of length $n + 3$ if

$$ 1. \quad (\mathbf{x}, \mathbf{x}) = 1, \text{ and } \alpha^2 + \beta^2 + \gamma^2 = 0, \text{ or} $$

$$ 2. \quad (\mathbf{x}, \mathbf{x}) = -1, \text{ and } \alpha^2 + \beta^2 - \gamma^2 = 0. $$

**Proof.** We first show that $C$ is self-orthogonal. Following the proof of Theorem 4, it suffices to show that $\mathbf{y}'_0 = (0 \ \sigma \ \tau \ \mu \mathbf{x})$ is orthogonal to itself and every vector $\mathbf{y}_i$ for $i = 0, 1, 2, \dots, m$. Indeed,

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

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

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

as $\sigma, \tau, \mu \in S$. Therefore, $C$ is self-orthogonal. Since $|C| = 9^1 3^1 |C_0| = 3^{n+3}$, $C$ is a quasi self-dual code of length $n + 3$. $\square$

**Example 3.** We construct self-orthogonal codes of length 7 from self-orthogonal codes of length 4. By Theorem 3, we have the self-orthogonal (4, 3³, 2) code with generator matrix

$$ G_0 = \begin{pmatrix} a & 0 & a & a \\ 0 & b & 0 & b \end{pmatrix} $$

and weight distribution [1, 0, 2, 10, 14].

Using Theorem 4(i), from $G_0$ with $\alpha = \beta = \gamma = a$, and $\mathbf{x} = (1, 2, 1, 2)$, we obtain a self-orthogonal (7, 3⁵, 3) code with generator matrix

$$ G_{0,1} = \begin{pmatrix} a & a & 0 & a & e & a & e \\ a & a & a & a & 0 & a & a \\ b & b & b & 0 & b & 0 & b \end{pmatrix} $$

and weight distribution [1, 0, 0, 12, 4, 30, 62, 134]. Also, if we use Theorem 4(ii) with $\alpha = h, \beta = 0, \gamma = c$ and $\mathbf{x} = (0, 0, 1, 1)$, we obtain another self-orthogonal (7, 3⁵, 2) code with generator matrix

$$ G_{0,2} = \begin{pmatrix} h & 0 & 0 & 0 & 0 & c & c \\ e & e & e & a & 0 & a & a \\ b & b & b & 0 & b & 0 & b \end{pmatrix} $$

and weight distribution [1, 0, 2, 18, 14, 16, 80, 112].

**Example 4.** Using Corollary 4 with the same generator matrix $G_0$, $\alpha = h, \beta = 0, \gamma = c, \sigma, \tau = b, \mu = d$ and $\mathbf{x} = (1, 2, 0, 0)$, we obtain a self-orthogonal (7, 3⁶, 2) code over $I_3$ with generator matrix
$$ G_{0,3} = \left( \begin{array}{ccc|ccc} h & 0 & 0 & c & h & 0 & 0 \\ 0 & b & b & d & b & 0 & 0 \\ \hline a & a & a & a & 0 & a & a \\ d & d & d & 0 & b & 0 & b \end{array} \right) $$

and weight distribution [1, 0, 4, 18, 42, 56, 230, 378].

## 3.2. Construction of Quasi Self-Dual Codes

In this section, we discuss two kinds of build-up construction method for quasi self-dual codes over $I_3$. We begin with the construction of $I_3$ codes from ternary codes, known traditionally as the **multilevel construction**.

**Theorem 5.** Let $C_1$ be a self-orthogonal ternary code of length $n$, and let $C_2$ be a ternary code of length $n$ such that $C_1 \subseteq C_2$. The code $C$, defined by the relation

$$ C = aC_1 + bC_2, $$

is self-orthogonal with residue code $C_1$ and torsion code $C_2$. Furthermore, if $|C_1||C_2| = 3^n$, then $C$ is quasi self-dual.

This is a direct analogue of Theorem 4 in [7], upon passing from characteristic 2 to 3. The proof is omitted here.

The following theorem is a propagation rule of order 3, which increases the number of generators by three.

**Theorem 6.** Let $C_0$ be a quasi self-dual code of length $n$ over $I_3$ with generator matrix $G_0 = (\mathbf{r}_i)$, where $\mathbf{r}_i$ is the $i$-th row of $G_0$ for $1 \le i \le m$. If $\mathbf{x} \in \mathbb{F}_3^n$ and $\sigma, \tau, \mu \in S = \{0, b, d\}$ are nonzero elements, then the code $C$, with the following generator matrix

$$ G = \left( \begin{array}{ccc|ccc} \sigma & 0 & 0 & \sigma\mathbf{x} \\ 0 & \tau & 0 & \tau\mathbf{x} \\ 0 & 0 & \mu & \mu\mathbf{x} \\ \hline 2(\mathbf{x}, \mathbf{r}_1) & 2(\mathbf{x}, \mathbf{r}_1) & 2(\mathbf{x}, \mathbf{r}_1) & \mathbf{r}_1 \\ \vdots & \vdots & \vdots & \vdots \\ 2(\mathbf{x}, \mathbf{r}_m) & 2(\mathbf{x}, \mathbf{r}_m) & 2(\mathbf{x}, \mathbf{r}_m) & \mathbf{r}_m \end{array} \right), $$

is quasi self-dual of length $n+3$.

**Proof.** Let $\mathbf{y}_0 = (\sigma \ 0 \ 0 \ \sigma\mathbf{x})$, $\mathbf{y}'_0 = (0 \ \tau \ 0 \ \tau\mathbf{x})$ and $\mathbf{y}''_0 = (0 \ 0 \ \mu \ \mu\mathbf{x})$. We see that

$$ (\mathbf{y}_0, \mathbf{y}'_0) = \sigma\tau(\mathbf{x}, \mathbf{x}) = 0, $$

because $\sigma\tau = 0$. Similar arguments show that $\mathbf{y}_0, \mathbf{y}'_0$ and $\mathbf{y}''_0$ are orthogonal to one another and to themselves, as $\sigma, \tau, \mu \in S$.

Now, let $\mathbf{y}_i = (2(\mathbf{x}, \mathbf{r}_i) \ 2(\mathbf{x}, \mathbf{r}_i) \ 2(\mathbf{x}, \mathbf{r}_i) \ \mathbf{r}_i)$ for $1 \le i \le m$. Then

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

Similarly, $(\mathbf{y}'_0, \mathbf{y}_i) = 0$ and $(\mathbf{y}''_0, \mathbf{y}_i) = 0$. Also, for $1 \le j \le m$,

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

Thus, $C$ is a self-orthogonal code. Furthermore, since $|C| = 3^3|C_0| = 3^{n+3}$, $C$ is quasi self-dual. Hence, the code $C$ obtained from the quasi self-dual code $C_0$ by the build-up construction is also quasi self-dual. $\square$
Denote by $\hat{C}_0$ the span of the last $m$ rows of $\mathcal{G}$ and for every $y \in I_3$, write

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

The construction in Theorem 6 may be shown to be equivalent to $\mathcal{C} = \bigcup_{t,u,v \in S} (T_t + U_u + V_v + \hat{C}_0)$, where $\cup$ denotes disjoint union.

**Example 5.** Using Theorem 5, we construct quasi self-dual codes of lengths 6 and 9 from a (3, 3³, 1) code with generator matrix

$$\mathcal{G}_1 = \begin{pmatrix} a & a & c \\ 0 & b & b \end{pmatrix}$$

and weight distribution [1, 2, 2, 22].

Using $\mathcal{G}_1$ as the base generator matrix and $\mathbf{x} = (0, 1, 1)$, we obtain a quasi self-dual (6, 3⁶, 1) code with generator matrix

$$\mathcal{G}_{1,1} = \begin{pmatrix} b & 0 & 0 & 0 & b & b \\ 0 & b & 0 & 0 & b & b \\ 0 & 0 & b & 0 & b & b \\ g & g & g & a & a & c \\ b & b & b & 0 & b & b \end{pmatrix}$$

and weight distribution [1, 8, 26, 48, 64, 64, 518].

Using $\mathcal{G}_{1,1}$ with $\mathbf{x} = (1, 2, 1, 1, 2, 0)$, we obtain a quasi self-dual (9, 3⁹, 1) code with generator matrix

$$\mathcal{G}_{1,1,1} = \begin{pmatrix} b & 0 & 0 & b & d & b & d & 0 \\ 0 & b & 0 & b & d & b & b & 0 \\ 0 & 0 & b & b & d & b & b & 0 \\ 0 & 0 & 0 & b & 0 & 0 & 0 & b \\ b & b & b & 0 & b & 0 & 0 & b \\ 0 & 0 & 0 & 0 & 0 & b & 0 & b \\ f & f & f & g & g & g & a & a \\ 0 & 0 & 0 & b & b & b & 0 & b \end{pmatrix}$$

and weight distribution [1, 8, 44, 212, 686, 1370, 1760, 1520, 800, 13282].

The next propagation rule uses two more generators while still creating quas-self-dual codes over $I_3$ of length 4 more.

**Theorem 7.** Let $C_0$ be a quasi self-dual code over $I_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}_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}_i, \mathbf{r}_i)$ and $v_i = (\mathbf{x}_2, \mathbf{r}_i)$. If $\alpha, \beta \in I_3 \setminus S$, then the code $\mathcal{C}$, with the following generator matrix

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

is quasi self-dual of length $n + 4$.

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

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

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

Now, for $1 \le i \le m$, let $\mathbf{y}_i = (2u_i \ 2v_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, $\mathcal{C}$ is self-orthogonal and since $|\mathcal{C}| = 9^2|\mathcal{C}_0| = 3^{n+4}$, $\mathcal{C}$ is quasi self-dual. $\square$

Define $\hat{\mathcal{C}}_0$ to be the span of the last $m$ rows of $\mathcal{G}$, and for every $y \in I_3$ write

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

The construction in Theorem 7 maybe demonstrated to be equivalent to

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

**Remark 1.** Vectors $\mathbf{x}_1$ and $\mathbf{x}_2$ satisfying the conditions of Theorem 7 is valid for $n \ge 2$.

**Example 6.** We construct a quasi self-dual code of length 8 from a quasi self-dual (4, 3$^4$, 1) with generator matrix

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

and weight distribution [1, 2, 6, 32, 40]. Using Theorem 7 with $\alpha = \beta = a$, $\mathbf{x}_1 = (1, 0, 0, 1)$ and $\mathbf{x}_2 = (0, 1, 2, 0)$, we obtain a quasi self-dual (8, 3$^8$, 2) code with generator matrix

$$ \mathcal{G}_{2,2} = \left( \begin{array}{c|c} a & a \\ 0 & 0 \\ a & 0 \\ 0 & 0 \\ g & a \\ d & d \\ d & d \\ d & b \end{array} \middle| \begin{array}{c} a \\ 0 \\ a \\ 0 \\ e \\ 0 \\ b \\ 0 \\ b \end{array} \right) $$

and weight distribution [1, 0, 2, 58, 150, 344, 1318, 2712, 1976].

**Remark 2.** If two quasi self-dual $I_3$ codes are monomially equivalent, then their residue codes are also equivalent. But the converse does not hold, as seen in the next example.

**Example 7.** Let $C_1$ and $C_2$ be quasi self-dual $I_3$ codes with generator matrices
$$ \begin{pmatrix} a & 0 & a & a \\ 0 & b & 0 & b \\ 0 & 0 & b & d \end{pmatrix} $$

and $\begin{pmatrix} a & 0 & a & a \\ 0 & b & 0 & b \\ 0 & 0 & b & b \end{pmatrix}$, respectively. Then, $\mathrm{res}(C_1) = \mathrm{res}(C_2)$ with generator matrix $\begin{pmatrix} 1 & 0 & 1 & 1 \end{pmatrix}$.

However, $C_1$ and $C_2$ are not monomially equivalent, as their weight distributions are [1, 0, 12, 26, 42] and [1, 2, 6, 32, 40], respectively.

### 3.3. Construction of Self-Dual Codes

In this section, we discuss the build-up construction method for self-dual codes over $I_3$. We start with characterizations of self-dual codes.

**Theorem 8.** A linear code $\mathcal{C}$ of length $n$ over $I_3$ is self-dual if and only if the following hold:
(i) $\mathrm{res}(\mathcal{C})$ is self-dual ternary code,

(ii) $\mathrm{tor}(\mathcal{C}) = \mathbb{F}_3^n$.

The code $\mathcal{C}$ is defined by the relation

$$ \mathcal{C} = a \mathrm{res}(\mathcal{C}) + b \mathbb{F}_3^n. $$

Moreover, $|\mathcal{C}| = 3^{\frac{3n}{2}}$.

**Proof.** The proof is similar to Theorems 3, 4 and 5 in [13] upon passing from characteristic 2 to 3. Moreover, $|\mathcal{C}| = |\mathrm{res}(\mathcal{C})||\mathrm{tor}(\mathcal{C})| = 3^{\frac{n}{2}}3^n = 3^{\frac{3n}{2}}$. □

**Corollary 5.** Self-dual codes over $I_3$ of length $n$ occur if and only if $n$ is a multiple of 4.

**Proof.** We know that $\mathcal{C}$ is a self-dual code over $I_3$ if and only if $\mathrm{res}(\mathcal{C})$ is a self-dual code over $\mathbb{F}_3$. Then, by Theorem 3 in [14], a self-dual code over $\mathbb{F}_3$ of length $n$ exists if and only if $n$ is a multiple of 4. This completes the proof. □

**Theorem 9.** Let $n$ be a multiple of 4. Suppose $\mathcal{C}_0$ is a self-dual code over $I_3$ of length $n$ and generator matrix $\mathcal{G}_0 = (\mathbf{r}_i)$, where $\mathbf{r}_i$ are the row vectors of $\mathcal{G}_0$ for $1 \le i \le m$ over $I_3$. 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 each $i = 1, 2$. For $1 \le i \le m$, let $u_i = (\mathbf{x}_1, \mathbf{r}_i)$ and $v_i = (\mathbf{x}_2, \mathbf{r}_i)$. Then the code $\mathcal{C}$, with the generator matrix

$$ \mathcal{G} = \begin{pmatrix} a & 0 & 0 & 0 & a\mathbf{x}_1 \\ 0 & a & 0 & 0 & a\mathbf{x}_2 \\ 0 & 0 & b & 0 & b(\mathbf{x}_1 + \mathbf{x}_2) \\ 0 & 0 & 0 & b & b(\mathbf{x}_1 + 2\mathbf{x}_2) \\ \hline 2u_1 & 2v_1 & 2u_1 + 2v_1 & 2u_1 + v_1 & \mathbf{r}_1 \\ \vdots & \vdots & \vdots & \vdots & \vdots \\ 2u_m & 2v_m & 2u_m + 2v_m & 2u_m + v_m & \mathbf{r}_m \end{pmatrix}, $$

is self-dual of length $n+4$.

**Proof.** We can show that $\mathcal{G}$ generates a self-orthogonal code $\mathcal{C}$ in a similar way as in Theorem 7. Indeed, define $\hat{\mathcal{C}}_0$ to be the span of the last $m$ generators. Furthermore, define $D$ as the $\mathbb{F}_3$-span of $\{\mathbf{v}_1, \mathbf{v}_2, \mathbf{v}_3, \mathbf{v}_4\}$, where $\mathbf{v}_1 = (1, 0, 0, 0, \mathbf{x}_1)$, $\mathbf{v}_2 = (0, 1, 0, 0, \mathbf{x}_2)$, $\mathbf{v}_3 = (0, 0, 1, 0, (\mathbf{x}_1 + \mathbf{x}_2))$, and $\mathbf{v}_4 = (0, 0, 0, 1, (\mathbf{x}_1 + 2\mathbf{x}_2))$. It can be seen that the construction of $\mathrm{tor}(\mathcal{C})$ in the theorem is equivalent to

$$ \mathrm{tor}(\mathcal{C}) = D + \mathrm{tor}(\hat{\mathcal{C}}_0). $$

As $\mathcal{C}_0$ is self-dual, by Theorem 8 we can see that $\mathrm{tor}(\mathcal{C}_0)$ is equal to $\mathbb{F}_3^n$. Through this hypothesis, we have a ratio of $3^4$ on the sizes, because $|D| = 3^4$, and $\mathrm{tor}(\mathcal{C}) = \mathbb{F}_3^{n+4}$.

Now, it suffices to show that $\mathrm{res}(\mathcal{C})$ is a self-dual ternary code. Since $\mathcal{C}$ is self-orthogonal, we can see that $\mathrm{res}(\mathcal{C})$ is also self-orthogonal and thus, $\mathrm{res}(\mathcal{C}) \subseteq \mathrm{res}(\mathcal{C})^{\perp}$.

Note that $|\mathcal{C}_0| = 3^{\frac{3n}{2}}$ by Theorem 8 and because $\mathcal{G}$ has four more generators, this shows that $|\mathcal{C}| = 3^{292}|\mathcal{C}_0| = 3^{\frac{3(n+4)}{2}}$. Thus, $|\mathrm{res}(\mathcal{C})| = |\mathrm{res}(\mathcal{C})^{\perp}| = 3^{\frac{n+4}{2}}$ and hence, $\mathrm{res}(\mathcal{C})$ is a self-dual ternary code.

Therefore, $\mathcal{C} = a \mathrm{res}(\mathcal{C}) + b \mathbb{F}_3^{n+4}$ and the code $\mathcal{C}$ obtained from the self-dual code $\mathcal{C}_0$ by the build-up construction is also self-dual. □

**Theorem 10.** Two self-dual codes $C_1$ and $C_2$ over $I_3$ are monomially equivalent if and only if their residue codes are equivalent.
**Proof.** Let $C_1$ and $C_2$ be two monomially equivalent codes over $I_3$. Then $\mathrm{res}(C_1)$ and $\mathrm{res}(C_2)$ are equivalent since $a \mathrm{res}(C_1) \subseteq C_1$ and $a \mathrm{res}(C_2) \subseteq C_2$.

Conversely, if $C_1$ and $C_2$ are self-dual codes over $I_3$, and $\mathrm{res}(C_1)$ and $\mathrm{res}(C_2)$ are monomially equivalent, then there is a monomial matrix $M$ such that $\mathrm{res}(C_2) = \mathrm{res}(C_1)M$ and $\mathbb{F}_3^n = \mathbb{F}_3^n M$. Since $C_1$ and $C_2$ are self-dual, by Theorem 8 we have

$$C_2 = a \mathrm{res}(C_2) + b \mathbb{F}_3^n = a \mathrm{res}(C_1)M + b \mathbb{F}_3^n M = C_1 M. \quad (1)$$

From (1), we get $C_2 = C_1 M$, proving that $C_1$ and $C_2$ are monomially equivalent. $\square$

## 4. Computational Results

In this section, we classify self-orthogonal, quasi self-dual and self-dual $I_3$ codes of length $n \le 5$ and residue dimensions $k_0 = 0, 1, 2$ using the multilevel constructions in Theorems 3, 5 and 8. All computations were done with the aid of MAGMA [15].

### 4.1. Length 1

There is one quasi self-dual code over $I_3$ of type $\{0, 1\}$, with generator matrix $(b)$ and weight distribution $[1, 2]$.

### 4.2. Length 2

There is one quasi self-dual code over $I_3$ of type $\{0, 2\}$, with generator matrix

$$\begin{pmatrix} b & 0 \\ 0 & b \end{pmatrix}$$

and weight distribution $[1, 4, 4]$.

### 4.3. Length 3

* For type $\{0, 3\}$, there is one quasi self-dual code over $I_3$, with generator matrix

$$\begin{pmatrix} b & 0 & 0 \\ 0 & b & 0 \\ 0 & 0 & b \end{pmatrix}$$

and weight distribution $[1, 6, 12, 8]$.

* For type $\{1, 0\}$, there are four distinct self-orthogonal codes over $I_3$, with generator matrices in the following table:

<table><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>(c a a)</td><td>4</td><td>[1, 0, 0, 8]</td></tr><tr><td>(g a a)</td><td>4</td><td>[1, 0, 0, 8]</td><td>(a c g)</td><td>6</td><td>[1, 0, 0, 8]</td></tr></tbody></table>

For length 3 and type $\{1, 0\}$, we have

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

* For type $\{1, 1\}$, there are five distinct quasi self-dual codes over $I_3$, with generator matrices in the following table:
<table><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>a</td></tr><tr><td>0</td><td>0</td><td>b</td></tr></table>)</td><td>4</td><td>[1, 2, 2, 22]</td><td>(<table><tr><td>c</td><td>a</td><td>a</td></tr><tr><td>0</td><td>0</td><td>b</td></tr></table>)</td><td>2</td><td>[1, 2, 2, 22]</td></tr><tr><td>(<table><tr><td>a</td><td>a</td><td>a</td></tr><tr><td>0</td><td>b</td><td>d</td></tr></table>)</td><td>12</td><td>[1, 0, 6, 20]</td><td>(<table><tr><td>c</td><td>a</td><td>a</td></tr><tr><td>0</td><td>b</td><td>d</td></tr></table>)</td><td>12</td><td>[1, 0, 6, 20]</td></tr><tr><td>(<table><tr><td>g</td><td>a</td><td>a</td></tr><tr><td>0</td><td>b</td><td>d</td></tr></table>)</td><td>12</td><td>[1, 0, 6, 20]</td><td></td><td></td><td></td></tr></tbody></table>

For length 3 and type {1,1}, we have

$$ \sum_{1}^{5} \frac{1}{|Aut(C)|} = \frac{1}{4} + \frac{1}{2} + \frac{1}{12} + \frac{1}{12} + \frac{1}{12} = 1 = \frac{\mathcal{N}_{QSD}(n, k_1, k_2)}{2^n n!} $$

### 4.4. Length 4

* For type {0,4}, there is one quasi self-dual code over $I_3$, with generator matrix

$$ \begin{pmatrix} b & 0 & 0 & 0 \\ 0 & b & 0 & 0 \\ 0 & 0 & b & 0 \\ 0 & 0 & 0 & b \end{pmatrix} $$

and weight distribution [1, 8, 24, 32, 16].

* For type {1,0}, there are eight distinct self-orthogonal codes over $I_3$, with generator matrices in the following table:

<table><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>a</td><td>a</td></tr></table>)</td><td>24</td><td>[1, 0, 0, 8, 0]</td><td>(<table><tr><td>c</td><td>0</td><td>a</td><td>a</td></tr></table>)</td><td>8</td><td>[1, 0, 0, 8, 0]</td></tr><tr><td>(<table><tr><td>g</td><td>0</td><td>a</td><td>a</td></tr></table>)</td><td>8</td><td>[1, 0, 0, 8, 0]</td><td>(<table><tr><td>a</td><td>0</td><td>c</td><td>g</td></tr></table>)</td><td>12</td><td>[1, 0, 0, 8, 0]</td></tr><tr><td>(<table><tr><td>a</td><td>b</td><td>a</td><td>a</td></tr></table>)</td><td>4</td><td>[1, 0, 0, 2, 6]</td><td>(<table><tr><td>c</td><td>b</td><td>a</td><td>a</td></tr></table>)</td><td>4</td><td>[1, 0, 0, 2, 6]</td></tr><tr><td>(<table><tr><td>g</td><td>b</td><td>a</td><td>a</td></tr></table>)</td><td>12</td><td>[1, 0, 0, 2, 6]</td><td>(<table><tr><td>a</td><td>b</td><td>c</td><td>g</td></tr></table>)</td><td>6</td><td>[1, 0, 0, 2, 6]</td></tr></tbody></table>

For length 4 and type {1,0}, we have

$$ \sum_{1}^{8} \frac{1}{|Aut(C)|} = \frac{1}{24} + \frac{1}{8} + \frac{1}{8} + \frac{1}{12} + \frac{1}{4} + \frac{1}{4} + \frac{1}{6} + \frac{1}{12} = 1.125 = \frac{\mathcal{N}_{SO}(n, k_1, k_2)}{2^n n!} $$

* For type {1,1}, there are 23 distinct self-orthogonal codes over $I_3$, with generator matrices in the following table:
<table><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>a</td><td>a</td></tr><tr><td>0</td><td>b</td><td>0</td><td>0</td></tr></table>)</td><td>24</td><td>[1, 2, 0, 8, 16]</td><td>(<table><tr><td>c</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></table>)</td><td>8</td><td>[1, 2, 0, 8, 16]</td></tr><tr><td>(<table><tr><td>g</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></table>)</td><td>8</td><td>[1, 2, 0, 8, 16]</td><td>(<table><tr><td>a</td><td>0</td><td>c</td><td>g</td></tr><tr><td>0</td><td>b</td><td>0</td><td>0</td></tr></table>)</td><td>12</td><td>[1, 2, 0, 8, 16]</td></tr><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>b</td><td>0</td></tr></table>)</td><td>4</td><td>[1, 0, 2, 10, 14]</td><td>(<table><tr><td>c</td><td>0</td><td>a</td><td>a</td></tr><tr><td>0</td><td>b</td><td>b</td><td>0</td></tr></table>)</td><td>2</td><td>[1, 0, 2, 10, 14]</td></tr><tr><td>(<table><tr><td>g</td><td>0</td><td>a</td><td>a</td></tr><tr><td>0</td><td>b</td><td>b</td><td>0</td></tr></table>)</td><td>2</td><td>[1, 0, 2, 10, 14]</td><td>(<table><tr><td>a</td><td>0</td><td>c</td><td>g</td></tr><tr><td>0</td><td>b</td><td>b</td><td>0</td></tr></table>)</td><td>2</td><td>[1, 0, 2, 10, 14]</td></tr><tr><td>(<table><tr><td>c</td><td>0</td><td>a</td><td>a</td></tr><tr><td>0</td><td>b</td><td>b</td><td>b</td></tr></table>)</td><td>4</td><td>[1, 0, 2, 10, 14]</td><td>(<table><tr><td>g</td><td>0</td><td>a</td><td>a</td></tr><tr><td>0</td><td>b</td><td>b</td><td>b</td></tr></table>)</td><td>4</td><td>[1, 0, 2, 10, 14]</td></tr><tr><td>(<table><tr><td>a</td><td>0</td><td>a</td><td>a</td></tr><tr><td>0</td><td>0</td><td>b</td><td>d</td></tr></table>)</td><td>24</td><td>[1, 0, 6, 20, 0]</td><td>(<table><tr><td>c</td><td>0</td><td>a</td><td>a</td></tr><tr><td>0</td><td>0</td><td>b</td><td>d</td></tr></table>)</td><td>24</td><td>[1, 0, 6, 20, 0]</td></tr><tr><td>(<table><tr><td>g</td><td>0</td><td>a</td><td>a</td></tr><tr><td>0</td><td>0</td><td>b</td><td>d</td></tr></table>)</td><td>24</td><td>[1, 0, 6, 20, 0]</td><td>(<table><tr><td>a</td><td>0</td><td>c</td><td>g</td></tr><tr><td>0</td><td>0</td><td>b</td><td>d</td></tr></table>)</td><td>24</td><td>[1, 0, 6, 20, 0]</td></tr><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>b</td><td>d</td></tr></table>)</td><td>12</td><td>[1, 0, 0, 14, 12]</td><td>(<table><tr><td>c</td><td>0</td><td>a</td><td>a</td></tr><tr><td>0</td><td>b</td><td>b</td><td>d</td></tr></table>)</td><td>4</td><td>[1, 0, 0, 14, 12]</td></tr><tr><td>(<table><tr><td>g</td><td>0</td><td>a</td><td>a</td></tr><tr><td>0</td><td>b</td><td>b</td><td>d</td></tr></table>)</td><td>4</td><td>[1, 0, 0, 14, 12]</td><td>(<table><tr><td>a</td><td>0</td><td>c</td><td>g</td></tr><tr><td>0</td><td>b</td><td>b</td><td>d</td></tr></table>)</td><td>6</td><td>[1, 0, 0, 14, 12]</td></tr><tr><td>(<table><tr><td>a</td><td>0</td><td>a</td><td>a</td></tr><tr><td>0</td><td>0</td><td>b</td><td>0</td></tr></table>)</td><td>8</td><td>[1, 2, 2, 22, 0]</td><td>(<table><tr><td>c</td><td>0</td><td>a</td><td>a</td></tr><tr><td>0</td><td>0</td><td>b</td><td>0</td></tr></table>)</td><td>4</td><td>[1, 2, 2, 22, 0]</td></tr><tr><td>(<table><tr><td>a</td><td>0</td><td>a</td><td>a</td></tr><tr><td>0</td><td>0</td><td>b</td><td>0</td></tr></table>)</td><td>8</td><td>[1, 2, 2, 22, 0]</td><td>(<table><tr><td>a</td><td>b</td><td>a</td><td>a</td></tr><tr><td>0</td><td>0</td><td>b</td><td>0</td></tr></table>)</td><td>4</td><td>[1, 2, 2, 4, 18]</td></tr><tr><td>(<table><tr><td>c</td><td>b</td><td>a</td><td>a</td></tr><tr><td>0</td><td>0</td><td>b</td><td>0</td></tr></table>)</td><td>2</td><td>[1, 2, 2, 4, 18]</td><td></td><td></td><td></td></tr></tbody></table>

For length 4 and type {1, 1}, we have

$$ \sum_{1}^{23} \frac{1}{|Aut(C)|} = 4.7 = \frac{\mathcal{N}_{SO}(n, k_1, k_2)}{2^n n!} $$

* For type {1, 2}, there are 10 distinct quasi self-dual codes over $I_3$, with generator matrices in the following table:
<table><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>$$ \begin{pmatrix} a & 0 & a & a \\ 0 & b & 0 & 0 \\ 0 & 0 & b & 0 \end{pmatrix} $$</td><td>8</td><td>[1, 4, 6, 26, 44]</td><td>$$ \begin{pmatrix} c & 0 & a & a \\ 0 & b & 0 & 0 \\ 0 & 0 & b & 0 \end{pmatrix} $$</td><td>4</td><td>[1, 4, 6, 26, 44]</td></tr><tr><td>$$ \begin{pmatrix} a & 0 & a & a \\ 0 & b & 0 & b \\ 0 & 0 & b & b \end{pmatrix} $$</td><td>4</td><td>[1, 4, 6, 26, 44]</td><td>$$ \begin{pmatrix} a & 0 & a & c \\ 0 & b & 0 & b \\ 0 & 0 & b & b \end{pmatrix} $$</td><td>2</td><td>[1, 2, 6, 32, 40]</td></tr><tr><td>$$ \begin{pmatrix} a & 0 & a & a \\ 0 & b & 0 & 0 \\ 0 & 0 & b & d \end{pmatrix} $$</td><td>24</td><td>[1, 2, 6, 32, 40]</td><td>$$ \begin{pmatrix} c & 0 & a & a \\ 0 & b & 0 & 0 \\ 0 & 0 & b & d \end{pmatrix} $$</td><td>24</td><td>[1, 2, 6, 32, 40]</td></tr><tr><td>$$ \begin{pmatrix} g & 0 & a & a \\ 0 & b & 0 & 0 \\ 0 & 0 & b & d \end{pmatrix} $$</td><td>24</td><td>[1, 2, 6, 32, 40]</td><td>$$ \begin{pmatrix} a & 0 & a & a \\ 0 & b & 0 & b \\ 0 & 0 & b & d \end{pmatrix} $$</td><td>12</td><td>[1, 0, 12, 26, 42]</td></tr><tr><td>$$ \begin{pmatrix} c & 0 & a & a \\ 0 & b & 0 & b \\ 0 & 0 & b & d \end{pmatrix} $$</td><td>12</td><td>[1, 0, 12, 26, 42]</td><td>$$ \begin{pmatrix} g & 0 & a & a \\ 0 & b & 0 & b \\ 0 & 0 & b & d \end{pmatrix} $$</td><td>12</td><td>[1, 0, 12, 26, 42]</td></tr></tbody></table>

For length 4 and type {1,2}, we have

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

where the summation runs over the representatives of the equivalence classes of codes constructed by our propagation rules.

* For type {2,0}, there are nine quasi self-dual codes over $I_3$, with generator matrices in the following table.

<table><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>$$ \begin{pmatrix} a & 0 & a & a \\ 0 & a & a & e \end{pmatrix} $$</td><td>48</td><td>[1, 0, 0, 32, 48]</td><td>$$ \begin{pmatrix} c & 0 & a & a \\ 0 & a & a & e \end{pmatrix} $$</td><td>12</td><td>[1, 0, 0, 32, 48]</td></tr><tr><td>$$ \begin{pmatrix} g & 0 & a & a \\ 0 & a & a & e \end{pmatrix} $$</td><td>12</td><td>[1, 0, 0, 32, 48]</td><td>$$ \begin{pmatrix} a & 0 & a & a \\ 0 & a & a & h \end{pmatrix} $$</td><td>2</td><td>[1, 0, 0, 32, 48]</td></tr><tr><td>$$ \begin{pmatrix} a & 0 & c & a \\ 0 & c & a & e \end{pmatrix} $$</td><td>6</td><td>[1, 0, 0, 32, 48]</td><td>$$ \begin{pmatrix} a & 0 & g & a \\ 0 & g & a & e \end{pmatrix} $$</td><td>6</td><td>[1, 0, 0, 32, 48]</td></tr></tbody></table>
<table><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>c</td><td>a</td></tr><tr><td>0</td><td>g</td><td>a</td><td>e</td></tr></table>)</td><td>4</td><td>[1, 0, 0, 32, 48]</td><td>(<table><tr><td>a</td><td>0</td><td>c</td><td>c</td></tr><tr><td>0</td><td>c</td><td>a</td><td>e</td></tr></table>)</td><td>4</td><td>[1, 0, 0, 32, 48]</td></tr><tr><td>(<table><tr><td>c</td><td>0</td><td>g</td><td>c</td></tr><tr><td>0</td><td>c</td><td>c</td><td>e</td></tr></table>)</td><td>8</td><td>[1, 0, 0, 32, 48]</td><td></td><td></td><td></td></tr></tbody></table>

For length 4 and type {2,0}, we have

$$ \sum_{1}^{9} \frac{1}{|Aut(C)|} = 1.6 = \frac{\mathcal{N}_{QSD}(n, k_1, k_2)}{2^n n!} $$

* For type {2,2}, there is an unique self-dual code over $I_3$, with generator matrix:

<table><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><tr><td>0</td><td>0</td><td>b</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>b</td></tr></table>)</td><td>48</td><td>[1, 8, 24, 248, 448].</td></tr></tbody></table>

For length 4 and type {2,2}, we have

$$ \frac{1}{|Aut(C)|} = \frac{1}{48} = \frac{\mathcal{N}_{SD}(n, k_1, k_2)}{2^n n!} $$

### 4.5. Length 5

* For type {0,4}, there are five distinct self-orthogonal codes over $I_3$, with generator matrices in the following table.

<table><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>b</td><td>0</td><td>b</td><td>0</td><td>b</td></tr><tr><td>0</td><td>b</td><td>0</td><td>b</td><td>0</td></tr><tr><td>0</td><td>0</td><td>b</td><td>0</td><td>b</td></tr><tr><td>0</td><td>0</td><td>0</td><td>b</td><td>0</td></tr></table>)</td><td>192</td><td>[1, 6, 14, 20, 24, 16]</td><td>(<table><tr><td>b</td><td>d</td><td>b</td><td>b</td><td>0</td></tr><tr><td>0</td><td>b</td><td>d</td><td>b</td><td>b</td></tr><tr><td>0</td><td>0</td><td>b</td><td>d</td><td>b</td></tr><tr><td>b</td><td>0</td><td>b</td><td>0</td><td>b</td></tr></table>)</td><td>240</td><td>[1, 0, 20, 20, 30, 10]</td></tr><tr><td>(<table><tr><td>d</td><td>0</td><td>0</td><td>b</td><td>0</td></tr><tr><td>0</td><td>0</td><td>b</td><td>b</td><td>0</td></tr><tr><td>0</td><td>b</td><td>0</td><td>0</td><td>b</td></tr><tr><td>b</td><td>0</td><td>0</td><td>d</td><td>b</td></tr></table>)</td><td>96</td><td>[1, 4, 10, 26, 32, 8]</td><td>(<table><tr><td>b</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr><td>0</td><td>b</td><td>0</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>b</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>b</td><td>0</td></tr></table>)</td><td>768</td><td>[1, 8, 24, 32, 16, 0]</td></tr><tr><td>(<table><tr><td>b</td><td>0</td><td>0</td><td>b</td><td>0</td></tr><tr><td>0</td><td>0</td><td>b</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>d</td><td>0</td><td>b</td></tr><tr><td>0</td><td>0</td><td>0</td><td>0</td><td>b</td></tr></table>)</td><td>64</td><td>[1, 4, 6, 8, 8, 0]</td><td></td><td></td><td></td></tr></tbody></table>

For length 5 and type {0,4}, we have

$$ \sum_{1}^{5} \frac{1}{|Aut(C)|} = 0.03 = \frac{\mathcal{N}_{SO}(n, k_1, k_2)}{2^n n!} $$
* For type {0,5}, there is one quasi self-dual code over $I_3$, with generator matrix

$$ \begin{pmatrix} b & 0 & 0 & 0 & 0 \\ 0 & b & 0 & 0 & 0 \\ 0 & 0 & b & 0 & 0 \\ 0 & 0 & 0 & b & 0 \\ 0 & 0 & 0 & 0 & b \end{pmatrix} $$

and weight distribution [1, 10, 40, 80, 80, 32].

* For type {1,0}, there are 12 distinct self-orthogonal codes over $I_3$, with generator matrices in the following table:

<table><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>(c 0 0 a a)</td><td>32</td><td>[1,0,0,8,0,0]</td></tr><tr><td>(g 0 0 a a)</td><td>32</td><td>[1,0,0,8,0,0]</td><td>(a 0 0 c g)</td><td>48</td><td>[1,0,0,8,0,0]</td></tr><tr><td>(a b 0 a a)</td><td>24</td><td>[1,0,0,2,6,0]</td><td>(c b 0 a a)</td><td>8</td><td>[1,0,0,2,6,0]</td></tr><tr><td>(g b 0 a a)</td><td>8</td><td>[1,0,0,2,6,0]</td><td>(a b 0 c g)</td><td>12</td><td>[1,0,0,2,6,0]</td></tr><tr><td>(a b b a a)</td><td>24</td><td>[1,0,0,2,0,6]</td><td>(c b b a a)</td><td>8</td><td>[1,0,0,2,0,6]</td></tr><tr><td>(a b b c g)</td><td>12</td><td>[1,0,0,2,0,6]</td><td>(g b b a a)</td><td>8</td><td>[1,0,0,2,0,6]</td></tr></tbody></table>

For length 5 and type {1,0}, we have

$$ \sum_{1}^{12} \frac{1}{|Aut(C)|} = 0.84 = \frac{\mathcal{N}_{SO}(n, k_1, k_2)}{2^n n!} $$

* For type {1,3}, there are 15 quasi self-dual codes over $I_3$, with generator matrices in the following table:

<table><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)<br>0 b 0 0 0<br>0 0 b 0 0<br>0 0 0 b b)</td><td>32</td><td>[1,6,14,38,96,88]</td><td>(c 0 0 a a)<br>0 b 0 0 0<br>0 0 b 0 0<br>0 0 0 b b)</td><td>16</td><td>[1,6,14,38,96,88]</td></tr><tr><td>(a 0 0 a a)<br>0 b 0 0 b<br>0 0 b 0 b<br>0 0 0 b b)</td><td>8</td><td>[1,2,12,50,94,84]</td><td>(a 0 0 a c)<br>0 b 0 0 b<br>0 0 b 0 b<br>0 0 0 b b)</td><td>4</td><td>[1,2,12,50,94,84]</td></tr><tr><td>(a 0 0 a a)<br>0 b 0 0 0<br>0 0 b 0 b<br>0 0 0 b b)</td><td>8</td><td>[1,4,10,44,104,80]</td><td>(a 0 0 a c)<br>0 b 0 0 0<br>0 0 b 0 b<br>0 0 0 b b)</td><td>4</td><td>[1,4,10,44,104,80]</td></tr></tbody></table>
<table><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>b</td><td>0</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>b</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>b</td><td>d</td></tr></table></td><td>96</td><td>[1, 4, 10, 44, 104, 80]</td><td><table><tr><td>c</td><td>0</td><td>0</td><td>a</td><td>a</td></tr><tr><td>0</td><td>b</td><td>0</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>b</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>b</td><td>d</td></tr></table></td><td>96</td><td>[1, 4, 10, 44, 104, 80]</td></tr><tr><td><table><tr><td>g</td><td>0</td><td>0</td><td>a</td><td>a</td></tr><tr><td>0</td><td>b</td><td>0</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>b</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>0</td><td>b</td><td>d</td></tr></table></td><td>96</td><td>[1, 4, 10, 44, 104, 80]</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>b</td><td>0</td><td>0</td><td>d</td></tr><tr><td>0</td><td>0</td><td>b</td><td>0</td><td>b</td></tr><tr><td>0</td><td>0</td><td>0</td><td>b</td><td>d</td></tr></table></td><td>24</td><td>[1, 0, 20, 38, 102, 82]</td></tr><tr><td><table><tr><td>c</td><td>0</td><td>0</td><td>a</td><td>a</td></tr><tr><td>0</td><td>b</td><td>0</td><td>0</td><td>d</td></tr><tr><td>0</td><td>0</td><td>b</td><td>0</td><td>b</td></tr><tr><td>0</td><td>0</td><td>0</td><td>b</td><td>d</td></tr></table></td><td>24</td><td>[1, 0, 20, 38, 102, 82]</td><td><table><tr><td>g</td><td>0</td><td>0</td><td>a</td><td>a</td></tr><tr><td>0</td><td>b</td><td>0</td><td>0</td><td>d</td></tr><tr><td>0</td><td>0</td><td>b</td><td>0</td><td>b</td></tr><tr><td>0</td><td>0</td><td>0</td><td>b</td><td>d</td></tr></table></td><td>24</td><td>[1, 0, 20, 38, 102, 82]</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>b</td><td>0</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>b</td><td>0</td><td>d</td></tr><tr><td>0</td><td>0</td><td>0</td><td>b</td><td>d</td></tr></table></td><td>24</td><td>[1, 2, 12, 50, 94, 84]</td><td><table><tr><td>c</td><td>0</td><td>0</td><td>a</td><td>a</td></tr><tr><td>0</td><td>b</td><td>0</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>b</td><td>0</td><td>d</td></tr><tr><td>0</td><td>0</td><td>0</td><td>b</td><td>d</td></tr></table></td><td>24</td><td>[1, 2, 12, 50, 94, 84]</td></tr><tr><td><table><tr><td>g</td><td>0</td><td>0</td><td>a</td><td>a</td></tr><tr><td>0</td><td>b</td><td>0</td><td>0</td><td>0</td></tr><tr><td>0</td><td>0</td><td>b</td><td>0</td><td>d</td></tr><tr><td>0</td><td>0</td><td>0</td><td>b</td><td>d</td></tr></table></td><td>24</td><td>[1, 2, 12, 50, 94, 84]</td><td><table><tr><td>g</td><td>0</td><td>0</td><td>a</td><td>a</td></tr><tr><td>0</td><td>b</td><td>0</td><td>0</td><td>d</td></tr><tr><td>0</td><td>0</td><td>b</td><td>0</td><td>b</td></tr><tr><td>0</td><td>0</td><td>0</td><td>b</td><td>d</td></tr></table></td><td>24</td><td>[1, 2, 12, 50, 94, 84]</td></tr></tbody></table>

For length 5 and type {1,3}, we have

$$ \sum_C \frac{1}{|Aut(C)|} = 1.125 \neq \frac{\mathcal{N}_{\text{QSO}}(n, k_1, k_2)}{2^n n!} = 1.2, $$

where the summation bears on representatives of the equivalence classes of codes constructed by our propagation rules.

Next, we use our build-up construction methods to obtain SO, QSD and SD codes over $I_3$. The partial classification results are summarized in Table 3 below.

<table><caption>**Table 3.** Classification of SO, QSD 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">(b)</td><td>Theorem 4</td><td rowspan="2">4</td><td>(1)</td><td>1</td><td>[1, 2, 0, 8, 16]</td></tr><tr><td>Theorem 6</td><td>(2)</td><td>1</td><td>[1, 8, 24, 32, 16]</td></tr><tr><td rowspan="4">2</td><td rowspan="4">(b 0<br>0 b)</td><td>Theorem 4</td><td>5</td><td>(10)</td><td>1</td><td>[1, 4, 4, 8, 32, 32]</td></tr><tr><td>Theorem 6</td><td>5</td><td>(02)</td><td>1</td><td>[1, 10, 40, 80, 80, 32]</td></tr><tr><td>Theorem 7</td><td>6</td><td>(11), (12)</td><td>1</td><td>[1, 4, 4, 32, 176, 320, 192]</td></tr><tr><td>Corollary 4</td><td>5</td><td>(12)</td><td>1</td><td>[1, 6, 14, 38, 96, 88]</td></tr></tbody></table>
<table><caption>Table 3. *Cont.*</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="7">3</td><td rowspan="7">(b 0 0<br>0 b 0<br>0 0 b)</td><td>Theorem 4</td><td>6</td><td>(002)</td><td>1</td><td>[1, 12, 60, 160, 240, 192, 64]</td></tr><tr><td>Corollary 4</td><td>6</td><td>(100)</td><td>1</td><td>[1, 8, 26, 66, 172, 280, 176]</td></tr><tr><td>Theorem 6</td><td>6</td><td>(112)</td><td>1</td><td>[1, 12, 60, 160, 240, 192, 64]</td></tr><tr><td>Theorem 7</td><td>7</td><td>(202), (102)</td><td>1</td><td>[1, 6, 12, 40, 240, 672, 832, 384]</td></tr><tr><td>(a a a)</td><td>Theorem 4</td><td>6</td><td>(010)<br>(002)</td><td>2<br>3</td><td>[1, 0, 2, 20, 30, 28, 162]<br>[1, 0, 0, 16, 0, 0, 64]</td></tr><tr><td>(c a a)</td><td>Theorem 4</td><td>6</td><td>(010)<br>(002)</td><td>2<br>3</td><td>[1, 0, 2, 20, 30, 28, 162]<br>[1, 0, 0, 16, 0, 0, 64]</td></tr><tr><td>(g a a)</td><td>Theorem 4</td><td>6</td><td>(010)<br>(002)</td><td>2<br>3</td><td>[1, 0, 2, 20, 30, 28, 162]<br>[1, 0, 0, 16, 0, 0, 64]</td></tr><tr><td rowspan="3">(a c g)</td><td>Theorem 4</td><td>6</td><td>(100)<br>(002)</td><td>2<br>3</td><td>[1, 0, 2, 20, 30, 28, 162]<br>[1, 0, 0, 16, 0, 0, 64]</td></tr><tr><td>Corollary 4</td><td>6</td><td>(100)</td><td>2</td><td>[1, 0, 2, 20, 30, 28, 162]</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td rowspan="7">(a a a<br>0 0 b)</td><td>Theorem 4</td><td>6</td><td>(010)<br>(200)<br>(001)</td><td>1<br>1<br>1</td><td>[1, 2, 2, 30, 16, 16, 176]<br>[1, 4, 8, 52, 92, 88, 484]<br>[1, 2, 6, 44, 94, 126, 456]</td></tr><tr><td>Corollary 4</td><td>6</td><td>(110)<br>(120)<br>(011)</td><td>1<br>1<br>1</td><td>[1, 4, 8, 52, 92, 88, 484]<br>[1, 2, 6, 92, 166, 162, 300]<br>[1, 2, 6, 44, 94, 126, 456]</td></tr><tr><td>Theorem 6</td><td>6</td><td>(120)<br>(001)<br>(121)<br>(111)</td><td>1<br>1<br>1<br>1</td><td>[1, 2, 20, 78, 178, 286, 164]<br>[1, 8, 26, 48, 64, 518, 0]<br>[1, 2, 20, 60, 70, 70, 506]<br>[1, 8, 26, 66, 172, 280, 176]</td></tr><tr><td>Theorem 7</td><td>7</td><td>(110), (120)</td><td>1</td><td>[1, 2, 2, 54, 112, 160, 800, 1056]</td></tr><tr><td>(c a a<br>0 0 b)</td><td>Theorem 4</td><td>6</td><td>(010)<br>(200)<br>(001)</td><td>1<br>1<br>1</td><td>[1, 2, 2, 30, 16, 16, 176]<br>[1, 4, 8, 52, 92, 88, 484]<br>[1, 2, 6, 44, 94, 126, 456]</td></tr><tr><td>Corollary 4</td><td>6</td><td>(110)<br>(120)<br>(011)</td><td>1<br>1<br>1</td><td>[1, 4, 8, 52, 92, 88, 484]<br>[1, 2, 6, 92, 166, 162, 300]<br>[1, 2, 6, 44, 94, 126, 456]</td></tr><tr><td>Theorem 6</td><td>6</td><td>(012)<br>(001)<br>(121)<br>(111)</td><td>1<br>1<br>1<br>1</td><td>[1, 2, 20, 78, 178, 286, 164]<br>[1, 8, 26, 48, 64, 64, 518]<br>[1, 2, 20, 60, 70, 70, 506]<br>[1, 8, 26, 66, 172, 280, 176]</td></tr><tr><td>Theorem 7</td><td>7</td><td>(110), (120)<br>(102), (101)</td><td>1<br>1</td><td>[1, 2, 2, 54, 112, 160, 800, 1056]<br>[1, 2, 6, 44, 94, 126, 0, 456]</td></tr></tbody></table>
<table><caption>Table 3. *Cont.*</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="6">3</td><td rowspan="3">(a a a a)<br>0 b d</td><td rowspan="3">Theorem 4</td><td rowspan="3">6</td><td>(010)</td><td>1</td><td>[1, 2, 2, 30, 16, 16, 176]</td></tr><tr><td>(200)</td><td>1</td><td>[1, 4, 8, 52, 92, 88, 484]</td></tr><tr><td>(001)</td><td>1</td><td>[1, 2, 6, 44, 94, 126, 456]</td></tr><tr><td rowspan="4">(a a a a)<br>0 b d</td><td>Theorem 6</td><td>6</td><td>(111)</td><td>1</td><td>[1, 6, 18, 64, 192, 288, 160]</td></tr><tr><td rowspan="3">Corollary 4</td><td rowspan="3">6</td><td>(011)</td><td>2</td><td>[1, 0, 30, 40, 90, 60, 508]</td></tr><tr><td>(011)</td><td>2</td><td>[1, 0, 12, 40, 90, 132, 454]</td></tr><tr><td>(012)</td><td>1</td><td>[1, 2, 8, 90, 160, 172, 296]</td></tr><tr><td>Theorem 7</td><td>7</td><td>(110), (120)</td><td>2</td><td>[1, 0, 6, 52, 48, 192, 928, 960]</td></tr><tr><td rowspan="4">(c a a a)<br>0 b d</td><td>Theorem 4</td><td>6</td><td>(110)</td><td>1</td><td>[1, 2, 2, 30, 16, 16, 176]</td></tr><tr><td>Theorem 6</td><td>6</td><td>(100)</td><td>1</td><td>[1, 4, 8, 52, 92, 88, 484]</td></tr><tr><td>Corollary 4</td><td>6</td><td>(111)</td><td>1</td><td>[1, 6, 18, 64, 192, 288, 160]</td></tr><tr><td>Theorem 7</td><td>7</td><td>(011)</td><td>2</td><td>[1, 0, 12, 40, 90, 132, 454]</td></tr><tr><td rowspan="6">4</td><td rowspan="6">(b 0 0 0)<br>0 b 0 0<br>0 0 b 0<br>0 0 0 b</td><td>Theorem 4</td><td>6</td><td>(100)</td><td>1</td><td>[1, 2, 8, 54, 52, 172, 440]</td></tr><tr><td>Theorem 6</td><td>6</td><td>(020)<br>(002)</td><td>2<br>2</td><td>[1, 0, 6, 28, 0, 48, 160]<br>[1, 0, 12, 40, 90, 132, 454]</td></tr><tr><td>Corollary 4</td><td>6</td><td>(111)<br>(011)<br>(011)<br>(012)</td><td>1<br>2<br>2<br>1</td><td>[1, 6, 18, 64, 192, 288, 160]<br>[1, 0, 30, 40, 90, 60, 508]<br>[1, 0, 12, 40, 90, 132, 454]<br>[1, 2, 8, 90, 160, 172, 296]</td></tr><tr><td>Theorem 7</td><td>7</td><td>(0110), (1001)</td><td>1</td><td>[1, 8, 24, 64, 320, 1152, 2176, 2048, 768]</td></tr><tr><td>Theorem 4</td><td>7</td><td>(1000)<br>(1122)<br>(1212)</td><td>3<br>4<br>3</td><td>[1, 0, 0, 16, 0, 0, 64, 0]<br>[1, 0, 0, 0, 8, 8, 16, 48]<br>[1, 0, 0, 8, 0, 0, 24, 48]</td></tr><tr><td>Corollary 4</td><td>7</td><td>(1100)<br>(1000)<br>(1212)<br>(1122)</td><td>2<br>2<br>2<br>2</td><td>[1, 0, 2, 6, 16, 16, 68, 134]<br>[1, 0, 2, 20, 30, 28, 162, 0]<br>[1, 0, 2, 10, 16, 4, 76, 134]<br>[1, 0, 2, 3, 10, 40, 54, 134]</td></tr><tr><td rowspan="2">(a 0 a a)</td><td>Theorem 4</td><td>7</td><td>(1000)<br>(1121)</td><td>3<br>3</td><td>[1, 0, 0, 16, 0, 0, 64, 0]<br>[1, 0, 0, 8, 0, 0, 24, 48]</td></tr><tr><td>Corollary 4</td><td>7</td><td>(1100)<br>(1000)<br>(1122)</td><td>2<br>2<br>2</td><td>[1, 0, 2, 6, 16, 16, 68, 134]<br>[1, 0, 2, 20, 30, 28, 162, 0]<br>[1, 0, 2, 10, 16, 4, 76, 134]</td></tr></tbody></table>
<table><caption>Table 3. *Cont.*</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="10">4</td><td rowspan="10">(g 0 a a)</td><td>Theorem 4</td><td>7</td><td>(1000)<br>(1122)<br>(1212)</td><td>3<br>3<br>3</td><td>[1, 0, 0, 16, 0, 0, 64, 0]<br>[1, 0, 0, 2, 0, 12, 24, 42]<br>[1, 0, 0, 2, 6, 0, 30, 42]</td></tr><tr><td>Corollary 5</td><td>7</td><td>(1100)<br>(1000)<br>(1122)</td><td>2<br>2<br>2</td><td>[1, 0, 2, 6, 16, 16, 68, 134]<br>[1, 0, 2, 20, 30, 28, 162, 0]<br>[1, 0, 2, 4, 10, 22, 82, 122]</td></tr><tr><td rowspan="4">(a b a a)</td><td>Theorem 4</td><td>7</td><td>(1000)<br>(1122)</td><td>3<br>3</td><td>[1, 0, 0, 10, 6, 0, 16, 48]<br>[1, 0, 0, 2, 0, 12, 24, 42]</td></tr><tr><td>Corollary 4</td><td>7</td><td>(1100)<br>(1000)<br>(1122)</td><td>2<br>2<br>2</td><td>[1, 0, 2, 6, 16, 16, 68, 134]<br>[1, 0, 2, 14, 24, 28, 42, 132]<br>[1, 0, 2, 4, 10, 22, 82, 122]</td></tr><tr><td rowspan="4">(a 0 a a)<br>(0 b 0 0)</td><td>Theorem 4</td><td>7</td><td>(1000)<br>(1122)</td><td>1<br>3</td><td>[1, 2, 0, 16, 32, 0, 64, 128]<br>[1, 0, 0, 4, 14, 36, 52, 136]</td></tr><tr><td>Corollary 4</td><td>7</td><td>(1212)<br>(1000)<br>(1212)<br>(1122)</td><td>3<br>1<br>2<br>2</td><td>[1, 0, 0, 8, 14, 24, 60, 136]<br>[1, 1, 2, 24, 70, 88, 218, 324]<br>[1, 0, 4, 14, 52, 50, 228, 380]<br>[1, 0, 2, 16, 22, 112, 196, 380]</td></tr><tr><td rowspan="4">(a 0 a a)<br>(0 b b 0)</td><td>Theorem 4</td><td>7</td><td>(1000)<br>(1122)</td><td>2<br>2</td><td>[1, 0, 2, 18, 14, 16, 80, 112]<br>[1, 0, 4, 0, 22, 14, 68, 134]</td></tr><tr><td>Corollary 4</td><td>7</td><td>(1212)<br>(1000)<br>(1212)<br>(1122)</td><td>2<br>2<br>2<br>2</td><td>[1, 0, 2, 10, 16, 4, 76, 134]<br>[1, 0, 4, 24, 54, 92, 260, 294]<br>[1, 0, 6, 14, 44, 54, 234, 376]<br>[1, 0, 8, 6, 32, 82, 236, 364]</td></tr><tr><td rowspan="2">(a 0 a a)<br>(0 b b d)</td><td>Theorem 4</td><td>7</td><td>(1100)<br>(0012)</td><td>2<br>2</td><td>[1, 0, 4, 18, 42, 74, 194, 396]<br>[1, 0, 2, 42, 110, 160, 218, 196]</td></tr><tr><td>Corollary 4</td><td>7</td><td>(1000)<br>(1122)</td><td>3<br>3</td><td>[1, 0, 0, 22, 12, 0, 112, 96]<br>[1, 0, 0, 4, 12, 24, 82, 120]</td></tr><tr><td rowspan="4">(a 0 a a)<br>(0 b b 0)</td><td>Theorem 4</td><td>7</td><td>(1122)<br>(1212)</td><td>3<br>3</td><td>[1, 0, 0, 16, 12, 0, 82, 132]<br>[1, 0, 2, 30, 50, 88, 266, 292]</td></tr><tr><td>Corollary 4</td><td>7</td><td>(1000)<br>(1212)<br>(1122)<br>(1100)</td><td>2<br>2<br>2<br>2</td><td>[1, 0, 2, 10, 28, 76, 274, 338]<br>[1, 0, 2, 24, 38, 52, 236, 376]<br>[1, 0, 2, 12, 26, 106, 212, 370]</td></tr><tr><td rowspan="4">(a b a a)<br>(0 0 b 0)</td><td>Theorem 4</td><td>7</td><td>(1000)<br>(1122)</td><td>1<br>2</td><td>[1, 2, 2, 12, 34, 16, 32, 144]<br>[1, 0, 2, 4, 10, 22, 82, 122]</td></tr><tr><td>Corollary 4</td><td>7</td><td>(1212)<br>(1100)</td><td>2<br>1</td><td>[1, 0, 2, 10, 16, 4, 76, 134]<br>[1, 2, 0, 2, 12, 36, 54, 136]</td></tr><tr><td rowspan="4">(a b a a)<br>(0 0 b 0)</td><td>Theorem 4</td><td>7</td><td>(1000)<br>(1122)</td><td>1<br>2</td><td>[1, 2, 6, 26, 76, 126, 96, 396]<br>[1, 0, 2, 10, 40, 76, 238, 362]</td></tr><tr><td>Corollary 4</td><td>7</td><td>(1212)<br>(1122)<br>(1100)</td><td>2<br>2<br>1</td><td>[1, 0, 4, 18, 42, 56, 230, 378]<br>[1, 0, 2, 12, 30, 74, 254, 354]<br>[1, 2, 2, 8, 26, 100, 228, 362]</td></tr></tbody></table>
<table><caption>Table 3. *Cont.*</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="6">4</td><td rowspan="6">(a 0 a a<br>0 b 0 0<br>0 0 b 0)</td><td rowspan="3">Theorem 4</td><td rowspan="3">7</td><td>(1000)</td><td>1</td><td>[1, 4, 6, 34, 76, 48, 208, 352]</td></tr><tr><td>(1122)</td><td>2</td><td>[1, 0, 4, 10, 38, 80, 226, 370]</td></tr><tr><td>(1212)</td><td>2</td><td>[1, 0, 4, 14, 52, 50, 228, 380]</td></tr><tr><td rowspan="3">Corollary 4</td><td rowspan="3">7</td><td>(1000)</td><td>1</td><td>[1, 4, 10, 56, 182, 314, 708, 912]</td></tr><tr><td>(1212)</td><td>2</td><td>[1, 0, 8, 36, 74, 244, 800, 1024]</td></tr><tr><td>(1122)</td><td>2</td><td>[1, 0, 10, 32, 124, 206, 732, 1082]</td></tr><tr><td rowspan="3">Theorem 6</td><td rowspan="3">7</td><td>(1000)</td><td>1</td><td>[1, 4, 6, 34, 76, 48, 208, 352]</td></tr><tr><td>(2112)</td><td>2</td><td>[1, 0, 2, 4, 10, 22, 82, 122]</td></tr><tr><td>(2222)</td><td>1</td><td>[1, 2, 2, 18, 58, 106, 242, 300]</td></tr><tr><td rowspan="6">(a 0 a a<br>0 b 0 0<br>0 0 b 0)</td><td rowspan="6">Theorem 7</td><td rowspan="6">8</td><td>(0110), (1001)</td><td>1</td><td>[1, 4, 10, 52, 136, 322, 1324, 2776, 1936]</td></tr><tr><td>(0110), (0120)</td><td>1</td><td>[1, 4, 6, 58, 220, 384, 1120, 2656, 2112]</td></tr><tr><td>(1020), (0102)</td><td>1</td><td>[1, 2, 28, 98, 174, 970, 2816, 0, 2472]</td></tr><tr><td>(0202), (1010)</td><td>1</td><td>[1, 2, 46, 170, 354, 1276, 2744, 1968, 0]</td></tr><tr><td>(1002), (0110)</td><td>2</td><td>[1, 0, 14, 40, 60, 320, 958, 2424, 2744]</td></tr><tr><td>(2001), (0210)</td><td>2</td><td>[1, 0, 8, 46, 66, 356, 1006, 2202, 2876]</td></tr><tr><td rowspan="6">(a 0 a a<br>0 b 0 b<br>0 0 b b)</td><td rowspan="3">Theorem 4</td><td rowspan="3">7</td><td>(1000)</td><td>1</td><td>[1, 2, 6, 40, 56, 48, 256, 320]</td></tr><tr><td>(1122)</td><td>1</td><td>[1, 2, 4, 8, 30, 86, 234, 364]</td></tr><tr><td>(1212)</td><td>2</td><td>[1, 0, 2, 24, 38, 52, 236, 376]</td></tr><tr><td rowspan="3">Corollary 4</td><td rowspan="3">7</td><td>(1112)</td><td>1</td><td>[1, 2, 6, 34, 44, 12, 226, 404]</td></tr><tr><td>(1000)</td><td>1</td><td>[1, 4, 12, 70, 160, 276, 784, 880]</td></tr><tr><td>(1212)</td><td>1</td><td>[1, 2, 12, 28, 62, 258, 808, 1016]</td></tr><tr><td rowspan="3">Theorem 6</td><td rowspan="3">7</td><td>(1122)</td><td>2</td><td>[1, 0, 6, 46, 108, 210, 736, 1080]</td></tr><tr><td>(1112)</td><td>1</td><td>[1, 4, 12, 52, 124, 168, 694, 1132]</td></tr><tr><td>(2000)</td><td>1</td><td>[1, 8, 30, 82, 176, 240, 646, 1004]</td></tr><tr><td rowspan="3">Theorem 7</td><td rowspan="3">8</td><td>(2121)</td><td>2</td><td>[1, 2, 30, 100, 170, 240, 628, 1016]</td></tr><tr><td>(0021)</td><td>1</td><td>[1, 2, 30, 118, 314, 672, 718, 332]</td></tr><tr><td>(1100), (1200)</td><td>1</td><td>[1, 2, 6, 64, 152, 288, 1312, 2816, 1920]</td></tr><tr><td rowspan="6">(1100), (0011)</td><td rowspan="6">(1001), (0110)</td><td rowspan="6">(2001), (0110)</td><td rowspan="6">(1010), (0101)</td><td rowspan="6">(1010), (0102)</td><td>2</td><td>[1, 0, 2, 58, 150, 344, 1318, 2712, 1976]</td></tr><tr><td>1</td><td>[1, 2, 6, 100, 188, 108, 1276, 3104, 1776]</td></tr><tr><td>1</td><td>[1, 2, 6, 46, 80, 108, 1006, 2888, 2424]</td></tr><tr><td>2</td><td>[1, 0, 2, 58, 150, 344, 1318, 2712, 1976]</td></tr><tr><td>2</td><td>[1, 0, 18, 100, 276, 720, 2338, 3108]</td></tr></tbody></table>
<table><caption>Table 3. *Cont.*</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="12">4</td><td rowspan="12">(a 0 a a<br>0 b 0 b<br>0 0 b d)</td><td rowspan="4">Theorem 4</td><td rowspan="4">7</td><td>(1000)</td><td>2</td><td>[1, 0, 12, 34, 42, 96, 208, 336]</td></tr><tr><td>(1122)</td><td>2</td><td>[1, 0, 12, 10, 60, 42, 196, 408]</td></tr><tr><td>(1212)</td><td>2</td><td>[1, 0, 6, 16, 36, 66, 226, 378]</td></tr><tr><td>(1112)</td><td>1</td><td>[1, 2, 4, 26, 12, 68, 252, 364]</td></tr><tr><td rowspan="4">Corollary 4</td><td rowspan="4">7</td><td>(1000)</td><td>2</td><td>[1, 0, 20, 54, 170, 322, 710, 910]</td></tr><tr><td>(1212)</td><td>2</td><td>[1, 0, 20, 30, 104, 232, 698, 1102]</td></tr><tr><td>(1122)</td><td>2</td><td>[1, 0, 14, 30, 110, 220, 734, 1078]</td></tr><tr><td>(1112)</td><td>1</td><td>[1, 4, 8, 42, 96, 190, 794, 1052]</td></tr><tr><td rowspan="2">Theorem 6</td><td rowspan="2">7</td><td>(2000)</td><td>2</td><td>[1, 0, 42, 70, 210, 210, 640, 1014]</td></tr><tr><td>(2121)</td><td>1</td><td>[1, 6, 24, 106, 342, 660, 712, 336]</td></tr><tr><td rowspan="4">Theorem 7</td><td rowspan="4">8</td><td>(1100), (1200)</td><td>2</td><td>[1, 0, 12, 58, 90, 384, 1408, 2592, 2016]</td></tr><tr><td>(1100), (0011)</td><td>2</td><td>[1, 0, 8, 58, 114, 368, 1372, 2640, 2000]</td></tr><tr><td>(2001), (0110)</td><td>1</td><td>[1, 4, 4, 16, 82, 208, 982, 2776, 2488]</td></tr><tr><td>(1010), (0102)</td><td>2</td><td>[1, 0, 18, 82, 168, 252, 1168, 3000, 1872]</td></tr><tr><td rowspan="12">(a 0 a a<br>0 b 0 0<br>0 0 b d)</td><td rowspan="4">Theorem 4</td><td rowspan="4">7</td><td>(1000)</td><td>1</td><td>[1, 2, 6, 40, 56, 48, 256, 320]</td></tr><tr><td>(1122)</td><td>2</td><td>[1, 0, 2, 16, 34, 76, 232, 368]</td></tr><tr><td>(1212)</td><td>2</td><td>[1, 0, 2, 24, 38, 52, 236, 376]</td></tr><tr><td>(1000)</td><td>2</td><td>[1, 2, 12, 64, 170, 312, 718, 908]</td></tr><tr><td rowspan="4">Corollary 4</td><td rowspan="4">7</td><td>(1000)</td><td>2</td><td>[1, 0, 8, 36, 74, 244, 800, 1024]</td></tr><tr><td>(1212)</td><td>2</td><td>[1, 0, 6, 46, 108, 210, 736, 1080]</td></tr><tr><td>(1122)</td><td>2</td><td>[1, 2, 30, 100, 170, 240, 628, 1016]</td></tr><tr><td>(2000)</td><td>1</td><td>[1, 8, 30, 100, 320, 672, 736, 320]</td></tr><tr><td rowspan="4">Theorem 6</td><td rowspan="4">7</td><td>(2001)</td><td>1</td><td>[1, 2, 6, 64, 152, 288, 1312, 2816, 1920]</td></tr><tr><td>(0021)</td><td>1</td><td>[1, 0, 2, 40, 78, 164, 1012, 2784, 2480]</td></tr><tr><td>(1100), (1200)</td><td>1</td><td>[1, 0, 10, 40, 192, 412, 1084, 2850, 1972]</td></tr><tr><td>(2001), (0110)</td><td>2</td><td>[1, 0, 2, 40, 78, 164, 1012, 2784, 2480]</td></tr><tr><td rowspan="4">Theorem 7</td><td rowspan="4">8</td><td>(1010), (0102)</td><td>2</td><td>[1, 0, 10, 40, 192, 412, 1084, 2850, 1972]</td></tr><tr><td>(1100), (0011)</td><td>3</td><td>[1, 0, 0, 34, 96, 0, 1024, 3072, 2304]</td></tr><tr><td>(2000)</td><td>1</td><td>[1, 2, 30, 100, 170, 240, 628, 1016]</td></tr><tr><td>(1122)</td><td>3</td><td>[1, 0, 0, 40, 48, 0, 256, 384]</td></tr><tr><td rowspan="4">Theorem 6</td><td rowspan="4">7</td><td>(1122)</td><td>3</td><td>[1, 0, 0, 16, 24, 72, 280, 336]</td></tr><tr><td>(1212)</td><td>3</td><td>[1, 0, 0, 16, 24, 72, 280, 336]</td></tr><tr><td>(1000)</td><td>2</td><td>[1, 0, 2, 48, 122, 196, 734, 1084]</td></tr><tr><td>(1212)</td><td>2</td><td>[1, 0, 4, 20, 70, 230, 924, 938]</td></tr><tr><td rowspan="4">Corollary 4</td><td rowspan="4">7</td><td>(1122)</td><td>2</td><td>[1, 0, 2, 48, 122, 196, 734, 1084]</td></tr><tr><td>(1000)</td><td>2</td><td>[1, 0, 2, 48, 122, 196, 734, 1084]</td></tr><tr><td>(1212)</td><td>2</td><td>[1, 0, 4, 20, 70, 230, 924, 938]</td></tr><tr><td>(1122)</td><td>2</td><td>[1, 0, 2, 48, 122, 196, 734, 1084]</td></tr></tbody></table>
<table><caption>Table 3. *Cont.*</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="4">4</td><td rowspan="4">(a 0 a a<br>0 a a e<br>0 0 b 0<br>0 0 0 b)</td><td>Theorem 9</td><td>8</td><td>(1100), (0011)</td><td>1</td><td>[1, 16, 112, 880, 5440, 1907, 83008, 222208, 200704]</td></tr><tr><td rowspan="3">Theorem 4</td><td rowspan="3">7</td><td>(1122)</td><td>1</td><td>[1, 4, 10, 68, 296, 872, 2118, 3192]</td></tr><tr><td>(1212)</td><td>1</td><td>[1, 4, 12, 124, 376, 600, 2188, 3256]</td></tr><tr><td>(1000)</td><td>1</td><td>[1, 8, 24, 256, 512, 192, 1984, 3584]</td></tr><tr><td rowspan="3">Corollary 4</td><td rowspan="3">7</td><td>(1000)</td><td>1</td><td>[1, 10, 42, 334, 1168, 1920, 6352, 9856]</td></tr><tr><td>(1212)</td><td>1</td><td>[1, 6, 24, 124, 648, 2550, 7606, 8724]</td></tr><tr><td>(1122)</td><td>1</td><td>[1, 4, 24, 190, 910, 2370, 6928, 9256]</td></tr></tbody></table>

## 5. Conclusions

In this study, we have derived and used propagation rules over a non-unital ring of order 9 to generate self-orthogonal, self-dual and quasi self-dual codes. Combining this generating technique with mass formulas, we have classified the three categories of codes above completely in length at most 3, and partially in length 4 and 5 up to monomial equivalence. Mass formula computations show that some codes in each category exist in lengths $n = 4, 5$ that cannot be constructed by the propagation rules we derived. It is a challenging open problem to complete the classification in these cases, either by deriving alternative propagation rules or by employing some other construction technique.

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

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

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

**Acknowledgments:** The Deanship of Scientific Research (DSR) at King Abdulaziz University (KAU), Jeddah, Saudi Arabia funded this project, under grant no. (KEP-PhD: 100-130-1443). The authors acknowledge the anonymous reviewers for their comments and suggestions to improve the presentation of this manuscript.

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

## References

1. Han, S.; Lee, H.; Lee, Y. Construction of self-dual codes over $\mathbb{F}_2 + u\mathbb{F}_2$. *Bull. Korean Math. Soc.* **2012**, *49*, 135–143. [CrossRef]

2. Kim, J.-L.; Lee, Y. Euclidean and hermitian self-dual MDS codes over large finite fields. *J. Comb. Theory Ser.* **2004**, *105*, 79–95. [CrossRef]

3. Kim, J.-L.; Lee, Y. An efficient construction of self-dual codes. *Bull. Korean Math. Soc.* **2015**, *52*, 915–923. [CrossRef]

4. Aguilar-Melchor, C.; Gaborit, P.; Kim, J.; Sok, L.; Solé, P. Classification of extremal and s-extremal binary self-dual codes of length 38. *IEEE Trans. Inf. Theory* **2012**, *58*, 2253–2262. [CrossRef]

5. Kim, J.-L.; Roe, Y.G. Construction of quasi self-dual codes over a commutative non-unital ring of order 4. In *Applicable Algebra in Engineering, Communication and Computing*; Springer: Berlin/Heidelberg, Germany, 2022. [CrossRef]

6. Alahmadi, A.; Alkathiry, A.; Altassan, A.; Bonnecaze, A.; Shoaib, H.; Solé, P. The build-up construction over a commutative non-unital ring. *Des. Codes Cryptogr.* **2022**, *90*, 3003–3010. [CrossRef]

7. Alahmadi, A.; Altassan, A.; Basaffar, W.; Bonnecaze, A.; Shoaib, H.; Solé, P. Quasi type IV codes over a non-unital ring. *Appl. Algebra Eng. Commun. Comput.* **2021**, *32*, 217–228. [CrossRef]

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

9. Kim, K.H.; Park, Y.H. The mass formula of self-orthogonal codes over GF($q$). *Korean J. Math.* **2017**, *25*, 201–209.
10. Pless, V. Number of isotropic subspaces in a finite geometry. In *Atti della Accademia Nazionale dei Lincei Rendiconti-Classe di Scienze Fisiche-Matematiche & Naturali*; Accad Nationale Lincei Ufficio Pubblicazioni: Via Della Lungara 10, Rome, Italy, 1965; Volume 39, pp. 418-421.

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

12. Alahmadi, A.; Alshuhail, A.; Solé, P. The mass formula for self-orthogonal and self-dual codes over a non-unitary commutative ring. *AIMS Math.* **2023**, *8*, 24367–24378. [CrossRef]

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

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

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

**Disclaimer/Publisher's Note:** The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.