1 Introduction

Coding theory, one of the most interesting areas of applied mathematics, was born almost simultaneously with the invention of modern computers - the beginning of the error-correcting code came from Claude Shannon’s paper “A mathematical theory of communication” in 1948, and Richard W. Hamming’s paper “Error detecting and error correcting codes” in 1950. These days, binary and nonbinary codes such as q-ary Hamming codes, the binary and ternary Golay codes, and q-ary Reed-Solomon codes are used in internet communication, GPS signals, mobile phones, and computer devices. It is well known that error-correcting codes are closely related to cryptography [7, 24]. Moreover, researchers have recently started investigating the relation between error-correcting codes and deep learning [3, 18].

On the other hand, self-dual codes have been the subject of much interest and are regarded as one of the most important classes of error-correcting codes. This is because of both theoretical reason and connections to various fields of mathematics such as designs [16], lattices [2], sphere-packings [9], and modular forms [4].

Among various research topics of self-dual codes, it has attained an extensive research effort to find a best code; here, best refers to having the greatest error correction ability as possible. The error correction capability of a code depends on the minimum distance. Thus, it is crucial to find a method to construct codes having the highest minimum distance. To this end, various techniques were studied involving circulant and bordered circulant matrices [5, 14] and quadratic double circulant matrices [12]. Recently, families of codes over rings have been used to construct self-dual codes over finite fields [10, 19].

Despite these efforts, there remain many codes to be found, missed by previous construction methods due to computational complexity. In particular, we hardly know about the optimal minimum distances of self-dual codes over finite fields of order \(\ge \) 5 and of lengths \(\ge \) 22. In this case, only the possible bounds of highest minimum distances are known so far. For example, in the case of codes over GF(11), the bounds of highest minimum distances of lengths \(\le \) 40 are known, as we can see in Table 4. Moreover, there is no information about the lower bound of the self-dual code of length 28.

In 1972, Vera Pless introduced Pless symmetry codes, as a generalization of ternary extended Golay code [22, 23]. Using this class of codes, Pless obtained many new optimal self-dual codes over GF(3). Three decades later, Gaborit presented a generalization of Pless symmetry codes to different fields, quadratic double circulant codes [12]. He also found many new self-dual codes over GF(4), GF(5), GF(7), and GF(9). We want to remark two things: one is that these two methods used particular symmetric matrices to construct self-dual codes. The other is that these methods have a limitation of lengths; the possible lengths of codes are limited to \(2n+2\) or 2n where n is a power of an odd prime. Thus, there needs a new method to fill the gap between these lengths. These are the main motivation of this paper.

If a self-dual code of length 2n over GF(q) has a standard generator matrix \(G=(I_n \mid A)\) where A is symmetric, it is called a symmetric self-dual code. In [8], we introduced a method of symmetric building-up construction. This method was to construct symmetric self-dual codes over GF(q) for \(q \equiv 1 \pmod 4\). In [8], we showed that this method provides an efficient way to construct all symmetric self-dual codes over GF(q), increasing lengths by two. Stimulated by this result, we have struggled to find a method when \(q \equiv 3 \pmod 4\). However, it is not easy to generalize the method in [8]. In [8], the square root of -1 plays the key role, but unfortunately, it is well-known that the square root of -1 does not exist in GF(q) for \(q \equiv 3 \pmod 4\). Nevertheless, we find two novel construction methods as follows :

  1. 1.

    Construction A Let \((I_n \mid A)\) be a generator matrix of a symmetric self-dual code of length 2n over GF(q) and assume that \(({\mathbf{x}}_n , {\mathbf{y}}_n)\) is a codeword satisfying \({\mathbf{x}}_n \cdot {\mathbf{y}}_n = 0\) and \({\mathbf{x}}_n \cdot {\mathbf{x}}_n=k\) such that \(-1\pm k\) are squares in GF(q). And let \(B= \left( \begin{matrix} \alpha {\mathbf{x}}_n + \beta {\mathbf{y}}_n \\ \beta {\mathbf{x}}_n - \alpha {\mathbf{y}}_n \end{matrix}\right) \) where \(\alpha ^2+\beta ^2 =-1\), \(E= \frac{1}{k} ( s {\mathbf{x}}_n^T {\mathbf{x}}_n + t {\mathbf{y}}_n^T {\mathbf{y}}_n - {\mathbf{x}}_n^T {\mathbf{y}}_n - {\mathbf{y}}_n^T {\mathbf{x}}_n)\) where \(s^2 = -1+k\) and \(t^2=-1-k\) and let \(D = -\frac{1}{k^2}B(A+E_1)B^T B B^T\). Then

    $$\begin{aligned} \left( \begin{array}{c|c|c|c} I_2 &{} O&{} D &{} B \\ O&{} I_n&{}B^T&{} A+E\\ \end{array}\right) \end{aligned}$$

    is a generator matrix of symmetric self-dual code of length \(2n+4\).

  2. 2.

    Construction B Let \((I_n \mid A)\) be a generator matrix of a symmetric self-dual code of length 2n over GF(q), let \(P={\left( {\begin{matrix} \alpha &{} \beta \\ \beta &{} -\alpha \end{matrix}}\right) } \) be a \(2 \times 2\) matrix such that \(P^2=-I_2\), and let a matrix \(M = \left( \begin{matrix} {\mathbf{x}}\\ \beta ^{-1} {\mathbf{x}}(A - \alpha I) \end{matrix}\right) \) for a vector \({\mathbf{x}}\) in \(GF(q)^n\). Assume that H is a \(2\times 2\) symmetric matrix satisfying \((H+P)(H-P)=-M M^T\) and \(H-P\) is non-singular. Then                   \( \left( \begin{array}{c|c|c|c} I_2 &{} O&{} H &{} M\\ O&{} I_n&{}M^T&{} A+M^T (H-P)^{-1} M\\ \end{array}\right) \) is a generator matrix of symmetric self-dual code of length \(2n+4\).

