3. In a box, there are balls of blue, green, and red color. If we want to draw a certain number of balls and be sure that among them there is at least one ball of each color, it is necessary to draw 11 balls. If we want to be sure that among the drawn balls there is a green ball, it is necessary to draw 10 balls. If we want to be sure that among the drawn balls there is a red ball, it is necessary to draw 8 balls. How many balls of each color are in the box?
3. Let $p$ be the number of blue balls, $z$ the number of green balls, and $c$ the number of red balls. From the last condition, we conclude that $p+z=7$ (since 7 balls are not enough to ensure that one of them is red, i.e., it is possible that all 7 drawn balls are blue or green, and it is not possible to draw 8 balls that are all blue or green). Similarly, from the second-to-last condition, we conclude that $p+c=9$. Finally, from the first condition, it follows that $z+c=10$ (namely, the condition implies that one of the equalities $p+z=10, p+c=10$, or $z+c=10$ holds, but the first two are impossible due to earlier conclusions). Adding all three obtained equalities gives $2 p+2 z+2 c=26$, i.e., $p+z+c=13$, and from there we get $c=6, z=4$, and $p=3$.

![](https://cdn.mathpix.com/cropped/2024_06_04_f254ba4f25ce7f8d9df1g-31.jpg?height=358&width=406&top_left_y=388&top_left_x=191)

Op 2017 1B 4