Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Add more skew SDS
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoCati committed Dec 23, 2022
1 parent 4f7b28f commit bc4d841
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 6 deletions.
4 changes: 4 additions & 0 deletions src/doc/en/reference/references/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2042,6 +2042,10 @@ REFERENCES:
Journal of Combinatorial Theory, Series A 61(2) (1992): 319-321.
:doi:`10.1016/0097-3165(92)90029-T`
.. [Djo1992c] \D. Đoković.
*Ten New Orders for Hadamard Matrices of Skew Type*,
Publikacije Elektrotehničkog fakulteta. Serija Matematika 2 (1992): 47-59.
.. [Djo1994] \D. Đoković.
*Five New Orders for Hadamard Matrices of Skew Type*,
Australasian Journal of Combinatorics 10 (1994): 259-264.
Expand Down
66 changes: 60 additions & 6 deletions src/sage/combinat/designs/difference_family.py
Original file line number Diff line number Diff line change
Expand Up @@ -1941,6 +1941,7 @@ def skew_supplementary_difference_set(n, existence=False, check=True):
* `n = 103, 151`: [Djo1994]_
* `n = 67, 113, 127, 157, 163, 181, 241`: [Djo1992a]_
* `n = 37, 43`: [Djo1992b]_
* `n = 39, 49, 65, 93, 121, 129, 133, 217, 219, 267`: [Djo1992c]_
INPUT:
Expand Down Expand Up @@ -1998,11 +1999,23 @@ def skew_supplementary_difference_set(n, existence=False, check=True):
indices = {
37: [[0, 3, 5, 7, 9, 10], [0, 5, 6, 7, 8],
[1, 2, 6, 7, 9], [2, 6, 8, 9, 10]],
39: [[1, 3, 5, 6, 8, 10, 12], [0, 1, 5, 8, 12, 13],
[1, 3, 4, 7, 9, 12, 13], [0, 1, 2, 3, 7, 8]],
43: [[1, 2, 4], [1, 2, 4], [0, 2, 3], [3, 4, -1]],
49: [[1, 2, 5, 7, 8, 10, 13, 14], [4, 5, 6, 7, 10, 11],
[0, 1, 2, 4, 6, 7, 12, 14], [1, 2, 3, 5, 6, 10, 12, 13, 14]],
65: [[1, 3, 5, 6, 8, 10, 13, 14, 17, 18, 20, 22],
[0, 3, 7, 10, 16, 17, 18, 20, 21],
[2, 4, 6, 8, 9, 10, 14, 15, 16, 17, 18, 20],
[5, 7, 8, 9, 11, 12, 13, 14, 16, 18, 19, 20, 21]],
67: [[0,3,5,6,9,10,13,14,17,18,20],
[0,2,4,9,11,12,13,16,19,21],
[1,3,6,10,11,13,14,16,20,21],
[2,4,6,8,9,11,14,17,19]],
93: [[0, 3, 4, 6, 9, 10, 12, 14, 17, 18],
[2, 3, 4, 5, 9, 13, 15, 18, 19],
[1, 2, 3, 4, 5, 6, 7, 8, 16],
[1, 4, 6, 11, 12, 13, 15, 16, 17, 18]],
103: [[1,3,4,6,8,11,12,14,17,18,20,22,25,27,28,30,32],
[2,9,10,12,13,14,15,16,20,21,22,23,24,26,28,29,30],
[0,1,2,3,4,11,12,13,16,17,19,20,21,24,25,26,28,30,31],
Expand All @@ -2011,10 +2024,20 @@ def skew_supplementary_difference_set(n, existence=False, check=True):
[1,3,8,9,10,11,12,13],
[0,2,3,5,6,7,12],
[1,2,3,5,8,9,15]],
121: [[0, 2, 4, 7, 8, 11, 13, 14, 16, 19, 20, 22],
[0, 1, 4, 5, 8, 9, 10, 15, 17, 20, 23],
[1, 2, 3, 7, 9, 16, 18, 19, 20, 21, 22, 23],
[0, 2, 9, 10, 11, 12, 13, 14, 15, 17, 18, 21, 22, 23]],
127: [[0,3,5,7,8,10,12,14,16],
[0,1,3,6,7,9,10,12,14,15],
[0,1,3,4,5,7,8,9,15,16],
[1,4,5,6,9,10,13,14,15,16]],
129: [[1, 2, 4, 7, 9, 11, 12, 14,16,18],
[0, 1, 2, 3, 9, 11, 14, 15, 19],
[0, 1, 3, 6, 8, 10, 12, 16, 18, 19],
[0, 3, 7, 8, 9, 10, 12, 14, 15, 17]],
133: [[1,2,5,6,9,11,12,14], [1,4,7,9,10,12,13,15],
[0,5,6,8,11,12,13,15], [0,1,2,5,7,8,9,13,14,15]],
151: [[0,3,5,6,8,11,13,14,16,19,21,23,25,27,28],
[2,3,6,13,16,17,20,23,25,26,27,28,29],
[0,1,2,3,4,6,7,8,9,10,11,12,23,24,27,28],
Expand All @@ -2031,45 +2054,76 @@ def skew_supplementary_difference_set(n, existence=False, check=True):
[4,5,7,8,11,14,15,16,18,19],
[0,4,10,11,13,15,16,18,19],
[2,4,5,7,11,13,15,17,19]],
217: [[0,3,5,7,8,11,12,14], [1,3,4,7,9,11,12,15],
[3,4,5,6,7,9,10,14,15], [1,3,4,5,7,8,11,13,14]],
219: [[1, 3, 5, 6, 8, 11, 12, 15, 17, 18, 21, 22, 24],
[2, 6, 8, 10, 11, 12, 13, 16, 19, 22, 23, 24],
[0, 1, 5, 6, 10, 11, 13, 14, 17, 20, 21, 24, 25],
[0, 2, 3, 4, 5, 6, 7, 11, 12, 13, 16, 20, 23]],
241: [[0,2,4,6,8,11,12,14],
[1,3,4,6,7,13,14,15],
[6,8,9,10,12,13,14,15],
[3,4,5,9,10,13,14]],
267: [[0, 3, 4, 7, 8, 11, 13, 15, 16, 19, 21, 22, 25],
[0, 1, 4, 5, 6, 8, 14, 15, 18, 21, 23],
[0, 2, 4, 5, 7, 9, 10, 11, 14, 15, 16, 17, 25],
[0, 1, 3, 4, 6, 14, 15, 16, 17, 18, 20, 22, 23, 25]],
}

