Next Article in Journal
Finite Integration Method with Chebyshev Expansion for Shallow Water Equations over Variable Topography
Previous Article in Journal
Magnetic Coil’s Performance Optimization with Nonsmooth Search Algorithms
Previous Article in Special Issue
Application-Oriented Study of Next-Generation Alternant Codes over Gaussian Integers for Secure and Efficient Communication
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Optimal Linear Codes and Their Hulls

by
Stefka Bouyuklieva
* and
Mariya Dzhumalieva-Stoeva
Faculty of Mathematics and Informatics, St. Cyril and St. Methodius University of Veliko Tarnovo, 5003 Veliko Tarnovo, Bulgaria
*
Author to whom correspondence should be addressed.
Mathematics 2025, 13(15), 2491; https://doi.org/10.3390/math13152491
Submission received: 1 July 2025 / Revised: 25 July 2025 / Accepted: 30 July 2025 / Published: 2 August 2025
(This article belongs to the Special Issue Mathematics for Algebraic Coding Theory and Cryptography)

Abstract

The hull of a linear code C is the intersection of C with its dual code. The goal is to study the dimensions of the hulls of optimal binary and ternary linear codes for a given length and dimension. The focus is on the lengths at which self-orthogonal (respectively, LCD) optimal codes exist at fixed dimension.

1. Introduction

Let F q be a finite field with q elements and F q n be the n-dimensional vector space over F q . The (Hamming) distance d ( x , y ) between two vectors x = ( x 1 , , x n ) , y = ( y 1 , , y n ) F q n is the number of coordinate positions in which they differ, and the (Hamming) weight wt ( x ) of a vector x F q n is the number of its non-zero coordinates. A linear [ n , k , d ] q-ary code C is a k-dimensional subspace of the vector space F q n , and d is the smallest weight among all non-zero codewords of C, called the minimum weight (or minimum distance) of the code. By d q ( n , k ) , we denote the maximum value of the minimum distance d such that there exists a linear [ n , k , d ] q code. Linear [ n , k , d q ( n , k ) ] q codes are called d-optimal (or simply optimal, if it is clear that optimality is considered with respect to the minimum distance). In this research, we study and classify d-optimal linear codes over F 2 and F 3 .
If F q n is equipped with an inner product, the orthogonal complement C = { u F q n : u · v = 0 for all v C } of the linear [ n , k ] code C is its dual (or orthogonal) code. In this paper, we use only the standard Euclidean inner product x · y = i = 1 n x i y i for any two vectors x = ( x 1 , , x n ) , y = ( y 1 , , y n ) F q n . The intersection C C is called the hull of C and is denoted by H ( C ) . Since H ( C ) = H ( C ) , the dimension h ( C ) of the hull can be at least 0 and at most min { k , n k } . If h ( C ) = k , the code is called self-orthogonal, and then C C . If h ( C ) = 0 , the code is called a linear complementary dual (LCD) code.
The main goal of this work is to investigate the dimensions of the hulls of optimal linear codes over fields with 2 and 3 elements. The papers [1,2,3] are the basis of our interest in this problem. In [1], the authors study some properties of binary linear codes with various hull dimensions and prove a new mass formula for the number of these codes. They introduce the function d 2 ( n , k , ) , which gives the maximum possible minimum distance for which there exists a binary linear [ n , k , d = d 2 ( n , k , ) ] code C with h ( C ) = , and present some classification results for binary linear codes with various hull dimensions. The paper [2] is a continuation of the one already described, in which the authors continue their research, but on linear codes over larger finite fields. In addition, they present some classification results on ternary linear codes with various hull dimensions. These two papers investigate the following problem: To determine the value of the function d q ( n , k , ) and to construct and classify [ n , k , d q ( n , k , ) ] codes for given values of length n, dimension k and hull dimension over F q . We consider a slightly different problem, namely: To determine the hull dimensions of d-optimal linear [ n , k ] codes over F 2 and F 3 .
The authors in [3] analyze the sequence of numbers of linear codes with increasing hull dimension but the same length n and dimension k. They prove that the number of all q-ary linear codes of a given length n and dimension k decreases when the hull dimension increases, for all values of n, k n 2 and q. Furthermore, they present the conjecture that the same is true if we consider not the number of all codes, but only the inequivalent ones among them (with the only restriction that, in some cases, the number of inequivalent LCD codes may be less than the number of inequivalent codes with a one-dimensional hull). In addition, the authors classify all linear, self-orthogonal and LCD codes for various values of n and k over F 2 and F 3 . They pay special attention to the fact that such inequalities will not hold when only optimal codes are considered. This motivates us to study the optimal codes and see what happens to their hulls and whether their hull dimensions depend in any way on the other parameters.
The obtained results can be applied to the construction of entanglement-assisted quantum error-correcting codes (EAQECCs) [4,5,6]. An EAQECC with parameters [ [ n , k , d ; c ] ] encodes k logical qubits into n physical qubits with the help of c pre-shared entangled pairs. A useful relation between the parameters of a linear q-ary code with a given hull dimension and the parameters of an EAQECC is provided in ([5], Proposition 8). Specifically, if C is an [ n , k , d ] q linear code with dual distance d and hull dimension , then there exist EAQECCs with parameters [ [ n , k , d ; n k ] ] q and [ [ n , n k , d ; k ] ] q . We do not examine these EAQECCs further here, but checking their parameters could be an interesting direction for future work.
The paper is organized as follows. In Section 2, we present the necessary definitions and theorems. Section 3 and Section 4 are devoted to linear codes with dimensions 2 and 3, respectively. In Section 5, we study d-optimal binary linear codes and their hulls for 4 k 10 . Further, in Section 6, we consider optimal ternary linear codes. In the tables in Appendix A and Appendix B, we present our computational results with enumerations of optimal binary and ternary linear codes according to their hull dimensions.

2. Preliminaries

