13

Consider an $8\times8$ chessboard. Let the rook be placed on the square a1. Is it possible for the rook to make a tour of $64$ moves such that:

  • the rook visits every square once,
  • the rook visits every square,
  • the rook begins and ends on the square a1,
  • the rook makes $32$ horizontal and $32$ vertical moves?

I'm looking for hints.

Clarification: if a rook makes a move from, say, a1 to a8, then squares a2 to a7 are considered visited as well.

Benji Altman
  • 1,247
  • 2
    See http://puzzling.stackexchange.com/questions/8511/the-erasmus-rook-tour – Barry Cipra Feb 07 '17 at 21:29
  • 3
    @BarryCipra That proof is incorrect, because it isn't proven that every path on a 8x8 board can be obtained by joining paths in 2x2 squares that way. – Wolfram Feb 07 '17 at 21:50
  • 1
    Come on, you have written that you're looking for hints, but now you opened the bounty with formulation "The current answers do not contain enough detail." Okay, I'll post the full solution, but why in the world is it necessary to downvote hints that you asked about or open the bounty instead of just asking to explain more in the comment? – Wolfram Feb 12 '17 at 18:25
  • You explicitly stated you don't know how to complete the proof. That's why the bounty. –  Feb 12 '17 at 18:27
  • Em, I said I don't know how to complete the proof from the link, but not how to complete the path I sketched in my answer, it is a bit different. Sorry if that was not clear. – Wolfram Feb 12 '17 at 18:34
  • Oh, I see. I agree with you that this bounty may seem pretty unclear and a bit useless. I'm grateful for your efforts to improve this question –  Feb 12 '17 at 18:35
  • Okay, I missed one case and realized that the correct argument is more complex that I thought initially. I know how to prove though, think to finish tomorrow, but now I start to suspect that there must be a more simple solution. – Wolfram Feb 12 '17 at 19:51
  • Can you clarify in your question whether you intend only moves to adjacent squares, or the moves of a normal rook? If a rook makes a move from say a1 to a8, are squares a2 to a7 considered visited as well? – ShreevatsaR Feb 15 '17 at 19:54

4 Answers4

8

I have found a solution that seems to fit what you are looking for.

$$ \begin{bmatrix} 58 & 61 & 62 & 57 & 25 & 26 & 13 & 14\\ 59 & 60 & 41 & 42 & 16 & 11 & 12 & 15\\ 33 & 34 & 21 & 22 & 9 & 10 & 29 & 30\\ 32 & 19 & 20 & 7 & 8 & 27 & 28 & 31\\ 46 & 18 & 5 & 6 & 17 & 45 & 38 & 37\\ 47 & 3 & 4 & 23 & 24 & 54 & 53 & 48\\ 1 & 2 & 40 & 43 & 50 & 44 & 39 & 49\\ 0 & 35 & 63 & 56 & 51 & 55 & 52 & 36 \end{bmatrix} $$

You may also notice that for all odd moves, the rook moves vertically, and for all even move the rook moves horizontally.

Edit: This solution no longer works as the clarification invalidates it.

Clarification: if a rook makes a move from, say, a1 to a8, then squares a2 to a7 are considered visited as well.

Benji Altman
  • 1,247
  • @VanDerWarden: Where has he? – Will R Feb 12 '17 at 20:50
  • @BenjiAltman of course they can move far away, but when you move a rook on the board, you usually slide it, so in some sense the fields on its path are still "visited". So the statement is a bit ambiguous. – Wolfram Feb 13 '17 at 17:21
  • @Wolfram If you define that way then this would work as a move order: Ra8, Rb8, Rb2, Rc2, Rc8, Rd8, Rd2, Re2, Re8, Rf8, Rf2, Rg2, Rg8, Rh8, Rh1, Ra1 – Benji Altman Feb 14 '17 at 02:52
  • Come on, only 14 horizontal moves, not 32. – Wolfram Feb 14 '17 at 08:02
  • @Wolfram Though there are no doubt multiple ways to define a rook's tour, a common definition is that the squares that the rook "slides over" are not considered visited. See for example this page on George Jelliss's Knight's Tour Notes pages (kind of a canonical reference on the topic): it calls the tours that you're thinking of as "single-step rook tours" or "wazir tours". – ShreevatsaR Feb 15 '17 at 04:30
  • @ShreevatsaR I understand that it is better to make explicit if the rook tour is considered single-step, but I think that wherever this problem is from, its author meant single-step moves, since there are millions of examples of balanced flying rook tours, which are pretty easy to come up with, and no balanced single-step rook tours, which I still don't know how to prove easily. – Wolfram Feb 15 '17 at 17:12
  • 1
    @Wolfram Well, that is not the conventional meaning of "rook tour", so if that's what the OP means, then it's up to the OP to clarify the question. I don't think it's right to object to an answer that answers the question actually asked, based on an unverified guess that the intended question was something else. (But I see what you mean, and I think I agree with your guess that the intended question was indeed about adjacent square moves only.) – ShreevatsaR Feb 15 '17 at 17:23
  • @Wolfram (and @Benji) The OP has now added a clarification in the question that only single-step moves are intended. So after this edit, this answer is no longer a solution to the revised question. – ShreevatsaR Feb 16 '17 at 02:24
  • @ShreevatsaR Thanks for telling me, I'll make an edit as soon as I can. – Benji Altman Feb 16 '17 at 16:44
