Self-dual codes from 3-class association schemes

3-Class association schemes are used to construct binary self-dual codes. We use the pure and bordered construction to get self-dual codes starting from the adjacency matrices of symmetric and non-symmetric 3-class association schemes. In some specific cases, we also study constructions of self-dual codes over Zk\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathbb {Z}}_k$$\end{document}. For symmetric 3-class association schemes, we focus on the rectangular scheme and association schemes derived from symmetric designs.

coding theory but they have important connections to algebra, number theory and combinatorics. For example, self-dual codes over Z k have interesting connections to invariant theory and also to unimodular lattices and modular forms, see [1,16] for complete descriptions of these connections. Additionally, self-dual codes have had many interesting connections to combinatorics. Most famously, self-dual codes were fundamental in proving the non-existence of the projective plane of order 10 [14]. A connection from self-dual codes to combinatorial designs has also been used in cryptography to construct secret sharing schemes [4].
Construction techniques for self-dual codes have always been of interest. Recently, several new ideas for constructing various types of self-dual codes have appeared. For example in [2], a construction was given to construct self-dual codes with a particular automorphism. In [13], a construction of self-dual codes over the family of rings R k is given which is then used to construct binary self-dual codes. Very general versions of the building up construction of self-dual codes were given in [6,7]. New classification techniques have also been given in [3]. Additionally, combinatorial objects have been useful in the construction of self-dual codes. For example, in [5], a construction of self-dual codes from any symmetric design was given. In [8], self-dual codes were constructed from 2-class association schemes. In this paper, we extend it by constructing self-dual codes from 3-class association schemes.
We begin with some definitions from coding theory and then give some definitions from the theory of association schemes. In Sect. 2, we study how self-dual codes can be generated from the adjacency matrices of a 3-class association scheme. This can be done by using two different methods which we call pure and bordered constructions. In Sect. 3, we obtain the conditions under which we can get binary self-dual codes from non-symmetric 3-class association schemes. For a particular example, we also study the values of k such that we can obtain self-dual codes over Z k . Section 4 is devoted to binary self-dual codes from symmetric 3-class association schemes. Since the results are quite general, we focus on two kinds of important symmetric association schemes: the rectangular scheme and association schemes derived from symmetric designs. Again, we also mention conditions on k such that self-dual codes over Z k can be obtained.

Self-dual codes
Let Z k denote the ring of integers modulo k. A code of length n over Z k is a subset of Z n k and the code is said to be linear if it is an additive subgroup of Z n k . The Hamming weight of an element in Z k is the number of non-zero coordinates and the minimum weight of a code is the smallest Hamming weight of all non-zero elements. For any undefined terms from coding theory see [10] or [15].
Given two elements, x = (x 1 , . . . , x n ) and y = (y 1 , . . . , y n ) in Z n k , we consider the inner product We define the dual code C ⊥ of a code C with respect to the above inner product, that is C ⊥ = {w | w · v = 0, ∀v ∈ C}. The code is said to be self-dual if it is equal to its dual and self-orthogonal if it is contained in its dual. A self-dual code is Type II if the weight of each of its elements is a multiple of 2k. We refer the reader to [17] for a complete description of self-dual codes.
For a linear code C over Z k , we say that a matrix G, whose rows are codewords, generates C if C is equal to the linear span of the rows of G. Such a matrix is usually called a generator matrix if its number of rows is minimal.
In this paper we always consider linear codes and we are mainly interested in binary linear codes, that is, the case k = 2.

