1 Introduction

At the start of studies dealing with error-correcting codes, the focus was on the binary field \(\mathbb {F}_{2}\) and then on finite fields \(\mathbb {F}_{q}\), where q is a prime power. In the pioneer paper by Hammons et al. [8], it is shown that some important binary non-linear codes can be obtained as the Gray images of linear codes over \(\mathbb {Z}_{4}\). Therefore, the researchers have aimed to determine codes over finite rings. Recently, the codes over different alphabets have started to attract attention [2,3,4, 6, 7]. Some researchers have investigated the linear codes over R1 × R2 as R2-submodules of \(R_{1}^{\alpha } \times R_{2}^{\beta }\) for positive integers α and β, where R1 and R2 are two alphabets [2, 4, 6]. The linear codes over the ring \(\mathbb {F}_{2} \times (\mathbb {F}_{2}+v\mathbb {F}_{2})\) with v2 = v is studied by Çalışkan and Aksoy in [7]. They considered linear codes over the product ring \(\mathbb {F}_{2} \times (\mathbb {F}_{2}+v\mathbb {F}_{2})\) as \(\mathbb {F}_{2} \times (\mathbb {F}_{2}+v\mathbb {F}_{2})\)-submodules of \((\mathbb {F}_{2} \times (\mathbb {F}_{2}+v\mathbb {F}_{2}))^{n}\) for a positive integer n.

One significant and large class of codes is the class of self-dual codes. Therefore most coding theorists have been interested in constructing extremal binary self-dual codes. This interest comes from the relation between extremal binary self-dual codes and designs, lattices and modular forms [15]. There are some construction methods in the literature to obtain binary self-dual codes. Some of them are known as the double circulant construction, bordered double circulant construction, constructions with a specific automorphism group and building-up construction [1, 9,10,11, 13,14,15,16].

In this study, we deal with the direct product ring \(R:=\mathbb {F}_{2} \times (\mathbb {F}_{2}+v\mathbb {F}_{2})\) and focus on self-dual codes over R, where \(\mathbb {F}_{2}\) is the binary field and \(\mathbb {F}_{2}+v\mathbb {F}_{2}\) is a ring of order 4 with v2 = v. Here R is a commutative Frobenius ring with eight elements. We consider the duality relation using two different inner products. We apply the construction methods given in [12] to obtain self-dual codes over the ring R. We also analyze the binary images of self-dual codes over R.

In Section 2, we briefly remind some properties of R and the linear codes over R, which are mentioned in [7]. Also, we introduce Euclidean and Hermitian self-dual codes over this ring.

In Section 3, we find upper bounds on the minimum distance of a linear code over R. We investigate a generator matrix of the Gray image of a free linear code over this ring. Furthermore, we study what is required to construct free Euclidean and free Hermitian self-dual codes over this ring. We recall three construction methods known in the literature.

In Section 4, we construct free Euclidean and free Hermitian self-dual codes of even lengths over this ring. We seek the type of the Gray images of these self-dual codes. Then we tabulate the obtained results.

Finally, in the last section, we conclude our study with some remarks and other possible studies.

2 Self-dual codes over the ring R

In this section, we focus on self-dual codes over R. We first remind the algebraic properties of the ring R and the linear codes over R. Then we present the self-dual codes over R and give the results about these codes.

2.1 The ring R

In this subsection, we briefly mention the commutative principal ideal ring \(R= \mathbb {F}_{2} \times (\mathbb {F}_{2}+v\mathbb {F}_{2})\) with v2 = v, which is of characteristic 2. This ring is Boolean. It has eight ideals given as I(λ, μ) = 〈(λ, μ)〉 where \(\lambda \in \mathbb {F}_{2}\) and \(\mu \in \mathbb {F}_{2}+v\mathbb {F}_{2}\). We note that R is a finite non-chain ring. Also, R is not a local ring. Furthermore, it is a Frobenius ring since the Jacobson radical of R is J(R) = {(0,0)} and the socle of R is soc(R) = R.

Let r = (r1, r2 + vr3) and a = (α, β + vγ) be two elements of R. The scalar multiplication on R

$$ra=(r_{1}\alpha, r_{2}\beta+v(r_{3}\beta+(r_{2}+r_{3})\gamma))$$

can be extended to Rn as

$$r\textbf{a} =((r_{1}\alpha_{1}, r_{2}\beta_{1}+v(r_{3}\beta_{1}+(r_{2}+r_{3})\gamma_{1})),\ldots, (r_{1}\alpha_{n},r_{2}\beta_{n}+ v(r_{3}\beta_{n}+(r_{2}+r_{3})\gamma_{n}))),$$

where \(\textbf {a}=(a_{1}, \dots , a_{n}) \in R^{n}\) such that ai = (αi, βi + vγi) ∈ R for 1 ≤ in.

