This Riddler puzzle is about making triangles out of sticks! Here is the problem:

Here are four questions about finding sticks in the woods, breaking them, and making shapes:

- If you break a stick in two places at random, forming three pieces, what is the probability of being able to form a triangle with the pieces?
- If you select three sticks, each of random length (between 0 and 1), what is the probability of being able to form a triangle with them?
- If you break a stick in two places at random, what is the probability of being able to form an acute triangle — where each angle is less than 90 degrees — with the pieces?
- If you select three sticks, each of random length (between 0 and 1), what is the probability of being able to form an acute triangle with the sticks?

For the tl;dr, here are the answers:

[Show Solution]

The probability of making…

- a triangle by breaking a stick into three pieces: $25\%$.
- a triangle with three random sticks: $50\%$.
- an acute triangle by breaking a stick into three pieces: $\log(8)-2 \approx 7.9\%$.
- an acute triangle with three random sticks: $1-\frac{\pi}{4} \approx 21.5\%$.

Here are detailed solutions to all four problems (with cool visuals!):

[Show Solution]

### Problem 1

Given three lengths $a,b,c$, when can they form a triangle? When they satisfy the triangle inequality! In other words, whenever:

\[

a+b > c

\quad\text{and}\quad

b+c > a

\quad\text{and}\quad

c+a > b

\]This makes sense when you think about it; if one of these inequalities were to be false, then one length would be longer than the sum of the other two, so no triangle would be possible.

Let’s say the stick has length 1, and it is broken at locations $a$ and $b$ (measured from the same side). We’ll assume that “broken at random” means that $a$ and $b$ are uniformly and independently distributed random variables on $[0,1]$. By symmetry, the cases $a\lt b$ and $b \lt a$ occur with equal probability and have the same probability of producing triangles, so let’s assume $a\lt b$. The three sidelengths are $(a, b-a, 1-b)$. Writing out the three triangle inequalities, we have:

\[

b > \tfrac{1}{2}

\quad\text{and}\quad

a < \tfrac{1}{2}
\quad\text{and}\quad
b-a < \tfrac{1}{2}
\]Since $a$ and $b$ are uniform random variables, we can think of each $(a,b)$ as the coordinates of a point in the square $0 \le a \le 1$ and $0 \le b \le 1$. The probability we seek is precisely the area of the points satisfying our constraints. If we plot these points (and include the mirror case where $b \lt a$ as well), here is the figure we obtain:

We can see by inspection that the shaded area is $\tfrac{1}{4}$ of the total area. So the probability of forming a triangle by breaking a stick into three pieces is 25%.

### Problem 2

In this version, we’re still trying to make a triangle, so we must enforce the same triangle inequalities as in Problem 1. In this version, however, we choose three sticks of lengths $a,b,c$ and each length is an independent random variable in the interval $[0,1]$. In this case, it is equally likely that $a$, $b$, or $c$ is largest. We’ll assume without loss of generality that $c$ is largest. In this case, we only need to worry about one of the triangle inequalities, so we have:

\[

a < c
\quad\text{and}\quad
b < c
\quad\text{and}\quad
c < a+b
\]
Here is what it looks like when we plot the first two inequalities (in pale yellow) and then the subset of that region that also satisfies the third inequality (in dark yellow).

It’s clear that the dark region has half the volume of the entire region, so the probability that the three pieces will form a triangle is $\tfrac{1}{2}$. We can also fill the rest of the cube by symmetry, and we obtain:

If you stare at this long enough, you realize that it’s just three identical copies of the previous region glued together (so the pale yellow is now the entire cube), so this shape again has half the volume of the entire cube. In summary, the probability of forming a triangle with three randomly chosen lengths is 50%.

### Problem 3

Things start to get more complicated here. We’d like to make not just a triangle, but an *acute* triangle. This means that each interior angle must be less than 90 degrees. If the side lengths are $a,b,c$, we have from the law of cosines that $\cos(C) = \tfrac{a^2+b^2-c^2}{2ab}$ where $C$ is the angle opposite side $c$. If we want $0\le C \le \tfrac{\pi}{2}$, then we should choose $\cos(C)\ge 0$. This holds for all three angles, so we must have:

\[

a^2+b^2 > c^2

\quad\text{and}\quad

b^2+c^2 > a^2

\quad\text{and}\quad

c^2+a^2 > b^2

\]It turns out that these inequalities imply the triangle inequalities. Take the first one for example:

