Maths Olympiad Prep

Library / New Zealand Mathematical Olympiad /10 of 11

New Zealand Mathematical Olympiad

Combinatorics Difficulty 7.6 National Olympiad, round 2 Prove it New Zealand

Problem:
On a table, there is an empty bag and a chessboard containing exactly one token on each square. Next to the table is a large pile that contains an unlimited supply of tokens. Using only the following types of moves what is the maximum possible number of tokens that can be in the bag?
- Type 1: Choose a non-empty square on the chessboard that is not in the rightmost column. Take a token from this square and place it, along with one token from the pile, on the square immediately to its right.
- Type 2: Choose a non-empty square on the chessboard that is not in the bottommost row. Take a token from this square and place it, along with one token from the pile, on the square immediately below it.
- Type 3: Choose two adjacent non-empty squares. Remove a token from each and put them both into the bag.

Solutions — 2

Solution 1

Solution:
Let ai,ja_{i,j} be the number of tokens in the square in the ithi^{\mathrm{th}} row and jthj^{\mathrm{th}} column, where the first row is the topmost row and the first column is the leftmost column. Furthermore let bb denote the number of tokens in the bag. We define a monovariant as follows.
m=3b2+∑i=18∑j=18216−i−jai,jm = \frac{3b}{2} + \sum_{i = 1}^{8}\sum_{j = 1}^{8}2^{16 - i - j}a_{i,j}
This either stays the same, or decreases after each move, because:
- If Ross plays a type 1 move, then ai,ja_{i,j} decreases by 1 and ai,j+1a_{i,j + 1} increases by 2 for some i,ji,j. Thus mm changes by
m′−m=216−i−j(−1)+216−i−(j+1)(+2)m' - m = 2^{16 - i - j}(-1) + 2^{16 - i - (j + 1)}(+2)
=0.\qquad = 0.
Hence mm stays the same after type 1 moves.
- If Ross plays a type 2 move, then ai,ja_{i,j} decreases by 1 and ai+1,ja_{i + 1,j} increases by 2 for some i,ji,j. Thus mm changes by
m′−m=216−i−j(−1)+216−(i+1)−j(+2)m' - m = 2^{16 - i - j}(-1) + 2^{16 - (i + 1) - j}(+2)
=0.\qquad = 0.
Hence mm stays the same after type 2 moves.
- If Ross plays a type 3 move, then bb increases by 2 while ai,ja_{i,j} and ai′,j′a_{i',j'} both decrease by 1 for some i,j,i′,j′i,j,i',j'.
m′−m=32(+2)+216−i−j(−1)+216−i′−j′(−1)m' - m = \frac{3}{2} (+2) + 2^{16 - i - j}(-1) + 2^{16 - i' - j'}(-1)
≤32(+2)+20(−1)+21(−1)\qquad \leq \frac{3}{2} (+2) + 2^{0}(-1) + 2^{1}(-1)
=0.\qquad = 0.
Hence mm stays the same or decreases after these moves.
At the beginning,
m=3b2+∑i=18∑j=18216−i−jai,jm = \frac{3b}{2} + \sum_{i = 1}^{8}\sum_{j = 1}^{8}2^{16 - i - j}a_{i,j}
=0+∑i=18∑j=18216−i−j\qquad = 0 + \sum_{i = 1}^{8}\sum_{j = 1}^{8}2^{16 - i - j}
=0+216∑i=182−i∑j=182−j\qquad = 0 + 2^{16}\sum_{i = 1}^{8}2^{-i}\sum_{j = 1}^{8}2^{-j}
=0+216∑i=182−i(1−2−8)\qquad = 0 + 2^{16}\sum_{i = 1}^{8}2^{-i}(1 - 2^{-8})
=0+216(1−2−8)(1−2−8)\qquad = 0 + 2^{16}(1 - 2^{-8})(1 - 2^{-8})
=65025.\qquad = 65025.
Therefore at the end we must have m≤65025m \leq 65025. Thus we obtain
32b≤m≤65025  ⟺  b≤43350.\frac{3}{2} b \leq m \leq 65025 \iff b \leq 43350.
To obtain equality we simply need to perform any strategy in which:
- Moves of type 3 are only ever performed on either a7,8a_{7,8} and a8,8a_{8,8}, or a8,7a_{8,7} and a8,8a_{8,8}.
- The chessboard is empty at the end of the game.
Now consider a strategy in which we start by applying all moves of type 1 and type 2, until ai,j=0a_{i,j} = 0 for all squares except for a7,8a_{7,8}, a8,7a_{8,7} and a8,8a_{8,8}. At this point we will have a8,8=1a_{8,8} = 1 and since mm is invariant,
65025=0+a8,8+2a7,8+2a8,7=1+2(a7,8+a8,7).65025 = 0 + a_{8,8} + 2a_{7,8} + 2a_{8,7} = 1 + 2(a_{7,8} + a_{8,7}).
Thus a7,8+a8,7=32512a_{7,8} + a_{8,7} = 32512. Now perform 10837 further moves (either type 1 on a7,8a_{7,8} or type 2 on a8,7a_{8,7}) so that we end up with a state in which:
⋅a7,8+a8,7=32512−10837=21675,and\cdot a_{7,8} + a_{8,7} = 32512 - 10837 = 21675,\mathrm{and}
⋅a8,8=1+2×10837=21675.\cdot a_{8,8} = 1 + 2\times 10837 = 21675.
From here we can finish by performing 21675 type 3 moves and obtain b=2×21675=43350b = 2 \times 21675 = 43350 tokens in the bag.

