All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 Gamer say (Posted on 2004-03-18)
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?

 See The Solution Submitted by Gamer Rating: 4.0000 (5 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
 one way | Comment 9 of 16 |

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 MY   EA S R`
`G   MY A EA S R`
`  G MY A EA S R`
`Y G M  A EA S R`
`Y G MA A E  S R`
`Y G MA A ES   R`
`Y G MA   ES A R`
`Y G M  A ES A R`
`  G MY A ES A R`
`G   MY A ES A R`
`G A MY   ES A R`
`G A MY A ES   R`

The rest is trivial, and took me six moves to complete:

`G A MY A ES   R`
`G A MY A ES R  `
`G A MY A  S R E`
`G A  Y A MS R E`
`G   AY A MS R E`
`  G AY A MS R E`
`Y G A  A MS R E`
`Y G AA   MS 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

 Search: Search body:
Forums (0)