[GAP Forum] Elements of the same order

Joe Bohanon jbohanon2 at gmail.com
Wed Nov 18 01:58:24 GMT 2009


It's better to use the conjugacy classes first as GAP will have a hard (or
impossible) time doing this when n>=10.

ccls:=ConjugacyClasses(SymmetricGroup(n));
2ccls:=Filtered(ccls,i->Order(Representative(i))=2);
Concatenation(List(2ccls,Elements));

Joe


On Tue, Nov 17, 2009 at 3:42 PM, <aker at gursey.gov.tr> wrote:

> This will do:
>
> Filtered( Elements( SymmetricGroup( 4 ) ), elt -> ( Order(elt) = 2 ) );
>
> k.
>
>
> Quoting yalincak at gazi.edu.tr:
>
>
>> Dear Forum,
>>
>> I am very new in GAP and my question may be very easy:
>>
>> Is it possible to collect the elements of the same order in a group? For
>> example the elements of order two in S_n, the symmetric group of n
>> elements.
>>
>> All the best,
>>
>> Aynur Arikan
>>
>> _______________________________________________
>> Forum mailing list
>> Forum at mail.gap-system.org
>> http://mail.gap-system.org/mailman/listinfo/forum
>>
>>
>
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
>
>
>
> _______________________________________________
> Forum mailing list
> Forum at mail.gap-system.org
> http://mail.gap-system.org/mailman/listinfo/forum
>


More information about the Forum mailing list