1
$\begingroup$

I have a matrix of size $N \times M$, There is a doll placed at $(1,1)$, which is the upper-left corner of the matrix. Two player makes an alternative turn.

If the doll is at $(x,y)$ then a player can move it to

$$ (x+1,y) \text{ or } (x-1,y) \text{ or } (x,y+1) \text{ or } (x,y-1) $$

only if the new place is not visited yet.

The one who can't make any move loses. Who will win?

My Approach: Since I can visit every place from $(1,1)$, so if $(N\cdot M)$ is odd then the second player wins; if it's even the first player wins.

Modification: If the doll is at $(x,y)$ then a player can move it to

$$ (x+1,y+1) \text{ or } (x-1,y-1) \text{ or } (x-1,y+1) \text { or } (x+1,y-1) $$ only if the new place is not visited yet.

Then who will win? Please, help me understand the two cases.

  • 0
    Didn't you post the same question yesterday? What happened to it and to the comments?2017-02-08
  • 1
    This is much more a grid game than a matrix game, especially since "matrix games" have a standard meaning in game theory, and it is not this one. Also, the only proper tag for this is combinatoric game theory.2017-02-08

1 Answers 1

1

If $N\times M$ is even, then cover the board (matrix) with $2\times 1$ dominoes. Then the first player will move from one square of the domino to the next one. The second player will have to move into a new domino. The first players wins (always has an available move)

If $N\times M$ is odd, then cover the board with $2\times 1$ dominoes leaving $(1,1)$ not covered. Then the first player has to move into a domino, and the second player can move into the other square of the domino. The second player wins, having always an available move.

For the diagonal game it is the same, except that you have to look at coverings with "diagonal" dominoes, and approximately half of the squares are unused.

In the general case, if you know graph theory, you may take a look here.

  • 0
    For the first one you have to justify that the player who loses if we cover the whole board can't get the doll trapped. For example we could go down two, right two, up two, then if we go left we have to go down and quit. This is a first player win regardless of the overall board size. Alternately we could go down three, right two, up three and if we don't trap the doll in the middle we have avoided three squares and changed the parity of the board.2017-02-08
  • 0
    @Ross Millikan After the winning player plays each of the moves according to the strategy, the un-visited squares are covered completely by dominoes. So even though the doll gets trapped in a connected region, the parity of the connected region does not change (hope I'm clear enough). In other words, a case like the one you describe can never happen when the winning player follows the strategy.2017-02-08
  • 0
    I don't think you can guarantee that the unvisited squares are covered by dominoes. In my second example the unvisited area is $1 \times 3$ so cannot be covered.2017-02-08
  • 0
    After the move of the player with the winning strategy, if there is some un-visited area which is not completely covered by dominoes, it would imply that the winning player didn't follow the winning strategy (which is always play in the other square of the domino where the opponent played in the previous move). In your second example, the winning player can never cooperate to move three squares up without violating the winning strategy.2017-02-08