next up previous contents
Next: Variables Up: Customization and other utilities. Previous: Other functions

   
Permutations

A permutation is represented as a list of images of [1..n] e.g. { 5 1 2 4 3 } means $\sigma (1)=5$, $\sigma (2)=1$, $\sigma (3)=2$, $\sigma (4)=4$ and $\sigma (5)=3$. The P2C instruction converts this representation to the cycle decomposition, here { { 1 5 3 2 } { 4 } } (stack level 2) and computes the signature of p (stack level 1). C2P converts back cycle decomposition to usual representation of permutations. CIRC compose 2 permutations in the usual representation (returns $\sigma _{\mbox{level 2}}\circ \sigma _{\mbox{level 1}}$).



Bernard Parisse
1998-07-31