WLJS LogoWLJS Notebook

PermutationPower

PermutationPower[perm, n] gives the nth permutation power of the permutation perm.

Examples

Square of a permutation:

PermutationPower[Cycles[{{1, 2, 3}}], 2]
(* Cycles[{{1, 3, 2}}] *)

Cube returns identity:

PermutationPower[Cycles[{{1, 2, 3}}], 3]
(* Cycles[{}] *)

Negative power:

PermutationPower[Cycles[{{1, 2, 3}}], -1]
(* Cycles[{{1, 3, 2}}] *)

Please visit the official Wolfram Language Reference for more details.

On this page