MathDB
Cycle in a grid

Source: Japan TST 2016 P10

January 25, 2021
combinatorics

Problem Statement

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:
[*] 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.