B3. Twelve balls are numbered with the numbers $1,2,3, \ldots, 12$. Each ball is painted either red or green such that the following conditions are met:

(a) if the balls numbered with different numbers $a$ and $b$ are painted red and $a+b<13$, then the ball numbered with $a+b$ is also painted red;

(b) if the ball numbered with $a$ is painted red and the ball numbered with $b$ is painted green and $a+b<13$, then the ball numbered with $a+b$ is painted green.

In how many ways can the balls be painted?

## Problems for 4th Grade

Time for solving: 120 minutes. In section A, a correct answer will be worth two points, while a wrong answer will result in a deduction of half a point. Write the answers for section A in the left table.
![](https://cdn.mathpix.com/cropped/2024_06_07_4050f14f84cf4f327f67g-08.jpg?height=160&width=806&top_left_y=548&top_left_x=640)
B3. Obviously, all colorings where at most one ball is red are suitable. Suppose that at least two balls are red. Let $a2$ be the second red ball, and if ball 2 is green, then by rule b) ball 3 is also green. By repeated application of rule b), we conclude that all other balls are green, which is in contradiction with the assumption that at least two balls are red.

Let $a>1$. Balls $1,2, \ldots, a-1$ are green. By rule b), balls $a+1, a+2, \ldots, a+(a-1)=2a-1$ are also green. If ball $2a$ is green, then by rule b) balls $a+(a+1)=2a+1, \ldots, a+(2a-1)=3a-1, a+2a=3a$ are also green. By continuing to apply rule b), we find that no ball can be red. From this, it follows that ball $2a$ is red. By rule b), for those among the numbers $2a+1, 2a+2, \ldots, 3a-1$ that are less than 13, the balls with these numbers are green. If $3a<13$, then by rule a) ball $3a$ is red. With this conclusion, we continue and find that exactly those balls that are multiples of the number $a$ are red. Since at least two balls are red, $2a \leq 12$, thus $a \leq 6$.

We have found that the following colorings are possible:

- all balls are green,
- exactly one ball is red (there are 12 such colorings),
- the balls with numbers that are multiples of the number $a \leq 6$ are red (there are 6 options for choosing $a$).

There are 19 colorings in total.

It is stated that all colorings with at most one red ball are suitable. . . . . . 1 point If ball 1 is red, the justification that all other balls are either red or green 1 point In the case of at least two red balls, the second smallest number on a red ball is a multiple of the smallest 1 point If at least two balls are red, the numbers on the red balls are multiples of some

## Solutions for 4th Grade

In section A, a correct answer will be awarded two points, while an incorrect answer will result in a deduction of half a point. To avoid a potential negative final score, each contestant is given an initial 2 points.

| A1 | A2 | A3 |
| :---: | :---: | :---: |
| B | B | D |

## Justifications: