     # Binary linear complementary dual codes

Linear complementary dual codes (or codes with complementary duals) are codes whose intersections with their dual codes are trivial. We study binary linear complementary dual [n,k] codes with the largest minimum weight among all binary linear complementary dual [n,k] codes. We characterize binary linear complementary dual codes with the largest minimum weight for small dimensions. A complete classification of binary linear complementary dual [n,k] codes with the largest minimum weight is also given for 1 < k < n < 16.

07/10/2018

### On the minimum weights of binary linear complementary dual codes

Linear complementary dual codes (or codes with complementary duals) are ...
04/15/2020

### Classification of optimal quaternary Hermitian LCD codes of dimension 2

Hermitian linear complementary dual codes are linear codes which interse...
10/26/2020

### Optimal Binary LCD Codes

Linear complementary dual codes (or codes with complementary duals) are ...
03/30/2018

### On the classification of linear complementary dual codes

We give a complete classification of binary linear complementary dual co...
03/18/2013

### Genetic algorithms for finding the weight enumerator of binary linear block codes

In this paper we present a new method for finding the weight enumerator ...
08/23/2019

### On the minimum weights of ternary linear complementary dual codes

It is a fundamental problem to determine the largest minimum weight d_3(...
06/10/2022

### Improved lower and upper bounds for LCD codes?

Linear complementary dual (LCD) codes are linear codes which intersect t...

## 1 Introduction

An code over is a

-dimensional vector subspace of

, where denotes the finite field of order and is a prime power. A code over is called binary. The parameters and are called the length and dimension of , respectively. The weight of a vector is the number of non-zero components of . A vector of is called a codeword of . The minimum non-zero weight of all codewords in is called the minimum weight of and an code with minimum weight is called an code. Two codes and over are equivalent, denoted , if there is an monomial matrix over with .

The dual code of a code of length is defined as where is the standard inner product. A code is called linear complementary dual (or a linear code with complementary dual) if , where denotes the zero vector of length . We say that such a code is LCD for short.

LCD codes were introduced by Massey  and gave an optimum linear coding solution for the two user binary adder channel. LCD codes are an important class of codes for both theoretical and practical reasons (see , , , , , , , , , 

). It is a fundamental problem to classify LCD

codes and determine the largest minimum weight among all LCD codes. Recently, much work has been done concerning this fundamental problem (see , , , , , ). In particular, we emphasize the recent work by Carlet, Mesnager, Tang and Qi . It has been shown in  that any code over is equivalent to some LCD code for . This motivates us to study binary LCD codes.

Throughout this paper, let denote the largest minimum weight among all binary LCD codes. Recently, some bounds on the minimum weights of binary LCD codes have been established in . More precisely, has been determined and the values have been calculated for . In this paper, we characterize binary LCD codes for small . The concept of -covers of -sets plays an important role in the study of such codes. Using the characterization, we give a classification of binary LCD codes and we determine . In this paper, a complete classification of binary LCD codes having the minimum weight is also given for .

The paper is organized as follows. In Section 2, definitions, notations and basic results are given. We also give a classification of binary LCD codes for . In Section 3, we give some characterization of binary LCD codes using -covers of -sets. This characterization is used in Sections 4, 5 and 6. In Section 4, we study binary LCD codes of dimension . We give a classification of binary LCD codes for , , , , and (Theorems 4.5 and 4.8). In Sections 5 and 6, we study binary LCD codes of dimension . In Section 5, we show that if and otherwise, for (Theorem 5.1). In Section 6, we establish the uniqueness of binary LCD codes for . In Section 7, we give a complete classification of binary LCD codes having the minimum weight for . Finally, in Section 8, we give constructions of LCD codes over from self-orthogonal codes. As a consequence, the values are determined for .

All computer calculations in this paper were done with the help of Magma .

## 2 Preliminaries

### 2.1 Definitions, notations and basic results

Throughout this paper, and denote the zero vector and the all-one vector of length , respectively. Let

denote the identity matrix of order

and let denote the transpose of a matrix .

Let be an code over . The weight enumerator of is given by , where is the number of codewords of weight in . It is trivial that two codes with distinct weight enumerators are inequivalent. The dual code of is defined as where is the standard inner product. A code is called linear complementary dual (or a linear code with complementary dual) if . We say that such a code is LCD for short. A generator matrix of is a matrix whose rows are a set of basis vectors of . A parity-check matrix of is a generator matrix of . The following characterization is due to Massey .

###### Proposition 2.1.

Let be a code over . Let and be a generator matrix and a parity-check matrix of , respectively. Then the following properties are equivalent:

• is LCD,

• is LCD,

• is nonsingular,

• is nonsingular.

From now on, all codes mean binary unless otherwise specified. Throughout this paper, let denote the largest minimum weight among all LCD codes.

###### Lemma 2.2.

Let (resp. ) be a generator matrix (resp. a parity-check matrix) of an LCD code.

• Suppose that some two columns of are identical. Let be the matrix obtained from by deleting the two columns. Then the code with generator matrix is LCD.

• Suppose that some two columns of are identical. Let be the matrix obtained from by deleting the two columns. Then the code with parity-check matrix is LCD.

###### Proof.

Since and , the new codes are also LCD. ∎

###### Lemma 2.3.

Suppose that there is an LCD code . If , then .

###### Proof.

Suppose that . Then some column of a generator matrix of is . By deleting the column, an LCD code is constructed. ∎

###### Lemma 2.4.

Suppose that there is an LCD code with . If , then there is an LCD code with .

###### Proof.

We may assume without loss of generality that has generator matrix of the form where is a matrix. Since , no column of is . Since , some two columns of are identical. By Lemma 2.2, is LCD. ∎

Let be an code with . Then we may assume without loss of generality that

 C={(x1,x2,…,xn,0)∣(x1,x2,…,xn)∈C∗},

where is a punctured code of .

###### Lemma 2.5.

is LCD if and only if is LCD.

In this way, every LCD code with is constructed from some LCD code . In addition, two LCD codes with are equivalent if and only if two LCD codes are equivalent. Hence, all LCD codes with , which must be checked to achieve a complete classification, can be obtained from all inequivalent LCD codes .

### 2.2 LCD codes of dimensions 1,n−1

It is trivial that is an LCD code. It is known  that

 (d(n,1),d(n,n−1))={(n,2) if n is odd,(n−1,1) if n is even.
###### Proposition 2.6.

There is a unique LCD code, up to equivalence.

###### Proof.

Let be an LCD code. We may assume without loss of generality that has generator matrix of the following form:

 (11⋯11) and (11⋯10),

if is odd and even, respectively. The result follows. ∎

###### Proposition 2.7.
• Suppose that is odd. Then there is a unique LCD code, up to equivalence.

• Suppose that is even. Then there are inequivalent LCD codes.

###### Proof.

Let be an LCD code. We may assume without loss of generality that has generator matrix of the following form:

 G((a1,…,an−1))=⎛⎜ ⎜⎝a1In−1⋮an−1⎞⎟ ⎟⎠,

where . Then

 H=(a1a2⋯an−11)

is a parity-check matrix of .

• Suppose that is odd. Since , . Since is odd, . Hence, there is a unique LCD code, up to equivalence.

• Suppose that is even. Since is LCD, the weight of is even. Let denote the code with generator matrix of the form , where and is even. It is easy to see that and are equivalent if and only if . Hence, there are LCD codes, up to equivalence.

This completes the proof. ∎

## 3 Constructions of LCD codes from k-covers

In this section, we study LCD codes constructed from -covers of -sets. We give a characterization of LCD codes of dimensions and using -covers.

### 3.1 LCD codes from k-covers

Let and be positive integers. Let be a set with elements (for short -set). A -cover of is a collection of not necessarily distinct subsets of whose union is  . This concept plays an important role in the study of LCD codes for small dimensions.

We define a generator matrix from a -cover of an -set as follow. Since the matrix depends on the ordering chosen for , in this paper, we fix the order. More precisely, we define a -cover as a sequence . Let be a -cover of . We define the following subsets of :

 Z1={1}∪(k+Y1)∪(k+m+Y1)∪⋯∪(k+(ℓ−1)m+Y1),Z2={2}∪(k+Y2)∪(k+m+Y2)∪⋯∪(k+(ℓ−1)m+Y2),⋮Zk={k}∪(k+Yk)∪(k+m+Yk)∪⋯∪(k+(ℓ−1)m+Yk),

where is an even positive integer and for a positive integer . Let be the characteristic vector of (). Then define the matrix such that is the -th row. We denote the code with generator matrix of the form by .

###### Proposition 3.1.

The code is an LCD code with .

###### Proof.

Since is even, . Thus, is LCD. Since is a -cover of , no column of is and some two columns of are identical. This implies that . ∎

Now we consider the case and . Let be a -cover and a -cover of , respectively. Let be a code and a code with generator matrix of the form , respectively. Let denote the code and the code with generator matrix of the following form:

respectively.

The code is LCD.

###### Proof.

For and , the result follows from

 G′(Y)G′(Y)T=(0110) and ⎛⎜⎝100001010⎞⎟⎠,

respectively. ∎

### 3.2 LCD codes from 2-covers

###### Proposition 3.3.

Suppose that . Let be an LCD code with . Then there is a -cover such that .

###### Proof.

We may assume without loss of generality that has generator matrix of the following form:

 (1001M), (1)

where is a matrix such that no column is . If , then an LCD code is constructed by Lemma 2.4. By continuing this process, an LCD code with generator matrix of the form (1) is constructed. Hence, we show that such a code is constructed from a -cover.

Since no column of is , it is sufficient to consider the codes with generator matrices:

 (10000111),(10010110),(10010111),(10110111).

Only the first code and the last two codes are LCD. It can be seen by hand that the last two LCD codes are equivalent. This means that the first code and the last code are and , respectively, where . ∎

###### Proposition 3.4.

Suppose that . Let be an LCD code with . Then there is a -cover such that .

###### Proof.

We may assume without loss of generality that has generator matrix of the following form:

 (1001M′), (2)

where is a matrix such that no column is . If , then an LCD code is constructed by Lemma 2.4. By continuing this process, an LCD code with generator matrix of the form (2) is constructed.

Since no column of is , it is sufficient to consider the codes with generator matrices (2), where

 M′=(000111),(001110),(001111),(011101),(011111),(111111).

Only the third code and the last code are LCD. It can be seen by hand that the two LCD codes are equivalent. In addition, the last code is , where . This completes the proof. ∎

### 3.3 LCD codes from 3-covers

###### Proposition 3.5.

Suppose that . Let be an LCD code with . Then there is a -cover such that .

###### Proof.

We may assume without loss of generality that has generator matrix of the following form:

 ⎛⎜⎝100010M001⎞⎟⎠, (3)

where is a matrix such that no column is . If , then an LCD code is constructed by Lemma 2.4. By continuing this process, an LCD code with generator matrix of the form (3) is constructed, where . Hence, we show that such a code is constructed from a -cover.

Let be an LCD code with generator matrix of the form (3) satisfying that all columns of are distinct. Our computer search shows that is equivalent to the code with generator matrix

 ⎛⎜⎝100101011010011001001000111⎞⎟⎠.

In addition, our computer search shows that is equivalent to the code with generator matrix

 ⎛⎜⎝100111111010101101001110110⎞⎟⎠.

This means that the code is , where , and .

Let be an LCD code with generator matrix of the form (3) satisfying that all columns of are distinct. Our computer search shows that is equivalent to one of the codes and with generator matrices

 ⎛⎜⎝100101101001100010001⎞⎟⎠ and ⎛⎜⎝100101001001010010011⎞⎟⎠,

respectively. In addition, our computer search shows that and are equivalent to the codes with generator matrices

 ⎛⎜⎝100111101011110011010⎞⎟⎠ and ⎛⎜⎝100111101001010011010⎞⎟⎠,

respectively. This means that the codes are and , respectively, where , and .

Our computer search shows that an LCD code is equivalent to one of the codes and with generator matrices

 ⎛⎜⎝100110100000100⎞⎟⎠,⎛⎜⎝100110101100100⎞⎟⎠ and ⎛⎜⎝100110101100111⎞⎟⎠,

respectively. This means that the codes are , and , respectively, where and . ∎

###### Proposition 3.6.

Suppose that . Let be an LCD code with . Then there is a -cover such that .

###### Proof.

We may assume without loss of generality that has generator matrix of the following form:

 ⎛⎜⎝100010M′001⎞⎟⎠, (4)

where is a matrix such that no column is . If , then an LCD code is constructed by Lemma 2.4. By continuing this process, an LCD code with generator matrix of the form (4) is constructed, where .

Let be an LCD code with generator matrix of the form (4) satisfying that all columns of are distinct. Then is equivalent to the code with generator matrix

 ⎛⎜⎝100101010101001100110010001111⎞⎟⎠.

Our computer search shows that is equivalent to the code with generator matrix

 ⎛⎜⎝100111111001010110110011101101⎞⎟⎠.

This means that the code is , where , and .

Let be an LCD code with generator matrix of the form (4) satisfying that all columns of are distinct. Our computer search shows that is equivalent to the code with generator matrix

 ⎛⎜⎝100101100100110100100011⎞⎟⎠.

In addition, our computer search shows that is equivalent to the code with generator matrix

 ⎛⎜⎝100111100101111100110101⎞⎟⎠.

This means that the code is , where and .

Our computer search shows that an LCD code with generator is equivalent to one of the codes and with generator matrices where

 A=⎛⎜⎝000111111⎞⎟⎠,⎛⎜⎝110001001⎞⎟⎠ and ⎛⎜⎝110111111⎞⎟⎠,

respectively, In addition, these codes are

 C′((Y1,Y2,Y3)),C′((Y′1,Y′2,Y′3)) and C′((Y′′1,Y′′2,Y′′3)),

respectively, where and . ∎

### 3.4 Remarks

The elements of an -set may be taken to be identical. In this case, is called unlabelled. Let be a -cover of . The order of the sets may not be material. In this case, is called disordered .

###### Proposition 3.7.

Let be a -cover of an -set . Let be the -cover obtained from by a permutation of and a permutation of the elements of . Then .

###### Proof.

Consider a generator matrix of the LCD code constructed from a -cover . A permutation of implies a permutation of rows of . A permutation of the elements of implies a permutation of columns of . The result follows. ∎

By the above proposition, when we consider codes constructed from all -covers , which must be checked to achieve a complete classification, it is sufficient to consider only disordered -covers of unlabelled -sets.

Now let us consider LCD codes constructed from -covers. Our computer search shows that there are six inequivalent LCD codes with . These codes have generator matrices where

 A=⎛⎜ ⎜ ⎜⎝11000000⎞⎟ ⎟ ⎟⎠,⎛⎜ ⎜ ⎜⎝11110000⎞⎟ ⎟ ⎟⎠,⎛⎜ ⎜ ⎜⎝11111100⎞⎟ ⎟ ⎟⎠,⎛⎜ ⎜ ⎜⎝11111111⎞⎟ ⎟ ⎟⎠,⎛⎜ ⎜ ⎜⎝10100101⎞⎟ ⎟ ⎟⎠,⎛⎜ ⎜ ⎜⎝10100111⎞⎟ ⎟ ⎟⎠,

respectively. The weight enumerators of the codes are listed in Table 1. It is easy to see that the number of disordered -covers of an unlabelled -set is  [5, Table 1]. Only the codes are constructed from -covers.

## 4 LCD codes of dimension 2

It was shown in  that

 d(n,2)={⌊2n3⌋ if n≡1,2,3,4(mod6,⌊2n3⌋−1 otherwise,

for . Throughout this section, we denote by . In this section, we give a classification of LCD codes for , , , , and . In Section 3, we gave some observation of LCD codes of dimension , which is established from the concept of -covers of -sets. The observation is useful to complete the classification.

###### Lemma 4.1.

Suppose that and . If there is an LCD code   then .

###### Proof.

Write , where . For and , we have the following:

0 2 4
1 3 5

The result follows by Lemma 2.3. ∎

Now suppose that and are an LCD code and an LCD code with and , respectively, for . By Propositions 3.3 and 3.4, we may assume without loss of generality that and have generator matrices of the following form:

 G0(a,b,c)= (1001M(a,b,c)M(a,b,c)) % and G1(a,b,c)= (1001M(a,b,c)M(a,b,c)cc11),

respectively, where

 M(a,b,c)=(1a1b0c1a0b1c). (5)

We denote the codes by and , respectively. Then the codes have the following weight enumerators for :

 1+y1+2(a+b)+δ+y1+2(a+c)+δ+y2+2(b+c) (6)

For nonnegative integers and , we consider the following conditions:

 dn≤1+2(a+b)+δ, (7) dn≤1+2(a+c)+δ, (8) dn≤2+2(b+c), (9) 2(a+b+c)+2+δ=n, (10) b≤c. (11)
###### Lemma 4.2.
• Let be the set of satisfying the conditions (7)–(11), where .

• If , then .

• If , then .

• If , then

 S={(t−1,t+1,t+1),(t,t,t+1),(t+1,t−1,t+1),(t+1,t,t)}.
• Let be the set of satisfying the conditions (7)–(11), where .

• If , then .

• If , then .

• If , then .

###### Proof.

All cases are similar, and we only give the details for .

From (