/* File cparstab.c. Contains function partnStabilizer, the main function for a programthatmaybeusedtocomputethestabilizerinapermutationgroup ofanorderedpartition.Alsocontainsfunctionsasfollows:
parStabRefnInitialize:Initializesetstabilizerrefinementfunctions. setStabRefine:Arefinementfamilybasedonthesetstabilizer property.
isSetStabReducible: A function to check SSS-reducibility. */
static Partition *knownIrreducible[10] /* Null terminated 0-base list of */
= {NULL}; /* point sets Lambda for which top */ /* partition on UpsilonStack is */ /* known to be SSS_Lambda irred. */
/* Function partnStabilizer. Returns a new permutation group representing the stabilizerinapermutationgroupGofanorderedpartitionLambdaofthe pointsetOmega.ThealgorithmisbasedonFigure9inthepaper
"Permutation group algorithms based on partitions" by the author. */
#define familyParm familyParm_L
PermGroup *partnStabilizer(
PermGroup *const G, /* The containing permutation group. */ const Partition *const Lambda, /* The point set to be stabilized. */
PermGroup *const L) /* A (possibly trivial) known subgroup of the stabilizerinGofLambda.(Anullpointer
designates a trivial group.) */
{
RefinementFamily OOO_G, SSS_Lambda;
RefinementFamily *refnFamList[3];
ReducChkFn *reducChkList[3];
SpecialRefinementDescriptor *specialRefinement[3];
ExtraDomain *extra[1];
/* Function partnImage. Returns a new permutation in a specified group G mapping aspecifiedpartitionLambdatoaspecifiedpartitionXi.Thealgorithmis basedonFigure9inthepaper"Permutationgroupalgorithmsbasedon
partitions" by the author. */
Permutation *partnImage(
PermGroup *const G, /* The containing permutation group. */ const Partition *const Lambda, /* One of the partitions. */ const Partition *const Xi, /* The other partition. */
PermGroup *const L_L, /* A (possibly trivial) known subgroup of the stabilizerinGofLambda.(Anullpointer
designates a trivial group.) */
PermGroup *const L_R) /* A (possibly trivial) known subgroup of the stabilizerinGofXi.(Anullpointer
designates a trivial group.) */
{
RefinementFamily OOO_G, SSS_Lambda_Xi;
RefinementFamily *refnFamList[3];
ReducChkFn *reducChkList[3];
SpecialRefinementDescriptor *specialRefinement[3];
ExtraDomain *extra[1];
/* The function implements the refinement family partnStabRefine (denoted SSS_Lambdainthereference).Thisfamilyconsistsoftheelementary refinementsssS_{Lambda,i,j},whereLambdafixed.(Itisthepartitionto bestabilized)andwhere1<=i,j<=degree.Applicationof sSS_{Lambda,i,j}toUpsilonStacksplitsofffromUpsilonToptheintersection ofthej'thcellofLambdaandthei'thcellofUpsilonTopfromcelliof thetoppartitionofUpsilonStackandpushestheresultingpartitiononto UpsilonStack,unlesssSS_{Lambda,i,j}actstriviallyonUpsilonTop,in whichcaseUpsilonStackremainsunchanged.
/* First check if the refinement acts nontrivially on UpsilonTop. If not
return immediately. */
cellSplits = FALSE; for ( m = startCell[cellToSplit]+1 , last = m -1 + cellSize[cellToSplit] ;
m < last ; ++m ) if ( (Lambda->cellNumber[pointList[m]] == LambdaCellToUse) !=
(Lambda->cellNumber[pointList[m-1]] == LambdaCellToUse) ) {
cellSplits = TRUE; break;
} if ( !cellSplits ) {
split.oldCellSize = cellSize[cellToSplit];
split.newCellSize = 0; return split;
}
/* Now split cell cellToSplit of UpsilonTop. A variation of the splitting
algorithm used in quicksort is applied. */
i = startCell[cellToSplit]-1;
j = last; while ( i < j ) { while ( Lambda->cellNumber[pointList[++i]] != LambdaCellToUse ) ; while ( Lambda->cellNumber[pointList[--j]] == LambdaCellToUse ) ; if ( i < j ) {
EXCHANGE( pointList[i], pointList[j], temp)
EXCHANGE( invPointList[pointList[i]], invPointList[pointList[j]], temp)
}
}
++UpsilonStack->height; for ( m = i ; m < last ; ++m )
UpsilonStack->cellNumber[pointList[m]] = UpsilonStack->height;
startCell[UpsilonStack->height] = i;
parent[UpsilonStack->height] = cellToSplit;
cellSize[UpsilonStack->height] = last - i;
cellSize[cellToSplit] -= (last - i);
split.oldCellSize = cellSize[cellToSplit];
split.newCellSize = cellSize[UpsilonStack->height]; return split;
}
/* The function isPartnStabReducible checks whether the top partition on a givenpartitionstackisSSS_Lambda-reducible,whereLambdaisafixed orderedpartition.Ifso,itreturnsapairconsistingofarefinement actingnontriviallyonthetoppartitionandapriority.Otherwiseit returnsastructureoftypeRefinementPriorityPairinwhichthepriority fieldisIRREDUCIBLE.Assuming thatareducingrefinementisfound,the(reverse)priorityissetvery low(1).Notethat,oncethisfunctionreturnsnegativeinthepriority fieldonce,itwilldosoonallsubsequentcalls.(Thestaticvariable knownIrreducibleissettotrueinthissituation.)Again,noattempt
at efficiency has been made. */
/* Check that the refinement mapping really is partnStabRefn, as required. */ if ( family->refine != partnStabRefine )
ERROR( "isPartnStabReducible", "Error: incorrect refinement mapping");
/* If the top partition has previously been found to be SSS-irreducible, we
return immediately. */ for ( i = 0 ; knownIrreducible[i] && knownIrreducible[i] != Lambda ; ++i )
; if ( knownIrreducible[i] ) {
reducingRefn.priority = IRREDUCIBLE; return reducingRefn;
}
/* If we reach here, the top partition has not been previously found to be SSS-irreducible.Wecheckeachcellinturntoseeifitintersectsat leasttwocellsofLambda.Ifsuchacellisfound,wereturn
immediately. */ for ( cellNo = 1 ; cellNo <= UpsilonStack->height ; ++cellNo ) { for ( position = startCell[cellNo]+1 ; position < startCell[cellNo] +
cellSize[cellNo] ; ++position ) if ( Lambda->cellNumber[pointList[position]] !=
Lambda->cellNumber[pointList[position-1]] ) {
reducingRefn.refn.family = (RefinementFamily *)(family);
reducingRefn.refn.refnParm[0].intParm = cellNo;
reducingRefn.refn.refnParm[1].intParm =
Lambda->cellNumber[pointList[position]];
reducingRefn.priority = 1; return reducingRefn;
}
}
/* If we reach here, we have found the top partition to be SSS_Lambda
irreducible, so we add Lambda to the list knownIrreducible and return. */ for ( i = 0 ; knownIrreducible[i] ; ++i )
; if ( i < 9 ) {
knownIrreducible[i] = Lambda;
knownIrreducible[i+1] = NULL;
} else
ERROR( "isPartnStabReducible", "Number of point sets exceeded max of 9.")
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.