MajorIndex
The major index of : the sum of the descent positions .
✓ checked against that system · ! checked, with disagreements (hover a chip)FindStat
St000290via BinaryWord✓St000769via IntegerComposition✓St000004via Permutation✓St000330via StandardTableau✓MajorIndex(p)the major index of a one-line permutation Combinatorica
Index[p]SageMathenumeratio_stat("Permutation", p, "MajorIndex")Typed signatures
| Type | Package | Applies |
|---|---|---|
(binary_word | composition | dyck_path | list | permutation | standard_tableau) -> integer | number | combinatorics | always |
Details
- Introduced by MacMahon, who proved it equidistributed with Inversions over
- Both are Mahonian, so their common generating function is the q-factorial
- Defined over
Permutationas an expression in_x, evaluated by compute-engine — the definition IS the implementation. - Takes a
Permutation, and also a bare list of integers: this reading compares entries with each other rather than with their positions, so it stands on any sequence. - The distinction from Descents is the entire content of the statistic.
- A separate definition exists for
DyckPath(The sum of the descent positions of the step word — where an up step is followed by a down step.) but is not the one declared: one head, one owner.
Definition
Epsil, as the implementation runs it.
on Permutation, over _x
0 if Length(_x) < 2 else Sum(Filter(
Range(1, Length(_x) - 1),
Function(_x[i] > _x[i + 1], i),
))on DyckPath, over _x
0 if Length(_x) < 2 else Sum(Filter(
Range(1, Length(_x) - 1),
Function(_x[i] == 1 && _x[i + 1] == 0, i),
))on IntegerComposition, over _x
0 if Length(_x) < 2 else Sum(Filter(
Range(1, Length(_x) - 1),
Function(_x[i] > _x[i + 1], i),
))on BinaryWord, over _x
0 if Length(_x) < 2 else Sum(Filter(
Range(1, Length(_x) - 1),
Function(_x[i] > _x[i + 1], i),
))Examples
Basic #
Properties #
About
| Examples | 10 |
|---|---|
| Checked against | Combinatorica 6 agreeSageMath 9 agree |
| Crosswalk | FindStat ×4CombinatoricaSageMath |
Implementation
referenceengine
notatioChecked against the implementation over every permutation of 1..6.
nativeengine
typescriptpackages/symbols/combinatorics/combinatorics/collections/src/stats.ts:majorIndexmapped
combinatoricapackages/oracle/src/mappings.tsCombinatorica's Index is the major index: the sum of the descent positions, 1-based, as ours.
mapped
sagepackages/oracle/src/mappings.ts See also: Inversions, Descents, SymmetricGroup