The integers are written in the squares of a chess board, such that for each , the numbers and are in squares that share an edge. What is the largest possible sum that can appear along one of the diagonals?
Solution
Our answer is . One possible configuration: WLOG, we seek to maximize the sum of the numbers on the main diagonal (top left to bottom right). If we color the squares in a checker-board pattern and use the fact that and lie on different colored squares, we notice that all numbers appearing on the main diagonal must be of the same parity. Consider the smallest value on the main diagonal. All numbers from 1 to must lie on one side of the diagonal since the main diagonal disconnects the board into two regions, and by assumption, all numbers less than cannot lie on the main diagonal. Therefore, (one more than the seventh triangular number) But if , then the sum of the numbers on the main diagonal is at most , as these numbers must be odd. Similarly, is also not optimal. This leaves as a possibility. But if this were the case, the only way it beats our answer is if we have , which would require to appear sequentially along the diagonal, forcing 28 to be in one of the corners. Now label the squares (row, column) with being the top left and being the bottom right. Assume WLOG that 28 occupies . Since 62 and 64 are in and , respectively, we must have 63 in or , and WLOG, assume it's in . Since 61 is next to 60, it is not difficult to see that must be occupied by 1 (all numbers between 2 and 60 must have and as neighbors). Since 1 is above the main diagonal, all numbers from 1 to 27 must also be above the main diagonal. Since there are 28 squares above the main diagonal, there is exactly one number above the main diagonal greater than 28. Notice that 61 must occupy or . If it occupies , then we are stuck at , since it must contain a number between 2 and 59, which is impossible. Therefore, 61 must occupy , and no more numbers greater than 28 can be above the main diagonal. This forces , and 53 to occupy , respectively. But we see that 27 occupies and 29 occupies , leaving nowhere for 51. This is a contradiction, so our answer is therefore optimal. Alternate solution: Another method of proving that is to note that each side of the diagonal has 28 squares, 16 of which are one color and 12 of which are the other color. As the path has to alternate colors, one can make at most steps before moving on the diagonal.