IMO 2010 Q5 #
Each of the six boxes $B_1, B_2, B_3, B_4, B_5, B_6$ initially contains one coin. The following two types of operations are allowed:
- Choose a non-empty box $B_j, 1 ≤ j ≤ 5$, remove one coin from $B_j$ and add two coins to $B_{j+1}$;
- Choose a non-empty box $B_k, 1 ≤ k ≤ 4$, remove one coin from $B_k$ and swap the contents (possibly empty) of the boxes $B_{k+1}$ and $B_{k+2}$.
Determine if there exists a finite sequence of operations of the allowed types, such that the five boxes $B_1, B_2, B_3, B_4, B_5$ become empty, while box $B_6$ contains exactly $2010^{2010^{2010}}$ coins.
Solution #
We follow the solution from https://web.evanchen.cc/exams/IMO-2010-notes.pdf.
From the initial state we can reach (0, 0, 5, 11, 0, 0); we now ignore the first two boxes.
On any three adjacent boxes reading (n, 0, 0) with n > 0 we can change them to (0, 2^n, 0):
(n, 0, 0) →(move 1) (n-1, 2, 0)
→(2× move 1) (n-1, 0, 4) →(move 2) (n-2, 4, 0)
→(4× move 1) (n-2, 0, 8) →(move 2) (n-3, 8, 0)
→ ...
→(2^(n-1)× move 1) (1, 0, 2^n) →(move 2) (0, 2^n, 0)
Thus we can get more than enough coins, all in box 4, as follows:
(5, 11, 0, 0) → (5, 0, 2^11, 0) →(move 2) (4, 2^11, 0, 0)
→ (4, 0, 2^2^11, 0) →(move 2) (3, 2^2^11, 0, 0)
→ ...
→ (1, 0, 2^2^2^2^2^11, 0) →(move 2) (0, 2^2^2^2^2^11, 0, 0)
We now ignore the third box. Let T = 2010^2010^2010 be the target number of coins;
since T < 2^2^2^2^2^11 and T is divisible by 4 we can drop coins from box 4 by using move 2
to swap the empty boxes 5 and 6 until we have (T/4, 0, 0). Then we can repeatedly use move 1
to get (0, T/2, 0) and finally (0, 0, T).
The predicate defining states of boxes reachable by the given moves.
- base : Reachable 1
The starting position with one coin in each box
- move1
{B : Fin 6 → ℕ}
{i : Fin 6}
(rB : Reachable B)
(hi : i < 5)
(pB : 0 < B i)
: Reachable (B - Pi.single i 1 + Pi.single (i + 1) 2)
Remove a coin from $B_j$ and add two coins to $B_{j+1}$
- move2
{B : Fin 6 → ℕ}
{i : Fin 6}
(rB : Reachable B)
(hi : i < 4)
(pB : 0 < B i)
: Reachable (B ∘ ⇑(Equiv.swap (i + 1) (i + 2)) - Pi.single i 1)
Remove a coin from $B_k$ and swap $B_{k+1}$ and $B_{k+2}$