Browse · MathNet
PrintJapan 2007
Japan 2007 counting and probability
Problem
Let be a positive integer. Two people , play a game in which they call an integer () alternately. calls the first number. They cannot call the numbers which are already called by themselves or by their opponent. The game is over when neither can call numbers. If the sum of the numbers that has called is divisible by , wins, otherwise wins. Find all which satisfy the condition below. Condition: can win the game whatever does.
Solution
Let the number called by a player in the th turn be . Then sequence is called "history up to the th turn". We call which satisfies "free in the th turn". We are going to prove a proposition that if , can absolutely win and that if , can absolutely win.
a. for If , the proposition is surely true. Assume that . If calls or in the second turn, the sum of the numbers that has said is or . Hence, can absolutely win. Assume that . If calls in the first turn, and calls or in the third turn, the sum of the numbers that has said is or . Hence, can absolutely win. For , we call and a pair. If calls in the first turn, and after the turn, calls the other number of the pair including the number which called in the last turn, then can absolutely win. With that, the proposition is proved for .
b. We are going to prove that if a proposition holds for , it also holds for . For , let the player who has the winning strategy be , and the other . Let , and presume the sets of the numbers , and to be pairs. Let the th turn be 's turn.
(1) In the th turn, when there are some free numbers except the elements of , it is only necessary for to act according to the following tactics. (a) When is and , call the number which should call according to the winning strategy for . (b) When called in th turn, call in the th turn another number of the pair including . (c) When called in the th turn, let , where elements of are the elements of excluding elements of , and the order of the elements of is similar to . Then is the history for . Because of the tactics (1)(b), if called an element of in th turn (), also called an element of in the th turn. With that, . Hence, according to the winning strategy for , let the number be the number which should call in th turn when given a history , and call the number in the th turn.
(2) In the th turn, if all the "free" numbers are included in , should act according to the following tactics. (a) When called in the th turn is included in , which is the pair of is free in the th turn (because of (1)(b)). Then call in the th turn. Until the game ends, call which is the pair of the called by in the last turn. (b) When the number called by in the th turn is not included in , if is free in th turn, the pair is also free. Then call any element , and act in the th turn according to the following tactics (). Let the number which called in th turn be , and the pair . If is free in th turn, call in th turn. If there is no free number in the th turn, then the game is over. Otherwise, call any element in the th turn.
If acts according to the tactics above, two following propositions hold. When the game is over, the sum of the numbers () called by is the same as one of the sums that appear when wins the game in the case of . When the game is over, each player calls only one number of the pairs.
Consequently, when the game is over, the sum of the numbers which were called by is equivalent to one of the sums that appear when wins the game in the case of modulo . So wins. With that, the mathematical induction is completed.
Hence, it can be said that has a winning strategy if and only if .
a. for If , the proposition is surely true. Assume that . If calls or in the second turn, the sum of the numbers that has said is or . Hence, can absolutely win. Assume that . If calls in the first turn, and calls or in the third turn, the sum of the numbers that has said is or . Hence, can absolutely win. For , we call and a pair. If calls in the first turn, and after the turn, calls the other number of the pair including the number which called in the last turn, then can absolutely win. With that, the proposition is proved for .
b. We are going to prove that if a proposition holds for , it also holds for . For , let the player who has the winning strategy be , and the other . Let , and presume the sets of the numbers , and to be pairs. Let the th turn be 's turn.
(1) In the th turn, when there are some free numbers except the elements of , it is only necessary for to act according to the following tactics. (a) When is and , call the number which should call according to the winning strategy for . (b) When called in th turn, call in the th turn another number of the pair including . (c) When called in the th turn, let , where elements of are the elements of excluding elements of , and the order of the elements of is similar to . Then is the history for . Because of the tactics (1)(b), if called an element of in th turn (), also called an element of in the th turn. With that, . Hence, according to the winning strategy for , let the number be the number which should call in th turn when given a history , and call the number in the th turn.
(2) In the th turn, if all the "free" numbers are included in , should act according to the following tactics. (a) When called in the th turn is included in , which is the pair of is free in the th turn (because of (1)(b)). Then call in the th turn. Until the game ends, call which is the pair of the called by in the last turn. (b) When the number called by in the th turn is not included in , if is free in th turn, the pair is also free. Then call any element , and act in the th turn according to the following tactics (). Let the number which called in th turn be , and the pair . If is free in th turn, call in th turn. If there is no free number in the th turn, then the game is over. Otherwise, call any element in the th turn.
If acts according to the tactics above, two following propositions hold. When the game is over, the sum of the numbers () called by is the same as one of the sums that appear when wins the game in the case of . When the game is over, each player calls only one number of the pairs.
Consequently, when the game is over, the sum of the numbers which were called by is equivalent to one of the sums that appear when wins the game in the case of modulo . So wins. With that, the mathematical induction is completed.
Hence, it can be said that has a winning strategy if and only if .
Final answer
P can force a win if and only if n ≡ 0, 4, or 5 modulo 6.
Techniques
Games / greedy algorithmsInduction / smoothingOther