Maths Olympiad Prep

Library / /284 of 377

Combinatorics Difficulty 5.4 AIME, harder Prove it United States

Problem:

For integer n,m1n, 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)jif(j)-f(i) \leq j-i for all 1i<jn1 \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(i1)=1|g(i)-g(i-1)|=1 for all 1i2n+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 if(i)jf(j)i - f(i) \leq j - f(j) for all 1i<jn1 \leq i < j \leq n. Letting f(x)=xf(x)f'(x) = x - f(x), we see this is equivalent to saying that ff' 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 1i2n+m1 \leq i \leq 2n + m, say that gg has an up step at ii if g(i)g(i1)=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 1jn1 \leq j \leq n. By our argument in the first paragraph, it suffices to show that f(k)f(k1)1f(k) - f(k-1) \leq 1 for 1<kn1 < k \leq n, or that g(ik1)1g(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 ik1i_{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,gg, 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,ff, f' must be distinct. For surjectivity, consider any suitable ff. Let ff' be the function such that f(k)=(m+1)f(k)f'(k) = (m+1) - f(k) for all 1kn1 \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 1kn1 \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,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.