"Reprint" The Best girl probability model

Source: Internet
Author: User

Maximum probability selection to "Best Girl" algorithm
Let's say you're a boy, and God has 20 girls for you when you're 20-30 years old. These girls are willing to be your partner, but you can only choose one of them. The following conditions are selected:
1. For you, these 20 girls can be sorted, that is, you can rank the quality of them afterwards, the first girl is the best for you, the 20th is the worst for you.
2. The 20 girls do not appear in your life at the same time, but appear in chronological order, each one of which you decide to stay or reject. If you leave her, she will become your companion, you will not have the right to choose the girl behind, if you refuse, you can also choose the girl behind, but for the girl who has refused before the opportunity to start again.
Assuming that the sky is completely randomly scheduled to appear in each time period of the girl, that the time of occurrence and the quality of the girl is completely not related. So, when should you decide to accept a girl and make the accepted girl the most likely to belong to the best girl?
Very interesting question, I first subconsciously think is first look, than a ratio, do not seek the best, later on the internet to see the probability of such a strategy is still very high, first reproduced the online complete answer:
Strategy 1: Draw in advance and draw first on the first few. For example, if you take the 10th place, then the 10th girl who appears in your life is identified as your partner beforehand. And what is the probability of her being the best girl? The answer is 1/20=0.05. This strategy gives you a 5% chance to get the best girls. Such probabilities are obviously too small to happen.
Strategy 2: Divide all the girls into two paragraphs, the first 10 are not accepted, but understand the quality of the 10 girls, and then in the later 10 girls, the first encounter than before the lovely girls, immediately accept. This is a wait-and-see strategy. In such a strategy, the probability that you get the best girl is (10/20) * (10/19) = 0.263. The probability is not too small.
Add a description of the probability algorithm in strategy 2: Under such rules, make sure that the best girls are required to show up in the next 10 girls--or else you won't get the best--the probability is (10/20), and the second best girl is asked to appear in the top 10, the probability is ( 10/19)--Why is (10/19)? Because in addition to the best, the number of 19 left, the second best girl in the top 10 probability is (10/19)-so that you will be the best girl.
But is the probability of getting the best girl in Strategy 2 really 0.263? Maybe not, because this is just the second best girl to happen in the first 10 cases; in fact, even if the second best girl does not appear in the previous 10, but as long as the highest quality of all the girls before the appearance of the top 10, then strategy 2 can also ensure that the best girls (this is to be figured out, Otherwise it's hard to understand what's next). That is, the probability that strategy 2 gets the best girl is actually more than 0.263 (in fact we will find this probability to be 0.3594 in the back.) Wow! This is indeed a very small probability.)
But is there a better way to do it? Or we can ask, is it best to give up the 10 girls that first appeared? If not, then you should give up a few girls who first appear?
In fact, we do have a better strategy (you should first understand the previous content, if you do not understand, the following may be more difficult to read). Since the quality of the 20 girls of different quality in your life is random, there is no rule, then the first K girl is just the best girl probability is 1/20, and just the best girl to choose the probability of how much? The consideration should be: since given the first K girls of the best quality, and we decided to give up the first n-1 girls, from the nth start to implement the rules of strategy 2, then must be asked in the girls before K must appear the highest quality of the first n-1 girls, so as to ensure that K is selected, The probability is (n-1)/(k-1). Thus the K-girl is just the best girl and the probability of being selected is (1/20) [(n-1)/(k-1)]. Here, the value range of K should obviously be an integer in [n,20]. So, the probability of giving up n-1 a girl and certainly getting the cutest girl is actually (1/20) [(n-1)/(n-1)]+ (1/20) [(n-1)/(n)]+ (1/20) [(n-1)/(n+1)]+...+ (1/20) [(n-1)/( 20-1)]. This probability can be calculated using Mathematica software, or it can be computed in Excel, and the reader will find that when n=8, the probability has a maximum value of 0.3842. That is, if we give up the first 7 girls, look first, there is a spectrum, and then just see the best girls than the first 7 girls are better girls, then we immediately choose to accept. The probability that the accepted girl belongs to the best girl is 0.3842. This is better than our strategy of abandoning 10 girls (n*=11), according to strategy 2 the probability of getting the best girl is 0.3594 according to the above formula.
We use Mathematica software to plot the probability graph of getting the best girls (the longitudinal axis is the probability, the horizontal axis represents the beginning of the first few seriously consider acceptance. The maximum probability appears in the n*=8, that is, to abandon the first 7, starting from the 8th seriously consider accepting.


According to this result,
  
We can conclude that if a person is certain that the marriage is between 20-30 years of age and the 20 girls are distributed on an average of two a year, then you should begin to seriously consider marriage at the age of 24.
This example can also be arbitrarily changed data after the same method to solve. For example, if it is 30 girls, then you should start from the 11th girl to seriously consider marriage.

"Reprint" The Best girl probability model

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.