Problem

Source: Croatia MO 2002 3rd Grade P4

Tags: game, combinatorics



Among the $n$ inhabitants of an island, every two are either friends or enemies. Some day, the chief of the island orders that each inhabitant (including himself) makes and wears a necklace consisting of marbles, in such a way that the necklaces of two friends have at least one marble of the same type and that the necklaces of two enemies differ at all marbles. (A necklace may also be marbleless). Show that the chief’s order can be achieved by using $\left\lfloor\frac{n^2}4\right\rfloor$ different types of stones, but not necessarily by using fewer types.