Maths Olympiad Prep

Library / /356 of 377

Combinatorics Difficulty 5.8 AIME, harder Prove it United States

Problem:

For a permutation σ\sigma of 1,2,,71,2, \ldots, 7, a transposition is a swapping of two elements. (For instance, we could apply a transposition to the permutation 3,7,1,4,5,6,23,7,1,4,5,6,2 and get 3,7,6,4,5,1,23,7,6,4,5,1,2 by swapping the 11 and the 66.)
Let f(σ)f(\sigma) be the minimum number of transpositions necessary to turn σ\sigma into the permutation 1,2,3,4,5,6,71,2,3,4,5,6,7. Find the sum of f(σ)f(\sigma) over all permutations σ\sigma of 1,2,,71,2, \ldots, 7.

Solution

Solution:

To solve this problem, we use the idea of a cycle in a permutation. If σ\sigma is a permutation, we say that (a1a2ak)(a_{1} a_{2} \cdots a_{k}) is a cycle if σ(ai)=ai+1\sigma(a_{i})=a_{i+1} for 1ik11 \leq i \leq k-1 and σ(ak)=a1\sigma(a_{k})=a_{1}. Any permutation can be decomposed into disjoint cycles; for instance, the permutation 3,7,6,4,5,1,23,7,6,4,5,1,2 can be written as (136)(27)(4)(5)(136)(27)(4)(5). For a permutation σ\sigma, let g(σ)g(\sigma) be the number of cycles in its cycle decomposition. (This includes single-element cycles.)

Claim. For any permutation σ\sigma on nn elements, f(σ)=ng(σ)f(\sigma)=n-g(\sigma).

Proof. Given a cycle (a1a2ak)(a_{1} a_{2} \cdots a_{k}) (with k2k \geq 2) of a permutation σ\sigma, we can turn this cycle into the identity permutation with k1k-1 transpositions; first we swap a1a_{1} and a2a_{2}; that is, we replace σ\sigma with a permutation σ\sigma' such that instead of σ(ak)=a1\sigma(a_{k})=a_{1} and σ(a1)=a2\sigma(a_{1})=a_{2}, we have σ(ak)=a2\sigma'(a_{k})=a_{2} and σ(a1)=a1\sigma'(a_{1})=a_{1}. Now, σ\sigma' takes a1a_{1} to itself, so we are left with the cycle (a2ak)(a_{2} \cdots a_{k}). We continue until the entire cycle is replaced by the identity, which takes k1k-1 transpositions. Now, for any σ\sigma, we resolve each cycle in this way, making a total of ng(σ)n-g(\sigma) transpositions, to turn σ\sigma into the identity permutation.

This shows that ng(σ)n-g(\sigma) transpositions suffice; now let us show that we cannot do it in less. We show that whenever we make a transposition, the value of ng(σ)n-g(\sigma) can never decrease by more than 11. Whenever we swap two elements, if they are in different cycles, then those two cycles merge into one; thus ng(σ)n-g(\sigma) actually increased. If the two elements are in one cycle, then the one cycle splits into two cycles, so ng(σ)n-g(\sigma) decreased by only one, and this proves the claim.

Thus, we want to find
σS7(7g(σ))=77!σS7g(σ) \sum_{\sigma \in S_{7}} (7-g(\sigma)) = 7 \cdot 7! - \sum_{\sigma \in S_{7}} g(\sigma)
To evaluate the sum, we instead sum over every cycle the number of permutations it appears in. For any 1k71 \leq k \leq 7, the number of cycles of size kk is 7!(7k)!k\frac{7!}{(7-k)!k}, and the number of permutations each such cycle can appear in is (7k)!(7-k)!. Thus we get that the answer is
77!k=177!k=22212 7 \cdot 7! - \sum_{k=1}^{7} \frac{7!}{k} = 22212

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.