- 2020-08-18 07:03
*views 2*- Basic data structure and algorithm

1, There is an apple , Two people tossed a coin to decide who would eat the apple , Throw it first and eat it . What's the probability of throwing the apple first ?

It seems that the answer is 1/2, But that's not the case when you think about it carefully !

Give all coin toss operations from 1 Start numbering , Obviously, the first mover can only be in the odd number （1,3,5,7…） Toss a coin to get an apple , And the back hand can only be in the even number of times （2,4,6,8…） Toss a coin to get an apple . Suppose that the probability of the first to get the apple is p, The first 1 The probability of getting an apple by tossing a coin is p=1/2, In the 3 second （3,5,7…） The probability of getting an apple in the future is p/4【 This is because this is only in the 1 Times and times 2 The coin was not tossed to the front （ The probability is 1/4=1/2*1/2） Only when it's possible , And now the pioneers are facing the same situation as they started 】; So you can list the equations p=1/2+p/4,p=2/3（ be careful p Represents the probability that the first mover gets the apple ）.

2, A length of l Line segment of , Randomly select them 2 Points , Divide segments into 3 paragraph , Ask this 3 What is the probability that the sub segment can form a triangle ?

Let two randomly selected numbers be x,y, And order y>x, The length is 1 The length of the three segments is x, y-x

,1-y, According to the theorem that the sum of the two sides of a triangle is greater than the third side and the difference between the two sides is less than the third side , You can list equations

y>1-y x<1-x x+(1-y)>y-x

Namely x<1/2 y>1/2 y>x+1/2

The probability can be calculated as 1/8

3, A deck of cards 54 Zhang , Now divided into 3 Equal copies 18 Zhang , What's the probability that big and small Wang appear in the same share ?

54 Card split 3 equal division , share M=(C54 take 18)*(C36 take 18)*(C18 take 18) Seed division method .

Among them, the division of king and king in the same share is as follows N=(C3 take 1)*(C52 take 16)*(C36 take 18)*(C18 take 18) species .

Therefore, the calculated probability is P=N /M=17/53.

Technology

Daily Recommendation

views 26

©2019-2020 Toolsou All rights reserved,

Forbes China Auto rich list ： He xiaopengdi 11 Li Xiangdi 14 Li Bindi 15 Change one's mind ! Tesla starts to deliver made in China to European market Model 3 The difference between memory overflow and memory leak , Causes and Solutions Character recognition technology of vehicle license plate based on Neural Network Vue Transfer parameters and receiving of page Jump SparkSQL Achieve partition overlay write 1190 Reverses the substring between each pair of parentheses leetcode Note 14 ： The second biggest obstacle to motivating others in R & D management Chrome OS, For programmers and Windows What does it mean ? Internet Marketing JAVA Convert a string to a numeric type