[GAP Forum] Converting a permutation to a list
Tim Kohl
tkohl at math.bu.edu
Mon Aug 18 16:44:38 BST 2014
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.
More information about the Forum
mailing list