Solution 2

Solution:
First note that we may assume that all type 3 moves are performed after all the type 1 and type 2 moves have been made. WLOG We may also assume that all moves (type 1 and 2) into square (8,8)(8,8) occur all other type 1 and type 2 moves.
Claim: In an optimal solution no type 3 move is made except from a pair including the lower right corner.
Proof: If we make one elsewhere, then we could first double each of those coins and move them to another adjacent pair of squares. Then we could perform two type 3 moves (in this new adjacent pair of squares) and get result in +2+2 more coins in the bag. □\square
From here it is clear that all the coins (except for the one that starts in (8,8)(8,8)) must eventually move to either (7,8)(7,8) or (8,7)(8,7). So there will be a point in which there is:
one coin on (8,8)(8,8), AA coins on (7,8)(7,8), BB coins on (8,7)(8,7), and all other squares are empty.
A coin starting in square (x,y)(x,y) will need to double (8+7−x−y)(8 + 7 - x - y) times on its way to either (7,8)(7,8) or (8,7)(8,7). Therefore
A+B=∑(x,y)≠(8,8)28+7−x−y=215∑x=182−x∑y=182−y−2−1=2−15(2−9−212−1−1)2−12=32512.A + B = \sum_{(x,y)\neq (8,8)}2^{8 + 7 - x - y} = 2^{15}\sum_{x = 1}^{8}2^{-x}\sum_{y = 1}^{8}2^{-y} - 2^{-1} = 2^{-15}\left(\frac{2^{-9} - 2^{1}}{2^{-1} - 1}\right)^{2} - \frac{1}{2} = 32512.
Now let mm be the number of type 1 and type 2 moves we make before we finish the game by making as many type 3 moves as possible.
After these mm moves there will be 2m+12m + 1 coins on square (8,8)(8,8).
After these mm moves there will be a total of A+B−m=32512−mA + B - m = 32512 - m coins on squares (7,8)(7,8) and (8,7)(8,7).
So the maximum number of type 3 moves we can make is
M=min⁡(2m+1,32512−m).M = \min \left(2m + 1,32512 - m\right).
If m≤10837m \leq 10837 then M=2m+1≤21675M = 2m + 1 \leq 21675. If m≥10837m \geq 10837 then M=32512−m≤21675M = 32512 - m \leq 21675. Hence the maximum occurs when m=10837m = 10837 and so M=21675M = 21675 type 3 moves are made.

From here we can finish by performing 21675 type 3 moves and obtain b=2×21675=43350b = 2 \times 21675 = 43350 tokens in the bag.

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.