# [GAP Forum] Array of ListPerm

Jan Willem Knopper jwk at stack.nl
Thu Jan 29 10:44:31 GMT 2009

```Don King wrote:
> Hello,
>
> I am having difficulty in converting cycles to the list of permutations.
>
> gap> s := SymmetricGroup(6);
> Sym( [ 1 .. 6 ] )
> gap> ConjugacyClasses(s);
> [ ()^G, (1,2)^G, (1,2)(3,4)^G, (1,2)(3,4)(5,6)^G, (1,2,3)^G, (1,2,3)(4,5)^G,
>   (1,2,3)(4,5,6)^G, (1,2,3,4)^G, (1,2,3,4)(5,6)^G, (1,2,3,4,5)^G,
>   (1,2,3,4,5,6)^G ]
> gap> c := ConjugacyClass(s,(1,2,3)(4,5));
> (1,2,3)(4,5)^G
> gap> Size(c);
> 120
> gap> for i in [1.. 120] do ListPerm(c);
> >  (Syntax Error !)
>
The value of the variable c is not a permutation, but a conjugacy class.
What you probably want is to use

for perm in Iterator(c) do ...; od;

or

List(Elements(c), perm -> ListPerm(perm));

In a recent question on this list it has been asked how to convert a
permutation to a list representation.

Here it was noted that ListPerm(perm) returns a list, which is as long
as the largest moved point : LargestMovedPoint(perm).

A command to get a list which is always of length 6 it is:

List(Elements(c), perm -> Permuted([1..6],perm^-1);od;

Regards,

Jan Willem Knopper

```