Using these methods, we obtain many new self-dual codes. Consequently, we improve the bounds on the minimum distances of self-dual codes. We revised these results in Table 1. In Table 1, new parameters are written in bold. Throughout this paper, \(d_{sym}\) denotes the highest minimum distance of a symmetric self-dual code over GF(p) and \(d_{sd}\) denotes the previously best-known minimum distance of self-dual codes over GF(p). More precisely, we give new self-dual codes with highest minimum weights: they are [32, 16, 12], [36, 18, 13], and [40, 20, 14] codes over GF(11), [36, 18, 14] and [40, 20, 15] codes over GF(19), and [32, 16, 12], [36, 18, 14], and [40, 20, 15] codes over GF(23). We also provide numbers of new symmetric self-dual codes, up to equivalence, in Table 2.

Table 1 The highest minimum distance \(d_{sym}\) of symmetric self-dual codes vs. previously best known minimum distance \(d_{sd}\) of self-dual codes [5, 8, 11,12,13, 15, 25]
Table 2 Numbers of new symmetric self-dual codes of length 32, 36 and 40

The paper is organized as follows. Section 2 gives preliminaries for self-dual codes over finite fields. In Sect. 3, we present two construction methods for symmetric self-dual codes over GF(q), where q is an odd prime power. In Sect. 4, we give the improved bounds of highest minimum distances and the computational results of the best codes obtained using our new methods. All computations in this paper have been done with the computer algebra system Magma [6]. We list all our codes with generator matrices in J.-L. Kim’s website [20].

We use the following notations throughout this paper.

Notations

q

A power of an odd prime number

GF(q)

Finite field of order q

\(d_{sym}\)

The highest minimum distance of symmetric self-dual codes

\(d_{sd}\)

The previous best known minimum distance of self-dual codes

\(I_n\)

The identity matrix of degree n

\([n,k,d]_q\) code

A linear code of length n and dimension k over GF(q) with minimum distance d

\(A^{-1}\)

The inverse of a matrix A

\(A^T\)

The transpose of a matrix A

2 Preliminaries

Let n be a natural number, and GF(q) be the finite field of order q where q is a prime power. A linear code \({\mathcal C}\) of length n and dimension k over GF(q) is a k-dimensional subspace of \(GF(q)^n\). An element of \({\mathcal C}\) is called a codeword. A generator matrix of \({\mathcal C}\) is a matrix whose rows form a basis of \({\mathcal C}\); therefore, a generator matrix of a linear code \({\mathcal C}\) of length n and dimension k over GF(q) is a \(k \times n\) matrix over GF(q). For vectors \({\mathbf{x}}= (x_i )\) and \({\mathbf{y}}=(y_i)\) in \(GF(q)^n\), we define the inner product \({\mathbf{x}}\cdot {\mathbf{y}}= \sum _{i=1}^{n} x_i y_i\). If vectors are identified with row matrices, the inner product can also be written as a matrix multiplication \({\mathbf{x}}\cdot {\mathbf{y}}={\mathbf{x}}{\mathbf{y}}^T\), where \({\mathbf{y}}^T\) denotes the transpose of \({\mathbf{y}}\). For a linear code \({\mathcal C}\), the dual code \({\mathcal C}^{\perp }\) is defined as a set of orthogonal vectors of \({\mathcal C}\), i.e.,

$$\begin{aligned} {\mathcal C}^{\perp }=\{{\mathbf{x}}\in GF(q)^n \mid {\mathbf{x}}\cdot {\mathbf{c}}=0 { for\,\,\, all\,\,\,\, {\mathbf{c}}\in {\mathcal C}} \}. \end{aligned}$$

A linear code \({\mathcal C}\) is called self-dual if \({\mathcal C}= {\mathcal C}^{\perp }\) and self-orthogonal if \({\mathcal C}\subset {\mathcal C}^{\perp }\).

The weight of a codeword \({\mathbf{c}}\) is the number of non-zero symbols in the codeword and denoted by \(wt({\mathbf{c}})\). The Hamming distance between two codewords \({\mathbf{x}}\) and \({\mathbf{y}}\) is defined by \(d({\mathbf{x}},{\mathbf{y}})=wt({\mathbf{x}}-{\mathbf{y}})\). The minimum distance of \({\mathcal C}\), denoted by \(d({\mathcal C})\), is the smallest Hamming distance between distinct codewords in \({\mathcal C}\). A measure for the error-correcting capability of a code is the minimum distance; thus, the minimum distance is regarded as the most important parameter of a code. If a code has the minimum distance that meets some upper bounds, it is called an optimal code. It is well-known [17, chapter 2.4.] that a linear code of length n and dimension k satisfy the Singleton bound,

$$\begin{aligned} d({\mathcal C}) \le n - k +1. \end{aligned}$$

A code that achieves the equality in the Singleton bound is called a maximum distance separable(MDS) code. Obviously, a self-dual code of length 2n over GF(q) is MDS if the minimum distance equals \(n+1\). Although every MDS code is optimal, the MDS conjecture shows that there exists an MDS self-dual code of length 2n over GF(q) only if \(2n \le q+1\) for odd q [1]. Therefore, if \(2n > q+1\), the minimum distance of self-dual code of length 2n over GF(q) is most likely upper bounded by n.

Let \(I_n\) be the identity matrix of order n and let \(A^T\) denote the transpose of a matrix A. It is well-known that a self-dual code \({\mathcal C}\) of length 2n over GF(q) is equivalent to a code with a standard generator matrix

