Maths Olympiad Prep

Library / USAMO /45 of 156

USAMO

Combinatorics Difficulty 7.1 National Olympiad, round 2 Prove it United States

A mathematical frog jumps along the number line. The frog starts at 11, and jumps according to the following rule: if the frog is at integer nn, then it can jump either to n+1n + 1 or to n+2mn+1n + 2^{m_n+1} where 2mn2^{m_n} is the largest power of 22 that is a factor of nn. Show that if k≥2k \ge 2 is a positive integer and ii is a nonnegative integer, then the minimum number of jumps needed to reach 2ik2^i k is greater than the minimum number of jumps needed to reach 2i2^i.

Solutions — 3

Solution 1

For i≥0i \ge 0 and k≥1k \ge 1, let xi,kx_{i,k} denote the minimum number of jumps needed to reach the integer ni,k=2ikn_{i,k} = 2^i k. We must prove that
xi,k>xi,1(∗) x_{i,k} > x_{i,1} \qquad (*)
for all i≥0i \ge 0 and k≥2k \ge 2. We prove this using the method of descent.

First note that (∗)(*) holds for i=0i = 0 and all k≥2k \ge 2, because it takes 00 jumps to reach the starting value n0,1=1n_{0,1} = 1, and at least one jump to reach n0,k=k≥2n_{0,k} = k \ge 2. Now assume that (∗)(*) is not true for all choices of ii and kk. Let i0i_0 be the minimal value of ii for which (∗)(*) fails for some kk, let k0k_0 be the minimal value of k>1k > 1 for which xi0,k≤xi0,1x_{i_0,k} \le x_{i_0,1}. Then it must be the case that i0≥1i_0 \ge 1 and k0≥2k_0 \ge 2.

Let Ji0,k0J_{i_0,k_0} be a shortest sequence of xi0,k0+1x_{i_0,k_0} + 1 integers that the frog occupies in jumping from 11 to 2i0k02^{i_0} k_0. The length of each jump, that is, the difference between consecutive integers in Ji0,k0J_{i_0,k_0}, is either 11 or a positive integer power of 22. The sequence Ji0,k0J_{i_0,k_0} cannot contain 2i02^{i_0} because it takes more jumps to reach 2i0k02^{i_0} k_0 than it does to reach 2i02^{i_0}. Let 2M+12^{M+1}, M≥0M \ge 0 be the length of the longest jump made in generating Ji0,k0J_{i_0,k_0}. Such a jump can only be made from a number that is divisible by 2M2^M (and by no higher power of 22). Thus we must have M<i0M < i_0, since otherwise a number divisible by 2i02^{i_0} is visited before 2i0k02^{i_0} k_0 is reached, contradicting the definition of k0k_0.

Let 2m+12^{m+1} be the length of the jump when the frog jumps over 2i02^{i_0}. If this jump starts at 2m(2t−1)2^m(2t - 1) for some positive integer tt, then it will end at 2m(2t−1)+2m+1=2m(2t+1)2^m(2t - 1) + 2^{m+1} = 2^m(2t + 1). Since it goes over 2i02^{i_0} we see 2m(2t−1)<2i0<2m(2t+1)2^m(2t - 1) < 2^{i_0} < 2^m(2t + 1) or (2i0−m−1)/2<t<(2i0−m+1)/2(2^{i_0-m} - 1)/2 < t < (2^{i_0-m} + 1)/2. Thus t=2i0−m−1t = 2^{i_0-m-1} and the jump over 2i02^{i_0} is from 2m(2i0−m−1)=2i0−2m2^m(2^{i_0-m} - 1) = 2^{i_0} - 2^m to 2m(2i0−m+1)=2i0+2m2^m(2^{i_0-m} + 1) = 2^{i_0} + 2^m.

