> < ^ Date: Mon, 02 Jul 2001 15:32:50 +0200 (CEST)
> < ^ From: Volkmar Felsch <Volkmar.Felsch@Math.RWTH-Aachen.DE >
< ^ Subject: Re: Enumeration of subgroups again

To GAP forum

Dear Azmi Tamid,

you asked

Let me also ask how to comupte in GAP the number of
Abelian subgroups of G , number of normal subgroups and
for a given m>=2 the number of subgroups of index m in G .

As you say that you are a beginner with respect to the use of GAP
I will try to be fairly explicit in my answer.

I will give examples of code below using certain GAP functions which
I will not explain here. Most GAP functions are named in such a way
that you can guess what they do, but you can get more detailed information
using GAP's on-line help (i.e. type a question mark followed by the
function you are interested in) e.g.

gap> ?ConjugacyClassesSubgroups

gives the details for the function `ConjugacyClassesSubgroups'.

If the groups you have in mind are sufficiently small you may just
use some of the general functions for handling groups. As an example
assume that you want to handle the alternating group of degree 5.

gap> G := AlternatingGroup( 5 );
Group( (1,2,5), (2,3,5), (3,4,5) )

Get the classes of conjugate subgroups.

gap> classes := ConjugacyClassesSubgroups( G );
[ ConjugacyClassSubgroups( Group( (1,2,5), (2,3,5), 
    (3,4,5) ), Subgroup( Group( (1,2,5), (2,3,5), (3,4,5) ), [  ] ) ),
  ConjugacyClassSubgroups( Group( (1,2,5), (2,3,5), 
    (3,4,5) ), Subgroup( Group( (1,2,5), (2,3,5), (3,4,5) ), 
    [ (2,3)(4,5) ] ) ), ConjugacyClassSubgroups( Group( (1,2,5), 
    (2,3,5), (3,4,5) ), Subgroup( Group( (1,2,5), (2,3,5), (3,4,5) ), 
    [ (3,4,5) ] ) ), ConjugacyClassSubgroups( Group( (1,2,5), 
    (2,3,5), (3,4,5) ), Subgroup( Group( (1,2,5), (2,3,5), (3,4,5) ), 
    [ (2,3)(4,5), (2,4)(3,5) ] ) ), ConjugacyClassSubgroups( Group( 
    (1,2,5), (2,3,5), (3,4,5) ), Subgroup( Group( (1,2,5), (2,3,5), 
    (3,4,5) ), [ (1,2,3,4,5) ] ) ), ConjugacyClassSubgroups( Group( 
    (1,2,5), (2,3,5), (3,4,5) ), Subgroup( Group( (1,2,5), (2,3,5), 
    (3,4,5) ), [ (3,4,5), (1,2)(4,5) ] ) ), 
  ConjugacyClassSubgroups( Group( (1,2,5), (2,3,5), 
    (3,4,5) ), Subgroup( Group( (1,2,5), (2,3,5), (3,4,5) ), 
    [ (1,2,3,4,5), (2,5)(3,4) ] ) ), ConjugacyClassSubgroups( Group( 
    (1,2,5), (2,3,5), (3,4,5) ), Subgroup( Group( (1,2,5), (2,3,5), 
    (3,4,5) ), [ (2,3)(4,5), (2,4)(3,5), (3,4,5) ] ) ), 
  ConjugacyClassSubgroups( Group( (1,2,5), (2,3,5), (3,4,5) ), Group( 
    (1,2,5), (2,3,5), (3,4,5) ) ) ]

Get the number of classes.

gap> Length( classes );
9

Investigate a single class to get a feeling of what we are doing.

gap> cl := classes[4];
ConjugacyClassSubgroups( Group( (1,2,5), (2,3,5), 
(3,4,5) ), Subgroup( Group( (1,2,5), (2,3,5), (3,4,5) ), 
[ (2,3)(4,5), (2,4)(3,5) ] ) )
gap> length := Size( cl );
5
gap> rep := Representative( cl );
Subgroup( Group( (1,2,5), (2,3,5), (3,4,5) ), 
[ (2,3)(4,5), (2,4)(3,5) ] )
gap> order := Size( rep );
4
gap> IsAbelian( rep );
true

Now restrict the list of classes to a list of the classes of abelian
subgroups.

gap> abel := Filtered( classes, cl -> IsAbelian( Representative( cl ) ) );
[ ConjugacyClassSubgroups( Group( (1,2,5), (2,3,5), 
    (3,4,5) ), Subgroup( Group( (1,2,5), (2,3,5), (3,4,5) ), [  ] ) ),
  ConjugacyClassSubgroups( Group( (1,2,5), (2,3,5), 
    (3,4,5) ), Subgroup( Group( (1,2,5), (2,3,5), (3,4,5) ), 
    [ (2,3)(4,5) ] ) ), ConjugacyClassSubgroups( Group( (1,2,5), 
    (2,3,5), (3,4,5) ), Subgroup( Group( (1,2,5), (2,3,5), (3,4,5) ), 
    [ (3,4,5) ] ) ), ConjugacyClassSubgroups( Group( (1,2,5), 
    (2,3,5), (3,4,5) ), Subgroup( Group( (1,2,5), (2,3,5), (3,4,5) ), 
    [ (2,3)(4,5), (2,4)(3,5) ] ) ), ConjugacyClassSubgroups( Group( 
    (1,2,5), (2,3,5), (3,4,5) ), Subgroup( Group( (1,2,5), (2,3,5), 
    (3,4,5) ), [ (1,2,3,4,5) ] ) ) ]

Get the number of abelian subgroups.

gap> a := Sum( List( abel, cl -> Size( cl ) ) );
37

You could do the same to enumerate the normal subgroups of G by just
replacing the function `IsAbelian Representative( cl ) )' by the
function `IsNormal Representative( cl ) )', but it is easier to use
the following:

gap> n := Length( Filtered( classes, cl -> Size( cl ) = 1 ) );
2

Moreover, If you want to enumerate only the normal subgroups of G you
should avoid computing all classes of conjugate subgroups and just
call the following function

gap> normal := NormalSubgroups( G );
[ Subgroup( Group( (1,2,5), (2,3,5), (3,4,5) ), [  ] ), 
  Subgroup( Group( (1,2,5), (2,3,5), (3,4,5) ), 
    [ (1,2)(3,4), (1,3)(4,5), (1,4)(2,3) ] ) ]
gap> n := Length( normal );
2

If you have already computed the all conjugacy classes of subgroups
it is easy to filter out the subgroups with prescribed index m in G
or, what is equivalent, with prescribed size |G|/m:

gap> m := 12;
12
gap> size := Size( G ) / m;
5
gap> list := Filtered( classes, cl -> Size( Representative( cl ) ) = size );
[ ConjugacyClassSubgroups( Group( (1,2,5), (2,3,5), 
    (3,4,5) ), Subgroup( Group( (1,2,5), (2,3,5), (3,4,5) ), 
    [ (1,2,3,4,5) ] ) ) ]
gap> s := Sum( List( list, cl -> Size( cl ) ) );
6

Note however that all the above functions work only for sufficiently
small groups. It would be easy to implement more appropriate functions
for your purposes, but not all mathematical methods you may think of
have been implemented in GAP.

If your group is given as a finitely presented group you may use the
function `LowIndexSubgroupsFpGroup' which allows you to compute all
subgroups up to an prescribed (small) index in G even if G itself is
large. Here is an example of its use (again for the alternating group
of degree 5).

gap> F := FreeGroup( "a", "b" );
Group( a, b )
gap> a := F.1;; b := F.2;;
gap> G := F / [ a^2, b^3, (a*b)^5 ];
Group( a, b )
gap> lis := LowIndexSubgroupsFpGroup( G, TrivialSubgroup( G ), 12 );
[ Group( a, b ), Subgroup( Group( a, b ), [ a, b*a*b^-1 ] ), 
  Subgroup( Group( a, b ), [ a, b*a*b*a^-1*b^-1 ] ), 
  Subgroup( Group( a, b ), [ a, b*a*b*a*b^-1*a^-1*b^-1 ] ), 
  Subgroup( Group( a, b ), [ b*a^-1 ] ) ]
gap> List( lis, x -> Size( x ) );
[ 60, 10, 12, 6, 5 ]

I hope these remarks will ease you into using the GAP system.

Kind regards,

Volkmar Felsch, Aachen


> < [top]