China Naming Network - Baby naming - Kindergarten lottery algorithm
Kindergarten lottery algorithm
The probability of the first person being drawn is 1/6.
The second person was selected on the premise that the first person didn't win, so the probability is (1-1/6) *1/6 = 5/36.
The third person was drawn, that is, the first two people didn't win, that is, (1-kloc-0//6) * (1-5/36) *1/6 =155/125.
The probability of the fourth person being drawn is (1-1/6) * (1-5/36) * (1-155/1296) */kloc-.
The fifth person is (1-1/6) * (1-5/36) * (1-155/1296) * (/kloc-0)
The sixth person is (1-1/6) * (1-5/36) * (1-155/1296) * (/kloc-0)
A has the highest probability of being drawn.
上篇: Want to know how to make such a historical query interface with java swing? 下篇: My eight characters, please help me to comment, how to arrange the natural case, personal character, geographical case, general case and external case of names? Is the algorithm of three characters the same as that of two characters?