zoukankan      html  css  js  c++  java
  • ICG 合并时 SG 函数运算法则 证明

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

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


    ICG 合并时 SG 函数运算法则:若 (G=sumlimits_{i=1}^nG_i),则 (mathrm{SG}(G)=igopluslimits_{i=1}^nmathrm{SG}(G_i))

    证明:要证原命题,显然只要证若 (G=G_1+G_2),则 (mathrm{SG}(G)=mathrm{SG}(G_1)oplusmathrm{SG}(G_2))。只要证对于任意 (G) 内的局面 (P=P_1+P_2),其中 (P_1)(G_1) 内的局面,(P_2)(G_2) 内的局面,都有 (mathrm{SG}(P)=mathrm{SG}(P_1)oplusmathrm{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)oplusmathrm{SG}(P_2))

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

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

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

      1. (forall xin[0,mathrm{SG}(P_1)oplusmathrm{SG}(P_2)),xin{mathrm{SG}(P_1)oplusmathrm{SG}(P')mid P'indelta(P_2)}cup{mathrm{SG}(P')oplusmathrm{SG}(P_2)mid P'indelta(P_1)})

        证明:由 SG 函数定义,此命题显然弱于 (forall xin[0,mathrm{SG}(P_1)oplusmathrm{SG}(P_2)),xin{mathrm{SG}(P_1)oplus pmid pin[0,mathrm{SG}(P_2))}cup{poplusmathrm{SG}(P_2)mid pin[0,mathrm{SG}(P_1))})。令 (a=mathrm{SG}(P_1),b=mathrm{SG}(P_2)),得到 (forall xin[0,aoplus b),xin{aoplus pmid pin[0,b)}cup{poplus bmid pin[0,a)}),即对于每个 (x<aoplus 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)。那么 (aoplus b) 的当前位显然为 (0),于是 (x) 的当前位为 (0)。考虑凑异或和等于 (x) 的两个数的当前位都取 (1),然后显然能归约到位数小 (1) 的问题上,根据假设有方案;
          2. (A=0,B=1)。那么 (aoplus b) 的当前位为 (1),于是 (x) 的当前位可能为 (0)(1)。为 (1) 的话就类似上面归约,当前位一个取 (0) 一个取 (1);对于为 (0) 的,那么就考虑 (x=aoplus(xoplus a))(a) 就是 (a) 了,(xoplus a) 的当前位显然是 (0),一定 (<b)

        得证;

      2. (mathrm{SG}(P_1)oplusmathrm{SG}(P_2)) otin{mathrm{SG}(P_1)oplusmathrm{SG}(P')mid P'indelta(P_2)}cup{mathrm{SG}(P')oplusmathrm{SG}(P_2)mid P'indelta(P_1)})

        证明:由 SG 函数定义,此命题显然弱于 (mathrm{SG}(P_1)oplusmathrm{SG}(P_2)) otin{mathrm{SG}(P_1)oplus pmid pinmathbb N,p eq mathrm{SG}(P_2)}cup{poplusmathrm{SG}(P_2)mid pinmathbb N,p eq mathrm{SG}(P_1)})。即:

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

        得证。

    得证。

    珍爱生命,远离抄袭!
  • 相关阅读:
    C语言使用正则表达式
    linux 有名管道(FIFO)
    sendto() 向广播地址发包返回errno 13, Permission denied错误
    NSUserDefaults(数据存储)
    iOS开发UI篇—UIScrollView控件实现图片缩放功能
    李洪强iOS开发之-环信02_iOS SDK 介绍及导入
    李洪强iOS开发之-环信01_iOS SDK 前的准备工作
    iOS开发UI篇—UIScrollView控件介绍
    iOS开发UI篇—iOS开发中三种简单的动画设置
    iOS开发UI篇—IOS开发中Xcode的一些使用技巧
  • 原文地址:https://www.cnblogs.com/ycx-akioi/p/sg-xor.html
Copyright © 2011-2022 走看看