Previous Up Next

12.2.9  Product of two permutations

Permutations are functions, and so can be composed. Since cycles can be represented differently than other permutations, there are commands for composing permutations of different types.

The p1op2 command composes two permutations.

The c1op2 command composes a cycle and a permutation.

The p1oc2 command composes a permutation and a cycle.

The c1oc2 command composes two cycles.

Examples

p1op2([3,4,5,2,0,1],[2,0,1,4,3,5])
     

5,3,4,0,2,1
          
c1op2([3,4,5],[2,0,1,4,3,5])
     

2,0,1,5,4,3
          
p1oc2([3,4,5,2,0,1],[2,0,1])
     

4,5,3,2,0,1
          
c1oc2([3,4,5],[2,0,1])
     

1,2,0,4,5,3
          

Previous Up Next