2.2 Linear codes over R

The structure of linear codes over R and two Gray maps defined from Rn to \(\mathbb {F}_{2}^{3n}\) are introduced in [7]. Now we recall some of the definitions and results given in [7]. Later, we present a generator matrix of a linear code which is permutation equivalent to a free linear code over R.

Definition 1

A linear code \(\mathcal {C}\) over R of length n is an R-submodule of Rn.

Let \(\mathcal {C}=(\mathcal {C}_{1}, \mathcal {C}_{2})\) be a code over R of length n. \(\mathcal {C}\) is permutation equivalent to \(\mathcal {C}_{1}\times \mathcal {C}_{2}\) where \(\mathcal {C}_{1}\) is a code over the field \(\mathbb {F}_{2}\) of length n and \(\mathcal {C}_{2}\) is a code over the ring \(\mathbb {F}_{2}+v\mathbb {F}_{2}\) of length n. Furthermore, \(\mathcal {C}\) is linear if and only if the codes \(\mathcal {C}_{1}\) and \(\mathcal {C}_{2}\) are linear (see [7] for more details).

Definition 2

A matrix whose rows generate a linear code is called a generator matrix of the linear code.

Any free linear code over R of length 2k is permutation equivalent to a linear code whose generator matrix is

$$[(I_{k},I_{k})|(X,Y+vZ)],$$

where

$$(I_{k},I_{k})= [t_{ij}]_{k \times k}$$

and

$$(X,Y+vZ)= [u_{ij}]_{k \times k}$$

such that tij = (δij, δij) with δij denoting the Kronecker delta function and uij = (αij, βij + vγij) ∈ R for 1 ≤ i, jk.

By an [n, k]-code over R we mean that this is a free linear code of length n and dimension k.

In coding theory, possible different weights for codes over rings, together with the Hamming weight, are considered. The minimum Lee weight and Gray weight for codes over R are defined in [7]. We recall these weights in the following.

Definition 3

Let (α, β + vγ) be an element in R. We define the Lee weight of the element (α, β + vγ) as \(w_{L}((\alpha , \beta +v\gamma ))=w_{H}(\alpha )+w_{L}^ \prime (\beta +v\gamma ),\) where wH(α) represents the ordinary Hamming weight of α in \(\mathbb {F}_{2}\) and \(w_{L}^ \prime (\beta +v\gamma )\) represents the Lee weight of the element β + vγ in \(\mathbb {F}_{2}+v\mathbb {F}_{2}\). Here \(w_{L}^ \prime (0)=0, \ w_{L}^ \prime (1)=2, \ w_{L}^ \prime (v)=1\) and \(w_{L}^ \prime (1+v)=1\).

Thus, we can easily see that the Lee weight of the element (0,0) is 0, the Lee weights of the elements (0, v),(0,1 + v) and (1,0) are 1, the Lee weights of the elements (0,1),(1, v) and (1, 1 + v) are 2 and the Lee weight of the element (1,1) is 3.

Definition 4

The Lee weight wL(a) of a word a in Rn is the rational sum of the Lee weights of its components and the minimum Lee weight \(w_{L}(\mathcal {C})\) of a code \(\mathcal {C}\) over R is the smallest non-zero Lee weight among all codewords of \(\mathcal {C}\).

Definition 5

The Lee distance dL(a, b) between a and b, words in Rn, is wL(ab). The minimum Lee distance of a code \(\mathcal {C}\) over R is

$$d_{L}(\mathcal{C})=\min \{d_{L}(\textbf{a}, \textbf{b}) | \text{for all} \textbf{a},\textbf{b} \in \mathcal{C}, \textbf{a} \neq \textbf{b}\}.$$

The Gray map φ1

$$ \varphi_{1} : R \rightarrow {\mathbb{F}}_{2}^{3}, \ \ \ \ (\alpha, \beta+v\gamma) \mapsto (\alpha, \beta, \beta+\gamma) $$

is extended to Rn as

$$ {\varPhi}_{1}((\boldsymbol{\alpha}, \boldsymbol{\beta} + v \boldsymbol{\gamma})) = (\boldsymbol{\alpha},\boldsymbol{\beta},\boldsymbol{\beta}+\boldsymbol{\gamma}), $$

where \(\boldsymbol {\alpha }, \boldsymbol {\beta }, \boldsymbol {\gamma } \in {\mathbb {F}}_{2}^{n}\). By using the Chinese remainder theorem, it can be obtained that φ1 is a ring isomorphism. We note that Φ1 is an \(\mathbb {F}_{2}\)-linear map. Also, it is distance preserving from Rn (Lee distance-dL) to \({\mathbb {F}}_{2}^{3n}\) (Hamming distance-dH).

Proposition 1

