Snakes On An Island

I sort of wanted to work through the solution to the tic-tac-toe variant from last time, but in truth its probably not very interesting to actually do it. Anyway, when I get desperate for new blogging material I might go back to that. For now, I learned a new puzzle from the people in the math room on KGS:
There is an island with snakes on it. The snakes can be either red, green, or blue. If two snakes of different colours meet, they each become the third colour. The snakes never reproduce or die.

Starting with 13 red snakes, 15 green snakes, and 17 blue snakes, is it possible to get to a configuration with equal numbers of snakes of each colour? Find the steps that would need to happen, or prove that it is impossible.

So, you can reformulate this as balls in three jars, and the legal move is to select a jar and move one ball from each of the other two jars into the selected one. Starting from 13-15-17, try to get to 15-15-15.

1 comment:

Anonymous said...

suppose, jars are A=13,B=15,C=17, and that after choosing A 'a' times, B 'b' times, C 'c' times, (where a,b,c are non-negative integers) we make A=15,B=15,C=15, then,
13+2a-b-c=15 .. 1
15+2b-a-c=15 .. 2
17+2c-a-b=15 .. 3

2) => 2b=a+c, putting in 1) => 4a-a-c-2c=4 => 3(a-c)=4, but this is impossible for any a,c