\section*{Task 3 - 011223}

Five vessels each contain 100 balls. Some vessels contain only balls of \(10 \mathrm{~g}\) mass, while the others contain only balls of \(11 \mathrm{~g}\) mass.

How can one determine, through a single weighing with scales and appropriate weights, which vessels contain \(10 \mathrm{~g}\) balls and which vessels contain \(11 \mathrm{~g}\) balls? (Balls may be removed from the vessels.)
}

One takes from the

1. vessel \(20=1\) ball,

2. vessel \(21=2\) balls,

3. vessel \(22=4\) balls,

4. vessel \(23=8\) balls, and 5. vessel \(24=16\) balls.

Now, one determines the total mass of these \(2^{5}-1=31\) balls with a single weighing. Subtracting \(31 \cdot 10 g=310 g\) from this, one obtains the (measure-)number \(a\). From the equation

\[
x_{1}+2 x_{2}+4 x_{3}+8 x_{4}+16 x_{5}=a
\]

one can uniquely conclude the unknowns \(x_{i} \in\{0,1\}\), which indicate whether in the i-th vessel there are balls of \(10 \mathrm{~g}\left(x_{i}=0\right)\) or \(11 \mathrm{~g}\left(x_{i}=1\right)\).

Proof: (1) is nothing other than the binary representation \(x_{5} x_{4} x_{3} x_{2} x_{1}\) of the decimal number \(a\), where the conversion from one number system to the other is unique.

Example: Let \(a=22\). One obtains: \(0+2 \cdot 1+4 \cdot 1+8 \cdot 0+16 \cdot 1=22\). Therefore, in the 1st and 4th vessels, there are balls of \(10 \mathrm{~g}\), while in the 2nd, 3rd, and 5th vessels, there are balls of \(11 \mathrm{~g}\).