Hi, I’ve developed a keen interest in brain teasers lately and thought, why not share and discuss them here. These brain teasers could potentially be asked during interviews for quantitative-related roles. They are taken from the book ‘A Practical Guide to Quantitative Finance Interviews’ by Xinfeng Zhou. The problem that we’re gonna solve in this post is “Chameleon Colors”.
Problem:
A remote island has three types of chameleons with the following population: 13 red chameleons, 15 green chameleons and 17 blue chameleons. Each time two chameleons with different colors meet, they would change their color to the third color. For example, if a green chameleon meets a red chameleon, they both change their color to blue.
Question: Is it ever possible for all chameleons to become the same color? Why or why not?
Solution:
Let’s consider the different scenarios where we combine all chameleons of two different colors:
From this, it seems like we cannot convert them all to the same color. Let’s now try to prove it. Let’s consider the scenarios where just two chameleons of different colors meet each other.
If we look at the difference in the numbers of blue and red chameleons, it will always be of the form 2 + 3x.
We can look at the difference in the numbers of green and blue chameleons, and find that it will always be of the form 2 + 3x as well.
Finally, we check the difference in the numbers of green and red chameleons, and find that it will always be of the form 4 + 3x.
So, we can conclude that the difference in the numbers of two different colored chameleons will always be the initial difference + 3x.
However, if all chameleons have the same color at the end, the difference in the numbers of two different colored chameleons will either be 45 (13+15+17) or 0. Since 45 = 3(15) and 0 = 3(0), this contradicts our previous findings. Unless the initial difference in the numbers of two different colored chameleons is 0 or a multiple of 3, it will be impossible for all chameleons to become the same color.
Conclusion: It is not possible for all chameleons to become the same color.
And that’s all for this brain teaser about chameleon 🦎. Any feedback or questions are welcome! Are you interested in more brain teasers 🧠? Check out the other problems in this series:
Thank you for reading! :)