Skip to content

MajorCodeToLehmerCode ​

The permutation whose Lehmer code is this permutation's major code.

MajorCodeToLehmerCode(Permutation)The permutation whose Lehmer code is this permutation's major code.
Typed signatures
TypePackageApplies
(permutation) -> permutationcombinatoricsalways

Domain: Combinatorial maps

Details
  • Takes a Permutation and returns a Permutation — a typed map, so a wrong carrier is a type error rather than a wrong answer.
  • FindStat's Mp00073. It carries the major index to the inversion count; the inverse is LehmerCodeToMajorCode.

Examples

Basic #

the one-line word 231231

live ↗
InMajorCodeToLehmerCode(Permutation⁡([2,3,1]))\mathrm{MajorCodeToLehmerCode}({\operatorname{Permutation}}([2, 3, 1]))OutPermutation⁡([3,1,2]){\operatorname{Permutation}}([3, 1, 2])
About
Examples1
CrosswalkFindStat