Skip to content

PermutationMax ​

The largest point pp moves; 0 for the identity.

✓ checked against that system · ! checked, with disagreements (hover a chip)Wolfram LanguagePermutationMax✓
PermutationMax(p)The largest point pp moves; 0 for the identity.
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
  • Trailing fixed points do not count: {2, 1, 3, 4} has maximum 2
  • 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 #

3 and 4 are fixed, so the largest moved point is 2

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

Known value · wolframscript 15.0

the one-line word 312312

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

the one-line word 24132413

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

(1 5)(2 3 4)(1\,5)(2\,3\,4)

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

Known value · wolframscript 15.0

Properties #

the identity moves nothing, as Wolfram has it

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

Known value · wolframscript 15.0

About
Examples5
Checked againstWolfram Language 5 agree
CrosswalkWolfram Language