16namespace layer5_applications {
17namespace apps_combinatorics {
20static void boolean_function_classify_print_function(
int *poly,
int sz,
void *data);
21static void boolean_function_classify_reduction_function(
int *poly,
void *data);
57 int f_v = (verbose_level >= 1);
60 cout <<
"boolean_function_classify::init_group" << endl;
65 int degree =
BF->
n + 1;
70 cout <<
"boolean_function_classify::init_group "
71 "before init_projective_group" << endl;
81 cout <<
"boolean_function_classify::init_group "
82 "before AonHPD->init" << endl;
86 cout <<
"boolean_function_classify::init_group "
87 "after AonHPD->init" << endl;
98 cout <<
"boolean_function_classify::init_group "
99 "before generators_for_parabolic_subgroup" << endl;
102 Mtx, degree - 1, verbose_level);
104 cout <<
"boolean_function_classify::init_group "
105 "after generators_for_parabolic_subgroup" << endl;
112 cout <<
"boolean_function_classify::init_group "
117 cout <<
"boolean_function_classify::init_group "
118 "before A->restricted_action" << endl;
123 cout <<
"boolean_function_classify::init_group "
124 "after A->restricted_action" << endl;
128 cout <<
"Generators in the induced action:" << endl;
137 cout <<
"boolean_function::init_group "
138 "before init_transposed_group" << endl;
142 cout <<
"boolean_function::init_group "
143 "after init_transposed_group" << endl;
148 cout <<
"boolean_function_classify::init_group done" << endl;
155 int f_v = (verbose_level >= 1);
165 vector<int> orbit_first;
166 vector<int> orbit_length;
168 vector<vector<int> > Bent_function_table;
169 vector<vector<int> > Equation_table;
171 std::multimap<uint32_t, int> Hashing;
182 cout <<
"boolean_function_classify::search_for_bent_functions" << endl;
189 a.
create(0, __FILE__, __LINE__);
194 cout << a <<
" / " <<
BF->
NN <<
" : ";
206 cout <<
" is bent " << nb_sol;
211 map<uint32_t, int>::iterator itr, itr1, itr2;
214 itr1 = Hashing.lower_bound(h);
215 itr2 = Hashing.upper_bound(h);
217 for (itr = itr1; itr != itr2; ++itr) {
219 for (j = 0; j <
BF->
Q; j++) {
220 if (
BF->
f[j] != Bent_function_table[pos][j]) {
233 cout <<
" NEW orbit " << nb_orbits << endl;
256 cout <<
"orbit " << nb_orbits <<
", computing orbit of bent function:" << endl;
261 cout <<
"found an orbit of length " << Orb->
used_length << endl;
265 cout <<
"orbit " << nb_orbits <<
", computing stabilizer:" << endl;
270 orbit_first.push_back(Bent_function_table.size());
279 for (j = 0; j <
BF->
Q; j++) {
288 Hashing.insert(pair<uint32_t, int>(h, Bent_function_table.size()));
290 Bent_function_table.push_back(v);
291 Equation_table.push_back(w);
298 if (nb_orbits == 0) {
301 else if (nb_orbits == 1) {
307 cout <<
"orbit " << nb_orbits <<
", computing stabilizer of element " << idx << endl;
311 cout <<
"orbit " << nb_orbits <<
", function: ";
314 cout <<
"orbit " << nb_orbits <<
", equation: ";
325 cout <<
"orbit " << nb_orbits <<
", induced action:" << endl;
339 cout <<
"The bent function has been found earlier already" << endl;
346 cout <<
"after increment: a=" << a << endl;
348 cout <<
"We found " << nb_sol <<
" bent functions" << endl;
349 cout <<
"We have " << Bent_function_table.size() <<
" bent functions in the table" << endl;
350 cout <<
"They fall into " << orbit_first.size() <<
" orbits:" << endl;
354 for (h = 0; h < orbit_first.size(); h++) {
355 fst = orbit_first[h];
356 len = orbit_length[h];
357 cout <<
"Orbit " << h <<
" / " << orbit_first.size() <<
" has length " << len <<
":" << endl;
358 for (t = 0; t < len; t++) {
360 cout << i <<
" : " << t <<
" / " << len <<
" : ";
361 for (j = 0; j <
BF->
Q; j++) {
362 BF->
f[j] = Bent_function_table[i][j];
365 poly[j] = Equation_table[i][j];
372 cout <<
" : " << a <<
" : ";
380 for (i = 0; i < Bent_function_table.size(); i++) {
382 for (j = 0; j < Q; j++) {
383 f[j] = Bent_function_table[i][j];
385 for (j = 0; j < Poly[n].get_nb_monomials(); j++) {
386 poly[j] = Equation_table[i][j];
388 int_vec_print(cout, f, Q);
390 int_vec_print(cout, poly, Poly[n].get_nb_monomials());
392 Poly[n].print_equation(cout, poly);
399 for (h = 0; h < orbit_first.size(); h++) {
400 cout <<
"orbit " << h <<
" / " << orbit_first.size() <<
" has length " << orbit_length[h] << endl;
406 cout <<
"boolean_function_classify::search_for_bent_functions done" << endl;
412static void boolean_function_classify_print_function(
int *poly,
int sz,
void *data)
424 cout <<
" : rk=" << a;
428static void boolean_function_classify_reduction_function(
int *poly,
void *data)
430 boolean_function_classify *BFC = (boolean_function_classify *) data;
432 if (BFC->BF->dim_kernel) {
436 for (i = 0; i < BFC->BF->dim_kernel; i++) {
437 i1 = BFC->BF->Kernel[i * 2 + 0];
438 i2 = BFC->BF->Kernel[i * 2 + 1];
441 ma = BFC->BF->Fq->
negate(a);
443 poly[i2] = BFC->BF->Fq->add(poly[i2], ma);
452 ma = BFC->Fq->negate(a);
454 poly[4] = BFC->Fq->add(poly[4], ma);
459 ma = BFC->Fq->negate(a);
461 poly[5] = BFC->Fq->add(poly[5], ma);
field_theory::finite_field * Fq
void raise(int *in, int *out)
void evaluate(int *coeff, int *f)
void apply_Walsh_transform(int *in, int *out)
ring_theory::longinteger_object * NN
ring_theory::homogeneous_polynomial_domain * Poly
void compute_polynomial_representation(int *func, int *coeff, int verbose_level)
a catch-all container class for everything related to data structures
uint32_t int_vec_hash(int *data, int len)
various functions related to geometries
void AG_element_rank_longinteger(int q, int *v, int stride, int len, ring_theory::longinteger_object &a)
void AG_element_unrank_longinteger(int q, int *v, int stride, int len, ring_theory::longinteger_object &a)
void print_equation(std::ostream &ost, int *coeffs)
domain to compute with objects of type longinteger
int is_less_than(longinteger_object &a, longinteger_object &b)
a class to represent arbitrary precision integers
void create(long int i, const char *file, int line)
a permutation group in a fixed action.
action * restricted_action(long int *points, int nb_points, int verbose_level)
void init_projective_group(int n, field_theory::finite_field *F, int f_semilinear, int f_basis, int f_init_sims, data_structures_groups::vector_ge *&nice_gens, int verbose_level)
groups::matrix_group * get_matrix_group()
a matrix group over a finite field in projective, vector space or affine action
a strong generating set for a permutation group with respect to a fixed action
void init(actions::action *A)
void generators_for_parabolic_subgroup(actions::action *A_PGL_n_q, matrix_group *Mtx, int k, int verbose_level)
void print_generators_tex()
void print_with_given_action(std::ostream &ost, actions::action *A2)
void init_transposed_group(strong_generators *SG, int verbose_level)
void group_order(ring_theory::longinteger_object &go)
induced action on the set of homogeneous polynomials over a finite field
void init(actions::action *A, ring_theory::homogeneous_polynomial_domain *HPD, int verbose_level)
orbit of homogeneous equations using a Schreier tree
groups::strong_generators * stabilizer_orbit_rep(ring_theory::longinteger_object &full_group_order, int verbose_level)
void(* print_function)(int *object, int sz, void *print_function_data)
void * print_function_data
groups::strong_generators * stabilizer_any_point(ring_theory::longinteger_object &full_group_order, int idx, int verbose_level)
void(* reduction_function)(int *object, void *reduction_function_data)
void * reduction_function_data
void init(actions::action *A, field_theory::finite_field *F, induced_actions::action_on_homogeneous_polynomials *AonHPD, groups::strong_generators *SG, int *coeff_in, int verbose_level)
classification of boolean functions
data_structures_groups::vector_ge * nice_gens
actions::action * A_affine
void init_group(combinatorics::boolean_function_domain *BF, int verbose_level)
induced_actions::action_on_homogeneous_polynomials * AonHPD
combinatorics::boolean_function_domain * BF
~boolean_function_classify()
ring_theory::longinteger_object go
void search_for_bent_functions(int verbose_level)
groups::strong_generators * SG
boolean_function_classify()
#define Int_vec_copy(A, B, C)
#define Int_vec_print(A, B, C)
the orbiter library for the classification of combinatorial objects