Association schemes
Let X be a finite set, |X | = v. Let R i be a subset of X × X , ∀i ∈ I = {0, . . . , d} , d > 0. We define = {R i } i∈I . We say that (X, ) is a d-class association scheme if the following properties are satisfied: The values p k i j are called intersection numbers. The elements x, y ∈ X are called i th associates if (x, y) ∈ R i . If i = i for all i then the association scheme is said to be symmetric, otherwise it is non-symmetric. The association scheme (X, ) is commutative if p k i j = p k ji , for all i, j, k ∈ I. Note that a symmetric association scheme is always commutative but the converse is not true.
The adjacency matrix A i for the relation R i for i ∈ I, is the v × v matrix with rows and columns labeled by the points of X and defined by The conditions (i)-(iv) in the definition of (X, ) are equivalent to: If the association scheme is symmetric, then A i = A T i , for all i ∈ I. If the association scheme is commutative, then A i A j = A j A i , for all i, j ∈ I. The adjacency matrices generate an (n + 1)-dimensional algebra A of symmetric matrices. This algebra is called the Bose-Mesner algebra.
Higman [9] proved that a d-class association scheme with d ≤ 4 is always commutative, meaning that p k i j = p k ji , for all i, j, k ∈ I.

3-class association schemes and self-dual codes
Let (X, ) be a 3-class association scheme. The adjacency matrix for R 0 is I and the adjacency matrices for R 1 , R 2 and R 3 are A 1 , A 2 and J − I − A 1 − A 2 , respectively.

Lemma 1
If (X, ) is a 3-class association scheme then the following equations hold: Note that the number of ones per row (or column) in A 1 is p 0 11 , A 2 is p 0 22 and A 3 is p 0 33 . Let A 0 , A 1 , A 2 , A 3 be the adjacency matrices. We describe the following construction which we shall use in our construction of self-dual codes. For arbitrary values of r, s, t, u ∈ Z k let We write Q for Q (r, s, t, u). We define two different methods of constructing selfdual codes, the pure and bordered construction. In both cases, the generator matrices are defined by using the matrix Q. In the pure construction, the generator matrix is P(r, s, t, u) = (I | Q).
In the bordered construction the generator matrix is Codes generated by P(r, s, t, u) and B(r, s, t, u) have length 2v and 2v + 2 respectively. Thus, to construct a self-dual code we need only make it self-orthogonal.
For the code generated by P(r, s, t, u) to be self-orthogonal we need Namely we need Q Q T = −I.
For the pure construction to give a Type II code we need the inner product of any row with itself to be 0 (mod 2k), that is we need 1 + r 2 + s 2 p 0 11 + t 2 p 0 22 + u 2 p 0 33 ≡ 0 (mod 2k).
For the code generated by B(r, s, t, u) to be self-dual we need the following: ac + b(r + sp 0 11 + t p 0 22 + up 0 33 = 0, The first equation is the inner product of the top row with itself. The second is the inner product of the top row with any other row, and the third ensures that the other rows are orthogonal to each other. We write P and B for P (r, s, t, u) and B (r, s, t, u), respectively.

Self-dual codes from non-symmetric 3-class association schemes
Let (X, ) be a 3-class association scheme. If it is non-symmetric then we can order the relations such that R 2 = R T 1 and R 3 is a symmetric relation. The association scheme is uniquely determined by R 1 . If we denote the adjacency matrix for R 1 by A, then the adjacency matrices for R 0 , R 2 and R 3 are I , A T and J − I − A − A T , respectively.
The following lemma is well known, see [12] for example.
Related to a non-symmetric 3-class association scheme (X, ) we have the parameters v = |X | and κ, λ, μ, α, β and γ as in the above lemma.
If (X, ) is a non-symmetric 3-class association scheme then the matrix Q designed in Eq. (1) can be written as

Pure construction
Theorem 1 Let C be the binary linear code generated by P. The code C is self-dual if and only if one of the following holds: (ii) s = t; r = u; s = u or λ = β; uv = 0.
All of the operations are over Z 2 .
Proof From Eq. (5) and Lemma 2 It is clear that, for C is self-dual if and only if Q Q T = I which gives the following equations over Z 2 : If s = t, the equations reduce to condition (i). If s = t, then the equations reduce to condition (ii).
If we write w = r + u ∈ Z 2 , then we obtain the possible values of Q such that C is self-dual.
Corollary 1 Let C be the binary linear code generated by P. The code C is self-dual if and only if one of the following holds: (i) Q = w I + B, with μ = λ + w = 0 and λ = κ; or (ii) Q = w I + B + J , with μ = λ + w = v and λ = κ; or (iii) Q = I + A + A T + u J with λ = β and uv = 0; or (iv) Q = I + u J with uv = 0.
Where B stands for A or A T and the equalities are over Z 2 .
Proof Cases (i) and (ii) correspond to case (i) in Theorem 1 and cases (iii) and (iv) correspond to case (ii) in Theorem 1.
Corollary 2 Let C be the binary linear code generated by P. The code C is Type II if and only if one of the following holds: ; or (iii) Q = I + A + A T ; λ = β and κ is odd; or (iv) Q = I + A + A T + J ; λ = β and v is even; or (v) Q = I + J and v ≡ 0 (mod 4).

Where B stands for A or A T and the equalities are over Z 2 .
Proof The result is obtained by taking into account that a binary self-dual code is a Type II code if and only if all the rows of the generator matrix have doubly-even weight. Then, we compute the number of ones in any row of P for all different values of Q obtained in Corollary 1: we define the following relations: Then, (X, ) is a 3-class non-symmetric association scheme with parameters: Proposition 1 Consider the association scheme of Example 1. The binary linear code C generated by P is self-dual if and only if one of the following holds: In this case C is not a Type II code.

Where B is A or A T .
Proof We examine the different possible cases in Corollary 1.
the construction does not give a self-dual code since we have μ = κ and λ = 0 in Eq. (6) and for a code C generated by Q = w I + B to be self-dual, Q has to satisfy case (i) in Corollary 1.
If Q = w I + B + J , then from case (ii) in Corollary 1 we know that μ ≡ λ + w (mod 2) and λ ≡ κ (mod 2), combined with μ = κ in Eq. (6) we get w = 1. Since 6). Note that now the condition uv ≡ 0 (mod 2) in (iii) of Corollary 1 is always satisfied. If u = 0, then C would be self-dual for κ odd, but κ is even by Eq. (6). If u = 1, then the condition v even is already satisfied. It corresponds to (ii) in Proposition 1. Q = I gives a trivial self-dual code, which is not of Type II.

