39.4 Creating Permutations

  • ListPerm( perm ) F

    is a list list that contains the images of the positive integers under the permutation perm. That means that list[i] = i^perm, where i lies between 1 and the largest point moved by perm (see LargestMovedPoint).

  • PermList( list ) F

    is the permutation perm that moves points as described by the list list. That means that i^perm = list[i] if i lies between 1 and the length of list, and i^perm = i if i is larger than the length of the list list. It will signal an error if list does not define a permutation, i.e., if list is not a list of integers without holes, or if list contains an integer twice, or if list contains an integer not in the range [1..Length(list)].

  • MappingPermListList( src, dst ) F

    Let src and dst be lists of positive integers of the same length, such that neither may contain an element twice. MappingPermListList returns a permutation perm such that src[i]^perm = dst[i]. perm fixes all points larger than the maximum of the entries in src and dst. If there are several such permutations, it is not specified which of them MappingPermListList returns.

  • RestrictedPerm( perm, list ) F

    RestrictedPerm returns the new permutation new that acts on the points in the list list in the same way as the permutation perm, and that fixes those points that are not in list. list must be a list of positive integers such that for each i in list the image i^perm is also in list, i.e., list must be the union of cycles of perm.

    gap> ListPerm((3,4,5));
    [ 1, 2, 4, 5, 3 ]
    gap> PermList([1,2,4,5,3]);
    (3,4,5)
    gap> MappingPermListList([2,5,1,6],[7,12,8,2]);
    ( 1, 8, 5,12,11,10, 9, 6, 2, 7, 4, 3)
    gap> RestrictedPerm((1,2)(3,4),[3..5]);
    (3,4)
    

    [Top] [Previous] [Up] [Index]

    GAP 4 manual
    February 2000