At the beginning, we give a simple proposition that allows us to consider only linear codes without zero coordinates. The dual distance of these codes is at least 2, where the dual distance d of a code C is the minimum distance of its dual code C .
Proposition 1.
If C is a linear [ n , k , d ] code, such that C = ( 0 | C ) , where C has effective length n < n , then h ( C ) = h ( C ) .
Let C be a linear [ n , k , d ] q code. A matrix whose rows form a basis of C is called its generator matrix. The weight enumerator of C is the polynomial W ( y ) = i = 0 n A i y i where A i is the number of codewords of weight i in the code. We also use the following types of binary linear codes defined using the weight enumerator: (1) if A i = 0 for all odd values of i, the code is even-like, and (2) if A n = 1 , the code is said to be self-complementary. The binary self-orthogonal codes are even-like, but there are even-like codes which are not self-orthogonal.
We also need the well-known Griesmer bound [7].
Theorem 1.
If C is a linear [ n , k , d ] q code then
n i = 0 k 1 d q i .
The codes that meet the Griesmer bound are called Griesmer codes. Obviously, Griesmer codes are d-optimal.
As we present some classification results, we need a definition for the equivalence of codes. Two linear q-ary codes C 1 and C 2 are equivalent if the codewords of C 2 can be obtained from the codewords of C 1 via a sequence of transformations of the following types:
(1)
Permutation on the set of coordinate positions;
(2)
Multiplication of the elements in a given position by a non-zero element of F q ;
(3)
Application of a field automorphism to the elements in all coordinate positions.
An automorphism of a linear code C is a sequence of transformations (1)–(3) that map each codeword of C onto a codeword of the same code. The set of all automorphisms of C forms a group called the automorphism group A u t ( C ) of the code.
For the considered Euclidean inner product, the dimension of the hull is an invariant of equivalent codes in the cases q = 2 and q = 3 , but if q 4 , any linear code over F q is equivalent to a Euclidean LCD code [8].
In this work, we use two classes of linear codes that are known to be unique up to equivalence for the given parameters. These are the simplex codes and the MacDonald codes. The q-ary simplex code S q , k is a linear code over F q generated by a k × θ ( q , k ) matrix G k having as columns a maximal set of nonproportional vectors from the vector space F q k , θ ( q , k ) = ( q k 1 ) / ( q 1 ) [9]. It is a one-weight code which means that all its non-zero codewords have the same weight q k 1 . In the binary case, S 2 , k has parameters [ 2 k 1 , k , 2 k 1 ] , and for k 3 , the code is doubly even. Note that all weights in a doubly even binary code are divisible by 4, and such code is self-orthogonal. The ternary simplex code S 3 , k has length ( 3 k 1 ) / 2 and minimum weight 3 k 1 . In our work, we need the following lemmas.
Lemma 1
([10], Theorem 1). Let C be an [ n , k , d ] code over F p , p a prime, meeting the Griesmer bound. If p e d , then p e is a divisor of C.
Lemma 2
([9], Theorem 1.4.10). A ternary linear code C is self-orthogonal if, and only if, all its weights are divisible by 3.
Lemma 3
([9], Theorem 1.4.8). If every codeword of a binary linear code C has weight divisible by four, then C is self-orthogonal.
According to these lemmas, the binary simplex codes for k 3 , as well as the ternary simplex codes, are self-orthogonal.
Let C T be the subcode of C consisting of all codewords in C that have zeros on T, where T { 1 , 2 , , n } is a set of coordinate positions. C T is called the shortened subcode of C on the set T. Puncturing C on the set T gives the punctured code C T , which is a linear code of length n | T | .
Theorem 2
([9], Theorem 1.5.7). Let C be an [ n , k , d ] q code, and T a set of t coordinate positions. Then: (i) ( C ) T = ( C T ) and ( C ) T = ( C T ) , and (ii) if t < d , then C T and C T have dimensions k and k t , respectively.
MacDonald codes are punctured simplex codes of length ( q k q u ) / ( q 1 ) for any k and 1 u k 1 . They have parameters [ ( q k q u ) / ( q 1 ) , k , q k 1 q u 1 ] q and are two-weight codes with non-zero weights q k 1 q u 1 and q k 1 . Adding t 1 times the simplex code of dimension k, we obtain the generalized [ ( t q k t q u + 1 ) / ( q 1 ) , k , t q k 1 q u 1 ] q MacDonald code. Generalized MacDonald codes were introduced by Dodunekov and Simonis in [11]. They proved that these codes are unique for their parameters. The same holds for t S q , k (the simplex code S q , k taken t times). The replicated simplex codes and the MacDonald codes are Griesmer codes.
For the computations, we have used the program Generation in the Software Package QextNewEdition v1.1 [12]. The classification algorithm implemented in this package is based on isomorph-free generation via canonical augmentation and it is described in detail in [13].
To compute the hull dimension of a linear binary or ternary code C of length n, we use the following formula
= dim ( C C ) = n dim ( C + C ) .
If G = ( I k A ) is a generator matrix of C in systematic form, the matrix ( A T I n k ) generates the dual code C and
dim ( C + C ) = r a n k I k A A T I n k ,
where I s is the identity matrix of order s. To calculate the rank of a matrix, we use Gaussian elimination.

3. Optimal Binary and Ternary Linear Codes of Dimension 2

For dimension 1, it is trivial that the only optimal binary SO codes are the even length repetition codes, i.e., [ 2 m , 1 , 2 m ] codes for m 1 . Similarly, the only optimal LCD codes are the odd length repetition codes, i.e., [ 2 m + 1 , 1 , 2 m + 1 ] codes for m 0 .
In the ternary case, the optimal code of length n and dimension 1 is the repetition [ n , 1 , n ] code. It is self-orthogonal, when n 0 ( mod 3 ) , and LCD otherwise.
For k = 2 , the optimal binary codes have minimum distance d 2 ( n , 2 ) = 2 n 3 [14]. A 2-dimensional binary code C with effective length n has a generator matrix in the form
G = 1 1 1 1 0 0 1 1 a 0 0 b 1 1 c ,
where a, b and c are nonnegative integers such that a + b + c = n . The possibilities for h ( C ) are as follows:
  • If a b c 0 ( mod 2 ) , C is a self-orthogonal code and so h ( C ) = 2 .
  • If one of the integers a, b or c is odd, and the other two are even, h ( C ) = 1 . If we take a b 0 ( mod 2 ) , then H ( C ) = { 0 , ( 11 1 a + b 00 0 c ) } .
  • In all other cases, C is an LCD code, so h ( C ) = 0 .
