Key idea of this section
Every permutation is a product of transpositions; the parity of the
number of factors is an invariant. sgn(σ) = (−1)n − κ(σ) = (−1)inv(σ).
sgn : Sₙ → {±1} is a homomorphism; its kernel is the alternating group Aₙ.Generation by transpositions
With right-to-left composition, an ℓ-cycle factors as a product of ℓ − 1 transpositions:
(a₁ a₂ ⋯ aℓ) = (a₁ aℓ)(a₁ aℓ−1) ⋯ (a₁ a₃)(a₁ a₂).
To verify, apply the right-hand side to aᵢ with 1 ≤ i < ℓ: the factors (a₁ a₂), …, (a₁ ai−1) fix aᵢ, the factor (a₁ aᵢ) sends it to a₁, the next factor (a₁ ai+1) sends a₁ to ai+1, and the remaining factors fix ai+1. Finally aℓ is fixed by every factor except the last one applied, (a₁ aℓ), which sends it to a₁. Combining with Theorem 2.2, every σ ∈ Sₙ is a product of exactly n − κ(σ) transpositions, since a cycle decomposition with κ(σ) cycles (fixed points included) uses ∑(λⱼ − 1) = n − κ(σ) transpositions. In fact Sₙ is generated by the n − 1 adjacent transpositions sᵢ = (i i+1), since (i j) for i < j can be written as a conjugate of sj−1 by si si+1 ⋯ sj−2.
The parity theorem
The factorisation into transpositions is far from unique: (1 2 3) = (1 3)(1 2) = (2 3)(1 3) = (1 3)(1 2)(4 5)(4 5). What is invariant is the parity of the number of factors. This is the deepest elementary fact about Sₙ, and we give three proofs, since each illuminates a different structure.
Lemma 3.1. Let σ ∈ Sₙ and let τ = (a b) be a transposition. If a and b lie in the same cycle of σ, then τσ is obtained from σ by splitting that cycle into two, so κ(τσ) = κ(σ) + 1. If a and b lie in different cycles of σ, then τσ is obtained by merging those two cycles into one, so κ(τσ) = κ(σ) − 1.
Proof. Suppose first that a and b lie in the same cycle, which we write as (a x₁ ⋯ xr b y₁ ⋯ ys) with r, s ≥ 0. We compute τσ on the points of this cycle. A point whose σ-image is neither a nor b is moved by σ and then left alone by τ. The point whose σ-image is b — namely xr, or a itself if r = 0 — is sent to τ(b) = a. The point whose σ-image is a — namely ys, or b itself if s = 0 — is sent to τ(a) = b. Hence on this set τσ acts as the two cycles (a x₁ ⋯ xr)(b y₁ ⋯ ys), and all other cycles of σ are unchanged; so κ increases by one. If instead a and b lie in different cycles of σ, write these as (a x₁ ⋯ xr) and (b y₁ ⋯ ys). Now xr (or a, if r = 0) is sent by σ to a and then by τ to b, while ys (or b, if s = 0) is sent to b and then to a; every other point of the two cycles is moved by σ and fixed by τ. Hence τσ acts on their union as the single cycle (a x₁ ⋯ xr b y₁ ⋯ ys), and κ decreases by one. ∎
For the parity theorem only the fact that κ changes by exactly ±1 matters.
Theorem 3.2 (Parity). If σ = τ₁τ₂⋯τm is a product of m transpositions, then m ≡ n − κ(σ) (mod 2). Consequently the map sgn(σ) = (−1)n − κ(σ) is well defined and satisfies sgn(στ) = sgn(σ) sgn(τ).
First proof (counting cycles). Induct on m. For m = 0, σ is the identity, which has κ = n cycles, and n − n = 0. If σ = τ₁σ' with σ' a product of m − 1 transpositions, then by induction m − 1 ≡ n − κ(σ'), and by Lemma 3.1 κ(σ) = κ(σ') ± 1, so n − κ(σ) ≡ n − κ(σ') + 1 ≡ m. Multiplicativity follows: if σ and τ are products of m and m' transpositions, then στ is a product of m + m' transpositions. ∎
Second proof (the Vandermonde product). Let Δ(x₁, …, xₙ) = ∏i<j (xⱼ − xᵢ), and let Sₙ act on polynomials by (σ·F)(x₁, …, xₙ) = F(xσ(1), …, xσ(n)). Each pair {i, j} occurs exactly once among the factors of σ·Δ, possibly with the order reversed, so σ·Δ = ε(σ)Δ with ε(σ) = ±1; precisely, ε(σ) = (−1)inv(σ), where inv(σ) = #{(i, j) : i < j, σ(i) > σ(j)} counts the reversed pairs. The action is compatible with composition: substituting shows σ·(τ·F) = (στ)·F, so ε(στ)Δ = σ·(ε(τ)Δ) = ε(σ)ε(τ)Δ, and ε is a homomorphism. A transposition has ε = −1: for (i j) with i < j, the inverted pairs are (i, j) itself together with (i, k) and (k, j) for each i < k < j, giving 2(j − i − 1) + 1 inversions, an odd number. Hence any expression of σ as a product of m transpositions has ε(σ) = (−1)m, and the parity of m is determined by σ. ∎
Third proof (determinants). Let Mσ be the permutation matrix with entries (Mσ)σ(j), j = 1 and zeros elsewhere, so that Mσ Mτ = Mστ. Swapping two columns of the identity matrix negates the determinant, so det Mτ = −1 for every transposition, and multiplicativity of the determinant gives det Mσ = (−1)m whenever σ is a product of m transpositions. ∎
The three proofs give three formulas for the same homomorphism:
sgn(σ) = (−1)n − κ(σ) = (−1)inv(σ) = det Mσ = (−1)number of cycles of even length.
The last expression follows from the first, since n − κ(σ) = ∑ⱼ (λⱼ − 1) and λⱼ − 1 is odd exactly when λⱼ is even. In particular an ℓ-cycle has sign (−1)ℓ−1: it is even if and only if its length is odd.
The alternating group
The kernel Aₙ = {σ : sgn(σ) = 1} is a normal subgroup of index 2 for n ≥ 2, so |Aₙ| = n!/2. For n ≥ 3 it is generated by 3-cycles: every even permutation is a product of an even number of transpositions, and each product of two transpositions is a product of 3-cycles, since (a b)(a c) = (a c b) when the transpositions share a point and (a b)(c d) = (a b c)(b c d) when they are disjoint. For n ≥ 5, Aₙ is simple, a fact closely tied to the insolubility of the general quintic; we prove the case n = 5 in Lesson 4.
Inversions and adjacent transpositions
The number of inversions has a second meaning: inv(σ) is the minimal number of adjacent transpositions sᵢ needed to express σ. Indeed, if σ(i) > σ(i+1) then σ sᵢ (which swaps the entries in positions i and i+1 of the one-line word) has exactly one fewer inversion, so bubble sort reduces σ to the identity in inv(σ) steps; conversely each adjacent swap changes inv by exactly one, so no shorter expression exists. This is the length function of Sₙ regarded as the Coxeter group with generators s₁, …, sn−1 and relations sᵢ² = 1, sᵢsⱼ = sⱼsᵢ for |i − j| ≥ 2, and sᵢsi+1sᵢ = si+1sᵢsi+1. The maximum length n(n−1)/2 is attained only by the reversal n(n−1)⋯1.
An application: the fifteen puzzle
In the fifteen puzzle, fifteen numbered tiles and one blank occupy a 4 × 4 grid, and a move slides a tile into the blank. Regard the configuration as a permutation of the 16 cells. Each move is a transposition of the blank with a neighbouring tile. Colour the grid like a chessboard: each move changes the colour of the blank's cell, so if the blank returns to its starting corner, an even number of moves has been made and the resulting permutation is even. The configuration in which only tiles 14 and 15 are interchanged, with the blank in its home corner, is a single transposition, hence odd, hence unreachable. Story, in the joint paper of Johnson and Story (1879), proved the converse: every even configuration with the blank home is reachable.
Exercise
- (a)Compute inv(3 1 4 2) and confirm that it has the same parity as n − κ(σ).
- (b)What is the sign of a permutation of [12] with cycle type (4, 3, 2, 2, 1)?
- (c)How many even permutations does S₆ contain?
Show solution
Answers: (a) The inversions are (3,1), (3,2), (4,2), so inv = 3 and sgn = −1; the cycle decomposition is the single 4-cycle (1 3 4 2), so n − κ = 4 − 1 = 3, also odd. (b) n − κ = 12 − 5 = 7 is odd (equivalently, there are three cycles of even length), so the sign is −1. (c) |A₆| = 720/2 = 360.