Guest Posted March 16, 2011 Report Share Posted March 16, 2011 Dear all, I encountered a difficult probability problem, and we know you are smart. Asking for your help to solve it. The question is simple, choose three length a, b, c independently from uniform [0,1] distribution. what is probability to create a triangle from a,b,c? Thanks in advance Quote Link to comment Share on other sites More sharing options...
0 curr3nt Posted March 16, 2011 Report Share Posted March 16, 2011 but it would seem that given any a or b from 0 to 1 (0 can be excluded since it wouldn't be a length?) what is the probability that abs(a-b) < c < a+b with c not exceeding 1 Quote Link to comment Share on other sites More sharing options...
0 Guest Posted March 16, 2011 Report Share Posted March 16, 2011 Dear all, I encountered a difficult probability problem, and we know you are smart. Asking for your help to solve it. The question is simple, choose three length a, b, c independently from uniform [0,1] distribution. what is probability to create a triangle from a,b,c? Thanks in advance i am assuming that what u mean by uniform [0,1] distribution is the set {0,1}, and not the actual uniform distribution which is a continuous line between 0 and one, because if it is, then there are infinite number of points between 0 and 1, and hence, infinite candidates for a, b, and c that make a triangle, and infinite candidates that dont make a triangle. making that assumption, the only way to get a triangle is if all 3 lengths, a, b, and c get the value 1. therefore, the probability of having a triangle is: the (probability of a getting 1) x (the probability of b getting 1) x (the probability of c getting 1) which is: 1/2 x 1/2 x 1/2 = 0.125 or 12.5% Quote Link to comment Share on other sites More sharing options...
0 Guest Posted March 16, 2011 Report Share Posted March 16, 2011 Assuming that the values for a, b, c are continuous (rather than discrete) non-negative Real Numbers, then the condition to form a triangle with possible measures a, b, c consists in: a <> 0 b <> 0 c <> 0 That's because a triangle's side (any side) must be > 0. Thus, the probability is as follows: P(a<>0)*P(b<>0)*P(c<>0) In continuous values, the probability to hit an exact number is zero. P(x=0)=0 Therefore, the probability of hitting a number NOT zero is: P(x<>0)=1-P(x=0) P(x<>0)=1-0 P(x<>0)=1 Hence, the pobability of forming a triangle, given 3 random numbers (non-negative Real Numbers) is as follows: P(a<>0)*P(b<>0)*P(c<>0) =1*1*1 =1 Am I missing somethin'? Quote Link to comment Share on other sites More sharing options...
0 Guest Posted March 16, 2011 Report Share Posted March 16, 2011 but it would seem that given any a or b from 0 to 1 (0 can be excluded since it wouldn't be a length?) what is the probability that abs(a-b) < c < a+b with c not exceeding 1 U is uniform on [0,1]. it is continuos. Quote Link to comment Share on other sites More sharing options...
0 Guest Posted March 16, 2011 Report Share Posted March 16, 2011 i am assuming that what u mean by uniform [0,1] distribution is the set {0,1}, and not the actual uniform distribution which is a continuous line between 0 and one, because if it is, then there are infinite number of points between 0 and 1, and hence, infinite candidates for a, b, and c that make a triangle, and infinite candidates that dont make a triangle. making that assumption, the only way to get a triangle is if all 3 lengths, a, b, and c get the value 1. therefore, the probability of having a triangle is: the (probability of a getting 1) x (the probability of b getting 1) x (the probability of c getting 1) which is: 1/2 x 1/2 x 1/2 = 0.125 or 12.5% I think a,b,c must match some condition to form a triangle. like a + b > c, a + c > b etc... Quote Link to comment Share on other sites More sharing options...
0 Guest Posted March 16, 2011 Report Share Posted March 16, 2011 I don't know. It need consideration. Dear all, I encountered a difficult probability problem, and we know you are smart. Asking for your help to solve it. The question is simple, choose three length a, b, c independently from uniform [0,1] distribution. what is probability to create a triangle from a,b,c? Thanks in advance Quote Link to comment Share on other sites More sharing options...
0 EventHorizon Posted March 16, 2011 Report Share Posted March 16, 2011 The answer is 1/2. Change the problem from choosing 3 points to choosing a point in a unit cube. This changes the problem to finding the volume of the space that satisfies the conditions that no 1 value is greater than the sum of the other two. I drew up a couple 2d slices (keeping c a constant) to help visualize the area, and came up with an equation for the area that can produce a triangle in a given slice. A(c=x) = 1 (the whole square) - x2/2 (if a+b<c) - (1-x)2/2 (if a+c<b) - (1-x)2/2 (if b+c<a) A(c=x) = 1 - x2/2 - (1-x)2 A(c=x) = 1 - x2/2 - 1 + 2x - x2 A(c=x) = 2x-(3/2)x2 Now I simply need to integrate from 0 to 1 The equation integrates to x2-.5x3, and plugging in 1 gives 1/2 and 0 gives 0, so the definite integral = 1/2. Quote Link to comment Share on other sites More sharing options...
0 Guest Posted March 16, 2011 Report Share Posted March 16, 2011 I don't know. It need consideration. Thanks for your thinking. Your point is very helpful. But maybe you missed something. 1st. there is other condition needed to let a,b,c create triangle. abs(a-b) < c, abs(a-c)<b,abs(b-c) < a 2nd, you cut off corner (a+b < c) and (b+c <c). the two section intersect some part. Quote Link to comment Share on other sites More sharing options...
0 EventHorizon Posted March 16, 2011 Report Share Posted March 16, 2011 Thanks for your thinking. Your point is very helpful. But maybe you missed something. 1st. there is other condition needed to let a,b,c create triangle. abs(a-b) < c, abs(a-c)<b,abs(b-c) < a 2nd, you cut off corner (a+b < c) and (b+c <c). the two section intersect some part. 1. look at abs(a-b) < c assume that a>b. The absolute value doesn't change anything, so it is a-b < c. Move b to the rhs, a < b+c. I covered this case by cutting the corner piece "b+c < a". assume that b>a. The absolute value negates it so it is b-a < c. Move a to the rhs, b < c+a. I covered this case by cutting the corner piece "a+c < b". With each of the other equations you give, they also break down into one of the three corners I cut. 2. The three areas I removed correspond to when a given length is the longest (b+c<a means a is longest, etc). No two of those equations can be valid simultaneously due to there being a definite longest length if one is true. Perhaps this picture will help 3ltri.bmp Quote Link to comment Share on other sites More sharing options...
0 Guest Posted March 17, 2011 Report Share Posted March 17, 2011 1. look at abs(a-b) < c assume that a>b. The absolute value doesn't change anything, so it is a-b < c. Move b to the rhs, a < b+c. I covered this case by cutting the corner piece "b+c < a". assume that b>a. The absolute value negates it so it is b-a < c. Move a to the rhs, b < c+a. I covered this case by cutting the corner piece "a+c < b". With each of the other equations you give, they also break down into one of the three corners I cut. 2. The three areas I removed correspond to when a given length is the longest (b+c<a means a is longest, etc). No two of those equations can be valid simultaneously due to there being a definite longest length if one is true. Perhaps this picture will help 3ltri.bmp Thanks for detailed plot. You are right... Thanks a lot Quote Link to comment Share on other sites More sharing options...
0 EventHorizon Posted March 17, 2011 Report Share Posted March 17, 2011 (edited) Thanks for posting. It was an interesting puzzle. (... but hopefully it wasn't homework ) Edited March 17, 2011 by EventHorizon Quote Link to comment Share on other sites More sharing options...
0 Guest Posted March 17, 2011 Report Share Posted March 17, 2011 I've got 1/2. Let's assume that a > b just for now. Given two lengths a and b, you can adjust the angle between a and b to fit the third length c. The angle is between 0, then c = a - b, and PI, then c = a + b, unless a + b > 1, in which case, c is just capped at 1 by definition (the angle can not go up to PI). This simply means that you can get the probability by integrating a, b, c over the intervals a in [0,1], b in [0,a] and c[ (a-b), max(1, a+b)]. It becomes a bit tricky (and tedious) but the max can be removed if you split the integral in 3 integrals. The first one goes over the domain: a in [0,1/2], b in [0,a] and c[ (a-b), (a+b)] (a < 1/2 and b <a so a + b <1) The second one goes over the domain: a in [1/2,1], b in [0,1-a] and c[ (a-b), (a+b)] (here again a + b <1), and The third one goes over the domain: a in [1/2,1], b in [1-a,a] and c[ (a-b), 1] (here the case a +b >1 is hit) The sum of those 3 integrals give 1/4. Now we only considered the case a >b. The case a <b gives the same results by simple symmetry (a and b are interchangeable), so the overall probability is 1/4 + 1/ 4 = 1/2 Quote Link to comment Share on other sites More sharing options...
0 Guest Posted March 17, 2011 Report Share Posted March 17, 2011 3/5 ? consider: as long as the two shortest sides total a length slightly longer than the longest side, a triangle can be made, so the probability would just be the probability that 2 random numbers sum more than a third random number. Quote Link to comment Share on other sites More sharing options...
0 Guest Posted March 17, 2011 Report Share Posted March 17, 2011 Thanks for posting. It was an interesting puzzle. (... but hopefully it wasn't homework ) It is a interview question. hehe Quote Link to comment Share on other sites More sharing options...
0 Guest Posted March 17, 2011 Report Share Posted March 17, 2011 eventhorizon solved it. Quote Link to comment Share on other sites More sharing options...
Question
Guest
Dear all,
I encountered a difficult probability problem, and we know you are smart. Asking for your help to solve it.
The question is simple,
choose three length a, b, c independently from uniform [0,1] distribution. what is probability to create a triangle from a,b,c?
Thanks in advance
Link to comment
Share on other sites
15 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.