[Systems of linear equations]

Seven coins (weighing 1, 2, ... 7 grams) are laid out in a row in some order. For each coin (except the outermost ones), the sum of the weights of its neighbors is known.

What is the maximum number of coins whose weight can be guaranteed to be known?

#
Make sure that the weights of the second, fourth, and sixth coins can be expressed through known weights.

## Solution

Let the weights of the coins in the order of their arrangement be: $x_{1}, x_{2}, \ldots, x_{7}$. From the condition, we have:

$x_{1}+x_{3}=a_{2}, x_{2}+x_{4}=a_{3}, x_{3}+x_{5}=a_{4}, x_{4}+x_{6}=a_{5}, x_{5}+x_{7}=a_{6}, x_{1}+x_{2}+x_{3}+x_{4}+x_{5}+x_{6}+x_{7}=28$, where $a_{k}$ is the sum of the weights of the neighbors of the $k$-th coin $(k=2,3,4,5)$. Therefore, $x_{4}=a_{3}+a_{5}-\left(28-a_{2}-a_{6}\right)$. This means the weight of the fourth coin can be determined. Since $x_{2}=a_{3}-x_{4}, x_{6}=a_{5}-x_{4}$, the weights of the second and sixth coins can also be determined.

On the other hand, if the coins in the row have weights $2,1,5,7,3,6,4$ or $4,1,3,7,5,6,2$, then the sums of the weights of the neighbors of each coin are the same in both cases, so it is impossible to reliably determine the weights of the first, third, fifth, and seventh coins.

## Answer

For three coins.

Children are throwing red, white, and blue balls. Each child threw and caught a total of three balls, and these are balls of different colors. Additionally, some three balls were thrown but not caught by anyone. Prove that these three balls are of three different colors.

## Hint

Show that the number of balls of each color that were thrown but not caught has the same parity.

## Solution

Let the number of children be $k$, and the number of red balls that were thrown but not caught be $m$. Then the number of red balls that were thrown and caught is $1 / 2(k-m)$ (since each of these balls was thrown by one child and caught by another). Thus, $k$ and $m$ have the same parity. Similarly, the number of balls of each color that were thrown but not caught has the same parity as $k$. The sum of these three numbers is 3. Since they are non-negative, they must all be equal to 1.