製品ニム文言の???一種

ニム製品は常に4回暴力的なそれを再生することはできません!

SG定理もので、証明することができます((N、\ oplus、\ \ \ otimes)) ドメインを構成しています。(困難であった、私はしません)

前記\(\ Oplus \)で排他的OR、\(X \ otimes Y = \ mathop {\ TEXTRM {MEX}} _ {1 \のLeq I <X ,. 1 \のLeq J <Y} \ {\左(I \ Yのotimes)\ Oplus(X \ otimes J)\ Oplus(I \ otimes J)\右\} \) 即ち、サブ状態計算暴力。

そして、そこに美しい自然は、計算することができます(\ otimes \)\行います\(O(\ TEXTRM {}、ポリ(\ログ))\)

フェルマー数の\(M = 2 ^ A ^ {2} \)のために、\(Y \) 次の2つのプロパティ:

  1. \(M \ otimes yはM \回Y ~~~(M> y)を\ =)
  2. \(M \ otimes M = M \ oplus \ FRAC {M} {2} \)

2があります\(\ \ログ)広く流通慣行が。私が知っている二、三に従事しないように、しかし、あまり一般的ではないので、私の人々は、怠惰です\(\ログ\) とにかく良い泥棒の書き込み)何か:

int normalnimproduct(int x, int y) ;
int nimproduct(int x, int y) {
    if (x == 1) return y;
    if (x < y) return normalnimproduct(y, x);
    int M = 1 << (1 << (int) std::log2((int) std::log2(x)));
    int d1 = nimproduct(x / M, y / M);
    int d2 = nimproduct(x / M, y % M);
    return (M * (d1 ^ d2)) ^ nimproduct(M >> 1, d1);
}
int normalnimproduct(int x, int y) {
    int res = 0;
    for (; x; x &= x - 1) res ^= nimproduct(x & -x, y);
    return res;
}

どこに\(xは\) 2の累乗です。メモリの消費電力のように見えるが速く実行されます。nimproduct

よると09論文nimproductなどの正しさの証明は次のとおりです。

私たちは、保証(X-は\ Y- \をGEQ)\覚えて、(X- = PM、Y = SM + T \)\ところ、\(M \)が最大の満足です\(M <X \)とフェルマー数の数であります。

どうやら\(P、S、T <M \) 次にあります。

\ [\(T oplus(S \ otimes M)\)otimes(S \回M + T)= \\&(P \ otimes M)\ otimes \(M P \回)開始{ALIGN *}&\\ =&(M \ otimes M \ otimes P \ otimes S)\ oplus(M \ otimes P \ otimes T)\\ =&((M \ oplus \ FRAC {M} {2})\ otimes P \ otimes S) \ oplus(M \ otimes P \ otimes T)\\ =&(M \ otimes((P \ otimes S)\ oplus(P \ otimes T)))\ oplus(\ FRAC {M} {2} \ otimes( P \ otimes S))\\ =&(M \倍((P \ otimes S)\ oplus(P \ otimes T)))\ oplus(\ FRAC {M} {2} \ otimes(P \ otimes S) )\端{ALIGN *} \]

\(D1 = P \ S otimes、D2 = P \ otimes T \)が、

\ [X \ otimes Y =(M \回(D1 \ oplus D2))\ oplus(\ FRAC {M} {2} \ otimes D1)\]

normalnimproduct 法の正しさの組み合わせがクリアされているので。

その後、書き込み、成功怠惰(約書くことを覚えておいてください)。

実際、紙は、別の関数の外挿と同様でした。でも、事前審査の範囲内とにかく、このメソッドの出会いが実行されている場合は、しかし、それはゆっくりと一般的な慣行押します。

おすすめ

転載: www.cnblogs.com/daklqw/p/12006925.html