Maths Olympiad Prep

Library / Harvard-MIT Mathematics Tournament /245 of 352

Harvard-MIT Mathematics Tournament

Combinatorics Difficulty 5.3 AIME, harder Prove it United States

Problem:
Let A={1,2,3,…,9}A=\{1,2,3, \ldots, 9\}. Find the number of bijective functions f:A→Af: A \rightarrow A for which there exists at least one i∈Ai \in A such that
∣f(i)−f−1(i)∣>1 \left|f(i)-f^{-1}(i)\right|>1

Solution

Solution:
Answer: 359108

We count the complement - the number of functions ff such that for all i∈Ai \in A, ∣f(i)−f−1(i)∣≤1\left|f(i)-f^{-1}(i)\right| \leq 1.

The condition is equivalent to ∣f(f(i))−i∣≤1|f(f(i))-i| \leq 1 for all i∈Ai \in A. If f(j)=jf(j)=j, the inequality is automatically satisfied for i=ji=j. Otherwise, if f(f(j))=jf(f(j))=j but f(j)=k≠jf(j)=k \neq j, then we will have f(f(k))=kf(f(k))=k, allowing the inequality to be satisfied for i=ji=j, kk. Else, if f(f(i))≠if(f(i)) \neq i, say f(f(i))=i+1f(f(i))=i+1 and f(i)=kf(i)=k, then f(f(k))=f(i+1)=k+1f(f(k))=f(i+1)=k+1 or k−1k-1. Thus the function ff allows us to partition the elements of AA into three groups:
(a) those such that f(i)=if(i)=i,
(b) those that form pairs {i,j}\{i, j\} such that f(i)=jf(i)=j and f(j)=if(j)=i, and
(c) those that form quartets {i,i+1,j,j+1}\{i, i+1, j, j+1\} such that ff permutes them as ( iji+1j+1\begin{aligned} & i \\ & j\end{aligned} i+1 \quad j+1 ) or (i j+1i+1jj+1 \quad i+1 \quad j ), in cycle notation.

Let aa be the number of elements of the second type. Note that aa is even.

Case 1: There are no elements of the third type. If a=8a=8, there are 9⋅7⋅5⋅3=9459 \cdot 7 \cdot 5 \cdot 3=945 possibilities. If a=6a=6, there are (93)⋅5⋅3=1260\binom{9}{3} \cdot 5 \cdot 3=1260 possibilities. If a=4a=4, there are (95)⋅3=378\binom{9}{5} \cdot 3=378 possibilities. If a=2a=2, there are (97)=36\binom{9}{7}=36 possibilities. If a=0a=0, there is 1 possibility. In total, case 1 offers 945+1260+378+36+1=2620945+1260+378+36+1=2620 possibilities.

Case 2: There are 4 elements of the third type. There are 21 ways to choose the quartet {i,i+1,j,j+1}\{i, i+1, j, j+1\}. For each way, there are two ways to assign the values of the function to each element (as described above). For the remaining 5 elements, we divide into cases according to the value of aa. If a=4a=4, there are 5×3=155 \times 3=15 possibilities. If a=2a=2, there are (53)=10\binom{5}{3}=10 possibilities. If a=0a=0, there is one possibility. In total, case 2 offers 21×2×(15+10+1)=109221 \times 2 \times(15+10+1)=1092 possibilities.

Case 3: There are 8 elements of the third type. There are 5 ways to choose the unique element not of the third type. Of the remaining eight, there are 3 ways to divide them into two quartets, and for each quartet, there are 2 ways to assign values of ff. In total, case 3 offers 5×3×22=605 \times 3 \times 2^{2}=60 possibilities.

Therefore, the number of functions f:A→Af: A \rightarrow A such that for at least one i∈Ai \in A, ∣f(i)−f−1(i)∣>1\left|f(i)-f^{-1}(i)\right|>1 is 9!−2620−1092−60=3591089! -2620-1092-60=359108.

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.