/* This function may be used to determine the total number of generators, and the number of known involutory generators, in a permutation group. The function returns the total number of generators and sets the second parameter to the number of involutory generators. Note the function assumes inverse generators are present as permutations on the linked list of
generators, unless involCount == NULL. */
Unsigned genCount( const PermGroup *const G, /* The permutation group. */ Unsigned *involCount) /* If nonnull, set to number of
involutory generators. */
{ Unsigned totalCount = 0, tempInvolCount = 0;
Permutation *gen;
for ( gen = G->generator ; gen ; gen = gen->next ) {
++totalCount; if ( isInvolution( gen) )
++tempInvolCount;
}
/* The function isFixedPointOf( G, level, point) returns true if the point
point is a fixed point of G^(level), and it returns false otherwise. */
BOOLEAN isFixedPointOf( const PermGroup *const G, /* A group with known base and sgs. */ constUnsigned level, /* The level mentioned above. */ constUnsigned point) /* Check if this point is a fixed point. */
{
Permutation *gen;
for ( gen = G->generator ; gen ; gen = gen->next ) if ( gen->level >= level && gen->image[point] != point ) returnFALSE;
/* This function returns true if a permutation group has order at least 2 and
false if it has order 1. A base/sgs are not needed. */
BOOLEAN isNontrivialGroup(
PermGroup *G) /* The permutation group to test. */
{
Permutation *gen; for ( gen = G->generator ; gen ; gen = gen->next ) if ( !isIdentity( gen) ) returnTRUE; returnFALSE;
}
/* This function returns the level of a permutation relative to the sequence of points in the array base of a permutation group. (The array need not actually be a base.) If the permutation fixes the "base", the
value returned is 1+baseSize. */
Unsigned levelIn(
PermGroup *G, /* The perm group (base and baseSize filled in). */
Permutation *perm) /* The permutation whose level is returned. */
{ Unsigned level; for ( level = 1 ; level <= G->baseSize && perm->image[G->base[level]] ==
G->base[level] ; ++level )
; return level;
}
/* This function returns true if a given permutation known to lie in a group with known base is the identity, and false otherwise. The function is
fast, as the permutation need be applied only to the base. */
BOOLEAN isIdentityElt(
PermGroup *G, /* The permutation group (base known). */
Permutation *perm) /* The permutation known to lie in G. */
{ Unsigned i;
if ( !IS_SYMMETRIC(G) ) { for ( i = 1 ; i <= G->baseSize && perm->image[G->base[i]] ==
G->base[i] ; ++i )
; return i > G->baseSize;
} else { for ( i = 1 ; i <= G->degree && perm->image[i] == i ; ++i )
; return i > G->degree;
}
}
/* This function returns true if a given permutation known to lie in a group with known base is an involution, and false otherwise. The function is
fast, as the permutation need be applied only to the base. */
BOOLEAN isInvolutoryElt(
PermGroup *G, /* The permutation group (base known). */
Permutation *perm) /* The permutation known to lie in G. */
{ Unsigned i; for ( i = 1 ; i <= G->baseSize && perm->image[perm->image[G->base[i]]] ==
G->base[i] ; ++i )
; return i > G->baseSize;
}
/* The function fixesBasicOrbit( G, level, perm) returns true if permutation perm fixes (setwise) the level'th basic orbit or permutation group G and
returns false otherwise. Note: The basic orbit need not be correct. */
/* This function constructs a singly linked list of all the generators of a permutation group essential at a specified level, using the xNext field of the generating permutations. It returns a pointer to the head permutation on the list. The field essential of each generator must be
filled in. */
Permutation *linkEssentialGens(
PermGroup *G, /* The permutation group. */ Unsigned level) /* Generators essential at this level are
linked. */
{
Permutation *listHeader = NULL, *previousGen = NULL, *gen;
for ( gen = G->generator ; gen ; gen = gen->next ) if ( ESSENTIAL_AT_LEVEL(gen,level) ) { if ( previousGen )
previousGen->xNext = gen; else
listHeader = gen;
gen->xNext = NULL;
previousGen = gen;
}
/* This function assigns a name to a generator for a permutation group. The name chosen is <options.genNamePrefix>zz, where zz is the 2-digit ASCII representation of the smallest positive integer not currently in use for a generator name. However, if <options.genNamePrefix> is *, then the name will be a single letter, the first not currently in use, or two identical letters, if all single letters are in use. The function terminates with
an error message if all possible names are already in use. */
/* This function tests rather the "depth" of a group G exceeds a specified integral value comparisonDepth. Here the depth of G is defined to be log(|G|) / log(degree(G)). The function returns true if the depth of G exceeds comparisonDepth and false otherwise. Overflow should occur only if (degree(G))^comparisonDepth is out of bounds. If the NOFLOAT
option is given, the computation is approximate. */
BOOLEAN depthGreaterThan( const PermGroup *const G, constUnsigned comparisonDepth)
{ int i, j;
/* This function may be used to conjugate one permutation by another. The permutation perm is replaced by conjPerm^-1 * perm * conjPerm. It is
assumed that both permutations have the same degree. */
/* This function may be used to conjugate a permutation group by a permutation. The permutation group G is replaced by conjPerm^-1 * G * conjPerm. It is assumed that the group and the permutation have the same degree. The complete The completeOrbit, orbNumberOfPt, and startOfOrbitNo fields are
not currently handled, nor are omega and invOmega. */
/* The function checkConjugacyInGroup( G, e, f, conjPerm) returns true if permutation conjPerm in G conjugates permutation e in group G to permutation f in G, that is, if e ^ conjPerm = f, or equivalently, e * conjPerm = conjPerm * f. It is assumed G has a base and strong
generating set. */
/* The function isElementOf( perm, group) returns true is the permutation perm lies in the group G and false otherwise. The group must already have a base and strong generating set. This procedure is not particularly efficient: It does a great deal of unnecessary multiplications
if containment turns out not to hold. */
/* Check that the group has a base. If not, give error message. */ if ( group->base == NULL)
ERROR1s( "isElementOf", "Group ", group->name, " must have a base.")
/* Make a copy of permutation perm. */
perm1 = copyOfPermutation( perm);
/* Now attempt to factor perm1. If process breaks down because the appropriate point is not in the required basic orbit, return false
immediately. */ for ( level = 1 ; level <= group->baseSize ; ++level) {
gamma = perm1->image[group->base[level]]; while ( (gen = group->schreierVec[level][gamma]) != NULL &&
gen != FIRST_IN_ORBIT ) {
rightMultiplyInv( perm1, gen);
gamma = gen->invImage[gamma];
} if ( gen == NULL ) {
deletePermutation( perm1); returnFALSE;
}
}
/* If all the appropriate points lie in the correct basic orbits, return
true if and only if the remaining permutation is the identity. */
returnValue = isIdentity( perm1);
deletePermutation( perm1); return returnValue;
}
/* The function isSubgroupOf( subGroup, group) returns true if subGroup is a subgroup of group and returns false otherwise. The degrees of the groups must be equal. It is not too efficient because it checks all (possibly strong) generators of subGroup. Note group must have a
base and strong generating set, but subGroup need not. */
/* Check that the group has a base. If not, give error message. */ if ( group->base == NULL)
ERROR1s( "isElementOf", "Group ", group->name, " must have a base.")
/* Now check each generator of subGroup for containment in group. */ for ( gen = subGroup->generator ; gen ; gen = gen->next ) if ( !isElementOf(gen,group) ) returnFALSE; returnTRUE;
}
/* The function isNormalizedBy( group, nGroup) returns true if group is normalized by nGroup and returns false otherwise. The degrees of the groups must be equal. It is inefficient because it checks all (possibly strong) generators of group conjugated by all (possibly strong) generators of nGroup and, more importantly, it does NOT take advantage of any prior knowledge that group is a subgroup of nGroup. Note group must
have a base and strong generating set, but nGroup need not. */
/* Check that the group has a base. If not, give error message. */ if ( group->base == NULL)
ERROR1s( "isElementOf", "Group ", group->name, " must have a base.")
/* Now check each conjugage of each generator of group for containment in
nGroup. */ for ( gen = group->generator ; gen ; gen = gen->next ) {
involFlag = isInvolution( gen); if ( involFlag && perm->invImage != perm->image ) {
freeIntArrayDegree( perm->invImage);
perm->invImage = perm->image;
} elseif ( !involFlag && perm->invImage == perm->image )
perm->invImage = allocIntArrayDegree(); for ( nGen = nGroup->generator ; nGen ; nGen = nGen->next ) { for ( pt = 1 ; pt <= group->degree ; ++pt )
perm->image[nGen->image[pt]] = nGen->image[gen->image[pt]]; if ( !involFlag ) for ( pt = 1 ; pt <= group->degree ; ++pt )
perm->invImage[perm->image[pt]] = pt; if ( !isElementOf(perm,group) ) {
freePermutation( perm); returnFALSE;
}
}
}
/* The function isCentralizedBy( group, cGroup) returns true if group is centralized by cGroup and returns false otherwise. The degrees of the groups must be equal. It is inefficient because it checks all pairs of (possibly strong) generators from the two groups and, more importantly, it does NOT take advantage of any prior knowledge of the bases of the two
groups (as would be possible when one is contained in the other). */
/* Check equality of degrees. */ if ( group->degree != cGroup->degree )
ERROR( "isCentralizedBy", "Groups do not have same degree.")
/* Check each generator of group commutes with each generator of cGroup. */ for ( gen = group->generator ; gen ; gen = gen->next ) for ( cGen = cGroup->generator ; cGen ; cGen = cGen->next ) for ( pt = 1 ; pt <= group->degree ; ++pt ) if ( cGen->image[gen->image[pt]] != gen->image[cGen->image[pt]] ) returnFALSE;
/* The function isBaseImage( G, image), where G is a permutation group having a base and strong generating set and where image is an array of points of length G->baseSize, returns true if there exists a permutation in G mapping
the base to the sequence image, and returns false otherwise. */
/* The function reduceWrtGroup( G, h, reductionLevel), where G is a permutation group with base and strong generating set and where h is a permutation (with inverse image) replaces h by h u_1[d_1]^-1 u_2[d_2]^-1 u_j-1[d_j-1]^-1, where the new h fixes the first j-1 base points of G, and where the new h maps the j'th base point outside the j'th basic orbit, or where j = G->baseSize+1. Unless reductionLevel = NULL, it sets *reductionLevel
to j. */
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 und die Messung sind noch experimentell.