Skip to content

Commit

Permalink
ENHANCE: Aim for intransitive centralizer in NormalSubgroups
Browse files Browse the repository at this point in the history
as this makes a Core computation quicker. This avoids slowdowns in
particular cases such as gap-system#2683

This fixes gap-system#2683

Includes necessary manual example changes.
  • Loading branch information
hulpke committed Aug 31, 2018
1 parent e2d2f21 commit 11bc96d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 11 deletions.
4 changes: 2 additions & 2 deletions lib/ctbl.gd
Original file line number Diff line number Diff line change
Expand Up @@ -4436,11 +4436,11 @@ DeclareGlobalFunction( "NormalSubgroupClasses" );
## Character( CharacterTable( S4 ), [ 3, 1, -1, 0, -1 ] ),
## Character( CharacterTable( S4 ), [ 1, 1, 1, 1, 1 ] ) ]
## gap> kernel:= KernelOfCharacter( irr[3] );
## Group([ (1,2)(3,4), (1,3)(2,4) ])
## Group([ (1,2)(3,4), (1,4)(2,3) ])
## gap> HasNormalSubgroupClassesInfo( tbl );
## true
## gap> NormalSubgroupClassesInfo( tbl );
## rec( nsg := [ Group([ (1,2)(3,4), (1,3)(2,4) ]) ],
## rec( nsg := [ Group([ (1,2)(3,4), (1,4)(2,3) ]) ],
## nsgclasses := [ [ 1, 3 ] ], nsgfactors := [ ] )
## gap> ClassPositionsOfNormalSubgroup( tbl, kernel );
## [ 1, 3 ]
Expand Down
4 changes: 2 additions & 2 deletions lib/grp.gd
Original file line number Diff line number Diff line change
Expand Up @@ -1868,8 +1868,8 @@ DeclareAttribute( "MinimalNormalSubgroups", IsGroup );
## returns a list of all normal subgroups of <A>G</A>.
## <Example><![CDATA[
## gap> g:=SymmetricGroup(4);;NormalSubgroups(g);
## [ Sym( [ 1 .. 4 ] ), Alt( [ 1 .. 4 ] ), Group([ (1,4)(2,3), (1,2)
## (3,4) ]), Group(()) ]
## [ Sym( [ 1 .. 4 ] ), Alt( [ 1 .. 4 ] ), Group([ (1,4)(2,3), (1,3)
## (2,4) ]), Group(()) ]
## ]]></Example>
## <P/>
## The algorithm for the computation of normal subgroups is described in
Expand Down
25 changes: 18 additions & 7 deletions lib/grplatt.gi
Original file line number Diff line number Diff line change
Expand Up @@ -2122,14 +2122,25 @@ local G, # group
Info(InfoLattice,2,"Search involution");

# find involution in M/T
cnt:=0;
repeat
repeat
inv:=Random(M);
until (Order(inv) mod 2 =0) and not inv in T;
o:=First([2..Order(inv)],i->inv^i in T);
until (o mod 2 =0);
Info(InfoLattice,2,"Element of order ",o);
inv:=inv^(o/2); # this is an involution in the factor
repeat
repeat
inv:=Random(M);
until (Order(inv) mod 2 =0) and not inv in T;
o:=First([2..Order(inv)],i->inv^i in T);
until (o mod 2 =0);
Info(InfoLattice,2,"Element of order ",o);
inv:=inv^(o/2); # this is an involution in the factor

cnt:=cnt+1;
# in permgroups try to pick an involution that does not move all
# points. This can make the core of C to be computed quicker.
until not (IsPermGroup(M) and cnt<10
and Length(MovedPoints(inv))=Length(MovedPoints(M)));



Assert(1,inv^2 in T and not inv in T);

S:=Normalizer(G,T); # stabilize first component
Expand Down

0 comments on commit 11bc96d

Please sign in to comment.