| Hosted by CoCalc | Download
Kernel: SageMath 9.5

Cayley graphs of binary bent functions of dimension 6.

Import the required modules.

import os import sqlite3 from boolean_cayley_graphs.bent_function import BentFunction from boolean_cayley_graphs.classification_database_sqlite3 import * from boolean_cayley_graphs.bent_function_cayley_graph_classification import BentFunctionCayleyGraphClassification

Connect to the database that contains the classifications of bent functions in 6 dimensions.

conn = connect_to_database(os.path.join("..","db","p6.db"))

Create a list c for the classifications.

c = [None] * 5

Set c to be the list of classifications for dimension 6, starting from 1, by retrieving these by name. c[0] is None.

for i in range(1,5): print(i) name = "p6_"+str(i) c[i] = select_classification_where_name(conn, name)
1 2 3 4

Display the length of c, the list of classifications.

len(c)
5

Verify that c[0] is None.

print(c[0])
None

Print the algebraic normal form of the bent function corresponding to c[1].

c[1].algebraic_normal_form
x0*x1 + x2*x3 + x4*x5

Produce a report on the classification c[1].

c[1].report(report_on_graph_details=True)
Algebraic normal form of Boolean function: x0*x1 + x2*x3 + x4*x5 Function is bent. SDP design incidence structure t-design parameters: (True, (2, 64, 28, 12)) Classification of Cayley graphs and classification of Cayley graphs of duals are the same: There are 2 extended Cayley classes in the extended translation class. For each extended Cayley class in the extended translation class: Clique polynomial, strongly regular parameters, rank, and order of a representative graph; and linear code and generator matrix for a representative bent function: EC class 0 : Algebraic normal form of representative: x0*x1 + x2*x3 + x4*x5 Clique polynomial: 64*t^8 + 512*t^7 + 1792*t^6 + 3584*t^5 + 5376*t^4 + 3584*t^3 + 896*t^2 + 64*t + 1 Strongly regular parameters: (64, 28, 12, 12) Rank: 8 Order: 2580480 Linear code from representative: [28, 6] linear code over GF(2) Generator matrix: [1 0 0 0 0 1 0 1 1 1 1 0 0 1 1 1 1 0 0 0 1 1 1 0 1 1 0 1] [0 1 0 1 0 0 0 1 0 1 0 0 0 1 0 1 0 0 0 1 1 1 0 0 0 1 1 1] [0 0 1 1 0 0 0 0 1 1 0 0 0 0 1 1 0 0 0 1 1 0 1 1 1 0 0 1] [0 0 0 0 1 1 0 0 0 0 1 1 0 0 0 0 1 1 0 1 1 0 1 1 0 1 1 0] [0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1] [0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1] Linear code is projective. Weight distribution: {0: 1, 12: 28, 16: 35} EC class 1 : Algebraic normal form of representative: x0*x1 + x0 + x1 + x2*x3 + x4*x5 Clique polynomial: 2304*t^6 + 13824*t^5 + 19200*t^4 + 7680*t^3 + 1152*t^2 + 64*t + 1 Strongly regular parameters: (64, 36, 20, 20) Rank: 8 Order: 3317760 Linear code from representative: [36, 6] linear code over GF(2) Generator matrix: [1 0 1 0 1 0 0 1 0 0 0 1 0 1 0 1 1 0 1 1 0 1 0 1 0 1 1 0 1 1 0 1 1 1 0 1] [0 1 1 0 1 1 0 1 1 0 0 1 1 0 1 1 0 1 1 0 0 1 1 0 1 1 0 1 1 0 0 0 0 0 1 1] [0 0 0 1 1 1 0 0 0 1 0 0 0 1 1 1 0 0 0 1 0 0 0 1 1 1 0 0 0 1 0 1 0 1 1 1] [0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 1 1 1 1 0 0 1 1 1 1] [0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 1 1 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 1 1 1 1 1 1 1 1 1 1 1] Linear code is projective. Weight distribution: {0: 1, 16: 27, 20: 36}

Produce a matrix plot of the weight_class_matrix.

matrix_plot(c[1].weight_class_matrix,cmap='gist_stern')
Image in a Jupyter notebook

Produce a matrix plot of bent_cayley_graph_index_matrix, the matrix of indices of extended Cayley classes within the extended translation class.

matrix_plot(c[1].bent_cayley_graph_index_matrix,cmap='gist_stern')
Image in a Jupyter notebook

Print the algebraic normal form of the bent function corresponding to c[2].

c[2].algebraic_normal_form
x0*x1*x2 + x0*x3 + x1*x4 + x2*x5

Produce a report on the classification c[2].

