next up previous contents index
Next: Permutation groups Up: Finite groups using GAP Previous: Finite groups using GAP   Contents   Index

Permutations

In GAP, to obtain the permutation matrix $ P$ corresponding to the cyclic permutation of $ \mathbb{Z}_n$ which sends $ a_1\longmapsto a_2$, $ a_2\longmapsto a_3$, ..., $ a_{n-1}\longmapsto a_n$, and $ a_n\longmapsto a_1$, type P:=PermutationMat(($ a_1$,...,$ a_n$),n);. For example, to obtain the permutation matrix $ P$ corresponding to the permutation of $ \mathbb{Z}_5$ which sends $ 1\longmapsto 2$, $ 2\longmapsto 3$, $ 3\longmapsto 5$, and $ 5\longmapsto 1$, type P:=PermutationMat((1,2,3,5),5);. This is printed out as a list of row vectors. To get $ P$ to print out as a square matrix, type PrintArray(P). To get the inverse permutation, type PrintArray(P^(-1));.

a^(-1) is the inverse. For example, if you type

a:=(1,2,3,5);
b:=(3,2,1)(4,5)
a*b;
a^(-1);
returns the product (3,4,5) and the inverse (1,5,3,2).

Exercise 5.19.1 (a)   Compute $ (1,2,3,4,5,6,7,8,9)^3(1,2,3,4,5)^{-5}$.

(b) Make a $ 6\times 6$ table of all $ 36$ products $ ab$, where $ a,b$ run over all $ 6$ permutations of $ \{1,2,3\}$.



David Joyner 2002-08-23