Maths Olympiad Prep

Track / Stage 7 / 30 of 300 #1430 of 1964

Problem 1430

National olympiad second round; IMO P1/P4
Combinatorics Difficulty 7.0 Find the answer

Given a positive integer kk, a pigeon and a seagull play a game on an n×nn\times n board. The pigeon goes first, and they take turns doing the operations. The pigeon will choose mm grids and lay an egg in each grid he chooses. The seagull will choose a k×kk\times k grids and eat all the eggs inside them. If at any point every grid in the n×nn\times n board has an egg in it, then the pigeon wins. Else, the seagull wins. For every integer nkn\geq k, find all mm such that the pigeon wins.

Proposed by amano_hina

A number or a short expression. Spacing, $ signs and \frac vs / are all fine.

Official solution

1. **Case 1: n=k n = k **
- If n=k n = k , the board is k×k k \times k . The pigeon wins if and only if every grid on the board has an egg. Since the seagull can eat all the eggs in a k×k k \times k grid, the pigeon must lay at least n2=k2 n^2 = k^2 eggs to ensure that after the seagull's turn, the pigeon can still fill the board. Therefore, the pigeon wins if mk2 m \geq k^2 .

2. **Case 2: nk+1 n \geq k+1
-
Subcase 2.1: mk21 m \leq k^2 - 1 **
- If mk21 m \leq k^2 - 1 , the seagull can always choose a fixed k×k k \times k rectangle and eat all the eggs inside it. Since m<n2 m < n^2 , the pigeon cannot win in one move. To fill the k×k k \times k gap created by the seagull, the pigeon needs at least k2 k^2 eggs, which is impossible since mk21 m \leq k^2 - 1 . Therefore, the seagull wins.

- **Subcase 2.2: mk2+1 m \geq k^2 + 1 **
- If mk2+1 m \geq k^2 + 1 , consider the configuration where the number of eggs is maximized, say t t . If t=n2 t = n^2 , the pigeon wins. Otherwise, the seagull eats the eggs in a k×k k \times k rectangle. If there is a grid not in this rectangle that does not contain an egg, the pigeon can lay an egg in each grid inside the k×k k \times k rectangle and then lay an egg on the empty grid. This results in one more egg than before, contradicting the choice of configuration. Hence, all grids outside the k×k k \times k rectangle contain at least one egg, and the pigeon can lay an egg in each grid inside the k×k k \times k rectangle and win. Therefore, the pigeon wins if mk2+1 m \geq k^2 + 1 .

3. **Case 3: m=k2 m = k^2
-
Subcase 3.1: n2k1 n \leq 2k - 1 **
- If n2k1 n \leq 2k - 1 , the pigeon wins. For n=2k1 n = 2k - 1 , there is a unique grid (in the center of the board) that belongs to all k×k k \times k rectangles. The pigeon colors this grid black and starts laying eggs in the grids but not in the black one. After each seagull's turn, at most k21 k^2 - 1 grids are empty, and the pigeon can eventually fill all the grids except the black one. Then, the seagull removes eggs from at most k21 k^2 - 1 grids, and the pigeon lays one egg in each of them and also in the black grid, winning the game.

- **Subcase 3.2: n2k n \geq 2k **
- If n2k n \geq 2k , the pigeon loses. Suppose that after a pigeon's turn, there are an21 a \leq n^2 - 1 grids that contain at least one egg. The seagull can remove the eggs from at least a/4 a/4 grids, and the pigeon can lay eggs in at most k2 k^2 more grids. The new number of grids that contain at least one egg is baa/4+k2=3/4a+k23/4(n21)+n2/4<n2 b \leq a - a/4 + k^2 = 3/4a + k^2 \leq 3/4(n^2 - 1) + n^2/4 < n^2 , so bn21 b \leq n^2 - 1 . Inductively, the pigeon can never fill all the grids.

The final answer is: If kn2k1 \boxed{ k \leq n \leq 2k - 1 } , the pigeon wins for mk2 m \geq k^2 . If n2k n \geq 2k , the pigeon wins for mk2+1 m \geq k^2 + 1 .

Source: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.