/* 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 design/matrix automorphism group and isomorphism programs. The formats for the commands are:
where the meaning of the parameters is as follows:
<design>: The design whose automorphism group is to be computed. <autoGroup>: Set to the automorphism group of <design>. Depending on options, will be set to a permutation group on the set of a file type of GRP is appended. <design1>: The first of the two designs to be checked for isomorphism. <design2>: The second of the two designs to be checked for isomorphism. <isoPerm>: Set to a permutation mapping <design1> to <design2>, if one exists. Not created otherwise. Depending on the options, this will be set to a permutation on points only or on points The name of the file in which the set stabilizer G_Lambda and blocks.
The options are as follows:
-code:<c> Finds the automorphism group of code c, assuming that it is included in the group of the design. -codes:<c>,<d> Checks isomorphism of codes <c> and <d>, assuming iso is in effect, and assuming any isomorphism must map <design1> to <design2>.
-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)
-pb Produces permutations on points and blocks. Otherwise the automorphism group or isomorphism are given on points only.
-cv Applicable to codes only. Causes the automorphism group or isomorphism to be written as a permutation group on coordinates and invariant vectors, rather than coordinates only.
-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".
-m Read design in incidence matrix format: rows = point, cols = blocks.
The return code for the design group algorithm is as follows: 0: computation successful, 15: computation terminated due to error. The return code for the design isomorphism algorithm is as follows: 0: computation successful; designs isomorphic, 1: computation successful; designs not isomorphic, 15: computation terminated due to error.
*/
/* Check whether the first parameters are iso, code, or matrix.
Set the computation type. */
j = 0; for ( i = 1 ; i <= 2 && i < argc ; ++i ) {
strncpy( tempArg, argv[i], 8);
tempArg[7] = '\0';
lowerCase( tempArg); if ( strcmp( tempArg, "-iso") == 0 )
j |= 4; elseif ( strcmp( tempArg, "-matrix") == 0 )
j |= 1; elseif ( strcmp( tempArg, "-code") == 0 )
j |= 2; else break;
} switch( j ) { case 0: computationType = DESIGN_AUTO; break; case 1: computationType = MATRIX_AUTO; pbFlag = TRUE; break; case 2: computationType = CODE_AUTO; codeFlag = TRUE; break; case 4: computationType = DESIGN_ISO; imageFlag = TRUE; break; case 5: computationType = MATRIX_ISO; imageFlag = TRUE; pbFlag = TRUE; break; case 6: computationType = CODE_ISO; imageFlag = TRUE; codeFlag = TRUE; break; default: ERROR( "main (desauto)", "Invalid options"); break;
}
startOptions = i;
/* Provide help if no arguments are specified. Note i and j must be as
described above. */ if ( startOptions == argc ) { switch( computationType ) { case DESIGN_AUTO:
printf( "\nUsage: desauto [options] design autoGroup\n"); break; case MATRIX_AUTO:
printf( "\nUsage: matauto [options] matrix autoGroup\n"); break; case CODE_AUTO:
printf( "\nUsage: codeauto [options] code invarVectorss autoGroup\n"); break; case DESIGN_ISO:
printf( "\nUsage: desiso [options] design1 design2 isoPerm\n"); break; case MATRIX_ISO:
printf( "\nUsage: matiso [options] matrix1 matrix2 isoPerm\n"); break; case CODE_ISO:
printf( "\nUsage: codeiso [options] code1 code2 invarVectors1 invarVectors2 \n"); break;
} return 0;
}
/* Check for limits option. If present in position startOptions give
limits and return. */ if ( startOptions < argc && (strcmp( argv[startOptions], "-l") == 0 ||
strcmp( argv[startOptions], "-L") == 0) ) {
showLimits(); return 0;
} /* Check for verify option. If present in position startOptions, perform
verify. (Note verifyOptions terminates program). */ if ( startOptions < argc && (strcmp( argv[startOptions], "-v") == 0 ||
strcmp( argv[startOptions], "-V") == 0) )
verifyOptions();
/* Check for exactly 2 (design or matrix group), 3 (code group or design
or matrix iso), or 4 (code iso ) parameters following options. */ for ( optionCountPlus1 = startOptions ; optionCountPlus1 < argc &&
argv[optionCountPlus1][0] == '-' ; ++optionCountPlus1 )
;
/* Read in the known subgroups, if present, and the codes, if present. */ switch ( computationType ) { case DESIGN_AUTO: case MATRIX_AUTO: case CODE_AUTO: if ( knownSubgroupSpecifier[0] )
L = readPermGroup( knownSubgroupFileName, knownSubgroupLibraryName,
degree, "Generate"); break; case DESIGN_ISO: case MATRIX_ISO: case CODE_ISO: if ( knownSubgroup_L_Specifier[0] )
L_L = readPermGroup( knownSubgroup_L_FileName,
knownSubgroup_L_LibraryName, degree, "Generate"); if ( knownSubgroup_R_Specifier[0] )
L_R = readPermGroup( knownSubgroup_R_FileName,
knownSubgroup_R_LibraryName, degree, "Generate"); break;
}
/* Compute maximum base change level if not specified as option ??????. */ if ( options.maxBaseChangeLevel == UNKNOWN )
options.maxBaseChangeLevel = 0;
/* Compute the automorphism group or check isomorphism, and write out
the group or isomorphism permutation. */ switch ( computationType ) { case DESIGN_AUTO: case MATRIX_AUTO: case CODE_AUTO: if ( options.inform ) { switch ( computationType ) { case DESIGN_AUTO:
printf( "\n\n Design Automorphism Group Program: " "Design %s\n\n", matrix->name);
sprintf( comment, "The automorphism group of design %s.",
matrix->name);
options.groupOrderMessage = "Design automorphism group"; break; case MATRIX_AUTO: if ( monomialFlag ) {
printf( "\n\n Matrix Monomial Group Program: " "Matrix %s\n\n", matrix->name);
sprintf( comment, "The monomial group of matrix %s.",
matrix->name);
options.groupOrderMessage = "Matrix monomial automorphism group";
} else {
printf( "\n\n Matrix Automorphism Group Program: " "Matrix %s\n\n", matrix->name);
sprintf( comment, "The automorphism group of matrix %s.",
matrix->name);
options.groupOrderMessage = "Matrix automorphism group";
} break; case CODE_AUTO:
printf( "\n\n Code Automorphism Group Program: " "Code %s, Invariant set %s\n\n", C->name, matrix->name);
sprintf( comment, "The automorphism group of code %s.",
C->name);
options.groupOrderMessage = "Code automorphism group"; break; default: /* can not actually reach here, silence a compiler warning */ break;
} if ( L )
printf( "\nKnown Subgroup: %s\n", L->name);
printf( "\n");
} if ( (computationType == MATRIX_AUTO && matrix->setSize > 2) ||
(computationType == CODE_AUTO && C->fieldSize > 2) )
A = matrixAutoGroup( matrix, L, C, monomialFlag); else
A = designAutoGroup( matrix, L, C);
strcpy( A->name, outputObjectName);
A->printFormat = (imageFormatFlag ? imageFormat : cycleFormat); if ( pbFlag ) if ( monomialFlag )
writePermGroupRestricted( outputFileName, outputLibraryName, A,
comment, matrix->numberOfCols); else
writePermGroup( outputFileName, outputLibraryName, A, comment); else
writePermGroupRestricted( outputFileName, outputLibraryName, A,
comment, matrix->numberOfRows); break; case DESIGN_ISO: case MATRIX_ISO: case CODE_ISO: if ( options.inform ) { switch ( computationType ) { case DESIGN_ISO:
printf( "\n\n Design Isomorphism Program: " "Designs %s and %s\n\n", matrix_L->name, matrix_R->name);
sprintf( comment, "An isomorphism from design %s to design %s.",
matrix_L->name, matrix_R->name);
options.cosetRepMessage = "The designs are isomorphic. An isomorphism is:";
options.noCosetRepMessage = "The designs are not isomorphic."; break; case MATRIX_ISO: if ( monomialFlag ) {
printf( "\n\n Matrix Monomial Isomorphism Program: " "Matrices %s and %s\n\n", matrix_L->name, matrix_R->name);
sprintf( comment, "An monomial isomorphism from matrix %s to matrix %s.",
matrix_L->name, matrix_R->name);
options.cosetRepMessage = "The matrices are monomially isomorphic. An isomorphism is:";
options.noCosetRepMessage = "The designs are not monomially isomorphic.";
} else {
printf( "\n\n Matrix Isomorphism Program: " "Matrices %s and %s\n\n", matrix_L->name, matrix_R->name);
sprintf( comment, "An isomorphism from matrix %s to matrix %s.",
matrix_L->name, matrix_R->name);
options.cosetRepMessage = "The matrices are isomorphic. An isomorphism is:";
options.noCosetRepMessage = "The matrices are not isomorphic.";
} break; case CODE_ISO:
printf( "\n\n Code Isomorphism Program: " "Codes %s and %s, Invariant sets %s and %s\n\n",
C_L->name, C_R->name, matrix_L->name, matrix_R->name);
sprintf( comment, "An isomorphism from code %s to code %s.",
C_L->name, C_R->name);
options.cosetRepMessage = "The codes are isomorphic. An isomorphism is:";
options.noCosetRepMessage = "The codes are not isomorphic."; break; default: /* can not actually reach here, silence a compiler warning */ break;
} if ( L_L )
printf( "\nKnown Subgroup (left): %s", L_L->name); if ( L_R )
printf( "\nKnown Subgroup (right): %s", L_R->name); if ( L_L || L_R )
printf( "\n");
} if ( (computationType == MATRIX_ISO && matrix_L->setSize > 2) ||
(computationType == CODE_ISO && C_L->fieldSize > 2) )
y = matrixIsomorphism( matrix_L, matrix_R, L_L, L_R, C_L, C_R,
monomialFlag, pbFlag); else
y = designIsomorphism( matrix_L, matrix_R, L_L, L_R, C_L, C_R, pbFlag); if ( y ) {
strcpy( y->name, outputObjectName); if ( pbFlag ) if ( monomialFlag ) if ( imageFormatFlag )
writePermutationRestricted( outputFileName,
outputLibraryName, y, "image", comment,
matrix_L->numberOfCols); else
writePermutationRestricted( outputFileName,
outputLibraryName, y, "", comment,
matrix_L->numberOfCols); else if ( imageFormatFlag )
writePermutation( outputFileName, outputLibraryName, y, "image", comment); else
writePermutation( outputFileName, outputLibraryName, y, "", comment); else if ( imageFormatFlag )
writePermutationRestricted( outputFileName, outputLibraryName,
y, "image", comment, matrix_L->numberOfRows); else
writePermutationRestricted( outputFileName, outputLibraryName,
y, "", comment, matrix_L->numberOfRows);
} break;
}
/* Return to caller. */ if ( !imageFlag || y ) return 0; else return 1;
}
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.