Probability of forming a triangle

In summary: 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 = .
  • #1
MarkFL
Gold Member
MHB
13,288
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
  • #2
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!)​
 
  • #3
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:
  • #4
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)
 
  • #5
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$
 
  • #6
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:
  • #7
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$$
 
  • #8
I must be missing something, because I thought you could always make a triangle out of any three lengths...
 
  • #9
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:

\(\displaystyle 0<x<1\)

\(\displaystyle 0<y<1\)

\(\displaystyle 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:

\(\displaystyle x=0\)

\(\displaystyle y=0\)

\(\displaystyle x+y=1\)

which is a right isosceles triangle of area \(\displaystyle 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:

\(\displaystyle 0<x<\frac{1}{2}\)

\(\displaystyle 0<y<\frac{1}{2}\)

\(\displaystyle 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:

\(\displaystyle x=\frac{1}{2}\)

\(\displaystyle y=\frac{1}{2}\)

\(\displaystyle x+y=\frac{1}{2}\)

which is a right isosceles triangle of area \(\displaystyle 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:

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

Attachments

  • trirod1.jpg
    trirod1.jpg
    8.2 KB · Views: 54
  • trirod2.jpg
    trirod2.jpg
    9.5 KB · Views: 49
  • #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$$
 

FAQ: Probability of forming a triangle

What is the probability of forming a triangle with randomly chosen side lengths?

The probability of forming a triangle with randomly chosen side lengths is dependent on the range of possible side lengths and the criteria for forming a triangle. For example, if the side lengths must be positive integers and the longest side must be less than the sum of the other two sides, the probability would be different than if the side lengths could be any real number and the triangle inequality was the only criteria.

How does the number of sides in a polygon affect the probability of forming a triangle?

The number of sides in a polygon does not directly affect the probability of forming a triangle. However, a polygon with a greater number of sides would have a greater number of possible combinations of side lengths, which could impact the probability of forming a triangle with randomly chosen side lengths.

Is it possible to calculate the exact probability of forming a triangle?

The exact probability of forming a triangle with randomly chosen side lengths is dependent on the specific criteria for forming a triangle. In some cases, it may be possible to calculate the exact probability using mathematical principles such as combinatorics and geometry. In other cases, it may be more practical to estimate the probability using simulations or experiments.

How does the shape of a triangle affect its probability of formation?

The shape of a triangle does not directly affect its probability of formation. However, certain shapes may have specific criteria for forming a triangle (e.g. equilateral triangles must have three equal sides), which would impact the probability of randomly choosing side lengths that meet those criteria.

Are there any real-world applications of the probability of forming a triangle?

Yes, the probability of forming a triangle has many real-world applications, particularly in fields such as engineering, architecture, and statistics. For example, it can be used to calculate the likelihood of a bridge collapsing due to insufficient support, or to determine the probability of a survey respondent choosing a particular response option when given three choices.

Similar threads

Replies
1
Views
925
Replies
1
Views
986
Replies
3
Views
1K
Replies
1
Views
992
Replies
3
Views
2K
Back
Top