16namespace layer5_applications {
17namespace apps_combinatorics {
20static void difference_set_in_heisenberg_group_early_test_func(
22 long int *candidates,
int nb_candidates,
23 long int *good_candidates,
int &nb_good_candidates,
24 void *data,
int verbose_level);
31 int f_v = (verbose_level >= 1);
36 cout <<
"difference_set_in_heisenberg_group::init" << endl;
47 cout <<
"group_table:" << endl;
53 cout <<
"Too big to print" << endl;
60 cout <<
"Generating set of size " <<
nb_gens <<
":" << endl;
65 cout <<
"generator " << i <<
" / " <<
nb_gens
66 <<
" is " <<
gens[i] <<
":" << endl;
73 sprintf(str,
"H_%d_%d",
n,
q);
90 cout <<
"The holomorph has order " <<
N_go
92 <<
" elements" << endl;
94 cout <<
"holomorph generator " << i <<
" / "
98 cout <<
"an element of order " << ord << endl;
102 cout << a <<
" -> " << b <<
" : ";
116 cout <<
"given base: ";
122 for (i = 0; i <
nb_gens; i++) {
131 cout <<
"creating holomorph" << endl;
137 longinteger_object go;
139 cout <<
"The order of the holomorph is " << go << endl;
142 cout <<
"creating automorphism group" << endl;
145 cout <<
"The automorphism group has order " <<
Aut_order << endl;
160 cout <<
"difference_set_in_heisenberg_group::init done" << endl;
166 int f_v = (verbose_level >= 1);
168 int h, k, f, u, v, len1, len2, s;
173 cout <<
"difference_set_in_heisenberg_group::do_n2q3" << endl;
195 for (i = 0; i < 5; i++) {
201 cout <<
"making element" << endl;
203 cout <<
"generator has been created:" << endl;
214 cout <<
"The group U" << endl;
218 cout <<
"The order of U is " <<
U_go << endl;
226 cout <<
"The orbits of U are:" << endl;
232 sprintf(str,
"N_U_2_3");
235 cout <<
"computing normalizer of U in G:" << endl;
253 int f_no_base =
FALSE;
264 cout <<
"created the normalizer N of order " <<
N_order << endl;
268 cout <<
"rk_E1 = " <<
rk_E1 << endl;
272 cout <<
"creating action on orbits:" << endl;
277 cout <<
"action on orbits has been created, degree = "
292 cout <<
"Paired_with:" << endl;
311 a =
Pairs[2 * h + 0];
312 b =
Pairs[2 * h + 1];
318 << a <<
"," << b <<
" = {";
319 for (k = 0; k < len1; k++) {
328 for (k = 0; k < len2; k++) {
335 cout <<
"}, orbits of length " << len1 << endl;
337 cout <<
"len1 != len2" << endl;
356 <<
" pairs of short orbits, they are:" << endl;
360 <<
" pairs of long orbits, they are:" << endl;
369 a =
Pairs[2 * h + 0];
370 b =
Pairs[2 * h + 1];
381 a =
Pairs[2 * h + 0];
382 b =
Pairs[2 * h + 1];
387 for (k = 0; k < 3; k++) {
390 for (k = 0; k < 3; k++) {
394 cout <<
"Sets1:" << endl;
397 cout <<
"Sets2:" << endl;
417 for (t = 0; t < 2; t++) {
429 cout <<
"Short_pairs:" << endl;
432 cout <<
"Long_pairs:" << endl;
437 cout <<
"creating restricted action on short orbits:" << endl;
451 int f_v = (verbose_level >= 1);
458 cout <<
"difference_set_in_heisenberg_group::check_"
459 "overgroups_of_order_nine" << endl;
461 int second_gen_idx[] = {
462 731, 353, 381, 379, 46, 357, 700, 359, 698, 721,
463 696, 694, 723, 355, 725, 44, 690, 688, 686, 664,
464 733, 383, 660, 347, 42, 656, 345, 652, 343, 1035,
465 648, 1037, 387, 40, 991, 1295, 1293, 995, 1289, 1287,
466 997, 1283, 1279, 1258, 1254, 38, 1244, 1220, 1218, 1216,
467 1027, 1248, 1210, 1208, 1206, 1007, 1078, 1003, 1072, 1070,
468 426, 1064, 999, 424, 1062, 1043, 1041, 422, 1285, 420,
469 418, 52, 1250, 414, 50, 993, 391, 658, 737, 385,
474 int nb_overgroups =
sizeof(second_gen_idx) /
sizeof(
int);
480 cout <<
"making element Elt1:" << endl;
486 for (h = 0; h < nb_overgroups; h++) {
488 cout <<
"overgroup " << h <<
" / "
489 << nb_overgroups <<
":" << endl;
497 cout <<
"making element" << endl;
499 cout <<
"second generator has been created:" << endl;
509 cout <<
"The group O" << endl;
513 cout <<
"The order of O is " << O_go << endl;
515 cout <<
"The group O does not have order 9" << endl;
525 cout <<
"The orbits of O are:" << endl;
534 cout <<
"Overgroup orbit type:" << endl;
539 int s, a, b, f, l, o1, o2;
550 cout <<
"normalizer orbit " << a <<
" / "
551 << Sch1->
nb_orbits <<
" is U-orbit " << o1 << endl;
552 cout <<
"U-orbit " << o1 <<
" is paired with U-orbit " << o2 << endl;
555 cout <<
"Which is normalizer orbit " << b << endl;
558 cout <<
"Pairing:" << endl;
565 int *Pairs_of_long_orbits;
566 int nb_pairs_of_long_orbits;
573 <<
" long orbits, they are:" << endl;
581 nb_pairs_of_long_orbits = 0;
588 Pairs_of_long_orbits[nb_pairs_of_long_orbits * 2 + 0] = a;
589 Pairs_of_long_orbits[nb_pairs_of_long_orbits * 2 + 1] = b;
590 nb_pairs_of_long_orbits++;
592 cout <<
"Pairs_of_long_orbits:" << endl;
594 Pairs_of_long_orbits, nb_pairs_of_long_orbits,
603 int u, t, ff, ll, v, k, di, dj;
610 cout <<
"N=" <<
N << endl;
611 selection =
NEW_int(nb_pairs_of_long_orbits);
616 for (u = 0; u <
N; u++) {
618 nb_pairs_of_long_orbits, u);
620 for (t = 0; t < nb_pairs_of_long_orbits; t++) {
622 a = Pairs_of_long_orbits[t * 2 + 1];
625 a = Pairs_of_long_orbits[t * 2 + 0];
630 cout <<
"l != 3" << endl;
631 cout <<
"a=" << a << endl;
632 cout <<
"l=" << l << endl;
633 cout <<
"s=" << s << endl;
634 cout <<
"t=" << t << endl;
635 cout <<
"testing case " << u <<
" = ";
637 nb_pairs_of_long_orbits);
641 for (v = 0; v < l; v++) {
642 o1 = Sch1->
orbit[f + v];
646 cout <<
"ll != 3" << endl;
649 for (k = 0; k < ll; k++) {
654 if (((u + 250) % 1) == 0) {
655 cout <<
"testing case " << u <<
" = ";
657 nb_pairs_of_long_orbits);
659 cout <<
"We found a set D of size "
660 << D_sz <<
":" << endl;
665 for (i = 0; i < D_sz; i++) {
667 for (j = 0; j < D_sz; j++) {
679 cout <<
"D type:" << endl;
687 if (i < H->group_order) {
688 cout <<
"bad" << endl;
692 cout <<
"good" << endl;
698 cout <<
"group " << h <<
":" << endl;
699 cout <<
"nb_good=" << nb_good << endl;
700 cout <<
"nb_bad=" << nb_bad << endl;
714 cout <<
"difference_set_in_heisenberg_group::check_"
715 "overgroups_of_order_nine done" << endl;
722 int f_v = (verbose_level >= 1);
730 cout <<
"difference_set_in_heisenberg_group::create_"
731 "minimal_overgroups" << endl;
735 cout <<
"go=" << go << endl;
742 cout <<
"We found " << nb_zuppos <<
" zuppos." << endl;
746 int *subgroup_elements;
755 subgroup_elements =
NEW_int(goi);
765 Group_order =
NEW_int(nb_zuppos);
767 for (z = 0; z < nb_zuppos; z++) {
769 subgroup_elements[0] = 0;
780 cout <<
"found a group of order " << group_sz <<
" : ";
781 int_vec_print(cout, group, group_sz);
785 Group_order[z] = group_sz;
796 Group_orders.
init(Group_order, nb_zuppos,
FALSE, 0);
797 cout <<
"We found the following group orders: ";
804 for (i = 0; i < Group_orders.
nb_types; i++) {
807 Idx_subgroup, nb_subgroups,
809 cout <<
"We have " << nb_subgroups
810 <<
" subgroups of order " << o << endl;
813 for (j = 0; j < nb_subgroups; j++) {
814 Subgroups_of_order[j] = Subs[Idx_subgroup[j]];
815 Subs[Idx_subgroup[j]] = NULL;
818 cout <<
"The subgroups of order " << o <<
" are:" << endl;
819 for (j = 0; j < nb_subgroups; j++) {
820 Subgroups_of_order[j]->
print();
825 for (j = 0; j < nb_subgroups; j++) {
827 if (Subgroups_of_order[j]->contains_this_element(
rk_E1)) {
831 if (j == nb_subgroups) {
832 cout <<
"We could not find the group containing "
833 "the element rk_E1" << endl;
837 cout <<
"The subgroup containing the element E1=" <<
rk_E1
838 <<
" has index " << idx_E1 <<
":" << endl;
839 Subgroups_of_order[j]->
print();
843 cout <<
"creating action on the subgroups:" << endl;
847 Subgroups_of_order, verbose_level);
848 cout <<
"action on subgroups created:" << endl;
854 cout <<
"computing orbit of conjugated subgroups:" << endl;
856 A_on_subgroups, idx_E1, verbose_level);
858 cout <<
"found an orbit of conjugated subgroups of length "
863 int *Overgroup_order;
867 Overgroup_order =
NEW_int(nb_zuppos);
869 for (z = 0; z < nb_zuppos; z++) {
870 cout <<
"zuppo " << z <<
" / " << nb_zuppos <<
":" << endl;
873 Subgroups_of_order[j]->group_order);
877 Subgroups_of_order[j]->
nb_gens);
886 cout <<
"found a group of order " << group_sz <<
" : ";
890 Overgroup_order[z] = group_sz;
898 Overgroup_orders.
init(Overgroup_order, nb_zuppos,
FALSE, 0);
899 cout <<
"We found the following overgroup orders: ";
909 for (ii = 0; ii < Overgroup_orders.
nb_types; ii++) {
916 Idx_overgroup, nb_overgroups,
919 cout <<
"We have " << nb_overgroups
920 <<
" overgroups of order " << oo << endl;
923 for (j = 0; j < nb_overgroups; j++) {
924 Overgroups_of_order[j] = Overgroups[Idx_overgroup[j]];
925 Overgroups[Idx_overgroup[j]] = NULL;
930 cout <<
"The overgroups of order " << oo <<
" are:" << endl;
931 for (j = 0; j < nb_overgroups; j++) {
932 cout << j <<
" / " << nb_overgroups <<
" : ";
933 Overgroups_of_order[j]->
print();
938 cout <<
"creating action on the overgroups of order "
939 << oo <<
":" << endl;
945 cout <<
"action on overgroups created:" << endl;
951 cout <<
"computing the orbits of conjugated "
952 "overgroups of order " << oo <<
":" << endl;
954 A_on_overgroups, 0 );
956 cout <<
"The conjugacy classes of overgroups of order "
957 << oo <<
" have the following lengths: ";
959 cout <<
"There are " << Sch_overgroups->
nb_orbits
960 <<
" classes" << endl;
961 cout <<
"Representatives of the conjugacy "
962 "classes are:" << endl;
964 int *second_generator;
966 for (j = 0; j < Sch_overgroups->
nb_orbits; j++) {
970 a = Sch_overgroups->
orbit[f];
972 for (t = 0; t < 2; t++) {
973 if (Overgroups_of_order[a]->
gens[t] !=
rk_E1) {
974 second_generator[j] =
975 Overgroups_of_order[a]->
gens[t];
980 cout <<
"t == 2" << endl;
984 cout <<
"the second generators are:" << endl;
989 second_generator, Sch_overgroups->
nb_orbits);
1001 sprintf(
prefix,
"H_%d_%d_short",
n,
q);
1003 cout <<
"classifying subsets:" << endl;
1007 compute_orbits_on_subsets(
gen,
1013 difference_set_in_heisenberg_group_early_test_func,
1023 cout <<
"difference_set_in_heisenberg_group::do_n2q3 done" << endl;
1028 long int *candidates,
int nb_candidates,
1029 long int *good_candidates,
int &nb_good_candidates,
1033 int f_v = (verbose_level >= 1);
1034 int i, a, aa, b, bb;
1037 cout <<
"difference_set_in_heisenberg_group::early_test_func" << endl;
1043 nb_good_candidates = 0;
1047 for (i = 0; i < len; i++) {
1049 cout <<
"set element " << i <<
" / " << len <<
":" << endl;
1057 cout <<
"orbit " << a <<
"=" << aa <<
" is paired with "
1058 << bb <<
"=" << b << endl;
1061 cout <<
"difference_set_in_heisenberg_group::early_test_func "
1063 cout <<
"chosen orbit " << a <<
"=" << aa
1064 <<
" which is paired with " << bb
1065 <<
"=" << b << endl;
1069 cout <<
"difference_set_in_heisenberg_group::early_test_func "
1070 "the set is not admissible" << endl;
1074 for (i = 0; i < nb_candidates; i++) {
1083 cout <<
"testing orbit " << a <<
"=" << aa
1084 <<
" which is paired with " << bb <<
"=" << b <<
" : ";
1087 cout <<
"difference_set_in_heisenberg_group::early_test_func "
1089 cout <<
"testing orbit " << a <<
"=" << aa
1090 <<
" which is paired with " << bb <<
"="
1091 << b <<
" : " << endl;
1096 cout <<
" is OK" << endl;
1098 good_candidates[nb_good_candidates++] = a;
1102 cout <<
" is bad" << endl;
1107 cout <<
"we found " << nb_good_candidates
1108 <<
" good candidates" << endl;
1111 cout <<
"They are:" << endl;
1116 cout <<
"difference_set_in_heisenberg_group::early_test_func done" << endl;
1122static void difference_set_in_heisenberg_group_early_test_func(
1123 long int *S,
int len,
1124 long int *candidates,
int nb_candidates,
1125 long int *good_candidates,
int &nb_good_candidates,
1126 void *data,
int verbose_level)
1132 candidates, nb_candidates,
1133 good_candidates, nb_good_candidates,
Heisenberg group of n x n matrices.
void generating_set(int *&gens, int &nb_gens, int verbose_level)
void init(field_theory::finite_field *F, int n, int verbose_level)
int element_negate_by_rank(int rk_a, int verbose_level)
void group_table_abv(int *&Table_abv, int verbose_level)
void group_table(int *&Table, int verbose_level)
long int rank_element(int *Elt)
void unrank_element(int *Elt, long int rk)
void mone(int *v, long int len)
void print_Cpp(std::ostream &ost, int *v, int len)
a collection of functions related to sorted vectors
void int_vec_heapsort(int *v, int len)
a statistical analysis of data consisting of single integers
void init(int *data, int data_length, int f_second, int verbose_level)
void print_naked(int f_backwards)
void get_class_by_value(int *&Pts, int &nb_pts, int value, int verbose_level)
various functions related to geometries
void AG_element_unrank(int q, int *v, int stride, int len, long int a)
basic number theoretic functions
int i_power_j(int i, int j)
interface to create latex output files
void print_lint_matrix_with_standard_labels(std::ostream &ost, long int *p, int m, int n, int f_tex)
void print_integer_matrix_with_standard_labels(std::ostream &ost, int *p, int m, int n, int f_tex)
interface to the computer algebra system MAGMA
void read_permutation_group(std::string &fname, int degree, int *&gens, int &nb_gens, int &go, int verbose_level)
data_structures::int_vec * Int_vec
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 element_print(void *elt, std::ostream &ost)
void normalizer_using_MAGMA(std::string &fname_magma_prefix, groups::sims *G, groups::sims *H, groups::strong_generators *&gens_N, int verbose_level)
action * create_induced_action_on_subgroups(groups::sims *S, int nb_subgroups, int group_order, groups::subgroup **Subgroups, int verbose_level)
groups::strong_generators * Strong_gens
void induced_action_on_orbits(action *old_action, groups::schreier *Sch, int f_play_it_safe, int verbose_level)
void init_automorphism_group_from_group_table(std::string &fname_base, int *Table, int group_order, int *gens, int nb_gens, groups::strong_generators *&Aut_gens, int verbose_level)
groups::sims * create_sims_from_generators_without_target_group_order(data_structures_groups::vector_ge *gens, int verbose_level)
void group_order(ring_theory::longinteger_object &go)
void make_element_from_base_image(int *Elt, groups::sims *S, int *data, int verbose_level)
void init_permutation_group_from_generators(int degree, int f_target_go, ring_theory::longinteger_object &target_go, int nb_gens, int *gens, int given_base_length, long int *given_base, int f_no_base, int verbose_level)
to hold a vector of group elements
void init_double(actions::action *A, int *Elt1, int *Elt2, int verbose_level)
void init_single(actions::action *A, int *Elt, int verbose_level)
Schreier trees for orbits of groups on points.
void compute_all_point_orbits(int verbose_level)
void init_generators(data_structures_groups::vector_ge &generators, int verbose_level)
void print_orbit_length_distribution(std::ostream &ost)
void print_orbit_lengths(std::ostream &ost)
void init(actions::action *A, int verbose_level)
void print_and_list_orbits_tex(std::ostream &ost)
a permutation group represented via a stabilizer chain
void dimino(int *subgroup, int subgroup_sz, int *gens, int &nb_gens, int *cosets, int new_gen, int *group, int &group_sz, int verbose_level)
void group_order(ring_theory::longinteger_object &go)
void zuppo_list(int *Zuppos, int &nb_zuppos, int verbose_level)
void element_unrank_lint(long int rk, int *Elt, int verbose_level)
long int element_rank_lint(int *Elt)
a strong generating set for a permutation group with respect to a fixed action
strong_generators * point_stabilizer(int pt, int verbose_level)
sims * create_sims(int verbose_level)
schreier * orbit_of_one_point_schreier(actions::action *A_given, int pt, int verbose_level)
schreier * orbits_on_points_schreier(actions::action *A_given, int verbose_level)
void group_order(ring_theory::longinteger_object &go)
a subgroup of a group using a list of elements
void init(int *Elements, int group_order, int *gens, int nb_gens)
to find difference sets in Heisenberg groups following Tao
std::string fname_magma_out
actions::action * A_on_short_orbits
actions::action * N_on_orbits
ring_theory::longinteger_object Aut_order
void create_minimal_overgroups(int verbose_level)
ring_theory::longinteger_object U_go
poset_classification::poset_classification * gen
void check_overgroups_of_order_nine(int verbose_level)
data_structures_groups::vector_ge * U_gens
void init(int n, field_theory::finite_field *F, int verbose_level)
groups::strong_generators * Aut_gens
void early_test_func(long int *S, int len, long int *candidates, int nb_candidates, long int *good_candidates, int &nb_good_candidates, int verbose_level)
field_theory::finite_field * F
void do_n2q3(int verbose_level)
int * Short_orbit_inverse
ring_theory::longinteger_object N_order
#define Lint_vec_copy(A, B, C)
#define Int_vec_zero(A, B)
#define Lint_vec_print(A, B, C)
#define Int_vec_copy(A, B, C)
#define Int_vec_copy_to_lint(A, B, C)
#define Int_vec_print(A, B, C)
orbiter_kernel_system::orbiter_session * Orbiter
global Orbiter session
class subgroup * psubgroup
the orbiter library for the classification of combinatorial objects