Considering the jumps that generate Ji0,k0J_{i_0,k_0}, let N1N_1 be the number of jumps from 11 to 2i0+2m2^{i_0} + 2^m, and let N2N_2 be the number of jumps from 2i0+2m2^{i_0} + 2^m to 2i0k02^{i_0} k_0. By definition of i0i_0, it follows that 2m2^m can be reached from 11 in less than N1N_1 jumps. On the other hand, because m<i0m < i_0, the number 2i0(k0−1)2^{i_0}(k_0 - 1) can be reached from 2m2^m in exactly N2N_2 jumps by using the same jump length sequence as in jumping from 2m+2i02^m + 2^{i_0} to 2i0k0=2i0(k0−1)+2i2^{i_0} k_0 = 2^{i_0}(k_0 - 1) + 2^i. The key point here is that the shift by 2i02^{i_0} does not affect any of divisibility conditions needed to make jumps of the same length. In particular, with the exception of the last entry, 2i0k02^{i_0} k_0, all of the elements of Ji0,k0J_{i_0,k_0} are of the form 2p(2t+1)2^p(2t + 1) with p<i0p < i_0, again because of the definition of k0k_0. Because 2p(2t+1)−2i0=2p(2t−2i0−p+1)2^p(2t + 1) - 2^{i_0} = 2^p(2t - 2^{i_0-p} + 1) and the number 2t+2i0−p+12t + 2^{i_0-p} + 1 is odd, a jump of size 2p+12^{p+1} can be made from 2p(2t+1)−2i02^p(2t + 1) - 2^{i_0} just as it can be made from 2p(2t+1)2^p(2t + 1).

Thus the frog can reach 2m2^m from 11 in less than N1N_1 jumps, and can then reach 2i0(k0−1)2^{i_0}(k_0 - 1) from 2m2^m in N2N_2 jumps. Hence the frog can reach 2i0(k0−1)2^{i_0}(k_0 - 1) from 11 in less than N1+N2N_1 + N_2 jumps, that is, in fewer jumps than needed to get to 2i0k02^{i_0} k_0 and hence in fewer jumps than required to get to 2i02^{i_0}. This contradicts the definition of k0k_0.

Solution 2

