Current location - Trademark Inquiry Complete Network - Futures platform - How to win the coin picking game?
How to win the coin picking game?
There are several piles of separated coins on the table in front of the two opponents A and B who participate in the game, and the number of coins in each pile is arbitrary. Both sides take turns to take one or several coins from any pile (only one pile is allowed) (or take the whole pile) until the coins are completely taken out. Who will get the last pile 1? Only 1: The first one will win. Strategy: Take all coins.

2. There are only 2 stacks: set to (k 1, k2).

2. 1 When k 1=k2, the losing strategy is that A takes as much as in 1 heap and B takes as much as in another 1 heap until it is taken up. 2.2 When k 1≠k2, the strategy of winning first is: A takes ABS (k 1-k2) from a large number of1piles and becomes 2. 1, and B will lose.

3. There are only three stacks: set to (k 1, k2, k3).

3. 1 When k 1=k2=k3 or the number of any two piles is equal, the first winning strategy is: A takes all the coins of 1 pile at one time, and the situation becomes 2. 1, and B loses. 3.2 when k 1≠k2≠k3, the analysis is as follows: 3.2. 1 Let's use a simple example first, when (1, 2, k) is 1) when k=3, the first person to take it. 3) If case 2.2 A is doomed (3) (1, 1, 3) If case 3. 1 A is doomed (4) (1, 2) If case 2.2 A is doomed (5) (1, 2. 2) If the situation is 3. 1 A, you lose. So when it is (1, 2,3), the first one loses. 2) When k≠3, the first one will win: A takes (k-3) coins from the third pile and it becomes 3.2. 1. When k≠2, the first one wins. 4) Similarly, we can also analyze the case of (2,3,k). When k= 1, the first one loses. When k≠ 1, the first winner is 3.2.2. After careful analysis of 3.2. 1, we can draw the conclusion that 1) is if and only if (K 1) (K2) (K3) = 0 (where ""is pressed. Pre-emptive strategy: (1) Calculate the values of (k 1) (k2), (K 1) (K3) and (k3) (K2) respectively, and set them as m 1, m2 and m3 respectively, and then compare k3 and M63 respectively. (2) Repeat step (1) and use the conclusions of 1 and 2.

No matter who wins (or loses).