Hum, how could we use mathematics to represent this then? I can see how a program can use an array to simulate and shift the values around according to the rules to achieve the desired result, but as far as obtaining the least number of moves..

Lawdy, I sure can't wait to see what Xei comes up with. Mein interest is piqued.