Combinatorial game played on a grid

combinatorial-game-theorycombinatorics

Let the grid consist of r rows and k columns. Two players take turns moving a piece to an adjacent square (no diagonal moves). Once a square has been visited it cannot be visited again. The piece starts in the top left square, this square can therefore not be visited again. The loser is the player that does not have a legal move to make, as an example take a 2×1 grid, player 1 moves to the second square, and player 2 does not have a legal move, which means he loses. Is there a winning strategy, and what is it?

Obviously since draws are impossible, and this is a combinatorial game, there is a winning strategy. I firstly tried to imagine the game as an unary game of Nim with r*k piles. But this does not accurately represent the game. (Maybe something with bogus-nim, but I'm not very good at that). I secondly tried to play against an RNG, trying to mirror their moves, if they vertically I move horizontally within reason of course, but that did not yield anything.

Does anyone have a hint? I don't want to be bold and ask for a very leading hint, but at this point I don't know what to do.

Best Answer

Let's first imagine $r\times k$ is uneven. This means that if we ignore the starting square we can divide the grid into pairs of two (look at the image). The first player always has to tread on the first square of a pair, whilst the second player always can tread on the second square of a pair. Since every pair is whole, i.e. there's no lone square (except for the starting one naturally), the second player will always do the last move. So the winning strategy for the second player is to always move to the same color that it is currently standing on. grid with pairs colored coordinated If the product is even then we don't ignore the first square. The starting square is therefore in a pair, which means that it is the first player that has the ability to move to the second square of a pair. Using a strategy-stealing argument it is clear that the first player has the winning strategy by using the same one that the second player had in the uneven case.

Related Question