The Gray image \({\varPhi }_{1}(\mathcal {C})\) of a linear code \(\mathcal {C}\) over R of length n is a linear code over \(\mathbb {F}_{2}\) of length 3n.

We note that the Euclidean inner product on \((\mathbb {F}_{2}+v \mathbb {F}_{2})^{n}\) is defined as \( \langle \textbf {x},\textbf {y}\rangle _{E} = \sum \limits _{i=1}^{n}x_{i} y_{i}\), where the elements x = (x1, x2,..., xn) and y = (y1, y2,..., yn) are in \((\mathbb {F}_{2} + v \mathbb {F}_{2})^{n}\).

Definition 6

Let two elements a = (a1,…, an) and b = (b1,…, bn) be in Rn. The Euclidean inner product on Rn

$$\langle \textbf{a}, \textbf{b} \rangle = \sum\limits_{i=1}^{n} a_{i}b_{i}$$

can be defined by using the dot product on \(\mathbb {F}_{2}^{n}\) and the Euclidean inner product on \((\mathbb {F}_{2} + v \mathbb {F}_{2})^{n}\) as

$$ \langle (\boldsymbol{\alpha}, \boldsymbol{\beta}+v\boldsymbol{\gamma}),(\boldsymbol{\varepsilon}, \boldsymbol{\tau}+v\boldsymbol{\sigma}) \rangle = (\boldsymbol{\alpha} \cdot \boldsymbol{\varepsilon}, \langle \boldsymbol{\beta}+v\boldsymbol{\gamma}, \ \boldsymbol{\tau}+v\boldsymbol{\sigma} \rangle_{E}) $$

where \(\boldsymbol {\alpha }, \boldsymbol {\beta }, \boldsymbol {\gamma }, \boldsymbol {\varepsilon }, \boldsymbol {\tau }, \boldsymbol {\sigma } \in \mathbb {F}_{2}^{n}\).

Definition 7

The Euclidean dual code \(\mathcal {C}^{\perp }\) of a linear code \(\mathcal {C}\) over R of length n is

$$\mathcal{C}^{\perp} = \{\textbf{b} \in R^{n} | \ \langle \textbf{a}, \textbf{b} \rangle = (0,0) \ \text{for all}\ \textbf{a} \in \mathcal{C} \}.$$

Next we state the Gray weight on R, the minimum Gray weight and Gray distance for a code over R.

Definition 8

The Gray weight wG on R is given as wG(a) = 0 for a = (0,0), wG(a) = 1 for a = (1,1), (1, v), (1,1 + v), wG(a) = 2 for a = (0,1), (0, v), (0,1 + v) and wG(a) = 3 for a = (1,0).

Definition 9

The Gray weight wG(a) of a word a in Rn is the rational sum of the Gray weights of its components. The minimum Gray weight \(w_{G}(\mathcal {C})\) of a code \(\mathcal {C}\) over R is the smallest non-zero Gray weight among all codewords of \(\mathcal {C}\).

Definition 10

The Gray distance dG(a, b) between a and b, words in Rn, is wG(ab). The minimum Gray distance of a code \(\mathcal {C}\) over R is

$$d_{G}(\mathcal{C})=\min \{d_{G}(\textbf{a}, \textbf{b}) | \text{for all} \textbf{a},\textbf{b} \in \mathcal{C}, \textbf{a} \neq \textbf{b}\}.$$

The other Gray map

$$ \varphi_{2} : R \rightarrow {\mathbb{F}}_{2}^{3},\ \ \ \ (\alpha, \beta+v\gamma) \mapsto (\alpha+\beta, \alpha+\gamma, \alpha+\beta+\gamma) $$

is extended to Rn as

$$ {\varPhi}_{2}((\boldsymbol{\alpha}, \boldsymbol{\beta} + v \boldsymbol{\gamma})) = (\boldsymbol{\alpha} + \boldsymbol{\beta}, \boldsymbol{\alpha}+\boldsymbol{\gamma}, \boldsymbol{\alpha} + \boldsymbol{\beta} + \boldsymbol{\gamma}), $$

where \(\boldsymbol {\alpha }, \boldsymbol {\beta }, \boldsymbol {\gamma }\in {\mathbb {F}}_{2}^{n}\). We remark that Φ2 is an \(\mathbb {F}_{2}\)-linear map. Also, it is distance preserving from Rn (Gray distance-dG) to \({\mathbb {F}}_{2}^{3n}\) (Hamming distance-dH).

Proposition 2

The Gray image \({\varPhi }_{2}(\mathcal {C})\) of a linear code \(\mathcal {C}\) over R of length n is a linear code over \(\mathbb {F}_{2}\) of length 3n.

