Game three basis

(A) Bash Game (the Bash Game ): only a pile of n items, two people take turns extract from stack items, each at least take a predetermined, take up the m. Finally, light extraction by winning.
     Obviously, if n = m + 1, then since a maximum number of m can, therefore, no matter how many first take away persons, who can after taking away a remaining items, which win. So we find that the rules of how to win: If n = (m + 1) r + s, (r is an arbitrary natural number, s≤m), then the first taker to take a s article, if after taking away by k ( ≤M) th, the first take away by re-m + 1-k th result, the remaining (m + 1) (r- 1) th, after maintaining such emulated, then the first taker certainly win. In short, to keep leaving multiple (m + 1) to the opponent can finally win.
     This game can also be a disguised form of play: Two people reported that the number of turns, each at least a newspaper, reported that up to ten, who can register 100 wins.
(Ii)威佐夫博奕(Wythoff Game ): There are a number of piles of each article, two turns taken from a pile or simultaneously from as many piles of articles, each at least take a predetermined, not more than those of the last by winning light extraction.
     This case is quite complex. We use (ak, bk) (ak ≤ bk, k = 0,1,2, ..., n) represents the number of piles of articles saying that the situation is, if the A face (0,0), then A has been lost, we call this situation strange situation. Singular previous situation is: (0,0), (1,2), (3,5), (4,7), (6,10), (8,13), (9,15), ( 11, 18), (12, 20).
     As can be seen, a0 = b0 = 0, ak is the minimum natural number not appear in front off, and bk = ak + k, singular situation following three properties:
     1. Any natural numbers are contained in one and only one bizarre situation.
     Since ak is the smallest natural number not appear in front of, therefore they have ak> ak-1, and bk = ak + k> ak- 1 + k-1 = bk-1> ak-1. So nature 1. Established.
     2. Any operating situation can become singular non-singular situation.
     In fact, change only the strange situation (ak, bk) of one component, the other component is impossible in other bizarre situations, it must be non-singular situation. If so (ak, bk) while reducing the two components, due to its poor unchanged, and the difference can not be other bizarre situation, and therefore non-singular situation.
     3. Using appropriate methods, non-singular situation can be turned into bizarre situation.
     The situation is assumed that the face (a, B), if b = a, are simultaneously removed from a two piles of two objects, the singular situation becomes (0,0); if a = ak, b> bk, then , removed b - bk two objects, i.e., becomes singular situations; if a = ak, b <bk, while the piles away from the ak - ab - ak two objects, the situation becomes singular (ab - ak, ab - ak + b - ak); if a> ak, b = ak + k, from the first stack away the excess amount of a - ak can; If a <ak, b = ak + k, two situations , a first, a = aj (j <k ), b away from the second stack inside - bj can; second, a = bj (j <k ), b away from the second stack inside - aj It can be.
     As can be seen from nature, if two people are using the correct operation, then the face of non-singular situation, those who acquire a win; on the contrary, the latter who took to win.
     So given any situation (a, b), how to judge it is not strange situation do? We have the following formula:
     ak = [k (1 + √5 ) / 2], bk = ak + k (k = 0,1,2, ..., n denotes the floor function brackets) in which there have been amazing golden division number ( 1 + √5) / 2 = 1.618 ..., and therefore, the rectangular ak, bk consisting of gold approximately rectangular, since 2 / (1 + √5) = (√5-1) / 2, can first obtaining j = [a (√5-1) / 2], if a = [j (1 + √5 ) / 2], then a = aj, bj = aj + j, if not equal, then a = aj + 1, bj + 1 = aj + 1 + j + 1, if not, then it is not strange situation. Then follow the above rules were, will encounter strange
situation.
(C) Game Nim (NIMM Game ): There are three groups of each of a plurality of articles, any two people take turns from a plurality of pile articles, each at least take a predetermined, limited multi-person, by winning the final light extraction.
     This is most interesting, and it is closely related to binary, we use (a, b, c) represents a certain situation, first of all (0,0,0) apparently bizarre situation, no matter who face bizarre situation, we are bound to fail . The second strange situation is (0, n, n), as long as the opponent to take away as many items, will eventually lead to (0,0,0). A closer look, (1,2,3) is also a strange situation, regardless of the opponent to take the next can be turned into case (0, n, n) of.
     Inside there is a known computer algorithm bitwise modulo-2 addition, also called exclusive or operation, we represent this operation by symbol (+). This operation is different and generally is an adder that 1 + 1 = 0. Look (1,2,3) by modulo 2 addition result bit:
1 = binary 01
2 = binary 10
3 = 11 binary (+)
-------
0 = binary 00 (note that no carry)
     for bizarre situation (0, n, n) is the same, the result is 0.
     Singular any situation (a, b, c) has a (+) b (+) c = 0.
If we are faced with a non-singular situation (a, b, c), how it becomes a bizarre situation? Suppose a <b <c, c we just becomes a (+) b, can, because the calculation result has the following: a (+) b (+ ) (a (+) b) = (a (+) a) (+) (b ( +) b) = 0 (+) 0 = 0. To c becomes a (+) b, c by subtracting from the c- (a (+) b) can.
     example 1. (14,21,39), 14 (+) 21 = 12 = 27,39-27, it took 12 to 39 from the object reaches singular situation (14,21,27).
     Example 2. (55,81,121), 55 (+) 81 = 19 = 102,121-102, so 19 away from the article 121 to form a singular situation (55,81,102).
     Example 3. (29,45,58), 29 (+) 45 = 10 = 48,58-48, 58 away from 10, becomes (29,45,48).
     Example 4. Let's look at the actual conduct of a match:
         A: (7,8,9) -> (1,8,9) bizarre situation
         B: (1,8,9) -> (1,8,4)
         A: (1,8,4) -> (1,5,4) Singular situation
         b: (1,5,4) -> (1,4,4)
         A: (1,4,4) -> (0, 4,4) Singular situation
         b: (0,4,4) -> (0,4,2)
         A: (0.4,2) -> (0,2,2) Singular situation
         b: (0,2,2 ) -> (0,2,1)
         A: (0,2,1) -> (0,1,1) bizarre situation
         B: (0,1,1) -> (0,1,0)
         A: (0,1,0) -> ( 0,0,0) strange situation
         Jiashengpan.

Published 464 original articles · won praise 8592 · Views 1.08 million +

Guess you like

Origin blog.csdn.net/hebtu666/article/details/104085093