$$\begin{aligned} \left( \begin{array}{c|c} I_{n}&A \end{array} \right) , \end{aligned}$$
(1)

where A is an \(n \times n\) matrix satisfying \(AA^T=-I_{n}\).

A matrix A is called symmetric if \(A^T=A\). If a self-dual code of length 2n over GF(q) has a standard generator matrix \(G=(I_n \mid A)\) where A is symmetric, it is called a symmetric self-dual code. Since the class of symmetric self-dual codes is a subclass of general self-dual codes, the bound on minimum distances of symmetric self-dual code may be different from that of self-dual codes. However, if a symmetric self-dual code has the same parameter as an optimal(resp. MDS) self-dual code, it is called an optimal (resp. MDS) symmetric self-dual code. If the minimum distance of a symmetric self-dual code meets the best known minimum distance of a self-dual code, it is called the best symmetric self-dual code.

In [22], Pless introduced Pless symmetry codes as a generalization of ternary extended Golay code and their construction method. As a result, Pless obtained optimal self-dual codes of length 24, 36, 48, and 60 over GF(3). Later in [12] Gaborit presented a generalization of Pless symmetry codes to different fields, quadratic double circulant codes and their construction method. Gaborit obtained many new self-dual codes over GF(4), GF(5), GF(7) and GF(9), and improved the bounds on the highest minimum distances. To use as a reference, we additionally obtain quadratic double circulant codes of lengths \(\le 40\) over various finite fields, following the same construction method in [12]. We present these codes in Table 3, following the same notations in [12].

Table 3 New quadratic double circulant codes over GF(q) obtained using methods in [12]

We remark that a self-dual code in the class of Pless symmetry codes or quadratic double circulant codes is equivalent to a symmetric self-dual code. In general, a pure double circulant self-dual code is equivalent to a symmetric self-dual code, and a bordered double circulant self-dual code is equivalent to a symmetric self-dual code under a certain condition. We discuss the equivalence between these codes in the next.

Let \(S_n\) be the symmetric group of order n and \({\mathbb D}^n\) be the set of diagonal matrices over GF(q) of order n,

$$\begin{aligned} {\mathbb D}^n=\{diag({\gamma }_i) \mid {\gamma }_i\in GF(q), {\gamma }_i^2=1\}. \end{aligned}$$

The group \({\mathcal M}^n\) of all \(\gamma \)-monomial transformations of length n is defined by

$$\begin{aligned} {\mathcal M}^n=\{p_{{\sigma }} \gamma \mid \gamma \in {\mathbb D}^n, {\sigma }\in S_n\} \end{aligned}$$

where \(p_{\sigma }\) is the permutation matrix corresponding \(\sigma \in S_n\). We note that a \(\gamma \)-monomial transformation preserves the self-orthogonality of a code (see [17, Thm 1.7.6]). Let \({\mathcal C}\tau =\{{\mathbf{c}}\tau \mid {\mathbf{c}}\in {\mathcal C}\}\) for an element \(\tau \) in \({\mathcal M}^{n}\) and a code \({\mathcal C}\) of length n. If there exists an element \(\mu \in {\mathcal M}^{n}\) such that \({\mathcal C}\mu ={\mathcal C}'\) for two distinct codes \({\mathcal C}\) and \({\mathcal C}'\), then \({\mathcal C}\) and \({\mathcal C}'\) are called equivalent and denoted by \({\mathcal C}\simeq {\mathcal C}'\) .

Proposition 1

