This is the 27th day of my participation in the Genwen Challenge
This series is a little bit fancy, just to expand your thinking, kind of intelligence questions, usually not in the interview, but some factories will ask some, as far as I know, some departments here will ask some of these, and then say in the group: “Alas, the whole army was destroyed again, -_-“, I curiously looked at the group, take out this problem, although can be solved, but really in the spirit and time pressure should not be easy to do. I thought of this, so I created a column to help you in your interview.
1. It doesn’t matter if you can’t solve this kind of problem. This is the attitude you should have, 2. If you can’t do the answer, it is also good to organize your thoughts. In fact, the interviewer may be looking at your reaction to the problem and the pressure, not the question itself.
I once passed a mensa test on 33IQ in high school. I still have confidence in myself, but as time goes by, I increasingly think patience and perseverance are the only way to grow wisdom, so work hard ^-^
Besides, isn’t it a little boring to watch the algorithm series every day?
The last two thinking questions are also very interesting
- Have 1000 passengers, have 1 person masculine sex, how to look out with 10 kit?
- How many sevens are there between 1 and 999?
3. Pirates share the money
Topic describes
Five pirates grab 100 gold coins, they put forward the plan according to the order of drawing lots: first, no. 1 puts forward the distribution plan, and then five people vote, the plan is approved only when more than half of the votes agree, otherwise he will be thrown into the sea to feed the sharks, and so on. So if you draw the first proposal, how do you get the most gold without being fed to sharks?
Several qualifications
- Every pirate is extremely intelligent and rational enough.
- Every pirate is very cruel. They would be more inclined to kill if it didn’t affect their earnings.
- Every pirate was afraid of death and tried to live as long as he could.
- Each pirate never trusted the other, or had an understanding with the other in advance.
In fact, the last three are complementary to the first one, and in this fictitious problem, we can assume that they are all perfectly rational.
Analysis of the
Get this problem, think about the method in front, or special after general, mathematical induction is from a small start. Let’s start with a subproblem that is similar to the original problem, but much smaller. Seek the solution of the original problem by solving the sub-problem.
In this case, reducing the number of pirates,
- If there’s only one person, don’t vote, I’ll take it all
- If there are two people, I’m sorry, the one who proposed the plan first should be dead, why don’t you think about the back road, where there are fewer sharks?
- If there are three people, we number them in the order they sign
1, 2, 3
(1 represents the first proposal), then the key idea isThe inverse methodIf the1
Number two feeds the shark, so there are only two people left, and based on the two people up there,2
It’s a dead man, soNo. 2 really has no other choice, with 3 remaining, it must support No. 1 to die. In other words,He has to agree to whatever bad idea Number one comes up withOr you die, so you have to say yes. so1
Number can be presented(100, 0, 0)
“It seems like the other two won’t agree on anything and take all the gold.
Now I think I have a general idea of where this problem is going. Go ahead
-
4 people 1,2,3,4, the first person can already calculate the later situation, he knows that if he dies, there are 3 people left, number 2 can come up with the plan (100, 0, 0), and the others will not be able to oppose, but now,3 and 4 also know this result, so he can only give 3 and 4 each one one, (98, 0, 1, 1) Thus, 3 and 4 will certainly support themselves, already more than half, 3 and 4 will support this for profit (as opposed to killing 1 and then going back to 3 and getting nothing, and now getting one).
-
Finally, we add one more pirate. Number 1, 2, 3, 4, 5. Viking 1 requires at least three people to pass. He still needs two votes, including himself.
- Number two is out of the question, because number one has the most to gain if he dies.
- Number 3 is up for grabs, because number 1 is dead, so we’re back to 4, and number 3 is going to get nothing. So just give him a gold coin
- 4 and 5 are certainly up for grabs, but they need to be one more than the 4 players (the last 2 players 1 gold coin)
- So assignment number one could be
(97,0,1,2,0)
or(97,0,1,0,2)
Is it clear now the idea of this question
Digression, qin Shi Mingyue “Tianxing Nine songs” in the three ji gold is that this model, interested can see.
extension
But the real world is far more complex than models. First of all, the reality is certainly not that everyone is “perfectly rational”.
Behavioral economists argue that people are susceptible to irrelevant emotions, shortsightedness, and other forms of irrationality from their surroundings (what we call situational effects), so decisions are routinely wrong. We often fall into a “decision fantasy” because we think we have supreme control over our decisions and the direction of our lives. But this is wishful thinking and reflects our desires rather than reality.
It’s just a behavioral theory, but I think it’s true that given the amount of arithmetic and the amount of information that people have, you can’t be completely rational about something or someone.
Second, life is more like poker than chess. Poker has a deck of cards and contains a lot of hidden information; In chess, all the information is laid out clearly on the board;
Betting against Advises us to use probabilistic thinking to make decisions and resets, to separate decision making from luck, and to make quality decisions with little information in our lives. I suggest checking it out.
conclusion
If there are only a few things you can remember from reading this, hopefully these are:
- When you have a big problem, break it down and start small (cliche)
- Make good use of the inverse method of deducting the cause from the hypothesis.
- Reality is not a game, life is more like poker than chess, and luck matters.
- A little operational research and game theory wouldn’t hurt.
- Remember to like it.
In addition, we recommend another series of articles, very simple, on the front of the advanced students are very effective, wall crack recommended!! Core concepts and algorithms disassembly series remember to like ha
If you want to brush the questions with me, you can add me on wechat. Click here to make a friend Or search my wechat account, infinity_9368. You can chat with me and add my secret code “Tianwang Gaidihu”. Verify the message please send me Presious tower shock the rever Monster, I see it through, after adding I will do my best to help you, but pay attention to the way of asking questions, it is suggested to read this article: the wisdom of asking questions