Key idea of this section
c(n, k) = #{σ ∈ Sₙ : κ(σ) = k}, the unsigned Stirling numbers of the first kind.
c(n+1, k) = n·c(n, k) + c(n, k−1)
∑ₖ c(n, k) xᵏ = x(x+1)(x+2)⋯(x+n−1) = x⁽ⁿ⁾The recurrence
Definition 5.1. For integers n, k ≥ 0, the unsigned Stirling number of the first kind c(n, k) is the number of permutations of [n] with exactly k cycles. By convention c(0, 0) = 1, and c(n, 0) = 0 for n ≥ 1.
Theorem 5.2. For n ≥ 0 and k ≥ 1, c(n+1, k) = n·c(n, k) + c(n, k−1).
Proof. Classify the permutations of [n+1] with k cycles according to the role of n+1. If n+1 is a fixed point, deleting it leaves a permutation of [n] with k − 1 cycles, and this is a bijection; this contributes c(n, k−1). Otherwise n+1 lies in a cycle of length at least 2; deleting it from its cycle (so that its predecessor now maps to its successor) gives a permutation of [n] with k cycles. Conversely, from a permutation of [n] with k cycles we can insert n+1 immediately after any one of the n symbols in its cycle, and each insertion gives a distinct permutation of [n+1] with k cycles. Hence this case contributes n·c(n, k). ∎
The table for small n follows immediately:
n \ k 1 2 3 4 5 6 1 1 2 1 1 3 2 3 1 4 6 11 6 1 5 24 50 35 10 1 6 120 274 225 85 15 1
Each row sums to n!, as it must. Some entries have closed forms: c(n, n) = 1; c(n, 1) = (n − 1)!, the number of n-cycles; c(n, n−1) = C(n, 2), since a permutation with n − 1 cycles is a single transposition; and c(n, 2) = (n − 1)! Hₙ₋₁, where Hₘ = 1 + 1/2 + ⋯ + 1/m. (For n = 5 this gives 24 · 25/12 = 50.) A slightly harder count gives c(n, n−2) = 2C(n, 3) + 3C(n, 4) = (3n − 1)C(n, 3)/4, the two terms counting permutations of type (3, 1, …) and (2, 2, 1, …).
The generating function
Theorem 5.3. For every n ≥ 0, ∑ₖ c(n, k) xᵏ = x(x + 1)⋯(x + n − 1).
Proof. Let Fₙ(x) be the left side. The recurrence of Theorem 5.2 says exactly Fₙ₊₁(x) = (x + n)Fₙ(x), and F₀ = 1. ∎
A second proof, which explains the factors, constructs a permutation of [n] by inserting the symbols 1, 2, …, n one at a time. When symbol j is inserted, it may start a new cycle (1 way, contributing a factor x to record the new cycle) or be placed after one of the j − 1 symbols already present (j − 1 ways). The j-th factor of the product is therefore x + (j − 1).
Setting x = −1 shows ∑ₖ (−1)ᵏ c(n, k) = 0 for n ≥ 2, which is the statement that Sₙ has equally many even and odd permutations, since sgn(σ) = (−1)n − κ(σ). The signed Stirling numbers s(n, k) = (−1)n−k c(n, k) satisfy
(x)ₙ = x(x − 1)⋯(x − n + 1) = ∑ₖ s(n, k) xᵏ,
obtained by replacing x by −x in Theorem 5.3. Together with the identity xⁿ = ∑ₖ S(n, k)(x)ₖ for the Stirling numbers of the second kind (Lesson 8), this shows that the lower-triangular matrices [s(n, k)] and [S(n, k)] are mutually inverse: they are the change-of-basis matrices between the bases {xⁿ} and {(x)ₙ} of the polynomial ring ℚ[x].
The exponential formula
The bivariate exponential generating function packages the whole table:
∑ₙ ∑ₖ c(n, k) yᵏ xⁿ/n! = (1 − x)−y = exp( y · ln(1/(1 − x)) ).
The first equality is Theorem 5.3, since x⁽ⁿ⁾ evaluated at y is the n-th coefficient of (1 − x)−y = ∑ y⁽ⁿ⁾ xⁿ/n!. The second form is an instance of the exponential formula of species theory: a permutation is a set of cycles, the exponential generating function of cycles is ∑ₘ (m − 1)! xᵐ/m! = ∑ₘ xᵐ/m = ln(1/(1 − x)), and taking sets of a structure corresponds to exponentiating, with y marking each cycle. The same formula with restricted cycle lengths gives, for instance, the permutations all of whose cycles have length in a set A: their exponential generating function is exp(∑m∈A xᵐ/m).
Foata's fundamental transformation
Theorem 5.4 (Foata). There is a bijection Φ : Sₙ → Sₙ such that the number of cycles of σ equals the number of left-to-right maxima (records) of the word Φ(σ). Consequently the number of permutations of [n] with exactly k records is c(n, k).
Proof. Given σ, write each cycle with its largest element first, and order the cycles by increasing first elements. Erase the parentheses to obtain a word Φ(σ). The first element of each cycle is larger than everything before it in the word (it exceeds every element of its own cycle and the leaders of earlier cycles, which in turn exceed every element of their cycles), and every other element is smaller than the leader of its own cycle, which precedes it. So the records of Φ(σ) are exactly the cycle leaders. Conversely, given a word, cut it immediately before each record; the pieces are the cycles, written in standard form, and this inverts Φ. ∎
For σ = (1 4 3)(2 7 5)(6 8), the standard forms are (4 3 1), (7 5 2), (8 6), and Φ(σ) = 4 3 1 7 5 2 8 6, whose records are 4, 7, 8 — three records for three cycles. Foata's transformation is the prototype of a large family of bijections in permutation statistics that convert cyclic structure (cycles, excedances) into linear structure (records, descents).
Exercise
- (a)Find c(6, 3) from the table, and check it against the recurrence.
- (b)Use the closed form for c(n, n−2) to compute c(7, 5).
- (c)Compute Φ((1 3)(2 5 4)) and count its records.
Show solution
Answers: (a) c(6, 3) = 5·c(5, 3) + c(5, 2) = 5 · 35 + 50 = 225. (b) c(7, 5) = (3 · 7 − 1) · C(7, 3)/4 = 20 · 35/4 = 175. (c) Standard forms (3 1) and (5 4 2); ordered by leaders, Φ = 3 1 5 4 2, with records 3 and 5: two records, matching two cycles.