Skip to content

LehmerCodeToMajorCode ​

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

LehmerCodeToMajorCode(Permutation)The permutation whose major code is this permutation's Lehmer 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 Mp00062. It carries the inversion count to the major index; the inverse is MajorCodeToLehmerCode.

Examples

Basic #

the one-line word 231231

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