Suppose x0=1,x1,…,xt=2ikx_0 = 1, x_1, \dots, x_t = 2^i k are the integers visited by the frog on his trip from 11 to 2ik2^i k, k≥2k \ge 2. Let sj=xj−xj−1s_j = x_j - x_{j-1} be the jump sizes. Define a reduced path yjy_j inductively by
yj={yj−1+sjif yj−1+sj≤2i,yj−1otherwise. y_j = \begin{cases} y_{j-1} + s_j & \text{if } y_{j-1} + s_j \le 2^i, \\ y_{j-1} & \text{otherwise.} \end{cases}
Say a jump sjs_j is deleted in the second case. We will show that the distinct integers among the yjy_j give a shorter path from 11 to 2i2^i. Clearly yj≤2iy_j \le 2^i for all jj. Suppose 2i−2r+1<yj≤2i−2r2^i - 2^{r+1} < y_j \le 2^i - 2^r for some 0≤r≤i−10 \le r \le i - 1. Then every deleted jump before yjy_j must have length greater than 2r2^r, hence must be a multiple of 2r+12^{r+1}. Thus yj≡xj(mod2r+1)y_j \equiv x_j \pmod{2^{r+1}}. If yj+1>yjy_{j+1} > y_j, then either sj+1=1s_{j+1} = 1 (in which case this is a valid jump) or sj+1/2=2ms_{j+1}/2 = 2^m is the exact power of 22 dividing xjx_j. In the second case, since 2r≥sj+1>2m2^r \ge s_{j+1} > 2^m, the congruence says 2m2^m is also the exact power of 22 dividing yjy_j, thus again this is a valid jump. Thus the distinct yjy_j form a valid path for the frog. If j=tj = t the congruence gives yt≡xt≡0(mod2r+1)y_t \equiv x_t \equiv 0 \pmod{2^{r+1}}, but this is impossible for 2i−2r+1<yt≤2i−2r2^i - 2^{r+1} < y_t \le 2^i - 2^r. Hence we see yt=2iy_t = 2^i, that is, the reduced path ends at 2i2^i. Finally since the reduced path ends at 2i<2ik2^i < 2^i k at least one jump must have been deleted and it is strictly shorter than the original path.

Solution 3

(By Brian Lawrence) Suppose 2ik2^i k can be reached in mm jumps.

Our approach will be to consider the frog's life as a sequence of leaps of certain lengths. We will prove that by removing the longest leaps from the sequence, we generate a valid sequence of leaps that ends at 2i2^i. Clearly this sequence will be shorter, since it was obtained by removing leaps. The result will follow.

Lemma If we remove the longest leap in the frog's life (or one of the longest, in case of a tie) the sequence of leaps will still be legitimate.

Proof: By definition, a leap from nn to n+νn + \nu is legitimate if and only if either (a) ν=1\nu = 1, or (b) ν=2mn+1\nu = 2^{m_n+1}. If all leaps are of length 11, then clearly removing one leap does not make any others illegitimate; suppose the longest leap has length 2s2^s.

Then we remove this leap and consider the effect on all the other leaps. Take an arbitrary leap starting (originally) at nn, with length ν\nu. Then ν≤2s\nu \le 2^s. If ν=1\nu = 1 the new leap is legitimate no matter where it starts. Say ν>1\nu > 1. Then ν=2mn+1\nu = 2^{m_n+1}. Now if the leap is before the removed leap, its position is not changed, so ν=2mn+1\nu = 2^{m_n+1} and it remains legitimate. If it is after the removed leap, its starting point is moved back to n−2sn - 2^s. Now since 2mn+1=ν≤2s2^{m_n+1} = \nu \le 2^s, we have mn≤s−1m_n \le s - 1; that is, 2s2^s does not divide nn. Therefore, 2mn2^{m_n} is the highest power of 22 dividing n−2sn - 2^s, so ν=2mn−2s+1\nu = 2^{m_n-2^s+1} and the leap is still legitimate. This proves the Lemma. ■

We now remove leaps from the frog's sequence of leaps in decreasing order of length. The frog's path has initial length 2ik−12^i k - 1; we claim that at some point its length is 2i−12^i - 1.

Let the frog's mm leaps have lengths
a1≥a2≥a3≥⋯≥am. a_1 \ge a_2 \ge a_3 \ge \dots \ge a_m.
Define a function ff by
f(0)=2ikf(i)=f(i−1)−ai,1≤i≤m. f(0) = 2^i k \\ f(i) = f(i-1) - a_i, \quad 1 \le i \le m.
Clearly f(i)f(i) is the frog's final position if we remove the ii longest leaps. Note that f(m)=1f(m) = 1 – if we remove all leaps, the frog ends up at 11. Let f(j)f(j) be the last value of ff that is at least 2i2^i. That is, suppose f(j)≥2if(j) \ge 2^i, f(j+1)<2if(j+1) < 2^i. Now we have aj+1∣aka_{j+1}|a_k for all k≤jk \le j since {ak}\{a_k\} is a decreasing sequence of powers of 22. If aj+1>2ia_{j+1} > 2^i, we have 2i∣ap2^i|a_p for p≤jp \le j, so 2i∣f(j+1)2^i|f(j+1). But 0<f(j+1)<2i0 < f(j+1) < 2^i, contradiction. Thus aj+1≤2ia_{j+1} \le 2^i, so, since aj+1a_{j+1} is a power of two, aj+1∣2ia_{j+1}|2^i. Since aj+1∣2ika_{j+1}|2^i k and a1,…,aja_1, \dots, a_j, we know that aj+1∣f(j)a_{j+1}|f(j), and aj+1∣f(j+1)a_{j+1}|f(j+1). So f(j+1)f(j+1), f(j)f(j) are two consecutive multiples of aj+1a_{j+1}, and 2i2^i (another such multiple) satisfies f(j+1)<2i≤f(j)f(j+1) < 2^i \le f(j). Thus we have 2i=f(j)2^i = f(j), so by removing jj leaps we make a path for the frog that is legitimate by the Lemma, and ends on 2i2^i.

Now let mm be the minimum number of leaps needed to reach 2ik2^i k. Applying the Lemma and the argument above the frog can reach 2i2^i in only m−jm-j leaps. Since j>0j > 0 trivially (j=0j = 0 implies 2i=f(j)=f(0)=2ik2^i = f(j) = f(0) = 2^i k) we have m−j<mm-j < m as desired.

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.