Maths Olympiad Prep

Library / Harvard-MIT Mathematics Tournament /263 of 352

Harvard-MIT Mathematics Tournament

Combinatorics Difficulty 5.4 AIME, harder Prove it United States

Problem:

For integer n,m≥1n, m \geq 1, let A(n,m)A(n, m) denote the number of functions f:{1,2,…,n}→{1,2,…,m}f:\{1,2, \ldots, n\} \rightarrow \{1,2, \ldots, m\} such that f(j)−f(i)≤j−if(j)-f(i) \leq j-i for all 1≤i<j≤n1 \leq i < j \leq n, and let B(n,m)B(n, m) denote the number of functions g:{0,1,…,2n+m}→{0,1,…,m}g:\{0,1, \ldots, 2n+m\} \rightarrow \{0,1, \ldots, m\} such that g(0)=0g(0)=0, g(2n+m)=mg(2n+m)=m, and ∣g(i)−g(i−1)∣=1|g(i)-g(i-1)|=1 for all 1≤i≤2n+m1 \leq i \leq 2n+m. Prove that A(n,m)=B(n,m)A(n, m) = B(n, m).

Solution

Solution:

We first note that the condition for ff is equivalent to i−f(i)≤j−f(j)i - f(i) \leq j - f(j) for all 1≤i<j≤n1 \leq i < j \leq n. Letting f′(x)=x−f(x)f'(x) = x - f(x), we see this is equivalent to saying that f′f' is decreasing. Thus, we only need that f′(x)≤f′(x+1)f'(x) \leq f'(x+1); in other words, we only require the statement to be true for j=i+1j = i+1.

Fix m,nm, n. For any function gg satisfying the conditions for BB, we construct a function ff satisfying the conditions for AA as follows. For a given function gg and 1≤i≤2n+m1 \leq i \leq 2n + m, say that gg has an up step at ii if g(i)−g(i−1)=1g(i) - g(i-1) = 1, and say it has a down step at ii otherwise. We see that gg must be composed of m+nm + n up steps and nn down steps. Let i1,i2,…,ini_1, i_2, \ldots, i_n be the indices for which down steps occur, in ascending order. Let ff be the function such that f(j)=(m+1)−g(ij)f(j) = (m+1) - g(i_j) for 1≤j≤n1 \leq j \leq n. By our argument in the first paragraph, it suffices to show that f(k)−f(k−1)≤1f(k) - f(k-1) \leq 1 for 1<k≤n1 < k \leq n, or that g(ik−1)−1≤g(ik)g(i_{k-1}) - 1 \leq g(i_k). If this were not the case for some kk, then there would be at least 1 down step in between ik−1i_{k-1} and iki_k, a contradiction, so the condition indeed holds.

We now claim that this construction is a bijection. For injectivity, note that for any two distinct g,g′g, g', there exists a kk for which the values of g(ik),g′(ik′)g(i_k), g'(i'_k) are distinct, in which case the functions f,f′f, f' must be distinct. For surjectivity, consider any suitable ff. Let f′f' be the function such that f′(k)=(m+1)−f(k)f'(k) = (m+1) - f(k) for all 1≤k≤n1 \leq k \leq n. (The range of this function is still {1,2,…,m}\{1,2, \ldots, m\}.) Then, we can find a gg as follows: for each 1≤k≤n1 \leq k \leq n in sequence, have gg make up steps until it reaches the value f′(k)f'(k), then take one down step. This is always possible, as f′(k+1)−f′(k)≤1f'(k+1) - f'(k) \leq 1. Thus, our claim is true, and our proof is complete.

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.