List vs Permutation representation.

311 Views Asked by At

If we have a list

xx:=[3,7,17,16,15]; and I want to convert this list into permutation like

xx:=(3,7,17,16,15); I used PermList(xx) for this but it doesn't convert it in the required form. How can I see this in GAP?

2

There are 2 best solutions below

1
On BEST ANSWER

To convert a list into a cycle, you could use MappingPermListList, but you'll need to construct the list of images yourself (easy to do by hand, but even easier is just typing in the permutation, so I'll assume you need to do this in a program).

gap> cycleAsList := [3,7,17,16,15];;
gap> genericCycle := PermList( Concatenation( [2..Size(cycleAsList)],[1] ) );
(1,2,3,4,5)
gap> cycle := MappingPermListList( Permuted( cycleAsList, genericCycle ), cycleAsList );
(3,7,17,16,15)
2
On

The issue here is that xx does not define a valid permutation. To be a valid permutation, it must contain each of the numbers $1,2,\ldots,\text{Length(list)}$ exactly once.

Please see the documentation for PermList.