Home > Riddles > Chameleons with a possible ending

Chameleons with a possible ending

Numerical territoryLevel 5 · Expert · ●●●●●

On an island there are:

  • 4 red chameleons,
  • 7 green,
  • 10 blue.

When two of different colors are found, both change to the third color.

  1. Is it possible to reach a state where everyone has the same color?
  2. If possible, give a specific sequence and the minimum number of encounters.

Hints

Show hints
  1. Reusable idea: In population dynamics, combine modular invariant with linear system to construct an optimal sequence.
  2. To end up all blue, we want R'=0 and G'=0 with: R'=4-x-y+2z, G'=7-x-z+2y.
  3. Total number of encounters: x+y+z=(z+5)+(z-1)+z=3z+4.

Solution

Show full solution

Back to problem
Answer: Yes it is possible; The minimum is 7 meetings.
Initial state:

$$ (R,G,B)=(4,7,10),\quad R+G+B=21. $$

Let:

  • $x$ = Red-Green encounters,
  • $y$ = Red-Blue matches,
  • $z$ = Green-Blue encounters.

To finish all blue, we want $R'=0$ and $G'=0$ with:

$$ R'=4-x-y+2z, $$

$$ G'=7-x-z+2y. $$

Solving:

$$ y=z-1,\quad x=z+5. $$

Total number of meetings:

$$ x+y+z=(z+5)+(z-1)+z=3z+4. $$

Minimum with $y\ge 0$ is $z=1$, then:

$$ (x,y,z)=(6,0,1),\quad x+y+z=7. $$

Concrete sequence (7 steps):

  1. A Green-Blue encounter: $(4,7,10)\to(6,6,9)$.
  2. Six Red-Green matches in a row:

$(6,6,9)\to(5,5,11)\to(4,4,13)\to(3,3,15)\to(2,2,17)\to(1,1,19)\to(0,0,21)$.
They are all blue.
Reusable idea: in population dynamics, combine modular invariant with linear system to construct an optimal sequence.


Related riddles

Keep practicing

If you enjoyed this one, try more pure-logic riddles, explore this theme, browse the full archive, or read the riddle-solving guide.

← Previous: Mutilated board and dominoes · Next: The Oracle Who Knows Himself →