The hull dimension and the minimum distance of the optimal codes of dimension 2 with effective length n are presented in Table 1. Their parameters d and h depend on the residue of n modulo 6. It is worth mentioning that in the case n = 6 m + 4 , there are two inequivalent optimal binary [ 6 m + 4 , 2 , 4 m + 2 ] codes, one of which is self-orthogonal and the other is an LCD code. These codes have generator matrices G 1 and G 2 , respectively, where
G 1 = 1 1 1 1 0 0 1 1 2 m 0 0 2 m + 2 1 1 2 m + 2 , G 2 = 1 1 1 1 0 0 1 1 2 m + 1 0 0 2 m + 1 1 1 2 m + 2 .
There are three inequivalent [ 6 m + 1 , 2 , 4 m ] binary codes with the three possible values of the hull dimension, but the self-orthogonal code with these parameters actually has an effective length 6 m .
Consider now the ternary codes of dimension 2 with d 2 . The ternary simplex code of dimension 2 has a generator matrix (up to equivalence) G 3 , 2 = 0 1 1 1 1 0 1 2 . Let C be a ternary [ n , 2 , d 3 ( n , 2 ) ] code without zero columns. According to the Griesmer bound, n 4 m + r + r 3 , where d 3 ( n , 2 ) = 3 m + r , 0 r 2 . It follows that
d 3 ( n , 2 ) = 3 m i f n = 4 m o r 4 m + 1 , 3 m + 1 i f n = 4 m + 2 , 3 m + 2 i f n = 4 m + 3 .
In fact, to prove the above equality, we need examples of codes with the corresponding parameters. Without loss of generality, we can take a generator matrix for the ternary [ n , 2 , d 3 ( n , 2 ) ] code C in the form
G = 0 0 1 1 1 1 1 1 1 1 l 1 0 0 l 2 1 1 l 3 2 2 l 4 .
The only optimal [ 4 m , 2 , 3 m ] ternary code is the simplex code, repeated m times, and it is self-orthogonal, m 1 . Now, let n = 4 m + r and d = 3 m + r 1 , 1 r 3 . Without loss of generality, we can take l 1 l 2 l 3 l 4 and l 2 + l 3 + l 4 = d = 3 m + r 1 . Then, l 1 = n d = m + 1 . Using the presented equalities and inequalities for l 2 , l 3 and l 4 , we obtain the following possibilities for the code C:
  • l 1 = l 2 = l 3 = m + 1 and l 4 = m 2 . In this case, C has a weight enumerator W ( y ) = 1 + 6 y 3 m + 2 y 3 m + 3 , which shows that it is a self-orthogonal [ 4 m + 1 , 2 , 3 m ] code.
  • l 1 = l 2 = m + 1 , l 3 = m and l 4 = m 1 . Now, C is an LCD ternary [ 4 m + 1 , 2 , 3 m ] code with weight enumerator W ( y ) = 1 + 4 y 3 m + 2 y 3 m + 1 + 2 y 3 m + 2 .
  • l 1 = m + 1 and l 2 = l 3 = l 4 = m . The parameters of C are the same as in the previous two cases, but its hull has dimension 1, and its weight enumerator is W ( y ) = 1 + 2 y 3 m + 6 y 3 m + 1 .
  • l 1 = l 2 = l 3 = m + 1 and l 4 = m 1 . In this case, C has a weight enumerator W ( y ) = 1 + 6 y 3 m + 1 + 2 y 3 m + 3 , which shows that it is a ternary optimal [ 4 m + 2 , 2 , 3 m + 1 ] code. Now h ( C ) = 1 .
  • l 1 = l 2 = m + 1 and l 3 = l 4 = m . In this case, C is an LCD [ 4 m + 2 , 2 , 3 m + 1 ] code.
  • l 1 = l 2 = l 3 = m + 1 and l 4 = m , so C has parameters [ 4 m + 3 , 2 , 3 m + 2 ] . Then, the weight enumerator of C is W ( y ) = 1 + 6 y 3 m + 2 + 2 y 3 m + 3 , and its hull has dimension 1. We summarize these results in Table 2.

4. Optimal Binary Linear Codes of Dimension 3

The optimal self-orthogonal binary codes of dimension 3 are classified in [15]. We use a similar technique to obtain all inequivalent codes of this dimension and to compute their hulls.
Let
M = 0 0 0 1 1 1 1 0 1 1 0 0 1 1 1 0 1 0 1 0 1
be a generator matrix of the simplex code S 2 , 3 . To construct a binary linear [ n , 3 , d ] code C without zero coordinates, we use l i copies of the i-th column of M. We say that the code C is defined by the sequence ( l 1 , l 2 , , l 7 ) . Then, the length of C is l 1 + l 2 + + l 7 and its non-zero weights are l 4 + l 5 + l 6 + l 7 , l 2 + l 3 + l 6 + l 7 , l 2 + l 3 + l 4 + l 5 , l 1 + l 3 + l 5 + l 7 , l 1 + l 2 + l 4 + l 7 , l 1 + l 2 + l 5 + l 6 , and l 1 + l 3 + l 4 + l 6 . Since Aut ( S 2 , 3 ) G L ( 3 , 2 ) and is 2-transitive, we can take l 1 l 2 l j , j = 3 , , 7 , and l 4 l j , j = 5 , 6 , 7 [16]. As in [15], denote l 2 + l 3 = a 1 , l 4 + l 5 = a 2 , l 6 + l 7 = a 3 .
In our proofs, we also use the following lemma.
Lemma 4.
If the binary code C = ( C | t S 2 , 3 ) is obtained as a concatenation of the 3-dimensional code C and t copies of the simplex code S 2 , 3 , t 1 , then h ( C ) = h ( C ) .
Proof. 
The code t S 2 , 3 is doubly even and self-orthogonal. Therefore, if x i = ( u i , v i ) C , u i C , v i t S 2 , 3 , i = 1 , 2 , then x 1 · x 2 = u 1 · u 2 + v 1 · v 2 = u 1 · u 2 . Hence, x 1 · x 2 = 0 if, and only if, u 1 · u 2 = 0 . Since H ( C ) = { x C | x · y = 0 y C } , we have
H ( C ) = { x = ( u , v ) C , u C , v t S 2 , 3 | u H ( C ) } .
Since dim C = dim C , the only codeword of C with zeros in the last 7 t coordinates is the zero codeword. This gives us that h ( C ) = dim H ( C ) = dim H ( C ) = h ( C ) . □
Let n = 7 s + r , where 0 r 6 , s 0 . Then, 7 s + r = i = 1 7 l i 7 l 1 ; hence, l 1 s , and l 1 s + 1 if r 1 . We consider l 1 = s + r 1 , where r 1 0 if r = 0 , and r 1 1 if r 1 .
Using the Griesmer bound n d + d 2 + d 4 , we obtain n 7 s when d = 4 s , n 7 s + 3 when d = 4 s + 1 , n 7 s + 4 when d = 4 s + 2 , and n 7 s + 6 when d = 4 s + 3 . Let C be a binary [ 7 s + r , 3 , 4 s + d ( r ) ] , where
d ( r ) = 0 i f 0 r 2 , 1 i f r = 3 , 2 i f 4 r 5 , 3 i f r = 6 .
Using that a 1 + a 2 + a 3 = 7 s + r l 1 = 6 s + r r 1 and a i + a j 4 s + d ( r ) , we obtain
3 d ( r ) 2 ( r r 1 ) 2 r 1 2 r 3 d ( r ) .
Further, we consider the individual cases depending on the value of the parameter r:
  • ( r = 0 ) In this case, l 1 = l 2 = = l 7 = s and so there is a unique binary [ 7 s , 3 , 4 s ] code which is the repeated simplex code. This code is self-orthogonal.
  • ( r = 1 ) Now, l 1 = s + 1 and a 1 = a 2 = a 3 = 2 s . Using that l 2 l i for i = 3 , , 7 , and l 4 l j for j = 5 , 6 , 7 , we obtain three possibilities for the sequence ( l 1 , l 2 , , l 7 ) , namely:
    ( s + 1 , s , s , s , s , s , s ) The hull of the corresponding optimal [ 7 s + 1 , 3 , 4 s ] code C 1 has dimension 2.
    ( s + 1 , s + 1 , s 1 , s + 1 , s 1 , s 1 , s + 1 ) The corresponding optimal code in this case is a self-orthogonal code with a weight enumerator W ( y ) = 1 + 6 y 4 s + y 4 s + 4 .
    ( s + 1 , s + 1 , s 1 , s , s , s , s ) The corresponding optimal code has hull dimension 1.
  • ( r = 2 ) According to (2), r 1 = 1 or 2. Since a 1 + a 2 + a 3 = 6 s + 2 r 1 and a i + a j 4 s , we obtain a i 2 s + 2 r 1 , which gives us that 2 s 1 a i 2 s + 1 , { i , j } { 1 , 2 , 3 } . It follows that l 3 = a 1 l 2 2 s 1 s r 1 = s r 1 1 s 3 . Similarly, l i s 3 for all i = 4 , 5 , 6 , 7 . Therefore, if s > 3 , we can consider the code C as a concatenation of a linear [ 23 , 3 , 12 ] code C with s 3 copies of the simplex code S 7 . Therefore, it is enough to see what happens when s = 1 , 2 and 3.
    There are 8 inequivalent [ 9 , 3 , 4 ] codes without zero columns. The distribution of the dimensions of their hulls is presented in Table A1.
    The inequivalent [ 16 , 3 , 8 ] codes (with d 2 ) are 12. There is only one LCD code with these parameters. The enumeration of codes with these parameters and the possible dimensions of their hulls is given in Table A1.
    The enumeration of the linear [ 23 , 3 , 12 ] codes according to the dimensions of their hulls is the same as the [ 16 , 3 , 8 ] codes. Furthermore, the above reasoning and Lemma 4 prove that the enumeration of the linear [ 7 s + 2 , 3 , 4 s ] codes for s > 3 is the same.
  • ( r = 3 ) According to (2), in this case, r 1 = 1 . Since s + 1 l 2 l i for i = 3 , , 7 , and l 4 l j for j = 5 , 6 , 7 , we have l 2 = l 4 = s + 1 . Using similar considerations as in the second case, we obtain two possibilities for the code C, namely: (1) l 1 = l 2 = l 4 = s + 1 , l 3 = l 5 = l 6 = l 7 = s , so C has a weight enumerator W ( y ) = 1 + 4 y 4 s + 1 + 2 y 4 s + 2 + y 4 s + 3 and it is an LCD code, and (2) l 1 = l 2 = l 4 = l 7 = s + 1 , l 3 = l 6 = s , l 5 = s 1 . The corresponding code has a weight enumerator W ( y ) = 1 + 3 y 4 s + 1 + 3 y 4 s + 2 + y 4 s + 4 and h ( C ) = 1 , as the hull consists of the only doubly even codeword and the zero vector.
  • ( r = 4 ) There is a unique [ 7 s + 4 , 3 , 4 s + 2 ] 2 code. It is obtained from the sequence ( s + 1 , s + 1 , s , s + 1 , s , s , s + 1 ) and has a weight enumerator W ( y ) = 1 + 6 y 4 s + 2 + y 4 s + 4 . Its hull contains only one non-zero vector and this is the codeword of weight 4 s + 4 .
  • ( r = 5 ) In this case, the inequivalent codes are six and correspond to the sequences ( s + 2 , s + 2 , s 1 , s + 2 , s 1 , s 1 , s + 2 ) , ( s + 2 , s + 2 , s 1 , s + 1 , s , s , s + 1 ) , ( s + 2 , s + 1 , s , s + 1 , s , s + 1 , s ) , ( s + 2 , s + 1 , s , s + 1 , s , s , s + 1 ) , ( s + 1 , s + 1 , s , s + 1 , s + 1 , s , s + 1 ) , and ( s + 1 , s + 1 , s , s + 1 , s + 1 , s + 1 , s + 1 ) . The fourth code is LCD, and the last one is self-orthogonal. The other four codes have hulls with dimension 1.
  • ( r = 6 ) By similar considerations, we obtain only one possibility for a [ 7 s + 6 , 3 , 4 s + 3 ] code up to equivalence, corresponding to the sequence ( s + 1 , s + 1 , s + 1 , s + 1 , s + 1 , s + 1 , s ) , and it has a weight enumerator W ( y ) = 1 + 4 y 4 s + 3 + 3 y 4 s + 4 . The doubly even codewords form the hull of this code, and hence its hull dimension is h = 2 .
