2 Combo Games

Source: Internet
Author: User

For the initiator

Losing state (P position)--all succeeding is a winning state

Win status (N position)--a successor is a must-fail state

No successor State is a must.

1.Ferguson Game

The game requires two boxes, at the beginning of the game, there are n stones in the first box and M stones in the second box (n, M > 0). Participating in the game

Two players take turns doing this: emptying a pebble in a box, and then taking a few stones from the other box to the emptied box, making the last two

The box is not empty. When there is only one stone in all two boxes, the game is over. The last player to successfully perform the operation wins. Find out all the P positions in the game.

(1) Topo sequence (m+n) recursion

(2) for a position (x, y), if x, Y has an even number, then (x, y) is the N (win) position. If x and y are both odd, then (x, y) is P position (must fail)

Proof : Proof Conclusion: (x, y) at least one time, the initiator wins; When all is odd, the initiator loses the proof: (x, y)=(1,1) is the initiator, the next to Max (x, y) >1 To summarize1, when Max (x, y) =2, i.e. (x, y) = (1,2Or2,1Or2,2), the initiator leaves a 2 divided (1,1), the initiator wins. That is, when Max (x, y)=2 o'clock Conclusion established. 2, assuming Max (x, y) <k, the conclusion is that Max (x, y) =K-time conclusion was established. If there is an even number (set to a) in (x, y), the initiator empties the other and divides even a into two odd B and C, because B, C<A is less than or equal to K, which is Max (B,C)<K, from the assumption that in the (b,c) position in the new initiator will be defeated, so the initiator wins. if (x, y) is an odd number, the initiator can only keep an odd number and decompose it into an odd A and a even B, because Max (A, b)<max (x, y) =K, from the hypothesis, in (A, b) in the position of the new initiator to win, so the initiator defeated. 
View Code

2.chomp! Games

There is a n*m board that can take one square at a time and take away all the squares on its right and above. The lower left corner of the lattice (8*3) loses, as the

The State of the Board (6,2) and (2,3) after being removed.

Conclusion: The answer is that in addition to the 1*1 board, for other sizes of the chessboard, the initiator always wins.

The proof is as follows:

If you can win, that is to say, there is a winning strategy, so that regardless of the first time to take which stone, the latter can win the final victory. So now assume that the initiator

Take the top right corner of the stone (n,m), the next hand through some way to make themselves into the winning situation. But in fact, the first time the initiator can be taken and

This time to take the same, enter the winning situation, and the hypothesis contradiction.

Approximate game: There are 1~n numbers, two people take turns to select a number and wipe it off with its approximate numbers. Wipe off the last number of people to win and ask who will win.

Analysis: Similar to the chocolate game, the conclusion is that no matter n is a few, are the initiator win.

2 Combo Games

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.