/* Copyright (C) 1992 by Jeffrey S. Leon. This software may be used freely for educational and research purposes. Any other use requires permission
from the author. */
/* Main program for group intersection command, which may be used compute the intersection of two permutation groups G and E. The format of the command is:
inter <options> <permGroup1> <permGroup2> <intersection>
where the meaning of the parameters is as follows:
<permGroup>: The name of the file containing the permutation group G, or the Cayley library name in which the permutation group G is defined. Except in the case of a Cayley library, a file type of GRP is appended. <pointSet>: The name of the file containing the point set Lambda, or the Cayley library name in which the point set Lambda is defined. Except in the case of a Cayley library, a file type of PTS is appended. <stabGroup>: The name of the file in which the set stabilizer G_Lambda is written, or the Cayley library name to which the definition of G_Lambda is written. Except in the case of a Cayley library, a file type of PTS is appended.
The options are as follows:
-a If the output file exists, it will be appended to rather than overwritten. (A Cayley library is always appended to rather than overwritten.)
-b:<int> Base change in the subgroup being computed will be performed at levels fm, fm+1,...,fm+<int>-1 only, where fm is the level of the first base point (of the subgroup) moved by the current permutation. Values below 1 will be raised to 1; those above the base size will be reduced to the base size.
-c Compress the group G after an R-base has been constructed. This saves a moderate amount of memory at the cost of relatively little CPU time, but the group (in memory) is effectively destroyed.
-crl:<name> The definition of the group G and point set Lambda should be read from Cayley library <permGroup> in library file <name>.
-cwl:<name> The definition for the group G_Lambda should be written to Cayley library <stabGroup> library file <name>.
-g:<int> The maximum number of strong generators for the containing group G. If, after construction of a base and strong generating set for G, the number of strong generators is less than this number, additional strong generators will be added, chosen to reduce the length of the coset representatives (as words). A larger value may increase speed of computation slightly at the cost of extra space. If, after construction of the base and strong generating set, the number of strong generators exceeds this number, at present strong generators are not removed.
-gn:<str> (Set stabilizer only). The generators for the newly-created group created are given names <str>01, <str>02, ... . If omitted, the new generators are unnamed.
-i The generators of <stabGroup> are to be written in image format.
-n:<name> The name for the set stabilizer or coset rep being computed. (Default: the file name <stabGroup> -- file type omitted)
-q As the computation proceeds, writing of information about the current state to standard output is suppressed.
-s:<name> A known subgroup of the set stabilizer being computed. (Default: no subgroup known)
-r:<int> During base change, if insertion of a new base point expands the size of the strong generating set above <int> gens (not counting inverses), redundant strong generators are trimmed from the strong generating set. (Default 25).
-t Upon conclusion, statistics regarding the number of nodes of the backtrack search tree traversed is written to the standard output.
-v Verify that all files were compiled with the same compile- time parameters and stop.
-w:<int> For set or partition image computations in which the sets or partitions turn out to be equivalent, a permutation mapping one to the other is written to the standard output, as well as a disk file, provided the degree is at most <int>. (The option is ignored if -q is in effect.) Default: 100
-x:<int> The ideal size for basic cells is set to <int>.
-z Subject to the restrictions imposed by the -b option above, check Prop. 8.3 in "Permutation group algorithms based on partitions".
If a base for <permGroup> is not available, one will be computed. In any the base and strong generating set for <permGroup> will be changed during the computation.
The return code for set or partition stabilizer computations is as follows: 0: computation successful, 15: computation terminated due to error. The return code for set or partition image computations is as follows: 0: computation successful; sets or partitions are not equivalent, 1: computation successful; sets or partitions are equivalent, 15: computation terminated due to error.
*/
/* Provide usage information if no options are specified. */ if ( argc == 1 ) {
printf( "\nUsage: inter [options] permGroup1 permGroup2 intersection\n"); return 0;
}
/* Check for limits option. If present in position i (i as above) give
limits and return. */ if ( strcmp( argv[1], "-l") == 0 || strcmp( argv[1], "-L") == 0 ) {
showLimits(); return 0;
} /* Check for verify option. If present in position i (i as above) perform
verify (Note verifyOptions terminates program). */ if ( strcmp( argv[1], "-v") == 0 || strcmp( argv[1], "-L") == 0 )
verifyOptions();
if ( argc < 4 )
ERROR( "main (inter)", "Too few parameters.")
/* Check for exactly 3 parameters following options. */ for ( optionCountPlus1 = 1 ; optionCountPlus1 < argc &&
argv[optionCountPlus1][0] == '-' ; ++optionCountPlus1 )
;
if ( argc - optionCountPlus1 != 3 ) {
ERROR( "main (inter)", "Exactly 3 non-option parameters are required.") exit(ERROR_RETURN_CODE);
}
/* Compute maximum degree and word length. */
options.maxWordLength = 200 + 5 * options.maxBaseSize;
options.maxDegree = MAX_INT - 2 - options.maxBaseSize;
/* Compute names for files and name for intersection. */
parseLibraryName( argv[optionCountPlus1], prefix, suffix,
permGroup1FileName, permGroup1LibraryName);
parseLibraryName( argv[optionCountPlus1+1], prefix, suffix,
permGroup2FileName, permGroup2LibraryName);
parseLibraryName( argv[optionCountPlus1+2], "", "",
outputFileName, outputLibraryName); if ( outputObjectName[0] == '\0' )
strncpy( outputObjectName, outputLibraryName, MAX_NAME_LENGTH+1); if ( knownSubgroupSpecifier[0] != '\0' )
parseLibraryName( knownSubgroupSpecifier, prefix, suffix,
knownSubgroupFileName, knownSubgroupLibraryName);
/* Read in the containing group G and the second group E, and verify that
the degrees are the same. */
G = readPermGroup( permGroup1FileName, permGroup1LibraryName, 0, "Generate");
E = readPermGroup( permGroup2FileName, permGroup2LibraryName, G->degree, "Generate");
/* Read in the known subgroup, if present. */ if ( knownSubgroupSpecifier[0] )
L = readPermGroup( knownSubgroupFileName, knownSubgroupLibraryName,
G->degree, "Generate");
/* Compute maximum base change level if not specified as option. */ if ( options.maxBaseChangeLevel == UNKNOWN )
options.maxBaseChangeLevel =
isDoublyTransitive(G) ?
( 1 + options.maxBaseSize * depthGreaterThan(G,4) ) :
( depthGreaterThan(G,5) + options.maxBaseSize * depthGreaterThan(G,6));
/* Compute the set or partition stabilizer or coset rep and write it out. */ if ( options.inform ) {
printf( "\n\n Group Intersection Program: " "Groups %s and %s\n\n", G->name, E->name); if ( L )
printf( "\nKnown Subgroup: %s\n", L->name);
}
options.groupOrderMessage = "Intersection";
G_pP = intersection( G, E, L);
strcpy( G_pP->name, outputObjectName);
G_pP->printFormat = (imageFormatFlag ? imageFormat : cycleFormat);
sprintf( comment, "The intersection of permutation groups %s and %s.",
G->name, E->name);
writePermGroup( outputFileName, outputLibraryName, G_pP, comment);
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.