# If the element is a list, that is the coset.
cosets_gens = {
37: [1, 2, 3, 5, 6, 9],
39: [1, 2, 3, 4, 6, 8, [13]],
43: [1, 3, 7],
49: [1, 2, 3, 4, 6, 7, 9, 12],
65: [1, 2, 3, 5, 6, 7, 9, 10, 11, [13], 22, [26]],
67: [1,2,3,4,5,6,8,10,12,15,17],
93: [1, 2, 3, 5, 7, 9, 10, 14, 15, [31]],
103: [1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 15, 17, 19, 21, 23, 30],
113: [1, 2, 3, 5, 6, 9, 10, 13],
121: [1, 2, 4, 5, 7, 8, 10, 11, 16, 17, 19, 20],
127: [1, 3, 5, 7, 9, 11, 13, 19, 21],
129: [1, 3, 5, 7, 9, 11, 13, 19, 21, [43]],
133: [1, 2, 3, 6, 7, 9, 18, [19, 38, 76]],
151: [1, 2, 3 ,4, 5, 6, 9, 10, 11, 12, 15, 22, 27, 29, 30],
157: [1, 2, 3, 5, 9, 15],
163: [1, 2, 3, 5, 6, 9, 10, 15, 18],
181: [1, 2, 3, 4, 6, 7, 8, 12, 13, 24],
217: [1, 2, 4, 5, 7, 10, 19, [31, 62, 124]],
219: [1, 2, 3, 5, 7, 9, 11, 15, 19, 22, 23, 33, [73]],
241: [1, 2, 4, 5, 7, 13, 19, 35],
267: [1, 2, 3, 5, 7, 9, 10, 13, 14, 15, 19, 39, [89]],
}

H_db = {
37: [1, 10, -11],
39: [1, 16, 22],
43: [1, 4, 11, 16, 21, -2, -8],
49: [1, 18, 30],
65: [1, 16, 61],
67: [1, 29, 37],
93: [1, 4, 16, 64, 70],
103: [1, 46, 56],
113: [1,16,28,30,49,106,109],
121: [1, 3, 9, 27, 81],
127: [1,2,4,8,16,32,64],
129: [1, 4, 16, 64, 97, 121, 127],
133: [1, 4, 16, 25, 64, 93, 100, 106, 123],
151: [1, 8,19,59, 64],
157: [1,14,16,39,46,67,75,93,99,101,108,130,153],
163: [1,38,40,53,58,85,104,133,140],
181: [1,39,43,48,62,65,73,80,132],
217: [1,8,9,25,51,64,72,78,81,142,190,191, 193, 200, 214],
219: [1, 4, 16, 37, 55, 64, 148, 154, 178],
241: [1,15,24,54,87,91,94,98,100,119,160,183,205,225,231],
267: [1, 4, 16, 64, 67, 91, 97, 121, 217, 223, 256],
}

def generate_set(index_set, cosets):
S = []
for idx in index_set:
if idx == -1:
S.append(0)
S.append(Z(0))
else:
S += cosets[idx]
return S
Expand All @@ -2086,11 +2140,11 @@ def generate_set(index_set, cosets):

cosets = []
for el in cosets_gens[n]:
even_coset = []
odd_coset = []
for x in H:
even_coset.append(x*el)
odd_coset.append(-x*el)
if isinstance(el, list):
even_coset = [Z(x) for x in el]
else:
even_coset = [x*el for x in H]
odd_coset = [-x for x in even_coset]
cosets.append(even_coset)
cosets.append(odd_coset)

Expand Down

0 comments on commit bc4d841

Please sign in to comment.