## Problem B1

How many squares of a $1000 \times 1000$ chessboard can be chosen, so that we cannot find three chosen squares with two in the same row and two in the same column?


## Solution

Answer: 1998. Choose every square in the first row or column but not both.

We prove the slightly more general result that the maximum number for an $\mathrm{m} \mathrm{x}$ rectangle is $\mathrm{n}$ if $\mathrm{m}=1$, or $\mathrm{m}+\mathrm{n}-2$ for $\mathrm{m}, \mathrm{n}>1$.

We may assume $\mathrm{m} \leq \mathrm{n}$. We use induction on $\mathrm{m}$. The result for $\mathrm{m}=1$ is obvious. For $\mathrm{m}=2$, if we choose two in the same row, then we cannot choose any more, so it is better (or no worse for $\mathrm{n}=2$ ) to choose all the squares in a column giving $\mathrm{n}=\mathrm{m}+\mathrm{n}-2$ in total. That establishes the result for $\mathrm{m}=1$ and 2 .

Now suppose $\mathrm{n} \geq \mathrm{m}>2$ and that the result is true for smaller $\mathrm{m}$. We can certainly do at least $\mathrm{m}+\mathrm{n}-2$ by choosing all the squares in the first row or column but not both. Assume we have $\mathrm{m}$ columns. If no two are in the same row, then there are at most $\mathrm{n}$ which we know is not optimal. So assume there are two in the same row. Now there cannot be any more in the two corresponding columns. So consider the remaining $\mathrm{m}-2$ columns. If $m>3$, then by induction we cannot choose more than $m-2+n-2$ in those columns and with the two already chosen that gives $m+n-2$. If $m=3$, then we cannot choose more than $n$ in the remaining column. But we can combine at most $n-1$ of those with the existing two, since if we pick the square in the same row as the two squares already chosen, then we cannot choose any others. So for this case also we can do at most $n+1=m+n-2$. Hence the result is true for all $m$.

