What's the shortest path from A to R in the array below, if your moves are to be in the repeated length sequence 3, 2, 1, 3, 2, 1... (such as, say ADJMC...), and no two successive moves are in the same direction or in the reverse direction? Moves may be orthogonal or diagonal. No move may end on a hyphen (-) but may jump over them and the R must be reached on exact count.
ABCD-
EFGH-
--IJK
-LM-N
OP-QR
(In reply to
Some Thoughts by Steve Herman)
It would be interesting to try to program this, but I found trial and error worked well (though this gives me no proof that the solution I submitted in my second response is the shortest path -- then using nine steps with 3 2 1 3 2 1 3 2 1 to reach R). One could build a matrix of all possible moves of one, or two, or three cells into and out of each cell, and then test all combinations. (My first posting came from an initial misunderstanding of what was to be counted -- squares rather than letters, which appeared to allow a one move solution from A to R along the left diagonal, via three letters, not counting the hyphen at 4,4 which could be "jumped over".)