Skip to content

PermutationLength ​

The number of points pp moves.

✓ checked against that system · ! checked, with disagreements (hover a chip)Wolfram LanguagePermutationLength✓
PermutationLength(p)The number of points pp moves.
Typed signatures
TypePackageApplies
(permutation) -> numbercombinatoricsalways

Domain: Permutation statistics

Details
  • Defined over Permutation as an expression in _x, evaluated by compute-engine — the definition IS the implementation.
  • Wolfram's Cycles input is not read here: wrap a one-line word in Permutation, or turn Cycles into one with PermutationList first
  • The identity moves nothing, so its length is 0; a kk-cycle has length kk (fixed points do not count)
  • Takes a Permutation and nothing else — it reads values against their positions, or walks the orbits, so it needs the bijection. Applying it to a bare list is a type error, not a wrong answer.

Examples

Basic #

all three points move

live ↗
InPermutationLength(Permutation⁡([2,3,1]))\mathrm{PermutationLength}({\operatorname{Permutation}}([2, 3, 1]))Out33

Known value · wolframscript 15.0

the one-line word 312312

live ↗
InPermutationLength(Permutation⁡([3,1,2]))\mathrm{PermutationLength}({\operatorname{Permutation}}([3, 1, 2]))Out33

the one-line word 24132413

live ↗
InPermutationLength(Permutation⁡([2,4,1,3]))\mathrm{PermutationLength}({\operatorname{Permutation}}([2, 4, 1, 3]))Out44
Scope #

only 2 and 3 move

live ↗
InPermutationLength(Permutation⁡([1,3,2,4]))\mathrm{PermutationLength}({\operatorname{Permutation}}([1, 3, 2, 4]))Out22

Known value · wolframscript 15.0

the cycles (1 5)(2 3 4)(1\,5)(2\,3\,4) move five points

live ↗
InPermutationLength(Permutation⁡([5,3,4,2,1]))\mathrm{PermutationLength}({\operatorname{Permutation}}([5, 3, 4, 2, 1]))Out55

Known value · wolframscript 15.0

Properties #

the identity moves nothing

live ↗
InPermutationLength(Permutation⁡([1,2,3]))\mathrm{PermutationLength}({\operatorname{Permutation}}([1, 2, 3]))Out00

Known value · wolframscript 15.0

About
Examples6
Checked againstWolfram Language 6 agree
CrosswalkWolfram Language