- 2020-08-18 07:03
*views 3*- 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

- Java392 articles
- Python205 articles
- Linux110 articles
- Vue97 articles
- MySQL83 articles
- SpringBoot70 articles
- javascript65 articles
- Spring62 articles
- more...

Daily Recommendation

views 2

©2019-2020 Toolsou All rights reserved,

The 11th Blue Bridge Cup python The real topic of the University Group National Games JavaSwing To achieve a simple Lianliankan games 【Spring Source code analysis 】42-@Conditional Detailed explanation element-ui Step on pit record 2019PHP Interview questions （ Continuously updated ）PHPJava Misunderstanding —— Method overloading is a manifestation of polymorphism ? First issue 500 100 million , Set up a new Department , What is Tencent going to do ? Google chrome The browser can't open the web page , But what if other browsers can open it ? Regression of dependent variable order categories （R language ）【Golang Basic series 10 】Go language On conditional sentences if