9.4. In a class, there are 18 children. The parents decided to gift the children from this class a cake. To do this, they first asked each child the area of the piece they wanted to receive. After that, they ordered a square cake, the area of which is exactly equal to the sum of the 18 named numbers. However, upon seeing the cake, the children wanted their pieces to be square as well. The parents can cut the cake with cuts parallel to the sides of the cake (cuts are not required to start or end on the side of the cake). For what largest $k$ can the parents guarantee to cut out $k$ square pieces from the ordered cake, which can be given to $k$ children, so that each of them gets what they want?

(A. Ibragimov, I. Bogdanov)
Answer. $k=12$.

Solution. We always assume that the area of the cake is 1. We will show that for some children's requests, the parents will not be able to cut out more than 12 required pieces. Choose a number $1 / 15 > x > 1 / 16$. Suppose that 15 main children ordered a piece of cake with an area of $x$ each (and the other three made arbitrary orders so that the total area of the ordered pieces is equal to 1). Mentally divide the cake into 16 equal squares and mark all 9 vertices of these squares that do not lie on the boundary of the cake (see Fig. 3). Then strictly inside any square piece of area $x$ will lie one of the marked points, that is, no more than nine such pieces can be cut out. Therefore, at least six children will not get their desired pieces.

It remains to prove that 12 children will always be able to get what they want. Let $a_{1} \geqslant a_{2} \geqslant \ldots \geqslant a_{18}$ be the side lengths of the pieces that the children want to get, that is,

$$
a_{1}^{2}+a_{2}^{2}+\ldots+a_{18}^{2}=1
$$

We will show that from a square, pieces with sides $a_{7}, a_{8}, \ldots, a_{18}$ can be cut out.

For this, we need the inequalities

$$
a_{7}+a_{10}+a_{13}+a_{16} \leqslant 1 \quad \text { and } \quad a_{7}+a_{8}+a_{9} \leqslant 1
$$

To prove the first inequality, note that

$$
\begin{aligned}
1 \geqslant & a_{1}^{2}+a_{2}^{2}+\ldots+a_{16}^{2} \geqslant 4 a_{4}^{2}+4 a_{8}^{2}+4 a_{12}^{2}+4 a_{16}^{2} \geqslant \\
& \geqslant 4\left(a_{7}^{2}+a_{10}^{2}+a_{13}^{2}+a_{16}^{2}\right) \geqslant\left(a_{7}+a_{10}+a_{13}+a_{16}\right)^{2}
\end{aligned}
$$

In the last transition, we used the inequality between the quadratic mean and the arithmetic mean. The second inequality is proved similarly:

![](https://cdn.mathpix.com/cropped/2024_05_06_aeebc79ceb55f7038dcbg-5.jpg?height=480&width=832&top_left_y=1147&top_left_x=317)

| $a_{16}$ | $a_{17} \mid a$ |  |
| :---: | :---: | :---: |
| $a_{13}$ | $a_{14}$ | $a_{15}$ |
| $a_{10}$ | $a_{11}$ | $a_{12}$ |
| $a_{7}$ | $a_{\S}$ | $a$ |

$1 \geqslant a_{1}^{2}+a_{2}^{2}+\ldots+a_{9}^{2} \geqslant 3 a_{3}^{2}+3 a_{6}^{2}+3 a_{9}^{2} \geqslant$

$\geqslant 3\left(a_{7}^{2}+a_{8}^{2}+a_{9}^{2}\right) \geqslant\left(a_{7}+a_{8}+a_{9}\right)^{2}$.

Fig. 3
Fig. 4

From inequalities $(*)$ it follows that the cake can be cut into horizontal