\[

c < \sqrt{a^2+b^2} < \sqrt{a^2+2ab+b^2} = a+b
\]So we don't need to include the original triangle inequalities when we use these quadratic inequalities instead. Here is what the figure looks like when we plot all the inequalities and then mirror the image for the case $b\lt a$:

This is a much more complicated shape than what we had before. We’ll compute its area by computing the areas of the complementary pieces, pictured below:

Each of the four blue regions have equal area by symmetry. One of them is given by the inequalities:

\[

(1-b)^2 \ge (b-a)^2 + a^2

\quad\text{and}\quad

0 \le a \le \tfrac{1}{2}

\quad\text{and}\quad

b \ge \tfrac{1}{2}

\]Solving the first inequality for $b$, the boundary is given by: $b=\frac{1-2a^2}{2(1-a)}$. Therefore, we can compute one of the blue areas by evaluating the integral:

\[

A_\text{blue} = \int_{0}^{1/2} \left(\frac{1-2a^2}{2(1-a)}-\frac{1}{2}\right)\,\mathrm{d}a=\frac{3}{8}-\frac{1}{2}\log(2)

\]We can use a similar approach for each of the yellow regions, and we find:

\[

A_\text{yellow} = \int_{1/2}^{1} \frac{2a-1}{2a}\,\mathrm{d}a=\frac{1}{2}-\frac{1}{2}\log(2)

\]Putting everything together, we can calculate the area of the original blue shape, and it’s given by:

\begin{align}

A_\text{acute} &= \frac{1}{2}-4A_\text{blue}-2A_\text{yellow} \\

&= \frac{1}{2}-4\left(\frac{3}{8}-\frac{1}{2}\log(2)\right)-2\left(\frac{1}{2}-\frac{1}{2}\log(2)\right) \\

&= \log(8)-2 \approx 0.07944

\end{align}So the probability of forming an acute triangle by breaking a stick into three pieces is about 7.9%.

### Problem 4

We’ll solve this problem the same way we solved Problem 2, but we’ll replace the triangle inequalities with the acute triangle inequalities used in Problem 3. As in Problem 2, we end up with a 3D volume rather than a 2D area. For simplicity again, we’ll assume that $c$ is the largest length, which accounts for one third of all possibilities. Here is the volume we get:

While this looks like a more complicated shape than the one from Problem 2, the curved surface has equation $c^2=a^2+b^2$, which is just the equation of a right circular cone! So we can calculate the volume of the region of interest by subtraction. It’s $1/3$ of the volume of the cube minus $1/4$ of the volume of the cone. The total probability is three times this volume, because we must account for the remaining identical pieces. The final answer is:

\[

P_\text{final}=3\left( \frac{1}{3}-\frac{1}{4}\left( \frac{\pi}{3} \right) \right) =1-\frac{\pi}{4} \approx 0.2146

\]So the probability of forming an acute triangle with three randomly chosen lengths is about 21.5%.

Just for fun, here is what you get when you put all three shapes together!

Let there be $n$ breaks.

Lay the pieces down in original order, left to right. Now consider one of the breaks, $B$. $B$ is the break to the right of a piece of length greater than or equal to $1/2$ just in case $B$ is greater than $1/2$ (probability $1/2$) and all of the other $n-1$ breaks are outside of the region between $B$ and the point $1/2$ to its left (probability $1/2^{n-1}$). So $B$’s probability of being such a break is $1/2^n$. Since each of the $n$ breaks has that chance of being to the right of a longer-than-$1/2$ piece, and so does the very right end of the stick, and no more than one of these can be, in all the chance that one of them does so is $(n+1)/2^n$. Therefore the chance that no break is to the right of such a piece, and so we can form a $(n+1)$-gon, is $1-(n+1)/2^n$.

Laurent:

I’m the one who sent these questions to the Riddler. The first one was posed when I was in college, and then I thought up the other questions as well as the one Hector mentioned above (though it my answer was far longer) – sometime in the late 70’s or early 80’s.

The best part about the answers for the acute triangles in my view is that they both depend on conic sections – one with pi and one with e.

I really enjoyed the nice graphics. I have imagined those shapes, especially the last one, for some time. I don’t know how to do this stuff.

Best,

Spreck