3

The idea from the link is correct. If we have some $2\times2$-subsquare with two parallel moves inside it (and no other moves inside it - remember about this), then we can change the two parallel moves into parallel moves in other direction and call it a swap. Here is a typical example: enter image description here Swap: enter image description here

One can prove that if we have some number of closed rook paths drawn on the board, then one swap always changes this number by 1 up or down, that is, changes parity. Indeed, let's think how the squares of the $2\times 2$ square where we make a swap can be connected from the the outside. WLOG, we can assume that swap changes 2 horizontal moves into 2 vertical. If the upper two squares are connected with each other from the outside, and the bottom two are connected from the outside, then we have two components affected under swap, and they become 1 component after the swap. If two right squares are connected and two left also, the situation is the opposite: we have 1 component with two red edges as in the picture before swap and 2 after the swap. There can never be a situation when upper left is connected with bottom right corner and upper right with bottom left. This is pretty obvious from the picture, but not so easy to prove formally: I'll add the details later, if you want.

Now let us prove that any path can be reduced to the union of the following 4 paths by a series of swaps: enter image description here Why is this enough to disprove the existence of the path, described in the question? Obviously, we did an odd number of swaps, while reducing to this union of 4 paths, because each swap changed parity of the number of components, and initially there was the only one. However, this means that the number of swaps where we changed horizontal to vertical is not equal to the number of vice versa swaps. This means that we could not possibly preserve the property that the numbers of vertical and horizontal moves are the same, but in this union of 4 paths it is the same.

Now let us prove the main part: how we reduce any path to this union. We start to build firstly the outside layer, then after we done this, we can use similar method for inner $6\times 6$ square etc. Suppose in some moment the path along the border is not built: this means that there exist two neighbor squares at the border, not connected by a rook move:

enter image description here

Then we can swap two cyan edges and thus increase the number of edges along border by one. If we do this long enough, we eventually build the path along the border. However, there is an unpleasant case, where we can't do this:

enter image description here

If $A$ and $B$ are connected, we can't perform a swap. But if $C$ and $D$ are also connected, we can first make a swap in $ABCD$ square. Then $A$ and $B$ become disconnected, and we can swap two cyan moves. So the only bad case is when $C$ and $D$ are disconnected. Since they must be connected with two neighbor squares each, this means that the edges from them look like on the picture above. Then we can swap two orange edges and win... unless the two non-shown ends of the orange edges are also connected. Then move the picture two squares upper and repeat the argument until we hit the opposite side of the board. We obtain a structure where a lot of edges are known and there can be shown that this is impossible to continue it for covering the whole board by closed paths. I'll add technical details later.

Wolfram
  • 2,091
1

Here's another solution based on the assumption that the rook only visits the square where it lands. (A "flying rook," so to speak...)

$$ M = \begin{bmatrix} 63 & 5 & 4 & 26 & 27 & 17 & 62 & 16 \\ 29 & 42 & 43 & 14 & 28 & 60 & 61 & 15 \\ 7 & 6 & 44 & 13 & 12 & 59 & 45 & 58 \\ 51 & 50 & 3 & 21 & 56 & 2 & 20 & 57 \\ 8 & 9 & 32 & 25 & 36 & 33 & 24 & 37 \\ 52 & 10 & 53 & 39 & 11 & 18 & 19 & 38 \\ 30 & 49 & 31 & 22 & 35 & 34 & 23 & 48 \\ 64 & 41 & 54 & 40 & 55 & 1 & 46 & 47 \end{bmatrix} $$ If $M_{i,j} = k$, then square $(i,j)$ is the destination of the $k$-th move. Square $(1,1)$, the starting position, is at the bottom-left corner. Compared to the presentation by @Benji, the only difference is that he labels $0$ what I label $64$.

This solution was generated by Z3. The constraints impose strict alternation between horizontal and vertical moves.

0

Unfortunately, the following is invalid. See comments.


Yes. A possible route is ...

a1 a8
h8 h7
b7 b6
h6 h5
b5 b4
h4 h3
b3 b2
h2 h1
a1

Half the moves in the above traverse many squares. To get exactly 64 of them, split the long moves into single steps. For example:

b6 h6 => b6 c6 d6 e6 f6 g6 h6

Since the route moves to every square once, there are 64 moves.

Thumbnail
  • 591
  • 2
  • 12