Olympiad Maths Prep

Track / Stage 5 / 43 of 400 #643 of 2000

Problem 643

AIME late
Combinatorics Difficulty 5.1 Prove it Harvard-MIT Mathematics Tournament · United States

Problem:
Let A={1,2,,2011}A=\{1,2, \ldots, 2011\}. Find the number of functions ff from AA to AA that satisfy f(n)nf(n) \leq n for all nn in AA and attain exactly 2010 distinct values.

This one wants a proof. Work it on paper, read the official solution, then mark yourself honestly — the ladder only means something if the record is true.

Official solution

Solution:
Answer: 2201120122^{2011}-2012

Let nn be the element of AA not in the range of ff. Let mm be the element of AA that is hit twice.

We now sum the total number of functions over n,mn, m. Clearly f(1)=1f(1)=1, and by induction, for xmx \leq m, f(x)=xf(x)=x. Also unless n=2011n=2011, f(2011)=2011f(2011)=2011 because ff can take no other number to 20112011. It follows from backwards induction that for x>nx>n, f(x)=xf(x)=x. Therefore n>mn>m, and there are only nmn-m values of ff that are not fixed.

Now f(m+1)=mf(m+1)=m or f(m+1)=m+1f(m+1)=m+1. For m<k<nm<k<n, given the selection of f(1),f(2),,f(k1)f(1), f(2), \ldots, f(k-1), k1k-1 of the k+1k+1 possible values of f(k+1)f(k+1) (1,2,3,,k1,2,3, \ldots, k, and counting mm twice) have been taken, so there are two distinct values that f(k+1)f(k+1) can take (one of them is k+1k+1, and the other is not, so they are distinct). For f(n)f(n), when the other 2010 values of ff have been assigned, there is only one missing, so f(n)f(n) is determined.

For each integer in [m,n)[m, n), there are two possible values of ff, so there are 2nm12^{n-m-1} different functions ff for a given m,nm, n. So our answer is

m=12010n=m+120112nm1=m=120102m1n=m+120112n=m=120102m1(220122m+1)=m=1201022011m1=(m=120102m)2010=220112012 \begin{aligned} \sum_{m=1}^{2010} \sum_{n=m+1}^{2011} 2^{n-m-1} & =\sum_{m=1}^{2010} 2^{-m-1} \sum_{n=m+1}^{2011} 2^{n} \\ & =\sum_{m=1}^{2010} 2^{-m-1}\left(2^{2012}-2^{m+1}\right) \\ & =\sum_{m=1}^{2010} 2^{2011-m}-1 \\ & =\left(\sum_{m=1}^{2010} 2^{m}\right)-2010 \\ & =2^{2011}-2012 \end{aligned}

Source: MathNet, licensed CC-BY-4.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.