Example 2
We take the specific case v = 6 from Example 1. The parameters are 0 1 1 1 1 1  1 0 1 1 1 1  1 1 1 1 1 0  1 1 1 1 0 The code generated by P is a self-dual code but not a Type II code. The minimum weight of the code is 4.
Using the parameters given in Example 1, the equalities in Lemma 2 become: Following Example 1, we will now consider codes generated over rings Z k with k > 2. Hence we need Q Q T = −I so that the code generated by P is a self-dual code. From Eq. (7) and Eq. (5) We shall use the following classical result on number theory.

Lemma 3
Let k = 2 α 0 p α 1 1 · · · p α r r be the prime factor decomposition of k. If −1 is a quadratic residue modulo k, then α 0 ≤ 1 and p i ≡ 1 (mod 4) ∀i = 1, . . . , r. Proposition 2 Following Example 1, let C be the code generated by P over Z k . If C is a self-dual code then where k = 2 α 0 p α 1 1 · · · p α r r is the prime factor decomposition of k.
Proof We have that (r − u) 2 = −1 over Z k . Thus, the result holds applying Lemma 3.

Bordered construction
For b = 0 we will always have a code, generated by B, with minimum weight 2 which does not lead to any interesting results, hence we confine ourselves to codes generated by B for b = 1.
Theorem 2 Let C be the binary linear code generated by B, with b = 1. The code C is self-dual if and only if a = 0, c = v = 1 and one of the following holds: All of the operations are over Z 2 .
Proof From Eq. (5) and Lemma 2 It is clear that, for which gives the following equations over Z 2 : Also from Eqs. (2) and (3) we have If s = t, then Eqs. (8) and (9) reduce to condition (i). If s = t, then the equations reduce to condition (ii).
Corollary 3 Let C be a binary linear code generated by B, with b = 1. The code C is self-dual if and only if one of the following conditions hold: Where B stands for A or A T , the equalities are over Z 2 and the congruences are modulo 2.
Proof The conditions are obtained for different values of r, s, t, u on Theorem 2.
Corollary 4 Let C be a binary self-dual code generated by B, with b = 1. The code C is Type II if and only if one of the following conditions hold: Where B stands for A or A T and the congruences are modulo 4.
Proof We know that a binary self-dual code is of Type II if and only if all the rows of generator matrices have doubly-even weight. Hence, we compute the number of ones in any row of B by considering the different cases of Q given in Corollary 3 Example 3 We take the specific value of v = 9 in Example 1.
The parameters are So, for v = 9, κ = μ = β = 3 and α = λ = 0. The adjacency matrix for R 1 is Take Q = I + A, then the generator matrix B is: The code generated by B is a self-dual code, but not a Type II code.