We note that the Hermitian inner product on \((\mathbb {F}_{2} + v \mathbb {F}_{2})^{n}\) is defined as \([\mathbf {x},\textbf {y}]_{H} =\sum \limits _{i=1}^{n}x_{i} \overline {{y}_{i}}\), where the elements x = (x1, x2,..., xn) and y = (y1, y2,..., yn) are in \((\mathbb {F}_{2} + v \mathbb {F}_{2})^{n}\) and \(\overline {0}=0\), \(\overline {1}=1\), \(\overline {v}=1+v\), \(\overline {1+v}=v\). In general \(\overline {a+vb}=(a+b)+vb\) for all \(a,b \in \mathbb {F}_{2}\).

Definition 11

Let two elements a = (a1,…, an) and b = (b1,…, bn) be in Rn. The Hermitian inner product on Rn

$$ [\textbf{a}, \textbf{b}] = \sum\limits_{i=1}^{n} a_{i}\overline{b_{i}},$$

where \(\overline {b_{i}}=\overline {(\varepsilon _{i}, \tau _{i}+v\sigma _{i})}=(\varepsilon _{i}, \tau _{i}+\sigma _{i}+v\sigma _{i})\) for all biR, can be defined by using the dot product on \(\mathbb {F}_{2}^{n}\) and the Hermitian inner product on \((\mathbb {F}_{2} + v \mathbb {F}_{2})^{n}\) as

$$[ (\boldsymbol{\alpha}, \boldsymbol{\beta}+v\boldsymbol{\gamma}),(\boldsymbol{\varepsilon}, \boldsymbol{\tau}+v\boldsymbol{\sigma})] = (\boldsymbol{\alpha} \cdot \boldsymbol{\varepsilon}, [ \boldsymbol{\beta}+v\boldsymbol{\gamma}, \ \boldsymbol{\tau}+v\boldsymbol{\sigma} ]_{H}),$$

where \(\boldsymbol {\alpha }, \boldsymbol {\beta },\boldsymbol {\gamma },\boldsymbol {\varepsilon }, \boldsymbol {\tau },\boldsymbol {\sigma } \in \mathbb {F}_{2}^{n}\).

Definition 12

The Hermitian dual code \(\mathcal {C}^{*}\) of a linear code \(\mathcal {C}\) over R of length n is

$$\mathcal{C}^{*} = \{\textbf{b} \in R^{n} | \ [ \textbf{a}, \textbf{b} ] = (0,0) \ \text{for all}\ \textbf{a} \in \mathcal{C}\}.$$

2.3 Self-dual codes over R

In this subsection we define the Euclidean and Hermitian self-dual codes over R. Also, we give the results about self-dual codes. We start with the following theorem:

Theorem 1

([7]) Let \(\mathcal {C}\) be a linear code over R and \(\mathcal {C}^{\perp }\) be the Euclidean dual code of \(\mathcal {C}\). We have then \({\varPhi }_{1}(\mathcal {C}^{\perp }) = ({\varPhi }_{1}(\mathcal {C}))^{\perp }\), where \(({\varPhi }_{1}(\mathcal {C}))^{\perp }\) is the dual code of the Gray image \({\varPhi }_{1}(\mathcal {C})\).

Definition 13

Let \(\mathcal {C}\) be a linear code over R. If \(\mathcal {C}\subseteq \mathcal {C}^{\perp }\), then \(\mathcal {C}\) is called Euclidean self-orthogonal. If \(\mathcal {C} = \mathcal {C}^{\perp }\), then \(\mathcal {C}\) is called Euclidean self-dual.

The following result is one of the key points to obtain binary self-dual codes.

Corollary 1

Let \(\mathcal {C}\) be a Euclidean self-dual code over R. The Gray image \({\varPhi }_{1}(\mathcal {C})\) is self-dual.

Proof

One can find the desired result from Theorem 1. □

Lemma 1

Suppose that \(\mathcal {C}=(\mathcal {C}_{1}, \mathcal {C}_{2})\) is a linear code over R. \(\mathcal {C}\) is Euclidean self-dual if and only if \(\mathcal {C}_{1}\) is a binary self-dual code and \(\mathcal {C}_{2}\) is a Euclidean self-dual code over \(\mathbb {F}_{2}+v\mathbb {F}_{2}\).

Proof

It can be obtained easily from Definition 6. □

Theorem 2

A Euclidean self-dual code \(\mathcal {C}\) over R of length n exists if and only if n is even.

Proof

We can obtain the result from Lemma 1 because self-dual codes over \(\mathbb {F}_{2}\) of length n exist if and only if n is even. □

Theorem 3

([7]) Let \(\mathcal {C}\) be a linear code over R and \(\mathcal {C}^{*}\) be the Hermitian dual code of \(\mathcal {C}\). We have then \({\varPhi }_{2}(\mathcal {C}^{*}) = ({\varPhi }_{2}(\mathcal {C}))^{\perp }\), where \(({\varPhi }_{2}(\mathcal {C}))^{\perp }\) is the dual of the Gray image \({\varPhi }_{2}(\mathcal {C})\).

