/******************************************************************************* ** *A schreier-sims.h A rudimentary Schreier-Sims Julius Jonusas ** James Mitchell ** Wilf A. Wilson ** Michael Young ** ** Copyright (C) 2014-15 - Julius Jonusas, James Mitchell, Wilf A. Wilson, ** Michael Young ** ** This file is free software, see the digraphs/LICENSE. **
*******************************************************************************/
#include"schreier-sims.h"
// C headers #include <stdlib.h> // for NULL #include <string.h> // for memset
// Digraphs package headers #include"digraphs-debug.h"// for DIGRAPHS_ASSERT #include"globals.h"// for HOMOS_STRUCTURE_SIZE #include"safemalloc.h"// for safe_malloc
staticbool perm_fixes_all_base_points(SchreierSims* ss, Perm const x) { for (uint16_t i = 0; i < ss->size_base; i++) { if (x[ss->base[i]] != ss->base[i]) { returnfalse;
}
} returntrue;
}
staticvoid run_ss(SchreierSims* ss) {
uint16_t depth = 0; for (uint16_t j = 0; j < ss->strong_gens[depth]->size; j++) {
Perm x = get_strong_gen_ss(ss, depth, j); if (perm_fixes_all_base_points(ss, x)) { for (uint16_t k = 0; k < ss->degree; k++) { if (k != x[k]) {
add_base_point_ss(ss, k); break;
}
}
}
}
for (uint16_t i = depth + 1; i < ss->size_base + 1; i++) {
uint16_t beta = ss->base[i - 1]; // set up the strong generators for (uint16_t j = 0; j < ss->strong_gens[i - 1]->size; j++) {
Perm x = get_strong_gen_ss(ss, i - 1, j); if (beta == x[beta]) {
add_strong_gen_ss(ss, i, x);
}
} // find the orbit of <beta> under ss->strong_gens[i - 1]
orbit_ss(ss, i - 1, beta);
}
int i = ss->size_base - 1;
while (i >= (int) depth) { bool escape = false; for (uint16_t j = 0; j < ss->size_orbits[i] && !escape; j++) {
uint16_t beta = ss->orbits[i * ss->degree + j]; for (uint16_t m = 0; m < ss->strong_gens[i]->size && !escape; m++) {
Perm x = get_strong_gen_ss(ss, i, m);
prod_perms(
ss->tmp_perm, get_transversal_ss(ss, i, beta), x, ss->degree);
uint16_t betax = x[beta]; if (!eq_perms(
ss->tmp_perm, get_transversal_ss(ss, i, betax), ss->degree)) { bool y = true;
prod_perms(ss->tmp_perm,
ss->tmp_perm,
get_inversal_ss(ss, i, betax),
ss->degree);
uint16_t jj = sift_ss(ss, ss->tmp_perm); if (jj < ss->size_base) {
y = false;
} elseif (!is_one(ss->tmp_perm, ss->degree)) {
y = false; for (uint16_t k = 0; k < ss->degree; k++) { if (k != ss->tmp_perm[k]) {
add_base_point_ss(ss, k); break;
}
}
} if (!y) { for (uint16_t l = i + 1; l <= jj; l++) {
add_strong_gen_ss(ss, l, ss->tmp_perm);
add_gen_orbit_ss(ss, l, ss->tmp_perm); // add generator to <h> to orbit of ss->base[l]
}
i = jj;
escape = true;
}
}
}
} if (!escape) {
i--;
}
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.