NIM : 無料・フリー素材/写真
NIM / Todd Huffman
| ライセンス | クリエイティブ・コモンズ 表示 2.1 |
|---|---|
| 説明 | For quick rules see: www.csm.astate.edu/Nim.htmlBouton's proof is as follows:Theorem. In a normal Nim game, the first player has a winning strategy if and only if the nim-sum of the sizes of the heaps is nonzero. Otherwise, the second player has a winning strategy.Proof: Notice that the nim-sum (⊕) obeys the usual associative and commutative laws of addition (+), and also satisfies an additional property, x ⊕ x = 0 (technically speaking, the nonnegative integers under ⊕ form an Abelian group of exponent 2).Let x1, ..., xn be the sizes of the heaps before a move, and y1, ..., yn the corresponding sizes after a move. Let s = x1 ⊕ ... ⊕ xn and t = y1 ⊕ ... ⊕ yn. If the move was in heap k, we have xi = yi for all i ≠ k, and xk > yk. By the properties of ⊕ mentioned above, we have t = 0 ⊕ t = s ⊕ s ⊕ t = s ⊕ (x1 ⊕ ... ⊕ xn) ⊕ (y1 ⊕ ... ⊕ yn) = s ⊕ (x1 ⊕ y1) ⊕ ... ⊕ (xn ⊕ yn) = s ⊕ 0 ⊕ ... ⊕ 0 ⊕ (xk ⊕ yk) ⊕ 0 ⊕ ... ⊕ 0 = s ⊕ xk ⊕ yk (*) t = s ⊕ xk ⊕ yk.The theorem follows by induction on the length of the game from these two lemmata.Lemma 1. If s = 0, then t ≠ 0 no matter what move is made.Proof: If there is no possible move, then the lemma is vacuously true (and the first player loses the normal play game by definition). Otherwise, any move in heap k will produce t = xk ⊕ yk from (*). This number is nonzero, since xk ≠ yk.Lemma 2. If s ≠ 0, it is possible to make a move so that t = 0.Proof: Let d be the position of the leftmost (most significant) nonzero bit in the binary representation of s, and choose k such that the dth bit of xk is also nonzero. (Such a k must exist, since otherwise the dth bit of s would be 0.) Then letting yk = s ⊕ xk, we claim that yk < xk: all bits to the left of d are the same in xk and yk, bit d decreases from 1 to 0 (decreasing the value by 2k), and any change in the remaining bits will amount to at most 2k−1. The first player can thus make a move by taking xk − yk objects from heap k, thent = s ⊕ xk ⊕ yk (by (*)) = s ⊕ xk ⊕ (s ⊕ xk) = 0.The modification for misère play is demonstrated by noting that the modification first arises in a position that has only one heap of size 2 or more. The normal play strategy is for the player to reduce this to size 0 or 1, leaving an even number of heaps with size 1, and the misère strategy is to do the opposite. From that point on, all moves are forced. |
| 撮影日 | 2007-06-15 07:12:50 |
| 撮影者 | Todd Huffman , Phoenix, AZ |
| タグ | |
| 撮影地 | Zürich, Kanton Zürich, Schweiz 地図 |
| カメラ | NIKON D50 , NIKON CORPORATION |
| 露出 | 0.033 sec (1/30) |
| 開放F値 | f/5.3 |
| 焦点距離 | 66 mm |