Definition 14

Let \(\mathcal {C}\) be a linear code over R. If \(\mathcal {C} \subseteq \mathcal {C}^{*}\), then \(\mathcal {C}\) is called Hermitian self-orthogonal. If \(\mathcal {C} = \mathcal {C}^{*}\), then \(\mathcal {C}\) is called Hermitian self-dual.

By using Theorem 3 and Definition 11 the following results can be obtained in a similar way as in the Euclidean case.

Corollary 2

Let \(\mathcal {C}\) be a Hermitian self-dual code over R. The Gray image \({\varPhi }_{2}(\mathcal {C})\) is self-dual.

Lemma 2

Assume that \(\mathcal {C}=(\mathcal {C}_{1}, \mathcal {C}_{2})\) is a linear code over R. \(\mathcal {C}\) is Hermitian self-dual if and only if \(\mathcal {C}_{1}\) is a binary self-dual code and \(\mathcal {C}_{2}\) is a Hermitian self-dual code over \(\mathbb {F}_{2}+v\mathbb {F}_{2}\).

Theorem 4

A Hermitian self-dual code \(\mathcal {C}\) over R of length n exists if and only if n is even.

3 Construction of self-dual codes over R

In this section we present two upper bounds and define the generator matrix of the Gray image of a free linear code over R. Later, we give the necessary and sufficient conditions in order to obtain free Euclidean and free Hermitian self-dual codes over R. At the end of this section, we recall three construction methods known as the Double Circulant Method (DCM), the Bordered Double Circulant Method (BDCM) and the Symmetric Method (SM) to find self-dual codes over R, which are proved in [12].

Proposition 3

Suppose that \(\mathcal {C}=(\mathcal {C}_{1}, \mathcal {C}_{2})\) is a linear code over R. The minimum Lee weight of \(\mathcal {C}\) is

$$ d_{L}(\mathcal{C})= \min\ \{d_{H}(\mathcal{C}_{1}),d_{L}^{\prime}(\mathcal{C}_{2})\}, $$

where \(d_{H}(\mathcal {C}_{1})\) and \(d_{L}^{\prime }(\mathcal {C}_{2})\) indicate the minimum Hamming weight of \(\mathcal {C}_{1}\) and the minimum Lee weight of \(\mathcal {C}_{2}\), respectively.

Proof

Suppose that (α, β + vγ) is a non-zero codeword of \(\mathcal {C}=(\mathcal {C}_{1}, \mathcal {C}_{2})\), where both \(\alpha \in \mathcal {C}_{1}\) and \(\beta +v\gamma \in \mathcal {C}_{2}\) cannot be zero simultaneously. Since \(\mathcal {C}\) is linear, it contains the codewords (α,0), (0, β + vβ) and (0, v(β + γ)). The images of these codewords under the Gray map Φ1 are (α,0,0), (0, β,0) and (0,0, β + γ), respectively. Therefore, from Definition 3, we obtain the desired result. □

The following proposition implies that there is a connection between the generator matrix over R and the generator matrix over \(\mathbb {F}_{2}\).

Proposition 4

Assume \(\mathcal {C}\) is a free linear code over R of length 2k with a generator matrix which is permutation equivalent to G = [(Ik, Ik)|(X, Y + vZ)]. Then a generator matrix of the Gray image \({\varPhi }_{1}(\mathcal {C})\) is permutation equivalent to

$$ G^{\prime} =\left[\begin{array}{cccccc} I_{k} & 0 & 0 & X & 0 & 0 \\ 0 & I_{k} & 0 & 0 & Y & 0\\ 0 & 0 & I_{k} & 0 & 0 & Y+Z \end{array} \right]. $$

Proof

Since the minimal ideals of R are 〈(1,0)〉, 〈(0,1 + v)〉 and 〈(0, v)〉, we obtain

$$ G^{\prime}=\left[ \begin{array}{c} {\varPhi}_{1}((1,0)G) \\ {\varPhi}_{1}((0,1+v)G)\\ {\varPhi}_{1}((0,v)G) \end{array} \right] =\left[\begin{array}{cccccc} I_{k} & 0 & 0 & X & 0 & 0 \\ 0 & I_{k} & 0 & 0 & Y & 0\\ 0 & 0 & I_{k} & 0 & 0 & Y+Z \end{array} \right]. $$

Theorem 5

The matrix G = [(Ik, Ik)|(X, Y + vZ)] generates a Euclidean self-dual code over R of length 2k if and only if XXT = Ik, Y YT = Ik and Y ZT + ZYT + ZZT = 0, where the k × k matrices X, Y and Z are over \(\mathbb {F}_{2}\).

Proof