Let \(G=( I_n \mid A )\) and \(G'=( I_n \mid B )\) be generator matrices of self-dual codes \({\mathcal C}\) and \({\mathcal C}'\) of length 2n, respectively. If \(A = \mu _1 B \mu _2\) for some \(\mu _1, \mu _2 \in {\mathcal M}^n\), then \({\mathcal C}\) and \({\mathcal C}'\) are equivalent.

Proof

For \(\mu =\left( \begin{array}{c|c} \mu _1^{-1} &{}O \\ O &{} \mu _2 \end{array}\right) \in {\mathcal M}^{2n}\),

$$\begin{aligned} ( I_n \mid A ) =( I_n \mid \mu _1 B \mu _2)=( \mu _1^{-1} \mid B \mu _2) = ( I_n \mid B ) \mu . \end{aligned}$$

Thus, \({\mathcal C}\) and \({\mathcal C}'\) are equivalent.

Corollary 1

Let \(I_n\) be the identity matrix of order n, A be an \(n\times n\) circulant matrix, B be an \((n-1)\times (n-1)\) circulant matrix. Then,

  1. (i)

    a pure double circulant code over GF(q) with a generator matrix of the form

    $$\begin{aligned} (I_n \mid A) \end{aligned}$$

    is equivalent to a code with symmetric generator matrix, and

  2. (ii)

    a bordered double circulant code over GF(q) with a generator matrix of the form

    $$\begin{aligned} \left( \begin{array}{ccc} &{} \alpha &{} \beta \cdots \beta \\ {{{{I_n}}}} &{} \gamma \beta &{}{{{{B}}}} \\ [-4ex] &{} \vdots &{} \\ [-0.5ex] &{} \gamma \beta &{} \end{array} \right) , \end{aligned}$$

    where \(\alpha \) and \(\beta \) are elements in GF(q) and \(\gamma ^2=1\), is equivalent to a code with symmetric generator matrix.

Proof

Let \(R_n\) be the \(n \times n\) anti-diagonal matrix whose anti-diagonal elements are all 1. Then it is clear that matrices \(A R_{n}\) and \(B R_{n-1}\) are symmetric. Thus, the corollary follows directly from Proposition 1.

Let \(S_{-1}\) be a set of solutions of the equation \(x^2 +y^2 =-1\) over GF(q). Then the cardinality of \(S_{-1}\) for an odd prime q is obtained in the next proposition.

Proposition 2

[21] Let GF(q) be a finite field of order q such that q is a power of an odd prime. The cardinality of the set

$$\begin{aligned} S_{-1}=\{(x,y)\in GF(q)^2\mid x^2+y^2+1=0\} \end{aligned}$$

is given by

$$\begin{aligned} |S_{-1}|=q-(-1)^{(q-1)/2}={\left\{ \begin{array}{ll} q-1, &{}{if q\equiv 1\pmod {4}},\\ q+1, &{}{if q\equiv 3\pmod 4}. \end{array}\right. } \end{aligned}$$

Similarly, we define a set \(S_{-I_2}\) of \(2 \times 2\) symmetric matrices over GF(q) satisfying the matrix equation \(X^2 + I_2 = 0\). We also obtain the cardinality of \(S_{-I_2}\) in the following corollary.

Corollary 2

Let \(K=GF(q)\) where q is a power of odd prime and let \(S_{-I_2}\) be a set of \(2 \times 2\) symmetric matrices over K such that

$$\begin{aligned} S_{-I_2}=\{P \in GL_2(K) \mid P^2=-I_2\}. \end{aligned}$$

Then, the cardinality of \(S_{-I_2}\) is given by

$$\begin{aligned} |S_{-I_2}|=q-(-1)^{( q-1)/2}={\left\{ \begin{array}{ll} q-1, &{}{if q\equiv 1\pmod {4}},\\ q+1, &{}{if q\equiv 3\pmod 4}. \end{array}\right. } \end{aligned}$$

Proof

The condition \(P^2=-I_2\) implies that \(P^{-1}= - P\). Since we assumed that P is symmetric, it is easy to show that matrix P is in the form \({\left( {\begin{matrix} \alpha &{} \beta \\ \beta &{} - \alpha \end{matrix}}\right) } \), where \((\alpha , \beta )\) is a solution of the equation \(x^2 +y^2 =-1\). Thus, the result follows with Proposition 2.

3 Construction method of symmetric self-dual codes

It is well-known that a self-dual over GF(q) of length n for \(q \equiv 1 {\pmod 4}\) exists if and only if \(n \equiv 0 {\pmod 2}\), and a self-dual over GF(q) of length n for \(q \equiv 3 {\pmod 4}\) exists if and only if \(n \equiv 0 {\pmod 4}\) [17, Theorem 9.1.3]. In [8], we have introduced a construction method for symmetric self-dual codes over GF(q) for \(q \equiv 1 \pmod 4\). In this section, we introduce two new construction methods for symmetric self-dual codes over GF(q) for \(q \equiv 3 \pmod 4\). These methods generate symmetric self-dual codes of lengths increased by four.

Theorem 1

(Construction method 1) Let \(G=(I_n \mid A)\) be a generator matrix of symmetric self-dual code \({\mathcal C}\) of length 2n over GF(q) for an odd prime power q. Assume that there exists a codeword \(({\mathbf{x}}_n , {\mathbf{y}}_n)\) in \({\mathcal C}\) satisfying \({\mathbf{x}}_n \cdot {\mathbf{y}}_n = 0\), \({\mathbf{x}}_n \cdot {\mathbf{x}}_n=k(\ne 0)\), and \(-1\pm k\) are squares in GF(q). Then, take an element \((\alpha , \beta )\) in \(S_{-1}\) and let \(B= \left( \begin{matrix} \alpha {\mathbf{x}}_n + \beta {\mathbf{y}}_n \\ \beta {\mathbf{x}}_n - \alpha {\mathbf{y}}_n \end{matrix}\right) \), \(E= \frac{1}{k} ( s {\mathbf{x}}_n^T {\mathbf{x}}_n + t {\mathbf{y}}_n^T {\mathbf{y}}_n - {\mathbf{x}}_n^T {\mathbf{y}}_n - {\mathbf{y}}_n^T {\mathbf{x}}_n)\) where \(s^2 = -1+k\) and \(t^2=-1-k\), and let \(D = -\frac{1}{k^2}B(A+E)B^T B B^T\). Then

$$\begin{aligned} G_1= (I_{n+2} \mid A_1)=\left( \begin{array}{c|c|c|c} I_2 &{} O&{} D &{} B \\ O&{} I_n&{}B^T&{} A+E\\ \end{array}\right) \end{aligned}$$

is a generator matrix of a symmetric self-dual code of length \(2n+4\).

Proof

Since the code \({\mathcal C}\) has the generator matrix \(G=(I_n \mid A)\), the vector \({\mathbf{x}}_n G = {\mathbf{x}}_n(I_n \mid A) = ({\mathbf{x}}_n,{\mathbf{y}}_n)\) is a codeword in \({\mathcal C}\) for any \({\mathbf{x}}_n\) in \(GF(q)^n\) and \({\mathbf{y}}_n = {\mathbf{x}}_nA\). Hence,

$${\mathbf{x}}_n \cdot {\mathbf{y}}_n=0 \Leftrightarrow {\mathbf{x}}_n ({\mathbf{x}}_nA)^T = {\mathbf{x}}_n A {\mathbf{x}}_n^T=0. $$

Therefore, if there exists a vector \({\mathbf{x}}_n\) which makes \({\mathbf{x}}_n A {\mathbf{x}}_n^T\) become zero for the matrix A, then we let \(({\mathbf{x}}_n,{\mathbf{y}}_n)= ({\mathbf{x}}_n, {\mathbf{x}}_nA)\) for the assumption in this theorem. If there is no vector \({\mathbf{x}}_n\) satisfying \({\mathbf{x}}_n A {\mathbf{x}}_n^T=0\), then we cannot apply this theorem on \({\mathcal C}\). It is obvious that the matrix \(A_1, A, D\), and E are symmetric. Thus, we have to show that

$$\begin{aligned} A_1 A_1^T=\left( \begin{array}{c|c} D &{} B \\ B^T&{} A+E\\ \end{array}\right) \left( \begin{array}{c|c} D^T &{} B \\ B^T&{} A^T+E^T\\ \end{array}\right) = -I_{n+2}. \end{aligned}$$

In other words, we have to show that following three identities hold :

$$\begin{aligned} D ^2 +B B^T&=-I_2, \end{aligned}$$
(2)
$$\begin{aligned} D B +B(A+E)&= O_{2\times n}, \end{aligned}$$
(3)
$$\begin{aligned} B^T B + (A+E)^2&=-I_n. \end{aligned}$$
(4)

Firstly, we verify the equality of (2). By the assumptions, we have that \(A^2 = -I_n\), \(\alpha ^2+\beta ^2=-1\) and \({\mathbf{x}}_n {\mathbf{x}}_n^T = k\). Since \(({\mathbf{x}}_n ,{\mathbf{y}}_n)\) is a codeword of a self-dual code \({\mathcal C}\), it is also clear that \({\mathbf{x}}_n {\mathbf{x}}_n^T + {\mathbf{y}}_n {\mathbf{y}}_n^T =0\) and \(({\mathbf{x}}_n, {\mathbf{y}}_n ) G^T = {\mathbf{x}}_n +{\mathbf{y}}_n A = O_n\). Thus, \({\mathbf{y}}_n {\mathbf{y}}_n^T =-k\), \({\mathbf{y}}_n A= -{\mathbf{x}}_n\) and \({\mathbf{x}}_n A = {\mathbf{y}}_n\) . By direct computations, we obtain that

$$\begin{aligned} B AB^T&= \left( \begin{matrix} \alpha {\mathbf{x}}_nA + \beta {\mathbf{y}}_nA \\ \beta {\mathbf{x}}_nA - \alpha {\mathbf{y}}_n A \end{matrix}\right) \left( \begin{matrix} \alpha {\mathbf{x}}_n + \beta {\mathbf{y}}_n \\ \beta {\mathbf{x}}_n - \alpha {\mathbf{y}}_n \end{matrix}\right) ^T\\&=\left( \begin{matrix} \alpha {\mathbf{y}}_n - \beta {\mathbf{x}}_n \\ \beta {\mathbf{y}}_n + \alpha {\mathbf{x}}_n \end{matrix}\right) \left( \begin{matrix} \alpha {\mathbf{x}}_n^T + \beta {\mathbf{y}}_n^T&\beta {\mathbf{x}}_n^T - \alpha {\mathbf{y}}_n^T \end{matrix}\right) \\&=\left( \begin{matrix} -2k\alpha \beta &{} k(\alpha ^2-\beta ^2) \\ k(\alpha ^2-\beta ^2) &{} 2k\alpha \beta \end{matrix}\right) ,\\ \end{aligned}$$

and

$$\begin{aligned} B EB^T&=\frac{1}{k} \left( \begin{matrix} \alpha {\mathbf{x}}_n + \beta {\mathbf{y}}_n \\ \beta {\mathbf{x}}_n - \alpha {\mathbf{y}}_n \end{matrix}\right) ( s {\mathbf{x}}_n^T {\mathbf{x}}_n + t {\mathbf{y}}_n^T {\mathbf{y}}_n - {\mathbf{x}}_n^T {\mathbf{y}}_n - {\mathbf{y}}_n^T {\mathbf{x}}_n) \left( \begin{matrix} \alpha {\mathbf{x}}_n + \beta {\mathbf{y}}_n \\ \beta {\mathbf{x}}_n - \alpha {\mathbf{y}}_n \end{matrix}\right) ^T\\&=\frac{1}{k} \left( \begin{matrix} k\alpha s {\mathbf{x}}_n -k\alpha {\mathbf{y}}_n -k\beta t {\mathbf{y}}_n +k \beta {\mathbf{x}}_n \\ k \beta s {\mathbf{x}}_n -k\beta {\mathbf{y}}_n + k \alpha t {\mathbf{y}}_n - k \alpha {\mathbf{x}}_n \end{matrix}\right) \left( \begin{matrix} \alpha {\mathbf{x}}_n^T + \beta {\mathbf{y}}_n^T&\beta {\mathbf{x}}_n^T - \alpha {\mathbf{y}}_n^T \end{matrix}\right) \\&=\left( \begin{matrix} k\alpha ^2 s + 2 k\alpha \beta + k\beta ^2 t &{} k\alpha \beta s +k\beta ^2 - k \alpha ^2 - k \alpha \beta t \\ k\alpha \beta s +k\beta ^2 - k \alpha ^2 - k \alpha \beta t &{}k\alpha ^2 t - 2 k\alpha \beta + k\beta ^2 s \end{matrix}\right) .\\ \end{aligned}$$

Therefore,

$$\begin{aligned} B(A+E)B^T =BAB^T+BEB^T =\left( \begin{matrix} k\alpha ^2 s + k\beta ^2 t &{} k\alpha \beta s - k \alpha \beta t \\ k\alpha \beta s - k \alpha \beta t &{}k\alpha ^2 t + k\beta ^2 s \end{matrix} \right) , \end{aligned}$$

and

$$\begin{aligned} D&= -\frac{1}{k^2} (B(A+E)B^T) B B^T \\ {}&= -\frac{1}{k} \left( \begin{matrix} \alpha ^2 s + \beta ^2 t &{} \alpha \beta s - \alpha \beta t \\ \alpha \beta s - \alpha \beta t &{}\alpha ^2 t + \beta ^2 s \end{matrix} \right) BB^T. \end{aligned}$$

Since \(B B^T= k \left( \begin{matrix} \alpha ^2 - \beta ^2 &{} 2 \alpha \beta \\ 2\alpha \beta &{} -\alpha ^2 + \beta ^2 \end{matrix}\right) ,\) we obtain

$$\begin{aligned} D&= -\left( \begin{matrix} \alpha ^2 s + \beta ^2 t &{} \alpha \beta s - \alpha \beta t \\ \alpha \beta s - \alpha \beta t &{}\alpha ^2 t + \beta ^2 s \end{matrix} \right) \left( \begin{matrix} \alpha ^2 - \beta ^2 &{} 2 \alpha \beta \\ 2\alpha \beta &{} -\alpha ^2 + \beta ^2 \end{matrix}\right) \\&=\left( \begin{matrix} \alpha ^2 s - \beta ^2 t &{} \alpha \beta (s +t) \\ \alpha \beta (s +t) &{}-\alpha ^2 t + \beta ^2 s \end{matrix} \right) . \end{aligned}$$

Hence,

$$\begin{aligned} D^2+ BB^T&=\left( \begin{matrix} \alpha ^2 s - \beta ^2 t &{}- \alpha \beta (s +t) \\ - \alpha \beta (s +t) &{}\alpha ^2 t - \beta ^2 s \end{matrix} \right) ^2 + k \left( \begin{matrix} \alpha ^2 - \beta ^2 &{} 2 \alpha \beta \\ 2\alpha \beta &{} -\alpha ^2 + \beta ^2 \end{matrix}\right) \\&=\left( \begin{matrix} -\alpha ^2 s^2 -\beta ^2 t^2 &{}-\alpha \beta ( s^2 - t^2) \\ -\alpha \beta ( s^2 - t^2) &{} -\alpha ^2 t^2 -\beta ^2s^2 \end{matrix} \right) + k \left( \begin{matrix} \alpha ^2 - \beta ^2 &{} 2 \alpha \beta \\ 2\alpha \beta &{} -\alpha ^2 + \beta ^2 \end{matrix}\right) \\&=\left( \begin{matrix} \alpha ^2 (k-s^2) -\beta ^2(k+ t^2) &{} \alpha \beta (2k - s^2 + t^2) \\ \alpha \beta (2k - s^2 + t^2)&{} -\alpha ^2(k+ t^2) +\beta ^2(k-s^2) \end{matrix} \right) . \end{aligned}$$

Since \(s^2 = -1+k\) and \(t^2=-1-k\), we have that \(k-s^2 = 1\), \(k+t^2 = -1\) and \(-s^2+t^2=2k\). Therefore,

$$\begin{aligned} D^2+ BB^T&=\left( \begin{matrix} \alpha ^2 + \beta ^2 &{} \alpha \beta (2k - 2k) \\ \alpha \beta (2k - 2k)&{} \alpha ^2 +\beta ^2 \end{matrix} \right) \\ {}&= -I_2, \end{aligned}$$

which is desired. The identities (3) and (4) are verified by similar computations.

We need following two lemmas to introduce the second construction method.

Lemma 1

Let \(P={\left( {\begin{matrix} \alpha &{} \beta \\ \beta &{} -\alpha \end{matrix}}\right) } \) be an element in \(S_{-I_2}\) and A be a symmetric matrix satisfying \(A^2 = - I_n\). For a vector \({\mathbf{x}}\) in \(GF(q)^n\), if we let the matrix \(M = \left( \begin{matrix} {\mathbf{x}}\\ \beta ^{-1} {\mathbf{x}}(A - \alpha I) \end{matrix}\right) \), then

$$\begin{aligned} MA=PM. \end{aligned}$$

Proof

Let \({\mathbf{y}}=\beta ^{-1} {\mathbf{x}}(A - \alpha I)\). Then \(\beta {\mathbf{y}}={\mathbf{x}}A - \alpha {\mathbf{x}}\) and this implies that \({\mathbf{x}}A = \alpha {\mathbf{x}}+ \beta {\mathbf{y}}.\) On the other hand,

$$\begin{aligned} {\mathbf{y}}(A+\alpha I)&=\beta ^{-1} {\mathbf{x}}(A - \alpha I)(A+\alpha I)\\&=\beta ^{-1} {\mathbf{x}}(A^2 - \alpha ^2 I) \\&=\beta ^{-1}{\mathbf{x}}(-1 - \alpha ^2) I \\&=\beta {\mathbf{x}}, { \text{ since } } \alpha ^2 + \beta ^2 = -1 \end{aligned}$$

and this implies that \({\mathbf{y}}A=\beta {\mathbf{x}}- \alpha {\mathbf{y}}\). Therefore,

$$\begin{aligned} M A= \left( \begin{matrix} {\mathbf{x}}A\\ {\mathbf{y}}A \end{matrix}\right) = \left( \begin{matrix} \alpha {\mathbf{x}}+ \beta {\mathbf{y}}\\ \beta {\mathbf{x}}- \alpha {\mathbf{y}}\end{matrix}\right) =PM. \end{aligned}$$

Lemma 2

Assume that \(n \times n\) matrices H and P are symmetric. If \((H+P)(H-P)\) is also symmetric, then \(HP=PH\).

Proof

By the assumption, we have

$$\begin{aligned} (H-P)(H+P)&=\{(H-P)(H+P)\}^T \\&= (H+P)^T (H-P)^T \\&=(H+P)(H-P), \end{aligned}$$

and by equating both sides, the result follows.

Now, we give the next theorem, which introduces the second construction method.

Theorem 2

(Construction 2) Let \(G=(I_n \mid A)\) be a generator matrix of a symmetric self-dual code \({\mathcal C}\) of length 2n over GF(p) for an odd prime p and let \(S_{-I_2}\) be the set defined in Corollary 2, and let \(P={\left( {\begin{matrix} \alpha &{} \beta \\ \beta &{} -\alpha \end{matrix}}\right) } \) be an element in \(S_{-I_2}\). Let \(M = \left( \begin{matrix} {\mathbf{x}}\\ \beta ^{-1} {\mathbf{x}}(A - \alpha I) \end{matrix}\right) \) for a vector \({\mathbf{x}}\) in \(GF(q)^n\). Assume that H is a \(2\times 2\) symmetric matrix satisfying the equation

$$\begin{aligned} (H+P)(H-P)=-M M^T, \end{aligned}$$
(5)

and \(H-P\) is non-singular. Then

$$\begin{aligned} G_2= (I_{n+2} \mid A_2)=\left( \begin{array}{c|c|c|c} I_2 &{} O&{} H &{} M\\ O&{} I_n&{}M^T&{} A+M^T (H-P)^{-1} M\\ \end{array}\right) \end{aligned}$$

is a generator matrix of a symmetric self-dual code of length \(2n+4\).

Proof

It is easy to check that \(A_2\) is symmetric. Therefore, we have only to show that \(A_2\) is anti-orthogonal, i.e.,

$$\begin{aligned} \left( \begin{array}{c|c} H &{} M \\ M^T&{} A+M^T (H-P)^{-1} M \end{array}\right) \left( \begin{array}{c|c} H &{} M \\ M^T&{} A+M^T (H-P)^{-1} M \end{array}\right) =-I_{n+2}. \end{aligned}$$

In other words, we have to show that following three identities are hold :

$$\begin{aligned} H^2 +MM^T&=-I_2, \end{aligned}$$
(6)
$$\begin{aligned} HM + M(A + M^T(H-P)^{-1}M)&= O_{2\times n}, \end{aligned}$$
(7)
$$\begin{aligned} M^TM+(A + M^T(H-P)^{-1}M)^2&=-I_n. \end{aligned}$$
(8)

We note that, with the assumption, \(MA=PM\) and \(HP=PH\) by Lemmas 1 and 2.

First, it is easy to show that the identity (6) is true from the Eq. (5). For the identity (7), we calculate that

$$\begin{aligned} HM +M(A+M^T(H-P)^{-1}M)&= HM + MA + MM^T(H-P)^{-1}M\\&=(H + P)M + MM^T (H-P)^{-1}M\\&=((H + P)(H-P) + MM^T)(H-P)^{-1}M\\ {}&=O_2 (H-P)^{-1}M\\ {}&=O_{2\times n} \end{aligned}$$

and the result follows.

Finally, for the identity (8), we expand the left hand side of (8):

(9)

Note that \(A^2\), the second term of (9) equals \(-I_n\). We compute the sum of (9) except the last term:

$$\begin{aligned}&M^TM+A^2+AM^T(H-P)^{-1}M+ M^T(H-P)^{-1}MA\\&= M^TM-I_n+M^TP(H-P)^{-1}M+ M^T(H-P)^{-1}PM\\&= -I_n+M^T(I_n+P(H-P)^{-1}+ (H-P)^{-1}P)M\\&= -I_n + M^T(H-P)^{-1}((H-P)^2+(H-P)P+ P(H-P))(H-P)^{-1}M\\&= -I_n+M^T(H-P)^{-1}(H^2-P^2)(H-P)^{-1}M. \end{aligned}$$

And we put \(MM^T=-(H+P)(H-P)\) in the last term of (9) to calculate

$$\begin{aligned}&M^T(H-P)^{-1}MM^T(H-P)^{-1}M\\&=-M^T(H-P)^{-1}(H+P)(H-P)(H-P)^{-1}M\\&=-M^T(H-P)^{-1}(H^2 -P^2)(H-P)^{-1}M. \end{aligned}$$

Therefore, we obtain that

$$\begin{aligned}&M^TM+(A + M^T(H-P)^{-1}M)^2 = -I_n, \end{aligned}$$

and this is desired.

We illustrate these new construction methods in the following examples.

Example 1

Let \({\mathcal C}_{3}^{8}\) be a symmetric optimal self-dual [8,4,3] code over GF(3) with generator matrix

To apply construction method in Theorem 1, take \((\alpha , \beta ) =(1,1)\) and the codeword \(({\mathbf{x}}_n| {\mathbf{y}}_n) = (2,1,1,1,0,1,0,2)\) in \({\mathcal C}_{3}^{8}\). Then, we compute that \(B={\left( {\begin{matrix} 2&{} 2&{} 1&{} 0\\ 2&{} 0&{} 1&{} 2 \end{matrix}}\right) }\), \(D={\left( {\begin{matrix} 2&{} 1\\ 1&{} 2 \end{matrix}}\right) }\), and \(E={\left( {\begin{matrix} 0&{} 1&{} 0&{} 2\\ 1&{} 2&{} 2&{} 2\\ 0&{} 2&{} 0&{} 1\\ 2&{} 2&{} 1&{} 0 \end{matrix}}\right) }\).

Finally, we find an optimal symmetric self-dual [12,6,6] over GF(3) code with generator matrix

Example 2

Let \({\mathcal C}_{19}^{8}\) be a symmetric self-dual [8,4,3] code over GF(19) with generator matrix

To apply construction method in Theorem 2, take \((\alpha , \beta ) =(18,6)\) and \({\mathbf{x}}= (1,6,9,6)\) in \(GF(19)^4\). Then, \(M={\left( {\begin{matrix} 1&{} 6&{} 9&{} 6\\ 13&{} 1&{} 9&{} 9 \end{matrix}}\right) }\) and \(H={\left( {\begin{matrix} 9&{} 12\\ 12&{} 13 \end{matrix}}\right) }\), and finally, we obtain a symmetric [12,6,7] self-dual code over GF(19) of length 12 with generator matrix

4 Computational results

In this section, we discuss computational results of symmetric self-dual codes over GF(q) for \(q=11,19,23\). Using construction methods in Theorems 1 and 2, we obtain many new symmetric self-dual codes of lengths \(n \le 40\) which meet the best known bounds on minimum distances of self-dual codes.

We find the best symmetric self-dual codes of length n over GF(q) for \(q=11,19,23\) and \(n\le 40\) except for the case that \(q=11\) with \(n=16\) or 20, for the case that \(q=19\) with \(n=32\), and for the case that \(q=23\) with \(n=20\) or 24. Moreover, we also find more than 151 self-dual codes with new parameters: 90 inequivalent self-dual codes of length 32, 36 and 40 over GF(11), 5 inequivalent self-dual codes of length 36 and 40 over GF(19) and 56 inequivalent self-dual codes of length 32, 26 and 40 over GF(23). Among them, we introduce five symmetric self-dual codes with their generator matrices in this section.

At the end of this section, we summarize the known bounds on the highest minimum distances of self-dual codes in Table 7.

4.1 Symmetric self-dual codes over GF(11)

Proposition 3

There exist the best symmetric self-dual codes over GF(11) of length \(n=4,8,12, 24, 28, 32, 36, 40\). In particular, \([4,2,3]_{11}, [8,4,5]_{11}\) and \([12,6,7]_{11}\) symmetric self-dual codes are MDS. Moreover, \([32,16,12]_{11}\), \([36,18,13]_{11}\) and \([40,20,14]_{11}\) codes are new.

We give the highest minimum distance \(d_{sym}\) of symmetric self-dual codes and the previously best known minimum distance \(d_{sd}\) of self-dual codes in Table 4. In this table, new parameters are written in bold. We present three symmetric self-dual codes having new parameters:

  • \([32,16,12]_{11}\) code with a generator matrix \((I_{16} \mid A_{11}^{32})\) where

  • \([36,18,13]_{11}\) code with a generator matrix \((I_{18} \mid A_{11}^{36})\) where

  • \([40,20,14]_{11}\) code with a generator matrix \((I_{20} \mid A_{11}^{40})\) where

Table 4 The best known minimum distances of symmetric self-dual codes over GF(11)

4.2 Symmetric self-dual codes over GF(19)

Proposition 4

There exist the best symmetric self-dual codes over GF(19) of length \(n=4,8,12,16,20,24,28,36,40\). Among them, \([4,2,3]_{19}\), \([8,4,5]_{19}\), \([12,6,7]_{19}\), and \([20,10,11]_{19}\) codes are MDS. Moreover, \([36,18,14]_{19}\) and \([40, 20,15]_{19}\) codes are new.

We give the highest minimum distance \(d_{sym}\) of symmetric self-dual codes and the previously best known minimum distance \(d_{sd}\) of self-dual codes in Table 5. In this table, new parameters are written in bold. We present two symmetric self-dual codes having new parameters:

  • \([32,16,12]_{19}\) code with a generator matrix \((I_{16} \mid A_{19}^{32})\) where

  • \([36,18,14]_{19}\) code with a generator matrix \((I_{18} \mid A_{19}^{36})\) where

  • \([40,20,15]_{19}\) code with a generator matrix \((I_{20} \mid A_{19}^{40})\) where

Table 5 The best known minimum distances of self-dual codes over GF(19)

4.3 Symmetric self-dual codes over GF(23)

Proposition 5

There exist the best symmetric self-dual codes over GF(23) of length \(n=4,8,12, 28,32,36,40\). Among them, \([4,2,3]_{23}\), \([8,4,5]_{23}\) and \([12,6,7]_{23}\) codes are MDS. Moreover, \([32,16,12]_{23}\), \([36,18,14]_{23}\) and \([40,20,15]_{23}\) codes are new.

We give the highest minimum distance \(d_{sym}\) of symmetric self-dual codes and the previously best known minimum distance \(d_{sd}\) of self-dual codes in Table 6. In this table, new parameters are written in bold. We present three symmetric self-dual codes having new parameters:

  • \([32,16,12]_{23}\) code with a generator matrix \((I_{16} \mid A_{23}^{32})\) where

  • \([36,18,14]_{23}\) code with a generator matrix \((I_{18} \mid A_{23}^{36})\) where

  • \([40,20,15]_{23}\) code with a generator matrix \((I_{20} \mid A_{23}^{40})\) where

Table 6 Tne best known minimum distances of symmetric self-dual codes over GF(23)
Table 7 Bounds on the highest minimum distances of self-dual codes over GF(p) for primes \(5 \le p \le 23\) up to lengths 40

5 Conclusions

In this article, we introduced new construction methods of symmetric self-dual codes over finite fields. Then we have constructed many new symmetric self-dual codes, including 153 self-dual codes with new parameters, up to equivalence. This paper contributes in two ways. One is to provide new construction methods of symmetric self-dual codes over GF(q) for the challenging case of \(q \equiv 3 \pmod 4\). The other is to improve bounds on the highest minimum distance of self-dual codes, which have not been significantly updated for almost two decades because of computational complexity. We believe that our methods can produce more results for self-dual codes over larger finite fields and/or of longer lengths.