Source: IMO-2009-P6
Category: Existence and Construction

Problem:
Let $a_1$, $a_2$, \dots, $a_n$ be distinct positive integers and let $M$ be a set of $n-1$ positive integers not containing $s = a_1 + \dots + a_n$. A grasshopper is to jump along the real axis, starting at the point $0$ and making $n$ jumps to the right with lengths $a_1$, $a_2$, \dots, $a_n$ in some order. Prove that the order can be chosen in such a way that the grasshopper never lands on any point in $M$.

Solution:
We prove the statement by induction on $n$. We may assume that the set of mines $M$ has exactly $n-1$ elements (if it has fewer, we can arbitrarily add positive integers to $M$, avoiding $s$, until $|M| = n-1$). 

**Base cases:** For $n=1$, there are 0 mines, so the single jump $a_1$ trivially avoids all mines. For $n=2$, the jumps are $a_1 < a_2$, and there is 1 mine. The intermediate points for the two possible jump orders are $a_1$ and $a_2$. Since $a_1 \neq a_2$, they cannot both be the mine, so at least one order is valid.

**Inductive step:** Assume the statement holds for any $k < n$ jumps and any set of at most $k-1$ mines. Let the $n$ jumps be $a_1 < a_2 < \dots < a_n$. Let $M$ be the set of $n-1$ mines, and $s = a_1 + \dots + a_n \notin M$. Let $x = s - a_n$. We consider four cases, based on whether $x \in M$ and whether there is a mine in $M$ strictly to the right of $x$.

**Case 1:** $x \notin M$, and there is a mine past $x$.
Since there is at least one mine strictly greater than $x$, the interval $[0, x]$ contains at most $n-2$ mines. The sum of the $n-1$ jumps $a_1, \dots, a_{n-1}$ is $x$. By the induction hypothesis for these $n-1$ jumps, there is a valid sequence of jumps that reaches $x$ without landing on any mine in $[0, x]$. From $x$, the final jump is $a_n$, reaching $s$. Since $x \notin M$ and $s \notin M$, this sequence avoids all mines.

**Case 2:** $x \notin M$, and there are no mines to the right of $x$.
Let $m$ be the maximal mine in $M$. Since there are no mines to the right of $x$, we have $m < x$. By the induction hypothesis applied to the $n-1$ jumps $a_1, \dots, a_{n-1}$ and the $n-2$ mines in $M \setminus \{m\}$, there is a sequence of these jumps ending at $x$ that avoids all mines in $M \setminus \{m\}$. 
If this sequence also avoids $m$, we can just append $a_n$ and we are done. Otherwise, let the sequence of these $n-1$ jumps be $b_1, \dots, b_{n-1}$, with positions $p_j = \sum_{r=1}^j b_r$. Suppose the path hits $m$ at step $k$, so $p_k = m$. We then swap the hop $b_k$ with the final jump $a_n$. 
The new sequence of jumps is $b_1, \dots, b_{k-1}, a_n, b_{k+1}, \dots, b_{n-1}, b_k$. Let $p'_j$ be the new positions. For $j < k$, $p'_j = p_j$, which avoids $M$. For $j = k$, $p'_k = p_{k-1} + a_n = p_k - b_k + a_n = m - b_k + a_n$. Since $a_n$ is the strictly largest jump, $a_n > b_k$, so $p'_k > m$. For $j > k$, $p'_j = p_j - b_k + a_n > p_j \ge m$. Since $m$ is the maximal mine, all new positions $p'_j$ for $j \ge k$ are strictly greater than $m$ and thus avoid $M$. The final position is $s \notin M$. This modified sequence avoids all mines.

**Case 3:** $x \in M$, and there are no mines to the right of $x$.
In this case, $x$ is the maximal mine, so we can repeat the previous case with $m = x$. By the induction hypothesis on $M \setminus \{x\}$, there is a sequence of jumps $b_1, \dots, b_{n-1}$ that reaches $x$ avoiding $M \setminus \{x\}$. Since the sequence ends at $x \in M$, it hits $x$ at the very last step $k = n-1$. We swap $b_{n-1}$ with $a_n$. The new positions are $p'_j = p_j$ for $j \le n-2$, which avoid $M$. The position $p'_{n-1} = p_{n-2} + a_n = x - b_{n-1} + a_n > x$. Since $x$ is the maximal mine, $p'_{n-1} \notin M$, and the final position is $s \notin M$.

**Case 4:** $x \in M$, and there is a mine past $x$.
We claim there exists an integer $1 \le i \le n-1$ such that neither $s-a_i$ nor $y = s-a_i-a_n$ is a mine. For each $1 \le i \le n-1$, consider the pair of points $P_i = \{s-a_i, s-a_i-a_n\}$. Since $a_i < a_n$, we have $s-a_i > s-a_n = x$ and $s-a_i-a_n < s-a_n = x$. Thus, any single mine can belong to at most one pair $P_i$. Since $x \in M$ belongs to no pair $P_i$, the remaining $n-2$ mines in $M$ can intersect at most $n-2$ of the pairs $P_i$. Since there are $n-1$ pairs, there must exist at least one index $i \in \{1, \dots, n-1\}$ such that $P_i \cap M = \emptyset$. 
Choose such an $i$, and let $y = s - a_i - a_n$. We will use the $n-2$ jumps $\{a_1, \dots, a_n\} \setminus \{a_i, a_n\}$ to reach $y$. Since $x \in M$ and the mine past $x$ are both strictly greater than $y$ (as $y < x$), there are at least two mines to the right of $y$. Thus, the number of mines in $(0, y]$ is at most $(n-1) - 2 = n-3$. By the induction hypothesis applied to these $n-2$ jumps and the mines in $(0, y]$, there is a valid sequence to reach $y$ avoiding all mines. From $y$, the grasshopper jumps $a_n$ to reach $y + a_n = s - a_i$. Since $P_i \cap M = \emptyset$, $s-a_i \notin M$. Finally, from $s-a_i$, the grasshopper jumps $a_i$ to reach $s \notin M$. This sequence avoids all mines, completing the induction.


Grading guidelines:
(Partial) 1. Set up induction on n, including the reduction to |M|=n−1 by adding extra mines different from s, and verified the base cases n=1,2. 2. Gave the key reduction using the largest jump a_n and x=s−a_n, and correctly solved at least one of the easy subcases (e.g. x∉M and there is a mine >x, so apply induction to a_1,…,a_{n−1} up to x and then jump a_n). 3. In the “no mines to the right of x” situation, used the swap idea (replace the jump landing on the maximal mine m with a_n) and correctly argued that all subsequent partial sums increase past m and hence avoid all mines. (Almost) 1. Presented a full induction with the x=s−a_n split into cases, but the swap argument in Case 2/3 is not fully justified (e.g. did not clearly show all modified partial sums stay >m, or overlooked checking that the swapped-in position cannot equal another mine). 2. Handled Cases 1–3 correctly, and in Case 4 proposed the correct pigeonhole pairing idea with P_i={s−a_i, s−a_i−a_n}, but left a gap in proving a suitable i exists (e.g. did not justify that a mine cannot belong to two different pairs, or miscounted which mines are excluded). 3. Solution is almost complete, but made minor mistakes which are not negligible.