Let us assume that the code whose generator matrix is G = [(Ik, Ik)|(X, Y + vZ)] is Euclidean self-dual over R of length 2k. Then GGT = 0. Therefore

$$ \begin{array}{l} [(I_{k},I_{k})|(X,Y+vZ)]\cdot[(I_{k},I_{k})|(X,Y+vZ)]^{T} \\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ =(I_{k},I_{k})+(XX^{T},YY^{T} +v(YZ^{T}+ZY^{T}+ZZ^{T})) \\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ =(0,0). \end{array} $$

Hence XXT = Ik, Y YT = Ik and Y ZT + ZYT + ZZT = 0. Conversely, let XXT = Ik, Y YT = Ik and Y ZT + ZYT + ZZT = 0 be hold. Then we obtain GGT = 0. This implies that the code generated by G is Euclidean self-orthogonal. The number of rows of G is k and the number of columns of G is 2k. Therefore the code whose generator matrix is G is Euclidean self-dual over R of length 2k. □

The following is an example of Euclidean self-dual codes over R of length 4.

Example 1

Let \(X=\left [\begin {array}{cc} 1&0\\ 0&1 \end {array}\right ],\) \(Y=\left [\begin {array}{cc} 0&1\\ 1&0 \end {array}\right ]\) and \(Z=\left [\begin {array}{cc} 1&1\\ 1&1 \end {array}\right ]\) be three binary matrices. Then the conditions given in Theorem 5 are hold. Therefore the matrix

$$G=\left[\begin{array}{cc|cc} (1,1) & \ (0,0) \ & \ (1,v) \ & (0,1+v)\\ (0,0) & \ (1,1) \ & \ (0,1+v) \ & (1,v) \end{array}\right]$$

generates the [4,2]-Euclidean self-dual code over R with minimum Lee distance 2.

Proposition 5

Suppose \(\mathcal {C}=(\mathcal {C}_{1}, \mathcal {C}_{2})\) is a linear code over R. The minimum Gray weight of \(\mathcal {C}\) verifies

$$ d_{G}(\mathcal{C})\leq \min\ \{3d_{H}(\mathcal{C}_{1}),2d_{L}^{\prime}(\mathcal{C}_{2})\},$$

where \(d_{H}(\mathcal {C}_{1})\) denotes the minimum Hamming weight of \(\mathcal {C}_{1}\) and \(d_{L}^{\prime }(\mathcal {C}_{2})\) denotes the minimum Lee weight of \(\mathcal {C}_{2}\).

Proof

Suppose that (α, β + vγ) is a non-zero codeword of \(\mathcal {C}=(\mathcal {C}_{1}, \mathcal {C}_{2})\), where both \(\alpha \in \mathcal {C}_{1}\) and \(\beta +v\gamma \in \mathcal {C}_{2}\) cannot be zero simultaneously. Since \(\mathcal {C}\) is linear, it contains the codewords (α,0), (0, β + vβ) and (0, v(β + γ)). The images of these codewords under the Gray map Φ2 are (α, α, α), (β, β,0) and (0, β + γ, β + γ), respectively. Therefore, we obtain the desired result. □

Proposition 6

Assume that \(\mathcal {C}\) is a free linear code over R of length 2k with a generator matrix which is permutation equivalent to G = [(Ik, Ik)|(X, Y + vZ)]. Then a generator matrix of the Gray image \({\varPhi }_{2}(\mathcal {C})\) is permutation equivalent to

$$ G^{\prime} =\left[\begin{array}{cccccc} I_{k} & I_{k} & I_{k} & X & X & X \\ I_{k} & I_{k} & 0 & Y & Y & 0\\ 0 & I_{k} & I_{k} & 0 & Y+Z & Y+Z \end{array} \right]. $$

Proof

It can be obtained in a similar way as the proof of Proposition 4. □

Theorem 6

The matrix G = [(Ik, Ik)|(X, Y + vZ)] generates a Hermitian self-dual code over R of length 2k if and only if XXT = Ik, Y YT + Y ZT = Ik and Y ZT + ZYT = 0, where the k × k matrices X, Y and Z are over \(\mathbb {F}_{2}\).

Proof

Assume that the code whose generator matrix is G = [(Ik, Ik)|(X, Y + vZ)] is Hermitian self-dual over R of length 2k. Then \(G\cdot \overline {G}^{T}=0\). Hence

$$ \begin{array}{l} [(I_{k},I_{k})|(X,Y+vZ)]\cdot[(I_{k},I_{k})|(X,Y+Z+vZ)]^{T}\\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ =(I_{k},I_{k})+(XX^{T},YY^{T}+YZ^{T}+v(YZ^{T}+ZY^{T}))\\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ =(0,0). \end{array} $$

