Olympiad Maths Prep

Track / Stage 6 / 336 of 400 #1336 of 2000

Problem 1336

National olympiad, first round
Combinatorics Difficulty 6.7 Find the answer

Find the maximum possible value of nn, such that the integers 1,2,n1,2,\ldots n can be filled once each in distinct cells of a 2015×20152015\times 2015 grid and satisfies the following conditions:
[list]
[*] For all 1in11\le i \le n-1, the cells with ii and i+1i+1 share an edge. Cells with 11 and nn also share an edge. In addition, no other pair of numbers share an edge.
[*] If two cells with i<ji<j in them share a vertex, then min{ji,n+ij}=2\min\{j-i,n+i-j\}=2.

Official solution

1. Understanding the Problem:
We need to fill a 2015×20152015 \times 2015 grid with integers 1,2,,n1, 2, \ldots, n such that:
- For all 1in11 \le i \le n-1, the cells with ii and i+1i+1 share an edge.
- Cells with 11 and nn also share an edge.
- No other pair of numbers share an edge.
- If two cells with i<ji < j share a vertex, then min{ji,n+ij}=2\min\{j-i, n+i-j\} = 2.

2. Visualizing the Grid:
We can visualize the grid as a cycle where each number ii is connected to i+1i+1 and nn is connected back to 11. This forms a Hamiltonian cycle.

3. Extending Cells:
- If a cell is a corner, extend it to a square with side 32\frac{3}{2}.
- If a cell is a straight, extend it to a rectangle with sides 11 and 22.

4. Calculating the Area:
- For corners, the area is (32)2=94\left(\frac{3}{2}\right)^2 = \frac{9}{4}.
- For straights, the area is 1×2=21 \times 2 = 2.

5. Intersection of Extended Cells:
- Two extended cells intersect if and only if they are straights and they are adjacent to the same corner. Their intersection is a square with side 12\frac{1}{2}, giving an area of (12)2=14\left(\frac{1}{2}\right)^2 = \frac{1}{4}.

6. Formulating the Inequality:
Let xx be the number of corners and yy be the number of straights. The total area covered by the extended cells should be less than or equal to the area of the 2016×20162016 \times 2016 grid (since each cell is extended):
94x+2y14x20162 \frac{9}{4}x + 2y - \frac{1}{4}x \leq 2016^2
Simplifying, we get:
84x+2y20162 \frac{8}{4}x + 2y \leq 2016^2
2x+2y20162 2x + 2y \leq 2016^2
x+y201622 x + y \leq \frac{2016^2}{2}

7. Conclusion:
The maximum possible value of nn is 201622\frac{2016^2}{2}.

The final answer is 201622\boxed{\frac{2016^2}{2}}.

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