[GAP Forum] Converting a permutation to a list

James Mitchell jdm3 at st-and.ac.uk
Mon Aug 18 17:03:35 BST 2014


Or without the extra function:

gap> Cycles((1,2,3)(5,6), [1,2,3,5,6]);

[ [ 1, 2, 3 ], [ 5, 6 ] ]

or if p is you permutation:

Cycles(p, MovedPoints(p));


On 18 August 2014 17:44, Tim Kohl <tkohl at math.bu.edu> wrote:
>
>
>
> gap> allsupports:=function(perm,n) return(Filtered(Cycles(perm,[1..n]),x->Size(x)>1));end;
>
> gap> allsupports((1,2,3)(5,6),6);
> [ [ 1, 2, 3 ], [ 5, 6 ] ]
>
>         -T
>
>
> On Mon, 18 Aug 2014, Pierre-Alain BOURDIL wrote:
>
>> Greetings,
>>
>> i'm looking for a function , say F, such that
>>
>>  F((1,2,3)(5,6)) = [[1,2,3],[5,6]].
>>
>> My goal is to use the output list as index to fetch string from a separate
>> list (eg: ["a","b","c","d","e"]). I need to express permutation  on the latter
>> (eg: ("a","b","c")("d","e")) ) , do some computation using gap permutation
>> group, and  convert back the output of gap to permutation of these strings.
>>
>> I've seen PermList and ListPerm but it's not a cyclic notation. There's
>> possibly better way to make a permutation acting on an ordred set of string
>> but my point is the input/output with gap.
>>
>>
>
> --
> Dr. Timothy Kohl | Desktop Services Specialist, Sr.
> Boston University| IT Help Center | IS&T
> 617.353.8203 | tkohl at bu.edu
> Listen. Learn. Lead.
>
> _______________________________________________
> Forum mailing list
> Forum at mail.gap-system.org
> http://mail.gap-system.org/mailman/listinfo/forum



-- 
James Mitchell
tinyurl.com/jdmitchell

The University of St Andrews is a charity registered in Scotland : No SC013532



More information about the Forum mailing list