Therefore we have XXT = Ik, Y YT + Y ZT = Ik and Y ZT + ZYT = 0. Conversely, suppose XXT = Ik, Y YT + Y ZT = Ik and Y ZT + ZYT = 0 hold. Then it can be easily shown that the code whose generator matrix is G is Hermitian self-dual over R of length 2k. □

The next examples are illustrations of Hermitian self-dual codes over R of lengths 2 and 4, respectively.

Example 2

Let X = [1], Y = [1] and Z = [0] be three binary matrices. Then the conditions given in Theorem 6 are hold. Therefore the matrix G = [(1,1)|(1,1)] generates the following

$$ \begin{array}{l} \mathcal{C}=\{(0,0)(0,0),(1,1)(1,1),(0,1)(0,1),(0,v)(0,v),(1,0)(1,0), \\ \ \ \ \ \ \ \ \ \ \ (0,1+v)(0,1+v),(1,v)(1,v),(1,1+v)(1,1+v)\}. \end{array} $$

This code is Hermitian self-dual over R of length 2.

Example 3

Let \(X=\left [\begin {array}{cc} 1&0\\ 0&1 \end {array}\right ],\) \(Y=\left [\begin {array}{cc} 0&1\\ 1&0 \end {array}\right ]\) and \(Z=\left [\begin {array}{cc} 0&0\\ 0&0 \end {array}\right ]\) be three binary matrices. Then the conditions given in Theorem 6 are hold. Therefore the matrix

$$G=\left[\begin{array}{cc|cc} (1,1) & \ (0,0) \ & \ (1,0) \ & (0,1)\\ (0,0) & \ (1,1) \ & \ (0,1) \ & (1,0) \end{array}\right]$$

generates the [4,2]-Hermitian self-dual code over R with minimum Gray distance 4.

We use the following methods in order to obtain free Euclidean and free Hermitian self-dual codes over R. We recall here that a linear code is isodual if it is equivalent to its dual.

Theorem 7

([12]) Let A be a binary matrix and Ik be the k × k identity matrix, then the following assertions hold:

(DCM) If A is a circulant matrix, then the code whose generator matrix is [Ik|A] is isodual.

(BDCM) If A is a circulant matrix, then the code whose generator matrix is

$$ G=\left[ \begin{array}{c} \begin{array}{cccc} & & & \end{array} \\ \begin{array}{cccc} & & & \end{array} \\ \begin{array}{cccc} & & & \end{array} \\ \begin{array}{cccc} & {I}_{k} & & \end{array} \\ \begin{array}{cccc} & & & \end{array} \\ \begin{array}{cccc} & & & \end{array} \end{array} \left| \begin{array}{c} \underline{e}\\ g\\ .\\ .\\ .\\ g \end{array} \right| \begin{array}{c} \underline{ \begin{array}{ccccc} {f} & {.} & . & . & f \end{array} } \\ \begin{array}{cccc} & & & \end{array} \\ \begin{array}{cccc} & & & \end{array} \\ \begin{array}{cccc} & {A} & & \end{array} \\ \begin{array}{cccc} & & & \end{array} \\ \begin{array}{cccc} & & & \end{array} \end{array} \right],$$

is isodual provided f = g = 0 or both f and g are non-zero.

(SM) If A is a symmetric matrix, then the code whose generator matrix is [Ik|A] is isodual.

4 Computational results

Now we present the results that we obtained by using the Magma computer program [5]. We find some free Euclidean and free Hermitian self-dual codes over R of length n and binary self-dual codes of length 3n, where n is an even integer. In the methods DCM, BDCM and SM, we consider some lengths since we have wide search space and restrictive criterions for the matrices. We want to recall some concepts which lead to understand the data in the tables better. We note that an [n, k, d]-code is a binary linear code of length n, dimension k and minimum distance d. A binary self-dual code is called Type II if all codewords have weight ≡ 0 (mod 4) and Type I if some codewords have weight ≡ 2 (mod 4). The minimum weight d of a binary self-dual code of length n is bounded as follows:

