MHB Probability of forming a triangle

Click For Summary
SUMMARY

The probability of forming a triangle from three segments cut from a rod of length $\ell$ is calculated to be $\frac{1}{4}$. This result is derived by considering the cuts at points $x$ and $y$, which are independently and uniformly distributed in the interval $[0,1]$. The condition that the maximum segment length must be at least $\frac{1}{2}$ leads to the integration of the probability density function, resulting in the final probability of triangle formation. The calculations confirm that the triangle inequality is satisfied under these conditions.

PREREQUISITES
  • Understanding of probability density functions (PDFs)
  • Familiarity with the triangle inequality theorem
  • Basic calculus, specifically integration techniques
  • Knowledge of uniform distributions
NEXT STEPS
  • Study the derivation of the probability density function for the maximum of independent uniform random variables.
  • Explore the implications of the triangle inequality in geometric probability.
  • Learn advanced integration techniques for calculating probabilities in continuous distributions.
  • Investigate other geometric probability problems involving random segments or lengths.
USEFUL FOR

Mathematicians, statisticians, and students studying probability theory, particularly those interested in geometric probability and integration techniques.

MarkFL
Gold Member
MHB
Messages
13,284
Reaction score
12
You have a thin rod of length $\ell$ and you cut it randomly into three pieces. Calculate the probability that the three pieces can form a triangle.
 
Mathematics news on Phys.org
MarkFL said:
You have a thin rod of length $\ell$ and you cut it randomly into three pieces. Calculate the probability that the three pieces can form a triangle.
This sort of probability is a bit outside my usual comfort zone, but I'll have a go at it.

The length $\ell$ is immaterial, so I'll assume $\ell=1$.

rod.png

Suppose that the cuts occur at $y$ and $x$, with $x,\,y$ independently uniformly distributed in $[0,1]$ and $x$ denoting the larger of them. We must have $x\geqslant1/2$ if the three segments are to form a triangle (because none of the sides can be greater than $1/2$). So one side on the triangle has length $1-x$. The difference between the other two sides must be at most $1-x$, and so $y$ must lie in the interval $\bigl[x-\tfrac12,\tfrac12\bigr]$, of length $1-x$ (see the picture). The probability of that happening (for a given $x$) is $\frac{1-x}x$. However, the probability distribution of $x$ (as the maximum of the two cut points) is not uniform, but has p.d.f. $2x$. So the overall probability of the three segments forming a triangle is $$\int_{1/2}^1 \frac{1-x}x\,2x\,dx = \Bigl[2x-x^2\Bigr]_{1/2}^1 = 1-\frac34 = \frac14.$$

