0%

Problem 260


Problem 260


Stone Game

A game is played with three piles of stones and two players.
At her turn, a player removes one or more stones from the piles. However, if she takes stones from more than one pile, she must remove the same number of stones from each of the selected piles.

In other words, the player chooses some N>0 and removes:

  • N stones from any single pile; or
  • N stones from each of any two piles (2N total); or
  • N stones from each of the three piles (3N total).

The player taking the last stone(s) wins the game.

A winning configuration is one where the first player can force a win.
For example, (0,0,13), (0,11,11) and (5,5,5) are winning configurations because the first player can immediately remove all stones.

A losing configuration is one where the second player can force a win, no matter what the first player does.
For example, (0,1,2) and (1,3,3) are losing configurations: any legal move leaves a winning configuration for the second player.

Consider all losing configurations (xi,yi,zi) where xi ≤ yi ≤ zi ≤ 100.
We can verify that Σ(xi+yi+zi) = 173895 for these.

Find Σ(xi+yi+zi) where (xi,yi,zi) ranges over the losing configurations with xi ≤ yi ≤ zi ≤ 1000.


取石子游戏

取石子游戏需要两名玩家和三堆石子。
每一名玩家在自己的回合可以从堆中取走一个或多个石子。然而,如果她从多个堆中取石子,从其中每个堆所取的石子数目必须一致。

也就是说,每一名玩家选择一个数N>0,然后移走:

  • 一个堆中的N个石子;或
  • 两个堆中各N个石子(共2N个);或
  • 三个堆中各N个石子(共3N个)。

拿走所有石子的玩家赢得游戏。

所谓必胜态,指的是先手玩家必胜的石子分布。
例如,(0,0,13)、(0,11,11)和(5,5,5)是必胜态,因为先手玩家可以立刻取走所有的石子。

所谓必败态,指的是无论先手玩家如何操作,后手玩家必胜的石子分布。
例如,(0,1,2)和(1,3,3)是必败态:先手玩家任何符合规则的取法都会给后手玩家留下必胜态。

考虑所有满足xi ≤ yi ≤ zi ≤ 100的必败态(xi,yi,zi)。
我们可以验证,对于所有这些必败态,Σ(xi+yi+zi) = 173895。

考虑所有满足xi ≤ yi ≤ zi ≤ 1000的必败态(xi,yi,zi),求Σ(xi+yi+zi)。