$$ d \leq \left\{\begin{array}{cc} 4 \left[\frac{n}{24}\right]+4, & n \not \equiv 22~~~~(\text{mod}~24),\\ 4 \left[\frac{n}{24}\right]+6, & n \equiv 22~~~~(\text{mod}~24). \end{array}\right. $$

A self-dual code meeting the bound is called extremal. We refer to [15] for more information.

4.1 The free Euclidean self-dual codes over R

In order to apply the construction methods given in Theorem 7, we first search suitable matrices X, Y and Z that satisfy the conditions given in Theorem 5. Then, we obtain the minimum Lee weights of the free Euclidean self-dual codes over R of length n.

In Table 1, the minimum Lee weights of the free Euclidean self-dual codes over R of even lengths up to 20 obtained by using the DCM are given. The parameters and the type of the corresponding Gray images of the free Euclidean self-dual codes over R are also presented. In the table, dmax(n) denotes the upper bound on the minimum Lee weight of the self-dual code over R of length n, which is given in Proposition 3, and dDCM(n) denotes the highest minimum Lee weight of the free Euclidean self-dual code over R of length n obtained by using the DCM. The fourth column (Binary Image) is the parameters of the Gray images of the free Euclidean self-dual codes under the map Φ1 and the last column (Type) is the type of the binary self-dual codes.

Table 1 The free Euclidean self-dual codes over R obtained via the DCM

Using the BDCM, we seek the minimum Lee weights of the free Euclidean self-dual codes over R of even lengths up to 20. We observe that the minimum Lee weights are always 2. Since the Lee weight of a code over R corresponds to the Hamming weight of the binary image of the code under the Gray map Φ1, we can easily conclude that the binary images of the free Euclidean self-dual codes over R obtained via the BDCM are of Type I.

Applying the SM, we find the [8,4]-free Euclidean self-dual code over R with minimum Lee weight 4 whose Gray image is of Type II. Except this code, we obtain that the minimum Lee weights of the free Euclidean self-dual codes over R of even lengths up to 16 are 2 and the binary images of these codes under Φ1 are of Type I.

4.2 The free Hermitian self-dual codes over R

We use the construction methods given Theorem 7 in order to obtain free Hermitian self-dual codes over R of length n, where n is an even integer. By using suitable binary matrices X, Y and Z which hold the conditions given in Theorem 6, we find the minimum Gray weights of the free Hermitian self-dual codes over R.

In Table 2, we present the minimum Gray weights of the free Hermitian self-dual codes of even lengths up to 30 obtained via the DCM. The parameters and the type of the corresponding Gray images of the free Hermitian self-dual codes are also presented. In the table, dmax(n) denotes the upper bound on the minimum Gray weight of the self-dual code over R of length n, which is given in Proposition 5, and dDCM(n) denotes the highest minimum Gray weight of the free Hermitian self-dual code over R of length n obtained by using the DCM. The fourth column (Binary Image) is the parameters of the Gray images of the free Hermitian self-dual codes under the map Φ2 and the last column (Type) is the type of the binary self-dual codes. We indicate the extremal binary self-dual codes with the notation “”.

Table 2 The free Hermitian self-dual codes over R obtained via the DCM

Through the BDCM, we seek the minimum Gray weights and the Gray images of the free Hermitian self-dual codes of even lengths up to 20. In Table 3, we give the obtained results. In the table, dBDCM(n) is the highest minimum Gray weight of the free Hermitian self-dual code over R of length n obtained via the BDCM.

Table 3 The free Hermitian self-dual codes over R obtained via the BDCM

Using the SM, we look for the minimum Gray weights and the Gray images of the free Hermitian self-dual codes of even lengths up to 12 and we tabulate the results in Table 4. In the table, dSM(n) is the highest minimum Gray weight of the free Hermitian self-dual code over R of length n obtained by using the SM.

Table 4 The free Hermitian self-dual codes over R obtained via the SM

5 Conclusion

In coding theory, finding self-dual codes with higher minimum distances is one of the significant issues. The aim of this study is to seek the structure of self-dual codes over \(\mathbb {F}_{2} \times (\mathbb {F}_{2}+v\mathbb {F}_{2})\), and to obtain the minimum distances of free Euclidean and free Hermitian self-dual codes over \(\mathbb {F}_{2} \times (\mathbb {F}_{2}+v\mathbb {F}_{2})\) by using some known construction methods. Comparing our results for Euclidean self-dual codes over \(\mathbb {F}_{2} \times (\mathbb {F}_{2}+v\mathbb {F}_{2})\) with Hermitian self-dual codes over \(\mathbb {F}_{2} \times (\mathbb {F}_{2}+v\mathbb {F}_{2})\), one can clearly see that the free Hermitian self-dual codes have better minimum distance than the free Euclidean self-dual codes.

In light of the connections between self-dual codes over \(\mathbb {F}_{2} \times (\mathbb {F}_{2}+v\mathbb {F}_{2})\) and binary self-dual codes, which are found in Corollaries 1 and 2, binary self-dual codes can be obtained by considering different construction methods over \(\mathbb {F}_{2} \times (\mathbb {F}_{2}+v\mathbb {F}_{2})\).

The results found in the literature for codes over \(\mathbb {F}_{2}\) may be adaptable to codes over \(\mathbb {F}_{2} \times (\mathbb {F}_{2}+v\mathbb {F}_{2})\) as a different study subject. For example, cyclic codes can be studied over this ring. Another future research topic is the generalization from \(\mathbb {F}_{2} \times (\mathbb {F}_{2}+v\mathbb {F}_{2})\) to \(\mathbb {F}_{q} \times (\mathbb {F}_{q}+v\mathbb {F}_{q})\) with v2 = v, where q is a prime power.