(I hope that's right!)​
 
MarkFL said:
You have a thin rod of length $\ell$ and you cut it randomly into three pieces. Calculate the probability that the three pieces can form a triangle.

Clearly we can suppose without loss of generality that $\ell=1$. Setting $x_{1}$, $x_{2}$ and $x_{3}$ the length ot the three segments, the requested probability is the probability that none of the lengths of the segments is greater that $\frac{1}{2}$, i.e. ... $$P = \int_{0}^{\frac{1}{2}} \int_{\frac{1}{2}- x_{1}}^{\frac{1}{2}} \frac{1}{1-x_{1}}\ d x_{2}\ d x_{1} = \frac{1}{2}\ \int_{0}^{\frac{1}{2}} \frac{x_{1}}{1 - x_{1}}\ d x_{1} = |- x_{1} - \ln (1-x_{1})|_{0}^{\frac{1}{2}} = - \frac{1}{2} + \ln 2 = .19314718...$$ Kind regards $\chi$ $\sigma$
 
Last edited:
Opalg said:
This sort of probability is a bit outside my usual comfort zone, but I'll have a go at it.

The length $\ell$ is immaterial, so I'll assume $\ell=1$.

rod.png

Suppose that the cuts occur at $y$ and $x$, with $x,\,y$ independently uniformly distributed in $[0,1]$ and $x$ denoting the larger of them. We must have $x\geqslant1/2$ if the three segments are to form a triangle (because none of the sides can be greater than $1/2$). So one side on the triangle has length $1-x$. The difference between the other two sides must be at most $1-x$, and so $y$ must lie in the interval $\bigl[x-\tfrac12,\tfrac12\bigr]$, of length $1-x$ (see the picture). The probability of that happening (for a given $x$) is $\frac{1-x}x$. However, the probability distribution of $x$ (as the maximum of the two cut points) is not uniform, but has p.d.f. $2x$. So the overall probability of the three segments forming a triangle is $$\int_{1/2}^1 \frac{1-x}x\,2x\,dx = \Bigl[2x-x^2\Bigr]_{1/2}^1 = 1-\frac34 = \frac14.$$

(I hope that's right!)​

(Clapping) Your result is correct, but I have used a pre-calculus method to solve the problem which I will post within 24 hours, to give a few others a chance to write a solution.

I appreciate seeing a more advanced technique! (Yes)
 
chisigma said:
Clearly we can suppose without loss of generality that $\ell=1$. Setting $x_{1}$, $x_{2}$ and $x_{3}$ the length ot the three segments, the requested probability is the probability that none of the lengths of the segments is greater that $\frac{1}{2}$, i.e. ... $$P = \int_{0}^{\frac{1}{2}} \int_{\frac{1}{2}- x_{1}}^{\frac{1}{2}} \frac{1}{1-x_{1}}\ d x_{2}\ d x_{1} = \frac{1}{2}\ \int_{0}^{\frac{1}{2}} \frac{x_{1}}{1 - x_{1}}\ d x_{1} = |- x_{1} - \ln (1-x_{1})|_{0}^{\frac{1}{2}} = - \frac{1}{2} + \ln 2 = .19314718...$$ Kind regards $\chi$ $\sigma$

Because a different solution with different result has been proposed the 'mental construction' I followed has to be explained with the scope to identify my error... If $x_{1}$ is the first segment and we suppose it uniformely distributed in $[0,1]$, then $x_{2}$ is uniformely distributed in $[0,1 - x_{1}]$. The condition that $x_{1}$, $x_{2}$ and $x_{3}$ are the sides of the triangle means that none of them exceeds $\frac{1}{2}$ so that we are searching the probability that $\frac{1}{2} -x < x_{2} < \frac{1}{2}$ conditioned by the probability that $x_{1} = x < \frac{1}{2}$ ... Kind regards $\chi$ $\sigma$
 
chisigma said:
Because a different solution with different result has been proposed the 'mental construction' I followed has to be explained with the scope to identify my error... If $x_{1}$ is the first segment and we suppose it uniformely distributed in $[0,1]$, then $x_{2}$ is uniformely distributed in $[0,1 - x_{1}]$. The condition that $x_{1}$, $x_{2}$ and $x_{3}$ are the sides of the triangle means that none of them exceeds $\frac{1}{2}$ so that we are searching the probability that $\frac{1}{2} -x < x_{2} < \frac{1}{2}$ conditioned by the probability that $x_{1} = x < \frac{1}{2}$ ... Kind regards $\chi$ $\sigma$

My 'error' has been that, setting $\xi_{1}$ and $\xi_{2}$ the coordinates of the first and second selected point, I have considered only the case $\xi_{1}<\xi_{2}$ and the computed probability is...

$$P_{1} = - \frac{1}{2} + \ln 2\ (1)$$

Now if we consider also the case $\xi_{1}>\xi_{2}$ we compute the residual probability as...

$$P_{2} = \int_{\frac{1}{2}}^{1} \int_{x_{1}- \frac{1}{2}}^{\frac{1}{2}}\frac{1}{x_{1}}\ d x_{2}\ d x_{1} = \int_{\frac{1}{2}}^{1} \frac{1 - x_{1}}{x_{1}}\ d x_{1} = |\ln x_{1} - x_{1}|_{\frac{1}{2}}^{1} = \ln 2 - \frac{1}{2}\ (2)$$

... so that the final result is...

$$P=P_{1} + P_{2} = 2\ \ln 2 -1= .386294361...\ (3)$$

Kind regards

$\chi$ $\sigma$
 
Last edited:
chisigma said:
$$P = \int_{0}^{\frac{1}{2}} \int_{\frac{1}{2}- x_{1}}^{\frac{1}{2}} \frac{1}{1-x_{1}}\ d x_{2}\ d x_{1} = ... = - \frac{1}{2} + \ln 2 = .19314718...$$ Kind regards $\chi$ $\sigma$

You selected the same approach I did.

But shouldn't it be the following?
$$P = \frac {\text{sum favorable outcomes}}{\text{total sum possible outcomes}} = \frac {\displaystyle\int_{0}^{\frac{1}{2}} \int_{\frac{1}{2}- x_{1}}^{\frac{1}{2}} \ d x_{2}\ d x_{1}} {\displaystyle\int_{0}^{1} \int_{1- x_{1}}^{1} \ d x_{2}\ d x_{1}} = \frac 1 4$$
 
I must be missing something, because I thought you could always make a triangle out of any three lengths...
 
Prove It said:
I must be missing something, because I thought you could always make a triangle out of any three lengths...

Really?

--

--

----------------------------

Good luck :p

Specifically the triangle inequality puts a lower bound on the minimum total length required of the two smaller sides in order to form a triangle. If the larger side has length L, then the two other sides must sum to a length strictly more than L in order to form a triangle (less than L and no triangle is possible, equal to L and the best you can do is a degenerate triangle with three colinear vertices).

In Euclidean space, anyway.​
 
Last edited:
  • #10
Bacterius said:
Really?

--

--

----------------------------

Good luck :p

Specifically the triangle inequality puts a lower bound on the minimum total length required of the two smaller sides in order to form a triangle. If the larger side has length L, then the two other sides must sum to a length strictly more than L in order to form a triangle (less than L and no triangle is possible, equal to L and the best you can do is a degenerate triangle with three colinear vertices).

In Euclidean space, anyway.​

Yes, that's what I was missing. Serves me right for picturing triangles in my mind and manipulating them, rather than picturing different lengths haha.

- - - Updated - - -

Actually, I think I'm still right - you can form a triangle with any three lengths - it's just not guaranteed that the ends of your lengths will form the vertices :P
 
  • #11
I apologize for the confusion I created yesterday [:(] and I do hope to be able to return 'on the right way'... We call $x_{1}$ and $x_{2}$ the sequencially selected r.v., both uniformely distributed in [0,1]. Once we have selected $x_{1}$ we have two possibilities... a) may be that $x_{2} > x_{1}$ with probability $1-x_{1}$ and in this case the probability that none of the segments is greater than $\frac{1}{2}$ is... $$P_{a}= \frac{1}{2}\ \int_{0}^{\frac{1}{2}} \int_{x_{1}}^{x_{1} + \frac{1}{2}} d x_{2}\ d x_{1} = \frac{1}{8}\ (1)$$

b) may be that $x_{2} < x_{1}$ with probability $x_{1}$ and in this case the probability that none of the segments is greater than $\frac{1}{2}$ is... $$P_{b}= \frac{1}{2}\ \int_{\frac{1}{2}}^{1} \int_{x_{1} - \frac{1}{2}}^{x_{1}} d x_{2}\ d x_{1} = \frac{1}{8}\ (2)$$

Combining a) and b) we have...

$$P = P_{a} + P_{b} = \frac{1}{4}\ (3)$$Kind regards $\chi$ $\sigma$
 
  • #12
Like everyone else, I observed that without loss of generality, we may let the rod be of unit length.

Let $x$ be the length of the first piece, $y$ be the length of the second piece, then $1-(x + y)$ will be the length of the third. We know we must have:

$$0<x<1$$

$$0<y<1$$

$$0<1-(x + y)< 1$$

Graphing these 3 inequalities, we find that we may represent the total sample space $S$ by the area bounded by the lines:

$$ x=0$$

$$y=0$$

$$x+y=1$$

which is a right isosceles triangle of area $$A_S=\frac{1}{2}$$. Each point in $S$ represents a possible partitioning of the rod. This area is shaded in red:

View attachment 857

By the triangle inequality, we know all of the pieces must be less than 1/2 unit in length:

$$0<x<\frac{1}{2}$$

$$0<y<\frac{1}{2}$$

$$0<1-(x+y)<\frac{1}{2}$$

Graphing these 3 inequalities, we find that we may represent these conditions by the area $T$ bounded by the lines:

$$x=\frac{1}{2}$$

$$y=\frac{1}{2}$$

$$x+y=\frac{1}{2}$$

which is a right isosceles triangle of area $$A_T=\frac{1}{8}$$. Each point in $T$ represents a partitioning in which a triangle may be formed. This area is shaded in green:

View attachment 858

Thus, the probability in question is:

$$P(\text{triangle is possible})=\frac{A_T}{A_S}=\frac{1}{4}$$
 

Attachments

  • trirod1.jpg
    trirod1.jpg
    8.2 KB · Views: 82
  • trirod2.jpg
    trirod2.jpg
    9.5 KB · Views: 76
  • #13
I just came across this page, with two very clever solutions to the problem.
 
  • #14
Opalg said:
This sort of probability is a bit outside my usual comfort zone, but I'll have a go at it.

The length $\ell$ is immaterial, so I'll assume $\ell=1$.

rod.png

Suppose that the cuts occur at $y$ and $x$, with $x,\,y$ independently uniformly distributed in $[0,1]$ and $x$ denoting the larger of them. We must have $x\geqslant1/2$ if the three segments are to form a triangle (because none of the sides can be greater than $1/2$). So one side on the triangle has length $1-x$. The difference between the other two sides must be at most $1-x$, and so $y$ must lie in the interval $\bigl[x-\tfrac12,\tfrac12\bigr]$, of length $1-x$ (see the picture). The probability of that happening (for a given $x$) is $\frac{1-x}x$. However, the probability distribution of $x$ (as the maximum of the two cut points) is not uniform, but has p.d.f. $2x$. So the overall probability of the three segments forming a triangle is $$\int_{1/2}^1 \frac{1-x}x\,2x\,dx = \Bigl[2x-x^2\Bigr]_{1/2}^1 = 1-\frac34 = \frac14.$$

(I hope that's right!)​

can i ask why the pdf of x is 2x?
 
  • #15
bl00d said:
can i ask why the pdf of x is 2x?

The key here is that x is defined to be the maximum of the two cuts. Since we have two (probabilistically) independent cuts, each with a uniform pdf, their maximum will have a pdf of 2x.

For my own sake, I will try to put together (and post) a more formal argument for the above statement. It agrees with my intuition, but requires probing.
 
  • #16
TheBigBadBen said:
The key here is that x is defined to be the maximum of the two cuts. Since we have two (probabilistically) independent cuts, each with a uniform pdf, their maximum will have a pdf of 2x.

For my own sake, I will try to put together (and post) a more formal argument for the above statement. It agrees with my intuition, but requires probing.

thanks a lot :D I am new
 
  • #17
TheBigBadBen said:
The key here is that x is defined to be the maximum of the two cuts. Since we have two (probabilistically) independent cuts, each with a uniform pdf, their maximum will have a pdf of 2x.

For my own sake, I will try to put together (and post) a more formal argument for the above statement. It agrees with my intuition, but requires probing.

This comes from a neat little trick I picked up in probstats, which I'm glad I found useful enough to remember.

Suppose that u and v are taken to be two independent cuts, each with a uniform distribution. We then take the definitions $x:=max\{u,v\}$ and $y:=min\{u,v\}$. Now, I will state that for any $t\in[0,1]$, we have:
$$P(x\leq t) = P(u\leq t)\, P(v\leq t) = (t)(t) = t^2$$
Note that the above holds because u and v follow independent uniform distributions over $[0,1]$.

From there, by the definition of a probability distribution, we have
$$\int_0^t pdf_x(x)\,dx = t^2$$
Now for the clever bit: we differentiate both sides with respect to t, applying the fundamental theorem of calculus. Doing so gives us
$$pdf_x(t)=2t$$
as desired.
 
Last edited:
  • #18
bl00d said:
can i ask why the pdf of x is 2x?
The pdf for a uniformly distributed variable on the unit interval is the constant function $1$. The cumulative distribution function (cdf) is the integral of the pdf, namely the function $x$. The rule (which I don't know how to prove, not being a probabilist) is that for the maximum of two independent random variables, you multiply the cdf's. In this case, that gives you $x^2$ for the cdf of the max. You then differentiate the cdf to get the pdf, so that is where the $2x$ comes from.

Edit. Sorry, didn't see that TheBigBadBen had already answered this.
 
Last edited:
  • #19
Opalg said:
The rule (which I don't know how to prove, not being a probabilist) is that for the maximum of two independent random variables, you multiply the cdf's.

I probably can't pronounce myself a probabilist, but the following is probably true.

Suppose $Z=\max(X,Y)$ with independent $X$ and $Y$, then:
$$P(Z \le z)=P(X \le z \wedge Y \le z)=P(X \le z) P(Y \le z) \qquad \blacksquare$$
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 59 ·
2
Replies
59
Views
55K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 3 ·
Replies
3
Views
2K