This completes the classification of the optimal binary codes of dimension 3 according to their hull dimensions.

5. Optimal Binary Codes

In this section, we present and analyze classifications of optimal binary linear codes with 3 k 10 and k + 1 n 40 . The results are presented in the tables given in Appendix A. We took the values of d 2 ( n , k ) from the Markus Grassl’s code tables [17].
Our enumerations are compared to the enumeration results for self-orthogonal codes in [15], for LCD codes in [18,19], and for codes with different hulls in [1]. Furthermore, we compared the classification results of the considered optimal codes with older classification results obtained with different software (see, for example, [14,20,21]). We give three examples.
  • The optimal [ 24 , 7 , 10 ] binary codes were first classified in [20] using two different software systems, namely, QExtension and Split. In the same paper, the authors presented classification results for optimal binary codes with dimensions up to 7. For example, the number of [ 40 , 7 , 18 ] codes is 172, the same that we get.
  • The classification results for binary self-orthogonal codes in [15] were obtained by two different methods and two independent algorithms. For example, the number of inequivalent self-orthogonal [ 22 , 7 , 8 ] codes is 117, the same as in Appendix A.
  • Let us look at the LCD [ 16 , 6 , 6 ] codes. According to [19], the inequivalent LCD codes with these parameters are 60, but two of them have dual distance 1. This means that they are obtained from [ 15 , 6 , 6 ] by adding a zero column.
First, we consider simplex, repeated simplex and MacDonald binary codes with dimension 4 k 10 . Binary codes with parameters [ ( 2 k 1 ) m , k , 2 k 1 m ] for k 3 and m 1 are unique linear codes with these parameters. They are optimal Griesmer self-orthogonal codes. Binary MacDonald codes and generalized MacDonald codes have parameters [ ( 2 k 1 ) m ( 2 u 1 ) , k , 2 k 1 m 2 u 1 ] . If k > u 3 , they are self-orthogonal. The corresponding codes, listed in Appendix A, have parameters [ 8 , 4 , 4 ] , [ 23 , 4 , 12 ] , [ 38 , 4 , 20 ] , [ 16 , 5 , 8 ] , [ 24 , 5 , 12 ] , and [ 32 , 6 , 16 ] .
If u = 1 , the corresponding code has parameters [ ( 2 k 1 ) m 1 , k , 2 k 1 m 1 ] . It is a punctured code of the repeated [ ( 2 k 1 ) m , k , 2 k 1 m ] simplex code with respect to one coordinate position i; its hull is the shortened code with respect to i and has dimension k 1 . In the case u = 2 , the parameters are [ ( 2 k 1 ) m 3 , k , 2 k 1 m 2 ] . Again, a code with these parameters can be obtained by puncturing the repeated simplex code but with respect to a set T = { i , j } of two coordinate positions. Its hull is the shortened code ( m S 2 , k ) T and has dimension k 2 . In the tables, these are the codes with parameters [ 14 , 4 , 7 ] , [ 12 , 4 , 6 ] , [ 29 , 4 , 15 ] , [ 27 , 4 , 14 ] , [ 30 , 5 , 15 ] , [ 28 , 5 , 14 ] .
The results listed in the tables show some regularities, which we summarize in the following.
  • If 2 k n , d 2 ( n , k ) 0 ( mod 4 ) and d 2 ( n 1 , k ) = d 2 ( n , k ) 1 , then all optimal [ n , k ] codes are self-orthogonal. Unfortunately, this is not true in the general case. It turns out that, although d 2 ( 27 , 13 ) = 8 and d 2 ( 26 , 13 ) = 7 , there exists a unique [ 27 , 13 , 8 ] code C 27 , but it is not self-orthogonal. The same applies to the unique [ 28 , 14 , 8 ] code C 28 . Actually, the hull of C 27 is the repeated code of this length and h ( C 28 ) = 2 .
  • If 2 k n , d 2 ( n , k ) 0 ( mod 4 ) and d 2 ( n 1 , k ) = d 2 ( n , k ) 1 , then all optimal [ n 1 , k ] codes have hulls with dimension k 1 . Although d 2 ( 26 , 13 ) = 7 , there is no optimal [ 26 , 13 , 7 ] code with hull dimension 12. In fact, there are three inequivalent [ 26 , 13 , 7 ] codes, two of which are LCD, and the third has a hull of dimension 1.
