Previous Up Next

6.9.3  Decomposing a permuation into a product of disjoint cycles: permu2cycles

Any permutation can be decomposed as a sequence of cycles which have no elements in common. For example, the permutation [1,3,4,0,2] can be written as a combination of the cycles [0,1,3] and [2,4].

The permu2cycles command decomposes a permutation into a combination of cycles.


Examples.


Previous Up Next