Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Grundy

yosupo
November 18, 2016

 Grundy

yosupo

November 18, 2016
Tweet

More Decks by yosupo

Other Decks in Technology

Transcript

  1. ΄΅׬શDAG ௖఺਺{a, b, c, …}ʹߦ͚Δͱ͢Δͱɺ௖఺਺=ʮ{a, b, c, …}ʹ ग़ͯ͜ͳ͍࠷খͷਖ਼੔਺ʯͷ׬શDAGͱຊ࣭తʹ౳͍͠ ྫ͑͹{1,

    3, 4, 5}ʹߦ͚ΔͳΒ͹௖఺਺=2 ͳ͔ͥͱ͍͏ͱɺ3,4,5ͷͲΕʹߦ͘ͷ΋ɺ࣍ͷखͰ૬खʹ2 ʹ໭͞ΕΔͷͰɺ༗རʹͳΕͳ͍
  2. ݁ہ (׬શDAG + ׬શDAG + … + ׬શDAG)ʹมܗͰ͖Δ ͜ͷඞউ൑ఆ͸ʁ(࣮͸NimήʔϜͱ͍͏༗໊ͳܗͷήʔϜʹͳ͍ͬͯΔ…) (׬શDAG

    + ׬શDAG + … + ׬શDAG)=
 {(׬શDAGͱ׬શDAGΛ·ͱΊͨ΋ͷ) + (K-2ݸͷ׬શDAGΛ·ͱΊͨ΋ͷ)}=
 ʹมܗͰ͖Δ ͱ͜ΖͰɺK=2ͳͷͰ(׬શDAGͱ׬શDAGΛ·ͱΊͨ΋ͷ)͸׬શDAG΁มܗͰ͖Δ ͭ·Γɺ(׬શDAGͱ׬શDAGΛ·ͱΊͨ΋ͷ)Λ׬શDAGʹมܗͰ͖ΔͱɺK-1ʹؼ ணͰ͖Δ
  3. ղ๏ ͱ͍͏͜ͱ͸ɺlevel a + b + …ͳΒ͹ɺlevel (a xor b

    xor …) ͱ౳͍͠ ͜Ε͕0͔Ͳ͏͔൑ผ͢Ε͹౴͑ O(K(N+M))ʂ