The Kangaroo Hops for Two

The game Upright is played by two players on an m × n m \times n board of squares and has the following rules:

  1. At the start of the game, a kangaroo game piece is placed on the bottom left square of the board.
  2. Players alternate turns moving the kangaroo, and the first player moves first.
  3. On the player's turn, they can either move the kangaroo some number of squares to the right, keeping it in the same row, or they can move it to the leftmost square on the row above.
  4. A player loses if they are unable to make a move.

If m m and n n can each be any number between 1 and 20 inclusive, for how many of the 400 possible game board sizes can the second player win if both players play optimally?


The answer is 10.

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.

3 solutions

Russell Few
May 20, 2014

If n > 1 n>1 , then the first player has a winning strategy (i.e. if he uses that strategy, he will surely win. Strategy: At every move, move it to the most right square of that row. Reasoning: Starting at the first move, the first player would put the kangaroo to the most right square of the first row. The 2nd player is forced to move it to the leftmost square of the 2nd row. The first player then moves it to the rightmost square of the 2nd row and so on, until the first player moves it to the rightmost square of the top row, where the 2nd player has no more legal moves, and the first player wins.

Thus, the only way for the 2nd player to have a chance to win is for n to be 1. Each player is forced to move the kangaroo to the next row above it, so there would be only m 1 m-1 moves in that game. The 2nd player will win if the game finished in an even number of moves, so m 1 m-1 must be even for the 2nd player to win the game. Since m m is from 1 to 20, for m 1 m-1 to be even, m m has to be odd. There are 10 10 odd numbers from 1 1 to 20 20 . Thus, there are 10 \boxed{10} game board sizes that the second player can win.

The idea of finding winning positions is crucial to solving this problem.

Please do not define winning positions in terms of losing positions and also define losing positions in terms of winning positions. Circular definitions can lead to unintended consequences.

Calvin Lin Staff - 7 years ago
Calvin Lin Staff
May 13, 2014

If the board is more than 1 square wide, the first player can always win. They simply move the kangaroo to the end of the row on each of their turns and the second player is forced to move the kangaroo to the beginning of the next row each time. If the board is exactly one square wide, the first player loses if the height is odd and wins if the height is even, since on each turn players can only move the kangaroo up. Thus, the second player wins on 10 of the 400 possible game board sizes.

Anqi Li
May 20, 2014

Before, I write my solution, I would like to first define a winning and losing position. A winning position forces your opponent into a losing position. And a losing position leaves you with only one choice, moving into a winning position for your opponeny.

Note that if both m>1 and n>1, the upper right hand square of the m * n board is a winning position. So we backtrack and find that the upper left hand square is a losing position. Next, we realise that the square directly below the upper right hand corner is a winning position. Continuing this process, we find that the bottom left square is a winning square for the first player hence the second player can never win.

Therefore one of m and n must be equal to one. It is easy to realise that a vertice column of 1*p might give the second player some chance. It is also quite obvious that p must be even. So p, ranging from 1 to 20, can only take on even values. And only half of these 20 numbers is even, therefore the answer to this problem is 10 .

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...