Knight Fight

Logic Level 2

Jack and Jill are playing a game on a 5 by 5 chessboard. Being the gentleman, Jack lets Jill go first, and allows her to place the knight anywhere she wants. They then alternate moving the knight to a previously unoccupied square. The person who cannot move the knight loses the game.

Given that they both played the game optimally, who will win?

Jack Jill Cannot be determined

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Ivan Koswara
Jun 14, 2016

Relevant wiki: Combinatorial Games - Winning Positions

Consider the following strategy:

1 14 9 20 3
24 19 2 15 10
13 8 25 4 21
18 23 6 11 16
7 12 17 22 5

Jill starts on a corner (1). On whatever move Jack makes (2 or 8; they are symmetrical, so WLOG 2), Jill can always move to another corner (3). Repeat this two more times (4 and 5, 6 and 7). Now after Jack's move (8), Jill moves to one of the available squares (assume 9; 17 is symmetrical, and 11 and 15 also work but let's keep it simple). Now Jack only has two available moves (10 or 24; again, they are symmetrical, so WLOG 10). Jill's move is now to keep avoiding the central square (11), to force Jack to only have one move available (12), and to repeat this for six more times (13 and 14, 15 and 16, 17 and 18, 19 and 20, 21 and 22, 23 and 24). Now Jill can finish it with a move to the central square (25). This visits every square, which means Jack can no longer move, so Jill wins.

There should be a simpler way to present the above strategy, but that's what I thought when I was solving the problem.


Incidentally, there's an interesting variation that I initially assumed before rereading the problem. For how many starting squares can Jill win? (That is, for each square, imagine a game where Jill is forced to start with placing the knight on that square. For how many of these squares can Jill win?) We know the answer is at least 4 (the corners); is there any other square?


EDIT: Better solution as per the comments.

Notice that the table above gives a knight tour: all squares are visited, and consecutively numbered squares are a knight move apart. This solution can be used for any board in which a knight tour exists.

Note that a knight move always changes the color of the square, and all yellow squares have odd numbers, and all white squares have even numbers. By induction, if Jill starts on a yellow square, Jill will always move to an odd-numbered square and Jack will always move to an even-numbered square.

Jill can start on any odd-numbered square (yellow square); suppose this is k k . Now, if Jack moves to a square m m , Jill can move to the square m + 1 m+1 if m > k m > k , or to the square m 1 m-1 if m < k m < k . (Notice that m = k m = k is impossible as it visits a square more than once.) To show that Jill can always do so, suppose for the sake of contradiction, Jack moves to square m m with m > k m > k but square m + 1 m+1 has already been visited before, and this is the first time this happens. (The other case is similar.) Because Jack moves to square m m , this means m m is even, so m + 1 m+1 is odd. This means it must be Jill that moved to m + 1 m+1 . But since m > k m > k , the square m + 1 m+1 could only have been visited before if Jack has moved to m m previously, contradiction. So Jill can always make a move, and thus it must be Jack that gets stuck first.

The way of presenting it is simple enough , it is interesting that after the white central squares are covered choosing any of 9 (17) or 11(15) works and a good example of symmetry anyway.

Just to add , another interesting problem is if starting from one of the corner Jill would also have a winning strategy no matter what moves she makes but the answer would be negative I think.

A A - 5 years ago

I was thinking in a similar way too. There was some symmetric cases to check, but everything else is forced.

I've thought about the follow up question, but don't have any good ideas.

Chung Kevin - 5 years ago

I know of a nice proof that any yellow square is a winning position for Jill.
Hint: There is a knight's tour path that covers all the squares. This provides a strategy (which you have to find) that guarantees Jill can always move.

I haven't been able to easily analyze the white squares case.

Calvin Lin Staff - 5 years ago

Log in to reply

I thought about that, but at first I didn't realize how it could work. Now that I think of it again, yes, it works.

From any yellow square, there is a knight tour starting from it through all squares. (I haven't actually verified this statement; I'll just take your statement as granted.) Start from that yellow square. Wherever Jack moves, it's to a white square; Jill can always move to the yellow square following it in the tour. This is because all yellow squares (other than the start) that Jill has used are always preceded by a white square that Jack has already used, and vice versa.

This is essentially a "pairing argument"; divide the board into pairs of squares, each a knight-move apart. If we have a knight tour, this is easy: just take two consecutive squares in the tour at a time, leaving probably the last square as a singleton.


Note that this argument, on an even-sized board, guarantees that the second player wins instead.

Ivan Koswara - 5 years ago

Log in to reply

No, my solution only uses "There exists a knight's tour". It doesn't use "from any yellow square there is a knight tour".

In fact, you have (most of) the argument already. Just modify it slightly.


Oh yes, my solution needs an odd sized board.

Calvin Lin Staff - 5 years ago

Log in to reply

@Calvin Lin Oh, right. If you're ahead of the start square, move forward in the tour; if you're behind, move backward.

Ivan Koswara - 5 years ago

Log in to reply

@Ivan Koswara I think that you got the idea, but cannot confirm without knowing exactly what you are thinking. Try writing it up and see if that holds. If it does, edit your solution directly.

Calvin Lin Staff - 5 years ago

Log in to reply

@Calvin Lin Added. Not very sure how to phrase it, but hopefully you get the idea.

Ivan Koswara - 5 years ago

Anyway , is that strategy based on the fact that for any choice of Jill Jake has to avoid placing the horse on the central white-squares because he otherwise loses ?

A A - 5 years ago

Log in to reply

No. All that I use is the fact that "there exists a knight's tour path that covers all the squares" (for a board with an odd number of squares)

In particular, this solution would extend to any board with a knight's tour.

Calvin Lin Staff - 5 years ago

This proof by contradiction doesn't articulate enough (or show in an a priori way) why Jill always can move if Jake moves.

Nonetheless , your proof by contradiction is not articulate enough because it maybe doesn't show precisely why if Jill visited a square then Jack visited that square before I think.

Your parity observation would be better here (meaning that for any square of Jack there is a corresponding square which belongs to Jill) and would show the structure of the game better I think.

Then for any square visited by Jake there will be a square of Jill which Jill hasn't visited as a result of the parity so to say abstract characteristic observed.

But it's a good solution.

And is very good that such a strategy works generally as it is more abstract anyway.

A A - 5 years ago
A A
Jun 11, 2016

In order to solve this problem it is sufficient to show (and pretty much just show) one winning strategy without understanding the problem by it's principles though this last part of understanding when and by what a winning strategy can be developed would anyway be more interesting as it would most likely speak (at an a priori ground of seeing it) in order to say completely when and how out of the general interactivity of players by their decision making they arrive at some result of this interactivity at it's basic or principal terms which would really emphasize understanding of game theory unlike just showing a winning strategy. Nonetheless showing a winning strategy maybe is still a pretty good start for emphasizing that principal understanding.

To show that Jill has a winning strategy it is enough to describe what moves she should make by which she wins the game , and I'll try a fast description of the winning strategy I found supposing Jill starts in the corner of board. Nonetheless I will firstly state for clarity that I understood the problem's formulation as meaning that Jill placing the knight on the square counts as a move and therefore after the knight being place the next move is done by Jake.

The game can be described and organized by some strategical steps which Jill has to make in order to win the game.

In the first step of her strategy Jill will play such that at the end of the strategy all corners and white squares immediately near the center are eliminated. To do this Jill places firstly the knight on one of the corners after which Jake will be forced to put the knight in one of the white squares near the center which makes possible for Jill as long as there still are corners on which she didn't place the knight to reply by putting again the knight in one of the corners repeating this sequence of moves of Jill and Jake until all corners and central white square are eliminated. The sequence of moves ends when the knight is placed by Jake on one of the white central squares. After this anyway Jill will have to place the knight on other square than the corner.

In the second step of her strategy Jill will eliminate all the colored squares near the central colored square. Therefore the first move of the second step of the strategy starts with Jill placing the knight from the white central square on which it stands on one of the central colored squares. After Jill places it observe that the same repeating sequence until she can place the knight on another colored square takes place. Jake is forced to put the knight from one of the colored central squares on a white square near the corner (therefore his steps being also determined here in the same way they were determined for his movements in the first step of the strategy) and anyway Jill's move will be forced to be either the a square from the exterior of the board or the central square. Jill chooses the middle of the exterior squares , Jake is forced to choose only one single white square. This sequence leads finally after 3 moves for Jill to cover another central colored square. Since this sequence can be determined therefore as seen it can happen until all colored central squares are covered. After this happens because at every sequence 3 other different squares are covered all squares with the exception of the center are covered. The last part of this strategy ends with Jake placing on one exterior white square and Jill to move.

Finally because all squares are covered excepting the center and Jill can put the knight in the center she puts anyway the knight there and wins.

It is interesting to analyze , apart from the organized sketch done there for the winning strategy , if for any move Jill makes after placing the knight in the corner she can win anyway.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...