5
$\begingroup$

Given a stick and break it randomly at two places, what is the probability that you can form a triangle from the pieces?

Here is my attempt and the answer does not match, so I am confused what went wrong with this argument.

I first denote the two randomly chosen positions by $X$ and $Y$, and let $A=\max(X,Y)$, $B=\min(X,Y)$. We are interested in the probability of the event $\{A>\frac{1}{2}, B>A-\frac{1}{2}\}$. Thus, we want the joint distribution of $A$ and $B$. To compute that, I computed $$F_{A,B}(w,z)=\mathbb{P}(A\leq w, B\leq z)=\mathbb{P}(A\leq w)-\mathbb{P}(A\leq w, B>z)=\mathbb{P}(X\leq w,Y\leq w)-\mathbb{P}(X\leq w, Y\leq w, X>z, Y>z)$$ Therefore, we have if $z\leq w$ $$F_{A,B}(w,z)=w^2-(w-z)^2$$ otherwise $$F_{A,B}(w,z)=w^2$$ Then the joint density of $A$ and $B$ is $$f_{A,B}(w,z)=\frac{\partial^2 F}{\partial w\partial z}(w,z)=2$$ if $z\leq w$ and $0$ otherwise.
Finally $$\mathbb{P}(A>\frac{1}{2},B>A-\frac{1}{2})=\int_{\frac{1}{2}}^1\int_{w-\frac{1}{2}}^w2dzdw=\frac{1}{2}$$ The answer is $\frac{1}{4}$ instead, but I can't figure out what went wrong with this argument.

$\endgroup$
5
  • $\begingroup$ Several answers here $\endgroup$
    – BruceET
    Aug 27, 2020 at 23:11
  • 1
    $\begingroup$ I am aware of other solutions. My confusion is what is wrong with the argument above. $\endgroup$ Aug 27, 2020 at 23:21
  • $\begingroup$ I checked. I believe if you will look at answers in my link, you may find a corrected version of your method. About the middle one of several. This is sort of a classic problem. // Hope you won't mind if I add one more answer using simulation. $\endgroup$
    – BruceET
    Aug 27, 2020 at 23:38
  • $\begingroup$ I looked at all of those solutions and I really don't think any of the solutions takes the same approach as the argument here. $\endgroup$ Aug 28, 2020 at 0:48
  • $\begingroup$ I had thought (perhaps incorrectly) that your approach might simplify to: "More analytical option; Without loss of generality assume that i) the stick is the $[0,1]$ interval, ii) and the first breaking point $x$ is chosen uniformly randomly in $[0,0.5]$. Now for each $x$ the next point $y$ should be in $[0.5,x+0.5]$ to guarantee the triangle. The probability of such choice is $x$. Then one can apply Bayes with $f(x)=2$ and $f(y|x)=x$: $ \Pr\{\text{Triangle Making} \}=\int_0^{0.5} {2}{x}dx=\frac{1}{4}." $ Sorry if this is not helpful. $\endgroup$
    – BruceET
    Aug 28, 2020 at 1:36

3 Answers 3

2
$\begingroup$

The lengths of the sides of the stick will be $1-A, A-B$, and $B$. For the stick to form a valid triangle, the following three conditions must hold by the triangle inequality:

$$\begin{align*} 1-A + A-B>B \to B&<\frac{1}{2} \\ 1-A + B>A-B \to B&>A-\frac{1}{2} \\ A-B+B > 1-A \to A&>\frac{1}{2} \end{align*}$$

You did not include the first condition, $B<1/2$, which threw off your answer. Other than this, everything else was solved correctly; your answer would have been correct if only the second and third conditions were needed.

$\endgroup$
3
  • $\begingroup$ oh that's right! I missed that... Thanks so much! $\endgroup$ Aug 28, 2020 at 0:53
  • $\begingroup$ No problem - glad I was able to help! $\endgroup$ Aug 28, 2020 at 0:54
  • 1
    $\begingroup$ @Xiaohuolong If you felt this answered your question best, you can mark this as the accepted answer. This will give me some reputation and lets others know that your question has been solved. $\endgroup$ Aug 28, 2020 at 0:58
1
$\begingroup$

Here is my view of this problem, not a debug of your procedure(sorry)

Actually I figure this 'forming triangle' problem by 'forming triangles'.

enter image description here

Following your definition of X,Y, the joint choice of X,Y are uniform in the unit cell (density 1). The task remained is to find the cutting position of X and Y such that resulting 3 segments can form a triangle.

Consider case when Y > X (so three segments length are X, Y-X, 1-Y). Inserting the fact that sum of any two sides is greater than the third. The constraints are: $X + (Y-X) > 1- Y , X + (1-Y) > Y-X$ and $Y-X + 1-Y > X$, resulting in $Y>0.5, X > Y - 0.5$ and $X < 0.5$, which the boundary of Area A1 in my figure. With similar argument, you can sketch Area A2.

The geometric area of A1 and A2 are 1/8 respectively, sum these two, that is how I get 1/4.

$\endgroup$
1
  • $\begingroup$ Nicely explained (+1). Similar to one of the approaches in my link above. $\endgroup$
    – BruceET
    Aug 27, 2020 at 23:55
0
$\begingroup$

The following simulation in R looks at a million such randomly broken sticks, finds the lengths of the three pieces, and finally finds the length of the longest piece. If the longest has length less than half, you can make a triangle. Answer: $0.250\pm 0.001.$

set.seed(2020)
mx = replicate(10^6, max(diff(c(0, sort(runif(2)), 1))))
mean(mx < .5)
[1] 0.250222       # aprx 1/4
2*sd(mx < .5)/1000
[1] 0.000866282    # aprx 95% marg of sim error

Note: A related but different problem breaks the stick once uniformly at random and then breaks the longer piece uniformly at random.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.