3. Consider any $3 \times 3$ table filled with positive integers such that the sum of the numbers $v$ in each row and each column is 10. How many numbers $v$ in such a table can be: a) the same, b) different?

(Ján Mazák)
SOLUTION. a) Six identical numbers can be found, for example, in the following table that meets the conditions of the problem:

| 8 | 1 | 1 |
| :--- | :--- | :--- |
| 1 | 8 | 1 |
| 1 | 1 | 8 |

If the table contained at least seven identical numbers, one of the rows would contain three of these seven identical numbers. The sum of three identical integers, however, cannot be equal to 10.

Conclusion. The largest possible number of identical numbers in the table is 6.

b) The table can contain six different numbers, one of many examples* looks like this:

| 7 | 1 | 2 |
| :--- | :--- | :--- |
| 1 | 6 | 3 |
| 2 | 3 | 5 |

We will further justify that the table cannot contain more than six different numbers.

In the table, only integers from 1 to 8 can be present. If there were a number greater than 8, the sum of the numbers in the row containing this number would be at least $9+1+1$, which is more than 10.

We know, therefore, that if the table contained at least seven different numbers, one of them must be either 7 or 8. We will evaluate both possibilities separately.

* The presence of the number $8$ in the table means that in the row and column with the number 8, there are two 1s, so there can be at most 6 different numbers in the entire table (besides 8 and 1, there can only be numbers from the 4 remaining cells outside the mentioned row and column).
* The presence of the number $7$ in the table means that in the row and column with the number 7, there are two 1s and 2s in both cases. Of the other four numbers in the table, we denote as $x$ the one that lies in the row of one of the two mentioned 1s and in the column of the other, as shown in the figure, where the other three numbers are marked with dots.

| 1 | 7 | 2 |
| :--- | :--- | :--- |
| $\bullet$ | 2 | $\circ$ |
| $x$ | 1 | $\bullet$ |

In the row and column with the numbers $x$ and 1, the third number must be $9-x$. The two black dots in the figure thus represent the same number, so there are again at most six different numbers in the table.

Conclusion. The largest possible number of different numbers in the table is 6.