An Algorithm for Classification of Binary Self-Dual Codes

An efficient algorithm for classification of binary self-dual codes is presented. As an application, a complete classification of the self-dual codes of length 38 is given.

Authors: Stefka Bouyuklieva, Iliya Bouyukliev

On the Classificati on of Binary Self-Dual Co des Stefk a Bouyukliev a, F acult y of Mathematics and In formatics, V elik o T arno v o Univers it y , Bulgaria, Iliy a Bouyukliev, Institute of Mathematics and Informatics, Bulgarian Academ y of Science s, V elik o T arnov o, Bulgaria W e dedicate this researc h to our teac her S tefan Dodu nek o v on the occasion of his 65th birthday . Abstract An efficient a lgorithm for classification of binary self-dual co des is pres ent ed. As an application, a complete classification o f the self-dual co des of length 3 8 is given. Index T erms: Self-dual c o des, Classific ation, Isomorph-fr e e gener ation 1 In tro duction The s elf-du al co des form one of the imp ortant classes of linear cod es b ecause of their ric h algebraic structure and their close conn ections with other combinatorial configur ations like blo c k designs, lattices, graph s, etc. The classification of self-dual co des b egan in the sev ent ies in the w ork of V era Pless [20], wh ere she classified the binary self-dual co des of length n ≤ 20. Th e m etho d used in the b eginning remained essential ly the same throughout th e succeeding classifications. T h is is a recursiv e classification which p ro ceeds fr om sm aller to larger length and co des are classified up to equiv alence. T h e pro cess b egins w ith the formula for the num b er of all self-du al cod es of length n called a mass formula. The num b er of the self-dual binary co d es of even length n is N ( n ) = Q n/ 2 − 1 i =1 (2 i + 1). Throughout this pap er all cod es are assu med to b e b inary . Tw o binary co d es are called e quiv alent if one can b e obtained from the other by a p erm utation of co ordin ates. The p ermutatio n σ ∈ S n is an automorphism of C , if C = σ ( C ) and the set of all automorphisms of C forms a group called the automorph ism gr oup of C , wh ic h is denoted by Aut( C ) in this pap er. If C has length n , th en the n umber of codes equ iv alen t to C is n ! / | Aut( C ) | . T o classify 1 self-dual co des of length n , it is necessary to find inequiv alent self-dual co des C 1 , . . . , C r so that the follo wing mass formula holds: r X i =1 n ! | Aut( C i ) | = N ( n ) . (1) In the sur v ey [12] Huffman summarized the classification of all binary self-dual co des of length n ≤ 36. As the complete classifications for lengths 34 and 36 w as not done at that time, we present here a new ve rsion of T able 1 from [12 ], but instead of the question marks w e put the correct num b ers. Moreo v er, we extend the table w ith t w o more lengths - 38 and 40. The num b er of all inequiv alen t singly-ev en (Type I) and doubly-ev en (T yp e I I) co d es is denoted by ♯ I and ♯ I I , resp ectiv ely . In the table d max,I ( d max,I I ) is the b iggest p ossible minim um distance for whic h Type I (T yp e I I) co des with the giv en length exist, and ♯ max,I ( ♯ max,I I ) is their num b er. The classification of the self-dual co des of length 34 wa s giv en in [3]. Using the self- dual [34 , 17 , 6] co d es, Melc h or and Gab orit classified the optimal self-dual co des of length 36, namely the [36 , 18 , 8] co des [19]. Recen tly , Harada and Mun emasa in [11] completed the classification of the self-dual co d es of length 36 and created a database of self-dual co des [10]. The doubly-eve n self-dual co des of length 40 w ere also classified by Betsumiy a, Harada and Munemasa [2]. Moreo ver, us ing these co des, they classified the optimal s elf-dual [38 , 19 , 8] co des. A classification of extremal self-dual codes of length 38 w as ve ry recen tly obtained also in [1] by s omewhat d ifferen t techniques. Actually , the construction itself is easy , the equiv alence test is th e d ifficult p art of the classification. Because of that, for the larger length the recursiv e constructions are used preferably heuristic, for building examples for co des with some prop erties. There are also man y partial classifications, namely classifications of self-du al co des with sp ecial pr op erties, for example self-dual co des in v ariant un der a giv en p erm utation, or self-dual co des connected with com binatorial designs with giv en p arameters. These classifications are not recurs iv e b ut they us e co des with smaller lengths that is w h y the full classification is very imp ortant in these cases, to o. In th is pap er, we present an algorithm for generating binary self-dual cod es wh ic h giv es as output exactly one r ep resen tativ e of eve ry equ iv alence class. T o dev elop this algorithm, w e use an approac h introd u ced b y Brend an McKa y kn o wn as isomorph-fr e e exhaustive ge n- er ation [18]. T he constructive part of the algorithm is not different from th e other recursive constructions for self-dual co des, b ut to take only one repr esen tativ e of an y equiv alence class, w e u se a completely differen t manner. Th is appr oac h change s extremely the s p eed of gener- ation of th e inequiv alent co des of a give n length. Its sp ecial feature is that p ractically there is n ot equiv alence test for the ob jects. As a resu lt, the classification of all binary self-dual co d es of length 38 is presente d. Th e n umber of th ese co des is given in the f ollo wing th eorem and also listed in T able 1. Theorem 1 Ther e ar e 38 682 183 ine quivalent self-dual c o des of leng th 38 . 2 In S ection 2 we present the theoretical foundations of our construction metho d. W e de- scrib e a recursive construction of binary self-dual cod es. The aim is to obtain all inequiv alent self-dual co des of dim en sion k on the b ase of the in equiv alen t self-du al cod es of dimension k − 1. In Section 3 we describ e the u sed algo rithm. Co d es w hic h are equiv alen t b elong to the same equiv alence class. Every co d e can serv e as a representat iv e for its equiv alence class. W e use th e concept for a canonical representat iv e, selected on the base of some sp ecific cond itions. This canonical repr esen tativ e is in tended to make easily a distinction b et ween the equiv alence classes. In Section 4 w e giv e the results with some more information ab out the obtained co d es. T able 1: Binary self-dual co des of length n ≤ 40 [12] n ♯ I ♯ I I d max,I ♯ max,I d max,I I ♯ max,I I Reference 2 1 2 1 [20] 4 1 2 1 [20] 6 1 2 1 [20] 8 1 1 2 1 4 1 [20] 10 2 2 2 [20] 12 3 4 1 [20] 14 4 4 1 [20] 16 5 2 4 1 4 2 [20] 18 9 4 2 [20] 20 16 4 7 [20] 22 25 6 1 [22] 24 46 9 6 1 8 1 [22] 26 103 6 1 [7, 8, 21] 28 261 6 3 [7, 8, 21] 30 731 6 13 [7, 8, 21] 32 3210 85 8 3 8 5 [4, 7, 9] 34 24147 6 938 [3] 36 51949 2 8 41 [11, 19] 38 38682 183 8 2744 this pap er, [1, 2 ] 40 ? 94343 8 ? 8 16470 [2] 2 Recursiv e Constructions of Self-Dual Co des In this section w e describ e a r ecur siv e constru ction of binary self-dual co des. T h e aim is to obtain all inequiv alent self-dual co des of length n = 2 k and d imension k on the b ase of the 3 inequiv alen t self-dual co des of d imension k − 1. Theorem 3 giv es u s the p ossibilit y to d ev elop suc h a recur s iv e algorithm. Actually , this theorem presen ts a well kno w n pr op ert y of the self-dual co des but usually the authors state it in the case d ≥ 4 (see f or example [11]). Here w e give a v ariant for all d but for that we need the follo w in g lemma. Lemma 2 If C is a b i nary self-dual c o de then C do es not have mor e than two e qual c o or- dinates. In other wor ds, if x i 1 = x i 2 = · · · = x i s for any c o dewor d x = ( x 1 , x 2 , . . . , x n ) ∈ C then s ≤ 2 . Pr o of. If n = 2 then C = i 2 = { 00 , 11 } and C h as only t wo co ord inates. Let n ≥ 4. Since the d imension of C is n/ 2 ≥ 2, not all co ordin ates are equal and s < n . Supp ose that s ≥ 3, so x i 1 = x i 2 = x i 3 for all cod ew ords x ∈ C . In su c h a case the vecto r y = ( y 1 , . . . , y n ) ∈ F n 2 of weigh t 2 with y i 1 = y i 2 = 1 w ill b elong to C ⊥ = C . In this wa y we obtain a co d ew ord for whic h y i 1 = y i 2 = 1 bu t y i 3 = 0 - a contradict ion. Hence s ≤ 2.  An y self-dual [ n, n/ 2 , 2] co de for n > 2 is d ecomp osable as i 2 ⊕ C n − 2 where C n − 2 is a self-dual co de of length n − 2. F urtherm ore, the num b er of the self-dual [ n , n/ 2 , 2] co d es is equal to the n umber of all self-dual [ n − 2 , n/ 2 − 1] co des ( n > 2). But ev en if a self-dual co de of length n > 2 has minimum distance d = 2, it has tw o coord inates w hic h are not equal. Theorem 3 L e t C b e a binary self-dual [ n = 2 k > 2 , k , d ] c o de and C 0 = { ( x 1 , . . . , x n ) ∈ C, x n − 1 = x n } . If the last two c o or dinates of C ar e not e qual and C 1 is the punctur e d c o de of C 0 on the c o or dinate set { n − 1 , n } then C 1 is a self-dual [ n − 2 , k − 1 , d 1 ≥ d − 2] c o de. Pr o of. Let n > 2 and the last tw o coord inates of the cod e C are n ot equal. This means that there is a co d ew ord y ∈ C suc h that y n − 1 6 = y n . Th erefore C 0 is a sub co de of C with dimension k − 1, and (00 . . . 011) 6∈ C . The punctur ed co de of C 0 on the coord inate set { n − 1 , n } is C 1 = { ( x 1 , x 2 , . . . , x n − 2 ) | x = ( x 1 , x 2 , . . . , x n − 2 , x n − 1 , x n ) ∈ C 0 } . Since (00 . . . 011) 6∈ C , dim C 1 = dim C 0 = k − 1. Mo reo v er, if x = ( x 1 , x 2 , . . . , x n − 2 , a, a ), y = ( y 1 , y 2 , . . . , y n − 2 , b, b ) ∈ C 0 then x 1 y 1 + x 2 y 2 + · · · + x n − 2 y n − 2 + ab + ab = 0. Hence x 1 y 1 + x 2 y 2 + · · · + x n − 2 y n − 2 = 0 for any tw o co dewords ( x 1 , . . . , x n − 2 ) , ( y 1 , . . . , y n − 2 ) ∈ C 1 . It follo ws that the co de C 1 is s elf-orthogonal, and since its dimension is a h alf of its length, it is self-dual.  F or our construction, we us e the cod e C 1 of dimension k − 1 to obtain a self-du al cod e of dimension k an d length 2 k . W e describ e this in the follo wing corollary . Let C 1 b e a binary self-dual [2 k − 2 , k − 1] co de with a generator matrix G 1 . Let us extend G 1 with t w o equal columns ( a 1 , a 2 , . . . , a k − 1 ) T and consider th e co de C 0 generated b y th e matrix G 0 =    a 1 a 1 G 1 . . . . . . a k − 1 a k − 1    . 4 W e can choose the v ector ( a 1 , a 2 , . . . , a k − 1 ) suc h that (11 . . . 11) ∈ C 0 . Obviously , C 0 is a self-orthogonal [ n = 2 k , k − 1] cod e and its du al cod e is C ⊥ 0 = h C 0 , (00 . . . 011) , x i w here x ∈ C ⊥ 0 \ h C 0 , (00 . . . 011) i and wt( x ) is ev en. Consider the last tw o co ord in ates of th e vect or x . If x n − 1 = x n then ( x 1 , x 2 , . . . , x n − 2 ) ∈ C ⊥ 1 = C 1 and therefore x ∈ h C 0 , (00 . . . 011) i . Hence x n − 1 6 = x n . Th e next corollary follo ws immediately . Corollary 4 The c o de C = h C 0 , x i = C 0 ∪ ( x + C 0 ) is a binary self-dual [2 k , k ] c o de. W e w ill call th e co d e C a child of C 1 , and C 1 - a p aren t of C . Actually , we ha v e t wo p ossible self-dual co des obtained in this wa y from C 1 , namely h C 0 , x i and h C 0 , (00 . . . 011) + x i , but b oth co des are equiv alen t. Remark 1 T o describ e the searc h tree for our algorithm, w e use the terms p arent and c hild as it is usu al in the literature on algorithms [15, 18]. These terms are used in a d ifferen t wa y in some pap ers and chapters devo ted to s elf-dual co d es [13]. In this w a y all self-dual co des of length n = 2 k can b e constructed on the base only on the inequiv alent self-dual co des of length n − 2. Indeed, if w e tak e t w o equiv alen t self-du al co des C 1 ∼ = C ′ 1 and use the same vect or ( a 1 , a 2 , . . . , a k − 1 ), we can obtain equiv alent self-dual co des of length 2 k via th e describ ed construction. Let G 1 b e a generator matrix of C 1 and P b e a p ermutatio n matrix suc h that G 1 P generates the co de C ′ 1 . Th en the matrix  xP x n − 1 x n G 1 P a a  generates a self-dual co de equiv alen t to C , namely the co de C ′ . F urth ermore, if π ∈ S n − 2 is the p er mutation corr esp onding to the matrix P then b π ∈ S n sends C to C ′ where b π ( i ) = π ( i ) for 1 ≤ i ≤ n − 2, and b π ( i ) = i for i ∈ { n − 1 , n } . Let see now what happ ens if w e tak e differen t v ectors a and b of length k − 1 and us e them in the describ ed construction for the same self-dual [2 k − 2 , k − 1] co d e C 1 with a gener- ator matrix G 1 . Consider the element s of the automorph ism group Au t( C 1 ) as p erm utation matrices of order n − 2. T o any p ermuta tion matrix P ∈ Aut( C 1 ) w e can corresp ond an in v ertible matrix A P ∈ GL( k − 1 , 2) su c h that G ′ 1 = G 1 P = A P G 1 , since G ′ 1 is an other gen- erator matrix of C 1 . In this w a y we obtain a homomorphism f : Aut( C 1 ) − → GL( k − 1 , 2). Consider the action of I m ( f ) on the set F k − 1 2 defined by A ( x ) = Ax T for eve ry x ∈ F k − 1 2 . Theorem 5 [11] The matric es ( G 1 a T a T ) and ( G 1 b T b T ) gener ate e q uivalent c o des if and only if the ve ctors a and b b elong to the same orbit under the action of I m ( f ) on F k − 1 2 . Pr o of. Let the matrices ( G 1 a T a T ) and ( G 1 b T b T ) generate the co des C 0 and C ′ 0 , resp ectiv ely , and a T = A P b T , w here P ∈ Aut( C 1 ). T hen ( G 1 a T a T )  P 0 0 I 2  = ( G 1 P a T a T ) = ( A P G 1 A P b T A P b T ) = A P ( G 1 b T b T ) . 5 Since A P ( G 1 b T b T ) is another generator matrix of the co de C ′ 0 , b oth co des are equiv alen t. Con v ersely , let C 0 ∼ = C ′ 0 . It turns out that there is a matrix B ∈ GL( k , 2) and an n × n p ermutatio n matrix P such that ( G 1 a T a T ) = B ( G 1 b T b T ) P = B A P ( G 1 b T b T ). Hence B A p G 1 = G 1 and th erefore B A P defines an automorphism of the co de C 1 = h G 1 i . Since a T = B A P b T , the v ectors a and b b elong to th e same orbit under the actio n of I m ( f ) on F k − 1 2 .  Let now G =  x 1 0 G 1 a T a T  b e a generator matrix of the self-dual [ n, n/ 2 , d ] co de C . If P ∈ Aut( C 1 ) and y = xP then G  P 0 0 I 2  =  x 1 0 G 1 a T a T   P 0 0 I 2  =  xP 1 0 G 1 P a T a T  =  y 1 0 A P G 1 A P b T A P b T  =  1 0 . . . 0 0 T A P   y 1 0 G 1 b T b T  Hence the co de C is equiv alent to the cod e generated b y the matrix G ′ =  y 1 0 G 1 b T b T  . The follo win g theorem red u ces the n umber of the considered cases. It is a particular case of Theorem 1 f rom [16]. Theorem 6 If C is a binary self-dual [ n = 2 k > 2 , k , d ] c o de and the last two c o or dinates of C ar e not e qual then C is e quivalent to a c o de with a g ener ator matrix in the form G =      x 1 . . . x k − 1 00 . . . 0 1 0 x 1 x 1 I k − 1 A . . . . . . x k − 1 x k − 1      (2) and the matrix ( I k − 1 | A ) gener ates a self-dual [ n − 2 , k − 1] c o de. Pr o of. T ak e a generator m atrix in systematic form for th e co d e C 1 obtained f r om C by the construction in Th eorem 3. Then    x 1 x 1 I k − 1 A . . . . . . x k − 1 x k − 1    is a generator matrix of C 0 in systematic form. Since C 0 is a self-orthogonal [2 k , k − 1] co de, C ⊥ 0 = h C 0 , (00 . . . 011) , y i wh er e y ∈ C \ C 0 . Hence y n − 1 6 = y n and supp ose y n − 1 = 1, y n = 0. Consider the vecto r x = ( x 1 , x 2 , . . . , x k − 1 , 00 . . . 010 ). O b viously , x ⊥ C 0 and hence x ∈ C ⊥ 0 . But x 6∈ C 0 , x 6∈ (00 . . . 011) + C 0 , x 6∈ (00 . . . 011) + y + C 0 and th erefore 6 x ∈ y + C 0 ⊂ C . It turns out that x ∈ C and w e can take a generator m atrix for C in the n eeded form.  If w e start with a self-dual [2 k − 2 , k − 1] co de C 1 with a generator matrix in systematic form, for the construction in the last theorem we ha v e to use a vec tor ( x 1 , x 2 , . . . , x k − 1 ) of o dd weig ht. Then w e are su re that th e all-ones v ector (11 . . . 11) b elongs to the su b co de C 0 and the co de C generated by th e matrix (2) is a self-dual [2 k , k ] co de. The last t wo theorems are very imp ortan t f or our searc h. W e use them to write a recursiv e algorithm w h ic h giv es u s all self-dual [ n, n/ 2] co des starting f rom the co de i 2 . 3 The Algorithm In this section w e present an algorithm for generating self-du al co des of a giv en length n . W e discuss the bac kground and giv e preliminary definitions and notations. Let Ω k b e the set of all b inary self-dual co des of d imension k (and length 2 k ). W e consider th e action of the s y m metric group S 2 k on the s et Ω k , k = 1 , 2 , . . . . This action induces an equiv alence r elation in Ω k as tw o co des C 1 , C 2 ∈ Ω k are equiv alen t ( C 1 ∼ = C 2 ) if they b elong to the same orb it. Hence the equiv alence classes for th e defin ed relation are the orbits with resp ect to the action of the symmetric group. According to Theorem 3, if w e tak e t w o nonp rop ortional co ord in ates in an y co de b elonging to Ω k , k ≥ 2, w e can obtain a co de from Ω k − 1 . Conv ersely , if we tak e all co d es from Ω k − 1 and extend them using Corollary 4 in all p ossible wa ys, w e will obtain all co des from Ω k . Th e constru ction of the self-du al co des of dimension k using the co des from Ω k − 1 seems to b e trivial, bu t actually this is a difficult problem and the question is how to find only the inequiv alent co des. T o d o this, we dev elop a McKey t yp e algorithm for isomorph -free generation [15, 18]. The algorithm is an exhau s tiv e search o v er the set of co des Ω = Ω 1 ∪ Ω 2 ∪ · · · ∪ Ω k and th is set is our s earc h space. The generation pro cess is d escrib ed b y a ro oted tree (or forest). The no des in the tree are ob j ects from the search sp ace Ω. F rom a self-dual co de A of length 2 k − 2 corresp onding to the no de A , w e obtain self-dual co des of length 2 k whic h are c hildren of the co de A . T o constru ct the children, we u s e a generator m atrix G A of A in systematic f orm and the bin ary v ectors from F k − 1 2 of o d d weigh t. W e denote th e set of inequiv alen t c hildren b y C hild ( A ). The elements of C hil d ( A ) corresp ond to the no des of the next lev el whic h are connected to A by edges. T o find only the in equiv alen t children, we u s e Theorem 5. Practically , the rule A → C hild ( A ) w hic h juxtap ose c hildren to a co de defi nes our s earc h tree. T he execution of th e algorithm can b e considered as w alking the searc h tree and visiting all n o des through the edges. This can b e done by a d epth fi r st searc h . W e present a pseudo code of the algorithm in T able 2 . The follo w in g definitions and theorems help us to explain the algorithm and to p ro v e its correctness. Definition 1 A c anonic al r epr esentative map for the action of the gr oup S 2 k on the set Ω k 7 is a function ρ : Ω k → Ω k that satisfies the fol lowing two pr op e rties: 1. for al l X ∈ Ω k it holds that ρ ( X ) ∼ = X , 2. for al l X , Y ∈ Ω k it holds that X ∼ = Y i mplies ρ ( X ) = ρ ( Y ) . F or a co de C ∈ Ω k , the cod e ρ ( C ) is the canonical form of C with resp ect to ρ . Analo- gously , C is in canonical form if ρ ( C ) = C . Th e co de ρ ( C ) is the canonical r ep resen tativ e of its equiv alence class with resp ect to ρ . W e can tak e for a canonical representat iv e of one equ iv alence class a co de whic h is more conv enien t for our pur p oses. Supp ose that A is the canonical representa tiv e of this class with resp ect to a canonical r epresent ativ e map ρ . W e can tak e B ∼ = A for a canonical represent ativ e for this class if w e c hange the canonical represent ativ e map in th e follo win g w a y: ρ ′ ( X ) = B if X ∼ = B , ρ ′ ( X ) = ρ ( X ) if X 6 ∼ = B . According to Lemma 2 a self-dual co de do es not hav e m ore than t w o equal coord inates, hen ce if k ≥ 2 we can take f or a canonical represent ativ e of any equiv alence class a co de for whic h the last t wo coord inates are not equal. Example 1 I f w e order the co dewords in an y co de lexicographically and th en compare th e co des according to a lexicographical ordering of the columns, we will ha v e one b iggest co de in any equiv alen t class. W e can tak e this co d e as a canonical rep resen tativ e of its class. Definition 2 L e t C b e a self- dual c o de of length n and ρ ( C ) ∼ = C b e its c anonic al form. A p ermutation φ C ∈ S n is c al le d a c anonic al p ermutation of the c o de C , if φ C ( C ) = ρ ( C ) . F or a fixed canonical repr esen tativ e map ρ , the canonical p ermutation of C dep ends on the automorphism group of the co de and th e p erm utations from the coset φ C Aut( C ) can also b e canonical p erm utations since φ C σ ( C ) = φ C ( σ ( C )) = φ C ( C ) = ρ ( C ) for any σ ∈ Aut( C ). W e obtain the automorphism group and a canonical form of a given co de A using a mo dification of the algorithm p r esen ted in th e pap er [5 ]. This algorithm giv es the order of the group , a set of generating elemen ts, and a canonical p erm utation. The parent test can b e defined in the follo wing w a y . S upp ose that A is a self-du al cod e of dimension k − 1 and B ∈ C hil d ( A ). This means that B is obtained from A by the construction of Theorem 6. The parent test for B dep ends on the automorphism group of the co d e B . Let c 1 and c 2 b e th e co ordinate p ositions of the co de B for whic h φ B ( c 1 ) = 2 k , φ B ( c 2 ) = 2 k − 1 where φ B is th e canonical p erm utation of B . T he corresp ondin g tw o columns of B are not equal, b ecause the last t w o co ord inates of the canonical representa tiv e are n ot equal. W e call the co ordinates c 1 and c 2 sp ecial for the co de B with r esp ect to the canonical p erm utation φ B . If there is an automorphism σ of B su c h that { σ ( c 1 ) , σ ( c 2 ) } = { 2 k − 1 , 2 k } th en the co de B p asses the paren t test. In suc h case w e can c hange th e canonical p erm utation, taking φ B σ − 1 instead of φ B . Then the last t wo co ordinates of B are sp ecial with resp ect to the n ew canonical p erm utation. So a co de passes the parent test, if there is a canonical p ermutation φ f or this co de suc h that th e last tw o coord inates are sp ecial with resp ect to φ . Ob viously , the canonical representati v e B of one equiv alen t class passes the parent test. If B 1 ∼ = B also passes the parent test, then there is a p erm utation φ : B → B 1 suc h that 8 1 ≤ φ ( i ) ≤ n − 2 for 1 ≤ i ≤ n − 2 and { φ ( n − 1) , φ ( n ) } = { n − 1 , n } , where n is th e length of the co des. This means that the p aren ts of th ese t w o co des are equ iv alen t, to o. So we ha v e the f ollo wing lemma. Lemma 7 If B 1 and B 2 ar e two e quivalent self-dual [2 k , k ] c o des which p ass the p ar ent test, their p ar ents ar e also e quivalent. T able 2: The main algorithm Pro cedure Augmen tation( A : binary s elf-du al co d e); b egin If the dimen sion of A is equal to k then b egin U k := U k ∪ { A } ; PRINT ( A, ♯ Aut( A )); end; If the dimen sion of A is less than k then b egin find the set C hild ( A ) of all inequiv alen t children of A ; ( using already kno wn Aut( A );) F or all co des B from th e set C hild ( A ) do the follo wing: if B passes th e p aren t test then Augment ation( B ); end; end; Pro cedure Main; Input: U r – n on emp t y set of b in ary self-dual [2 r , r ] co des; k – dimension of the output co d es ( k > r ); Output: U k – set of [2 k , k ] binary self-dual co des; b egin U k := ∅ (the empt y set); for all co des A from U r do the follo wing: b egin find the automorph ism group of A ; Augmen tation( A ); end; end; 9 Lemma 8 L et A 1 and A 2 b e two e qui v alent self-dual c o des of dimension r . Then for any child B 1 of A 1 which p asses the p ar ent test, ther e is a child B 2 of A 2 , e qu ivalent to B 1 , such that B 2 also p asses the p ar ent test. Pr o of. Let G 1 b e a generator matrix of A 1 in systematic form and B 1 b e the co d e obtained from A 1 and th e v ector a = ( a 1 , . . . , a r ) b y the construction describ ed in Corollary 4 and Theorem 6. L et B 2 b e the cod e generated by the matrix π ( G 1 ) and the same v ector a , where π ∈ S 2 r and π ( A 1 ) = A 2 . Obvio usly , π ( G 1 ) generates the co de π ( A 1 ) = A 2 . Moreo ver, according to Theorem 5, B 2 is equiv alent to all co des obtained by A 2 and the v ectors from the orbit with r epresen tativ e a under the action of Aut( A 2 ) on F r 2 . Since the co des B 1 and B 2 are equiv alent, they ha v e th e same canonical representa tiv e B = ρ ( B 1 ) = ρ ( B 2 ). The co de B 1 passes the p aren t test and therefore th ere is a canonical p ermutati on φ 1 : B 1 → B suc h that the last t w o co ord inates of B 1 are sp ecial with resp ect to φ 1 . W e can tak e for a canonical p ermutatio n of B 2 the p erm utation φ 2 = φ 1 b π − 1 , since φ 1 b π − 1 ( B 2 ) = φ 1 ( B 1 ) = ρ ( B 1 ) = ρ ( B 2 ), where b π ∈ S 2 r +2 , b π ( i ) = π ( i ) for i ∈ { 1 , 2 , . . . , 2 r } , b π (2 r + 1) = 2 r + 1, b π (2 r + 2) = 2 r + 2. Then { φ 2 (2 r + 1) , φ 2 (2 r + 2) } = { φ 1 (2 r + 1) , φ 1 (2 r + 2) } = { 2 r + 1 , 2 r + 2 } , hence the last tw o co ord in ates of B 2 are sp ecial w ith resp ect to the canonical p erm utation φ 2 . It turn s out that th e co de B 2 also passes the parent test.  Theorem 9 If the set U s c onsists of al l i ne quivalent binary self-dual [2 s, s ] c o des, then the set U s +1 obtaine d b y the algorithm pr esente d in T able 2 c onsists of al l ine quivalent self-dual [2 s + 2 , s + 1] c o des, s ≥ 1 . Pr o of. W e m ust sho w that the set U s +1 filled out in Pro cedu re Augment a tion , consists only of inequiv alen t co des, and an y bin ary self-dual [2 s + 2 , s + 1] co de is equiv alen t to a co d e in the set U s +1 . Supp ose that the co des B 1 , B 2 ∈ U s +1 are equiv alent. Since these t w o codes hav e passed the parent test, their parents are also equiv alen t according to Lemma 7. T hese parents are self- dual co des from the set U s whic h consists only in in equ iv alen t co d es. W e h a ve a contradicti on here and therefore the co d es B 1 and B 2 cannot b e equiv alen t. It follo ws that U s +1 consists of in equiv alen t co d es. T ak e no w a binary self-dual co d e C of dimension s + 1 with a canonical representa- tiv e B . Hence B is equiv alen t to C and B passes the p aren t test. Since U s consists of all inequiv alen t self-dual co des of d imension s , the parent of B is equiv alent to a co de A ∈ U s . According to Lemma 8, th ere is a c hild B A of A , equiv alent to B , suc h that B A passes the paren t test. Since th e co des B and B A are equiv alent, so are the co d es C and B A . In th is w a y we fin d a co de in U s +1 whic h is equiv alent to C .  Applying the algorithm recursively , we ha v e the follo wing corollary . 10 Corollary 10 If the se t U r c onsists of al l ine quiv alent binary self-dual [2 r, r ] c o des, then the algorithm pr ese nte d in T able 2 gene r ates al l ine quivalent self-dual [2 k , k ] c o des, r < k . W e can partition the set U r of all in equiv alen t binary self-dual [2 r , r ] co des int o disjoint subsets U r 1 , U r 2 , . . . , U r s and apply the algorithm to these su bsets indep enden tly . Denote by U k i the set of the in equ iv alen t self-dual [2 k , k ] co d es, obtained from U r i , i = 1 , 2 , . . . , s, via the d escrib ed algorithm. F ollo wing th e algorithm an d the theorems, we ha v e Corollary 11 The union U k 1 ∪ U k 2 ∪ · · · ∪ U k s c onsists of al l i ne quivalent binary se lf- dual [2 k , k ] c o des, and U k i ∩ U k j = ∅ for i 6 = j . This corollary s ho ws that w e can d ivide the compu tations in to parts th at need n o m utual comm unication. The most difficult p art in th e algorithm is the calculation of the automorph ism group and th e canonical p ermutat ion of a giv en co de. That’s why we try to a v oid this part b y using in v arian ts. Actually , we can do th e paren t test with ou t kno wing the automorphism group of the co d e, u sing only appropriate inv ariants, wh ic h is m uc h faster. Definition 3 L e t N = { 1 , 2 , . . . , n } b e the set of the c o or dinates of the c o de C . An invariant of the c o or dinates of C is a function f : N → Z such that if i and j ar e in the same orbit with r esp e ct to Aut( C ) then f ( i ) = f ( j ) . The co de C and the inv ariant f define a partition π = { N 1 , N 2 , . . . , N l } of the co ordinate set N , s uc h that N i ∩ N j = ∅ for i 6 = j , N = N 1 ∪ N 2 ∪ · · · ∪ N l , and t w o co ordinates i, j are in the same sub s et of N ⇐ ⇒ f ( i ) = f ( j ). So the sub sets N i are u nions of orbits, therefore w e call them pseudo-orbits. W e can use the fact that if we tak e tw o coordin ates f rom tw o differen t subsets, for example s ∈ N i and t ∈ N j , N i ∩ N j = ∅ , they b elong to different orbits under the action of Aut( C ) on the co ordinate set N . Moreo ver, using an in v ariant f , we can define a new canonical r epresen tativ e and a n ew canonical p ermutation of C . Firstly , we in tro du ce an ord ering of the pseudo-orbits of C . W e say that N i ≺ N j for i 6 = j , if: (1) | N i | < | N j | , or (2) | N i | = | N j | and f ( s ) < f ( t ) for s ∈ N i , t ∈ N j . Then w e redefine th e canonical representa tiv e of one equiv alence class in the follo wing wa y: 1. If the smallest p seudo-orbit consists of only one co ordinate, we tak e for a representa tiv e a co d e in the equiv alence class for whic h th is co ordin ate is the last one, and the n − 1-th co ordinate is fr om the s econd smallest pseud o-orbit. T he last t wo co ordinates of the co de C h a ve b een add ed according the constru ction metho d describ ed in the previous section. If none of these tw o co ordinates b elongs to the sm allest pseud o-orbit, C do es not pass the parent test. If one of them b elongs to this orbit, we c hec k wh ether the other one b elongs to the second smallest pseud o-orbit. If no, C do es n ot pass the parent test, b ut if yes, w e should find the canonical repr esen tativ e to b e sure whether C passes the test. 11 2. If the smallest p seudo-orbit N s con tains three or more coord inates, we again tak e for a represent ativ e a co de in th e equiv alence class for which the co ord inates from the smallest pseudo-orbit are the last coord inates. According to Lemma 2 not all co ordinates in N s are equal, so we can tak e t w o different co ordinates in the en d . 3. Th e smallest pseud o-orbit N s consists of exactly t wo co ordin ates. If th ese t w o co ord i- nates are different , we can tak e them f or the last t w o co ordinates. But if they are equal, w e are lo oking for the next pseud o-orbit. There is only one self-du al co de su c h that its co ordinates can b e partitioned in s ubsets of t w o elements such th at b oth co ordinates in eac h subset are equal, and this is the co de i k 2 , n = 2 k . But the automorph ism group of th is co de is Z k 2 · S k and it acts transitiv ely on th e co ord inates. The complexit y of the algorithm mainly dep ends on tw o of its steps. The first one is ” find the set C hild ( A ) of al l ine quivalent childr en of A ”. F or this step, we ha v e as inp ut a set L of generating elemen ts of the automorph ism group of the co d e A , and the set D of all binary o d d-we igh t vecto rs w ith length d im A . The algorithm splits the set of th ese vec tors in to orbits un d er the action of th e group Aut( A ). Any orbit defi nes a c hild of A , as different orbits giv e inequiv alen t c h ildren. This step is computationally c heap. The complexit y is linear w ith resp ect to the pr o duct | L | · | D | , | D | = 2 dim A − 1 (for details see [23]). In the step ” if B p asses the p ar e nt test ”, usin g a giv en generator m atrix of the co de B w e ha ve to calculate in v arian ts, and in some cases also canonical form an d the au tomorp h ism group Aut( B ). Finding a canonical form and the automorphism group is n ecessary wh en the used in v ariant s are not enough to p ro v e wh ether the co de B pass or not the parent test. If the co de B passes th e parents test, the algorithm needs a set of generators of Au t( B ) for the next step (fi n ding the children). F or this s tep, w e h av e to generate the set M w of all co dewo rds of w eigh t ≤ w . The complexit y here is O ( P w / 2 i =1  dim B i  ). T o d etermine the in v arian ts, we use the set M d , where d is the min im um weig ht of the co de B . W e use mostly the inv ariants f 1 and f 2 defined as follo ws: f 1 : { 1 , 2 , . . . , n } → { 0 , 1 } , f 2 : { 1 , 2 , . . . , n } → Z , where n is the length of B . Moreo v er, if s = P v ∈ M d v i then f 1 ( i ) = 1 if and only if s is o dd, and f 2 ( i ) = s , 1 ≤ i ≤ n , v = ( v 1 , v 2 , . . . , v n ) ∈ F n 2 . T o calculate the v alues of f 1 , the algorithm needs only | M d | op erations in the case of b it wise present ation of the co dewords. F or f 2 the algorithm uses O ( n | M d | ) op erations. W e use also a v ector v alued inv arian t f suc h th at f ( i ) = ( f 1 ( i ) , f 2 ( i )). If the co de is n ot rejected with th e inv arian ts, the algorithm generates the smallest set M w of rank dim B . Th e corresp onding to this set b inary matrix is the input in the algorithm for a canonical form. F or the complexit y of this t yp e of algorithms see [5, 17]. The describ ed algorithm is implement ed in the p rogram Gen-self-dual-bin of the pac k age Self-dua l-bin written in Bor land Delphi 6.0 . 12 4 The Results T o find all inequiv alen t self-dual co des of length 38, we b egin from the set U 16 of all in equiv- alen t self-du al cod es of length 32 and d imension 16. W e p artition U 16 in to three su bsets and run them on three cores using a PC Intel i5 4 core p ro cessor. The n umber of all co des con- sidered in the pr ogram (these are the inequiv alent c h ildren for eac h co de in U 16 ∪ U 17 ∪ U 18 ) is 2,338, 260,952. F or 151,016,6 75 of them, a canonical form is computed. Th e num b er of th e obtained inequiv alent co des in the set U 19 is 38,682, 183. The calculations to ok ab out f our da ys. Generator matrices of all inequiv alen t self-du al codes of length 38 are sav ed in three files in the form u sed in [6]. A compressed ve rsion of these files will b e a v ailable on the web-page http://w ww.moi.m ath.bas. bg/~iliya/ . A file with additional inform ation whic h con tains the num b er of co dewo rds of we igh ts 2, 4, 6, 8, and the order of th e automorphism group for eac h co de will b e also av ailable. This information allo ws to compute the expr essions in the mass formulas. The p ossible we igh t en umerators of the self-du al co des of length 38 are giv en b y the follo win g formula W ( y ) =1 + αy 2 + (13 α + β ) y 4 + (57 + 76 α + 7 β − γ − 4 δ ) y 6 + (228 + 260 α + 17 β − γ + 28 δ ) y 8 + (560 α + 7 β + 6 γ − 136 δ + 1520) y 10 + (728 α − 43 β + 6 γ + 248 δ + 10032) y 12 + (364 α − 77 β − 15 γ + 100 δ + 37620) y 14 + (8561 4 − 572 α − 11 β − 15 γ − 764 δ ) y 16 + (1270 72 − 1430 α + 99 β + 20 γ + 528 δ ) y 18 + · · · + y 38 , where α, β , γ , δ are integ ers. The num b ers of inequiv alen t co d es, the n umber s of d ifferen t w eigh t enumerators and the n umbers of different ord ers of the automorphism groups f or eac h minim um w eigh t d are give n in T able 3. T able 3: Number s of inequiv alen t co des of length 38 d 2 4 6 8 ♯ co d es 51949 2 27463 982 106 95965 2 744 ♯ we igh t enumerators 3504 7176 88 2 ♯ ord ers of Aut( C ) 79 9 764 75 18 The smallest ord er ♯ Aut s and the largest ord er ♯ Aut l among the automorphism group s are listed in T able 4 f or eac h minimum w eigh t d . W e give one m ore table with some additional results ab out the automorphism s of the co des. W e list in T able 6 the num b er of self-dual [38 , 19 , d ] co des C suc h that p k divides the order of Aut( C ) where p is a prime and k is a p ositiv e in teger. 13 T able 4: Ord ers of the automorphism groups d 2 4 6 8 ♯ Aut s 2 4 1 1 ♯ Aut l 2 19 · 19! 2 13 · 3 · 7 · 16! 1 032192 504 F or the v erification of our results, we use the m ass f orm ula (1) and also the f ollo wing corollary f rom one lemma of Th ompson [24]: Theorem 12 [11] L et n and d b e even p ositive inte gers and let U b e a family of ine quivalent self-dual c o des of leng th n and minimum weight at most d . Then U is a c omplete set of r epr esentatives for e quivalenc e classes of self- dual c o des of length n and minimum weight at most d if and only if X C ∈ U n ! | Aut( C ) | |{ x ∈ C | wt( x ) = d }| =  n d  n/ 2 − 2 Y i =1 (2 i + 1) . (3) F or the constructed co des w e obtain the same v alues of the left and the r ight expressions in the formula (3) f or n = 38, namely: (d=2) 19137 6974245 78816915816164139573797711865999715625; (d=4) 20094 5822958 0775776160697234655248759745929970140625; (d=6) 75153 7377863 21014028410076576106303614497780883259375; (d=8) 13312 9478364 3400819931835642205311664028246404217737500; (all) 272228981 85745116523209337325140537285726884375 (form ula (1)). Remark 2 T o calculate th e sums in the mass-formulas (1) and (3), we use the pac k age LONGNUM of S. Kapralo v for calculations w ith large in tegers [14]. 5 Conclusion The generation of all in equiv alen t bin ary self-du al co des of length n ≥ 38, using only standard computer algebra systems, seems to b e infeasible. That is wh y we use s p ecial algo rithmic tec hn iques to surm oun t difficulties and to classify co des ev en with PC’s. In this w ork we describ e the classification of the self-dual co des of length 38. 14 Denote by S D k the num b er of all inequiv alen t self-du al co des of d imension k . Ob viously , S D k ≥ Q k − 1 i =1 (2 i + 1) (2 k )! . Consider the sequence a k = S D k (2 k )! / Q k − 1 i =1 (2 i + 1), k = 1 , 2 , . . . . Looking at the already kno wn classifications of bin ary self-dual cod es, we can calculate the v alues of a k for k ≤ 19. W e list the in teger p art of these v alues in T able 5. Moreo ve r, if we coun t th e n umb er of the inequiv alent self-dual co des w ith a trivial automorphism grou p , we s ee that th ere are no suc h co d es for length n ≤ 32, b ut for the larger lengths this n umb er increases v ery fast. F or example, more than a quarter of all co des of length 38, namely 10140 257 inequiv alen t co des, ha v e a trivial automorph ism group . So we hav e the follo win g conjecture. Conjecture 1 The se quenc e { a k , k = 10 , 11 , 12 , . . . } is de cr e asing. T able 5: V alues of ⌊ a k ⌋ for k ≤ 19 k 1 2 3 4 5 6 7 8 9 10 ⌊ a k ⌋ 2 8 48 597 3162 18974 7083 6 230631 353061 464937 k 11 12 13 14 15 16 17 18 19 20 ⌊ a k ⌋ 327 440 194067 57659 13482 2004 273 34 7 2 ? Some other problems we are going to attac k are: • C lassification of the b inary self-dual co d es of length 40. The d oubly-ev en self-dual codes ha v e b een classified [2]. W e ha v e already started with th e generation of the optimal [40 , 20 , 8] cod es and the r esults w ill b e ready so on. W e h a v e a lo we r b ound on the n umber of co des by Q 19 i =1 (2 i + 1) 40! > 4 , 585 , 657 , 509. According to Conjecture 1 and T able 5 , we ha v e Conjecture 2 The numb er of the ine quivalent binary self-dual c o des of length 40 ar e at most 2 · Q 19 i =1 (2 i + 1) 40! < 9 , 171 , 315 , 020 . • W e are going to app ly the describ ed algorithm for qu aternary self-dual co des. 15 Ac kno wledgemen ts The main part of this researc h w as don e during the authors’ visit to Departmen t of Alge- bra an d Geometry at Magdeburg Univ ersit y , Germany . The auth ors would like to thank Prof. W olfgang Willems for his h ospitalit y and sup p ort. Stefk a Bouyukliev a also thanks the Alexander v on Humb oldt F oundation for th e fi nancial su pp ort. References [1] C. Aguilar-Melc hor, P . Gab orit, J.-L. Kim, L. Sok and P . S ole, Classification of extremal and s-extremal binary self-dual co des of length 38, prepr in t. [2] K. Betsumiya , M. Harada and A. Munemasa, A complete classification of doubly ev en self-dual co des of length 40, p reprint [arXiv:1104.37 27 ]. [3] R. T. Bilous, Enumeration of the binary self-du al co des of length 34, J. Combin. Math. Combin. Comput. 59 (2006) , 173–21 1. [4] R.T. Bilous, G.H.J. V an Rees, An enumeration of binary self-dual co des of length 32, Designs, Co des and Crypto gr aphy 26 (2002) , 61–86. [5] Bouyukliev, I. (2007) Ab out the co d e equiv alence, in A dvanc es in Co ding The ory and Cryptolo gy , T. S h ask a, W. C. Huffm an, D. Jo y n er, V. Ustimenk o: Series on Co ding Theory and Cr y p tology , W orld Scien tific Pub lishing, Hac kensac k, NJ, 2007. [6] I. Bouyukliev, What is Q-extension?, Ser dic a Journal of Computing 1 (2007), 115–1 30. [7] J.H.Conw ay and V.Pless, On the en u meration of self-dual codes, Journ. Combin. The ory , ser. A 28 (1980), 26-53. [8] J.H.Conw ay , V.Pless and N.J.A.Sloane, Th e binary self-du al co des of length u p to 32: a revised enumeration, Journ. Combin. The ory , ser. A, 60 (1992), 183-19 5. [9] J.H.Conw ay and N.J.A.Sloane, A new u p p er b oun d on the minimal distance of self-du al co des, IEEE T r ans. Inform. The ory , 36 (1991), 1319–133 3. [10] M. Harada and A. Munemasa, Database of Self-Dual C o des, Online a v ailable at http://w ww.math. is.tohoku.ac.jp/~munemasa/selfdualcodes.htm . [11] M. Harada and A. Munemasa, Classification of self-dual co des of length 36, preprint, [arXiv:1012 .5464 ]. [12] W.C. Huffman, On the classificatio n and en umeration of self-dual co des, Fin ite Fields Appl. 11 (2005), 451–49 0. 16 [13] W. C . Huffman, V. Pless, F undamenta ls of error-correcting co d es, Cam brid ge Univ. Press, 2003. [14] S . Kapralo v, Boun ds, constructions and classifications of optimal co d es, DSc Disserta- tion, 2004 (in bulgarian). [15] P . K aski and P . R. ¨ Osterg ˚ ard, Classifi cation Algorithms for Co des and Designs, Spr inger, 2006. [16] J .-L. K im , New extremal self-du al co d es of lengths 36,38, and 58, IEEE T r ans. Inform. The ory , 47 (2001), 386–393. [17] B. D. McKa y, Practical graph isomorphism, Congr. Numer. 30 (1981), 45–87. [18] B. D. McKa y, Isomorph -free exhaustive generation, J. Algo rithms 26 (1998), 306–324 . [19] C .A. Melc hor and P . Gab orit, On the classification of extremal [36 , 18 , 8] binary self-du al co des, IEEE T r ans. Inform. The ory , 54 (2008), 4743–475 0. [20] V. Pless, A classification of self-orthogonal co d es o v er GF(2), Discr e te M ath. 3 (1972), 209-2 46. [21] V. Pless, The c hildren of the (32,16) doubly ev en cod es, IEEE T r ans. Inform. The ory , 24 (1978), 738-746. [22] V. Pless and N.J.A. Sloane, On the classification and enumeration of self-dual codes, Journ. Combin. The ory , ser. A, 18 (1975), 313-335. [23] ´ Ak os S eress, Pe rmutatio n grou p algorithms, C ambridge Univ. Pr ess, 2003. [24] J .G. Thompson, W eigh ted a v erages asso ciated to some cod es, Scripta M ath. , 29 (197 3), 449-4 52. 17 T able 6: Number of co d es C for which p k divides the ord er of th eir au tomorp h ism groups p k \ d 2 4 6 8 2 51 9492 2746398 2 557127 453 2 2 47843 4 27463982 89141 111 2 3 46704 8 17031875 23498 34 2 4 39769 9 16153273 8201 1 2 5 37561 4 9310617 3788 - 2 6 30398 4 8307428 1733 - 2 7 27473 0 4686394 846 - 2 8 21298 2 3854920 414 - 2 9 18352 5 2208800 220 - 2 10 14015 8 1629411 134 - 2 11 11296 8 970908 79 - 2 12 85784 64165 7 48 - 2 13 65569 38790 0 26 - 2 14 48579 23714 3 14 - 2 15 35399 14083 7 8 - 2 16 25470 8350 0 5 - 2 17 17908 4936 0 - - 2 18 12729 2917 5 - - 2 19 8838 17009 - - 2 20 6161 964 6 - - 2 21 4162 561 2 - - 2 22 2774 322 8 - - 2 23 1812 175 4 - - 2 24 1177 996 - - 2 25 790 505 - - 2 26 551 235 - - 2 27 345 91 - - 2 28 226 33 - - 2 29 156 6 - - p k \ d 2 4 6 8 2 30 87 2 - - 2 31 47 1 - - 2 32 16 - - - 2 33 7 - - - 2 34 3 - - - 2 35 1 - - - - 3 132329 2743510 391 6 85 3 2 45728 42443 3 185 7 3 3 17286 93437 26 1 3 4 6463 224 51 3 - 3 5 1763 4315 - - 3 6 256 366 - - 3 7 51 52 - - 3 8 8 5 - - 5 4209 161 12 9 - 5 2 449 624 - - 5 3 52 40 - - 7 4270 219 81 14 5 7 2 467 771 - - 7 3 83 83 - - 7 4 16 13 - - 7 5 1 2 - - 11 47 29 - - 13 17 7 - - 17 4 - - - 19 1 - 2 1 23 6 4 - - 31 2 2 - - 18 An Algorithm for Classifi ca t i on of Binary Self-Dual Co des Stefk a Bouyukliev a, F acult y of Mathematics and Informatics, V eliko T arnov o Univ ersit y , Bulgaria , Iliy a Bouyukliev, Institute of Mathematics and Informatics, Bulgarian Academ y of Sciences, V elik o T arno v o, Bulgaria W e dedicate this research to our teac her Stefan Dod unek o v on the o ccasion of his 65th birthday . Abstract An efficient a lgorithm for classific a tion of binary s elf-dual co des is pres ent ed. As a n application, a co mplete classification o f the self-dual co des of le ng th 3 8 is given. Index T erms: Self-dual c o des, Classific ation, Isomorph-fr e e gener ation 1 In tro duction The s elf-du al co des form one of the imp ortant classes of linear cod es b ecause of their ric h algebraic structure and their close conn ections with other combinatorial configur ations like blo c k designs, lattices, graph s, etc. The classification of self-dual co des b egan in the sev ent ies in the w ork of V era Pless [20], wh ere s he classified the binary self-dual co d es of length n ≤ 20. The metho d used in the b eginning remained essential ly the same throughout th e succeeding classifications. T h is is a recursiv e classification which p ro ceeds fr om sm aller to larger length and co des are classified up to equiv alence. T h e pro cess b egins w ith the formula for the num b er of all self-du al cod es of length n called a mass formula. The num b er of the self-dual binary co d es of even length n is N ( n ) = Q n/ 2 − 1 i =1 (2 i + 1). Throughout this pap er all cod es are assu med to b e b inary . Tw o binary co d es are called e quivalent if one can b e obtained from the other by a p erm utation of co ord inates. The p ermutatio n σ ∈ S n is an automorphism of the co d e C , if C = σ ( C ) an d the s et of all automorphisms of C f orm s a group called the automorp hism gr oup of C , which is denoted b y Aut( C ) in this pap er . If C has length n , then the num b er of co des equiv alen t to C 1 is n ! / | Aut( C ) | . T o classify self-du al co d es of length n , it is n ecessary to find inequiv alen t self-dual co des C 1 , . . . , C r so that the follo win g mass f orm ula holds: r X i =1 n ! | Aut( C i ) | = N ( n ) . (1) In the sur v ey [12] Huffman summarized the classification of all binary self-dual co des of length n ≤ 36. As the complete classifications for lengths 34 and 36 w as not done at that time, we present here a new ve rsion of T able 1 from [12 ], but instead of the question marks w e put the correct num b ers. Moreo v er, we extend the table w ith t w o more lengths - 38 and 40. The num b er of all inequiv alen t singly-ev en (Type I) and doubly-ev en (T yp e I I) co d es is denoted by ♯ I and ♯ I I , resp ectiv ely . In the table d max,I ( d max,I I ) is the b iggest p ossible minim um distance for whic h Type I (T yp e I I) co des with the giv en length exist, and ♯ max,I ( ♯ max,I I ) is their num b er. The classification of the self-dual co des of length 34 wa s giv en in [3]. Using the self- dual [34 , 17 , 6] co des, Melc hor and Gab orit classified the optimal self-dual co d es of length 36, namely the [36 , 18 , 8] co des [19]. Recen tly , Harada and Mun emasa in [11] completed the classification of the self-dual co d es of length 36 and created a database of self-dual co des [10]. The doubly-eve n self-dual co des of length 40 w ere also classified by Betsumiy a, Harada and Munemasa [2]. Moreo ver, us ing these co des, they classified the optimal s elf-dual [38 , 19 , 8] co des. A classification of extremal self-dual codes of length 38 w as ve ry recen tly obtained also in [1] by s omewhat d ifferen t techniques. Actually , the construction itself is easy , the equiv alence test is the d ifficult part of the classification. Because of that, for larger lengths th e recursive constructions are used preferably heuristic, for building examples for co des with some prop erties. There are also man y partial classifications, namely classifications of self-du al co des with sp ecial pr op erties, for example self-dual co des in v ariant un der a giv en p erm utation, or self-dual co des connected with com binatorial designs with giv en p arameters. These classifications are not recurs iv e b ut they u se co des with smaller lengths, that is why th e fu ll classification is v ery imp ortan t in these cases, to o. There exist seve ral metho ds to construct self-dual co des of length n + 2 from self-du al co des of length n . In [1], the auth ors describ e three suc h metho ds recalling them the r e cursive c onstruction, the building-up c onstruction and the Har ada-Munemasa c onstruction . The first one (recursive constru ction) giv es all inequiv alent [ n + 2 , n/ 2 + 1 , d + 2] co d es starting from the self-du al [ n , n / 2 , d ] co des [19]. The other tw o constructions giv e all s elf-dual co des of length n + 2 from the self-du al cod es of length n . Our construction is similar to the Harada- Munemasa constr u ction b ut w e offer a b etter w a y to deal with equiv alence classes. In th is pap er, we present an algorithm for generating binary self-dual cod es wh ic h giv es as output exactly one r ep resen tativ e of eve ry equ iv alence class. T o dev elop this algorithm, w e use an approac h introd u ced b y Brend an McKa y kn o wn as isomorph-fr e e exhaustive ge n- er ation [18]. T he constructive part of the algorithm is not different from th e other recursive constructions for self-dual co des, b ut to take only one repr esen tativ e of an y equiv alence class, 2 w e u se a completely differen t manner. Th is appr oac h change s extremely the s p eed of gener- ation of th e inequiv alent co des of a give n length. Its sp ecial feature is that p ractically there is n ot equiv alence test for the ob jects. As a resu lt, the classification of all binary self-dual co d es of length 38 is presente d. Th e n umber of th ese co des is given in the f ollo wing th eorem and also listed in T able 1. Theorem 1 Ther e ar e 38 682 183 ine quivalent self-dual c o des of leng th 38 . In Section 2 w e present the th eoretical foun dations of the us ed construction metho d . The aim is to obtain all inequiv alent self-du al co d es of d im en s ion k (length 2 k ) on the base of th e inequiv alent self-dual co des of dimen s ion k − 1 (length 2 k − 2). In Section 3 we describ e the u sed algo rithm. Co d es w hic h are equiv alen t b elong to the same equiv alence class. Every co d e can serv e as a representat iv e for its equiv alence class. W e use th e concept for a canonical representat iv e, selected on the base of some sp ecific cond itions. This canonical repr esen tativ e is in tended to make easily a distinction b et ween the equiv alence classes. In Section 4 w e giv e the results with some more information ab out the obtained co d es. 2 The Construction Metho d In this section w e describ e th e theoretical foun dations of the used constru ction metho d . The aim is to obtain all inequiv alent self-dual co des of length n = 2 k and dimension k on the base of the inequiv alen t self-dual cod es of dimension k − 1. Prop osition 3 giv es us the p ossibilit y to dev elop a classification algorithm. Actually , this prop osition present s a well kno wn p r op erty of the self-du al co des but usually it is stated in the case d ≥ 4 (see for example [11]). Here we giv e a v ariant for all d but for that we need the follo wing lemma. W e say that the co ordinates i 1 , . . . , i s , 1 ≤ i 1 < · · · < i s ≤ n , of th e co de C are equal if x i 1 = x i 2 = · · · = x i s for eac h co dew ord x = ( x 1 , x 2 , . . . , x n ) ∈ C . Lemma 2 If C is a binary self-dual c o de then C do es not have mor e than two e qual c o or di- nates. In other wor ds, if x i 1 = x i 2 = · · · = x i s for e ach c o dewor d x = ( x 1 , x 2 , . . . , x n ) ∈ C then s ≤ 2 . Pr o of. If n = 2 then C = i 2 = { 00 , 11 } and C has only t wo co ordin ates. Let n ≥ 4. Since the d imension of C is n/ 2 ≥ 2, not all co ordin ates are equal and s < n . Supp ose that s ≥ 3, so x i 1 = x i 2 = x i 3 for all cod ew ords x ∈ C . In su c h a case the vecto r y = ( y 1 , . . . , y n ) ∈ F n 2 of weigh t 2 with y i 1 = y i 2 = 1 w ill b elong to C ⊥ = C . In this wa y we obtain a co d ew ord for whic h y i 1 = y i 2 = 1 bu t y i 3 = 0 – a con tradiction. Hence s ≤ 2.  An y self-dual [ n, n/ 2 , 2] co de for n > 2 is d ecomp osable as i 2 ⊕ C n − 2 where C n − 2 is a self-dual co de of length n − 2. F urtherm ore, the num b er of the self-dual [ n , n/ 2 , 2] co des is equal to the n umber of all self-dual [ n − 2 , n/ 2 − 1] co des ( n > 2). But even if a self-dual co d e of length n > 2 has minimum distance d = 2, it has tw o coord inates w hic h are not equal. 3 T able 1: Binary self-dual co des of length n ≤ 40 [12] n ♯ I ♯ I I d max,I ♯ max,I d max,I I ♯ max,I I Reference 2 1 2 1 [20] 4 1 2 1 [20] 6 1 2 1 [20] 8 1 1 2 1 4 1 [20] 10 2 2 2 [20] 12 3 4 1 [20] 14 4 4 1 [20] 16 5 2 4 1 4 2 [20] 18 9 4 2 [20] 20 16 4 7 [20] 22 25 6 1 [22] 24 46 9 6 1 8 1 [22] 26 103 6 1 [7, 8, 21] 28 261 6 3 [7, 8, 21] 30 731 6 13 [7, 8, 21] 32 3210 85 8 3 8 5 [4, 7, 9] 34 24147 6 938 [3] 36 51949 2 8 41 [11, 19] 38 38682 183 8 2744 this pap er, [1, 2 ] 40 ? 94343 8 ? 8 16470 [2] Prop osition 3 L et C b e a binary self- dual [ n = 2 k > 2 , k , d ] c o de and C 0 = { ( x 1 , . . . , x n ) ∈ C, x n − 1 = x n } . If the last two c o or dinates of C ar e not e qual and C 1 is the punctur e d c o de of C 0 on the c o or dinate set { n − 1 , n } then C 1 is a self-dual [ n − 2 , k − 1 , d 1 ≥ d − 2] c o de. Pr o of. Let n > 2 and the last tw o coord inates of the cod e C are n ot equal. This means that there is a co d ew ord y ∈ C suc h that y n − 1 6 = y n . Th erefore C 0 is a sub co de of C with dimension k − 1, and (00 . . . 011) 6∈ C . The punctur ed co de of C 0 on the coord inate set { n − 1 , n } is C 1 = { ( x 1 , x 2 , . . . , x n − 2 ) | x = ( x 1 , x 2 , . . . , x n − 2 , x n − 1 , x n ) ∈ C 0 } . Since (00 . . . 011 ) 6∈ C , dim C 1 = dim C 0 = k − 1. Mo reo v er, if x = ( x 1 , x 2 , . . . , x n − 2 , a, a ), y = ( y 1 , y 2 , . . . , y n − 2 , b, b ) ∈ C 0 then x 1 y 1 + x 2 y 2 + · · · + x n − 2 y n − 2 + ab + ab = 0. Hence x 1 y 1 + x 2 y 2 + · · · + x n − 2 y n − 2 = 0 for any tw o co dewords ( x 1 , . . . , x n − 2 ) , ( y 1 , . . . , y n − 2 ) ∈ C 1 . It follo ws that the co de C 1 is s elf-orthogonal, and since its dimension is a h alf of its length, it is self-dual.  4 F or our construction, we u se the co de C 1 of dimension k − 1 to obtain a self-du al cod e of dimension k an d length 2 k . W e describ e this in the follo wing corollary . Let C 1 b e a binary self-dual [2 k − 2 , k − 1] co de with a generator matrix G 1 . Let us extend G 1 with t w o equal columns ( a 1 , a 2 , . . . , a k − 1 ) T and consider th e co de C 0 generated b y th e matrix G 0 =    a 1 a 1 G 1 . . . . . . a k − 1 a k − 1    . W e can c ho ose the v ector ( a 1 , a 2 , . . . , a k − 1 ) suc h that (11 . . . 11) ∈ C 0 . Obviously , C 0 is a self-orthogonal [ n = 2 k , k − 1] cod e and its du al cod e is C ⊥ 0 = h C 0 , (00 . . . 011) , x i w here x ∈ C ⊥ 0 \ h C 0 , (00 . . . 011) i and wt( x ) is ev en. Consider th e last tw o co ord inates of the v ector x . If x n − 1 = x n then ( x 1 , x 2 , . . . , x n − 2 ) ∈ C ⊥ 1 = C 1 and therefore x ∈ h C 0 , (00 . . . 011) i . Hence x n − 1 6 = x n . Th e next corollary follo ws immediately . Corollary 4 The c o de C = h C 0 , x i = C 0 ∪ ( x + C 0 ) is a binary self-dual [2 k , k ] c o de. W e w ill call the cod e C a child t yp e co de (CTC) of C 1 , and C 1 - a p aren t type co de (PTC) of C . Actually , w e hav e tw o p ossible s elf-du al co des obtained in this wa y fr om C 1 , namely h C 0 , x i and h C 0 , (00 . . . 011) + x i , bu t b oth co des are equiv alent. Remark 1 T o describ e the searc h tree for ou r algorithm, w e use the terms CTC and PTC. In the literature on algorithms [15, 18] the terms are parent and child, b ut as these term s are used in a differen t wa y in some pap ers and c hapters devot ed to self-du al co des [13], w e decided to set c hild t yp e co de and paren t t yp e co de. In this w a y all self-dual co des of length n = 2 k can b e constructed on the base only on the inequiv alent self-dual co des of length n − 2. Indeed, if w e tak e t w o equiv alen t self-du al co des C 1 ∼ = C ′ 1 and use the same vect or ( a 1 , a 2 , . . . , a k − 1 ), we can obtain equiv alent self-dual co des of length 2 k via th e describ ed construction. Let G 1 b e a generator matrix of C 1 and P b e a p ermutatio n matrix suc h that G 1 P generates the co de C ′ 1 . Th en the matrix  xP x n − 1 x n G 1 P a a  generates a self-dual co de equiv alen t to C , namely the co de C ′ . F urth ermore, if π ∈ S n − 2 is the p er mutation corr esp onding to the matrix P then b π ∈ S n sends C to C ′ where b π ( i ) = π ( i ) for 1 ≤ i ≤ n − 2, and b π ( i ) = i for i ∈ { n − 1 , n } . Let see now what happ ens if w e tak e differen t v ectors a and b of length k − 1 and us e them in the describ ed construction for the same self-dual [2 k − 2 , k − 1] co d e C 1 with a gener- ator matrix G 1 . Consider the element s of the automorph ism group Au t( C 1 ) as p erm utation matrices of order n − 2. T o any p erm utation matrix P ∈ Aut( C 1 ) w e can corresp ond an in v ertible matrix A P ∈ GL( k − 1 , 2) su c h that G ′ 1 = G 1 P = A P G 1 , since G ′ 1 is an other gen- erator matrix of C 1 . In this w a y we obtain a homomorphism f : Aut( C 1 ) − → GL( k − 1 , 2). Consider the action of I m ( f ) on the set F k − 1 2 defined by A ( x ) = Ax T for eve ry x ∈ F k − 1 2 . 5 Theorem 5 [11] The matric es ( G 1 a T a T ) and ( G 1 b T b T ) gener ate e q uivalent c o des if and only if the ve ctors a and b b elong to the same orbit under the action of I m ( f ) on F k − 1 2 . Pr o of. Let the matrices ( G 1 a T a T ) and ( G 1 b T b T ) generate the co des C 0 and C ′ 0 , resp ectiv ely , and a T = A P b T , w here P ∈ Aut( C 1 ). T hen ( G 1 a T a T )  P 0 0 I 2  = ( G 1 P a T a T ) = ( A P G 1 A P b T A P b T ) = A P ( G 1 b T b T ) . Since A P ( G 1 b T b T ) is another generator matrix of the co de C ′ 0 , b oth co des are equiv alen t. Con v ersely , let C 0 ∼ = C ′ 0 . It turns out that there is a matrix B ∈ GL( k , 2) and an n × n p ermutatio n matrix P such that ( G 1 a T a T ) = B ( G 1 b T b T ) P = B A P ( G 1 b T b T ). Hence B A p G 1 = G 1 and th erefore B A P defines an automorphism of the co de C 1 = h G 1 i . Since a T = B A P b T , the v ectors a and b b elong to th e same orbit under the actio n of I m ( f ) on F k − 1 2 .  Let now G =  x 1 0 G 1 a T a T  b e a generator matrix of the self-dual [ n, n/ 2 , d ] co de C . If P ∈ Aut( C 1 ) and y = xP then G  P 0 0 I 2  =  x 1 0 G 1 a T a T   P 0 0 I 2  =  xP 1 0 G 1 P a T a T  =  y 1 0 A P G 1 A P b T A P b T  =  1 0 . . . 0 0 T A P   y 1 0 G 1 b T b T  Hence the co de C is equiv alent to the cod e generated b y the matrix G ′ =  y 1 0 G 1 b T b T  . The f ollo wing p rop osition reduces the num b er of the considered cases. It is a particular case of Theorem 1 f rom [16]. Prop osition 6 If C i s a binary self-dual [ n = 2 k > 2 , k , d ] c o de then C is e qu ivalent to a c o de with a gener ator matrix i n the form G =      x 1 . . . x k − 1 00 . . . 0 1 0 x 1 x 1 I k − 1 A . . . . . . x k − 1 x k − 1      (2) and the matrix ( I k − 1 | A ) gener ates a self-dual [ n − 2 , k − 1] c o de. Pr o of. If the last t w o co ordinates of C are equal then according to Lemma 2 the first and the last co ord inates are not equal and w e can transp ose th em. S o w e can consider th e case when the last t w o co ordinates of C are not equal without loss of generalit y . 6 T ak e a generator matrix in systematic form for the co de C 1 obtained from C by the construction in Prop osition 3. Then    x 1 x 1 I k − 1 A . . . . . . x k − 1 x k − 1    is a generator matrix of C 0 in systematic form. Since C 0 is a self-orthogonal [2 k , k − 1] co de, C ⊥ 0 = h C 0 , (00 . . . 011) , y i wh er e y ∈ C \ C 0 . Hence y n − 1 6 = y n and supp ose y n − 1 = 1, y n = 0. Consider the vecto r x = ( x 1 , x 2 , . . . , x k − 1 , 00 . . . 010 ). O b viously , x ⊥ C 0 and hence x ∈ C ⊥ 0 . But x 6∈ C 0 , x 6∈ (00 . . . 011) + C 0 , x 6∈ (00 . . . 011) + y + C 0 and th erefore x ∈ y + C 0 ⊂ C . It turns out that x ∈ C and w e can take a generator m atrix for C in the n eeded form.  If w e start with a self-dual [2 k − 2 , k − 1] co de C 1 with a generator matrix in systematic form, for the construction in the last theorem we ha v e to use a vec tor ( x 1 , x 2 , . . . , x k − 1 ) of o dd weig ht. Then w e are su re that th e all-ones v ector (11 . . . 11) b elongs to the su b co de C 0 and the co de C generated by th e matrix (2) is a self-dual [2 k , k ] co de. Theorem 5 and Pr op osition 6 are v ery imp ortan t for our searc h . W e use them to wr ite a recur siv e algorithm which giv es us all self-du al [ n, n/ 2] co des starting f rom the co de i 2 . 3 The Algorithm In this section w e present an algorithm for generating self-du al co des of a giv en length n . W e discuss the bac kground and giv e preliminary definitions and notations. Let Ω k b e the set of all b inary self-dual co des of d imension k (and length 2 k ). W e consider th e action of the s y m metric group S 2 k on the s et Ω k , k = 1 , 2 , . . . . This action induces an equiv alence r elation in Ω k as tw o co des C 1 , C 2 ∈ Ω k are equiv alen t ( C 1 ∼ = C 2 ) if they b elong to the same orb it. Hence the equiv alence classes for th e defin ed relation are the orbits with resp ect to the action of the symmetric group . According to Prop osition 3, if we tak e tw o nonpr op ortional co ordinates in any co d e b elonging to Ω k , k ≥ 2, w e can ob tain a co de from Ω k − 1 . Conv ersely , if we take all co des fr om Ω k − 1 and extend them using Corollary 4 in all p ossible w a ys, we will obtain all co des from Ω k . The construction of the self-dual co des of d imension k usin g the co des from Ω k − 1 seems to b e trivial, bu t actually this is a difficult pr oblem and the question is h o w to fin d only th e inequiv alent co des. T o d o this, we dev elop a McKey t yp e algorithm for isomorph-free generation [15, 18]. The algorithm is an exhau s tiv e search o v er the set of co des Ω = Ω 1 ∪ Ω 2 ∪ · · · ∪ Ω k and th is set is our s earc h space. The generation pro cess is d escrib ed b y a ro oted tree (or forest). The no des in the tree are ob j ects from the search sp ace Ω. F rom a self-dual co de A of length 2 k − 2 corresp onding to the no de A , w e obtain self-dual co des of length 2 k whic h are c hild typ e co des of A . T o construct the child t yp e co des, w e use a generator matrix G A 7 of A in systematic form and the b inary vect ors f rom F k − 1 2 of o dd weig ht. W e d enote the set of inequiv alent c hild type co des by C hild ( A ). The elemen ts of C hil d ( A ) corresp ond to th e no des of th e next leve l w hic h are connected to A b y edges. T o find on ly the inequiv alent c hild typ e co des, we u s e Theorem 5. Practi cally , the rule A → C hild ( A ) whic h juxtap ose c hild typ e co des to a co de defines our search tree. Th e execution of the algorithm can b e considered as wa lking the searc h tree and visiting all no des through the edges. This can b e done by a d epth fir st searc h. W e p resen t a p seudo co de of the algorithm in T able 2. The follo w in g definitions and theorems help us to explain the algorithm and to p ro v e its correctness. Definition 1 A c anonic al r epr esentative map for the action of the gr oup S 2 k on the set Ω k is a function ρ : Ω k → Ω k that satisfies the fol lowing two pr op e rties: 1. for al l X ∈ Ω k it holds that ρ ( X ) ∼ = X , 2. for al l X , Y ∈ Ω k it holds that X ∼ = Y i mplies ρ ( X ) = ρ ( Y ) . F or a co de C ∈ Ω k , the cod e ρ ( C ) is the canonical form of C with resp ect to ρ . Analo- gously , C is in canonical form if ρ ( C ) = C . Th e co de ρ ( C ) is the canonical r epresen tativ e of its equiv alence class with resp ect to ρ . W e can tak e for a canonical representa tiv e of one equ iv alence class a co d e whic h is more conv enien t for our pur p oses. Supp ose that A is the canonical representa tiv e of this class with resp ect to a canonical r epresent ativ e map ρ . W e can tak e B ∼ = A for a canonical represent ativ e for this class if w e c hange the canonical represent ativ e map in th e follo win g w a y: ρ ′ ( X ) = B if X ∼ = B , ρ ′ ( X ) = ρ ( X ) if X 6 ∼ = B . According to Lemma 2 a self-dual co de do es not hav e m ore than t w o equal coord inates, hen ce if k ≥ 2 we can take f or a canonical represent ativ e of any equiv alence class a co de for whic h the last t wo coord inates are not equal. Example 1 I f w e order the co dewords in an y co de lexicographically and th en compare th e co des according to a lexicographical ordering of the columns, we will ha v e one b iggest co de in any equiv alence class. W e can tak e this co de as a canonical repr esen tativ e of its class. Definition 2 L e t C b e a self- dual c o de of length n and ρ ( C ) ∼ = C b e its c anonic al form. A p ermutation φ C ∈ S n is c al le d a c anonic al p ermutation of the c o de C , if φ C ( C ) = ρ ( C ) . F or a fixed canonical repr esen tativ e map ρ , th e canonical p ermutatio n of C dep ends on the automorphism group of the co de and th e p erm utations from the coset φ C Aut( C ) can also b e canonical p erm utations since φ C σ ( C ) = φ C ( σ ( C )) = φ C ( C ) = ρ ( C ) for any σ ∈ Aut( C ). W e obtain th e automorphism group and a canonical f orm of a given co de A using a mo dification of the algorithm p r esen ted in th e pap er [5 ]. This algorithm giv es the order of the group , a set of generating elemen ts, and a canonical p erm utation. The parent test can b e defined in the follo wing w a y . S upp ose that A is a self-du al cod e of dimension k − 1 and B ∈ C hil d ( A ). This means that B is obtained from A by the construction of Pr op osition 6. Th e parent test f or B dep en ds on th e automorph ism group of th e co d e B . 8 Let c 1 and c 2 b e the co ord inate p ositions of the co de B for whic h φ B ( c 1 ) = 2 k , φ B ( c 2 ) = 2 k − 1 where φ B is th e canonical p erm utation of B . T he corresp ondin g tw o columns of B are not equal, b ecause the last t w o co ord inates of the canonical representa tiv e are n ot equal. W e call the co ordinates c 1 and c 2 sp ecial for the co de B with r esp ect to the canonical p erm utation φ B . If there is an automorphism σ of B su c h that { σ ( c 1 ) , σ ( c 2 ) } = { 2 k − 1 , 2 k } th en the co de B p asses the paren t test. In suc h case w e can c hange th e canonical p erm utation, taking φ B σ − 1 instead of φ B . Then the last t wo co ordinates of B are sp ecial with resp ect to the n ew canonical p erm utation. So a co de passes the parent test, if there is a canonical p ermutation φ f or this co de suc h that th e last tw o coord inates are sp ecial with resp ect to φ . Ob viously , the canonical represent ativ e B of one equ iv alence class passes the paren t test. If B 1 ∼ = B also passes the p aren t test, then there is a p ermutation φ : B → B 1 suc h that 1 ≤ φ ( i ) ≤ n − 2 for 1 ≤ i ≤ n − 2 and { φ ( n − 1) , φ ( n ) } = { n − 1 , n } , where n is th e length of the co d es. T his means that the p aren t t yp e co d es of th ese tw o co des are equiv alen t, to o. So we ha v e the f ollo wing lemma. Lemma 7 If B 1 and B 2 ar e two e quivalent self-dual [2 k , k ] c o des which p ass the p ar ent test, their p ar ent typ e c o des ar e also e quivalent. Lemma 8 L et A 1 and A 2 b e two e qui v alent self-dual c o des of dimension r . Then for any child typ e c o de B 1 of A 1 which p asses the p ar ent test, ther e is a child typ e c o de B 2 of A 2 , e quivalent to B 1 , such that B 2 also p asses the p ar ent test. Pr o of. Let G 1 b e a generator matrix of A 1 in systematic form and B 1 b e the co d e obtained from A 1 and th e v ector a = ( a 1 , . . . , a r ) b y the construction describ ed in Corollary 4 and Prop osition 6. L et B 2 b e the co d e generated by the matrix π ( G 1 ) and the same v ector a , where π ∈ S 2 r and π ( A 1 ) = A 2 . Obviously , π ( G 1 ) generates the co d e π ( A 1 ) = A 2 . Moreo ver, according to Theorem 5, B 2 is equiv alent to all co des obtained by A 2 and the v ectors from the orbit with r epresen tativ e a under the action of Aut( A 2 ) on F r 2 . Since the co des B 1 and B 2 are equiv alent, they ha v e th e same canonical representa tiv e B = ρ ( B 1 ) = ρ ( B 2 ). The co de B 1 passes the p aren t test and therefore th ere is a canonical p ermutati on φ 1 : B 1 → B suc h that the last t w o co ord inates of B 1 are sp ecial with resp ect to φ 1 . W e can tak e for a canonical p ermutatio n of B 2 the p erm utation φ 2 = φ 1 b π − 1 , since φ 1 b π − 1 ( B 2 ) = φ 1 ( B 1 ) = ρ ( B 1 ) = ρ ( B 2 ), where b π ∈ S 2 r +2 , b π ( i ) = π ( i ) for i ∈ { 1 , 2 , . . . , 2 r } , b π (2 r + 1) = 2 r + 1, b π (2 r + 2) = 2 r + 2. Then { φ 2 (2 r + 1) , φ 2 (2 r + 2) } = { φ 1 (2 r + 1) , φ 1 (2 r + 2) } = { 2 r + 1 , 2 r + 2 } , hence the last tw o co ord in ates of B 2 are sp ecial w ith resp ect to the canonical p erm utation φ 2 . It turn s out that th e co de B 2 also passes the parent test.  Theorem 9 If the set U s c onsists of al l i ne quivalent binary self-dual [2 s, s ] c o des, then the set U s +1 obtaine d b y the algorithm pr esente d in T able 2 c onsists of al l ine quivalent self-dual [2 s + 2 , s + 1] c o des, s ≥ 1 . 9 T able 2: The main algorithm Pro cedure Augmen tation( A : binary s elf-du al co d e); b egin If the dimension of A is equal to k then b egin U k := U k ∪ { A } ; PRINT ( A, ♯ Aut( A )); end; If the dimension of A is less th an k then b egin find the set C hild ( A ) of all inequiv alen t child t yp e co des of A ; ( u sing already known Aut( A );) F or all co des B f rom the set C hild ( A ) d o th e follo wing: if B passes th e p aren t test then Augment ation( B ); end; end; Pro cedure Main; Input: U r – nonempty set of binary self-dual [2 r , r ] co des; k – dimen sion of the outp ut co des ( k > r ); Output: U k – set of [2 k , k ] binary self-du al co des; b egin U k := ∅ (the empt y set); for all co des A fr om U r do the follo wing: b egin find the automorphism group of A ; Augmen tation( A ); end; end; Pr o of. W e m ust sho w that the set U s +1 filled out in Pro cedu re Augment a tion , consists only of inequiv alen t co des, and an y bin ary self-dual [2 s + 2 , s + 1] co de is equiv alen t to a co d e in the set U s +1 . Supp ose th at the co des B 1 , B 2 ∈ U s +1 are equiv alen t. Since these t w o co des hav e passed th e parent test, their parent t yp e co des are also equ iv alen t according to Lemma 7. These p aren t t yp e codes are self-dual cod es from the set U s whic h consists only in inequiv alen t co des. W e ha v e a con tradiction here and therefore the co d es B 1 and B 2 cannot b e equiv alen t. It f ollo ws that U s +1 consists of inequ iv alen t co d es. 10 T ak e now a binary self-dual co de C of dimension s + 1 w ith a canonical representa tiv e B . Hence B is equiv alen t to C and B p asses the parent test. S ince U s consists of all in- equiv alen t self-dual co des of dimension s , th e p arent t yp e co de of B is equiv alen t to a co de A ∈ U s . According to Lemma 8, there is a c hild t yp e co d e B A of A , equiv alen t to B , suc h that B A passes th e parent test. Since the co des B and B A are equiv alen t, so are the cod es C and B A . In this w a y we find a co de in U s +1 whic h is equ iv alen t to C .  Applying the algorithm recursively , we ha v e the f ollo wing corollary . Corollary 10 If the se t U r c onsists of al l ine quiv alent binary self-dual [2 r, r ] c o des, then the algorithm pr ese nte d in T able 2 gene r ates al l ine quivalent self-dual [2 k , k ] c o des, r < k . W e can partition th e set U r of all in equiv alen t binary self-dual [2 r , r ] co des int o disjoint subsets U r 1 , U r 2 , . . . , U r s and apply the algorithm to these su bsets indep enden tly . Denote by U k i the set of the in equ iv alen t self-dual [2 k , k ] co d es, obtained from U r i , i = 1 , 2 , . . . , s, via the d escrib ed algorithm. F ollo wing th e algorithm an d the theorems, we ha v e Corollary 11 The union U k 1 ∪ U k 2 ∪ · · · ∪ U k s c onsists of al l i ne quivalent binary se lf- dual [2 k , k ] c o des, and U k i ∩ U k j = ∅ for i 6 = j . This corollary s ho ws that w e can d ivide the compu tations in to parts th at need n o m utual comm unication. The most difficult p art in th e algorithm is the calculation of the automorph ism group and th e canonical p ermutat ion of a giv en co de. That’s why we try to a v oid this part b y using in v arian ts. Actually , we can do th e paren t test with ou t kno wing the automorphism group of the co d e, u sing only appropriate inv ariants, wh ic h is m uc h faster. Definition 3 L e t N = { 1 , 2 , . . . , n } b e the set of the c o or dinates of the c o de C . An invariant of the c o or dinates of C is a function f : N → Z such that if i and j ar e in the same orbit with r esp e ct to Aut( C ) then f ( i ) = f ( j ) . The co de C and the inv ariant f define a partition π = { N 1 , N 2 , . . . , N l } of the co ordinate set N , s uc h that N i ∩ N j = ∅ for i 6 = j , N = N 1 ∪ N 2 ∪ · · · ∪ N l , and t w o co ordinates i, j are in the same sub s et of N ⇐ ⇒ f ( i ) = f ( j ). So the sub sets N i are u nions of orbits, therefore w e call them pseudo-orbits. W e can use the fact that if we tak e tw o coordin ates f r om tw o differen t subsets, for example s ∈ N i and t ∈ N j , N i ∩ N j = ∅ , they b elong to different orbits under the action of Aut( C ) on the co ordinate set N . Moreo ver, using an in v ariant f , we can define a new canonical r epresen tativ e and a n ew canonical p ermutation of C . Firstly , we in tro du ce an ord ering of the pseudo-orbits of C . W e say that N i ≺ N j for i 6 = j , if: (1) | N i | < | N j | , or (2) | N i | = | N j | and f ( s ) < f ( t ) for s ∈ N i , t ∈ N j . Then w e redefine th e canonical representa tiv e of one equiv alence class in the follo wing wa y: 11 1. If the smallest p seudo-orbit consists of only one co ordinate, we tak e for a representa tiv e a co d e in the equiv alence class for whic h th is co ordin ate is the last one, and the n − 1-th co ordinate is fr om the s econd smallest pseud o-orbit. T he last t wo co ordinates of the co de C h a ve b een add ed according the constru ction metho d describ ed in the previous section. If none of these tw o co ordinates b elongs to the sm allest pseud o-orbit, C do es not pass the parent test. If one of them b elongs to this orbit, we c hec k wh ether the other one b elongs to the second smallest pseud o-orbit. If no, C do es n ot pass the parent test, b ut if yes, w e should find the canonical repr esen tativ e to b e sure whether C passes the test. 2. If the smallest p seudo-orbit N s con tains three or more coord inates, we again tak e for a represent ativ e a co de in th e equiv alence class for which the co ord inates from the smallest pseudo-orbit are the last coord inates. According to Lemma 2 not all co ordinates in N s are equal, so we can tak e t w o different co ordinates in the en d . 3. Th e smallest pseud o-orbit N s consists of exactly t wo co ordin ates. If th ese t w o co ord i- nates are different , we can tak e them f or the last t w o co ordinates. But if they are equal, w e are lo oking for the next pseud o-orbit. There is only one self-du al co de su c h that its co ordinates can b e partitioned in s ubsets of t w o elements such th at b oth co ordinates in eac h subset are equal, and this is the co de i k 2 , n = 2 k . But the automorph ism group of th is co de is Z k 2 · S k and it acts transitiv ely on th e co ord inates. The complexit y of the algorithm mainly dep ends on tw o of its steps. The first one is ” find the set C hild ( A ) of al l ine quivalent child typ e c o des of A ”. F or this step, we h a v e as input a set L of generating elemen ts of the automorphism group of the co d e A , and the set D of all binary o dd -w eigh t vec tors with length dim A . The algorithm splits the set of these v ectors into orbits under the action of the group Aut( A ). An y orbit defi n es a child t yp e co de of A , as differen t orbits giv e inequiv alen t c hild t yp e co des. This step is computationally c heap. The complexit y is linear with resp ect to th e pro duct | L | · | D | , | D | = 2 dim A − 1 (for details see [23]). In the step ” if B p asses the p ar e nt test ”, usin g a giv en generator m atrix of the co de B w e ha ve to calculate in v arian ts, and in some cases also canonical form an d the au tomorp h ism group Aut( B ). Finding a canonical form and the automorphism group is n ecessary wh en the used inv ariants are not enough to prov e wh ether the co de B pass or not the paren t test. If the cod e B passes the paren ts test, the algo rithm needs a set of generators of Aut( B ) for the n ext step (finding the child t yp e co des). F or this step, w e ha v e to generate the set M w of all co d ew ords of weig ht ≤ w . The complexit y here is O ( P w / 2 i =1  dim B i  ). T o determine the in v arian ts, we use the set M d , where d is the minimum we igh t of the co de B . W e use mostly the inv arian ts f 1 and f 2 defined as follo ws: f 1 : { 1 , 2 , . . . , n } → { 0 , 1 } , f 2 : { 1 , 2 , . . . , n } → Z , where n is the length of B . Moreo v er, if s = P v ∈ M d v i then f 1 ( i ) = 1 if and only if s is o dd, and f 2 ( i ) = s , 1 ≤ i ≤ n , v = ( v 1 , v 2 , . . . , v n ) ∈ F n 2 . T o calculate the v alues of f 1 , the 12 algorithm needs only | M d | op erations in the case of b it wise present ation of the co dewords. F or f 2 the algorithm uses O ( n | M d | ) op erations. W e use also a v ector v alued inv arian t f suc h th at f ( i ) = ( f 1 ( i ) , f 2 ( i )). If the co de is n ot rejected with th e inv arian ts, the algorithm generates the smallest set M w of rank dim B . Th e corresp onding to this set b inary matrix is the input in the algorithm for a canonical form. F or the complexit y of this t yp e of algorithms see [5, 17]. The describ ed algorithm is implement ed in the p rogram Gen-self-dual-bin of the pac k age Self-dua l-bin written in Bor land Delphi 6.0 . 4 The Results T o find all inequiv alen t self-du al co d es of length 38, we b egin from the set U 16 of all in equiv a- len t self-du al cod es of length 32 and dimension 16. W e partition U 16 in to three subsets and ru n them on thr ee cores using a PC In tel i5 4 core p ro cessor. The num b er of all co des considered in the program (these are th e inequiv alen t c hild t yp e co des for eac h co de in U 16 ∪ U 17 ∪ U 18 ) is 2,338, 260,952. F or 151,016,6 75 of them, a canonical form is computed. Th e num b er of th e obtained inequiv alent co des in the set U 19 is 38,682, 183. The calculations to ok ab out f our da ys. Generator matrices of all inequiv alen t self-dual co d es of length 38 are sa v ed in three files in the form used in [6]. A compr essed v ersion of these files is a v ailable on the web-pag e http://w ww.moi.m ath.bas. bg/~iliya/ . A file with additional inform ation whic h con tains the num b er of co dewo rds of we igh ts 2, 4, 6, 8, and the order of th e automorphism group for eac h co de is also a v ailable. T his information allo ws to compute the expr essions in the mass form ulas. The p ossible we igh t en umerators of the self-du al co des of length 38 are giv en b y the follo win g formula W ( y ) =1 + αy 2 + (13 α + β ) y 4 + (57 + 76 α + 7 β − γ − 4 δ ) y 6 + (228 + 260 α + 17 β − γ + 28 δ ) y 8 + (560 α + 7 β + 6 γ − 136 δ + 1520) y 10 + (728 α − 43 β + 6 γ + 248 δ + 10032) y 12 + (364 α − 77 β − 15 γ + 100 δ + 37620) y 14 + (8561 4 − 572 α − 11 β − 15 γ − 764 δ ) y 16 + (1270 72 − 1430 α + 99 β + 20 γ + 528 δ ) y 18 + · · · + y 38 , where α, β , γ , δ are integ ers. The num b ers of inequiv alen t co d es, the n umber s of d ifferen t w eigh t enumerators and the n umbers of different ord ers of the automorphism groups f or eac h minim um w eigh t d are give n in T able 3. The smallest ord er ♯ Aut s and the largest ord er ♯ Aut l among the automorphism group s are listed in T able 4 f or eac h minimum w eigh t d . W e give one m ore table with some additional results ab out the automorphism s of the co des. W e list in T able 6 the num b er of self-dual [38 , 19 , d ] co des C suc h that p k divides the order of Aut( C ) where p is a prime and k is a p ositiv e in teger. 13 T able 3: Number s of inequiv alen t co des of length 38 d 2 4 6 8 ♯ co d es 51949 2 27463 982 10695965 2744 ♯ we igh t enumerators 3504 7176 88 2 ♯ ord ers of Aut( C ) 79 9 764 75 18 T able 4: Ord ers of the automorphism groups d 2 4 6 8 ♯ Aut s 2 4 1 1 ♯ Aut l 2 19 · 19! 2 13 · 3 · 7 · 16! 1 032192 504 F or the v erification of our results, we use the m ass f orm ula (1) and also the f ollo wing corollary f rom one lemma of Th ompson [24]: Theorem 12 [11] L et n and d b e even p ositive inte gers and let U b e a family of ine quivalent self-dual c o des of leng th n and minimum weight at most d . Then U is a c omplete set of r epr esentatives for e quivalenc e classes of self- dual c o des of length n and minimum weight at most d if and only if X C ∈ U n ! | Aut( C ) | |{ x ∈ C | wt( x ) = d }| =  n d  n/ 2 − 2 Y i =1 (2 i + 1) . (3) F or the constructed co des w e obtain the same v alues of the left and the r ight expressions in the formula (3) f or n = 38, namely: (d=2) 19137 6974245 78816915816164139573797711865999715625; (d=4) 20094 5822958 0775776160697234655248759745929970140625; (d=6) 75153 7377863 21014028410076576106303614497780883259375; (d=8) 13312 9478364 3400819931835642205311664028246404217737500; (all) 272228981 85745116523209337325140537285726884375 (form ula (1)). Remark 2 T o calculate th e sums in the mass-formulas (1) and (3), we use the pac k age LONGNUM of S. Kapralo v for calculations w ith large in tegers [14]. 14 5 Conclusion The generation of all in equiv alen t bin ary self-du al co des of length n ≥ 38, using only standard computer algebra systems, seems to b e infeasible. That is wh y we use s p ecial algo rithmic tec hn iques to surm oun t difficulties and to classify co des ev en with PC’s. In this w ork we describ e the classification of the self-dual co des of length 38. Denote by S D k the num b er of all inequiv alen t self-du al co des of d imension k . Ob viously , S D k ≥ Q k − 1 i =1 (2 i + 1) (2 k )! . Consider the sequence a k = S D k (2 k )! / Q k − 1 i =1 (2 i + 1), k = 1 , 2 , . . . . Lo oking at the already kno wn classifications of bin ary self-dual cod es, we can calculate the v alues of a k for k ≤ 19. W e list the in teger p art of these v alues in T able 5. Moreo ve r, if we coun t th e n umb er of the inequiv alent self-dual co des w ith a trivial automorphism grou p , we s ee that th ere are no suc h co d es for length n ≤ 32, b ut for the larger lengths this n umb er increases v ery fast. F or example, more than a quarter of all co des of length 38, namely 10140 257 inequiv alen t co des, ha v e a trivial automorph ism group . So we hav e the follo win g conjecture. Conjecture 1 The se quenc e { a k , k = 10 , 11 , 12 , . . . } is de cr e asing. T able 5: V alues of ⌊ a k ⌋ for k ≤ 19 k 1 2 3 4 5 6 7 8 9 10 ⌊ a k ⌋ 2 8 48 597 3162 18974 7083 6 230631 353061 464937 k 11 12 13 14 15 16 17 18 19 20 ⌊ a k ⌋ 327 440 194067 57659 13482 2004 273 34 7 2 ? The doub ly-ev en self-du al co des of length 40 h a v e b een classified in [2]. A low er b ound on the n umber of all self-dual co des of that length is giv en b y Q 19 i =1 (2 i + 1) 40! > 4 , 585 , 657 , 509. According to Conjecture 1 and T able 5, w e ha v e Conjecture 2 The numb er of the ine quivalent binary self-dual c o des of length 40 ar e at most 2 · Q 19 i =1 (2 i + 1) 40! < 9 , 171 , 315 , 020 . 15 Ac kno wledgemen ts The main part of this researc h w as don e during the authors’ visit to Departmen t of Alge- bra an d Geometry at Magdeburg Univ ersit y , Germany . The auth ors would like to thank Prof. W olfgang Willems for his h ospitalit y and sup p ort. Stefk a Bouyukliev a also thanks the Alexander v on Humb oldt F oundation for th e fi nancial su pp ort. References [1] C. Aguilar-Melc hor, P . Gab orit, J.-L. Kim, L. Sok and P . S ole, Classification of extremal and s-extremal binary self-dual co des of length 38, prepr in t. [2] K. Betsumiya , M. Harada and A. Munemasa, A complete classification of doubly ev en self-dual co des of length 40, p reprint [arXiv:1104.37 27 ]. [3] R. T. Bilous, Enumeration of the binary self-du al co des of length 34, J. Combin. Math. Combin. Comput. 59 (2006) , 173–21 1. [4] R.T. Bilous, G.H.J. V an Rees, An enumeration of binary self-dual co des of length 32, Designs, Co des and Crypto gr aphy 26 (2002) , 61–86. [5] Bouyukliev, I. (2007) Ab out the co d e equiv alence, in A dvanc es in Co ding The ory and Cryptolo gy , T. S h ask a, W. C. Huffm an, D. Jo y n er, V. Ustimenk o: Series on Co ding Theory and Cr y p tology , W orld Scien tific Pub lishing, Hac kensac k, NJ, 2007. [6] I. Bouyukliev, What is Q-extension?, Ser dic a Journal of Computing 1 (2007), 115–1 30. [7] J.H.Conw ay and V.Pless, On the en u meration of self-dual codes, Journ. Combin. The ory , ser. A 28 (1980), 26-53. [8] J.H.Conw ay , V.Pless and N.J.A.Sloane, Th e binary self-du al co des of length u p to 32: a revised enumeration, Journ. Combin. The ory , ser. A, 60 (1992), 183-19 5. [9] J.H.Conw ay and N.J.A.Sloane, A new u p p er b oun d on the minimal distance of self-du al co des, IEEE T r ans. Inform. The ory , 36 (1991), 1319–133 3. [10] M. Harada and A. Mun emasa, Database of Self-Dual Co des, Online av ailable at http://w ww.math. is.tohoku.ac.jp/~munemasa/selfdualcodes.htm . [11] M. Harada and A. Munemasa, Classification of self-dual co des of length 36, preprint, [arXiv:1012 .5464 ]. [12] W.C. Huffman, On the classificatio n and en umeration of self-dual co des, Fin ite Fields Appl. 11 (2005), 451–49 0. 16 [13] W. C . Huffman, V. Pless, F undamenta ls of error-correcting co d es, Cam brid ge Univ. Press, 2003. [14] S . Kapralo v, Boun ds, constructions and classifications of optimal co d es, DSc Disserta- tion, 2004 (in bulgarian). [15] P . K aski and P . R. ¨ Osterg ˚ ard, Classifi cation Algorithms for Co des and Designs, Spr inger, 2006. [16] J .-L. K im , New extremal self-du al co d es of lengths 36,38, and 58, IEEE T r ans. Inform. The ory , 47 (2001), 386–393. [17] B. D. McKa y, Practical graph isomorphism, Congr. Numer. 30 (1981), 45–87. [18] B. D. McKa y, Isomorph -free exhaustive generation, J. Algo rithms 26 (1998), 306–324 . [19] C . Aguilar-Melc hor and P . Gab orit, On the classification of extremal [36 , 18 , 8] b inary self-dual co des, IEEE T r ans. Inform. The ory , 54 (2008), 4743– 4750. [20] V. Pless, A classification of self-orthogonal co d es o v er GF(2), Discr e te M ath. 3 (1972), 209-2 46. [21] V. Pless, The c hildren of the (32,16) doubly ev en cod es, IEEE T r ans. Inform. The ory , 24 (1978), 738-746. [22] V. Pless and N.J.A. Sloane, On the classification and enumeration of self-dual codes, Journ. Combin. The ory , ser. A, 18 (1975), 313-335. [23] ´ Ak os S eress, Pe rmutatio n grou p algorithms, C ambridge Univ. Pr ess, 2003. [24] J .G. Thompson, W eigh ted a v erages asso ciated to some cod es, Scripta M ath. , 29 (197 3), 449-4 52. 17 T able 6: Number of co d es C for which p k divides the ord er of th eir au tomorp h ism groups p k \ d 2 4 6 8 2 519492 27463 982 55712 7 453 2 2 47843 4 27463982 89141 111 2 3 46704 8 17031875 23498 34 2 4 39769 9 16153273 8201 1 2 5 37561 4 9310617 3788 - 2 6 30398 4 8307428 1733 - 2 7 27473 0 4686394 846 - 2 8 21298 2 3854920 414 - 2 9 18352 5 2208800 220 - 2 10 14015 8 1629411 134 - 2 11 11296 8 970908 79 - 2 12 85784 64165 7 48 - 2 13 65569 38790 0 26 - 2 14 48579 23714 3 14 - 2 15 35399 14083 7 8 - 2 16 25470 83500 5 - 2 17 17908 49360 - - 2 18 12729 29175 - - 2 19 8838 17009 - - 2 20 6161 964 6 - - 2 21 4162 561 2 - - 2 22 2774 322 8 - - 2 23 1812 175 4 - - 2 24 1177 996 - - 2 25 790 505 - - 2 26 551 235 - - 2 27 345 91 - - 2 28 226 33 - - 2 29 156 6 - - p k \ d 2 4 6 8 2 30 87 2 - - 2 31 47 1 - - 2 32 16 - - - 2 33 7 - - - 2 34 3 - - - 2 35 1 - - - - 3 132329 2743510 391 6 85 3 2 45728 42443 3 185 7 3 3 17286 93437 26 1 3 4 6463 22451 3 - 3 5 1763 4315 - - 3 6 256 366 - - 3 7 51 52 - - 3 8 8 5 - - 5 4209 16112 9 - 5 2 449 624 - - 5 3 52 40 - - 7 4270 21981 14 5 7 2 467 771 - - 7 3 83 83 - - 7 4 16 13 - - 7 5 1 2 - - 11 47 29 - - 13 17 7 - - 17 4 - - - 19 1 - 2 1 23 6 4 - - 31 2 2 - - 18

Original Paper

Loading high-quality paper...

Comments & Academic Discussion

Loading comments...

Leave a Comment