Maths Olympiad Prep

Library / /20 of 104

Combinatorics Difficulty 5.2 AIME, harder Prove it Bulgaria

Problem:
Let A={1,2,,n},n4A=\{1,2, \ldots, n\}, n \geq 4. For any function f:AAf: A \rightarrow A and any aAa \in A define f1(a)=f(a)f_{1}(a)=f(a), fi+1(a)=f(fi(a))f_{i+1}(a)=f\left(f_{i}(a)\right), i1i \geq 1. Find the number of the functions ff such that fn2f_{n-2} is a constant function but fn3f_{n-3} is not.

Solution

Solution:
Define an oriented graph GG with vertices the elements of AA and oriented edge xyxy if f(x)=yf(x)=y. We have to count the graphs GG such that:
- there are no cycles with length greater than 11;
- there is a chain a2ana_{2} \ldots a_{n} with length n2n-2 and there is no chain with length n1n-1;
- the only edge outside this chain has the form a1aja_{1} a_{j}, where 3jn3 \leq j \leq n;
- there is a unique loop anana_{n} a_{n}.
The chain can be chosen in n!n! ways, and the edge outside it - in n2n-2 ways. Note that the graphs for which this edge is a1a3a_{1} a_{3}, are counted two times and hence their number is equal to (n2)(n2)!\binom{n}{2}(n-2)!. So the answer of the problem is
n!(n2)(n2)(n2)!=n!(2n5)2 n!(n-2)-\binom{n}{2}(n-2)!=\frac{n!(2n-5)}{2}

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.