Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download
Views: 8800
Kernel: SageMath 9.5
import datetime 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
db_dirname=os.path.join("..","db") sobj_dirname=os.path.join("..","sobj")
conn = connect_to_database(os.path.join(db_dirname,"sqlite3_cast128.db"))
curs = conn.cursor() curs.execute("SELECT name FROM bent_function") for row in curs: for name in row: print(name)
cast128_1_00 cast128_1_01 cast128_1_02 cast128_1_03 cast128_1_04 cast128_1_05 cast128_1_06 cast128_1_07 cast128_1_08 cast128_1_09 cast128_1_10 cast128_1_11 cast128_1_12 cast128_1_13 cast128_1_14 cast128_1_15 cast128_1_16 cast128_1_17 cast128_1_18 cast128_1_19 cast128_1_20 cast128_1_21 cast128_1_22 cast128_1_23 cast128_1_24 cast128_1_25 cast128_1_26 cast128_1_27 cast128_1_28 cast128_1_29 cast128_1_30 cast128_1_31 cast128_2_00 cast128_2_01 cast128_2_02 cast128_2_03 cast128_2_04 cast128_2_05 cast128_2_06 cast128_2_07 cast128_2_08 cast128_2_09 cast128_2_10 cast128_2_11 cast128_2_12 cast128_2_13 cast128_2_14 cast128_2_15 cast128_2_16 cast128_2_17 cast128_2_18 cast128_2_19 cast128_2_20 cast128_2_21 cast128_2_22 cast128_2_23 cast128_2_24 cast128_2_25 cast128_2_26 cast128_2_27 cast128_2_28 cast128_2_29 cast128_2_30 cast128_2_31 cast128_3_00 cast128_3_01 cast128_3_02 cast128_3_03 cast128_3_04 cast128_3_05 cast128_3_06 cast128_3_07 cast128_3_08 cast128_3_09 cast128_3_10 cast128_3_11 cast128_3_12 cast128_3_13 cast128_3_14 cast128_3_15 cast128_3_16 cast128_3_17 cast128_3_18 cast128_3_19 cast128_3_20 cast128_3_21 cast128_3_22 cast128_3_23 cast128_3_24 cast128_3_25 cast128_3_26 cast128_3_27 cast128_3_28 cast128_3_29 cast128_3_30 cast128_3_31 cast128_4_00 cast128_4_01 cast128_4_02 cast128_4_03 cast128_4_04 cast128_4_05 cast128_4_06 cast128_4_07 cast128_4_08 cast128_4_09 cast128_4_10 cast128_4_11 cast128_4_12 cast128_4_13 cast128_4_14 cast128_4_15 cast128_4_16 cast128_4_17 cast128_4_18 cast128_4_19 cast128_4_20 cast128_4_21 cast128_4_22 cast128_4_23 cast128_4_24 cast128_4_25 cast128_4_26 cast128_4_27 cast128_4_28 cast128_4_29 cast128_4_30 cast128_4_31 cast128_5_00 cast128_5_01 cast128_5_02 cast128_5_03 cast128_5_04 cast128_5_05 cast128_5_06 cast128_5_07 cast128_5_08 cast128_5_09 cast128_5_10 cast128_5_11 cast128_5_12 cast128_5_13 cast128_5_14 cast128_5_15 cast128_5_16 cast128_5_17 cast128_5_18 cast128_5_19 cast128_5_20 cast128_5_21 cast128_5_22 cast128_5_23 cast128_5_24 cast128_5_25 cast128_5_26 cast128_5_27 cast128_5_28 cast128_5_29 cast128_5_30 cast128_5_31 cast128_6_00 cast128_6_01 cast128_6_02 cast128_6_03 cast128_6_04 cast128_6_05 cast128_6_06 cast128_6_07 cast128_6_08 cast128_6_09 cast128_6_10 cast128_6_11 cast128_6_12 cast128_6_13 cast128_6_14 cast128_6_15 cast128_6_16 cast128_6_17 cast128_6_18 cast128_6_19 cast128_6_20 cast128_6_21 cast128_6_22 cast128_6_23 cast128_6_24 cast128_6_25 cast128_6_26 cast128_6_27 cast128_6_28 cast128_6_29 cast128_6_30 cast128_6_31 cast128_7_00 cast128_7_01 cast128_7_02 cast128_7_03 cast128_7_04 cast128_7_05 cast128_7_06 cast128_7_07 cast128_7_08 cast128_7_09 cast128_7_10 cast128_7_11 cast128_7_12 cast128_7_13 cast128_7_14 cast128_7_15 cast128_7_16 cast128_7_17 cast128_7_18 cast128_7_19 cast128_7_20 cast128_7_21 cast128_7_22 cast128_7_23 cast128_7_24 cast128_7_25 cast128_7_26 cast128_7_27 cast128_7_28 cast128_7_29 cast128_7_30 cast128_7_31 cast128_8_00 cast128_8_01 cast128_8_02 cast128_8_03 cast128_8_04 cast128_8_05 cast128_8_06 cast128_8_07 cast128_8_08 cast128_8_09 cast128_8_10 cast128_8_11 cast128_8_12 cast128_8_13 cast128_8_14 cast128_8_15 cast128_8_16 cast128_8_17 cast128_8_18 cast128_8_19 cast128_8_20 cast128_8_21 cast128_8_22 cast128_8_23 cast128_8_24 cast128_8_25 cast128_8_26 cast128_8_27 cast128_8_28 cast128_8_29 cast128_8_30 cast128_8_31
exceptions = ["2_01", "2_16", "4_27", "5_16", "5_27", "6_17", "7_15", "7_21"] for suffix in exceptions: exception_name = "cast128_" + suffix print("") print(exception_name + ":") c = select_classification_where_name(conn, exception_name) c.report() matrix_plot(c.bent_cayley_graph_index_matrix,cmap="gist_stern").show()
cast128_2_01: Algebraic normal form of Boolean function: x0*x1*x2*x6 + x0*x1*x4 + x0*x1*x5 + x0*x1*x6 + x0*x2*x4*x6 + x0*x2*x4 + x0*x2*x5*x6 + x0*x2*x6 + x0*x2 + x0*x3*x5*x6 + x0*x3*x6 + x0*x3 + x0*x4*x6 + x0 + x1*x2*x3*x6 + x1*x2*x4 + x1*x2*x5 + x1*x2*x6 + x1*x3*x4*x6 + x1*x3*x4 + x1*x3*x5 + x1*x3*x6 + x1*x4*x5*x6 + x1*x5*x6 + x1*x5 + x1 + x2*x3*x4*x6 + x2*x3*x4 + x2*x3*x5*x6 + x2*x3*x6 + x2*x4*x5*x6 + x2*x4*x5 + x2*x4*x6 + x2*x4 + x2 + x3*x4*x5*x6 + x3*x4*x5 + x3*x4 + x3*x5 + x4*x5*x6 + x4 + x6*x7 Function is bent. SDP design incidence structure t-design parameters: (True, (2, 256, 120, 56)) Classification of Cayley graphs and classification of Cayley graphs of duals differ in matrices of indexes: There are 8256 extended Cayley classes in the extended translation class. There are 8256 extended Cayley classes of dual bent functions in the extended translation class, and 8256 extended Cayley classes in the union of the two.
Image in a Jupyter notebook
cast128_2_16: Algebraic normal form of Boolean function: x0*x1*x2*x3 + x0*x1*x2 + x0*x1*x3*x5 + x0*x1*x3 + x0*x1*x4*x5 + x0*x1*x5*x7 + x0*x1 + x0*x2*x3*x6 + x0*x2*x3*x7 + x0*x2*x3 + x0*x2*x4*x7 + x0*x2*x5*x6 + x0*x2*x5*x7 + x0*x2*x6 + x0*x2*x7 + x0*x2 + x0*x3*x4*x5 + x0*x3*x4*x7 + x0*x3*x4 + x0*x3*x5 + x0*x3*x6 + x0*x3 + x0*x4*x5*x6 + x0*x4*x5*x7 + x0*x5*x7 + x0 + x1*x2*x3*x7 + x1*x2*x3 + x1*x2*x4*x5 + x1*x2*x4*x7 + x1*x2*x4 + x1*x2*x5*x6 + x1*x2*x6 + x1*x3*x4*x7 + x1*x3*x4 + x1*x3*x5*x6 + x1*x3*x5*x7 + x1*x3*x5 + x1*x3*x6 + x1*x3*x7 + x1*x4 + x1*x5*x7 + x1*x5 + x1*x7 + x1 + x2*x3*x4*x7 + x2*x3*x4 + x2*x3*x5*x6 + x2*x3*x5 + x2*x3*x6 + x2*x3*x7 + x2*x4*x5*x7 + x2*x4*x6 + x2*x5*x6 + x2*x5 + x2*x6 + x2*x7 + x2 + x3*x4*x5*x6 + x3*x4*x5 + x3*x4*x6 + x3*x4*x7 + x3*x5*x6 + x3*x6 + x3 + x4 + x6*x7 Function is bent. SDP design incidence structure t-design parameters: (True, (2, 256, 120, 56)) Classification of Cayley graphs and classification of Cayley graphs of duals differ in matrices of indexes: There are 32768 extended Cayley classes in the extended translation class. There are 32768 extended Cayley classes of dual bent functions in the extended translation class, and 65536 extended Cayley classes in the union of the two.
Image in a Jupyter notebook
cast128_4_27: Algebraic normal form of Boolean function: x0*x1*x2*x6 + x0*x1*x3 + x0*x1*x5*x6 + x0*x1*x5*x7 + x0*x1*x5 + x0*x1*x6*x7 + x0*x1*x6 + x0*x1*x7 + x0*x2*x3*x7 + x0*x2*x3 + x0*x2*x5*x6 + x0*x2*x5*x7 + x0*x2*x6 + x0*x2 + x0*x3*x4*x6 + x0*x3*x4*x7 + x0*x3*x4 + x0*x3*x5*x6 + x0*x3*x5 + x0*x3*x6*x7 + x0*x3*x6 + x0*x3 + x0*x4*x5*x7 + x0*x4*x6 + x0*x5*x7 + x0*x5 + x0*x6*x7 + x0*x7 + x1*x2*x3*x6 + x1*x2*x3*x7 + x1*x2*x3 + x1*x2*x4*x6 + x1*x2*x6 + x1*x2*x7 + x1*x3*x4*x6 + x1*x3 + x1*x4 + x1*x5*x6 + x1*x5*x7 + x1*x7 + x1 + x2*x3*x4*x6 + x2*x3*x4*x7 + x2*x3*x5*x7 + x2*x4*x5*x6 + x2*x4*x6*x7 + x2*x5*x6*x7 + x2*x5*x6 + x2*x5*x7 + x2*x6*x7 + x3*x5*x6*x7 + x3*x5*x6 + x3*x5*x7 + x3*x5 + x3*x6 + x4*x5*x6*x7 + x4*x5*x6 + x4*x5*x7 + x4*x6*x7 + x4*x6 + x5*x6 + x5*x7 + x5 + x7 + 1 Function is bent. SDP design incidence structure t-design parameters: (True, (2, 256, 120, 56)) Classification of Cayley graphs and classification of Cayley graphs of duals differ in matrices of indexes: There are 65536 extended Cayley classes in the extended translation class. There are 65536 extended Cayley classes of dual bent functions in the extended translation class, and 65536 extended Cayley classes in the union of the two.
Image in a Jupyter notebook
cast128_5_16: Algebraic normal form of Boolean function: x0*x1*x2*x6 + x0*x1*x2 + x0*x1*x3*x5 + x0*x1*x3*x6 + x0*x1*x3 + x0*x1*x4*x5 + x0*x1*x4 + x0*x1*x5*x7 + x0*x1*x6 + x0*x2*x3*x5 + x0*x2*x5 + x0*x2*x6 + x0*x2*x7 + x0*x3*x4*x5 + x0*x3*x5 + x0*x3*x6 + x0*x3*x7 + x0*x3 + x0*x4*x5*x6 + x0*x4*x5 + x0*x4*x7 + x0*x5 + x0*x7 + x0 + x1*x2*x3*x6 + x1*x2*x3 + x1*x2*x4 + x1*x2*x5 + x1*x2*x6 + x1*x3*x4*x5 + x1*x3*x5*x7 + x1*x3*x6 + x1*x3 + x1*x5 + x1 + x2*x3*x6 + x2*x3*x7 + x2*x3 + x2*x4*x5*x7 + x2*x4*x6 + x2*x4*x7 + x2*x5*x6 + x2*x5*x7 + x2*x6 + x2 + x3*x4*x5*x6 + x3*x4*x5*x7 + x3*x4*x5 + x3*x4*x6 + x3*x5*x7 + x4*x5*x6 + x4*x5*x7 + x4 + x5*x6 + x5*x7 + x6*x7 + 1 Function is bent. SDP design incidence structure t-design parameters: (True, (2, 256, 120, 56)) Classification of Cayley graphs and classification of Cayley graphs of duals differ in matrices of indexes: There are 33280 extended Cayley classes in the extended translation class. There are 33280 extended Cayley classes of dual bent functions in the extended translation class, and 66560 extended Cayley classes in the union of the two.
Image in a Jupyter notebook
cast128_5_27: Algebraic normal form of Boolean function: x0*x1*x2*x7 + x0*x1*x2 + x0*x1*x4*x7 + x0*x1*x5 + x0*x1 + x0*x2*x3*x7 + x0*x2*x3 + x0*x2*x4*x7 + x0*x2*x4 + x0*x2*x7 + x0*x3*x4*x7 + x0*x3*x7 + x0*x3 + x0*x4*x5*x7 + x0*x4*x7 + x0*x5*x7 + x1*x2*x4*x7 + x1*x2*x7 + x1*x2 + x1*x3*x5 + x1*x3*x7 + x1*x3 + x1*x4*x5*x7 + x1*x4*x5 + x1*x4*x7 + x1*x5 + x2*x3*x4*x7 + x2*x3*x4 + x2*x3*x5*x7 + x2*x3*x5 + x2*x3*x7 + x2*x4*x5*x7 + x2*x4*x5 + x2*x4 + x2*x5*x7 + x2*x5 + x3*x4*x5 + x3*x4*x7 + x3*x4 + x3*x5 + x3*x7 + x4 + x6*x7 + x7 + 1 Function is bent. SDP design incidence structure t-design parameters: (True, (2, 256, 120, 56)) Classification of Cayley graphs and classification of Cayley graphs of duals differ in matrices of indexes: There are 6144 extended Cayley classes in the extended translation class. There are 6144 extended Cayley classes of dual bent functions in the extended translation class, and 6144 extended Cayley classes in the union of the two.
Image in a Jupyter notebook
cast128_6_17: Algebraic normal form of Boolean function: x0*x1*x3*x7 + x0*x1*x4*x6 + x0*x1*x4 + x0*x1*x5*x6 + x0*x1*x5*x7 + x0*x1*x5 + x0*x1*x6*x7 + x0*x1*x6 + x0*x1 + x0*x2*x3*x6 + x0*x2*x3*x7 + x0*x2*x3 + x0*x2*x4*x6 + x0*x2*x4 + x0*x2*x5*x7 + x0*x2*x6 + x0*x2*x7 + x0*x3*x4*x7 + x0*x3*x5*x6 + x0*x3*x5 + x0*x4*x5*x6 + x0*x4*x5 + x0*x4*x6 + x0*x4*x7 + x0*x4 + x0*x5*x6*x7 + x0*x5*x6 + x0*x6*x7 + x0*x7 + x0 + x1*x2*x3*x6 + x1*x2*x3*x7 + x1*x2*x4*x7 + x1*x2*x4 + x1*x2*x6*x7 + x1*x2*x7 + x1*x2 + x1*x3*x5*x6 + x1*x3*x5*x7 + x1*x3*x6 + x1*x3*x7 + x1*x3 + x1*x4*x5*x6 + x1*x4 + x1*x5*x6*x7 + x1*x5*x6 + x1*x5*x7 + x1*x7 + x2*x3*x4*x7 + x2*x3*x5*x6 + x2*x3*x5 + x2*x3*x7 + x2*x4*x5*x6 + x2*x4*x5 + x2*x4*x6*x7 + x2*x4*x6 + x2*x5*x6*x7 + x2*x5*x6 + x2*x5 + x2*x6 + x2*x7 + x3*x4*x5*x7 + x3*x4*x7 + x3*x5*x6*x7 + x3*x5*x7 + x3*x5 + x3*x6*x7 + x3*x6 + x4*x7 + x4 + x6 + 1 Function is bent. SDP design incidence structure t-design parameters: (True, (2, 256, 120, 56)) Classification of Cayley graphs and classification of Cayley graphs of duals differ in matrices of indexes: There are 65536 extended Cayley classes in the extended translation class. There are 65536 extended Cayley classes of dual bent functions in the extended translation class, and 65536 extended Cayley classes in the union of the two.
Image in a Jupyter notebook
cast128_7_15: Algebraic normal form of Boolean function: x0*x1*x2*x4 + x0*x1*x2*x5 + x0*x1*x3*x5 + x0*x1*x3*x6 + x0*x1*x3*x7 + x0*x1*x3 + x0*x1*x4 + x0*x1*x5*x6 + x0*x1*x5*x7 + x0*x1*x5 + x0*x1*x7 + x0*x2*x3*x7 + x0*x2*x3 + x0*x2*x4*x5 + x0*x2*x4*x6 + x0*x2*x4*x7 + x0*x2*x5*x7 + x0*x2*x5 + x0*x2*x6 + x0*x2*x7 + x0*x3*x4*x5 + x0*x3*x4*x6 + x0*x3*x7 + x0*x4*x5*x6 + x0*x4*x5 + x0*x4*x6 + x0*x4*x7 + x0*x4 + x0*x5*x6 + x0*x5 + x0 + x1*x2*x3*x5 + x1*x2*x3*x6 + x1*x2*x3 + x1*x2*x5*x6 + x1*x2*x6 + x1*x2*x7 + x1*x2 + x1*x3*x4 + x1*x3 + x1*x5*x6 + x1*x5*x7 + x1 + x2*x3*x4*x5 + x2*x3*x4*x6 + x2*x4*x5*x6 + x2*x4*x7 + x2*x5*x6 + x2*x5*x7 + x3*x5 + x3 + x4*x5*x7 + x4 + x5*x6 + x5*x7 + x5 + x6*x7 Function is bent. SDP design incidence structure t-design parameters: (True, (2, 256, 120, 56)) Classification of Cayley graphs and classification of Cayley graphs of duals differ in matrices of indexes: There are 32768 extended Cayley classes in the extended translation class. There are 32768 extended Cayley classes of dual bent functions in the extended translation class, and 65536 extended Cayley classes in the union of the two.
Image in a Jupyter notebook
cast128_7_21: Algebraic normal form of Boolean function: x0*x1*x2 + x0*x1*x3*x7 + x0*x1*x3 + x0*x1*x4*x7 + x0*x1*x4 + x0*x1*x5*x7 + x0*x1 + x0*x2*x3*x7 + x0*x2*x5*x7 + x0*x2*x5 + x0*x2*x6*x7 + x0*x2*x6 + x0*x3*x4 + x0*x3*x6*x7 + x0*x3*x6 + x0*x3*x7 + x0*x4*x5*x7 + x0*x4*x5 + x0*x4*x6*x7 + x0*x4*x6 + x0*x5*x7 + x0*x6*x7 + x0*x6 + x1*x2*x3*x7 + x1*x2*x3 + x1*x2*x4*x7 + x1*x2*x4 + x1*x2*x5*x6 + x1*x2*x5*x7 + x1*x2 + x1*x3*x4*x6 + x1*x3*x4*x7 + x1*x3*x4 + x1*x3*x5*x7 + x1*x3*x5 + x1*x3*x6*x7 + x1*x3*x7 + x1*x4*x5*x6 + x1*x4*x5*x7 + x1*x4*x6*x7 + x1*x5*x6*x7 + x1*x5*x7 + x1*x6 + x2*x3*x5*x7 + x2*x3*x5 + x2*x3*x7 + x2*x3 + x2*x4*x5*x7 + x2*x4*x5 + x2*x4*x6*x7 + x2*x4*x7 + x2*x5*x6*x7 + x2*x5*x6 + x2*x5*x7 + x2*x5 + x2*x6 + x2*x7 + x2 + x3*x4*x6 + x3*x5*x6*x7 + x3*x6 + x3*x7 + x4*x5*x6*x7 + x4*x5*x6 + x4*x5*x7 + x4*x5 + x4*x6 + x4 + x6 + 1 Function is bent. SDP design incidence structure t-design parameters: (True, (2, 256, 120, 56)) Classification of Cayley graphs and classification of Cayley graphs of duals differ in matrices of indexes: There are 32768 extended Cayley classes in the extended translation class. There are 32768 extended Cayley classes of dual bent functions in the extended translation class, and 65536 extended Cayley classes in the union of the two.
Image in a Jupyter notebook
cgc = BentFunctionCayleyGraphClassification.load_mangled("cast128_5_27.sobj", dir=sobj_dirname) bentf = BentFunction(cgc.algebraic_normal_form) c = select_classification_where_bent_function(conn, bentf) c.report()
Algebraic normal form of Boolean function: x0*x1*x2*x7 + x0*x1*x2 + x0*x1*x4*x7 + x0*x1*x5 + x0*x1 + x0*x2*x3*x7 + x0*x2*x3 + x0*x2*x4*x7 + x0*x2*x4 + x0*x2*x7 + x0*x3*x4*x7 + x0*x3*x7 + x0*x3 + x0*x4*x5*x7 + x0*x4*x7 + x0*x5*x7 + x1*x2*x4*x7 + x1*x2*x7 + x1*x2 + x1*x3*x5 + x1*x3*x7 + x1*x3 + x1*x4*x5*x7 + x1*x4*x5 + x1*x4*x7 + x1*x5 + x2*x3*x4*x7 + x2*x3*x4 + x2*x3*x5*x7 + x2*x3*x5 + x2*x3*x7 + x2*x4*x5*x7 + x2*x4*x5 + x2*x4 + x2*x5*x7 + x2*x5 + x3*x4*x5 + x3*x4*x7 + x3*x4 + x3*x5 + x3*x7 + x4 + x6*x7 + x7 + 1 Function is bent. SDP design incidence structure t-design parameters: (True, (2, 256, 120, 56)) Classification of Cayley graphs and classification of Cayley graphs of duals differ in matrices of indexes: There are 6144 extended Cayley classes in the extended translation class. There are 6144 extended Cayley classes of dual bent functions in the extended translation class, and 6144 extended Cayley classes in the union of the two.
print(datetime.datetime.now(), "before") curs.execute("SELECT MAX(ROWID) FROM graph") print(datetime.datetime.now(), "after") for row in curs: for x in row: print(x)
2023-01-18 02:09:51.627819 before 2023-01-18 02:09:51.794999 after 32914496
curs = conn.cursor() print(datetime.datetime.now(), "before") curs.execute("SELECT MAX(ROWID) FROM cayley_graph") print(datetime.datetime.now(), "after") for row in curs: for x in row: print(x)
2023-01-18 02:09:51.842679 before 2023-01-18 02:09:51.937220 after 32914496
conn.close()