Maths Olympiad Prep

Library / /31 of 34

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

Let nn be a positive integer. A frog starts on the number line at 00. Suppose it makes a finite sequence of hops, subject to two conditions:
* The frog visits only points in {1,2,,2n1}\{1, 2, \dots, 2^n - 1\}, each at most once.
* The length of each hop is in {20,21,22,}\{2^0, 2^1, 2^2, \dots\}. (The hops may be either direction, left or right.)
Let SS be the sum of the (positive) lengths of all hops in the sequence. What is the maximum possible value of SS?

Solution

We claim the answer is 4n13\frac{4^n-1}{3}.

We first prove the bound. First notice that the hop sizes are in {20,21,,2n1}\{2^0, 2^1, \dots, 2^{n-1}\}, since the frog must stay within bounds the whole time. Let aia_i be the number of hops of size 2i2^i the frog makes, for 0in10 \le i \le n-1.

Claim. For any k=1,,nk = 1, \dots, n we have
an1++ank2n2nk. a_{n-1} + \dots + a_{n-k} \le 2^n - 2^{n-k}.
Proof. Let m=nkm = n-k and look modulo 2m2^m. Call a jump small if its length is at most 2m12^{m-1}, and large if it is at least 2m2^m; the former changes the residue class of the frog modulo 2m2^m while the latter does not.
Within each fixed residue modulo 2m2^m, the frog can make at most 2n2m1\frac{2^n}{2^m} - 1 large jumps. So the total number of large jumps is at most 2m(2n2m1)=2n2m2^m \left(\frac{2^n}{2^m} - 1\right) = 2^n - 2^m. \square

(As an example, when n=3n=3 this means there are at most four hops of length 44, at most six hops of length 22 or 44, and at most seven hops total. Of course, if we want to max the length of the hops, we see that we want a2=4a_2 = 4, a1=2a_1 = 2, a0=1a_0 = 1, and in general equality is achieved when am=2ma_m = 2^m for any mm.)

Now, the total distance the frog travels is
S=a0+2a1+4a2++2n1an1. S = a_0 + 2a_1 + 4a_2 + \dots + 2^{n-1}a_{n-1}.
We rewrite using the so-called “summation by parts”:
S = a 0 + a 1 + a 2 + a 3 + + a n-1 + a 1 + a 2 + a 3 + + a n-1 + 2a 2 + 2a 3 + + 2a n-1 + 4a 3 + + 4a n-1 + 2 n-2 a n-1 .\text{S = a 0 + a 1 + a 2 + a 3 + + a n-1 + a 1 + a 2 + a 3 + + a n-1 + 2a 2 + 2a 3 + + 2a n-1 + 4a 3 + + 4a n-1 + 2 n-2 a n-1 .}

It remains to show that equality can hold. There are many such constructions but most are inductive. Here is one approach. We will construct two family of paths such that there are 2k2^k hops of size 2k2^k, for every 0kn10 \le k \le n-1, and we visit each of {0,,2n1}\{0, \dots, 2^n - 1\} once, starting on 00 and ending on xx, for the two values x{1,2n1}x \in \{1, 2^n - 1\}.

The base case n=1n=1 is clear. To take a path from 00 to 2n+112^{n+1} - 1:
* Take a path on {0,2,4,,2n+12}\{0, 2, 4, \dots, 2^{n+1} - 2\} starting from 00 and ending on 22 (by inductive hypothesis).
* Take a path on {1,3,5,,2n+11}\{1, 3, 5, \dots, 2^{n+1} - 1\} starting from 11 and ending on 2n+112^{n+1} - 1 (by inductive hypothesis).
* Link them together by adding a single jump 212 \to 1.

The other case is similar, but we route 0(2n+12)(2n+11)10 \to (2^{n+1} - 2) \to (2^{n+1} - 1) \to 1 instead. (This can also be visualized as hopping along a hypercube of binary strings; each inductive step takes two copies of the hypercube and links them together by a single edge.)

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.