Let be a prime. In the following game, Ed and Alfie take turns to play, each taking his own turn. On a person's turn, he first chooses an from that has not yet been chosen by either side, and then chooses an element from . Ed goes first. Once all of have been chosen, the game ends and the following number is computed
If is divisible by , Ed wins; otherwise, Alfie wins.
Prove that Ed has a winning strategy.
Solution
We say that a player makes the move if he chooses the index and then the element of the in this move.
(1) If or , then the first player simply chooses , which forces , which guarantees he wins.
(2) So assume . Let the first player choose in the first move. By Fermat's Little Theorem, , so . Since is prime, we are left with two cases:
(i)
In this case, for each move made by the second player, the first player immediately makes a move
This makes the sum be divisible by , thus wins the game. One can easily check that this move is always possible.
(ii)
In this case, for each move made by the second player, the first player immediately makes a move
In any case, we will have , and hence, . Therefore, at the end of the game, would be congruent to
This ensures that the first player wins. Again, one can easily check that this move is always possible.