Problem

Source:

Tags: combinatorics proposed, combinatorics



A token is placed in one square of a $m\times n$ board, and is moved according to the following rules: In each turn, the token can be moved to a square sharing a side with the one currently occupied. The token cannot be placed in a square that has already been occupied. Any two consecutive moves cannot have the same direction. The game ends when the token cannot be moved. Determine the values of $m$ and $n$ for which, by placing the token in some square, all the squares of the board will have been occupied in the end of the game.