Fog Creek Software
Discussion Board


The chameleons will never be the same color.

All chameleons could become the same color only if two of the color groups could ever reach the same size.  Let's call the difference in size between two groups the distance between them; then all chameleons could become the same color only if the distance between two of the groups could become 0.

Now when two chameleons transform, their original groups remain the same distance apart while the respective distances between the gaining group and each of the original groups change by 3. Thus the distance between groups can only increase or decrease in steps of size 3.

Since the current groups are 2 and 4 apart, respectively, steps of size 3 will always leave them at least 1 apart.

Hence no two groups can ever be the same size, and every transformation will leave at least one chameleon of a different color.

Chuck Boyer
Saturday, August 7, 2004

no, the p is 0 anyway.
13 :r
15 : b
17 : y

15 b(s) meets 15 (y)

Step 2.

13 r+ 15 r+ 15  r
0 b
2 Y

Step 3.

1 Y will meet 1 r
42: r
2 b:
1 y:

Step 4.
b will meet y and i more will become red.

but it is last

Tuesday, August 10, 2004

My solution is virtually the same as Chuck's. Just a slightly different way of saying the same thing (and one minor difference).

Starting numbers: 13, 15, 17
Difference between any 2 pairs of numbers is 2 or 4.
Neither 2 nor 4 is a multiple of 3.

After pairing 2 colours, the numbers change by:
-1, -1, +2

Take differences of these 3 pairs:
(-1) - (-1) = 0 which is a multiple of 3
(+2) - (-1) = 3 which is a multiple of 3

So the differences between pairs of chameleon numbers can only change by a multiple of 3. Since the differences don't start out as a multiple of 3, they can never become a multiple of 3.

In particular you can never get to all chameleons the same colour, because then the numbers would be 0, 0, 45. And then every pair of numbers WOULD differ by a multiple of 3 (since 45 is a multiple of 3).

The minor difference to Chuck's solution, is that he concentrates on not being able to get 2 numbers equal. I concentrate on the final differences not being a multiple of 3.

His solution has one nice side-effect. It gives a clue as to which colours to get rid of. For example, if you change the numbers slightly, e.g. 13, 15, 18, then his principle of getting things equal tells you that you must try to get rid of the 15's and 18's (since they differ by 3, so their difference can be taken down to 0) i.e. start by pairing 13's and 18's. So it gives a little more insight into HOW to do it, too.

To get a little more insight into the "multiples of 3's" principle, consider changing the numbers slightly. If the numbers started out as 12, 15, 18 then all differences would be a multiple of 3. Then you just match the 12's and 18's, to get: 11, 17, 17. Then you pair off the 2 groups of 17's, and get a final solution of 45, 0, 0.

Andrew Tweddle
Tuesday, September 14, 2004

*  Recent Topics

*  Fog Creek Home