Page 1 of 1
another stick problem
Posted: May 13th, 2009, 10:55 pm
by emmy
This question is from an interview, and I don't know the answer. There is a stick with the length of 1. Break it into two pieces randomly. Take the longer piece and break it into two pieces further. What is the probability that the longer piece (after the 2nd break) has a length greater than 3/5?
another stick problem
Posted: May 14th, 2009, 12:46 am
by alexrem
Call a break good if after the 2 breaks the longer piece has length greater than 3/5.Let the length of the smaller stick after the first break be x. Firstly, x<=1/2 (as it is the shorter piece).For each value of x in range 0 to 1/2 let f(x) be probability that when the piece 1-x is broken in 2 parts, the longer part has length greater than 3/5.Then would be the desired probability.Now, if x>=2/5 then the longer piece after 2nd break is for sure not greater than 3/5 so f(x) = 0 for 2/5<=x<=1/2.If x<2/5, then let y be length of shorter piece after second break. Because second break was performed on stick of length 1-x, then y<=(1-x)/2. Now, we want x+y<2/5 for the break to be good. Therefore y<2/5 -x. Then for the fixed x, the probability that when the piece 1-x is broken in 2 parts, the longer part has length greater than 3/5 is:f(x) = (2/5-x)/((1-x)/2).So the required probability is:
another stick problem
Posted: May 14th, 2009, 8:17 am
by quantyst
QuoteOriginally posted by: emmyThis question is from an interview, and I don't know the answer. There is a stick with the length of 1. Break it into two pieces randomly. Take the longer piece and break it into two pieces further. What is the probability that the longer piece (after the 2nd break) has a length greater than 3/5?Solution:Let X~u[0,1].Let Y=max(X, 1-X).Let Z~u[0,Y].Let W=max(Z, 1-Z).We need to find P=P{W>(3/5)}.We will condition P on X:P=P{W>(3/5)}=int(P{W>(3/5) | X=x}dx [0,1]).Now we will expand the above integration over the three subintervals (0,2/5), (2/5.3/5), (3/5,1):P=A+B+C, whereA= int(P{W>(3/5) | X=x}dx [0,2/5]) ,B=int(P{W>(3/5) | X=x}dx [2/5, 3/5]),C= int(P{W>(3/5) | X=x}dx [3/5,1]).For X in (2/5,3/5), Y is less than 3/5; hence both Z and (1-Z) are less than 3/5; so W=max(Z, 1-Z)<3/5; hence B=0.Now for C:For X in (3/5,1), Y=X>3/5; so {W>3/5} is equivalent to {Z>3/5 or Y-Z=X-Z>3/5}; or {Z>3/5 or Z<X-3/5}. So P{W>3/5}=P{Z>3/5 or Z<X-3/5}=P{Z>3/5}+P{ Z<X-3/5}={1-(3/5)/X}+{(X-3/5)/X}=2(1-(3/5)/X). ThusC= int(P{W>(3/5) | X=x}dx [3/5,1])= int(2(1-(3/5)/x)dx [3/5,1])=(2/5){2+3log(3/5)}.In a similar fashion we can compute A. It turns out that A=C.Thus P=(4/5) {2+3log(3/5)}, which is approximately equal to 0.3740185.
another stick problem
Posted: May 14th, 2009, 2:52 pm
by emmy
quantyst and alexrem,thanks for the answer.
another stick problem
Posted: May 20th, 2009, 3:30 pm
by ynotredrum
Hi quantyst,How do you get the 2 in: int(2(1-(3/5)/x)dx [3/5,1])?Thanks!
another stick problem
Posted: May 20th, 2009, 4:31 pm
by quantyst
QuoteOriginally posted by: ynotredrumHi quantyst,How do you get the 2 in: int(2(1-(3/5)/x)dx [3/5,1])?Thanks!Look at the previous line:QuoteFor X in (3/5,1), Y=X>3/5; so {W>3/5} is equivalent to {Z>3/5 or Y-Z=X-Z>3/5}; or {Z>3/5 or Z<X-3/5}. SoP{W>3/5}=P{Z>3/5 or Z<X-3/5}=P{Z>3/5}+P{ Z<X-3/5}={1-(3/5)/X}+{(X-3/5)/X}=2(1-(3/5)/X). ThusC= int(P{W>(3/5) | X=x}dx [3/5,1])= int(2(1-(3/5)/x)dx [3/5,1])=(2/5){2+3log(3/5)}.
another stick problem
Posted: May 20th, 2009, 5:26 pm
by ynotredrum
Sorry - I mistakenly misread the previous line. Thanks