16namespace layer5_applications {
21static void spread_lifting_early_test_function(
long int *S,
int len,
22 long int *candidates,
int nb_candidates,
23 long int *good_candidates,
int &nb_good_candidates,
24 void *data,
int verbose_level);
25static void spread_lifting_prepare_function_new(
exact_cover *EC,
int starter_case,
26 long int *candidates,
int nb_candidates,
32static int starter_canonize_callback(
long int *Set,
int len,
int *Elt,
33 void *data,
int verbose_level);
34static int callback_incremental_check_function(
36 void *data,
int verbose_level);
37static void spread_early_test_func_callback(
long int *S,
int len,
38 long int *candidates,
int nb_candidates,
39 long int *good_candidates,
int &nb_good_candidates,
40 void *data,
int verbose_level);
175 int f_recoordinatize,
178 int f_v = (verbose_level >= 1);
179 int f_vv = (verbose_level >= 2);
185 cout <<
"spread_classify::init" << endl;
186 cout <<
"k=" <<
k << endl;
200 cout <<
"spread_classify::init" << endl;
201 cout <<
"q=" <<
q << endl;
202 cout <<
"n=" <<
n << endl;
203 cout <<
"k=" <<
k << endl;
204 cout <<
"order=" <<
order << endl;
209 Control->f_depth =
TRUE;
212 cout <<
"spread_classify::init" << endl;
213 cout <<
"Control:" << endl;
230 cout <<
"spread_classify::init f_recoordinatize = " <<
f_recoordinatize << endl;
249 longinteger_object go;
252 cout <<
"spread_classify::init go = " << go << endl;
258 cout <<
"action A created: ";
272 cout <<
"spread_classify::init "
273 "nCkq = {n \\choose k}_q = " <<
nCkq << endl;
274 cout <<
"spread_classify::init "
275 "r = {k \\choose 1}_q = " <<
r << endl;
276 cout <<
"spread_classify::init "
277 "nb_pts = {n \\choose 1}_q = " <<
nb_pts << endl;
283 cout <<
"spread_classify::init before AG->init" << endl;
289 cout <<
"spread_classify::init after AG->init" << endl;
297 cout <<
"spread_classify::init after "
298 "A2->induced_action_on_grassmannian" << endl;
302 cout <<
"action A2 created: ";
308 cout <<
"action does not have strong generators" << endl;
316 int f_print_as_permutation =
TRUE;
317 int f_offset =
FALSE;
319 int f_do_it_anyway_even_for_big_degree =
TRUE;
320 int f_print_cycles_of_length_one =
FALSE;
322 cout <<
"printing generators for the group:" << endl;
325 f_do_it_anyway_even_for_big_degree,
326 f_print_cycles_of_length_one);
332 for (i = 0; i < len; i++) {
333 cout <<
"generator " << i <<
":" << endl;
362 cout <<
"spread_classify::init The order of PGGL(n,q) is " << go << endl;
368 cout <<
"spread_classify::init before recoordinatize::init" << endl;
379 callback_incremental_check_function, (
void *)
this,
384 cout <<
"spread_classify::init before "
385 "recoordinatize::compute_starter" << endl;
393 cout <<
"spread_classify::init The stabilizer of the "
394 "first three components has order " << go << endl;
401 cout <<
"spread_classify::init we are not using "
402 "recoordinatization" << endl;
409 cout <<
"spread_classify::init Nb = " <<
Nb << endl;
410 cout <<
"spread_classify::init kn = " <<
kn << endl;
411 cout <<
"spread_classify::init n = " <<
n << endl;
412 cout <<
"spread_classify::init k = " <<
k << endl;
413 cout <<
"spread_classify::init allocating Data1 and Data2" << endl;
422 if (
k == 2 && is_prime(
q)) {
425 cout <<
"spread_classify::init "
426 "before singer_cycle::init" << endl;
433 if (
k == 2 &&
n == 4) {
436 cout <<
"spread_classify::init k == 2 and n == 4, "
437 "initializing klein correspondence" << endl;
447 cout <<
"spread_classify::init we are not "
448 "initializing klein correspondence" << endl;
456 cout <<
"spread_classify::init before init2" << endl;
458 init2(verbose_level - 1);
460 cout <<
"spread_classify::init after init2" << endl;
465 cout <<
"spread_classify::init done" << endl;
473 int f_v = (verbose_level >= 1);
476 cout <<
"spread_classify::init2" << endl;
484 spread_early_test_func_callback,
491 cout <<
"spread_classify::init2 "
492 "before gen->initialize_with_starter" << endl;
504 starter_canonize_callback,
513 cout <<
"spread_classify::init2 "
514 "after gen->initialize_with_starter" << endl;
519 cout <<
"spread_classify::init2 "
520 "before gen->initialize" << endl;
526 cout <<
"spread_classify::init2 "
527 "after gen->initialize" << endl;
536 gen->print_function = callback_spread_print;
537 gen->print_function_data =
this;
542 cout <<
"spread_classify::init2 done" << endl;
577 cout <<
"spread_classify::print_points" << endl;
579 for (i = 0; i <
nb_pts; i++) {
581 cout <<
"point " << i <<
" : ";
594 cout <<
"spread_classify::print_points" << endl;
596 for (h = 0; h < len; h++) {
599 cout <<
"point " << h <<
" : " << a <<
" : ";
612 for (i = 0; i <
nCkq; i++) {
614 cout << i <<
":" << endl;
623 cout <<
"rank yields " << j <<
" != " << i << endl;
636 cout <<
"spread_classify::print_elements_and_points" << endl;
641 for (i = 0; i <
nCkq; i++) {
643 cout << i <<
":" << endl;
646 for (a = 0; a <
r; a++) {
653 cout <<
"line " << i <<
":" << endl;
656 cout <<
"points on subspace " << i <<
" : ";
670 int f_v = (verbose_level >= 1);
672 int f_use_invariant_subset_if_available =
TRUE;
679 cout <<
"spread_classify::compute" << endl;
680 cout <<
"spread_classify::compute Control->max_depth=" <<
gen->
get_control()->
depth << endl;
685 cout <<
"spread_classify::compute calling generator_main" << endl;
694 f_use_invariant_subset_if_available,
701 cout <<
"spread_classify::compute done with generator_main" << endl;
705 cout <<
"spread_classify::compute We found " << length <<
" orbits on "
707 <<
"-subspaces in PG(" <<
n - 1 <<
"," <<
q <<
")"
708 <<
" satisfying the partial spread condition" << endl;
714 cout <<
"spread_classify::compute done" << endl;
720 long int *candidates,
int nb_candidates,
721 long int *good_candidates,
int &nb_good_candidates,
725 int f_v = (verbose_level >= 1);
726 int f_vv = (verbose_level >= 2);
733 cout <<
"spread_classify::early_test_func checking set ";
736 cout <<
"candidate set of size " << nb_candidates <<
":" << endl;
740 if (nb_candidates < 100) {
741 for (i = 0; i < nb_candidates; i++) {
743 cout <<
"candidate " << i <<
"="
744 << candidates[i] <<
":" << endl;
750 cout <<
"too many to print" << endl;
757 cout <<
"spread_classify::early_test_func len + 1 > spread_size" << endl;
758 cout <<
"spread_classify::early_test_func len = " << len << endl;
759 cout <<
"spread_classify::early_test_func spread_size = " <<
spread_size << endl;
767 for (i = 0; i < len; i++) {
771 for (i = 0; i < len; i++) {
772 cout <<
"p_" << i <<
"=" << S[i] <<
":" << endl;
778 nb_good_candidates = 0;
779 for (j = 0; j < nb_candidates; j++) {
787 for (i = i0; i < len; i++) {
792 cout <<
"testing (p_" << i <<
",candidates[" << j <<
"])="
793 "(" << S[i] <<
"," << candidates[j] <<
")" << endl;
798 M, 2 *
k,
n, B, base_cols, 0 );
802 cout <<
"rank is " << rk <<
" which is bad" << endl;
808 cout <<
"rank is " << rk <<
" which is OK" << endl;
813 good_candidates[nb_good_candidates++] = candidates[j];
818 cout <<
"spread_classify::early_test_func we found " << nb_good_candidates
819 <<
" good candidates" << endl;
822 cout <<
"spread_classify::early_test_func done" << endl;
831 int f_v = (verbose_level >= 1);
832 int f_vv = (verbose_level >= 2);
838 cout <<
"spread_classify::check_function checking set ";
848 for (i = 0; i < len; i++) {
849 cout <<
"p_" << i <<
"=" << S[i] <<
":" << endl;
856 for (i = 0; i < len; i++) {
858 for (j = i + 1; j < len; j++) {
863 cout <<
"testing (p_" << i <<
",p_" << j <<
")"
864 "=(" << S[i] <<
"," << S[j] <<
")" << endl;
869 M, 2 *
k,
n, B, base_cols, 0 );
872 cout <<
"rank is " << rk <<
" which is bad" << endl;
879 cout <<
"rank is " << rk <<
" which is OK" << endl;
890 cout <<
"OK" << endl;
896 cout <<
"not OK" << endl;
908 int f_v = (verbose_level >= 1);
909 int f_vv = (verbose_level >= 2);
915 cout <<
"spread_classify::incremental_check_function checking set ";
929 for (i = 0; i < len; i++) {
930 cout <<
"p_" << i <<
"=" << S[i] <<
":" << endl;
940 for (i = 0; i < len - 1; i++) {
945 cout <<
"testing (p_" << i <<
",p_" << j <<
")"
946 "=(" << S[i] <<
"," << S[j] <<
")" << endl;
951 M, 2 *
k,
n, B, base_cols, 0 );
954 cout <<
"rank is " << rk <<
" which is bad" << endl;
961 cout <<
"rank is " << rk <<
" which is OK" << endl;
969 cout <<
"OK" << endl;
975 cout <<
"not OK" << endl;
984 long int *candidates,
int nb_candidates,
990 int f_v = (verbose_level >= 1);
991 int f_v3 = (verbose_level >= 3);
994 cout <<
"spread_classify::lifting_prepare_function_new "
995 "nb_candidates=" << nb_candidates << endl;
1004 cout <<
"spread_classify::lifting_prepare_function_new "
1005 "before SL->init" << endl;
1010 candidates, nb_candidates, Strong_gens,
1014 cout <<
"spread_classify::lifting_prepare_function_new "
1015 "after SL->init" << endl;
1020 cout <<
"spread_classify::lifting_prepare_function_new "
1021 "before SL->create_system" << endl;
1026 cout <<
"spread_classify::lifting_prepare_function_new "
1027 "after SL->create_system" << endl;
1034 cout <<
"spread_classify::lifting_prepare_function_new "
1035 "before SL->find_coloring" << endl;
1038 col_color, nb_colors,
1041 cout <<
"spread_classify::lifting_prepare_function_new "
1042 "after SL->find_coloring" << endl;
1046 cout <<
"col_color=";
1054 cout <<
"spread_classify::lifting_prepare_function_new "
1055 "before Dio->make_clique_graph_adjacency_matrix" << endl;
1059 cout <<
"spread_classify::lifting_prepare_function_new "
1060 "after Dio->make_clique_graph_adjacency_matrix" << endl;
1068 string label, label_tex;
1069 sprintf(str,
"graph_%d", starter_case);
1071 label_tex.assign(str);
1074 cout <<
"spread_classify::lifting_prepare_function_new "
1075 "before CG->init_with_point_labels" << endl;
1084 cout <<
"spread_classify::lifting_prepare_function_new "
1085 "after CG->init_with_point_labels" << endl;
1088 string fname_clique_graph;
1092 fname_clique_graph.append(str);
1093 fname_clique_graph.append(
".graph");
1095 CG->
save(fname_clique_graph, verbose_level - 1);
1097 cout <<
"Written file " << fname_clique_graph
1098 <<
" of size " << Fio.
file_size(fname_clique_graph) << endl;
1111 cout <<
"spread_classify::lifting_prepare_function_new "
1112 "after SL->create_system" << endl;
1116 cout <<
"spread_classify::lifting_prepare_function_new "
1124 int *dual_spread,
int verbose_level)
1126 int f_v = (verbose_level >= 1);
1129 cout <<
"spread_classify::compute_dual_spread" << endl;
1136 cout <<
"spread_classify::compute_dual_spread done" << endl;
1143 int f_elements_exponential =
FALSE;
1144 string symbol_for_print;
1146 symbol_for_print.assign(
"\\alpha");
1150 for (i = 0; i < len; i++) {
1151 ost <<
"$S_{" << i + 1 <<
"}$ has rank " << S[i]
1152 <<
" and is generated by\\\\" << endl;
1154 ost <<
"$$" << endl;
1155 ost <<
"\\left[" << endl;
1158 ost <<
"\\right]" << endl;
1159 ost <<
"$$" << endl << endl;
1170static void spread_lifting_early_test_function(
long int *S,
int len,
1171 long int *candidates,
int nb_candidates,
1172 long int *good_candidates,
int &nb_good_candidates,
1173 void *data,
int verbose_level)
1176 int f_v = (verbose_level >= 1);
1179 cout <<
"spread_lifting_early_test_function for set ";
1184 candidates, nb_candidates,
1185 good_candidates, nb_good_candidates,
1188 cout <<
"spread_lifting_early_test_function done" << endl;
1192static void spread_lifting_prepare_function_new(
1194 long int *candidates,
int nb_candidates,
1200 int f_v = (verbose_level >= 1);
1201 spread_classify *Spread = (spread_classify *) EC->
user_data;
1204 cout <<
"spread_lifting_prepare_function_new "
1205 "nb_candidates=" << nb_candidates << endl;
1208 Spread->lifting_prepare_function_new(EC, starter_case,
1209 candidates, nb_candidates, Strong_gens,
1210 Dio, col_labels, f_ruled_out,
1215 cout <<
"spread_lifting_prepare_function_new "
1216 "after lifting_prepare_function_new" << endl;
1220 cout <<
"spread_lifting_prepare_function_new "
1221 "nb_rows=" << Dio->
m
1222 <<
" nb_cols=" << Dio->
n << endl;
1226 cout <<
"spread_lifting_prepare_function_new "
1235static int starter_canonize_callback(
long int *Set,
int len,
1236 int *Elt,
void *data,
int verbose_level)
1240 spread_classify *Spread = (spread_classify *) data;
1241 int f_v = (verbose_level >= 1);
1242 int f_vv = (verbose_level >= 2);
1245 cout <<
"starter_canonize_callback" << endl;
1247 Spread->R->do_recoordinatize(Set[0], Set[1], Set[2], verbose_level - 2);
1248 Spread->A->element_move(Spread->R->Elt, Elt,
FALSE);
1250 cout <<
"starter_canonize_callback done" << endl;
1253 cout <<
"transporter:" << endl;
1254 Spread->A->element_print(Elt, cout);
1259static int callback_incremental_check_function(
1260 int len,
long int *S,
void *data,
int verbose_level)
1263 spread_classify *Spread = (spread_classify *) data;
1266 ret = Spread->incremental_check_function(len, S, verbose_level);
1270static void spread_early_test_func_callback(
long int *S,
int len,
1271 long int *candidates,
int nb_candidates,
1272 long int *good_candidates,
int &nb_good_candidates,
1273 void *data,
int verbose_level)
1275 spread_classify *T = (spread_classify *) data;
1276 int f_v = (verbose_level >= 1);
1279 cout <<
"spread_early_test_func_callback for set ";
1283 T->early_test_func(S, len,
1284 candidates, nb_candidates,
1285 good_candidates, nb_good_candidates,
1288 cout <<
"spread_early_test_func_callback done" << endl;
a collection of combinatorial functions
long int generalized_binomial(int n, int k, int q)
compact storage of 0/1-data as bitvectors
void PG_element_unrank_modified(int *v, int stride, int len, int a)
void PG_element_unrank_modified_lint(int *v, int stride, int len, long int a)
void latex_matrix(std::ostream &f, int f_elements_exponential, std::string &symbol_for_print, int *M, int m, int n)
linear_algebra::linear_algebra * Linear_algebra
void PG_element_rank_modified_lint(int *v, int stride, int len, long int &a)
to rank and unrank subspaces of a fixed dimension in F_q^n
void unrank_lint(long int rk, int verbose_level)
long int rank_lint_here(int *Mtx, int verbose_level)
void compute_dual_spread(int *spread, int *dual_spread, int spread_size, int verbose_level)
void unrank_lint_here(int *Mtx, long int rk, int verbose_level)
void init(int n, int k, field_theory::finite_field *F, int verbose_level)
the Klein correspondence between lines in PG(3,q) and points on the Klein quadric
void init(field_theory::finite_field *F, orthogonal_geometry::orthogonal *O, int verbose_level)
a graph with a vertex coloring
void init_with_point_labels(int nb_points, int nb_colors, int nb_colors_per_vertex, int *colors, data_structures::bitvector *Bitvec, int f_ownership_of_bitvec, long int *point_labels, std::string &label, std::string &label_tex, int verbose_level)
void save(std::string &fname, int verbose_level)
int rank_of_rectangular_matrix_memory_given(int *A, int m, int n, int *B, int *base_cols, int verbose_level)
void mult_matrix_matrix(int *A, int *B, int *C, int m, int n, int o, int verbose_level)
basic number theoretic functions
int i_power_j(int i, int j)
a collection of functions related to file io
long int file_size(std::string &fname)
interface to system functions
an orthogonal geometry O^epsilon(n,q)
void init(int epsilon, int n, field_theory::finite_field *F, int verbose_level)
a class to represent arbitrary precision integers
diophantine systems of equations (i.e., linear systems over the integers)
void make_clique_graph_adjacency_matrix(data_structures::bitvector *&Adj, int verbose_level)
a permutation group in a fixed action.
void element_print(void *elt, std::ostream &ost)
groups::strong_generators * Strong_gens
int f_has_strong_generators
int matrix_group_dimension()
action * induced_action_on_grassmannian(int k, int verbose_level)
groups::matrix_group * get_matrix_group()
void element_print_as_permutation(void *elt, std::ostream &ost)
void print(std::ostream &ost)
field_theory::finite_field * GFq
void group_order(ring_theory::longinteger_object &go)
a strong generating set for a permutation group with respect to a fixed action
data_structures_groups::vector_ge * gens
void group_order(ring_theory::longinteger_object &go)
induced action on the grassmannian (subspaces of a fixed dimension of a vectors space)
void init(actions::action &A, geometry::grassmann *G, int verbose_level)
exact cover problems arising with the lifting of combinatorial objects
std::string output_prefix
represents a known classification with constructive recognition, to be used as base case for poset_cl...
void init(poset_with_group_action *Poset, int size, long int *orbit_rep, long int *live_points, int nb_live_points, groups::strong_generators *Stab_gens, void *recognition_function_data, int(*recognition_function)(long int *Set, int len, int *Elt, void *data, int verbose_level), int verbose_level)
to control the behavior of the poset classification algorithm
the poset classification algorithm
void initialize_and_allocate_root_node(poset_classification_control *PC_control, poset_with_group_action *Poset, int depth, int verbose_level)
int main(int t0, int schreier_depth, int f_use_invariant_subset_if_available, int f_debug, int verbose_level)
int nb_orbits_at_level(int level)
void initialize_with_base_case(poset_classification_control *PC_control, poset_with_group_action *Poset, int depth, classification_base_case *Base_case, int verbose_level)
poset_classification_control * get_control()
a poset with a group action on it
void init_subset_lattice(actions::action *A, actions::action *A2, groups::strong_generators *Strong_gens, int verbose_level)
void add_testing_without_group(void(*func)(long int *S, int len, long int *candidates, int nb_candidates, long int *good_candidates, int &nb_good_candidates, void *data, int verbose_level), void *data, int verbose_level)
void init_lines(int verbose_level)
void init(int n, field_theory::finite_field *F, actions::action *A, actions::action *A2, int verbose_level)
projective space PG(n,q) with automorphism group PGGL(n+1,q)
three skew lines in PG(3,q), used to classify spreads
void compute_starter(long int *&S, int &size, groups::strong_generators *&Strong_gens, int verbose_level)
void init(int n, int k, field_theory::finite_field *F, geometry::grassmann *Grass, actions::action *A, actions::action *A2, int f_projective, int f_semilinear, int(*check_function_incremental)(int len, long int *S, void *data, int verbose_level), void *check_function_incremental_data, int verbose_level)
to classify spreads of PG(k-1,q) in PG(n-1,q) where k divides n
groups::matrix_group * Mtx
poset_classification::poset_with_group_action * Poset
poset_classification::poset_classification * gen
groups::strong_generators * Starter_Strong_gens
void unrank_subspace(int *M, long int a)
void print_elements_and_points()
void init(projective_geometry::projective_space_with_action *PA, int k, int f_recoordinatize, int verbose_level)
void print(std::ostream &ost, int len, long int *S)
geometry::grassmann * Grass
void lifting_prepare_function_new(exact_cover *E, int starter_case, long int *candidates, int nb_candidates, groups::strong_generators *Strong_gens, solvers::diophant *&Dio, long int *&col_labels, int &f_ruled_out, int verbose_level)
int incremental_check_function(int len, long int *S, int verbose_level)
induced_actions::action_on_grassmannian * AG
long int rank_subspace(int *M)
long int rank_point(int *v)
apps_geometry::singer_cycle * Sing
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)
void compute(int verbose_level)
int check_function(int len, long int *S, int verbose_level)
void init2(poset_classification::poset_classification_control *Control, int verbose_level)
void unrank_point(int *v, long int a)
layer1_foundations::orthogonal_geometry::orthogonal * O
projective_geometry::projective_space_with_action * PA
geometry::klein_correspondence * Klein
poset_classification::classification_base_case * Base_case
void compute_dual_spread(int *spread, int *dual_spread, int verbose_level)
creates spreads from partial spreads using class exact_cover
solvers::diophant * create_system(int verbose_level)
void find_coloring(solvers::diophant *Dio, int *&col_color, int &nb_colors, int verbose_level)
void init(spread_classify *S, exact_cover *E, long int *starter, int starter_size, int starter_case_number, int starter_number_of_cases, long int *candidates, int nb_candidates, groups::strong_generators *Strong_gens, int f_lex, int verbose_level)
#define Lint_vec_print(A, B, C)
#define Int_vec_print_integer_matrix_width(A, B, C, D, E, F)
#define Int_vec_copy(A, B, C)
#define Int_vec_print(A, B, C)
the orbiter library for the classification of combinatorial objects