Smart game robbers divide gold coins, game robbers coins

Source: Internet
Author: User

Smart game robbers divide gold coins, game robbers coins

Reprinted please indicate the source: http://blog.csdn.net/xiaojimanman/article/details/46878355

Http://www.llwjy.com/blogdetail/49eec9599e710ca3dd0600a354c60df6.html

The personal blog website has been launched. Its website is www.llwjy.com ~ Thank you ~
Bytes -------------------------------------------------------------------------------------------------

At a friend's suggestion, when updating the Lucene-based case development blog series, I updated some interview questions that tested my intelligence and gave everyone time to relax, upgrade the B class.


Problem description

Five robbers snatched 100 gold coins and discussed how to make a fair distribution. They agreed on the allocation principle: (1) draw lots to determine the order of numbers (, 5) for each individual; (2) propose the allocation scheme from the robbers who drew the signature 1, then the other four members voted. If more than half of the members agreed to the plan (including half), the plan would be allocated according to the plan; otherwise, the first half would be thrown into the sea to feed the sharks; (3) If 1st is thrown into the sea, 2nd will propose a scheme for allocation, and then the remaining three will vote. If and only when more than half agree, will be allocated according to his proposal, otherwise it will be thrown into the sea; (4) so on. It is assumed that every robber is wise and rational. They can carry out rigorous logical reasoning and rationally judge their own gains and losses, that is, you can get the most gold coins under the premise of saving your life. At the same time, assuming that the results after each round of voting can be successfully executed, then what sort of allocation scheme should be proposed by the robbers on the first day so that they will not be thrown into the sea, can we get more gold coins?


Final answer

The allocation scheme proposed by No. 1 is 97-0-1-2-0 or 97-0-1-0-2.


Problem Analysis

This is a game problem. When we analyze this problem, we do not want to deduce it from the back:

1)If the first three people are thrown into the sea, only the 4th and 5th are left. At this time, no matter what solution is proposed on the 4th, the 5th party will oppose it, in this way, the 5th will get all the gold coins. Therefore, no matter what solution is proposed on the 3rd, the 4th will support the 3rd and will not let the 3rd die;

2)In this case, if the first and second accounts are thrown into the sea, only the third, fourth, and fifth accounts are left, because the third account knows that no matter what allocation scheme he makes, the fourth account will agree, therefore, his allocation scheme is 100-0-0;

3)At this time, assume that the first day is thrown into the sea, and the remaining two, three, four, and five are left. At this time, the third day will strongly oppose the decision of the second day, as long as he threw the 2 s into the sea, he could get all the gold coins. Therefore, in order not to be thrown into the sea, the 2 S should be recognized by the 4 s and 5 s, therefore, his allocation scheme is 98-0-1-1;

4)In this case, if no one is thrown into the sea, the allocation scheme is proposed on the first day. On the second day, the decision on the second day will be opposed to the decision on the second day to maximize the interests of the second party, unless the proposed allocation scheme No. 2 receives more than 98 gold coins, it is clear that no such allocation scheme is proposed on the No. 1, therefore, on the first day, you must obtain the consent of two people on the third, fourth, and fifth sides. On the first day, when you agree on the third and fourth sides, the allocation scheme is: 97-0-1-2-0, ② the allocation scheme agreed on No. 4 and No. 5 is: 96-0-0-2-2, ③ The allocation scheme agreed on No. 3 and No. 5 is 97-0-1-0-2. Here, one of the two allocation schemes will be chosen, therefore, the allocation scheme proposed by No. 1 is 97-0-1-2-0 or 97-0-1-0-2.


Inspiration

① When competitors with average strength need to allocate a certain benefit, when the rule is in a strong position (that is, no one has the strength to follow this rule ), first, the party that proposes the allocation scheme will be dominant.

② When you are in danger, you may be the dominant and final beneficiary of the whole thing, because others have to make decisions based on your decision, your decision affects the benefits of everyone involved. For example, the robber 1 seems to be the easiest to be killed, but in fact, because the interests of every robber are actually interrelated, the life and death and decision-making of No. 1 have actually deeply affected the interests of other people. Everyone has to drop the mouse and keep the life of No. 1 for their own benefits.


Bytes -------------------------------------------------------------------------------------------------
Small benefits
Bytes -------------------------------------------------------------------------------------------------
I have already launched the Lucene case development course at geek College (now the second course is available ~
Lesson 1: Lucene Overview
Lesson 2: Introduction to common Lucene Functions

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

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.