Self-dual codes from symmetric 3-class association schemes
Let (X, ) be a 3-class association scheme. If it is symmetric then all adjacency matrices are symmetric. The theory presented for a general 3-class association scheme applies directly to a symmetric 3-class association scheme.

General results
Theorem 3 Let C be the binary linear code generated by P. The code C is self-dual if and only if the following holds: Proof From Eq. (1) and Lemma 1, we have Corollary 5 Let C be the binary self-dual code generated by P. The code C is Type II if and only if one of the following holds:

All congruences are modulo 4.
Proof As mentioned before, a binary self-dual code is of Type II if and only if all the rows of generator matrices have doubly-even weight. Hence, we compute the number of ones in any row of P by considering the different cases of Q.

Theorem 4 Let C be the binary linear code generated by B, with b = 1. The code C is self-dual if and only if the following holds:
1 + a + vb = 0, uv + (s + u) p 3 11 All operations are over Z 2 .
Corollary 6 Let C be the binary self-dual code generated by B, with b = 1. The code C is Type II if and only if one of the following holds:

All congruences are modulo 4.
Proof A binary self-dual code is of Type II if and only if all the rows of generator matrices have doubly-even weight. We compute the number of ones in any row of B by considering the different cases of Q.

Self-dual codes from rectangular association schemes
Let us focus on the rectangular scheme n × m (n, m ≥ 2) which is defined as follows. Consider two sets A and B with |A| = n ≥ 2 and |B| = m ≥ 2. Let X = A × B and define the binary relations over X : y), (x, y ) ∈ X 2 y = y ;

Lemma 4
If (X, ) is a n × m symmetric rectangular association scheme, then the following equations hold: Proof The proof follows by applying Lemma 1 to a rectangular symmetric association scheme.

Pure construction
Theorem 5 Let C be a binary code generated by P using the rectangular association scheme n × m. The code C is self-dual if r + s + t + u = 1 and (i) If m is even and n is odd then C is self-dual whenever r = s. (ii) If n is even and m is odd then C is self-dual whenever r = t.
(iii) If m and n are odd then C is self-dual whenever r = 1, s = t = u = 0.
All of the operations are over Z 2 .
Proof From Eq. (12) it is clear that, for Checking different cases for m and n, even or odd, we obtain the conditions given above.
Corollary 7 Let C be a binary code generated by P, using the rectangular association scheme n × m. The code C is self-dual if one of the following conditions hold:

Corollary 8 Let C be the binary self-dual code generated by P. The code C is Type
II if and only if one of the following holds: All congruences are modulo 4.
Proof The code C generated by P is of Type II if and only if all the rows of the generator matrices have doubly-even weight. Hence, we compute the number of ones in any row of P by considering the different cases of Q.
The generator matrix for the code C is P, where Q can be taken from condition (ii) and (iv) from Corollary 7. The code generated by the matrix P is a self-dual code. Proof From Eq. (12) it is clear that, for x 0 , x 1 , x 2 , x 3 ∈ Z 2 , x 0 I +x 1 A+x 2 A T +x 3 J = I + c J if and only if x 0 = 1, x 1 = x 2 = 0 and x 3 = c. C is self-dual if and only if Q Q T = −I − c 2 J which gives the following equations over Z 2 :

