# 23.7 LowIndexSubgroupsFpGroup

`LowIndexSubgroupsFpGroup( G, H, index )`
`LowIndexSubgroupsFpGroup( G, H, index, excluded )`

`LowIndexSubgroupsFpGroup` returns a list of representatives of the conjugacy classes of subgroups of the finitely presented group G that contain the subgroup H of H and that have index less than or equal to index.

The function provides some intermediate output if `InfoFpGroup2` has been set to `Print` (its default value is `Ignore`).

If the optional argument excluded has been specified, then it is expected to be a list of words in the generators of G, and `LowIndexSubgroupsFpGroup` returns only those subgroups of index at most index that contain H, but do not contain any conjugate of any of the group elements defined by these words.

```    gap> F2 := FreeGroup( "a", "b" );
Group( a, b )
gap> A5 := F2 / [ F2.1^2, F2.2^3, (F2.1*F2.2)^5 ];
Group( a, b )
gap> A5.name := "A5";;
gap> S := LowIndexSubgroupsFpGroup( A5, TrivialSubgroup( A5 ), 12 );
[ A5, Subgroup( A5, [ a, b*a*b^-1 ] ),
Subgroup( A5, [ a, b*a*b*a^-1*b^-1 ] ),
Subgroup( A5, [ a, b*a*b*a*b^-1*a^-1*b^-1 ] ),
Subgroup( A5, [ b*a^-1 ] ) ]
gap> List( S, H -> Index( A5, H ) );
[ 1, 6, 5, 10, 12 ]    # the indices of the subgroups
gap> List( S, H -> Index( A5, Normalizer( A5, H ) ) );
[ 1, 6, 5, 10, 6 ]    # the lengths of the conjugacy classes ```

As an example for an application of the optional parameter excluded, we compute all conjugacy classes of torsion free subgroups of index at most 24 in the group G = < x,y,z mid x^2, y^4, z^3, (xy)^3, (yz)^2, (xz)^3 > . It is know from theory that each torsion element of this group is conjugate to a power of x, y, z, xy, xz, or yz.

```    gap> G := FreeGroup( "x", "y", "z" );
Group( x, y, z )
gap> x := G.1;; y := G.2;; z := G.3;;
gap> G.relators := [ x^2, y^4, z^3, (x*y)^3, (y*z)^2, (x*z)^3 ];;
gap> torsion := [ x, y, y^2, z, x*y, x*z, y*z ];;
gap> InfoFpGroup2 := Print;;
gap> lis :=
>    LowIndexSubgroupsFpGroup( G, TrivialSubgroup( G ), 24, torsion );;
#I   class 1 of index 24 and length 8
#I   class 2 of index 24 and length 24
#I   class 3 of index 24 and length 24
#I   class 4 of index 24 and length 24
#I   class 5 of index 24 and length 24
gap> InfoFpGroup2 := Ignore;;
gap> lis;
[ Subgroup( Group( x, y, z ),
[ x*y*z^-1, z*x*z^-1*y^-1, x*z*x*y^-1*z^-1, y*x*z*y^-1*z^-1 ] ),
Subgroup( Group( x, y, z ),
[ x*y*z^-1, z^2*x^-1*y^-1, x*z*y*x^-1*z^-1 ] ),
Subgroup( Group( x, y, z ),
[ x*y*z^-1, x*z^2*x^-1*y^-1, y^2*x*y^-1*z^-1*x^-1 ] ),
Subgroup( Group( x, y, z ), [ x*y*z^-1, y^3*x^-1*z^-1*x^-1,
y^2*z*x^-1*y^-1 ] ),
Subgroup( Group( x, y, z ), [ y*x*z^-1, x*y*z*y^-1*z^-1,
y^2*z*x^-1*z^-1*x^-1 ] ) ] ```

The function `LowIndexSubgroupsFpGroup` finds the requested subgroups by systematically running through a tree of all potential coset tables of G of length at most index (where it skips all branches of that tree for which it knows in advance that they cannot provide new classes of such subgroups). The time required to do this depends, of course, on the presentation of G, but in general it will grow exponentially with the value of index. So you should be careful with the choice of index.

GAP 3.4.4
April 1997