ICG 合并时 SG 函数运算法则 证明

以 0.6 的概率被抽到今天早上考语文和物理,然后两场直接瞎填,语文剩 40min,物理剩 1h,各证明了一个命题。其中这个是物理考试证的(

说起来 1.5 years 前我好像在洛谷博客上胡过一个证明,然后不知为啥删掉了。当年我 sb,不知道把多个 ICG 相加归约成两个 ICG 相加,然后还证出来了,也是蛮牛逼的(


ICG 合并时 SG 函数运算法则:若 \(G=\sum\limits_{i=1}^nG_i\),则 \(\mathrm{SG}(G)=\bigoplus\limits_{i=1}^n\mathrm{SG}(G_i)\)

证明:要证原命题,显然只要证若 \(G=G_1+G_2\),则 \(\mathrm{SG}(G)=\mathrm{SG}(G_1)\oplus\mathrm{SG}(G_2)\)。只要证对于任意 \(G\) 内的局面 \(P=P_1+P_2\),其中 \(P_1\)\(G_1\) 内的局面,\(P_2\)\(G_2\) 内的局面,都有 \(\mathrm{SG}(P)=\mathrm{SG}(P_1)\oplus\mathrm{SG}(P_2)\)

考虑对 \(G\) 的局面 DAG 归纳:

  1. 对于任意出度为 \(0\)\(P\),可反证 \(P_1,P_2\) 在各自的 DAG 中出度也为 \(0\),于是有 \(\mathrm{SG}(P)=\mathrm{SG}(P_1)=\mathrm{SG}(P_2)=0\)。所以 \(\mathrm {SG}(P)=\mathrm{SG}(P_1)\oplus\mathrm{SG}(P_2)\)

  2. 记局面 \(X\) 在所在 DAG 中的后继局面集合为 \(\delta(X)\)。假设对于所有 \(P'\in \delta(P)\),都有 \(\mathrm{SG}(P')=\mathrm{SG}\!\left(P'_1\right)\oplus\mathrm{SG}\!\left(P'_2\right)\)。此时需要证 \(\mathrm{SG}(P)=\mathrm{SG}(P_1)\oplus\mathrm{SG}(P_2)\)。根据 SG 函数定义,只要证 \(\mathrm{mex}\{\mathrm{SG}(P')\mid P'\in\delta(P)\}=\mathrm{SG}(P_1)\oplus\mathrm{SG}(P_2)\)

    根据 ICG 合并的定义,显然有 \(\delta(P)=\{P_1+P'\mid P'\in\delta(P_2)\}\cup\{P'+P_2\mid P'\in\delta(P_1)\}\)。于是只要证 \(\mathrm{mex}\left(\{\mathrm{SG}(P_1+P')\mid P'\in\delta(P_2)\}\cup\{\mathrm{SG}(P'+P_2)\mid P'\in\delta(P_1)\}\right)=\mathrm{SG}(P_1)\oplus\mathrm{SG}(P_2)\)。根据假设,即 \(\mathrm{mex}\left(\{\mathrm{SG}(P_1)\oplus\mathrm{SG}(P')\mid P'\in\delta(P_2)\}\cup\{\mathrm{SG}(P')\oplus\mathrm{SG}(P_2)\mid P'\in\delta(P_1)\}\right)=\mathrm{SG}(P_1)\oplus\mathrm{SG}(P_2)\)

    根据 \(\mathrm{mex}\) 的定义,只要证:

    1. \(\forall x\in[0,\mathrm{SG}(P_1)\oplus\mathrm{SG}(P_2)),x\in\{\mathrm{SG}(P_1)\oplus\mathrm{SG}(P')\mid P'\in\delta(P_2)\}\cup\{\mathrm{SG}(P')\oplus\mathrm{SG}(P_2)\mid P'\in\delta(P_1)\}\)

      证明:由 SG 函数定义,此命题显然弱于 \(\forall x\in[0,\mathrm{SG}(P_1)\oplus\mathrm{SG}(P_2)),x\in\{\mathrm{SG}(P_1)\oplus p\mid p\in[0,\mathrm{SG}(P_2))\}\cup\{p\oplus\mathrm{SG}(P_2)\mid p\in[0,\mathrm{SG}(P_1))\}\)。令 \(a=\mathrm{SG}(P_1),b=\mathrm{SG}(P_2)\),得到 \(\forall x\in[0,a\oplus b),x\in\{a\oplus p\mid p\in[0,b)\}\cup\{p\oplus b\mid p\in[0,a)\}\),即对于每个 \(x<a\oplus b\) 都能找到两个数异或和为 \(x\),其中一个是 \(a\)\(b\),另一个小于异于前者的那个。显然 \(a,b\) 是对称的。

      考虑归纳:

      1. \(a,b\) 最高位数为 \(0\) 时, 只有 \(a=b=0\) 一种情况,显然符合;
      2. \(a,b\) 最高位数 \(>0\) 时,假设最高位数小于当前位数的 \(a',b'\) 都符合。考虑对 \(a,b\) 最高位上的数 \(A,B\) 分类:
        1. \(A=B=1\)。那么 \(a\oplus b\) 的当前位显然为 \(0\),于是 \(x\) 的当前位为 \(0\)。考虑凑异或和等于 \(x\) 的两个数的当前位都取 \(1\),然后显然能归约到位数小 \(1\) 的问题上,根据假设有方案;
        2. \(A=0,B=1\)。那么 \(a\oplus b\) 的当前位为 \(1\),于是 \(x\) 的当前位可能为 \(0\)\(1\)。为 \(1\) 的话就类似上面归约,当前位一个取 \(0\) 一个取 \(1\);对于为 \(0\) 的,那么就考虑 \(x=a\oplus(x\oplus a)\)\(a\) 就是 \(a\) 了,\(x\oplus a\) 的当前位显然是 \(0\),一定 \(<b\)

      得证;

    2. \(\mathrm{SG}(P_1)\oplus\mathrm{SG}(P_2))\notin\{\mathrm{SG}(P_1)\oplus\mathrm{SG}(P')\mid P'\in\delta(P_2)\}\cup\{\mathrm{SG}(P')\oplus\mathrm{SG}(P_2)\mid P'\in\delta(P_1)\}\)

      证明:由 SG 函数定义,此命题显然弱于 \(\mathrm{SG}(P_1)\oplus\mathrm{SG}(P_2))\notin\{\mathrm{SG}(P_1)\oplus p\mid p\in\mathbb N,p\neq \mathrm{SG}(P_2)\}\cup\{p\oplus\mathrm{SG}(P_2)\mid p\in\mathbb N,p\neq \mathrm{SG}(P_1)\}\)。即:

      1. \(\forall p\in\mathbb N(p\neq \mathrm{SG}(P_2)),\mathrm{SG}(P_1)\oplus\mathrm{SG}(P_2)\neq \mathrm{SG}(P_1)\oplus p\)。证明:根据异或消去律,\(\mathrm{SG}(P_1)\oplus\mathrm{SG}(P_2)\neq \mathrm{SG}(P_1)\oplus p\) 等价于 \(\mathrm{SG}(P_2)\neq p\),然后显然得证;
      2. \(\forall p\in\mathbb N(p\neq \mathrm{SG}(P_1)),\mathrm{SG}(P_1)\oplus\mathrm{SG}(P_2)\neq p\oplus\mathrm{SG}(P_2)\)。证明同上。

      得证。

得证。

posted @ 2020-10-29 17:24  ycx060617  阅读(241)  评论(0编辑  收藏  举报