容易发现答案即为 (E(轮次) imes E(每轮步数))。后者无论是 PGF 还是爆算还是组合意义都很好得出,即为 (frac{n}{m+1}+1)。考虑前者如何计算。
停时问题考虑停时定理 (min-max) 容斥。即为求出集合 (T) 最早的元素在第几轮全部出现,因为这里是考虑轮数所以不在 (T) 中的点都不重要了只需考虑 (T) 中的点和所有的鬼,出现概率为 (frac{|T|}{m+|T|}),期望即为概率的倒数。
所以答案即为 (frac{n}{m+1}+1)sum_{i=0}^{n}(-1)^{i}inom{n}{i}frac{m+i}{i})。