[Math story] Match Game

Source: Internet
Author: User

one of the most common match game is that two people play together, first put a number of matches on the table, two people take turns, each time the number can be taken to make some restrictions, the rule takes the last match to win. 

Rule One: If you limit the number of matches to be taken at least one, up to three, then how to play before winning ?

For example: There are n=15 on the desktop matches, a, b two people take turns, a first take, then a how to take to win?

In order to get the last one, a must finally leave 0 matches to B, so in the final step before the wheel, a can not leave 1 or 2 or 3, or B can all take away and win. If you leave 4, then B can not take all, then no matter how many (1 or 2 or 3), a will be able to get all the remaining matches and win the game. Similarly, if there are 8 matches left on the table for B to fetch, then no matter how to take, a can make this one after the round to leave 4 matches, and finally must be a win. From the above analysis, as long as the number of matches on the table is 4, 8, 12, 16 ... Wait for B to fetch, then a will be a shoo -in. Therefore, if the number of matches on the original table is 15, a should take 3. (∵15-3=12) Wakahara the number of matches on the first table is 18? A 2 (∵18-2=16) should be taken first.

rule Two: Limit the number of matches to be taken each time is 1 to 4, then how to win?

principle: If a first take, then a every time you take, you must leave a multiple of 5 matches to B to fetch.

General: There are n matches, each with 1 to K, then the number of matches left after each fetch must be a multiple of k+1.

Rule Three: Limit the number of matches taken each time is not a continuous number, but some discontinuous number, such as 1, 3, 7, then how to play?

Analysis: 1, 3, 7 are odd, because the target is 0, and 0 is even, so the first to take a match number on the table is even, because B in the even number of matches, it is impossible to take 1, 3, 7 matches to obtain 0, but if so also can not guarantee a will win, because a to the match number of odd or even, Can not be controlled according to their own intention. Because (odd-odd = odd, odd-odd = even), so after each fetch, the match number on the table is odd and even opposite. If the beginning is odd, such as 17, a first take, then no matter how many (1 or 3 or 7), the remaining is even, B and then the even into an odd number, a and the odd number to the even, the last one is destined for the winner ; Conversely, if the start is even, then a is doomed to lose.

General: The opening is odd, the first to win, on the contrary, if the opening is even, then the first pick will lose.

rule Four: Limit the number of matches that are taken each time is 1 or 4 (one odd, one even).

Analysis: If the former rule two, if a first take, then a time to take a multiple of 5 of matches to B to fetch, then a win. In addition, if the number of matches to be given to B is 5 multiples plus 2 o'clock, a can also win the game, because when playing can control the number of matches per round of 5 (if B takes 1, A is taken 4, if B takes 4, then a 1), and finally left 2, then B can only take 1, a can get the last root and win.

General: If A is taken first, then the number of matches left at each fetch is 5 multiples or 5 multiples plus 2.

[Math story] Match Game

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.