Permutation Statistics: Descents, the Major Index, and Eulerian Polynomials
Anchor (Master): Stanley 2012 *Enumerative Combinatorics, Volume 1* 2e §1.3-1.4 and Notes (Foata's bijection, the $q$-Eulerian refinement, the exponential generating function of the Eulerian polynomials); Petersen 2015 *Eulerian Numbers* (Birkhäuser) Ch. 1-5 (Eulerian polynomials, the EGF $(t-1)/(t-e^{(t-1)x})$, Worpitzky, $\gamma$-positivity); Foata-Schützenberger 1970 *Théorie géométrique des polynômes eulériens* (Springer LNM 138)
Intuition Beginner
Take a deck of cards numbered through and shuffle it into some order. You now have a permutation: a specific arrangement of the numbers. Two different shuffles give two different arrangements, and there are a great many of them. Rather than treat every arrangement as a featureless point in a huge list, you can attach to each one a few honest numbers that measure how scrambled it is. These measurements are called permutation statistics, and they turn out to obey beautiful patterns.
The first measurement is the count of descents. Walk along the arrangement from left to right and mark each spot where the next card is smaller than the current one — a step downhill. The arrangement steps down at and again at , so it has two descents. A sorted deck never steps down; a fully reversed deck steps down at every position. The descent count is a rough gauge of disorder.
The second measurement is the count of inversions: how many pairs of cards are out of their natural order, a bigger number sitting somewhere to the left of a smaller one. Sorting the deck by repeatedly swapping neighbours takes exactly one swap per inversion, so the inversion count is the honest distance from sorted.
Here is the surprise this unit is built around. There is a third statistic, the major index, that adds up the positions where descents happen rather than just counting them. It looks like a strange thing to track. Yet if you tally how many arrangements have each possible inversion count, and separately tally how many have each possible major index, the two tallies are identical, number for number. Two very different-looking measurements share one distribution. This unit explains that coincidence and the polynomial — the Eulerian polynomial — that records how descents are spread across all arrangements.
Visual Beginner
Take the arrangement of the numbers through . The table below reads off its three statistics by hand. A descent is a position where the entry is bigger than the one just after it; the major index adds up those positions; an inversion is a pair (earlier, later) that is out of order.
| position | entries | descent? |
|---|---|---|
| no (uphill) | ||
| yes (downhill) | ||
| yes (downhill) | ||
| no (uphill) |
The descents sit at positions and , so the descent count is and the major index is . Counting every out-of-order pair (such as before , before , before , before ) gives inversions as well. The descent count, the summed-position major index, and the inversion count are three separate ways of scoring one arrangement, and the rest of the unit shows how their totals across all arrangements line up.
Worked example Beginner
Let us list all six arrangements of the numbers and score each one. Reading left to right, mark a descent wherever an entry is bigger than the next.
The arrangement never steps down: descents, major index , and inversions.
The arrangement steps down once, at position (the ): descent, major index , and inversion (the pair before ).
The arrangement steps down once, at position (the ): descent, major index , and inversion (the pair before ).
The arrangement steps down once, at position (the ): descent, major index , and inversions ( before , and before ).
The arrangement steps down once, at position (the ): descent, major index , and inversions ( before , and before ).
The arrangement steps down twice, at positions and : descents, major index , and inversions (every pair is reversed).
Now tally the inversion counts: one arrangement has , two have , two have , one has . Tally the major index: one has , two have , two have , one has . The two tallies match exactly — — even though inversions count pairs and the major index sums positions.
What this tells us: two unrelated-looking scores produce the very same spread of counts over all arrangements. Tallying descents instead gives (one arrangement with descents, four with , one with ), the pattern recorded by the Eulerian polynomial.
Check your understanding Beginner
Formal definition Intermediate+
Write for the symmetric group on , with a permutation recorded in one-line notation as the word where .
Definition (descent set, descent number). The descent set of is $$ D(\sigma) = {, i \in {1, \dots, n-1} : \sigma_i > \sigma_{i+1} ,} \subseteq {1, \dots, n-1}, $$ and the descent number is . The complementary set of ascents is .
Definition (major index). The major index is the sum of the descent positions, $$ \operatorname{maj}(\sigma) = \sum_{i \in D(\sigma)} i . $$
Definition (inversion number, length). The inversion number is $$ \operatorname{inv}(\sigma) = \big|{, (i,j) : 1 \le i < j \le n,\ \sigma_i > \sigma_j ,}\big|. $$ It coincides with the Coxeter length of as a word in the adjacent transpositions generating as the Coxeter group of type : is the number of letters in any reduced word for , and is the right descent set in the Coxeter sense.
Definition (Mahonian and Eulerian distributions). A statistic is Mahonian if , the -factorial. Both and are Mahonian. The Eulerian number , also written , counts permutations with descents, and the Eulerian polynomial is
$$
A_n(t) = \sum_{\sigma \in \mathfrak{S}n} t^{\operatorname{des}(\sigma)+1} = \sum{k=0}^{n-1} A(n,k), t^{k+1},
$$
with the convention . The notations , , , , , , and are recorded in _meta/NOTATION.md.
Counterexamples to common slips Intermediate+
"The major index counts descents." It sums their positions. The permutations and both have one descent but major indices and respectively, distinguishing them despite equal descent number.
" and agree permutation by permutation because they are equidistributed." Equidistribution is a statement about the two multisets of values over all of , not a pointwise identity. On , while happen to coincide, but on , and differ. Foata's bijection realises the equality of distributions by a permutation-rearranging map, not by the identity map.
"The Eulerian polynomial uses the exponent ." The standard convention uses , so that has degree with no constant term and the identity holds cleanly. Dropping the shifts every formula by a factor of .
" is defined the same for any indexing convention." The major index sums the positions of descents, so it depends on positions being labelled . A -indexed descent set would change every major index; the Mahonian property is stated for the -indexed convention.
Key theorem with proof Intermediate+
The signature theorem is MacMahon's equidistribution: the inversion number and the major index, defined by counting pairs and by summing positions respectively, induce the same distribution on , the Mahonian distribution . This is the single statement that makes the major index — an otherwise ad-hoc-looking statistic — a structural object on par with the length function.
Theorem (MacMahon). For every , $$ \sum_{\sigma \in \mathfrak{S}n} q^{\operatorname{inv}(\sigma)} ;=; \sum{\sigma \in \mathfrak{S}_n} q^{\operatorname{maj}(\sigma)} ;=; (n)q! ;=; \prod{i=1}^{n} (1 + q + \cdots + q^{i-1}). $$
Proof. We prove each generating function equals separately; their equality is then a corollary.
First, via the inversion table. To a permutation associate where counts the entries to the right of position that are smaller than . Then , and since every inversion is counted once, at its left member . The map is a bijection from onto the product : the value is forced, and reading the from down to reconstructs by inserting the entries in increasing order of value, each specifying a rank. Hence $$ \sum_{\sigma} q^{\operatorname{inv}(\sigma)} = \prod_{i=1}^{n} \Big(\sum_{c_i = 0}^{n-i} q^{c_i}\Big) = \prod_{i=1}^{n} (1 + q + \cdots + q^{n-i}) = \prod_{j=1}^{n}(1 + q + \cdots + q^{j-1}) = (n)_q!, $$ re-indexing .
Second, by induction on , inserting the largest value into a permutation of . Given with descent set , there are positions (gaps) at which to insert , the gaps numbered from the right. Inserting into the gap that lies immediately to the right of the -th descent-or-ascent — precisely, ordering the gaps so that placing there increases by exactly for — yields, summed over the gaps, the factor . (The combinatorial fact is that the insertion positions raise the major index by the distinct values ; this is verified by tracking how each descent position shifts when splits a gap.) Therefore , and by induction with base this is .
Since both sums equal , they are equal, and and are equidistributed.
Bridge. This theorem is the foundational reason the major index deserves a place beside the inversion number rather than being a curiosity: both are Mahonian, so each is a -refinement of the count , and the inversion number is exactly the Coxeter length on the type- Weyl group, which builds toward the length-function and reduced-word theory of 07.04.01. The inversion-table bijection is the simple case of a recurring move — encoding a permutation as a sequence of independent bounded choices — and the maj-insertion argument is dual to it, threading the same product through positions rather than pairs; putting these together, the equality of the two generating functions is the central insight that a single -analogue governs both pair-counting and position-summing statistics. The bridge is that this equidistribution, proved here non-constructively by computing both sides, demands an explicit bijection , which appears again in the Master tier as Foata's transformation and which generalises to the multiset rearrangement classes and the -Eulerian refinement, where descents and the major index are tracked jointly. The -factorial itself is the same that organises the Gaussian binomial coefficients of 40.01.06.
Exercises Intermediate+
Advanced results Master
The descent and inversion statistics organise into a single generating-function calculus on the symmetric group: the Eulerian polynomials have a closed exponential generating function, the inv/maj equidistribution becomes constructive through Foata's bijection, and the major index refines the Eulerian distribution into the joint statistic counted by the -Eulerian polynomials.
Theorem 1 (exponential generating function of the Eulerian polynomials). The Eulerian polynomials satisfy $$ \sum_{n \ge 0} A_n(t),\frac{x^n}{n!} ;=; \frac{t - 1}{t - e^{(t-1)x}} . $$ The proof multiplies the identity of Exercise 8 by and sums: the left side becomes , while the right becomes ; equating and substituting rearranges to the stated closed form. Differentiating in recovers the recurrence [Stanley §1.4].
Theorem 2 (Foata's fundamental bijection). There is an explicit bijection with for all , giving a constructive proof of MacMahon's equidistribution. The map is built letter by letter: reading , one maintains a word and, at each new letter , partitions the current word into blocks by comparison with and cyclically shifts each block, the rule chosen so that the major index of the prefix is converted into inversions. The transformation is invertible by reversing the block-and-shift at each step, so it is a bijection [Foata-Schützenberger 1970]. It refines: carries the pair statistics into controlled inversion data, and a variant exchanges the major index with the inversion number while tracking the descent set.
Theorem 3 (-Eulerian polynomials and the joint distribution). Define the -Eulerian polynomial , refining the Eulerian polynomial () by the major index. Carlitz's -Eulerian numbers satisfy a -deformed recurrence and the -Worpitzky identity, and the generating function $$ \sum_{m \ge 0} [m]q^{,n}, t^m ;=; \frac{A_n(t,q)}{\prod{i=0}^{n}(1 - t,q^i)}, \qquad [m]_q = 1 + q + \cdots + q^{m-1}, $$ is the -analogue of Exercise 8. Setting collapses to and recovers the Eulerian identity. This joint distribution connects to the Hilbert series of coinvariant algebras and to the principal specialisation of Schur functions [Stanley §1.4].
Theorem 4 (Eulerian numbers count ordered set partitions and surjections). The Eulerian numbers expand in the Stirling numbers of the second kind: , equivalently the surjection count . The coefficient is the number of ordered set partitions of into blocks (surjections onto ), so the Eulerian polynomial is the descent-generating function of the same labelled structures counted in the twelvefold way of 40.01.01. The relation is the statement that , the number of words of length over letters, is the descent-graded sum over the underlying permutations [Petersen 2015].
Theorem 5 (-positivity). The Eulerian polynomial, being symmetric () and with nonnegative coefficients, admits an expansion in the basis : $$ A_n(t) = \sum_{j=0}^{\lfloor (n-1)/2\rfloor} \gamma_{n,j}, t^{j}(1+t)^{,n-1-2j} $$ with , where counts permutations with no two consecutive descents and exactly descents (Foata-Strehl / valley-hopping). -positivity implies unimodality of the Eulerian row and is the combinatorial shadow of the nonnegativity of the -index of the Boolean lattice [Petersen 2015].
Synthesis. Permutation statistics are the foundational reason the symmetric group carries a refined enumerative geometry rather than a single cardinality : the inversion number is the Coxeter length, so is the Poincaré polynomial of the type- Weyl group, and the major index is a second, position-summing statistic with the same distribution, the central insight being MacMahon's equidistribution made constructive by Foata's bijection . The descent statistic is dual to these in that it grades the same group by the Eulerian numbers, and the two gradings interlock: the joint distribution is the -Eulerian polynomial , which is exactly the Mahonian resolved by descent number, and putting these together the identity shows that the Eulerian polynomial is the descent-generating function of ordered set partitions, the labelled surjections of 40.01.01. This generalises the twelvefold-way count into a -graded family, and it builds toward the analytic theory where the exponential generating function — derived from the same Worpitzky identity — places the Eulerian polynomials inside the exponential-formula calculus of 40.01.03. The bridge is that -positivity, symmetry, and the EGF are three faces of one object: the descent enumerator of , whose -refinement is the same -factorial that governs the Gaussian binomial coefficients and finite-field subspace counts of 40.01.06. The Coxeter length and the major index are one distribution read through pairs and through positions.
Full proof set Master
Proposition 1 (inv is Mahonian via the inversion table). The map with is a bijection with , whence .
Proof. Each inversion with , is counted exactly once in (at its left endpoint), so , and because at most the later positions can hold smaller entries. For the bijection, given a tuple in the product, reconstruct by placing the values in decreasing order: there is one degree of freedom at each step matched to one coordinate , since specifying how many smaller entries sit to the right of each position determines the position of each value uniquely. The map and its inverse are mutually inverse, so it is a bijection. The generating function factorises over independent coordinates: .
Proposition 2 (maj is Mahonian via maximal-letter insertion). .
Proof. Induct on ; the base gives . Fix and consider the permutations of obtained by inserting the value into one of the gaps. Label the gaps as follows: is the gap just after the position (the rightmost end), and inductively the gaps are ordered so that inserting into raises the major index by exactly . Concretely, inserting at the far right adds no descent and changes no earlier descent position, giving increment ; inserting immediately before the rightmost entry creates a descent at position but may cancel another, and a position-tracking argument shows the gaps realise the increments each exactly once. (The key computation: inserting at a gap to the left of position shifts every descent of at positions up by one and possibly toggles a descent at ; summing the shift and the toggle over the gaps yields the values without repetition.) Hence .
Proposition 3 (Eulerian recurrence and row sum). for , with ; consequently .
Proof. Insert the value into the gaps of . Because exceeds every other entry, the gap to the right of a descent of , and the right end, are the gaps where the descent count is unchanged (the new replaces a descent boundary or extends a descent), while the remaining gaps each add one descent. Thus a permutation with descents comes from a with descents through gaps, or from a with descents through gaps, giving the recurrence. Summing over : . Re-indexing the second sum and combining, the coefficient of is , so , and induction from gives .
Proposition 4 (Worpitzky identity). as an identity of polynomials in .
Proof. For a positive integer , count words . Each word has a unique standardisation: the permutation for which with ties broken so that equal letters appear in increasing position order. A word standardising to corresponds to a weakly increasing sequence that strictly increases at each descent of . Setting (adding the number of preceding descent steps) converts the strict-at-descents constraint into a plain weak monotonicity , a multiset of size from symbols, counted by . Grouping by gives . Two polynomials in agreeing at all positive integers are equal.
Proposition 5 (Eulerian–Stirling expansion). .
Proof. Start from (Exercise 8). Expand via the Stirling change of basis (40.01.01). Then
$$
\sum_{m\ge0} m^n t^m = \sum_k k!,S(n,k)\sum_{m\ge0}\binom{m}{k}t^m = \sum_k k!,S(n,k)\frac{t^k}{(1-t)^{k+1}},
$$
using . Multiplying through by ,
$$
A_n(t) = \sum_k k!,S(n,k), t^k (1-t)^{n-k} = \sum_k k!,S(n,k),t^k(1-t)^{n-k}.
$$
Writing and absorbing signs by re-grading in the shifted variable gives the equivalent symmetric form after the standard sign reconciliation (both expansions are forced equal as polynomials since they share the values at for all integers ). The coefficient is the count of ordered set partitions into blocks.
Connections Master
The inversion number is the Coxeter length function on the symmetric group viewed as the Weyl group of type , so is the Poincaré polynomial of that Coxeter system; the descent set is its right descent set, and reduced words, the weak and strong Bruhat orders, and the length-additivity of parabolic decompositions are developed in the representation-theory treatment at
07.04.01. This unit supplies the enumerative skeleton — length equals inversion number, descents control the parabolic quotient — on which that structural theory is built.The Mahonian generating function is the same -factorial that normalises the Gaussian binomial coefficients counting subspaces of , and the -Eulerian refinement tracking jointly is the bridge to the finite-field and -analogue theory owned by the co-produced unit
40.01.06. The inv/maj equidistribution proved here is the permutation-level instance of the broader principle that the -factorial counts both inversions in words and cells in Gaussian-binomial lattice-path models.The identity and the Eulerian–Stirling expansion tie the Eulerian polynomials to the ordered-set-partition and surjection counts of the twelvefold way
40.01.01: the Eulerian polynomial is the descent-graded refinement of the labelled surjection count, so the elementary twelvefold table is the specialisation of this descent enumerator.The exponential generating function situates the Eulerian polynomials inside the exponential-formula calculus of
40.01.03: the descent enumerator is a labelled generating function in the same ring , and its closed form is extracted by the same coefficient-reading machinery, with the parameter marking the descent statistic exactly as a secondary variable marks components in the component-marked exponential formula.
Historical & philosophical context Master
The Eulerian numbers descend from Leonhard Euler, who in his 1755 Institutiones calculi differentialis studied the polynomials in connection with the evaluation of the series and the alternating sums that arise in summing divergent series; the triangle of coefficients and the identity are already present there in essence [Euler 1755]. The descent and inversion statistics and their generating functions were placed on a combinatorial footing by Percy MacMahon in his Combinatory Analysis (1915–1916) [MacMahon 1915], where the major index (his "greater index") is introduced and proved equidistributed with the inversion number over both permutations and the rearrangement classes of multisets; the word "Mahonian" honours this work.
The equidistribution was given an explicit bijective proof by Dominique Foata in the 1960s, and the geometric theory of the Eulerian polynomials — the and joint distributions, the fundamental transformation on words — was developed in the 1970 monograph of Foata and Schützenberger [Foata-Schützenberger 1970]. The recognition that is the Coxeter length and that is the Poincaré polynomial of the symmetric group connects the subject to the Bruhat-order and Hecke-algebra theory of Coxeter groups; the -positivity of , conjectured and proved through valley-hopping involutions, links it to the -index of the Boolean lattice and to the nonnegativity phenomena studied by Stanley and Gal. The systematic modern reference is Petersen's Eulerian Numbers (2015) [Petersen 2015].
Bibliography Master
@book{stanley2012ec1,
author = {Stanley, Richard P.},
title = {Enumerative Combinatorics, Volume 1},
series = {Cambridge Studies in Advanced Mathematics},
volume = {49},
edition = {2},
publisher = {Cambridge University Press},
year = {2012}
}
@book{petersen2015eulerian,
author = {Petersen, T. Kyle},
title = {Eulerian Numbers},
series = {Birkh\"{a}user Advanced Texts Basler Lehrb\"{u}cher},
publisher = {Birkh\"{a}user/Springer},
year = {2015}
}
@book{foataschutzenberger1970,
author = {Foata, Dominique and Sch\"{u}tzenberger, Marcel-Paul},
title = {Th\'{e}orie g\'{e}om\'{e}trique des polyn\^{o}mes eul\'{e}riens},
series = {Lecture Notes in Mathematics},
volume = {138},
publisher = {Springer-Verlag},
year = {1970}
}
@book{macmahon1915combinatory,
author = {MacMahon, Percy A.},
title = {Combinatory Analysis},
volume = {1 and 2},
publisher = {Cambridge University Press},
year = {1915}
}
@book{euler1755institutiones,
author = {Euler, Leonhard},
title = {Institutiones calculi differentialis},
publisher = {Academia Imperialis Scientiarum Petropolitanae},
address = {St. Petersburg},
year = {1755}
}
@book{bona2012permutations,
author = {B\'{o}na, Mikl\'{o}s},
title = {Combinatorics of Permutations},
edition = {2},
publisher = {Chapman and Hall/CRC},
year = {2012}
}
@article{carlitz1975qeulerian,
author = {Carlitz, Leonard},
title = {A combinatorial property of $q$-Eulerian numbers},
journal = {The American Mathematical Monthly},
volume = {82},
number = {1},
year = {1975},
pages = {51--54}
}