[Zz] pirate problems

Source: Internet
Author: User
The logic of mathematics sometimes leads to seemingly weird conclusions.

Ten hackers snatched 100 pieces of gold from the treasure and planned to divide the trophy. This is a democratic pirate (of course, their own democracy). Their habit is to distribute in the following way: the most powerful pirate proposed a distribution scheme, then all the pirates (including those who propose the solution) will vote on the solution. If 50% or more of the pirates agree with this scheme, the scheme will be approved and the trophy will be allocated accordingly. Otherwise, the proposed pirate will be thrown into the sea, and then the nominated most powerful pirate will repeat the above process.

All the pirates are happy to see one of their associates thrown into the sea, but if they choose, they 'd rather get a cash deal. Of course they do not want to be thrown into the sea. All pirates are rational, and others are rational. In addition, no two of them are equally powerful-they have arranged their seats in full order, and everyone knows their levels and everyone else's levels. These gold blocks cannot be further divided or shared by several pirates, because no one of them believes that their associates will abide by the shared gold block arrangement. This is a group of pirates who only plan for themselves.

What kind of allocation scheme should the most fierce pirate propose to obtain the most gold?

For convenience, we will give them numbers based on the severity of these pirates. The most cowardly pirate is the first pirate, and the second cowardly pirate is the second pirate, and so on. In this way, the most powerful pirate should get the largest number, and the proposal of the solution will be carried out from top to bottom.

The secret to analyzing all such strategy games is that they should be pushed back from the end. When the game ends, you may easily know which decisions are favorable and which decisions are unfavorable. After confirming this, you can apply it to the last 2nd decisions, and so on. If you start from the beginning of the game, it cannot go far. The reason is that all strategic decisions need to be determined: "If I do this, what will happen to the next person ?" Therefore, the decisions made by the following pirates are important to you, and the decisions made by the pirates before you are not important, because you can't do anything about these decisions anyway.

With this in mind, we can know that our starting point should be when there are only two pirates in the game-the first and second. At this time, the most powerful pirate is the 2nd, and his best allocation scheme is clear: 100 gold is owned by him, and no one gets anything from the 1st pirate. He certainly voted in favor of this scheme, which accounts for 50% of the total, so the scheme was approved.

Now add pirate 3. Pirate 1 knows that if the No. 3 scheme is rejected, there will be only two pirates in the end, and no one will get anything-In addition, no. 3 understands the situation. Therefore, as long as the allocation scheme of No. 3 gives the sweetness of No. 1 so that he will not return empty-handed, no matter what kind of allocation scheme proposed by No. 3, No. 1 will vote in favor. Therefore, on the 3rd, We need to allocate as few gold as possible to bribe the 1st pirate, so we have the following allocation scheme: on the 3rd, the pirate gets 99 gold, and on the 2nd, the pirate gets nothing, pirate 1 gets one gold.

The same is true for pirate 4. He needs 50% of support votes, so he needs to find another person to join the same party on the 3rd. The lowest bribe he can give to his peers is one gold, and he can use this gold to buy the 2nd pirate. Because if No. 4 is rejected and No. 3 is passed, no. 2 will be broke. Therefore, the allocation plan for No. 4 should be: 99 gold coins should be owned by themselves, and neither can nor be obtained for No. 3, nor can one gold for No. 2, nor be obtained for No. 1.

The strategy of pirate 5 is slightly different. He had to buy two other pirates, so he had to bribe him with at least two gold coins in order to get his solution accepted. His allocation plan should be: 98 pieces of gold belong to himself, 1 piece of gold is given to 3, and 1 piece of gold is given to 1.

This analysis process can be continued based on the above ideas. Each allocation scheme is uniquely identified. It can allow the pirates who propose the scheme to obtain as much gold as possible, and ensure that the scheme will certainly pass. According to this pattern, the solution proposed by pirate 10 will be owned by 96 gold coins, and each other with an even number will get 1 gold, the odd-numbered pirate cannot get anything. This solves the allocation problem of 10 pirates.

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.