c[2].report(report_on_graph_details=True)
Algebraic normal form of Boolean function: x0*x1*x2 + x0*x3 + x1*x4 + x2*x5 Function is bent. SDP design incidence structure t-design parameters: (True, (2, 64, 28, 12)) Classification of Cayley graphs and classification of Cayley graphs of duals are the same: There are 3 extended Cayley classes in the extended translation class. For each extended Cayley class in the extended translation class: Clique polynomial, strongly regular parameters, rank, and order of a representative graph; and linear code and generator matrix for a representative bent function: EC class 0 : Algebraic normal form of representative: x0*x1*x2 + x0*x3 + x1*x4 + x2*x5 Clique polynomial: 64*t^8 + 512*t^7 + 1792*t^6 + 3584*t^5 + 5376*t^4 + 3584*t^3 + 896*t^2 + 64*t + 1 Strongly regular parameters: (64, 28, 12, 12) Rank: 8 Order: 2580480 Linear code from representative: [28, 6] linear code over GF(2) Generator matrix: [1 0 0 0 0 1 0 0 1 0 1 0 0 1 0 0 0 1 1 0 0 1 0 1 1 0 1 1] [0 1 0 0 0 0 1 0 1 1 0 0 0 0 1 0 1 1 0 0 1 1 1 1 0 1 0 0] [0 0 1 0 0 1 0 1 1 1 1 0 0 1 1 0 1 1 0 1 0 1 1 0 1 1 1 0] [0 0 0 1 0 1 1 0 1 1 0 1 0 1 0 1 1 1 1 0 1 0 0 1 1 1 0 1] [0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1] [0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1] Linear code is projective. Weight distribution: {0: 1, 12: 28, 16: 35} EC class 1 : Algebraic normal form of representative: x0*x1*x2 + x0*x3 + x1*x2 + x1*x4 + x2*x5 + x3 Clique polynomial: 256*t^6 + 1536*t^5 + 4352*t^4 + 3584*t^3 + 896*t^2 + 64*t + 1 Strongly regular parameters: (64, 28, 12, 12) Rank: 8 Order: 24576 Linear code from representative: [28, 6] linear code over GF(2) Generator matrix: [1 0 0 1 0 0 1 0 0 1 1 1 0 0 0 1 1 0 0 0 1 1 0 0 0 1 1 0] [0 1 0 0 0 0 1 0 1 1 0 0 0 0 1 0 1 1 0 0 1 1 1 1 0 1 0 0] [0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 1 1 1 1 0 0 1 1] [0 0 0 0 1 0 0 1 0 1 1 0 0 1 1 0 0 1 0 1 1 0 1 0 1 1 0 0] [0 0 0 0 0 1 1 0 1 0 0 1 0 1 1 0 0 1 0 1 0 1 0 1 0 0 1 1] [0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1] Linear code is projective. Weight distribution: {0: 1, 12: 28, 16: 35} EC class 2 : Algebraic normal form of representative: x0*x1*x2 + x0*x1 + x0*x2 + x0*x3 + x0 + x1*x2 + x1*x4 + x1 + x2*x5 + x2 + x3 + x4 + x5 Clique polynomial: 192*t^8 + 1536*t^7 + 8960*t^6 + 19968*t^5 + 20224*t^4 + 7680*t^3 + 1152*t^2 + 64*t + 1 Strongly regular parameters: (64, 36, 20, 20) Rank: 8 Order: 73728 Linear code from representative: [36, 6] linear code over GF(2) Generator matrix: [1 0 1 0 1 0 1 0 1 1 1 1 0 0 1 0 1 1 0 1 0 0 1 0 1 0 1 1 1 0 1 0 1 0 0 1] [0 1 1 0 0 1 1 0 0 1 0 1 0 1 1 1 1 1 0 1 0 0 0 1 1 1 0 1 0 1 1 0 0 1 0 1] [0 0 0 1 1 1 1 0 0 0 1 1 0 0 0 1 1 0 1 1 0 1 1 1 1 0 1 1 0 1 1 0 0 0 1 1] [0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 1 1 1 0 0 0 0 0 1 1 1 0 0 0 1 1 1 1 1] [0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 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 1 1 1 1 1 1 1 1 1 1 1] Linear code is projective. Weight distribution: {0: 1, 16: 27, 20: 36}

Produce a matrix plot of the weight_class_matrix.

matrix_plot(c[2].weight_class_matrix,cmap='gist_stern')
Image in a Jupyter notebook

Produce a matrix plot of bent_cayley_graph_index_matrix, the matrix of indices of extended Cayley classes within the extended translation class.

matrix_plot(c[2].bent_cayley_graph_index_matrix,cmap='gist_stern')
Image in a Jupyter notebook

Print the algebraic normal form of the bent function corresponding to c[3].

c[3].algebraic_normal_form
x0*x1*x2 + x0*x1 + x0*x3 + x1*x3*x4 + x1*x5 + x2*x4 + x3*x4

Produce a report on the classification c[3].

