WLJS LogoWLJS Notebook

PermutationLength

PermutationLength[perm] returns the number of integers moved by the permutation perm.

The length is the count of elements not in their original positions.

Examples

PermutationLength[Cycles[{{1, 2, 3}}]]
PermutationLength[{2, 3, 1, 4}]
PermutationLength[Cycles[{}]]

*See the official Wolfram Language Reference for more details.

On this page