Open In App

Puzzle – Chameleons go on a date

Last Updated : 18 Jan, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

Question: 

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?

Solution:

As per the question, whenever 2 chameleons of different colours meet, both of them get converted into the third colour chameleon, which means that the number of Chameleons of the two colours (which met) decreases by 1, whereas the number of chameleons of the third colour (they converted into after meeting) increases by 2. 
Let us denote the chameleons of different colours purple, yellow and maroon by p, y and y, respectively, and then the initial state is (13, 15, 17). 
Now, let us suppose that initially, a purple and maroon meet. The vector changes to (12, 17, 16) and after continuing, we would get to this state (0, 41,4). 
When Yellow and Maroon meet first : (15, 14, 16) and after continuing, the end state is (43, 0, 2).
When Purple and Yellow meet first: (12, 14, 19)and after continuing, the end state is (0, 2, 43).
Therefore, we observe that the difference between the Chameleons of two different colours is never going to be 0, and in the absence of such a scenario we can’t get all the Chameleons to turn into one single colour.

Alternative Solution:

As per the question, the conditions there is the same number of chameleons, and the total number of chameleons never changes. So, the alternate way to see this situation is by a mathematical formula. Initially, we have:
Purple + Yellow + Maroon = 45
There are 3 possibilities for colour-changing. A Purple can meet a Yellow, a Purple can meet a Maroon, and a Yellow can meet a Maroon. In each case, two colour types decrease by 1, and the third colour type increases by 2. The three possibilities can be represented by:
(Purple – 1) + (Yellow – 1) + (Maroon + 2) = 45
(Purple – 1) + (Yellow + 2) + (Maroon – 1) = 45
(Purple + 2) + (Yellow – 1) + (Maroon – 1) = 45
The reduction in the number for the colours that meet is exactly offset by the increase in the number for the other colour.
To solve the question, let’s find an invariant that considers the pairing of Yellow and Purple chameleons considering the difference between Yellow and Purple chameleons:
Yellow – Purple
There are 3 possibilities for colour-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 colour reduces by 1 and the other colour 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.
Let’s begin with 13 Purple and 15 Maroon so:
Yellow – Purple = 2
Irrespective of how the chameleons meet, this difference will always be 2 plus a multiple of 3. So we have:
Yellow – Purple = 2 + 3k, for some integer k
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 colour, 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.
Therefore, it is not possible for the 13 Purple, 15 Yellow, and 17 Maroon chameleons to ever all become the same colour.


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads