Chameleons - rFronteddu/general_wiki GitHub Wiki
- 13 purple, 15 yellow, and 17 maroon chameleons are found on an island.
- When two different-colored chameleons come together, they both turn into the third color.
Do all chameleons eventually have the same hue after a certain number of pairwise meetings?
Solution
No.
There are 3 possibilities for color-changing.
- A Purple can meet a Yellow,
- a Purple can meet a Maroon,
- and a Yellow can meet a Maroon.
Letβs compute what happens to the quantity Yellow β Purple for those possibilities in order:
- (Yellow β 1) β (Purple β 1) = Yellow β Purple
- (Yellow + 2) β (Purple β 1) = Yellow β Purple + 3
- (Yellow β 1) β (Purple + 2) = Yellow β Purple β 3
We conclude that the difference can either be the same, or it can go up or down by 3 because when a Purple and a Yellow meet, the number of each reduces by 1 so the difference between them stays the same.
- When one color reduces by 1 the other color increases by 2, for a total difference of plus or minus 3.
- So, the difference between Yellow and Purple is always the same as at the start, plus or minus a multiple of 3.
For the chameleons to be of the same colour there are 3 ways this could happen:
- (45 Purple, 0 Yellow, 0 Maroon), so Yellow β Purple = -45 = 3(-15)
- (0 Purple, 45 Yellow, 0 Maroon), so Yellow β Purple = 45 = 3(15)
- (0 Purple, 0 Yellow, 45 Maroon), so Yellow β Purple = 0 = 3(0)
If all chameleons became of the same color, then the difference Yellow β Purple would be a multiple of 3.
- But itβs not possible as per the question as the difference Yellow β Purple will never be a multiple of 3βit will always be 2 more than a multiple of 3.