Removing Bricks from a MxN array

77 Views Asked by At

There are 2 players and they have a $m \times n$ array of bricks. The players alternate turns and in each move you select a brick and remove all the bricks to the south and west of it. The player that removes the last brick loses. For the case when $m=n$ (square), find either a winning strategy for the player who moves first or for the the one who moves second. As a bonus prove that when $m \neq n$, the first player always has a winning strategy.

I am able to think of a way the first person could beat the other but don't have a exact 'strategy' per se. Can somebody help me with this ?

1

There are 1 best solutions below

4
On

For $m=n$, the first player has the following winning strategy:

  • in the first move remove the $(2,n-1)$-brick.
  • in the successive steps, if second player removes the $(1,j)$-brick (or $(j,1)$-brick), in the next turn the first player removes the $(j,1)$-brick (respectively, the $(1,j)$-brick), for $j<n$.