MathDB
Boxes and balls

Source: Olympiad

January 20, 2018
combinatoricsnumber theory

Problem Statement

Let nn be a positive integer, the players A and B play the following game: we have nn balls with the numbers of 1,2,3,4,....,n1, 2, 3, 4,...., n this balls will be in two boxes with the symbols \prod and \sum. In your turn, the player can choose one ball and the player will put this ball in some box, in the final all the balls of the box \prod are multiplied and we will get a number PP, after this all the balls of the box \sum are added up and we will get a number QQ(if the box \prod is empty P=1P = 1, if the box \sum is empty Q=0Q = 0). The player(s) play alternately, player A starts, if P+QP + Q is even player A wins, otherwise player B wins.
a)If n=6n= 6, which player has the winning strategy??? b)If n=2012n = 2012, which player has the winning strategy???