Although the above observations on codes with an optimal minimum distance multiple of 4 in the presented classification results turn out to be incomplete, if we add more restrictions, we can prove the following theorem.
Theorem 3.
If 2 k n , d = d 2 ( n , k ) = d 2 ( n 1 , k 1 ) 0 ( mod 4 ) , d 2 ( n 1 , k ) = d 2 ( n , k ) 1 , and all optimal binary [ n 1 , k 1 , d ] codes are self-orthogonal, then (1) all [ n , k , d = d 2 ( n , k ) ] codes are self-orthogonal, and (2) the hull of an [ n 1 , k , d 1 ] code has dimension k 1 .
Proof. 
As proven in Section 3, d 2 ( n , 2 ) = 4 m when n = 6 m or 6 m + 1 , but in the second case, d 2 ( n 1 , 2 ) = 4 m , and therefore, we consider only n = 6 m . The only binary [ 6 m , 2 , 4 m ] code is self-orthogonal. Moreover, there is a unique [ 6 m 1 , 2 , 4 m 1 ] binary code and its hull has dimension 1.
If k = 3 , d 2 ( n , 3 ) = 4 s and d 2 ( n 1 , 3 ) = 4 s 1 only if n = 7 s (see Section 4). There is a unique [ 7 s , 3 , 4 s ] code and it is self-orthogonal. If n = 7 s 1 , there is only one [ n , 3 , 4 s 1 ] binary code (up to equivalence) and its hull has dimension 2.
Let C be an optimal [ n , k , d ] code with k > 3 . Without loss of generality, we can take a generator matrix of C in the form
G = 100 x 1 010 x 2 001 x 3 O G ,
where G generates an [ n 3 , k 3 , d ] code C .
The matrix
G i , j = 10 x i 01 x j O G
generates a binary [ n 1 , k 1 , d ] code C i , j , 1 i < j 3 . According to the requirements in the condition of the theorem, C i , j must be a self-orthogonal code, 1 i < j 3 . Hence, x s C for s = 1 , 2 , 3 , and x p · x q = 0 for 1 p < q 3 . Moreover, x 1 , x 2 and x 3 are vectors of odd weight. This proves that C is a self-orthogonal code. □
Next, we continue with our observations on the results presented in the tables.
  • The only optimal [ n , n 1 , 2 ] code is the parity-check code of length n. If n is odd, then it is an LCD code, but if n is even, its hull has dimension 1 and contains the all-ones vector.
  • The optimal binary [ 16 , 8 , 5 ] , [ 17 , 8 , 6 ] and [ 17 , 9 , 5 ] codes are unique for their parameters and all are LCD codes.
  • Let d 2 ( n , k ) = 4 m + 2 and d 2 ( n 1 , k ) = 4 m + 1 . If C is a binary [ n , k , d 2 ( n , k ) ] code, then h ( C ) k ( mod 2 ) . For example, there exists a unique [ 38 , 6 , 18 ] code and its hull has dimension 2, the two inequivalent [ 30 , 6 , 14 ] codes have hull dimension 4, and the six [ 24 , 7 , 10 ] codes have hulls with dimension 1 (3 codes), 3 (2 codes) and 5 (1 code). The LCD codes in this case (presented in the tables) have parameters [ 20 , 4 , 10 ] , [ 35 , 4 , 18 ] , [ 15 , 6 , 6 ] , [ 23 , 6 , 10 ] , [ 17 , 8 , 6 ] , [ 26 , 8 , 10 ] , [ 20 , 10 , 6 ] and [ 28 , 10 , 10 ] . None of the codes is self-orthogonal.
Proposition 2.
Let C be an [ n , k , d = d 2 ( n , k ) ] code with d 2 ( n , k ) = 4 m + 2 . If d 2 ( n , k 1 ) 4 m + 3 , then C is not self-orthogonal.
Proof. 
Obviously, if n < 2 k , the code is not self-orthogonal. Suppose that n 2 k and C is a self-orthogonal code. If C 0 is the doubly even subcode of C, then C 0 is a [ n , k 1 , 4 m + 4 ] code that contradicts d 2 ( n , k 1 ) 4 m + 3 . Therefore, C cannot be a self-orthogonal code. □

6. Optimal Ternary Codes