Bordered construction
Also from Eqs. (2) and (3) for a rectangular 3-class symmetric association scheme we have 1 + a + mn = 0, where nm = v. Since (s + u) m = 0 and (t + u) n = 0, Eqs. (13) and (14) can be reduced to We observe that a = 1 does not satisfy Eq. (15), thus for a = 0 the above equations give us c = 1, nm = 1, s = t = u = 1 and r = 0. Therefore, by using the values of r, s, t, u we get Q = I + J .
Let ρ = r − u, σ = s − u and τ = t − u. We can write Eq. (12) as For the code generated by P to be self-orthogonal we need For a code generated by B to be self-orthogonal, along with Eqs. (2) and (3), we need Theorem 7 Let C be a code generated from a n × m rectangular association scheme over Z k by using the pure or the bordered construction. Let k = 2 α 0 p α 1 1 · · · p α r r be the prime factor decomposition of k. If C is a self-dual code, then Moreover, if (18) is satisfied, then there exist values of n and m such that C is a self-dual code.
Proof Assume that C is a self-dual code. Thus, Eqs. (16) or (17) are satisfied over Z k . Note that the first three equations are the same in both cases. From these three equations, it is easy to obtain (ρ − σ − τ ) 2 ≡ −1 (mod k). Hence, −1 is a quadratic residue modulo k and, using Lemma 3, it follows (18). If (18) is satisfied, then we can take the following values: With these values, the first three equations in (16) or (17) are satisfied. The fourth equation becomes: 2u(ρ + u) ≡ 0 (mod k), or 2u(ρ + u) ≡ −c 2 (mod k); respectively in (16) or (17). Clearly, the equation has solutions in both cases. It is also straightforward to find solutions for the Eqs. (2) and (3), as we can see in the following example. The adjacency matrix for R 1 is: The code C generated by P, with Q = 2I + 4 A 1 , is a self-dual code over Z 5 . We can generate two self-dual codes over Z 5 with B, using Q = 2I + 4 A 1 with a ≡ 2 (mod 5) or a ≡ 3 (mod 5) along with b ≡ c ≡ 0 (mod 5).

