Maths Olympiad Prep

Library / Annual Harvard-MIT Mathematics Tournament /65 of 72

Annual Harvard-MIT Mathematics Tournament

Combinatorics Difficulty 5.7 AIME, harder Prove it United States

Problem:
Let SS be the set {1,2,…,2012}\{1,2, \ldots, 2012\}. A perfectutation is a bijective function hh from SS to itself such that there exists an a∈Sa \in S such that h(a)≠ah(a) \neq a, and that for any pair of integers a∈Sa \in S and b∈Sb \in S such that h(a)≠a,h(b)≠bh(a) \neq a, h(b) \neq b, there exists a positive integer kk such that hk(a)=bh^{k}(a)=b. Let nn be the number of ordered pairs of perfectutations (f,g)(f, g) such that f(g(i))=g(f(i))f(g(i))=g(f(i)) for all i∈Si \in S, but f≠gf \neq g. Find the remainder when nn is divided by 2011.

Solution

Solution:
Answer: 2

Note that both ff and gg, when written in cycle notation, must contain exactly one cycle that contains more than 1 element. Assume ff has kk fixed points, and that the other 2012−k2012-k elements form a cycle, (of which there are (2011−k)!(2011-k)! ways).

Then note that if ff fixes aa then f(g(a))=g(f(a))=g(a)f(g(a))=g(f(a))=g(a) implies ff fixes g(a)g(a). So gg must send fixed points of ff to fixed points of ff. It must, therefore, send non-fixed points to non-fixed points. This partitions SS into two sets, at least one of which must be fixed by gg, since gg is a perfectutation.

If gg fixes all of the non-fixed points of ff, then, since any function commutes with the identity, gg fixes some mm of the fixed points and cycles the rest in (k−m−1)!(k-m-1)! ways. So there are ∑m=0k−2(km)(k−m−1)!\sum_{m=0}^{k-2}\binom{k}{m}(k-m-1)! choices, which is ∑m=0k−2k!(k−m)m!\sum_{m=0}^{k-2} \frac{k!}{(k-m) m!}.

If gg fixes all of the fixed points of ff, then order the non-fixed points of ff a1,a2,…,a2012−ka_{1}, a_{2}, \ldots, a_{2012-k} such that f(ai)=ai+1f\left(a_{i}\right)=a_{i+1}. If g(ai)=ajg\left(a_{i}\right)=a_{j} then f(g(ai))=aj+1f\left(g\left(a_{i}\right)\right)=a_{j+1} thus g(ai+1)=aj+1g\left(a_{i+1}\right)=a_{j+1}. Therefore the choice of g(a1)g\left(a_{1}\right) uniquely determines g(ai)g\left(a_{i}\right) for the rest of the ii, and g(am)=am+j−ig\left(a_{m}\right)=a_{m+j-i}. But gg has to be a perfectutation, so gg cycles through all the non-fixed points of ff, which happens if and only if j−ij-i is relatively prime to 2012−k2012-k. So there are ϕ(2012−k)\phi(2012-k) choices.

Therefore for any ff there are ∑m=0k−2k!(k−m)m!+ϕ(2012−k)\sum_{m=0}^{k-2} \frac{k!}{(k-m) m!}+\phi(2012-k) choices of gg, but one of them will be g=fg=f, which we cannot have by the problem statement. So there are −1+∑m=0k−2k!(k−m)m!+ϕ(2012−k)-1+\sum_{m=0}^{k-2} \frac{k!}{(k-m) m!}+\phi(2012-k) options.

Now note that a permutation can not fix all but one element. So
n=∑k=02010(2012k)(2011−k)!(−1+∑m=0k−2k!(k−m)m!+ϕ(2012−k)) n=\sum_{k=0}^{2010}\binom{2012}{k}(2011-k)!\left(-1+\sum_{m=0}^{k-2} \frac{k!}{(k-m) m!}+\phi(2012-k)\right)
Modulo 2011 (which is prime), note that all terms in the summand except the one where k=1k=1 vanish. Thus, n≡(2010)!(−1+(−1))≡2(mod2011)n \equiv (2010)!(-1+(-1)) \equiv 2 \pmod{2011} by Wilson's Theorem.

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

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