c[3].report()
Algebraic normal form of Boolean function: x0*x1*x2 + x0*x1 + x0*x3 + x1*x3*x4 + x1*x5 + x2*x4 + x3*x4 Function is bent. SDP design incidence structure t-design parameters: (True, (2, 64, 28, 12)) Classification of Cayley graphs and classification of Cayley graphs of duals are the same: There are 4 extended Cayley classes in the extended translation class.

Produce a matrix plot of the weight_class_matrix.

matrix_plot(c[3].weight_class_matrix,cmap='gist_stern')
Image in a Jupyter notebook

Produce a matrix plot of bent_cayley_graph_index_matrix, the matrix of indices of extended Cayley classes within the extended translation class.

matrix_plot(c[3].bent_cayley_graph_index_matrix,cmap='gist_stern')
Image in a Jupyter notebook

Print the algebraic normal form of the bent function corresponding to c[4].

c[4].algebraic_normal_form
x0*x1*x2 + x0*x3 + x1*x3*x4 + x1*x5 + x2*x3*x5 + x2*x3 + x2*x4 + x2*x5 + x3*x4 + x3*x5

Produce a report on the classification c[4].

c[4].report()
Algebraic normal form of Boolean function: x0*x1*x2 + x0*x3 + x1*x3*x4 + x1*x5 + x2*x3*x5 + x2*x3 + x2*x4 + x2*x5 + x3*x4 + x3*x5 Function is bent. SDP design incidence structure t-design parameters: (True, (2, 64, 28, 12)) Classification of Cayley graphs and classification of Cayley graphs of duals are the same: There are 3 extended Cayley classes in the extended translation class.

Produce a matrix plot of the weight_class_matrix.

matrix_plot(c[4].weight_class_matrix,cmap='gist_stern')
Image in a Jupyter notebook

Produce a matrix plot of bent_cayley_graph_index_matrix, the matrix of indices of extended Cayley classes within the extended translation class.

matrix_plot(c[4].bent_cayley_graph_index_matrix,cmap='gist_stern')
Image in a Jupyter notebook

Now use an SQL query on the database to determine which extended Cayley classes are repeated between extended translation classes.

curs = conn.cursor() curs.execute(""" select name, cayley_graph_index, graph_id, count(*) from matrices, ( select name, bent_function, cayley_graph_index, graph_id from ( select canonical_label_hash from cayley_graph group by canonical_label_hash having count (canonical_label_hash) > 1) as repeats natural join cayley_graph natural join graph natural join bent_function ) as repeats_with_counts where matrices.bent_function = repeats_with_counts.bent_function and matrices.bent_cayley_graph_index = repeats_with_counts.cayley_graph_index group by name, cayley_graph_index, graph_id order by graph_id """) for row in curs: for x in row: print(x, end=" ") print("")
p6_1 0 1 2304 p6_2 0 1 512

We see that extended Cayley class 0 occurs in both extended translation class 1 (2304 Cayley graphs) and extended translation class 2 (512 Cayley graphs).

Close the connection to the database, as we no longer need it.

conn.close()

Now take a look at binary projective two weight codes relevant to dimension 6. References: Tonchev 1996, Tonchev 2006.

from sage.graphs.strongly_regular_db import strongly_regular_from_two_weight_code from boolean_cayley_graphs.binary_projective_two_weight_codes import *
def linear_code_from_gen_tuple(gen_tuple): gen_matrix = matrix(GF(2),[list(row) for row in gen_tuple]) return LinearCode(gen_matrix)
gens_27_6_12 = binary_projective_two_weight_27_6_12()
code_27_6_12 = [linear_code_from_gen_tuple(gen_tuple) for gen_tuple in gens_27_6_12]
srg_27_6_12 = [strongly_regular_from_two_weight_code(code).canonical_label(algorithm="sage").graph6_string() for code in code_27_6_12]
print([((i,j),k) for i in range(1,len(c)) for j in range(len(c[i].cayley_graph_class_list)) for k in range(len(srg_27_6_12)) if c[i].cayley_graph_class_list[j] == srg_27_6_12[k]])
[((1, 1), 0), ((2, 2), 1), ((3, 1), 2), ((3, 3), 3), ((4, 2), 4)]
gens_35_6_16 = binary_projective_two_weight_35_6_16()
code_35_6_16 = [linear_code_from_gen_tuple(gen_tuple) for gen_tuple in gens_35_6_16]
srg_35_6_16 = [strongly_regular_from_two_weight_code(code).complement().canonical_label(algorithm="sage").graph6_string() for code in code_35_6_16]
print([((i,j),k) for i in range(1,len(c)) for j in range(len(c[i].cayley_graph_class_list)) for k in range(len(srg_35_6_16)) if c[i].cayley_graph_class_list[j] == srg_35_6_16[k]])
[((1, 0), 0), ((1, 0), 1), ((2, 0), 0), ((2, 0), 1), ((2, 1), 2), ((3, 0), 3), ((3, 2), 4), ((4, 0), 6), ((4, 1), 5)]