""" This is a database of binary self-dual codes. * Format of each entry: a list of elements of the form [ C, G, T, sigma ], where C = sd code of length n, dim n/2, over GF(2) G = perm aut gp of C T = type of C (which can be "I" or "II", in the binary case) sigma = the spectrum [A0,A1,...,An] (a) The following double for loop can be time-consuming but should be run once in awhile for testing perposes. It should only print True and have no trace-back errors. for n in [4,6,8,10,12,14,16,18,20,22]: C = self_dual_codes(n); m = len(C) for i in range(m): print n, ' ',i, ' ',C[i][3] == C[i][0].spectrum() print C[i][0] == C[i][0].dual_code() print C[i][1] == C[i][0].permutation_automorphism_group() (b) To check if the "Riemann hypothesis" holds, run the following code: R = PolynomialRing(CC,"T") T = R.gen() for n in [4,6,8,10,12,14,16,18,20,22]: C = self_dual_codes(n); m = len(C) for i in range(m): if C[i][0].minimum_distance()>2: f = R(C[i][0].self_dual_zeta_polynomial()) print n,i,[z[0].abs() for z in f.roots()] You should get lists of numbers equal to 0.707106781186548. Except for \code{unique_list} below, all functions copyright David Joyner, 2007, wdjoyner@gmail.com. This is released under the GPL, version 2 or later (www.fsf.org). Created 11-8-2007. Last modified 3-3-2008. REFERENCES: [HP] W. C. Huffman, V. Pless, Fundamentals of Error-Correcting Codes, Cambridge Univ. Press, 2003. [P] V. Pless, "A classification of self-orthogonal codes over GF(2)", Discrete Math 3 (1972) 209-246. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Here's an easy "diagonal" construction of self-dual codes in the binary case: For *even* m, let A_m denote the mxm matrix over GF(2) given by adding the all 1's matrix to the identity matrix (in MatrixSpace(GF(2),m,m) of course). If M_1, ..., M_r are square matrices, let diag(M_1,M_2,...,M_r) denote the "block diagonal" matrix with the M_i's on the diagonal and 0's elsewhere. Let C(m_1,...,m_r,s) denote the linear code with generator matrix having block form G = (I, A), where A = diag(A_{m_1},A_{m_2},...,A_{m_r},I_s), for some m_i's and s, where m_1+m_2+...+m_r+s=n/2. Note: Such C(m_1,...,m_r,s) is sd and can be type I even when s=0 and 4|gcd(m_1,...,m_r). SD codes not of this form will be called (for the purpose of documenting the code below) "exceptional". Most sd codes are exceptional (based on a counting argument and table 9.1 in the Huffman+Pless [HP], page 347). """ def unique_list(s): """ Return a list of the elements in s, but without duplicates. For example, unique_list([1,2,3,1,2,3]) is some permutation of [1,2,3], unique_list("abcabc") some permutation of ["a", "b", "c"], and unique_list(([1, 2], [2, 3], [1, 2])) some permutation of [[2, 3], [1, 2]]. For best speed, all sequence elements should be hashable. Then unique() will usually work in linear time. If not possible, the sequence elements should enjoy a total ordering, and if list(s).sort() doesn't raise TypeError it's assumed that they do enjoy a total ordering. Then unique() will usually work in O(N*log2(N)) time. If that's not possible either, the sequence elements must support equality-testing. Then unique() will usually work in quadratic time. http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52560 Title: Remove duplicates from a sequence Submitter: Tim Peters (other recipes) Last Updated: 2001/04/06 Distributed under the Python License: http://www.python.org/2.3/license.html """ n = len(s) if n == 0: return [] # Try using a dict first, as that's the fastest and will usually # work. If it doesn't work, it will usually fail quickly, so it # usually doesn't cost much to *try* it. It requires that all the # sequence elements be hashable, and support equality comparison. u = {} try: for x in s: u[x] = 1 except TypeError: del u # move on to the next method else: return u.keys() # We can't hash all the elements. Second fastest is to sort, # which brings the equal elements together; then duplicates are # easy to weed out in a single pass. # NOTE: Python's list.sort() was designed to be efficient in the # presence of many duplicate elements. This isn't true of all # sort functions in all languages or libraries, so this approach # is more effective in Python than it may be elsewhere. try: t = list(s) t.sort() except TypeError: del t # move on to the next method else: assert n > 0 last = t[0] lasti = i = 1 while i < n: if t[i] != last: t[lasti] = last = t[i] lasti += 1 i += 1 return t[:lasti] # Brute force is all that's left. u = [] for x in s: if x not in u: u.append(x) return u def matrix_equivalence_class(M): """ Returns the perm equiv class of M - ie, if M is a kxk GF(2) matrix, then the S_kxS_k orbit of M is returned. The format of the output is a sorted list of length (k!)^2. Some example code, this can be used with: F = GF(2) n = 6 MS = MatrixSpace(F, n, n) orbs = [] for i in range(1000): A = MS.random_element() if A*transpose(A) == MS.identity_matrix(): orbs.append([matrix_equivalence_class(A)]) EXAMPLES: sage: A = MS4( [[0,1,1,1],[1,0,1,1],[1,1,0,1],[1,1,1,0]] ) sage: MS4 = MatrixSpace(F, 4, 4) sage: F = GF(2) sage: MS4 = MatrixSpace(F, 4, 4) sage: A = MS4( [[0,1,1,1],[1,0,1,1],[1,1,0,1],[1,1,1,0]] ) sage: B = MS4([[0,1,0,0],[1,0,0,0],[0,0,0,1],[0,0,1,0]]) sage: oA = matrix_equivalence_class(A) sage: oB = matrix_equivalence_class(B) sage: len(oA) 24 sage: len(oB) 24 """ orbit = [] k = len(M.rows()) G = SymmetricGroup(k) MS = M.parent() for g in G: for h in G: p = MS(g.matrix()) q = MS(h.matrix()) M0 = p*M*q orbit.append(M0) O = unique_list(orbit) O.sort() return O def redundancy_matrix(C): """ If C is a linear [n,k,d] code then this function returns a kx(n-k) matrix A such that G = (I,A) generates a code (in standard form) equiv to C. If C is already in standard form and G = (I,A) is its gen mat then this function simply returns that A. EXAMPLES: sage: C = HammingCode(3,GF(2)) sage: C.gen_mat() [1 0 0 1 0 1 0] [0 1 0 1 0 1 1] [0 0 1 1 0 0 1] [0 0 0 0 1 1 1] sage: redundancy_matrix(C) [1 1 0] [1 1 1] [1 0 1] [0 1 1] sage: C.standard_form()[0].gen_mat() [1 0 0 0 1 1 0] [0 1 0 0 1 1 1] [0 0 1 0 1 0 1] [0 0 0 1 0 1 1] """ n = C.length() k = C.dimension() C1 = C.standard_form()[0] G1 = C1.gen_mat() A = G1.matrix_from_columns(range(n-k+1,n)) return A def d_matrix(m): """ Returns the matrix denoted d_{m} (m even) in [HP], \S 9.7. EXAMPLES: """ L = [2*j*[0]+4*[1]+(m-2*j-4)*[0] for j in range(m/2-1)] MS = MatrixSpace(GF(2),m/2-1,m) return MS(L) def self_dual_code(n,j=0): return self_dual_codes(n)[j] def self_dual_codes(n): """ For n>=4 even, returns the sd codes of a given length, up to (perm) equivalence, the (perm) aut gp, and the type. The number of inequiv "diagonal" sd binary codes in the database of length n is ("diagonal" is defined by the conjecture above) is the same as the restricted partition number of n, where only integers from the set {1,4,6,8,...} are allowed. This is the coeff of x^n in the series expansion $(1-x)^{-1}\prod_{2^\infty (1-x^{2j})^{-1}$. Putting sage: f = (1-x)^(-1)*prod([(1-x^(2*j))^(-1) for j in range(2,18)]) into SAGE, we obtain for the coeffs of x^4, x^6, ... [1, 1, 2, 2, 3, 3, 5, 5, 7, 7, 11, 11, 15, 15, 22, 22, 30, 30, 42, 42, 56, 56, 77, 77, 101, 101, 135, 135, 176, 176, 231] These numbers grow too slowly to account for all the sd codes (see Huffman+Pless' Table 9.1, referenced above). In fact, in Table 9.10 of [HP], the number B_n of inequivalent sd binary codes of length n is given: n 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 B_n 1 1 1 2 2 3 4 7 9 16 25 55 103 261 731 According to http://www.research.att.com/~njas/sequences/A003179, the next 2 entries are: 3295, 24147. EXAMPLES: sage: C = self_dual_codes(10) sage: C[0][0] == C[0][0].dual_code() True sage: C[1][0] == C[1][0].dual_code() True sage: C[0][0].permutation_automorphism_group() == C[0][1] True sage: len(C) # number of inequiv sd codes of length 10 2 sage: C = self_dual_codes(12) sage: C[0][0] == C[0][0].dual_code() True sage: C[1][0] == C[1][0].dual_code() True sage: C[2][0] == C[2][0].dual_code() True """ c = [] F = GF(2) MS = MatrixSpace(F, n/2, n) A = [] for j in range(n/2+2): MS0 = MatrixSpace(F, j, j) I = MS0.identity_matrix() O = MS0(j*j*[1]) A.append(I+O) Id = [] for j in range(n/2): MSn = MatrixSpace(F, n/2-j, n/2-j) Id.append(MSn.identity_matrix()) MS2 = MatrixSpace(F, n/2, n/2) I2 = MS2.identity_matrix() ## non-diagonal constructions MS7 = MatrixSpace(F, 7, 7) And7 = MS7([[1, 1, 1, 0, 0, 1, 1],\ [1, 1, 1, 0, 1, 0, 1],\ [1, 1, 1, 0, 1, 1, 0],\ [0, 0, 0, 0, 1, 1, 1],\ [0, 1, 1, 1, 0, 0, 0],\ [1, 0, 1, 1, 0, 0, 0],\ [1, 1, 0, 1, 0, 0, 0]]) #Remark: The above matrix constructions aid in computing some "small" self-dual codes. # The term "exceptional" is used to document the code below to indicate # an entry which cannot (AFAIK) be obtained in this way. #n=4 #this code is Type I if n == 4: # [4,0]: genmat = I2.augment(I2) G = PermutationGroup([ "(2,4)", "(1,2)(3,4)" ]) c.append( [LinearCode( genmat ), G, "I", [1, 0, 2, 0, 1] ] ) return c #n=6 # this is Type I if n == 6: # [6,0]: genmat = I2.augment(I2) G = PermutationGroup( ["(3,6)", "(2,3)(5,6)", "(1,2)(4,5)"] ) c.append( [ LinearCode( genmat ), G, "I", [1, 0, 3, 0, 3, 0, 1] ] ) return c #n=8 # the first code is Type I, the second is Type II # the second code is equiv to the extended Hamming [8,4,4] code. if n == 8: # [8,0]: genmat = I2.augment(I2) G = PermutationGroup( ["(4,8)", "(3,4)(7,8)", "(2,3)(6,7)", "(1,2)(5,6)"] ) c.append( [LinearCode( genmat ), G, "I", [1, 0, 4, 0, 6, 0, 4, 0, 1] ] ) # [8,1]: genmat = I2.augment(A[4]) G = PermutationGroup( ["(4,5)(6,7)", "(4,6)(5,7)", "(3,4)(7,8)",\ "(2,3)(6,7)", "(1,2)(5,6)"] ) c.append( [LinearCode( genmat ), G, "II", [1, 0, 0, 0, 14, 0, 0, 0, 1] ] ) return c #n=10 # both of these are Type I; one has a unique lowest weight codeword if n == 10: # [10,0]: genmat = I2.augment(I2) G = PermutationGroup( ["(5,10)", "(4,5)(9,10)", "(3,4)(8,9)",\ "(2,3)(7,8)", "(1,2)(6,7)"] ) c.append( [LinearCode( genmat ), G, "I",\ [1, 0, 5, 0, 10, 0, 10, 0, 5, 0, 1] ] ) # [10,1]: genmat = I2.augment(block_diagonal_matrix([A[4],Id[4]])) G = PermutationGroup( ["(5,10)", "(4,6)(7,8)", "(4,7)(6,8)", "(3,4)(8,9)",\ "(2,3)(7,8)", "(1,2)(6,7)"] ) c.append( [LinearCode( genmat ), G, "I",\ [1, 0, 1, 0, 14, 0, 14, 0, 1, 0, 1] ] ) return c #n=12 # all of these are Type I if n == 12: # [12,0]: genmat = I2.augment(I2) G = PermutationGroup( ["(6,12)", "(5,6)(11,12)", "(4,5)(10,11)", "(3,4)(9,10)",\ "(2,3)(8,9)", "(1,2)(7,8)"] ) c.append( [LinearCode( genmat ), G, "I",\ [1, 0, 6, 0, 15, 0, 20, 0, 15, 0, 6, 0, 1] ] ) # [12,1]: genmat = I2.augment(block_diagonal_matrix([A[4],Id[4]])) G = PermutationGroup( ["(2,3)(4,7)", "(2,4)(3,7)", "(2,4,9)(3,7,8)", "(2,4,8,10)(3,9)",\ "(1,2,4,7,8,10)(3,9)", "(2,4,8,10)(3,9)(6,12)", "(2,4,8,10)(3,9)(5,6,11,12)"] ) c.append( [LinearCode( genmat ), G, "I", [1, 0, 2, 0, 15, 0, 28, 0, 15, 0, 2, 0, 1] ] ) # [12,2]: genmat = I2.augment(A[6]) G = PermutationGroup( ["(5,6)(11,12)", "(5,11)(6,12)", "(4,5)(10,11)", "(3,4)(9,10)",\ "(2,3)(8,9)", "(1,2)(7,8)"] ) c.append( [LinearCode( genmat ), G, "I",\ [1, 0, 0, 0, 15, 0, 32, 0, 15, 0, 0, 0, 1] ] ) return c #n=14 # all of these are Type I; one has a unique lowest weight codeword # (there are 4 total inequiv sd codes of n = 14, by Table 9.10 [HP]) if n == 14: # [14,0]: genmat = I2.augment(I2) G = PermutationGroup( ["(7,14)", "(6,7)(13,14)", "(5,6)(12,13)", "(4,5)(11,12)",\ "(3,4)(10,11)", "(2,3)(9,10)", "(1,2)(8,9)"] ) c.append( [LinearCode( genmat ), G, "I",\ [1, 0, 7, 0, 21, 0, 35, 0, 35, 0, 21, 0, 7, 0, 1] ] ) # [14,1]: genmat = I2.augment(block_diagonal_matrix([A[4],Id[4]])) G = PermutationGroup( ["(7,14)", "(6,7)(13,14)", "(5,6)(12,13)", "(4,8)(9,10)",\ "(4,9)(8,10)", "(3,4)(10,11)", "(2,3)(9,10)", "(1,2)(8,9)"] ) c.append( [LinearCode( genmat ), G, "I",\ [1, 0, 3, 0, 17, 0, 43, 0, 43, 0, 17, 0, 3, 0, 1] ] ) # [14,2]: genmat = I2.augment(block_diagonal_matrix([A[6],Id[6]])) G = PermutationGroup( ["(7,14)", "(5,6)(12,13)", "(5,12)(6,13)", "(4,5)(11,12)",\ "(3,4)(10,11)", "(2,3)(9,10)", "(1,2)(8,9)"] ) c.append( [LinearCode( genmat ), G, "I",\ [1, 0, 1, 0, 15, 0, 47, 0, 47, 0, 15, 0, 1, 0, 1] ] ) # [14,3]: genmat = I2.augment(And7) G = PermutationGroup( ["(7,11)(12,13)", "(7,12)(11,13)", "(6,9)(10,14)",\ "(6,10)(9,14)", "(5,6)(8,9)", "(4,5)(9,10), (2,3)(11,12)", "(2,7)(3,13)",\ "(1,2)(12,13)", "(1,4)(2,5)(3,8)(6,7)(9,13)(10,12)(11,14)"]) c.append( [ LinearCode( genmat ), G, "I",\ [1, 0, 0, 0, 14, 0, 49, 0, 49, 0, 14, 0, 0, 0, 1] ] ) # exceptional return c # n=16 # 4 of these are Type I, 2 are Type II. The 2 Type II codes # are formally equivalent but with different automorphism groups if n == 16: # [16,0]: genmat = I2.augment(I2) G = PermutationGroup( [ "(8,16)", "(7,8)(15,16)", "(6,7)(14,15)", "(5,6)(13,14)", "(4,5)(12,13)", "(3,4)(11,12)", "(2,3)(10,11)", "(1,2)(9,10)"] ) c.append( [LinearCode( genmat ), G, "I",\ [1, 0, 8, 0, 28, 0, 56, 0, 70, 0, 56, 0, 28, 0, 8, 0, 1] ] ) # [16,1]: genmat = I2.augment(block_diagonal_matrix([A[4],Id[4]])) G = PermutationGroup( [ "(8,16)", "(7,8)(15,16)", "(6,7)(14,15)", "(5,6)(13,14)",\ "(4,9)(10,11)", "(4,10)(9,11)", "(3,4)(11,12)", "(2,3)(10,11)", "(1,2)(9,10)"] ) c.append( [LinearCode( genmat ), G, "I",\ [1, 0, 4, 0, 20, 0, 60, 0, 86, 0, 60, 0, 20, 0, 4, 0, 1] ] ) # [16,2]: genmat = I2.augment(block_diagonal_matrix([A[4],A[4]])) G = PermutationGroup( [ "(8,13)(14,15)", "(8,14)(13,15)", "(7,8)(15,16)", "(6,7)(14,15)",\ "(5,6)(13,14)", "(4,9)(10,11)", "(4,10)(9,11)", "(3,4)(11,12)", "(2,3)(10,11)",\ "(1,2)(9,10)","(1,5)(2,6)(3,7)(4,8)(9,13)(10,14)(11,15)(12,16)"] ) c.append( [LinearCode( genmat ), G, "II",\ [1, 0, 0, 0, 28, 0, 0, 0, 198, 0, 0, 0, 28, 0, 0, 0, 1] ] ) # [16,3]: genmat = I2.augment(block_diagonal_matrix([A[6],Id[6]])) G = PermutationGroup( [ "(8,16)", "(7,8)(15,16)", "(5,6)(13,14)", "(5,13)(6,14)",\ "(4,5)(12,13)", "(3,4)(11,12)", "(2,3)(10,11)", "(1,2)(9,10)"] ) c.append( [LinearCode( genmat ), G, "I",\ [1, 0, 2, 0, 16, 0, 62, 0, 94, 0, 62, 0, 16, 0, 2, 0, 1] ] ) # [16,4]: genmat = I2.augment(A[8]) ## an equivalent form: See also [20,8] using A[10] ## [(1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1), ## (0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1), ## (0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0), ## (0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0), ## (0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0), ## (0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0), ## (0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0), ## (0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1)] G = PermutationGroup( [ "(7,8)(15,16)", "(7,15)(8,16)", "(6,7)(14,15)",\ "(5,6)(13,14)","(4,5)(12,13)","(3,4)(11,12)", "(2,3)(10,11)",\ "(1,2)(9,10)"] ) c.append( [LinearCode( genmat ), G, "II",\ [1, 0, 0, 0, 28, 0, 0, 0, 198, 0, 0, 0, 28, 0, 0, 0, 1] ] ) # [16,5]: genmat = I2.augment(block_diagonal_matrix([And7,Id[7]])) G = PermutationGroup( [ "(8,16)", "(7,12)(13,14)", "(7,13)(12,14)",\ "(6,10)(11,15)", "(6,11)(10,15)", "(5,6)(9,10)", "(4,5)(10,11)",\ "(2,3)(12,13)", "(2,7)(3,14)", "(1,2)(13,14)",\ "(1,4)(2,5)(3,9)(6,7)(10,14)(11,13)(12,15)" ] ) c.append( [LinearCode( genmat ), G, "I",\ [1, 0, 1, 0, 14, 0, 63, 0, 98, 0, 63, 0, 14, 0, 1, 0, 1] ] ) # exceptional # [16,6]: H8 = gap(8).HadamardMat()._matrix_(ZZ) ## uses Guava's Hadamard matrices database J8 = MatrixSpace(ZZ,8,8)(64*[1]) genmat = I2.augment(I2+MS2((H8+J8)/2)) G = PermutationGroup( [ "(7,9)(10,16)", "(7,10)(9,16)", "(6,7)(10,11)",\ "(4,6)(11,13)", "(3,5)(12,14)", "(3,12)(5,14)", "(2,3)(14,15)",\ "(1,2)(8,15)", "(1,4)(2,6)(3,7)(5,16)(8,13)(9,12)(10,14)(11,15)" ] ) c.append( [LinearCode( genmat ), G, "I",\ [1, 0, 0, 0, 12, 0, 64, 0, 102, 0, 64, 0, 12, 0, 0, 0, 1] ] ) # exceptional return c #n=18 # all of these are Type I, all are "extensions" of the n=16 codes # [18,3] and [18,4] each has a unique lowest weight codeword. Also, they # are formally equivalent but with different automorphism groups if n == 18: # [18,0]: genmat = I2.augment(I2) G = PermutationGroup( [ "(9,18)", "(8,9)(17,18)", "(7,8)(16,17)", "(6,7)(15,16)",\ "(5,6)(14,15)", "(4,5)(13,14)", "(3,4)(12,13)", "(2,3)(11,12)", "(1,2)(10,11)" ] ) c.append( [LinearCode( genmat ), G, "I",\ [1, 0, 9, 0, 36, 0, 84, 0, 126, 0, 126, 0, 84, 0, 36, 0, 9, 0, 1] ] ) # [18,1]: genmat = I2.augment(block_diagonal_matrix([A[4],Id[4]])) G = PermutationGroup( [ "(9,18)", "(8,9)(17,18)", "(7,8)(16,17)", "(6,7)(15,16)",\ "(5,6)(14,15)", "(4,10)(11,12)", "(4,11)(10,12)", "(3,4)(12,13)",\ "(2,3)(11,12)", "(1,2)(10,11)" ] ) c.append( [LinearCode( genmat ), G, "I",\ [1, 0, 5, 0, 24, 0, 80, 0, 146, 0, 146, 0, 80, 0, 24, 0, 5, 0, 1] ] ) # [18,2]: genmat = I2.augment(block_diagonal_matrix([A[6],Id[6]])) G = PermutationGroup( [ "(9,18)", "(8,9)(17,18)", "(7,8)(16,17)", "(5,6)(14,15)",\ "(5,14)(6,15)","(4,5)(13,14)", "(3,4)(12,13)", "(2,3)(11,12)", "(1,2)(10,11)"] ) c.append( [LinearCode( genmat ), G, "I",\ [1, 0, 3, 0, 18, 0, 78, 0, 156, 0, 156, 0, 78, 0, 18, 0, 3, 0, 1] ] ) # [18,3]: genmat = I2.augment(block_diagonal_matrix([A[4],A[4],Id[8]])) G = PermutationGroup( [ "(9,18)", "(8,14)(15,16)", "(8,15)(14,16)", "(7,8)(16,17)",\ "(6,7)(15,16)","(5,6)(14,15)", "(4,10)(11,12)", "(4,11)(10,12)",\ "(3,4)(12,13)", "(2,3)(11,12)","(1,2)(10,11)",\ "(1,5)(2,6)(3,7)(4,8)(10,14)(11,15)(12,16)(13,17)" ] ) c.append( [LinearCode( genmat ), G, "I",\ [1, 0, 1, 0, 28, 0, 28, 0, 198, 0, 198, 0, 28, 0, 28, 0, 1, 0, 1] ] ) # [18,4]: genmat = I2.augment(block_diagonal_matrix([A[8],Id[8]])) G = PermutationGroup( [ "(9,18)", "(7,8)(16,17)", "(7,16)(8,17)", "(6,7)(15,16)", "(5,6)(14,15)",\ "(4,5)(13,14)", "(3,4)(12,13)", "(2,3)(11,12)", "(1,2)(10,11)" ] ) c.append( [LinearCode( genmat ), G, "I",\ [1, 0, 1, 0, 28, 0, 28, 0, 198, 0, 198, 0, 28, 0, 28, 0, 1, 0, 1] ] ) # [18,5]: A0 = redundancy_matrix(self_dual_codes(n-2)[5][0]) genmat = I2.augment(block_diagonal_matrix([A0,Id[8]])) G = PermutationGroup( [ "(5,10)(6,11)", "(5,11)(6,10)", "(5,11,12)(6,7,10)",\ "(5,11,10,7,12,6,13)", "(2,15)(3,16)(5,11,10,7,12,6,13)",\ "(2,16)(3,15)(5,11,10,7,12,6,13)", "(2,16,14)(3,15,4)(5,11,10,7,12,6,13)",\ "(1,2,16,15,4,3,14)(5,11,10,7,12,6,13)", "(1,5,14,6,16,11,15,7,3,10,4,12,2,13)",\ "(2,16,14)(3,15,4)(5,11,10,7,12,6,13)(9,18)",\ "(2,16,14)(3,15,4)(5,11,10,7,12,6,13)(8,9,17,18)" ] ) c.append( [LinearCode( genmat ), G, "I",\ [1, 0, 2, 0, 15, 0, 77, 0, 161, 0, 161, 0, 77, 0, 15, 0, 2, 0, 1] ] ) # exceptional # [18,6]: A0 = redundancy_matrix(self_dual_codes(n-2)[6][0]) genmat = I2.augment(block_diagonal_matrix([A0,Id[8]])) G = PermutationGroup( [ "(9,18)", "(7,10)(11,17)", "(7,11)(10,17)", "(6,7)(11,12)",\ "(4,6)(12,14)", "(3,5)(13,15)", "(3,13)(5,15)", "(2,3)(15,16)", "(1,2)(8,16)",\ "(1,4)(2,6)(3,7)(5,17)(8,14)(10,13)(11,15)(12,16)" ] ) c.append( [LinearCode( genmat ), G, "I",\ [1, 0, 1, 0, 12, 0, 76, 0, 166, 0, 166, 0, 76, 0, 12, 0, 1, 0, 1] ] ) # exceptional # [18,7] (equiv to H18 in [P]) genmat = MS([[1,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0],\ [0,1,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,1],\ [0,0,1,0,0,0,0,0,0,1,1,1,0,0,1,0,0,1],\ [0,0,0,1,0,0,0,0,0,1,1,1,1,0,0,0,0,1],\ [0,0,0,0,1,0,0,0,0,1,1,0,0,1,0,1,1,0],\ [0,0,0,0,0,1,0,0,0,1,0,1,0,1,0,1,1,0],\ [0,0,0,0,0,0,1,0,0,0,1,1,0,0,0,0,1,0],\ [0,0,0,0,0,0,0,1,0,1,0,0,0,1,0,0,0,1],\ [0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,1,0,1]]) G = PermutationGroup( [ "(9,10)(16,18)", "(9,16)(10,18)", "(8,9)(14,16)",\ "(7,11)(12,17)", "(7,12)(11,17)", "(5,6)(11,12)", "(5,7)(6,17)",\ "(4,13)(5,8)(6,14)(7,9)(10,12)(11,18)(16,17)", "(3,4)(13,15)",\ "(1,2)(5,8)(6,14)(7,9)(10,12)(11,18)(16,17)", "(1,3)(2,15)",\ "(1,5)(2,6)(3,7)(4,11)(10,18)(12,13)(15,17)" ] ) c.append( [LinearCode( genmat ), G, "I",\ [1, 0, 0, 0, 9, 0, 75, 0, 171, 0, 171, 0, 75, 0, 9, 0, 0, 0, 1] ] ) # exceptional # [18, 8] (equiv to I18 in [P]) I18 = MS([[1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\ [0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0],\ [0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0],\ [0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0],\ [1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0],\ [0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0],\ [0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0],\ [0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1],\ [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]]) genmat = MS([[1,0,0,0,0,0,0,0,0, 1, 1, 1, 1, 1, 0, 0, 0, 0],\ [0,1,0,0,0,0,0,0,0, 1, 0, 1, 1, 1, 0, 1, 1, 1],\ [0,0,1,0,0,0,0,0,0, 0, 1, 1, 0, 0, 0, 1, 1, 1],\ [0,0,0,1,0,0,0,0,0, 0, 1, 0, 0, 1, 0, 1, 1, 1],\ [0,0,0,0,1,0,0,0,0, 0, 1, 0, 1, 0, 0, 1, 1, 1],\ [0,0,0,0,0,1,0,0,0, 1, 1, 0, 0, 0, 0, 1, 1, 1],\ [0,0,0,0,0,0,1,0,0, 0, 0, 0, 0, 0, 1, 0, 1, 1],\ [0,0,0,0,0,0,0,1,0, 0, 0, 0, 0, 0, 1, 1, 0, 1],\ [0,0,0,0,0,0,0,0,1, 0, 0, 0, 0, 0, 1, 1, 1, 0]]) G = PermutationGroup( [ "(9,15)(16,17)", "(9,16)(15,17)", "(8,9)(17,18)",\ "(7,8)(16,17)", "(5,6)(10,13)", "(5,10)(6,13)", "(4,5)(13,14)",\ "(3,4)(12,14)", "(1,2)(6,10)", "(1,3)(2,12)" ] ) c.append( [LinearCode( genmat ), G, "I",\ [1, 0, 0, 0, 17, 0, 51, 0, 187, 0, 187, 0, 51, 0, 17, 0, 0, 0, 1] ] ) # exceptional return c #n=20 # all of these of these are Type I; 2 of these codes # are formally equivalent but with different automorphism groups; # one of these has a unique codeword of lowest weight A10 = MatrixSpace(F,10,10)([[1, 1, 1, 1, 1, 1, 1, 1, 1, 0],\ [1, 1, 1, 0, 1, 0, 1, 0, 1, 1],\ [1, 0, 0, 1, 0, 1, 0, 1, 0, 1],\ [0, 0, 0, 1, 1, 1, 0, 1, 0, 1],\ [0, 0, 1, 1, 0, 1, 0, 1, 0, 1],\ [0, 0, 0, 1, 0, 1, 1, 1, 0, 1],\ [0, 1, 0, 1, 0, 1, 0, 1, 0, 1],\ [0, 0, 0, 1, 0, 0, 0, 0, 1, 1],\ [0, 0, 0, 0, 0, 1, 0, 0, 1, 1],\ [0, 0, 0, 0, 0, 0, 0, 1, 1, 1]]) if n == 20: # [20,0]: genmat = I2.augment(I2) G = PermutationGroup( ["(10,20)", "(9,10)(19,20)", "(8,9)(18,19)", "(7,8)(17,18)", "(6,7)(16,17)",\ "(5,6)(15,16)", "(4,5)(14,15)", "(3,4)(13,14)", "(2,3)(12,13)", "(1,2)(11,12)"] ) c.append( [LinearCode( genmat ), G, "I",\ [1, 0, 10, 0, 45, 0, 120, 0, 210, 0, 252, 0, 210, 0, 120, 0, 45, 0, 10, 0, 1] ] ) # [20,1]: genmat = I2.augment(block_diagonal_matrix([A[4],Id[4]])) G = PermutationGroup( [ "(10,20)", "(9,10)(19,20)", "(8,9)(18,19)", "(7,8)(17,18)", "(6,7)(16,17)",\ "(5,6)(15,16)", "(4,11)(12,13)", "(4,12)(11,13)", "(3,4)(13,14)",\ "(2,3)(12,13)", "(1,2)(11,12)"] ) c.append( [LinearCode( genmat ), G, "I",\ [1, 0, 6, 0, 29, 0, 104, 0, 226, 0, 292, 0, 226, 0, 104, 0, 29, 0, 6, 0, 1] ] ) # [20,2]: genmat = I2.augment(block_diagonal_matrix([A[6],Id[6]])) G = PermutationGroup( [ "(10,20)", "(9,10)(19,20)", "(8,9)(18,19)", "(7,8)(17,18)",\ "(5,6)(15,16)", "(5,15)(6,16)", "(4,5)(14,15)", "(3,4)(13,14)",\ "(2,3)(12,13)", "(1,2)(11,12)"] ) c.append( [LinearCode( genmat ), G, "I",\ [1, 0, 4, 0, 21, 0, 96, 0, 234, 0, 312, 0, 234, 0, 96, 0, 21, 0, 4, 0, 1] ] ) # [20,3]: genmat = I2.augment(block_diagonal_matrix([A[6],A[4]])) G = PermutationGroup( [ "(5,6)(15,16)", "(5,15)(6,16)", "(4,5)(14,15)", "(3,4)(13,14)",\ "(2,3)(12,13)", "(1,2)(11,12)", "(8,17)(9,10)", "(8,10)(9,17)", "(8,10,20)(9,19,17)",\ "(8,19,20,9,17,10,18)", "(7,8,19,20,9,18)(10,17)"] ) c.append( [LinearCode( genmat ), G, "I",\ [1, 0, 0, 0, 29, 0, 32, 0, 226, 0, 448, 0, 226, 0, 32, 0, 29, 0, 0, 0, 1] ] ) # [20,4]: genmat = I2.augment(block_diagonal_matrix([A[4],A[4],Id[8]])) G = PermutationGroup( [ "(5,15)(6,16)", "(5,16)(6,15)", "(5,16,7)(6,17,15)", "(5,15,8)(6,17,7)",\ "(5,17,18)(6,15,8), (3,14)(4,13)(5,17,18)(6,15,8)", "(3,13)(4,14)(5,17,18)(6,15,8)",\ "(2,3,14)(4,13,11)(5,17,18)(6,15,8)"," (2,3,12)(4,11,14)(5,17,18)(6,15,8)",\ "(1,2,3,11,14,4,12)(5,17,18)(6,15,8)", "(1,5,13,17,14,8,2,7,3,16,12,6,11,18)(4,15)",\ "(2,3,12)(4,11,14)(5,17,18)(6,15,8)(10,20)",\ "(2,3,12)(4,11,14)(5,17,18)(6,15,8)(9,10,19,20)"] ) c.append( [LinearCode( genmat ), G, "I",\ [1, 0, 2, 0, 29, 0, 56, 0, 226, 0, 396, 0, 226, 0, 56, 0, 29, 0, 2, 0, 1] ] ) # [20,5]: genmat = I2.augment(block_diagonal_matrix([And7,Id[7]])) G = PermutationGroup( [ "(10,20)", "(9,10)(19,20)", "(8,9)(18,19)",\ "(7,11)(12,14)", "(7,12)(11,14)", "(6,7)(12,13)", "(5,6)(11,12)",\ "(4,15)(16,17)", "(4,16)(15,17)", "(2,3)(16,17)", "(2,4)(3,15)",\ "(1,2)(15,16)", "(1,5)(2,6)(3,13)(4,7)(11,16)(12,15)(14,17)" ] ) # order 2709504 c.append( [LinearCode( genmat ), G, "I",\ [1, 0, 3, 0, 17, 0, 92, 0, 238, 0, 322, 0, 238, 0, 92, 0, 17, 0, 3, 0, 1] ] ) # exceptional # [20,6]: genmat = I2.augment(block_diagonal_matrix([A[8],Id[8]])) G = PermutationGroup( [ "(7,8)(17,18)", "(7,17)(8,18)", "(6,7)(16,17)", "(5,6)(15,16)",\ "(4,5)(14,15)", "(3,4)(13,14)", "(2,3)(12,13)", "(1,2)(11,12)",\ "(10,20)", "(9,10,19,20)"] ) c.append( [LinearCode( genmat ), G, "I",\ [1, 0, 2, 0, 29, 0, 56, 0, 226, 0, 396, 0, 226, 0, 56, 0, 29, 0, 2, 0, 1] ] ) # [20,7]: A0 = redundancy_matrix(self_dual_codes(n-4)[6][0]) genmat = I2.augment(block_diagonal_matrix([A0,Id[8]])) G = PermutationGroup( [ "(10,20)", "(9,10)(19,20)", "(7,11)(12,18)",\ "(7,12)(11,18)", "(6,7)(12,13)", "(4,6)(13,15)", "(3,5)(14,16)",\ "(3,14)(5,16)", "(2,3)(16,17)", "(1,2)(8,17)",\ "(1,4)(2,6)(3,7)(5,18)(8,15)(11,14)(12,16)(13,17)" ] ) # order 589824 c.append( [LinearCode( genmat ), G, "I",\ [1,0,2,0,13,0,88,0,242,0,332,0,242,0,88,0,13,0,2,0,1] ] ) # exceptional # [20,8]: (genmat, J20, and genmat2 are all equiv) genmat = I2.augment(A[10]) J20 = MS([[1,1,1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\ [0,0,1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\ [0,0,0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\ [0,0,0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\ [0,0,0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0],\ [0,0,0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0],\ [0,0,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0],\ [0,0,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0],\ [0,0,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1],\ [1,0,1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0]]) genmat2 = MS([[1,0,0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1],\ [0,1,0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1],\ [0,0,1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0],\ [0,0,0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0],\ [0,0,0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0],\ [0,0,0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0],\ [0,0,0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0],\ [0,0,0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0],\ [0,0,0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0],\ [0,0,0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1]]) G = PermutationGroup( [ "(9,10)(19,20)", "(9,19)(10,20)", "(8,9)(18,19)", "(7,8)(17,18)",\ "(6,7)(16,17)", "(5,6)(15,16)", "(4,5)(14,15)", "(3,4)(13,14)",\ "(2,3)(12,13)", "(1,2)(11,12)"] ) # order 1857945600 c.append( [LinearCode( genmat ), G, "I",\ [1, 0, 0, 0, 45, 0, 0, 0, 210, 0, 512, 0, 210, 0, 0, 0, 45, 0, 0, 0, 1] ] ) # [20,9]: (genmat, K20 are equiv) genmat = I2.augment(A10) K20 = MS([[1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\ [0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\ [0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0],\ [0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0],\ [0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0],\ [0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0],\ [0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0],\ [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1],\ [1,0,1,0,1,0,1,0,1,0,1,0,1,1,0,0,0,0,0,0],\ [0,0,0,0,0,0,0,0,0,0,1,1,1,0,1,0,1,0,1,0]]) #genmat = K20 ## not in standard form G = PermutationGroup( [ "(4,13)(5,15)", "(4,15)(5,13)", "(3,4,13)(5,11,15)", "(3,4,6,11,15,17)(5,13)", "(3,5,17,4,12)(6,15,7,11,13)", "(1,2)(3,5,17,4,7,11,13,6,15,12)", "(1,3,5,17,4,12)(2,11,13,6,15,7)", "(3,5,17,4,12)(6,15,7,11,13)(10,18)(19,20)", "(3,5,17,4,12)(6,15,7,11,13)(10,19)(18,20)", "(3,5,17,4,12)(6,15,7,11,13)(9,10)(16,18)", "(3,5,17,4,12)(6,15,7,11,13)(8,9)(14,16)" ] ) # order 4423680 c.append( [LinearCode( genmat ), G, "I",\ [1, 0, 0, 0, 21, 0, 48, 0, 234, 0, 416, 0, 234, 0, 48, 0, 21, 0, 0, 0, 1] ] ) # [20,10] L20 = MS([[1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\ [0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\ [1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0],\ [0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0],\ [0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0],\ [0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0],\ [0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0],\ [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1],\ [0,1,0,1,0,1,0,0,1,0,1,0,1,0,1,1,0,0,0,0],\ [0,1,0,1,0,1,0,0,0,0,0,0,0,0,1,0,1,0,1,0]]) genmat = L20 ## not in standard form G = PermutationGroup( [ "(17,18)(19,20)", "(17,19)(18,20)", "(15,16)(19,20)", "(15,17)(16,18)", "(10,11)(12,13)", "(10,12)(11,13)", "(9,10)(13,14)", "(8,9)(12,13)", "(3,4)(5,6)", "(3,5)(4,6)", "(2,3)(6,7)", "(1,2)(5,6)", "(1,8)(2,9)(3,10)(4,11)(5,12)(6,13)(7,14)(19,20)" ] ) # order 1354752 c.append( [LinearCode( genmat ), G, "I",\ [1, 0, 0, 0, 17, 0, 56, 0, 238, 0, 400, 0, 238, 0, 56, 0, 17, 0, 0, 0, 1] ] ) # [20,11] S20 = MS([[1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\ [0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\ [0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0],\ [0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0],\ [0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0],\ [0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0],\ [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1],\ [1,0,1,0,1,0,1,0,1,1,0,0,0,0,0,0,1,1,0,0],\ [1,1,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,1,0,0],\ [1,1,0,0,0,0,0,0,1,1,0,0,0,0,0,0,1,0,1,0]] ) genmat = S20 ## not in standard form G = PermutationGroup( [ "(17,18)(19,20)", "(17,19)(18,20)", "(13,14)(15,16)", "(13,15)(14,16)", "(11,12)(15,16)", "(11,13)(12,14)", "(9,10)(15,16)", "(9,11)(10,12)", "(5,6)(7,8)", "(5,7)(6,8)", "(3,4)(7,8)", "(3,5)(4,6)", "(1,2)(7,8)", "(1,3)(2,4)", "(1,9)(2,10)(3,11)(4,12)(5,13)(6,14)(7,15)(8,16)" ] ) # G.order() = 294912 c.append( [LinearCode( genmat ), G, "I",\ [1, 0, 0, 0, 13, 0, 64, 0, 242, 0, 384, 0, 242, 0, 64, 0, 13, 0, 0, 0, 1] ] ) # [20,12] R20 = MS([[0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\ [0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0],\ [0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0],\ [0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0],\ [0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0],\ [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1],\ [0,1,0,0,1,1,0,0,0,0,0,0,0,0,1,0,0,1,1,0],\ [1,1,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0],\ [1,1,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1],\ [1,1,0,0,0,0,1,1,0,0,0,0,1,1,0,0,0,0,1,1]]) genmat = R20 ## not in standard form G = PermutationGroup( [ "(17,18)(19,20)", "(17,19)(18,20)", "(15,16)(19,20)", "(15,17)(16,18)", "(11,12)(13,14)", "(11,13)(12,14)", "(9,10)(13,14)", "(9,11)(10,12)", "(5,6)(7,8)", "(5,7)(6,8)", "(3,4)(7,8)", "(3,5)(4,6)", "(3,9,15)(4,10,16)(5,11,17)(6,12,18)(7,14,19)(8,13,20)", "(1,2)(7,8)(9,15)(10,16)(11,17)(12,18)(13,19)(14,20)" ] ) # order 82944 c.append( [LinearCode( genmat ), G, "I",\ [1, 0, 0, 0, 9, 0, 72, 0, 246, 0, 368, 0, 246, 0, 72, 0, 9, 0, 0, 0, 1] ] ) # [20,13] M20 = MS([[1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\ [0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0],\ [0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0],\ [0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0],\ [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1],\ [0,0,0,0,0,0,0,0,1,1,0,0,1,1,0,0,1,1,0,0],\ [1,1,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,1,0],\ [0,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1],\ [0,0,1,1,0,1,1,0,0,0,1,1,0,0,0,0,0,0,0,0],\ [0,0,0,0,0,0,1,1,0,1,1,0,1,0,0,1,0,0,0,0] ] ) genmat = M20 ## not in standard form G = PermutationGroup( [ "(17,18)(19,20)", "(17,19)(18,20)", "(13,14)(15,16)", "(13,15)(14,16)", "(9,10)(11,12)", "(9,11)(10,12)", "(5,6)(7,8)", "(5,7)(6,8)", "(5,9)(6,11)(7,12)(8,10)(13,17)(14,19)(15,18)(16,20)", "(5,13)(6,15)(7,14)(8,16)(9,17)(10,20)(11,18)(12,19)", "(3,4)(6,7)(11,12)(13,17)(14,18)(15,19)(16,20)", "(2,3)(7,8)(9,13)(10,14)(11,15)(12,16)(19,20)", "(1,2)(6,7)(11,12)(13,17)(14,18)(15,19)(16,20)", "(1,5)(2,6)(3,7)(4,8)(9,17)(10,18)(11,19)(12,20)" ] ) c.append( [LinearCode( genmat ), G, "I",\ [1, 0, 0, 0, 5, 0, 80, 0, 250, 0, 352, 0, 250, 0, 80, 0, 5, 0, 0, 0, 1] ] ) # [20,14]: ## aut gp of this computed using a program by Robert Miller A0 = redundancy_matrix(self_dual_codes(n-2)[8][0]) genmat = I2.augment(block_diagonal_matrix([A0,Id[9]])) # [[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0], # [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0], # [0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0], # [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0], # [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0], # [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0], # [0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0], # [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0], # [0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0], # [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]] G = PermutationGroup( [ "(8,19)(16,17)", "(8,16)(17,19)", "(9,18)(16,17)", "(8,9)(18,19)", "(7,8)(17,18)", "(4,15)(5,14)", "(4,5)(14,15)", "(4,15)(6,11)", "(5,6)(11,14)", "(3,13)(4,15)", "(3,15)(4,13)", "(1,2)(4,15)", "(1,4)(2,15)(3,5)(13,14)", "(10,20)" ] ) # order 645120; C.permutation_automorphism_group() crashes.... c.append( [LinearCode( genmat ), G, "I",\ [1, 0, 1, 0, 17, 0, 68, 0, 238, 0, 374, 0, 238, 0, 68, 0, 17, 0, 1, 0, 1] ] ) # exceptional # [20,15]: A0 = redundancy_matrix(self_dual_codes(n-2)[7][0]) genmat = I2.augment(block_diagonal_matrix([A0,Id[9]])) # [[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0], # [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0], # [0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0], # [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0], # [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0], # [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0], # [0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0], # [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0], # [0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0], # [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]] G = PermutationGroup( [ "(10,20)", "(9,11)(17,19)", "(9,17)(11,19)", "(8,9)(15,17)", "(7,12)(13,18)", "(7,13)(12,18)", "(5,6)(12,13)", "(5,7)(6,18)", "(4,14)(5,8)(6,15)(7,9)(11,13)(12,19)(17,18)", "(3,4)(14,16)", "(1,2)(5,8)(6,15)(7,9)(11,13)(12,19)(17,18)", "(1,3)(2,16)", "(1,5)(2,6)(3,7)(4,12)(11,19)(13,14)(16,18)" ] ) # order 165888 c.append( [LinearCode( genmat ), G, "I",\ [1, 0, 1, 0, 9, 0, 84, 0, 246, 0, 342, 0, 246, 0, 84, 0, 9, 0, 1, 0, 1] ] ) # exceptional return c #n=22 # all of these of these are Type I; 2 of these codes # are formally equivalent but with different automorphism groups # incomplete (7 out of 25) if n == 22: # [22,0]: genmat = I2.augment(I2) G = PermutationGroup( [ "(11,22)", "(10,11)(21,22)", "(9,10)(20,21)",\ "(8,9)(19,20)", "(7,8)(18,19)", "(6,7)(17,18)", "(5,6)(16,17)",\ "(4,5)(15,16)", "(3,4)(14,15)", "(2,3)(13,14)", "(1,2)(12,13)" ] ) c.append( [ LinearCode( genmat ), G, "I",\ [1, 0, 11, 0, 55, 0, 165, 0, 330, 0, 462, 0, 462, 0, 330, 0, 165, 0, 55, 0, 11, 0, 1] ] ) # [22,1]: genmat = I2.augment(block_diagonal_matrix([A[4],Id[4]])) G = PermutationGroup( [ "(11,22)", "(10,11)(21,22)", "(9,10)(20,21)",\ "(8,9)(19,20)", "(7,8)(18,19)", "(6,7)(17,18)", "(5,6)(16,17)",\ "(4,12)(13,14)", "(4,13)(12,14)", "(3,4)(14,15)", "(2,3)(13,14)", "(1,2)(12,13)" ] ) c.append( [ LinearCode( genmat ), G, "I",\ [1, 0, 7, 0, 35, 0, 133, 0, 330, 0, 518, 0, 518, 0, 330, 0, 133, 0, 35, 0, 7, 0, 1] ] ) # [22,2]: genmat = I2.augment(block_diagonal_matrix([A[6],Id[6]])) G = PermutationGroup( [ "(11,22)", "(10,11)(21,22)", "(9,10)(20,21)",\ "(8,9)(19,20)", "(7,8)(18,19)", "(5,6)(16,17)", "(5,16)(6,17)",\ "(4,5)(15,16)", "(3,4)(14,15)", "(2,3)(13,14)", "(1,2)(12,13)" ] ) c.append( [ LinearCode( genmat ), G, "I",\ [1, 0, 5, 0, 25, 0, 117, 0, 330, 0, 546, 0, 546, 0, 330, 0, 117, 0, 25, 0, 5, 0, 1] ] ) # [22,3]: genmat = I2.augment(block_diagonal_matrix([A[8],Id[8]])) G = PermutationGroup( [ "(11,22)", "(10,11)(21,22)", "(9,10)(20,21)",\ "(7,8)(18,19)", "(7,18)(8,19)", "(6,7)(17,18)", "(5,6)(16,17)",\ "(4,5)(15,16)", "(3,4)(14,15)", "(2,3)(13,14)", "(1,2)(12,13)" ] ) c.append( [ LinearCode( genmat ), G, "I",\ [1, 0, 3, 0, 31, 0, 85, 0, 282, 0, 622, 0, 622, 0, 282, 0, 85, 0, 31, 0, 3, 0, 1] ] ) # [22,4]: genmat = I2.augment(block_diagonal_matrix([A[10],Id[10]])) G = PermutationGroup( [ "(11,22)", "(9,10)(20,21)", "(9,20)(10,21)",\ "(8,9)(19,20)", "(7,8)(18,19)", "(6,7)(17,18)", "(5,6)(16,17)",\ "(4,5)(15,16)", "(3,4)(14,15)", "(2,3)(13,14)", "(1,2)(12,13)" ] ) c.append( [ LinearCode( genmat ), G, "I",\ [1, 0, 1, 0, 45, 0, 45, 0, 210, 0, 722, 0, 722, 0, 210, 0, 45, 0, 45, 0, 1, 0, 1] ] ) # [22,5]: genmat = I2.augment(block_diagonal_matrix([A[4],A[4],Id[8]])) G = PermutationGroup( [ "(11,22)", "(10,11)(21,22)", "(9,10)(20,21)",\ "(8,16)(17,18)", "(8,17)(16,18)", "(7,8)(18,19)", "(6,7)(17,18)",\ "(5,6)(16,17)", "(4,12)(13,14)", "(4,13)(12,14)", "(3,4)(14,15)",\ "(2,3)(13,14)", "(1,2)(12,13)", "(1,5)(2,6)(3,7)(4,8)(12,16)(13,17)(14,18)(15,19)" ] ) c.append( [ LinearCode( genmat ), G, "I",\ [1, 0, 3, 0, 31, 0, 85, 0, 282, 0, 622, 0, 622, 0, 282, 0, 85, 0, 31, 0, 3, 0, 1] ] ) # [22,6]: genmat = I2.augment(block_diagonal_matrix([A[6],A[4],Id[10]])) G = PermutationGroup( [ "(11,22)", "(10,18)(19,20)", "(10,19)(18,20)",\ "(9,10)(20,21)", "(8,9)(19,20)", "(7,8)(18,19)", "(5,6)(16,17)",\ "(5,16)(6,17)", "(4,5)(15,16)", "(3,4)(14,15)", "(2,3)(13,14)", "(1,2)(12,13)" ] ) c.append( [ LinearCode( genmat ), G, "I",\ [1, 0, 1, 0, 29, 0, 61, 0, 258, 0, 674, 0, 674, 0, 258, 0, 61, 0, 29, 0, 1, 0, 1] ] ) return c return []