WoodCentral Forums

Est. 1998 — 27 years of woodworking knowledge

Friday Puzzle -- Chess Board

Posts

Friday Puzzle -- Chess Board

#1

Friday Puzzle -- Chess Board

Alex Y

Below is an image of a common chess board, with two squares marked A and B.

The goal is to move from A to B while visiting all squares (and by visiting, we mean going to the interior of, not just touching) exactly once, You may move vertically, horizontally, or on a 45* diagonal in either direction.

The challenge is to do it with the least number of turns.


And I'll pretend it was intentional and give a bonus to anyone who identifies the mistake in my illustration.

Re: Friday Puzzle -- Chess Board

#2

question

Larry Barrett

Is this to be done with a particular type of chess piece, like a queen or knight? And if so, does passing through a square would count as visiting the interior?

Bonus question answer - rotate 90* clockwise.

Re: Friday Puzzle -- Chess Board

#3

Re: question

Alex Y

Is this to be done with a particular type of chess piece, like a queen or knight?


I wasn't actually thinking of a chess piece. Definitely not the knight -- three new squares visited on each move, and one turn => 31 turns to visit every square (assuming you can do it and end up at B) Way too many turns. Queen or King would be the only ones that can move diagonally, vertically, and horizontally.

And if so, does passing through a square would count as visiting the interior?


Yes. It doesn't matter whether you use the queen to move the length of an entire row in one move or the king to do it in seven steps. We only care about how often they change direction.

Bonus question answer - rotate 90* clockwise.


You win the bonus prize! About half-way through shading the squares, I thought "you know, I really should look at a chessboard to see which color goes on which major diagonal" But I was too lazy.

Re: Friday Puzzle -- Chess Board

#4

Re: question

Larry Barrett

When I read the word 'turns', in the context of a chess board, I thought 'White moves, then Black moves', rather than change of direction.

For convenience, lable the board squares a-h (left to right) and 1-8 (bottom to top), as in chess. If I start at a1 (lower left) and move in a clockwise spiral, I can visit all the squares exactly once, ending up on e4, in 15 turns. No diagonals involved, but seems like a minimum to cover the board.

For your problem the start point A is at square c6 and the end point B is at f3, so likely more than 15 turns required. I think I can do it in 23.

Re: Friday Puzzle -- Chess Board

#5

Clarification

Alex Y

The challenge is to do it with the least number of turns.

Larry pointed out the ambiguity in this statement. I meant "turns" to refer to changes in direction, not plays of a chess piece. And while I'm correcting, let me please my third grade grammar teacher, and reword this sentence as:

The challenge is to do it with the fewest changes of direction.

Re: Friday Puzzle -- Chess Board

#6

Re: question

Alex Y

For convenience, lable the board squares a-h (left to right) and 1-8 (bottom to top), as in chess. If I start at a1 (lower left) and move in a clockwise spiral, I can visit all the squares exactly once, ending up on e4, in 15 turns.
I count 15 moves of a queen tracing that path, with 14 changes of direction.

You can do better than 23 changes of direction from A to B (and better than 22 also, in case you were counting moves).

Re: Friday Puzzle -- Chess Board

#7

another way to cover the board from a corner

Alex Y

For convenience, lable the board squares a-h (left to right) and 1-8 (bottom to top), as in chess. If I start at a1 (lower left) and move in a clockwise spiral, I can visit all the squares exactly once, ending up on e4, in 15 turns. No diagonals involved, but seems like a minimum to cover the board.

I suspect 14 is the minimum number of direction changes to cover the board, at least starting in a corner. Another approach is a1->a8->b8->b1,,,h8->h1. Direction changes occur on b1-g1 and a8-h8

The optimal approach for getting from A to B has more in common with your solution, though.

Re: Friday Puzzle -- Chess Board

#8

Re: another way to cover the board from a corner

Larry Barrett

I think I can do it in 17 moves, 16 turns. Only one diagonal, on next to last move.

Re: Friday Puzzle -- Chess Board

#9

Getting close

Alex Y

In the optimal path (actually, there are two, different only by trivial symmetry), 1/3 of the moves are on diagonals.

Re: Friday Puzzle -- Chess Board

#10

Hint

Alex Y

This hint will allow you to deduce the number of direction changes there are, some characteristics of the solution (and the relationship between the two solutions). Combined with a hint given in another post, it will likely lead to the solution.

The seventh and eighth changes of direction occur in the squares farthest from A and B that are each equidistant from A and B.

Re: Friday Puzzle -- Chess Board

#11

Re: Hint

Larry Barrett

17 moves (7 on diagonals), 16 change of directions

Re: Friday Puzzle -- Chess Board

#12

Getting closer

Alex Y

getting closer. Look at the square where the seventh change of direction is. If you can get from A to there with six changes of direction, how many changes of direction will there be after the square where the 8th occurs, to get to B?

Re: Friday Puzzle -- Chess Board

#13

Re: Getting closer

Larry Barrett

Based on multiple hints, there must be 14 changes of direction, 15 moves (of which 5 are diagonal). I think the 7th and 8th changes of direction take place on the a1 and h8 squares.

But so far I do not see how to get from A to a1 (or h8) in 7 moves (6 changes of direction). But once that is clear, the path to B will be symmetrical.

From this can one infer that to get from any square to a mirror image square across a main diagonal requires the same number of moves and changes of direction (15, 14)?

Re: Friday Puzzle -- Chess Board

#14

Re: Getting closer

Alex Y

From this can one infer that to get from any square to a mirror image square across a main diagonal requires the same number of moves and changes of direction (15, 14)?
Interesting question. We can certainly infer that the number of moves and changes in direction is (odd,even), but I don't know if you can always get to a1 in 6 moves. Nor do I know a way to pick a square to show that you can't. Maybe that can be this week's puzzle. just trying to visualize it, I think a square like c2 may create an insurmountable problem.

But on the the puzzle at hand. You are very close, and your inferences so far are right. The hint for how to get from A to a1 or h8 is imbedded in an offhand comment I made in an early post.

Re: Friday Puzzle -- Chess Board

#15

Re: Getting closer

Larry Barrett

Moves from A (at c6) to B (at f3):

c6 -> d6 -> b4 -> b7 -> f7 -> a2 -> a8 -> h8 -> a1 -> h1 -> h7 -> c2 -> g2 -> g5 -> e3 -> f3.

Re: Friday Puzzle -- Chess Board

#16

Correct! 

Alex Y

Haven't traced it out completely, but that looks right. And here is the mirror image(reflected in the other major diagonal)


👍 This page answered my questions

Your vote helps other woodworkers quickly find the answers and techniques that actually work in the shop.