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 be the number of tokens in the square in the row and column, where the first row is the topmost row and the first column is the leftmost column. Furthermore let denote the number of tokens in the bag. We define a monovariant as follows.
This either stays the same, or decreases after each move, because:
- If Ross plays a type 1 move, then decreases by 1 and increases by 2 for some . Thus changes by
Hence stays the same after type 1 moves.
- If Ross plays a type 2 move, then decreases by 1 and increases by 2 for some . Thus changes by
Hence stays the same after type 2 moves.
- If Ross plays a type 3 move, then increases by 2 while and both decrease by 1 for some .
Hence stays the same or decreases after these moves.
At the beginning,
Therefore at the end we must have . Thus we obtain
To obtain equality we simply need to perform any strategy in which:
- Moves of type 3 are only ever performed on either and , or and .
- 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 for all squares except for , and . At this point we will have and since is invariant,
Thus . Now perform 10837 further moves (either type 1 on or type 2 on ) so that we end up with a state in which:
From here we can finish by performing 21675 type 3 moves and obtain 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 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 more coins in the bag.
From here it is clear that all the coins (except for the one that starts in ) must eventually move to either or . So there will be a point in which there is:
one coin on , coins on , coins on , and all other squares are empty.
A coin starting in square will need to double times on its way to either or . Therefore
Now let 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 moves there will be coins on square .
After these moves there will be a total of coins on squares and .
So the maximum number of type 3 moves we can make is
If then . If then . Hence the maximum occurs when and so type 3 moves are made.
From here we can finish by performing 21675 type 3 moves and obtain tokens in the bag.