Reprint Please specify source: http://blog.csdn.net/xiaojimanman/article/details/46878355
Http://www.llwjy.com/blogdetail/49eec9599e710ca3dd0600a354c60df6.html
Personal Blog Station has been online, the website www.llwjy.com ~ welcome you to vomit Groove ~
-------------------------------------------------------------------------------------------------
Should be a friend of the proposal, in the update "Lucene-based Case development" This series of blog process, update a little test of intelligence interview topics, also let everyone have time to relax, upgrade the B level.
Problem description
After 5 robbers had robbed 100 gold coins, they discussed how to make a fair distribution. They agreed on the principle of distribution: (1) Draw lots to determine each individual's assigned order number (1,2,3,4,5), (2) from the robber drawn to 1th to propose the distribution programme, and then the other 4 to vote, if the programme received more than half of the consent (including half), the distribution according to his plan, Otherwise, the number 1th is thrown into the sea to feed the Sharks; (3) If number 1th is thrown into the sea, the allocation scheme is proposed by 2nd and then voted by the remaining 3, which will be allocated only if more than half of the people agree, otherwise they will be thrown into the sea; (4) and so on. This assumes that every robber is very smart and rational, they are able to carry out rigorous logic reasoning, and can be very rational judgment of their own gains and losses, that is, to save their lives under the premise of getting the most gold. At the same time, assuming that the results of each round of voting can be executed smoothly, then the robber who drew the number 1th should propose what kind of distribution plan to make himself not to be thrown into the sea, but also to get more gold coins?
Final Answer
The allocation scheme proposed by No. 1th is: 97-0-1-2-0 or 97-0-1-0-2
Problem analysis
This is a game problem, in the analysis of this problem, we do not have to deduce from the forward:
1) If the first 3 people are thrown into the sea, this time only left 4th and 5th, this time no matter what plan 4th proposed, 5th will oppose, so that 5th will get all the gold, so 4th for survival, no matter what plan 3rd will support 3rd, will not let 3rd death;
2) at this time assume that number 1th and 2nd are thrown into the sea, leaving only 3rd, 4th and 5th, because 3rd knows that no matter what distribution plan he makes, 4th will agree, so his distribution plan is 100-0-0;
3) at this time, assuming that number 1th is thrown into the sea, leaving 2nd, 3rd, 4th and 5th, then 3rd will strongly oppose the decision of 2nd, because as long as the 2nd is thrown into the sea, he can get all the gold coins, so 2nd in order not to be thrown into the sea, they need to be 4th and 5th identification, So his distribution plan is 98-0-1-1;
4) at this time assume that all the people are not thrown into the sea, by the allocation Plan 1th, 2nd for their own benefit maximization, will oppose the decision 1th, unless the proposed allocation scheme 2nd won more than 98 coins, obviously 1th will not propose such a distribution plan, so 1th need to get 3rd, With the consent of two persons in numbers 4th and 5th, ① 3rd and 4th agreed upon the distribution programme: 97-0-1-2-0, ② 4th and 5th agreed distribution schemes are: 96-0-0-2-2, ③ 3rd and 5th agreed distribution schemes are: 97-0-1-0-2, here number 1th obviously chooses one of the two distribution schemes, ① and ③, so the allocation scheme proposed by 1th is: 97-0-1-2-0 or 97-0-1-0-2.
Enlightenment
① in the face of the strength of the average competitor to allocate a certain interest, when the rule is strong (that is, no one has the strength to defend the rule, can only abide by this rule), first of all, the allocation of the scheme will be the one party is superior.
② when you're in danger, you're probably the dominant and ultimate beneficiary of the whole thing, because everyone else has to make decisions based on your decisions, and your decisions affect the benefits of everyone involved. For example, the 1th Bandit seems to be the most likely to be killed, but in fact, because each robber's interests are actually interrelated, 1th of life and death and decision-making has actually deeply affected the interests of other people, everyone has to lose, for their own income and have to save the life of 1th.
-------------------------------------------------------------------------------------------------
Small welfare
-------------------------------------------------------------------------------------------------
Individual at the Geek College, "Lucene case development" course has been launched (currently on the line to the second lesson), welcome everyone spit Groove ~
First lesson: Lucene Overview
Lesson Two: Introduction to Lucene common functions
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
The game of wisdom, bandits, coins.