# Problem 9.5 (7 points)

In a store, there are buttons of six colors. What is the smallest number of buttons that need to be bought so that they can be sewn in a row, such that for any two different colors in the row, there are two adjacent buttons of these colors?
# Solution:

From the condition, it follows that for each fixed color A, a button of this color must appear in a pair with a button of each of the other 5 colors. In a row, a button has no more than two neighbors, so a button of color A must appear at least 3 times. The same applies to each other color. Thus, there should be no less than $3 \cdot 6=18$ buttons. Here is one example of the desired arrangement of buttons: 123456246325164135 (the colors are denoted by digits).

| Criteria | Points |
| :--- | :---: |
| Complete solution | 7 |
| Estimating the number of buttons without an example | 4 |
| Example without estimating the number | 3 |
| Incorrect solution | 0 |

## Answer: 18 buttons