We classified ternary linear [ n , k , d 3 ( n , k ) ] codes for most integers 3 k 8 and k n 40 . It is worth mentioning that a ternary linear code is self-orthogonal if, and only if, all its weights are divisible by 3 (see Lemma 3). Moreover, the simplex code, repeated m times, m 1 , is the only optimal code of the corresponding length and dimension, and it is also self-orthogonal. This means that the only optimal [ 3 k 1 2 m , k , 3 k 1 m ] code is self-orthogonal. These are the codes with parameters [ 13 , 3 , 9 ] , [ 26 , 3 , 18 ] , [ 39 , 3 , 27 ] and [ 40 , 4 , 27 ] , which are presented in the tables in the appendix. The codes with parameters [ 9 , 3 , 6 ] , [ 27 , 4 , 18 ] and [ 36 , 4 , 24 ] are MacDonald codes, while the linear [ 22 , 3 , 15 ] and [ 35 , 3 , 24 ] are generalized MacDonald codes, and therefore, they are self-orthogonal.
In the ternary case, we prove a theorem, similar to Theorem 3.
Theorem 4.
If 2 k n , d = d 3 ( n , k ) = d 3 ( n 1 , k 1 ) 0 ( mod 3 ) , d 3 ( n 1 , k ) = d 3 ( n , k ) 1 , and all optimal ternary [ n 1 , k 1 , d ] codes are self-orthogonal, then (1) all [ n , k , d = d 3 ( n , k ) ] codes are self-orthogonal, and (2) the hull of an [ n 1 , k , d 1 ] code has dimension k 1 .
Proof. 
As in the proof of Theorem 3, we consider three cases with respect to the dimension of the codes. If k = 2 and d = 3 m , the length n must be equal to 4 m . The only [ 4 m , 2 , 3 m ] code is self-orthogonal (Section 3).
Let k = 3 and d = 9 m + 3 r , 0 r 2 , m 1 . According to the Griesmer bound, n 13 m + 4 r + 1 . Lemma 3 and Lemma 1 give us that all Griesmer [ n = 13 m + 4 r + 1 , 3 , 9 m + r ] codes are self-orthogonal. There is only one [ 13 m , 3 , 9 m ] code, namely, the ternary simplex code, repeated m times. For r = 1 and r = 2 , the corresponding Griesmer codes have parameters [ 13 m + 5 , 3 , 9 m + 3 ] and [ 13 m + 9 , 3 , 9 m + 6 ] . Such codes exist and they are self-orthogonal.
Let C be an optimal [ n , k , d = 3 m ] code with k > 3 . We take a generator matrix of C in systematic form:
G = 100 x 1 010 x 2 001 x 3 O G ,
where G generates an [ n 3 , k 3 , d ] code C .
The matrix
G i , j = 10 x i 01 x j O G
generates a ternary [ n 1 , k 1 , 3 m ] code C i , j , 1 i < j 3 . According to the requirements in the condition of the theorem, C i , j must be a self-orthogonal code. Hence, x s C and wt ( x s ) 2 ( mod 3 ) for s = 1 , 2 , 3 , and x p · x q = 0 for 1 p < q 3 . This proves that C is a self-orthogonal code. □
Remark 1.
In the tables in Appendix B, there are cases for which d = d 3 ( n , k ) = 3 m and d 3 ( n 1 , k ) = 3 m 1 , but nevertheless there are [ n , k , d ] ternary codes that are not self-orthogonal. This is because in these cases, not all optimal ternary [ n 1 , k 1 , d ] codes are self-orthogonal. A more detailed look at these cases, presented in the tables, shows the following:
  • If d 3 ( n , 3 ) = 3 m and d 3 ( n 1 , 3 ) = 3 m 1 for 2 m 9 , all optimal [ n , 3 , 3 m ] 3 codes are self-orthogonal. In all cases except m = 4 and 7, these codes are unique. There are two inequivalent [ 18 , 3 , 12 ] and again two inequivalent [ 31 , 3 , 21 ] ternary codes. In the case m = 1 , there are four [ 6 , 3 , 3 ] ternary codes and none of them is self-orthogonal.
  • If d 3 ( n , 4 ) = 3 m and d 3 ( n 1 , 4 ) = 3 m 1 for 2 m 9 , all optimal [ n , 4 , 3 m ] 3 codes are self-orthogonal except in the case m = 5 , when there are [ 24 , 4 , 15 ] codes with all possible hull dimensions.
  • For all parameters for which we were able to classify the optimal codes, we observe the following regularity: If d 3 ( n , k ) = 3 m for 2 m , then there exists a [ n , k , 3 m ] self-orthogonal code with the exception of one case, namely, [ 14 , 7 , 6 ] , when there is only one code up to equivalence and it is LCD.

7. Conclusions

In this work, we have investigated optimal linear codes over the finite fields F 2 and F 3 , focusing on the dimension of their hulls. To this end, we performed an extensive classification of binary linear codes with the largest possible minimum distance for lengths n 40 and dimensions k 10 , with the exception of certain parameter sets where the number of inequivalent codes is prohibitively large. Additionally, we classified ternary linear codes for a substantial range of parameters with n 40 and k 8 . For all classified codes, we computed the dimension of their hulls.
The results are organized and presented in tabular form in Appendix A and Appendix B, providing a comprehensive overview of the data. Several patterns and regularities emerge from the analysis. In some cases, we were able to rigorously describe and prove these regularities. In others, the observations suggest deeper structural properties that merit further investigation.
Finally, we would like to point out several interesting problems for future research.
  • For which values of k are the optimal [ 2 k , k , d 2 ( n , k ) ] binary codes not self-dual?
  • For which values of n and k, such that n 2 k , d 2 ( n , k ) 0 ( mod 4 ) and d 2 ( n 1 , k ) = d 2 ( n , k ) 1 , do there exist optimal [ n , k , d 2 ( n , k ) ] binary codes that are not self-orthogonal?
  • For which values of k 0 ( mod 3 ) are the optimal [ 2 k , k , d 3 ( n , k ) ] ternary codes not self-dual?
  • For which values of n, k and q { 2 , 3 } do there exist optimal [ n , k , d q ( n , k ) ] LCD codes?
  • It would be of interest to check the parameters of the corresponding EAQECCs in future research.

Author Contributions

Conceptualization, S.B.; methodology, S.B.; software, M.D.-S.; validation, S.B. and M.D.-S.; formal analysis, S.B.; investigation, S.B. and M.D.-S.; resources, S.B. and M.D.-S.; data curation, S.B. and M.D.-S.; writing—original draft preparation, S.B. and M.D.-S.; writing—review and editing, S.B. and M.D.-S.; visualization, M.D.-S.; supervision, S.B.; project administration, S.B.; funding acquisition, S.B. and M.D.-S. All authors have read and agreed to the published version of the manuscript.

Funding

This research is partially supported by the Bulgarian Science Fund under Contracts KP-06-H62/2/13.12.2022 and FSD-31-328-09/23.04.2025.

Data Availability Statement

Bouyuklieva, S., Dzhumalieva-Stoeva, M. (2025). Optimal linear codes and their hulls [Data set]. Zenodo. https://doi.org/10.5281/zenodo.15771416 (accessed on 22 July 2025).

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
LCDLinear Complementary Dual Code
SOSelf-Orthogonal Code

Appendix A. Optimal Binary Codes

Table A1. Enumeration of optimal binary linear [ n , 3 , d ] codes.
Table A1. Enumeration of optimal binary linear [ n , 3 , d ] codes.
h(C)
ndAll Codes0123
421 1
52312
631 1
741 1
843 111
9481421
105211
1161 1
126614 1
1371 1
1481 1
1583 111
168121623
179211
18101 1
1910614 1
20111 1
21121 1
22123 111
2312121623
2413211
25141 1
2614614 1
27151 1
28161 1
29163 111
3016121623
3117211
32181 1
3318614 1
34191 1
35201 1
36203 111
3720121623
3821211
39221 1
4022614 1
Table A2. Enumeration of optimal binary linear [ n , 4 , d ] codes.
Table A2. Enumeration of optimal binary linear [ n , 4 , d ] codes.
h(C)
ndAll Codes01234
5211
6253 2
731 1
841 1
9441 12
1041942913
1151 1
1261 1
1366213
1471 1
1581 1
1684 112
1781821852
188108201950910
1997241
201031 2
21102710412 1
22112 2
23121 1
2412101 324
25126411629126
26132 11
27141 1
281412218 1
29151 1
30161 1
31164 112
321630211359
331622039321023116
34179243
351831 2
36183910423 2
37192 2
38201 1
3920101 324
402086116401217
Table A3. Enumeration of optimal binary linear [ n , 5 , d ] codes.
Table A3. Enumeration of optimal binary linear [ n , 5 , d ] codes.
Allh(C)
ndCodes012345
6211
72624
822771523
9352111
1044 2 11
114304115811
1242153387404375
13515564
1466 3 3
1571 1
1681 1
1784 121
18834 621655
19841120159771202510
2093111
21102 1 1
221037124210
23111 1
24121 1
25127 1 222
26121221376511413
27131 1
28141 1
29148 215
30151 1
31161 1
32165 113
331632 211388
34165832159422635463
351622,26797911,58326306004691380
3617701520305
371814 7 7
38187371544837234 3
39197 7
40203 3
Table A4. Enumeration of optimal binary linear [ n , 6 , d ] codes.
Table A4. Enumeration of optimal binary linear [ n , 6 , d ] codes.
Allh(C)
ndCodes0123456
7211
8285 3
92451717101
1034211
11421 1
124411041925 1
134580135174179552971
145114331
15652 2 1
166180581190317 1
1773 3
1882 2
198282 6 1172
2081833392859221302552623
218146,94648,67135,18052,5226370387427257
229248105923516
23102914 13 2
241011,0854434265600957319 1
25115 5
26122 2
271217824 49 631824
281279,30221,136121445,78319128196678383
29132 2
30142 2
31151 1
32161 1
33163 12
341632 1212215
35162041102258449798144362
36161,820,927424,62315,5981,056,20726,968260,39016,74920,392
37172 2
38181 1
39182034419312112399
Table A5. Enumeration of optimal binary linear [ n , 7 , d ] codes.
Table A5. Enumeration of optimal binary linear [ n , 7 , d ] codes.
Allh(C)
ndCodes01234567
821 1
921037
10271204056
1133111
1242 1 1
1344542361011
1441488297652263222302121
155611211
1663 1 1 1
17637772571090310
1872 2
1981 1
20826 2 4 1154
21811,4701978569129521713194715
2285,400,239626,3063,658,868360,139719,86321,04313,448455117
23929119612
27121 1
2812129 6 12 381261
29122,456,2471451,516,730479813,8752165110,60065595694
3113533736720841144
321436 6 17 13
341519 19
35164 4
36168170 13 53 549717484
3917564941637318152092836
4018172 33 62 77
Table A6. Enumeration of optimal binary linear [ n , 8 , d ] codes.
Table A6. Enumeration of optimal binary linear [ n , 8 , d ] codes.
Allh(C)
ndCodes012345678
9211
102128 4
1121074239242
1232 11
1341 1
14448872517
15434739771118102323410885
16511
17611
186918337 518 56 7
1971 1
2081 1
21812 1 542
22846,68814,330 27,9521539151143103616
25914,612,0295,619,3396,349,1162,081,185519,10036,7326557
2610563,960216,675 325,509 21,519 257
28112016 2016
291273 73
30125,279,162740,017 2,560,999 1,362,7863484,82525,333105,199
321313 103
33142 2
35153 3
36162 2
371617,276 5 772217,172
Table A7. Enumeration of optimal binary linear [ n , 9 , d ] codes.
Table A7. Enumeration of optimal binary linear [ n , 9 , d ] codes.
Allh(C)
ndCodes0123456789
1021 1
11214410
12215947891112
1331 1
1441 1
15443218714
1647456177034391224893775012
17511
1861 1
196170031328 344 21 4
2071 1
2181 1
2289 432
23840,279 23,499 14,509 1938921993012
248* 124
258* 1891
269819,610334,675337,753124,56520,5811928108
271030,481 24,989 5416 76
2911134 134
30129 9
3112795,605 3140 8570 18,092 66,5953362695,846
37151229 1229
381647 47
* In these cases only self-orthogonal are classified.
Table A8. Enumeration of optimal binary linear [ n , 10 , d ] codes.
Table A8. Enumeration of optimal binary linear [ n , 10 , d ] codes.
Allh(C)
ndCodes012345678910
11211
12217116
1322269181504
1431 1
1541 1
164477 22511 2
17414,3904550453741797093733210
18411,581,3614,535,8344,693,8651,970,656325,14152,6082710533113
19531,23711,55413,567473112111303464
2061682601 980 90 8 3
2171 1
2281 1
2388 332
2485168358162125 1798 643681382216
258* 60
268* 1689
2791668558185
2810115 4 2
30112 2
31122 2
* In these cases only self-orthogonal are classified.

Appendix B. Optimal Ternary Codes

Table A9. Enumeration of optimal ternary linear [ n , 3 , d ] codes.
Table A9. Enumeration of optimal ternary linear [ n , 3 , d ] codes.
h(C)
ndAll Codes0123
4211
52422
634211
74211
851 1
961 1
10661221
1171 1
1281 1
1391 1
1493 111
15935101564
161012462
171141 3
18122 2
19122341054
20135131
21142 2
22151 1
2315101423
24162 11
25171 1
26181 1
27186 114
28187915371314
2919174103
302061 5
31212 2
32213141458
33226132
34232 2
35241 1
3624151428
37252 11
38261 1
39271 1
40276 114
Table A10. Enumeration of optimal ternary linear [ n , 4 , d ] codes.
Table A10. Enumeration of optimal ternary linear [ n , 4 , d ] codes.
h(C)
ndAll Codes01234
5211
627331
734211
8432 1
951 1
1061 1
11671 321
12635314612563136
137724218111
1481436 5
1593 3
16931712479841713
171018837
18112 2
19121 1
20128414527632
211244,28421,75711,9999517605406
22132641141856464910
23141651571277
241517111113
25161 1
26171 1
27181 1
281810 226
2918824626325538406
30198233
31202 1 1
32211 1
332173147358
34223 12
35231 1
36241 1
372416 13210
38251 1
39261 1
40271 1
Table A11. Enumeration of optimal ternary linear [ n , 5 , d ] codes.
Table A11. Enumeration of optimal ternary linear [ n , 5 , d ] codes.
Allh(C)
ndCodes012345
621 1
729531
833111
941 1
1051 1
1161 1
1268 1 322
136503725761876448113204
14723682138610
15841 3
1691 1
17918044008821722922335
18107 7
19112 2
20122 2
2112412 4211359
221221,008,4247,122,12210,499,2521,564,4441,659,28456,305107,017
231323,829354114,9551215212
24144441 443
251523 23
2615915,718466431,632175666,0782450809,138
271611 101
28173 3
29181 1
3421442 442
38241 1
Table A12. Enumeration of optimal ternary linear [ n , 6 , d ] codes.
Table A12. Enumeration of optimal ternary linear [ n , 6 , d ] codes.
Allh(C)
ndCodes0123456
7211
821375
93311 1
1041 1
1151 1
1261 1
13691 431
14647,67427,77615,3163978480105154
157221039
1782,145,181807,9931,195,54350,57389,705131354
1891714339 191105
211113,0213411147212,827
2212701 21698
241310 10
25142 2
26152 2
Table A13. Enumeration of optimal ternary linear [ n , 7 , d ] codes.
Table A13. Enumeration of optimal ternary linear [ n , 7 , d ] codes.
Allh(C)
ndCodes01234567
8211
9216862
10321 1
113399201147438
12484444030584132
13562 3 1
14611
156129,27370,59549,547730716351513332
188827,459450,403142,245219,391270011,758 962
19961 61
Table A14. Enumeration of optimal ternary linear [ n , 8 , d ] codes.
Table A14. Enumeration of optimal ternary linear [ n , 8 , d ] codes.
Allh(C)
ndCodes012345678
921 1
102211272
11311
12380543128871132
13422861343792136141
14511
16683,55150,63423,92285093601241 1
20923 23

