In the grid below, start at the A and end at the W, by first moving two positions (horizontally, vertically or diagonally), then by three positions, etc., alternating between 2- and 3-position moves. Never go to the same letter twice (though you may cross over a previous letter) and never reverse directions 180 degrees from one move to the next. Also never land on or even jump over the two hyphens.
For example, a valid start is A-C-P-R, and then the only valid move is the diagonal to B, as you can't backtrack to O, nor go up past the hyphen, nor is there enough room to go down three positions, nor any space to the right. Diagonals are always allowed, not just when you're stuck like this.
A B C D E
F G H I J
K L M N -
- O P Q R
S T U V W
What is the shortest such path? ... and the longest?
(In reply to
re(3): Solution by Charlie)
Ah. Thanks for the enlightenment.
My fault - because of an error in the coding I managed to isolate S as a 'no go' area.
But a really enjoyable problem - many thanks.
|
Posted by Harry
on 2009-03-27 20:02:48 |