2012-02-12 wcdj
Problem description:
A dice has 6 sides with even probability. I have 7 things to choose randomly and evenly. How can I continue to throw at least?
Problem Extension: If I have four things, five things, eight things, nine things, ten things ...... How can I use n cases?Minimum throwing timesTo achieveUniform Distribution?
From:
The problem comes from
Ideas:
Note the keywords in the problem: (1) least throwing times (2) requires even Probability Distribution
Let's describe the problem in an easy-to-understand way: we decided to have a dinner on the weekend. At this time, there were 6 alternative hotels for us to choose, in order to be fair, you can randomly select a restaurant by throwing a dice.
However, if there are seven alternative hotels at this time, we also need to be fair. How can we choose which hotel to go with six dice?
Method:
If you throw a dice twice, you can get a number in the range [7, 42] (in hexadecimal notation). Assume that the number of throws is expressed as m, and if M = 7, it is discarded, otherwise, the number obtained by M mod 7 is the final result.
When PS: M = 7, it will increase the probability of 0, so we should discard it.
In another way, you can throw the dice twice to obtain a number in the range [7, 42]. In this case, 36 random numbers are obtained, corresponding to the range [1, 36]. Therefore, assume that the number of throws is m, and if M = 36, discard. Otherwise, the number obtained by M mod 7 is the final result. Similarly, when M = 36, it will increase the probability of 1, so we should discard it.
Conclusion:
(1) The concept of flexible use of N-base, although the life of more than 10-base. This question uses a 6-in-6 idea, that is, result = y * 6 + X. In this example, X indicates the number of points thrown for the first time, and y indicates the number of points thrown for the second time.
(2) The sum method does not satisfy the even probability distribution. The result of the sum is a normal distribution. The probability of the intermediate value is the highest, and the probability of the maximum and minimum values is the lowest.