The integers from 1 to $ 2008^2$ are written on each square of a $ 2008 \times 2008$ board. For every row and column the difference between the maximum and minimum numbers is computed. Let $ S$ be the sum of these 4016 numbers. Find the greatest possible value of $ S$.
Problem
Source: Iberoamerican Olympiad 2008, problem 1
Tags: combinatorics proposed, combinatorics
24.09.2008 13:24
26.09.2008 18:32
There can be another solution, with the known of the existence of $ \max{f(2n)}$, where $ 2n\times 2n$ is the size of our square board. Let $ f(n),n\in\mathbb{N}^*$ denotes the greatest value of the sum of those differences mentioned for the $ n\times n$ board. We just consider even $ n$. Since for every $ n\in\mathbb{N}^*$, there are exactly $ (4n^2)!$ ways to arrange $ 4n^2$ positive integer $ 1,2,...,4n^2$ into an $ 2n\times 2n$, which is a limited number, there exists $ f(2n)$. Now, consider $ i,j\in{1,2,3,...,n}$ suppose that $ i$ and $ j$ are in the same column or row, since $ \min{(i)}$ must be the smallest number in that row(or column) and $ \max{(j)}$ must not be the greatest one, if we rearrange these numbers in another way such that $ i,j$ are in two different row(column), we can obtain a greater sum. Therefore, $ n$ numbers $ i\in{1,2,3,...,n}$ must be arranged on a diagonal of the board. Similarly, $ n$ numbers $ i\in{n^2,n^2-1,...,n^2-n+1}$ must be on the other diagonal. Finally, the left numbers is arranged freely. With that way of arranging, the greatest sum is expressed by: $ f(n)=\sum_{i=1}^{n}(n^2-(2k-1))+n(n^2-1)=2n^2(n-1)$. At $ n=2008$, we got the desired result, the same as joh's result .