Self-dual codes from symmetric designs
where P is a set of points, |P| = v, and B is a collection of k-subsets of elements in P called blocks satisfying that every t-subset of elements of P is contained in exactly λ blocks of B (0 ≤ t ≤ k ≤ v). It is well known that |B| ≥ v (Fisher's inequality) and we say that D is symmetric if the number of points and blocks coincide; that is, v = |B|.
Let D be a t − (v, k, λ) design. The incidence matrix of D is a v × b matrix A whose rows are indexed by the points of P, whose columns are indexed by the blocks of B, and with entries A p,b , for p ∈ P, b ∈ B, equals 1 if p ∈ b, and 0 otherwise. Note that if D is symmetric, then A is a square v × v matrix.
Denote by I m and J m the identity and the square all-one m×m matrices, respectively. If the size is not indicated, we shall assume that they are v × v matrices. The following property is well known and can be found, for instance, in [11].
Let D = (P, B) be a symmetric t − (v, k, λ) design. Consider X D = P ∪ B and R D the relations over X : From the previous definitions, it follows directly the following proposition. − (v, k, λ) design, then (X D , R D ) is a symmetric 3-class association scheme with adjacency matrices:

Proposition 3 If D = (P, B) is a symmetric t
Obtaining self-dual codes from symmetric designs is not a new topic. For example in [18], binary self-dual codes are obtained from I + A under certain conditions. However, our technique is quite different, since we use pure and bordered construction from the association scheme (X D , R D ).

Pure construction
Theorem 8 Let C be the binary code generated by P using the association scheme (X D , R D ). The code C is self-dual if and only if one of the following holds: Proof The binary code C is self-dual if and only if Q Q T = Q 2 = I 2v (note, from Proposition 3, that Q is a symmetric matrix). Since J 2 2v = 2v J 2v = 0 over Z 2 , we have that if Q 2 = I 2v , then Q + J 2v also satisfies (Q + J 2v ) 2 = I 2v over Z 2 .
(ii) If Q = A 1 , Q 2 = (k + λ)I + λJ 0 0 (k + λ)I + λJ = I 2v if and only if λ is even, and k is odd. In the case Q = I 2v + A 2 , we have We remark that in (i), the minimum distance of the code is d = 2. In the rest of the cases, the minimum distance is d = 2 j, for some j ≥ 2.
As corollaries, we shall determine the matrices Q for which we obtain a binary selfdual code by the pure construction for a certain well-known symmetric designs such as projective planes, Hadamard designs, biplanes, and projective geometry hyperplanes.

Corollary 9
Let D be a projective plane of order n and let v = n 2 + n + 1. Let C be the binary code generated by P using the association scheme (X D , R D ). The code C is self-dual if and only if one of the following holds: Proof A projective plane of order n is a 2−(n 2 +n +1, n +1, 1) design [11]. Then, the only possible matrices Q are those obtained from items (i), (iv) and (vi) in Theorem 8.

Corollary 10
Let D be a Hadamard 2-design of order λ + 1 and let v = 4λ + 3. Let C be the binary code generated by P using the association scheme (X D , R D ). The code C is self-dual if and only if one of the following holds: Proof A Hadamard 2-design is a 2 − (4λ + 3, 2λ + 1, λ) design [11]. Then, the only possible matrices Q are the obtained from items (i), (ii) and (vi) in Theorem 8.

Corollary 11
Let D be a biplane of order n and let v = n 2 +3n+4 2 . Let C be the binary code generated by P using the association scheme (X D , R D ). The code C is self-dual if and only if one of the following holds: (i) Q = I 2v or Q = I 2v + J 2v . (ii) Q = A 1 or Q = A 1 + J 2v , n ≡ 1 (mod 2). (iii) Q = A 2 or Q = A 2 + J 2v , n is a square. (iv) Q = A 3 or Q = A 3 + J 2v , n is an odd square.

Corollary 12
Let D be the design defined by the hyperplanes of dimension n − 1 from an n-dimensional finite projective geometry P G(n, q). Let v = q n+1 −1 q−1 . Let C be the binary code generated by P using the association scheme (X D , R D ). The code C is self-dual if and only if one of the following holds: (i) Q = I 2v or Q = I 2v + J 2v . (ii) Q = A 1 or Q = A 1 + J 2v , n ≡ q ≡ 1 (mod 2). (iii) Q = A 2 or Q = A 2 + J 2v , n ≡ q ≡ 1 (mod 2). (iv) Q = A 3 or Q = A 3 + J 2v , q ≡ 1 (mod 2).

Bordered construction
Using the bordered construction, recall that we require 1 + a 2 + 2vb = 0 (in order that the first row be self-orthogonal). This reduces to a = 1 over Z 2 . Since the first row must be orthogonal to any other, we get ac + bχ = c + bχ = 0, where χ denotes the number of ones per row (column) in Q. So, if b = 0 then c = 0 and the matrix B becomes and it would be a trivial generalization of the previous pure construction. So, we assume that b = 1 and hence c + χ = 0. In order to have the remaining rows orthogonal, we must have I 2v +c J 2v + Q Q T = 0. For c = 1, this reduces to Q Q T = Q 2 = I 2v + J 2v . But we have seen in the pure construction that for some matrix M. Therefore, it is not possible Q 2 = I 2v + J 2v . We conclude that c = 0 and χ must be even. (v) If Q = I 2v + A 1 , then χ = k + 1, and k is even.
Note that the number of ones per row of Q + J 2v is 2v − χ and therefore has the same parity as χ .
Hence, we cannot obtain self-dual codes using the bordered construction with b = 1.
Theorem 9 Let C be the binary code generated by B with b = 1 using the association scheme (X D , R D ). Then, C is not self-dual.
Proof From the previous discussion, we deduce that a = 1, c = 0 and Q should have an even number of ones per row, for C to be self-dual. In such situation, we also had that Q 2 = I . Therefore, we should be in one of the cases of Theorem 8 but, by the previous lemma, this is not possible.