CoCalc Public FilesBoolean-Cayley-graphs / sage-code / test_sqlite3_classification_database_prototypes.ipynb
Author: Paul Leopardi
Compute Environment: Ubuntu 18.04 (Deprecated)
In [1]:
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

In [2]:
db_dirname=os.path.join("..","db")
sobj_dirname=os.path.join("..","sobj")

In [3]:
rm -f test_p6.db

In [4]:
conn = create_database("test_p6.db")
conn = create_classification_tables("test_p6.db")

In [5]:
for i in range(1,5):
print(i)
name = "p6_"+str(i)
cgc = BentFunctionCayleyGraphClassification.load_mangled(name + ".sobj", dir=sobj_dirname)
insert_classification(conn, cgc, name)

1 2 3 4
In [6]:
cgc.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.
In [7]:
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 + 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.
In [8]:
c = select_classification_where_name(conn, "p6_1")
c.report()

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.
In [9]:
curs = conn.cursor()
print(datetime.datetime.now(), "before")
curs.execute("SELECT COUNT(ROWID) FROM cayley_graph")
print(datetime.datetime.now(), "after")
for row in curs:
for x in row:
print(x)

2020-09-19 18:54:26.044085 before 2020-09-19 18:54:26.045011 after 12
In [10]:
print(datetime.datetime.now(), "before")
curs.execute("SELECT COUNT(ROWID) FROM graph")
print(datetime.datetime.now(), "after")
for row in curs:
for x in row:
print(x)

2020-09-19 18:54:26.123105 before 2020-09-19 18:54:26.124174 after 11
In [11]:
conn.close()

In [12]:
rm -f test_p8.db

In [13]:
conn = create_database("test_p8.db")
conn = create_classification_tables("test_p8.db")

In [14]:
for i in range(1,11):
name = "p8_"+str(i)
cgc = BentFunctionCayleyGraphClassification.load_mangled(name + ".sobj", dir=sobj_dirname)
print(datetime.datetime.now(), i)
insert_classification(conn, cgc, name)
print(datetime.datetime.now())

2020-09-19 18:54:27.010137 1 2020-09-19 18:54:27.841989 2 2020-09-19 18:54:28.639661 3 2020-09-19 18:54:29.379285 4 2020-09-19 18:54:30.255086 5 2020-09-19 18:54:31.354365 6 2020-09-19 18:54:32.204435 7 2020-09-19 18:54:33.179147 8 2020-09-19 18:54:34.010827 9 2020-09-19 18:54:34.941887 10 2020-09-19 18:54:35.938421
In [15]:
c8_5 = select_classification_where_name(conn, "p8_5")
c8_5.report()

Algebraic normal form of Boolean function: x0*x1*x2 + x0*x6 + x1*x3*x4 + x1*x4 + x1*x5 + x2*x3*x5 + x2*x4 + x3*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 are the same: There are 9 extended Cayley classes in the extended translation class.
In [16]:
bentf = BentFunction(c8_5.algebraic_normal_form)

c = select_classification_where_bent_function(conn, bentf)
c.report()

Algebraic normal form of Boolean function: x0*x1*x2 + x0*x6 + x1*x3*x4 + x1*x4 + x1*x5 + x2*x3*x5 + x2*x4 + x3*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 are the same: There are 9 extended Cayley classes in the extended translation class.
In [17]:
c8_6 = select_classification_where_name(conn, "p8_6")
c8_6.report()

Algebraic normal form of Boolean function: x0*x1*x2 + x0*x2 + x0*x3 + x1*x3*x4 + x1*x6 + x2*x3*x5 + x2*x4 + x5*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 are the same: There are 9 extended Cayley classes in the extended translation class.
In [18]:
curs = conn.cursor()
print(datetime.datetime.now(), "before")
curs.execute("SELECT COUNT(*) FROM cayley_graph")
print(datetime.datetime.now(), "after")
for row in curs:
for x in row:
print(x)

2020-09-19 18:54:39.018189 before 2020-09-19 18:54:39.018836 after 66
In [19]:
curs = conn.cursor()
print(datetime.datetime.now(), "before")
curs.execute("SELECT COUNT(ROWID) FROM cayley_graph")
print(datetime.datetime.now(), "after")
for row in curs:
for x in row:
print(x)

2020-09-19 18:54:39.096269 before 2020-09-19 18:54:39.098121 after 66
In [20]:
print(datetime.datetime.now(), "before")
curs.execute("SELECT COUNT(ROWID) FROM graph")
print(datetime.datetime.now(), "after")
for row in curs:
for x in row:
print(x)

2020-09-19 18:54:39.166102 before 2020-09-19 18:54:39.166880 after 55
In [21]:
conn.close()

In [22]:
conn = connect_to_database('test_p8.db')

In [23]:
curs = conn.cursor()
print(datetime.datetime.now(), "before")
curs.execute("""
select name, cayley_graph_index, graph_id, count(*)
from matrices, (
select name, bent_function, cayley_graph_index, graph_id
from (
select graph_id
from cayley_graph
group by graph_id
having count (graph_id) > 1L ) as repeats
natural join cayley_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
""")
print(datetime.datetime.now(), "after")
for row in curs:
for x in row:
print(x,end=" ")
print("")

2020-09-19 18:54:39.400480 before 2020-09-19 18:54:40.222185 after p8_1 0 1 34816 p8_2 0 1 6144 p8_1 1 2 30720 p8_2 3 2 2048 p8_5 0 17 4096 p8_6 0 17 4096 p8_5 1 18 6144 p8_6 1 18 6144 p8_5 2 19 6144 p8_6 2 19 6144 p8_5 3 20 2048 p8_6 5 20 2048 p8_5 4 21 2048 p8_6 8 21 2048 p8_5 5 22 6144 p8_6 6 22 6144 p8_5 6 23 6144 p8_6 7 23 6144 p8_5 7 24 16384 p8_6 3 24 16384 p8_5 8 25 16384 p8_6 4 25 16384
In [24]:
conn = connect_to_database(os.path.join(db_dirname,"cast128.db"))

In [25]:
curs = conn.cursor()
curs.execute("SELECT name FROM bent_function")
for row in curs:
for x in row:
print(x)

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
In [26]:
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.
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.
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.
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.
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.
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.
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.
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.
In [27]:
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.
In [28]:
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)

2020-09-19 18:57:17.424876 before 2020-09-19 18:57:17.466197 after 32914496
In [29]:
curs = conn.cursor()
print(datetime.datetime.now(), "before")
curs.execute("SELECT COUNT(ROWID) FROM cayley_graph")
print(datetime.datetime.now(), "after")
for row in curs:
for x in row:
print(x)

2020-09-19 18:57:17.566223 before 2020-09-19 19:16:42.055695 after 32914496
In [30]:
conn.close()