16namespace layer5_applications {
17namespace apps_combinatorics {
20static void hall_system_print_set(std::ostream &ost,
int len,
long int *S,
void *data);
21static void hall_system_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);
69 int verbose_level = 1;
70 int f_v = (verbose_level >= 1);
113 cout <<
"hall_system::freeself done" << endl;
119 int argc,
const char **argv,
123 int f_v = (verbose_level >= 1);
128 cout <<
"hall_system_classify::init" << endl;
143 sprintf(str,
"hall_%d",
n);
147 cout <<
"hall_system_classify::init n=" <<
n << endl;
148 cout <<
"hall_system_classify::init nb_pairs=" <<
nb_pairs << endl;
149 cout <<
"hall_system_classify::init nb_pairs2=" <<
nb_pairs2 << endl;
150 cout <<
"hall_system_classify::init N0=" <<
N0 << endl;
151 cout <<
"hall_system_classify::init N=" <<
N << endl;
152 cout <<
"hall_system_classify::init nb_blocks_overall=" <<
nb_blocks_overall << endl;
153 cout <<
"hall_system_classify::init nb_blocks_needed=" <<
nb_blocks_needed << endl;
154 cout <<
"hall_system_classify::init nb_orbits_needed=" <<
nb_orbits_needed << endl;
162 cout <<
"hall_system_classify::init before computing triples" << endl;
164 for (i = 0; i <
N; i++) {
166 cout <<
"triple " << i <<
" / " <<
N <<
":" << endl;
176 cout <<
"sorted:" << endl;
177 for (i = 0; i <
N; i++) {
185 cout <<
"hall_system_classify::init "
186 "before A->init_permutation_group" << endl;
189 int f_no_base =
FALSE;
195 cout <<
"hall_system_classify::init "
196 "after A->init_permutation_group" << endl;
200 cout <<
"hall_system_classify::init "
201 "creating Strong_gens_Hall_reflection" << endl;
213 cout <<
"hall_system_classify::init "
214 "creating Strong_gens_normalizer" << endl;
223 cout <<
"hall_system_classify::init "
224 "before Strong_gens->create_sims" << endl;
228 cout <<
"hall_system_classify::init "
229 "after Strong_gens->create_sims" << endl;
234 cout <<
"hall_system_classify::init "
235 "before A_on_triples->induced_action_on_sets" << endl;
239 FALSE , verbose_level - 1);
241 cout <<
"hall_system_classify::init "
242 "after A2->induced_action_on_sets" << endl;
246 cout <<
"hall_system_classify::init "
247 "before orbits_on_triples" << endl;
251 cout <<
"hall_system_classify::init "
252 "after orbits_on_triples" << endl;
258 cout <<
"hall_system_classify::init "
259 "before Poset->init_subset_lattice" << endl;
265 cout <<
"hall_system_classify::init "
266 "after Poset->init_subset_lattice" << endl;
269 hall_system_early_test_function,
282 cout <<
"hall_system_classify::init before PC->initialize_and_allocate_root_node" << endl;
286 cout <<
"hall_system_classify::init after PC->initialize_and_allocate_root_node" << endl;
291 int f_use_invariant_subset_if_available =
TRUE;
293 int schreier_depth = INT_MAX;
300 cout <<
"hall_system_classify::init_generator "
301 "before PC->main" << endl;
303 depth_completed =
PC->
main(t0, schreier_depth,
304 f_use_invariant_subset_if_available,
308 cout <<
"hall_system_classify::init_generator "
309 "after PC->main" << endl;
311 cout <<
"hall_system_classify returns "
312 "depth_completed=" << depth_completed << endl;
315 cout <<
"hall_system_classify::init done" << endl;
321 int f_v = (verbose_level >= 1);
325 cout <<
"hall_system_classify::orbits_on_triples" << endl;
335 cout <<
"hall_system_classify::orbits_on_triples "
336 "reading orbits from file "
351 cout <<
"hall_system_classify::orbits_on_triples "
352 "read orbits from file "
359 cout <<
"hall_system_classify::orbits_on_triples "
360 "computing orbits of the selected group" << endl;
368 cout <<
"hall_system_classify::orbits_on_triples "
369 "computing orbits done" << endl;
371 <<
" orbits of the selected group on lines" << endl;
384 cout <<
"Orbits_on_triples:" << endl;
392 cout <<
"hall_system_classify::orbits_on_triples "
393 "created action on orbits of degree "
400 cout <<
"hall_system_classify::orbits_on_triples done" << endl;
409 int orb, f, l, j, t, a;
412 for (i = 0; i < len; i++) {
416 for (i = 0; i < len; i++) {
422 for (j = 0; j < l; j++ ) {
425 for (a = 0; a < 3; a++) {
454 for (i = 0; i < 3; i++) {
455 T[i] = 2 * set[i] + binary[i];
474 for (i = 0; i < 3; i++) {
475 T1[i] = 2 * set[i] + binary[i];
476 T2[i] = 2 * set[i] + 1 - binary[i];
481 long int *candidates,
int nb_candidates,
482 long int *good_candidates,
int &nb_good_candidates,
486 int f_v = (verbose_level >= 1);
487 int f_vv = (verbose_level >= 2);
495 cout <<
"hall_system_classify::early_test_func checking set ";
498 cout <<
"candidate set of size " << nb_candidates <<
":" << endl;
508 for (i = 0; i < len; i++) {
514 for (j = 0; j < l; j++ ) {
517 for (a = 0; a < 3; a++) {
519 for (b = a + 1; b < 3; b++) {
520 p = Combi.
ij2k(T[a], T[b],
nm1);
527 cout <<
"hall_system::early_test_func "
528 "pair_covering before testing:" << endl;
529 cout <<
"row_sum: " << endl;
532 cout <<
"pair_covering: " << endl;
538 nb_good_candidates = 0;
540 for (j = 0; j < nb_candidates; j++) {
549 cout <<
"Testing candidate " << j <<
" = "
550 << candidates[j] <<
" which is ";
551 for (h = 0; h < l; h++ ) {
563 for (h = 0; h < l; h++ ) {
566 for (a = 0; a < 3; a++) {
569 cout <<
"bad because of row sum "
570 "in row " << T[a] << endl;
582 for (h = 0; h < l; h++ ) {
585 for (a = 0; a < 3; a++) {
586 for (b = a + 1; b < 3; b++) {
587 p = Combi.
ij2k(T[a], T[b],
nm1);
590 cout <<
"bad because of pair covering in pair "
591 << T[a] <<
"," << T[b] <<
"=" << p << endl;
610 cout <<
"Testing candidate " << j <<
" = "
611 << candidates[j] <<
" is good" << endl;
613 good_candidates[nb_good_candidates++] = candidates[j];
626static void hall_system_print_set(ostream &ost,
int len,
long int *S,
void *data)
631 H->
print(ost, S, len);
635static void hall_system_early_test_function(
long int *S,
int len,
636 long int *candidates,
int nb_candidates,
637 long int *good_candidates,
int &nb_good_candidates,
638 void *data,
int verbose_level)
640 hall_system_classify *H = (hall_system_classify *) data;
641 int f_v = (verbose_level >= 1);
644 cout <<
"hall_system_early_test_function for set ";
648 H->early_test_func(S, len,
649 candidates, nb_candidates,
650 good_candidates, nb_good_candidates,
653 cout <<
"hall_system_early_test_function done" << endl;
a collection of combinatorial functions
void unrank_k_subset(int rk, int *set, int n, int k)
int ij2k(int i, int j, int n)
a collection of functions related to sorted vectors
void lint_vec_heapsort(long int *v, int len)
a collection of functions related to file io
long int file_size(std::string &fname)
interface to system functions
a permutation group in a fixed action.
void init_symmetric_group(int degree, int f_no_base, int verbose_level)
void induced_action_on_orbits(action *old_action, groups::schreier *Sch, int f_play_it_safe, int verbose_level)
void induced_action_on_sets(action &old_action, groups::sims *old_G, int nb_sets, int set_size, long int *sets, int f_induce_action, int verbose_level)
Schreier trees for orbits of groups on points.
void write_to_file_binary(std::ofstream &fp, int verbose_level)
void read_from_file_binary(std::ifstream &fp, int verbose_level)
void init_generators(data_structures_groups::vector_ge &generators, int verbose_level)
void init(actions::action *A, int verbose_level)
void print(std::ostream &ost)
a strong generating set for a permutation group with respect to a fixed action
void init(actions::action *A)
void normalizer_of_a_Hall_reflection(int nb_pairs, int °ree, int verbose_level)
sims * create_sims(int verbose_level)
void Hall_reflection(int nb_pairs, int °ree, int verbose_level)
schreier * orbits_on_points_schreier(actions::action *A_given, int verbose_level)
data_structures_groups::vector_ge * gens
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)
a poset with a group action on it
void * print_function_data
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(* print_function)(std::ostream &ost, int len, long int *S, void *data)
classification of Hall systems
actions::action * A_on_orbits
groups::strong_generators * Strong_gens_normalizer
actions::action * A_on_triples
poset_classification::poset_classification_control * Control
void init(int argc, const char **argv, int n, int depth, int verbose_level)
void unrank_triple(long int *T, int rk)
void orbits_on_triples(int verbose_level)
groups::strong_generators * Strong_gens_Hall_reflection
void unrank_triple_pair(long int *T1, long int *T2, int rk)
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 print(std::ostream &ost, long int *S, int len)
poset_classification::poset_with_group_action * Poset
poset_classification::poset_classification * PC
groups::schreier * Orbits_on_triples
std::string fname_orbits_on_triples
#define Int_vec_zero(A, B)
#define Lint_vec_print(A, B, C)
#define Int_vec_print(A, B, C)
the orbiter library for the classification of combinatorial objects