Inversions
The number of inversions of a permutation
Wikipedia
Inversion (discrete mathematics)MathWorldPermutationInversionWikidataQ1368009FindStatSt000018via Permutation✓Inversions(p)the inversion count of a one-line permutation Details
- Ranges from
(the identity) to (the reversal ) - Generating function over
is the q-factorial - Equidistributed with MajorIndex on
(MacMahon), so both are Mahonian statistics - Aggregates over a whole collection compose from built-ins:
folds the stat over the lazy family
Examples
See also: MajorIndex, Descents, SymmetricGroup