4) You want to color the nine squares of a $3 \times 3$ chessboard in such a way that each row, each column, and each of the two diagonals do not contain more squares of the same color. What is the minimum number of colors needed?
(A) 3
(B) 4
(C) 5
(D) 6
(E) 7.
4) The answer is $(\mathrm{C})$. With 5 colors, the problem is solvable; indeed, it is enough to arrange the colors as shown in the adjacent figure, where each of the numbers corresponds to a different color.

To prove that 5 colors are also necessary, it is enough to consider that if on the squares belonging to the diagonals (which are precisely 5) there were two squares of the same color, these would both belong to a row, a column, or a diagonal, contradicting the requirements of the problem.

| 1 | 2 | 3 |
| :--- | :--- | :--- |
| 2 | 4 | 1 |
| 5 | 1 | 2 |

SECOND SOLUTION.

Let the different colors be denoted by $a, b, c, d, e$. The squares of the first row and the central one must all have different colors ($a, b, c, d$, as in Figure 1), to meet the requirements. In the first and third squares of the third row, $a, c, d$ cannot be used; in one of them, for example, the first, $b$ can be used; but then in the third, a fifth color $e$ is needed (Figure 2). Therefore, at least 5 colors are required; with five colors, it is also possible to fill the table according to the requirements (Figure 3).

| $a$ | $b$ | $c$ |
| :--- | :--- | :--- |
|  | $d$ |  |
|  |  |  |

Figure 1

| $a$ | $b$ | $c$ |
| :--- | :--- | :--- |
|  | $d$ |  |
| $b$ |  | $e$ |

Figure 2

| $a$ | $b$ | $c$ |
| :--- | :--- | :--- |
| $c$ | $d$ | $a$ |
| $b$ | $a$ | $e$ |

Figure 3