Brainstorming of the pirate Gem interview questions

Source: Internet
Author: User
Five pirates get 100 diamond, which is worth the money. These five pirates are very smart and want to get the most Diamond. Therefore, they designed a rule. according to the order after the lottery, each person proposed a allocation scheme. if more than half (not half) of the members voted for the scheme, they would execute the scheme, otherwise, the person who proposes the scheme will be thrown into the sea to feed the fish. The next person starts to propose a solution, and so on.

There is an interview question like this:

Five pirates get 100 diamond, which is worth the money. These five pirates are very smart and want to get the most Diamond. Therefore, they designed a rule. according to the order after the lottery, each person proposed a allocation scheme. if more than half (not half) of the members voted for the scheme, they would execute the scheme, otherwise, the person who proposes the scheme will be thrown into the sea to feed the fish. The next person starts to propose a solution, and so on.

Q: If you are the first person to propose a scheme, what kind of diamond allocation scheme should you propose to save your life and earn as much diamond as possible?

This type of game theory cannot be done with general knowledge. for example, an equi-sharing solution is not feasible. if you reject it, you can divide the remaining people equally. You can useReverse push.

In the order of drawing lots, the number of people who want to propose a scheme is 1, 2, 3, 4, and 5.

If only 4 and 5 are left, 5 will certainly not agree unless all the gems are given to 5, so that the 4 proposal will not pass, and the result of fish feeding will be faced. Therefore, you are absolutely not allowed to allocate the gem by yourself.

Next, if there are 3, 4 and 5, it will not be agreed, because the main 3 is killed, the remaining gem is actually his. Here, we mainly strive for support from 4. if we can give him one, it would be nice. so when we propose 3, the best allocation scheme is -- 3: 99, 4: 1, 5: 0.

And so on. what if there are 2, 3, 4, 5? 3. I certainly won't agree, so I have to fight for the remaining two people. You can give four or five, so that they have more than three solutions and will still vote in favor. Allocation scheme: 2: 97, 3: 0, 4: 2, 5: 1.

At the end of the day, 2 won't vote in favor, so it is mainly to get 3, 4, and 5 support from two of them. At this time, you can give three and five to five, so that the two of them are better than the two, and they are sure to vote in favor.

For example, the best allocation scheme is -- 1: 97, 2: 0, 3: 1, 4: 0.

Address of this article: http://www.nowamagic.net/librarys/veda/detail/1833,welcome to the original release.

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.