MathLabs

Problem 6

Let nn be a positive integer. A Nordic square is an n×nn\times n board containing all the integers from 11 to n2n^2 so that each cell contains exactly one number. An uphill path is a sequence of one or more cells such that: (a) the first cell in the sequence is a valley, meaning the number written is less than all its orthogonal neighbours; (b) each subsequent cell in the sequence is orthogonally adjacent to the previous cell; and (c) the numbers written in the cells in the sequence are in increasing order. Find, as a function of nn, the smallest possible total number of uphill paths in a Nordic square.
Step 4 of 5: Fill TT first so 11 is the only valley
1∈T,T filled by adjacency, then the rest arbitrarily1\in T,\quad T\ \text{filled by adjacency, then the rest arbitrarily}
Detailed analysis

Place 11 in a cell of TT, then fill the rest of TT with 2,3,…2,3,\ldots so that each new number's cell is adjacent to an already-filled cell (always possible since TT is connected), and finally fill the remaining cells (outside TT) arbitrarily with the larger numbers. Since every outside cell is adjacent only to TT-cells filled before all outside numbers, and TT was filled in increasing connected order from 11, the only valley in the whole board is the cell holding 11.