Maths Olympiad Prep

Library / /433 of 740

, 2015

Combinatorics Difficulty 5.0 AIME, harder Prove it United States

Problem:
Let NN be the number of functions ff from {1,2,,101}{1,2,,101}\{1,2, \ldots, 101\} \rightarrow \{1,2, \ldots, 101\} such that f101(1)=2f^{101}(1)=2. Find the remainder when NN is divided by 103.

Solution

Solution:
For convenience, let n=101n=101. Compute the number of functions such that fn(1)=1f^{n}(1)=1. Since nn is a prime, there are 2 cases: the order of 11 is either 11 or nn. The first case gives nn1n^{n-1} functions, and the second case gives (n1)!(n-1)! functions. By symmetry, the number of ways for fn(1)=2f^{n}(1)=2 is
1n1(nnnn1(n1)!)=nn1(n2)! \frac{1}{n-1} \cdot \left(n^{n}-n^{n-1}-(n-1)!\right) = n^{n-1}-(n-2)!
Plugging in n=101n=101, we need to find
10110099!(2)2101!6=1/41/6=1/12=43(mod103). \begin{gathered} 101^{100}-99! \equiv (-2)^{-2} - \frac{101!}{6} \\ = 1/4 - 1/6 = 1/12 = 43 \quad (\bmod 103). \end{gathered}

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.