Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions lib/newgeneratingtuples.gi
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ InstallGlobalFunction(NumberGeneratingTuples,function(group,p,t,g)

full:=[];
sz:=Size(group);
cc:=ConjugacyClasses(group);
# class positions are passed to TotalNumberOfTuples, so they must refer to
# the classes of the character table, whose order may differ from the group's
ct:=CharacterTable(group);
cc:=ConjugacyClasses(ct);
oc:=List(t,s->Filtered([1..Length(cc)],i->s in cc[i]));

ct:=CharacterTable(group);
str:=TotalNumberOfTuples(ct,g,List(oc,c->c[1]));

Add(full,rec(gp:=group,sz:=sz,cc:=cc,oc:=oc,str:=str,pr:=0,nx:=0));
Expand Down Expand Up @@ -55,11 +57,11 @@ InstallGlobalFunction(NumberGeneratingTuples,function(group,p,t,g)
fi;
od;
if not fl then
mcc:=ConjugacyClasses(m);
ct:=CharacterTable(m);
mcc:=ConjugacyClasses(ct);
moc:=List(oc,s-> Union(List(s, n-> Filtered([1..Length(mcc)],i ->
Representative(mcc[i]) in cc[n]))));
if not ([] in moc) then
ct:=CharacterTable(m);
str:=0;
t:=List(tp,c->1);
repeat
Expand Down
38 changes: 38 additions & 0 deletions tst/ClassOrder.tst
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
gap> START_TEST("MapClass package: ClassOrder.tst");

# A character table may list the conjugacy classes in another order than
# its group does. Here the group and each subgroup returned by
# MaximalSubgroupClassReps store the identity class last, whereas a character
# table has it first.
gap> IdLast:=function(G)
> local reps,H;
> reps:=List(ConjugacyClasses(G),Representative);
> reps:=Concatenation(reps{[2..Length(reps)]},reps{[1]});
> H:=GroupWithGenerators(GeneratorsOfGroup(G),One(G));
> SetConjugacyClasses(H,List(reps,x->ConjugacyClass(H,x)));
> SetMaximalSubgroupClassReps(H,List(MaximalSubgroupClassReps(G),IdLast));
> return H;
> end;;
gap> G:=IdLast(SymmetricGroup(4));;
gap> ForAll(Concatenation([G],MaximalSubgroupClassReps(G)),
> H->IdentificationOfConjugacyClasses(CharacterTable(H))
> <>[1..NrConjugacyClasses(H)]);
true
gap> t7:=ListWithIdenticalEntries(7,(1,2));;
gap> t8:=ListWithIdenticalEntries(8,(1,2));;
gap> NumberGeneratingTuples(G,[7],t7,0);
0
gap> NumberGeneratingTuples(G,[8],t8,0);
131040
gap> NumberGeneratingTuples(G,[2,2],[(1,2),(1,2),(1,2,3),(1,2,3)],0);
144
gap> NumberGeneratingTuples(G,[1],[(1,2,3)],1);
216
gap> orbs:=GeneratingMCOrbits(G,0,t7:OutputStyle:="silent");;
gap> Length(orbs);
0
gap> orbs:=GeneratingMCOrbits(G,0,[(1,2),(1,2),(1,2,3),(1,2,3)]:
> OutputStyle:="silent");;
gap> List(orbs,o->Length(o.TupleTable));
[ 6 ]
gap> STOP_TEST( "ClassOrder.tst" );
Loading