Gamer say:
Spiral the words Gamer says around in a 3 by 3 board like this:
G A M
Y E
A S R
On each turn, you may slide one letter horizontally or vertically into the blank space (the square it moved from becomes the new empty square).
You want to rearrange the letters so that the same word is spelled out around the edge, but beginning from one of the edges instead of the corner.
In other words, the board should look like one of these configurations:
Y G A S A Y E R S A M E
A M R G M A G R
S R E E M A A G Y Y A S
What is the fewest number of turns it takes to do this?
18
It is extremely simple to rotate it an even number of spaces, to put the G in one of the other corners. Just push the E, S, Y, or the first A into the middle, rotate the other pieces around, and put the letter back where it goes.
To move it an odd number of times, and start the G on an edge, it gets more tricky. You have to take advantage of the fact that there are two As, one that starts on the edge, while the other ends up on an edge.
If you just use the same method, push one A into the middle and put it back on the edge where it goes, you'll end up with an A in the wrong corner (GMERSAAY instead of GAMERSAY, something like that).
So, the trick is getting the second A to be the one in the middle. To do so, you have to just switch their positions -- put the second A where the first one is, and leave the first in the middle. Then, when you rotate them around, the space for the second A ends up on the edge.
Switching the As took me 12 moves:
G A M
Y E
A S R
G M
Y A E
A S R
G M
Y A E
A S R
Y G M
A E
A S R
Y G M
A A E
S R
Y G M
A A E
S R
Y G M
A E
S A R
Y G M
A E
S A R
G M
Y A E
S A R
G M
Y A E
S A R
G A M
Y E
S A R
G A M
Y A E
S R
The rest is trivial, and took me six moves to complete:
G A M
Y A E
S R
G A M
Y A E
S R
G A M
Y A
S R E
G A
Y A M
S R E
G A
Y A M
S R E
G A
Y A M
S R E
Y G A
A M
S R E
Y G A
A M
S R E
That's a total of 18 moves. The second part can't be improved upon (if you rotate the outside in the other direction, it takes 9 moves instead of 6). Perhaps, though, there is a more efficient way to switch the two As, so my answer isn't final, yet ...
|
Posted by DJ
on 2004-03-18 17:19:33 |