/* compute a matrix which permits the extension of an existing permutationrepresentationforagroupbyagroupoforder p^rank;thematrixrowsareindexedfrom0..p^rank-1; thematrixcolumnsareindexedbythedefininggeneratorsand theirinversesinthesequence1,1^-1,2,2^-1,etc.
M[i][j]=k,wherea=(a_1,.....a_rank)isthevectorof coefficientsofthep-adicexpansionofi,bisthevectorof coefficientsofthep-adicexpansionofk,andwithinthe
p-group b = a * im(j) */
void extend_representation(struct pcp_vars *pcp)
{ register int *y = y_address;
int *expand; /* array to store p-adic expansion */ register int rank = y[pcp->clend + pcp->cc]; register int i, j, gen, sum;
int bound;
int **M;
int index;
int *powers; /* store powers of p to avoid recomputation */ register int p = pcp->p;
int cp = pcp->lused;
int ptr;
bound = int_power(p, rank);
/* set up room to store p-adic expansion and powers of p */
expand = allocate_vector(rank, 0, TRUE);
powers = allocate_vector(rank, 0, FALSE);
for (i = 0; i < rank; ++i)
powers[i] = int_power(p, i);
/* set up matrix to store results */
M = allocate_matrix(bound, 2 * pcp->ndgen, 0, FALSE);
for (i = 0; i < bound; ++i) {
/* find the p-adic expansion of i */
compute_padic(powers, i, rank - 1, p, expand);
/* now process each defining generator and its inverse in turn */
for (gen = -pcp->ndgen; gen <= pcp->ndgen; ++gen) {
if (gen == 0) continue;
/* now copy p-adic expansion to y */
for (j = 0; j < rank; ++j)
y[cp + j + 1] = expand[j];
#ifdefined(DEBUG)
printf("processing generator %d \n", gen);
printf("Stored p-adic expansion for %d in y is ", i);
for (j = 1; j <= pcp->lastg; ++j) {
printf("%d ", y[cp + j]);
}
printf("\n"); #endif
/* look up image of gen which is stored as a generator-exponent
string in y; post-multiply the p-adic expansion by this image */
/* compute p-adic expansion of x, where x < p^(k + 1) */
void compute_padic(int *powers, int x, int k, int p, int *expand)
{ register int alpha; register int val;
while (x > 0 && k >= 0) {
val = powers[k];
if (val <= x) { /* find largest multiple of p^k < x */
alpha = p - 1; while (alpha * val > x)
--alpha;
expand[k] = alpha;
x -= alpha * val;
}
--k;
}
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.19 Sekunden
(vorverarbeitet am 2026-09-04)
¤
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.