On Chameleon Island exists a peculiar sort of chameleon. At any given time any given chameleon is either red, blue or green. When two chameleons of unlike color meet, both immediately change to the remaining possible color.
I scientist has collected 36 of these animals, 12 of each color, and kept them in 36 separate containers to prevent color change, but he wants to keep them in two terraria.
When kept together in small numbers, there's a danger that all the lizards will ultimately go to one color, as exemplified by the following scenario starting out with 1 red, 4 blue and 13 green chameleons. The two letters at the left of each line specify the meeting that changed the count to the one on the given line:
r b g
1 4 13
rg 0 6 12
bg 2 5 11
rg 1 7 10
rg 0 9 9
bg 2 8 8
bg 4 7 7
bg 6 6 6
bg 8 5 5
bg 10 4 4
bg 12 3 3
bg 14 2 2
bg 16 1 1
bg 18 0 0
From then on, this scenario has all 18 of its chameleons red.
How can the scientist divide his 36 chameleons between the two terraria without posing the possibility of all becoming one color in either terrarium? Assume that no births or deaths occur. There's more than one way.
Well, I haven't gotten the big picture yet.
At first glance this seemed impossible, but I note that the following 6 sets form a closed group, which can only change into each other, never into all of one color, and never into 2 colors with the same number (which could lead to all of one color):
a) 0 1 8 -- can only switch to b
b) 0 2 7 -- can only switch to c
c) 1 2 6 -- can switch to a, e or f
d) 1 3 5 -- can switch to b, e, or f
e) 0 5 4 -- can only switch to f
f) 2 3 4 -- can only switch to c, d or f
Note that I am not worrying about order here. In (d), for instance, if one of the 3's meets one of the 5's, then we wind up with 3 2 4, which is the same as (f).
Edited on September 25, 2009, 2:09 pm