我们构造了两族无穷的四步减法博弈:当可变步 c 增长时,第一族的前周期呈二次增长;第二族的周期与前周期都呈二次增长——这否定了“周期与前周期至多线性增长”的猜想。We build two infinite families of four-move subtraction games: as the varying move c grows, the first family’s preperiod grows quadratically, and in the second family both the period and the preperiod do — refuting the conjecture that they grow at most linearly.
01游戏与它的 SG 序列The game and its SG sequence
桌上有一堆 n 枚筹码。两名玩家轮流从中取走 s 枚,其中 s 必须属于事先给定的有限集合 T(称为减法集),且不能超过剩余数量。无法行动的一方输掉比赛——这就是正常规则下的减法博弈 SUB(T)。
A heap holds n counters. Two players alternately remove s counters, where s must belong to a fixed finite set T (the subtraction set) and may not exceed what remains. The player with no legal move loses — this is the normal-play subtraction game SUB(T).
每个局面都有一个 Sprague–Grundy 值,它刻画了该局面在博弈组合中的“等价 Nim 堆大小”:
Every position carries a Sprague–Grundy value — its “equivalent Nim-heap size” when games are combined:
由于 gT(n) ≤ |T|,长度为 max T 的连续值窗口只有有限多种,而一旦所有步长都合法,每个窗口唯一决定下一个窗口。因此 SG 序列终将周期:存在最小周期 p(g) 与最小前周期 ℓ(g),从第 ℓ 项起序列以 p 为周期重复。胜负序列 wT(n) = 1{gT(n) = 0} 同理。
Since gT(n) ≤ |T|, there are only finitely many windows of max T consecutive values, and once every move is legal each window determines the next. So the SG sequence is eventually periodic: it has a least period p(g) and a least preperiod ℓ(g), after which it repeats with period p. The same holds for the outcome sequence wT(n) = 1{gT(n) = 0}.
02待检验的猜想The conjectures under test
取定一个有限集 S,再加入一个不断增大的步长 c。S. Zhang(Theoret. Comput. Sci. 2024;所引为 2025 年 7 月 30 日作者修订版)提出:
Fix a finite set S and adjoin one growing move c. S. Zhang (Theoret. Comput. Sci. 2024; author’s revision of 30 July 2025) proposed:
- 猜想 1.2(渐近线性):对每个固定的 S,p(gS∪{c}) 与 ℓ(gS∪{c}) 都是 O(c)。
- Conjecture 1.2 (asymptotic linearity): for every fixed S, both p(gS∪{c}) and ℓ(gS∪{c}) are O(c).
- 猜想 1.3(同余类线性):存在模数 q 与阈值 N,使得在每个同余类 c ≡ r (mod q) 上,周期与前周期都是 c 的一次函数。
- Conjecture 1.3 (residue-class linearity): there are a modulus q and a threshold N such that, on each residue class c ≡ r (mod q), the period and the preperiod are affine functions of c.
此前已知的二次周期(如 Althöfer–Bültermann 族 {a, 2a+1, 3a+1})需要所有步长一起变化。我们的问题更苛刻:三个步长完全固定,只有一个在动。
Earlier quadratic periods — such as the Althöfer–Bültermann family {a, 2a+1, 3a+1} — needed all moves to vary together. Our setting is stricter: three moves stay fixed and only one moves.
03主要结果Main result
定理 1.1. 令 T = S ∪ {c}。对下表所示范围内的整数 t,最小周期与最小前周期恰为:
Theorem 1.1. Let T = S ∪ {c}. For integers t in the indicated ranges, the least eventual periods and preperiods are exactly:
| S = {4, 5, 10} | S = {3, 7, 10} | |
|---|---|---|
| 可变步 cAdjoined move c | 15t + 13, t ≥ 2 | 90t + 9, t ≥ 1 |
| p(gT) | c + 19 | (c² + 26c + 615)/30 |
| ℓ(gT) | (c² + 21c + 8)/15 | p(gT) − 19 |
| p(wT) | p(gT) | p(gT) |
| ℓ(wT) | c − 1 | 0 |
04亲手验证Verify it yourself
下面的实验台在你的浏览器里从零计算 SG 序列:逐项求 mex,用滚动哈希检测第一个重复的长度为 c 的窗口,从而得到精确的最小周期与前周期,再与定理的公式对照。拖动 t,观察珊瑚色阶梯线——它把前周期与周期段分开。
The lab below computes the SG sequence from scratch in your browser: it takes the mex term by term, detects the first repeated window of length c with a rolling hash, and so obtains the exact least period and preperiod — then checks them against the theorem. Drag t and watch the coral staircase that separates the preperiod from the periodic tail.
已计算Computed 项,用时terms in ms · 悬停查看单个位置hover to inspect a position
05构造:一条会移动的边界The construction: a moving boundary
两个构造都把 SG 值写成固定的短“词”,再把词拼接成“轮”。以 S = {4, 5, 10} 为例,c = 15t + 13,周期 P = c + 19。每一轮由 t + 2 个长度为 15 的行和一个两字母的收尾行 E = 13 组成,用到的词是:
Both constructions write the SG values as fixed short words and concatenate them into rounds. Take S = {4, 5, 10}, c = 15t + 13 and period P = c + 19. Each round has t + 2 rows of length 15 plus the two-letter closing row E = 13, built from the words:
注意 H 与 H′ 的零(浅色)完全落在相同位置——它们只在第 8、12 列交换了非零值。由于 P − c = 19 = 15 + 4,第 k 轮第 y 行的 c-选项恰好读取第 k − 1 轮的第 y + 1、y + 2 行。于是 H 与 H′ 之间的边界每轮向第 0 行移动一行:
Notice that H and H′ have their zeros (cream) in exactly the same places — they differ only by swapping non-zero values in columns 8 and 12. Because P − c = 19 = 15 + 4, the c-options of row y in round k read rows y + 1 and y + 2 of round k − 1. So the boundary between H and H′ moves one row towards row 0 per round:
| 轮 kround k | y = 0 | y = 1 | y = 2 | y = 3 | y = 4 |
|---|---|---|---|---|---|
| 0 | H | H | H | K₀ | E |
| 1 | H | H | J₁ | K* | E |
| 2 | H | H′ | J | K* | E |
| k ≥ 3 | H′ | H′ | J | K | E |
由于这些内部变化不改变零的位置,胜负序列早在 c − 1 处就已周期化。第二族(S = {3, 7, 10})的机制更精巧:基础词 H 长 45,它与自身的 14 位循环移位 N 构成两个“相位”,两者之间的拼接点每轮向前移动 30 个位置;3t 个完整轮之后,一个短的收尾行把扫描衔接到下一个块。块长 P = 3tL + 31 ∼ c²/30——这一次,连周期本身都是二次的。
Since these interior changes leave the zeros in place, the outcome sequence is already periodic from c − 1. The second family (S = {3, 7, 10}) is subtler: its base word H has length 45, and together with its 14-position cyclic shift N it forms two “phases”; the splice between them moves thirty positions towards the start in every round. After 3t full rounds a short closing row hands the sweep to the next block. The block length is P = 3tL + 31 ∼ c²/30 — this time the period itself is quadratic.
06证明如何被核验How the proof is checked
证明把无穷多个 t 的 mex 递推,化归为与 t 无关的有限个局部词恒等式:对每一行,只需检验当前行 B、前十个字母 A 与 c-选项词 F 是否满足 mex 的两个条件。
The proof reduces the mex recurrence, for infinitely many t, to finitely many local word identities that do not depend on t: for each row it suffices to check that the current row B, the preceding ten letters A and the option word F satisfy the two conditions characterising the mex.
最小性来自一个简洁的引理:若在一个周期块中,若干因子的循环出现次数与 P 的最大公约数为 1,则 P 就是最小周期。例如第二族中,对零与相邻零对计数,恒等式 (6t + 4)a − 12tb − P = 1 直接给出 gcd(P, a, b) = 1。前周期的精确值则由一个“边界失配”确定:在 τ − 1 处,序列与其平移 P 后的值不同。
Minimality comes from a neat lemma: if the cyclic occurrence counts of some factors in one period block are coprime to P as a whole, then P is the least period. In the second family, counting zeros and adjacent zero pairs, the identity (6t + 4)a − 12tb − P = 1 gives gcd(P, a, b) = 1 immediately. The exact preperiod follows from a single “boundary mismatch”: at τ − 1 the sequence differs from its shift by P.
补充材料(v1.0.8)提供验证附录、代码、展开后的全部恒等式与测试;只需 Python 3.10+ 标准库,运行 python verify_quadratic_subtraction_note.py 即可检验全部 48 条恒等式及默认参数样本。
The supplementary release (v1.0.8) contains the verification appendix, code, all expanded identities and tests; it needs only the Python 3.10+ standard library — run python verify_quadratic_subtraction_note.py to check all 48 identities and the default parameter samples.
07开放问题Open questions
对 S = {3, 7, 10} 与 1 ≤ t ≤ 8 的数值实验显示:沿 c = 90t + 12,SG 周期呈线性而前周期呈二次;沿 c = 90t + 54,周期呈二次,前周期为 c − 9。这引出一个自然的问题:
Numerical experiments for S = {3, 7, 10} and 1 ≤ t ≤ 8 show that along c = 90t + 12 the SG period is linear while the preperiod is quadratic, and along c = 90t + 54 the period is quadratic with preperiod c − 9. A natural question follows:
哪些同余类对所有充分大的 c 都存在这样的封闭公式?Which residue classes admit such formulas for all sufficiently large c?
如果你对这个问题感兴趣,欢迎加入我们。
If this question intrigues you, come and work on it with us.
参考文献(节选)Selected references
- I. Althöfer and J. Bültermann, Superlinear period lengths in some subtraction games, Theoret. Comput. Sci. 148 (1995) 111–119.
- N. B. Ho, On the expansion of three-element subtraction sets, Theoret. Comput. Sci. 582 (2015) 35–47.
- U. Larsson and H. Manabe, Additive subtraction games, arXiv:2603.10414v2, 2026.
- U. Larsson and I. Saha, A brief conversation about subtraction games, in: Games of No Chance 6, MSRI Publications, vol. 71, Cambridge University Press, 2025, pp. 25–42.
- I. Miklós and L. Post, Superpolynomial period lengths of the winning positions in the subtraction game, Internat. J. Game Theory 53 (2024) 1275–1313.
- M. D. Ward, A conjecture about periods in subtraction games, arXiv:1606.04029, 2016.
- S. Zhang, On the linearity of the periods of subtraction games, Theoret. Comput. Sci. 985 (2024) 114350. Version cited: author’s revision of 30 July 2025.