VOOZH about

URL: https://www.geeksforgeeks.org/aptitude/puzzle-chameleons-go-on-a-date/

⇱ Puzzle - Chameleons go on a date - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Puzzle - Chameleons go on a date

Last Updated : 9 Apr, 2026

13 purple, 15 yellow, and 17 maroon chameleons are found on an island. When two different-coloured chameleons come together, they both turn into the third colour.

Do all chameleons eventually have the same hue after a certain number of pairwise meetings?

👁 chameleon

Check if you were right - full answer with solution below.  

Solution:

• We are given 13 purple, 15 yellow, and 17 maroon chameleons. When two chameleons of different colors meet, both change into the third color.

• Consider the quantity (Yellow − Purple). Initially:
Yellow − Purple = 15 − 13 = 2.

• After any meeting, this quantity either remains unchanged or changes by a multiple of 3. Hence, throughout the process:
Yellow − Purple = 2 + 3k (for some integer k),
which means it is never divisible by 3.

• Now consider the final situation where all chameleons become the same color:

If all are purple: Yellow − Purple = 0 − 45 = −45
If all are yellow: Yellow − Purple = 45
If all are maroon: Yellow − Purple = 0

In all cases, the value is divisible by 3.

• This creates a contradiction because the value (Yellow − Purple), which is never divisible by 3 during the process, must become divisible by 3 in the final state.

Therefore, it is not possible for all chameleons to eventually have the same color.

Comment
Article Tags: