0%

Problem 960


Problem 960


Stone Game Solitaire

There are $n$ distinct piles of stones, each of size $n-1$. Starting with an initial score of $0$, the following procedure is repeated:

  1. Choose any two piles and remove exactly $n$ stones in total from the two piles.
  2. If the number of stones removed from the two piles were $a$ and $b$, add $\min(a,b)$ to the score.

If all piles are eventually emptied, the current score is confirmed as final. However, if one gets “stuck” and cannot empty all piles, the current score is discarded, resulting in a final score of $0$.

Three example sequences of turns are illustrated below for $n=4$, with each tuple representing pile sizes as one proceeds, and with additions to the score indicated above the arrows.
$$
\begin{aligned}
&(3,3,3,3)\xrightarrow{+1}(0,3,2,3)\xrightarrow{+1}(0,3,1,0)\xrightarrow{+1}(0,0,0,0)&:\quad\text{final score }=3\\
&(3,3,3,3)\xrightarrow{+1}(3,0,3,2)\xrightarrow{+2}(1,0,3,0)\xrightarrow{+1}(0,0,0,0)&:\quad\text{final score }=4\\
&(3,3,3,3)\xrightarrow{+2}(1,3,1,3)\xrightarrow{+1}(1,2,1,0)\rightarrow\text{stuck!}&:\quad\text{final score }=0
\end{aligned}
$$

Define $F(n)$ to be the sum of the final scores achieved for every sequence of turns which successfully empty all piles.

You are given $F(3)=12$, $F(4)=360$, and $F(8)=16785941760$.

Find $F(100)$. Give your answer modulo $10^9+7$.


石子纸牌游戏

有$n$个不同的石堆,每堆有$n-1$枚石子。从初始分数$0$开始,玩家重复以下过程:

  1. 选择任意两个石堆,从这两个堆中总共移除恰好$n$枚石子。
  2. 如果从这两个堆中移除的石子数分别为$a$和$b$,将$\min(a,b)$加入分数。

如果最终全部石堆都被清空,则当前分数即为玩家的最终分数。然而,如果玩家在某一时刻被”卡住”并且无法清空所有石堆,则当前分数清零,玩家的最终分数也为$0$。

下图展示了$n=4$时三种可能的进程,其中每个元组表示进程中各堆剩余的石子数量,箭头上方标注了每一步的得分:
$$
\begin{aligned}
&(3,3,3,3)\xrightarrow{+1}(0,3,2,3)\xrightarrow{+1}(0,3,1,0)\xrightarrow{+1}(0,0,0,0)&:\quad\text{最终分数}=3\\
&(3,3,3,3)\xrightarrow{+1}(3,0,3,2)\xrightarrow{+2}(1,0,3,0)\xrightarrow{+1}(0,0,0,0)&:\quad\text{最终分数}=4\\
&(3,3,3,3)\xrightarrow{+2}(1,3,1,3)\xrightarrow{+1}(1,2,1,0)\rightarrow\text{卡住了!}&:\quad\text{最终分数}=0
\end{aligned}
$$

定义$F(n)$为所有成功清空全部石堆的进程所获得的最终分数之和。

已知$F(3)=12$,$F(4)=360$,$F(8)=16785941760$。

求$F(100)$,并对$10^9+7$取余作为你的答案。