-
Grundy number of losing states is 0
-
The Grundy number of a state is the smallest non-negative integer other than the Grundy number of states from which it is possible to transition
- mex: minimum excluded value
-
The number of stones in a pile in Nim matches the Grundy number
-
Why is it OK to XOR?
- Let gi be the Grundy number for each mountain
- Let g be the one joined by xor
- Since we can prove that this g satisfies the Grundy number condition
- half finished proof
- Let m be the most significant bit of g. There are always an odd number of gi with m. Let g1 be one of them.
- , so transition is possible
- see Theory of Grundy numbers (Nim numbers, Nimber)
This page is auto-translated from /nishio/Grundyζ° using DeepL. If you looks something interesting but the auto-translated English is not good enough to understand it, feel free to let me know at @nishio_en. Iβm very happy to spread my thought to non-Japanese readers.