12.07.2015 Views

Game Theory Basics - Department of Mathematics

Game Theory Basics - Department of Mathematics

Game Theory Basics - Department of Mathematics

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

1.10. SUMS OF NIM HEAPS 13Theorem 1.10 Let n ≥ 1, and n = 2 a + 2 b + 2 c + ··· , where a > b > c > ··· ≥ 0. Then∗ n ≡ ∗(2 a ) + ∗(2 b ) + ∗(2 c ) + ···. (1.7)We first discuss the implications <strong>of</strong> this theorem, and then prove it. The right-handside <strong>of</strong> (1.7) is a sum <strong>of</strong> games, whereas n itself is represented as a sum <strong>of</strong> powers <strong>of</strong> two.Any n is uniquely given as such a sum. This amounts to the binary representation <strong>of</strong> n,which, if n < 2 a+1 , gives n as the sum <strong>of</strong> all powers <strong>of</strong> two 2 a ,2 a−1 ,2 a−2 ,...,2 0 , eachpower multiplied with one or zero. These ones and zeros are then the digits in the binaryrepresentation <strong>of</strong> n. For example,13 = 8 + 4 + 1 = 1 × 2 3 + 1 × 2 2 + 0 × 2 1 + 1 × 2 0 ,so that 13 in decimal is written as 1101 in binary. Theorem 1.10 uses only the powers <strong>of</strong>two 2 a ,2 b ,2 c ,... that correspond to the digits “one” in the binary representation <strong>of</strong> n.Equation (1.7) shows that ∗n is equivalent to the game sum <strong>of</strong> many nim heaps, all <strong>of</strong>which have a size that is a power <strong>of</strong> two. Any other nim heap ∗m is also a sum <strong>of</strong> suchgames, so that ∗n + ∗m is a game sum <strong>of</strong> several heaps, where equal heaps cancel out inpairs. The remaining heap sizes are all distinct powers <strong>of</strong> two, which can be added togive the size <strong>of</strong> the single nim heap ∗k that is equivalent to ∗n + ∗m. As an example, letn = 13 = 8+4+1 and m = 11 = 8+2+1. Then ∗n+∗m ≡ ∗8+∗4+∗1+∗8+∗2+∗1 ≡∗4 + ∗2 ≡ ∗6, which we can also write as 13 ⊕ 11 = 6. In particular, ∗13 + ∗11 + ∗6 is alosing game, which would be very laborious to show without the theorem.One consequence <strong>of</strong> theorem 1.10 is that the nim sum <strong>of</strong> two numbers never exceedstheir ordinary sum. Moreover, if both numbers are less than some power <strong>of</strong> two, then sois their nim sum.Lemma 1.11 Let 0 ≤ p,q < 2 a . Then ∗p+∗q ≡ ∗r where 0 ≤ r < 2 a , that is, r = p⊕q 0. We have q < 2 a .By inductive assumption, ∗q ≡ ∗(2 b ) + ∗(2 c ) + ···, so all we have to prove is that ∗n ≡∗(2 a ) + ∗q in order to show (1.7). We show this using lemma 1.8, that is, by showingthat the options <strong>of</strong> the games ∗n and ∗(2 a ) + ∗q are all equivalent. The options <strong>of</strong> ∗n are∗0,∗1,∗2,...,∗(n − 1).

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!