References

  1. Li, S.; Shi, M. Characterization and Classification of Binary Linear Codes with Various Hull Dimensions from an Improved Mass Formula. IEEE Trans. Inform. Theory 2024, 70, 3357–3372. [Google Scholar] [CrossRef]
  2. Li, S.; Shi, M.; Ling, S. A Mass Formula for Linear Codes with Prescribed Hull Dimension and Related Classification. IEEE Trans. Inform. Theory 2025, 71, 273–286. [Google Scholar] [CrossRef]
  3. Bouyuklieva, S.; Bouyukliev, I.; Özbudak, F. Sequence of Numbers of Linear Codes with Increasing Hull Dimensions. arXiv 2025, arXiv:2402.01255v2. [Google Scholar]
  4. Kim, J.L. Binary optimal linear codes with various hull dimensions and entanglement-assisted QECCs. Comp. Appl. Math. 2023, 42, 114. [Google Scholar] [CrossRef]
  5. Sok, L.; Qian, G. Linear codes with arbitrary dimensional hull and their applications to EAQECCs. Quantum Inf. Process. 2022, 21, 72. [Google Scholar] [CrossRef]
  6. Guenda, K.; Jitman, S.; Gulliver, T.A. Constructions of good entanglement-assisted quantum error correcting codes. Des. Codes Cryptogr. 2018, 86, 121–136. [Google Scholar] [CrossRef]
  7. Griesmer, J.H. A bound for error-correcting codes. IBM J. Res. Develop. 1960, 4, 532–542. [Google Scholar] [CrossRef]
  8. Carlet, C.; Mesnager, S.; Tang, C.; Qi, Y.; Pellikaan, R. Linear codes over F q are equivalent to LCD codes for q > 3. IEEE Trans. Inform. Theory 2018, 64, 3010–3017. [Google Scholar] [CrossRef]
  9. Huffman, W.C.; Pless, V. Fundamentals of Error-Correcting Codes; Cambridge University Press: Cambridge, UK, 2003. [Google Scholar] [CrossRef]
  10. Ward, H.N. Divisibility of codes meeting the Griesmer bound. J. Comb. Theory 1998, A 83, 79–93. [Google Scholar] [CrossRef]
  11. Dodunekov, S.; Simonis, J. Codes and projective multisets. Electron. J. Combin. 1998, 5, 1–23. [Google Scholar] [CrossRef] [PubMed]
  12. Bouyukliev, I. The Program Generation in the Software Package QextNewEdition. In Mathematical Software–ICMS 2020; Lecture Notes in Computer Science; Bigatti, A., Carette, J., Davenport, J., Joswig, M., de Wolff, T., Eds.; Springer: Cham, Switzerland, 2020; Volume 12097. [Google Scholar] [CrossRef]
  13. Bouyukliev, I.; Bouyuklieva, S.; Kurz, S. Computer classification of linear codes. IEEE Trans. Inform. Theory 2021, 67, 7807–7814. [Google Scholar] [CrossRef]
  14. Jaffe, D.B. Optimal binary linear codes of length ≤ 30. Discrete Math. 2000, 223, 135–155. [Google Scholar] [CrossRef]
  15. Bouyukliev, I.; Bouyuklieva, S.; Gulliver, T.A.; Östergård, P. Classification of optimal binary self-orthogonal codes. J. Combin. Math. Combin. Comput. 2006, 59, 33–87. [Google Scholar]
  16. Pless, V. A classification of self-orthogonal codes over GF(2). Discrete Math. 1972, 3, 209–246. [Google Scholar] [CrossRef]
  17. Markus Grassl. Bounds on the Minimum Distance of Linear Codes and Quantum Codes. Available online: http://www.codetables.de (accessed on 22 July 2025).
  18. Bouyuklieva, S. Optimal binary LCD codes. Des. Codes Cryptogr. 2021, 89, 2445–2461. [Google Scholar] [CrossRef]
  19. Harada, M.; Saito, K. Binary linear complementary dual codes. Cryptogr. Commun. 2019, 11, 677–696. [Google Scholar] [CrossRef]
  20. Bouyukliev, I.; Jaffe, D.B. Optimal binary linear codes of dimension at most seven. Discret. Math. 2001, 226, 51–70. [Google Scholar] [CrossRef]
  21. Bouyukliev, I.; Simonis, J. Some new results for optimal ternary linear codes. IEEE Trans. Inform. Theory 2002, 48, 981–985. [Google Scholar] [CrossRef]
Table 1. Optimal binary codes of dimension 2.
Table 1. Optimal binary codes of dimension 2.
n 6 m 6 m + 1 6 m + 2 6 m + 3 6 m + 4 6 m + 5
d 4 m 4 m 4 m + 1 4 m + 2 4 m + 2 4 m + 3
h20 or 1000 or 21
Table 2. Optimal ternary codes of dimension 2.
Table 2. Optimal ternary codes of dimension 2.
n 4 m 4 m + 1 4 m + 2 4 m + 3
d 3 m 3 m 3 m + 1 3 m + 2
h20, 1, or 20 or 11
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Bouyuklieva, S.; Dzhumalieva-Stoeva, M. Optimal Linear Codes and Their Hulls. Mathematics 2025, 13, 2491. https://doi.org/10.3390/math13152491

AMA Style

Bouyuklieva S, Dzhumalieva-Stoeva M. Optimal Linear Codes and Their Hulls. Mathematics. 2025; 13(15):2491. https://doi.org/10.3390/math13152491

Chicago/Turabian Style

Bouyuklieva, Stefka, and Mariya Dzhumalieva-Stoeva. 2025. "Optimal Linear Codes and Their Hulls" Mathematics 13, no. 15: 2491. https://doi.org/10.3390/math13152491

APA Style

Bouyuklieva, S., & Dzhumalieva-Stoeva, M. (2025). Optimal Linear Codes and Their Hulls. Mathematics, 13(15), 2491. https://doi.org/10.3390/math13152491

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop