If a stick is broken at five random points, what is the probability that the pieces can form two triangles

geometric-probabilitygeometryprobabilitytriangles

It is well-known that if a stick is broken at two random points, the probability that the pieces can form a triangle is $1/4$ (proof).

My question is:

If a stick is broken at five random points, what is the probability that the pieces can form two triangles?

The random points are uniformly distributed along the stick.

When the stick is broken at five points, there are $\frac12 \binom63=10$ ways to divide the six pieces into two groups of three pieces. In order for two triangles to be formed, there must be at least one way in which each group has three pieces, none of which is longer than the sum of the other two pieces.

I used Excel to make a simulation with $100000$ trials, and the probability seems to be about $\color{red}{0.287}$. (EDIT: There was a small mistake in my Excel sheet earlier, which caused my approximation to be slightly off; it has been corrected.)

Some other questions about broken sticks have nice closed form answers (for example here and here), and I wonder if this one does too.

Best Answer

The probability is exactly

$$\frac{5^2\cdot 29^2}{2^2\cdot 7\cdot 11\cdot 13\cdot 19}=\frac{21025}{76076}\approx 0.2763683684736316$$

We're trying to compute the volume of a rather complicated region in 5D space, but one which is ultimately bounded by facets with rational coordinates, so we know the answer will have to be rational in the end. We just want to find a way of cutting up this big 5D polytope inside the unit cube into pieces we can integrate.

The first simplification we'll make is to assume that the five cuts are ordered smallest to largest, without loss of generality, i.e. $0\le x_1\le x_2\ldots\le x_5\le 1$. This means we'll need an extra factor of $120$ at the end, but we can now talk about the lengths of the six segments as $x_1, x_2-x_1, \ldots, x_5-x_4, 1-x_5$.

In this framing, every possible way to arrange the segments into triangles corresponds to a set of six linear inequalities, one for each side of each triangle asserting that that side is at least as large as the sum of the other two sides on its triangle.

So for any given set of ways we can arrange the segments into two triangles, we'll have a convex region described by some half-spaces corresponding to the breakpoints in the large segment such that we can make the pieces into triangles in all of those ways (e.g. we might ask about the splits such that segments (1,2,3) and (4,5,6) make triangles, as well as segments (1,4,5) and (2,3,6)).

Ultimately, we want to know the volume of the region for which at least one of these $\frac{{}_6C_3}2=10$ triangle pairs are possible, so we'll use some inclusion-exclusion counting:

$$\text{Vol}(\text{at least one region}) = \sum_{\emptyset\neq S\subset \{1,2,\ldots,10\}}(-1)^{|S|+1}\text{Vol}\left(\bigcap_{i\in S} \text{triangle pair $i$ is possible}\right)$$

For each of these $1023$ regions* we want to compute, we just need to compute the volume of a particular region in 5-space bounded by a set of rationally-parametrized half spaces. This can be done numerically in Python using scipy.spatial.HalfspaceIntersection and scipy.spatial.ConvexHull. To convert a floating-point volume $V$ to an exact value, I looked at the coordinates of the intersections of the region, found a scaling factor $F$ that made those intersections lie at integer points, and then searched for small rational values $q$ such that $qFV$ was very close to an integer. In all cases there was a rational value within a factor of $10^{-14}$ of the floating-point approximation whose denominator had no prime factors over $19$. Then I just used exact integer arithmetic on the resulting fractions to obtain the final answer. (As supporting evidence for these conversions to rational numbers, one of these regions had a volume of $2491157/41409688320$, which is much more complicated than the final sum but which one wouldn't expect to cancel out if it were a random coincidence.)

Given how comparatively nice the final answer ends up being, I suspect there is some deeper reason that things work out so well; the numerator and denominator are both suspiciously nice compared to the volumes of the intermediate regions in this sum. I have no idea what approaches might shed light on the reasons behind this, though.

*Because of the symmetry between the six segments we break the stick into, many of these regions are congruent - we only end up needing to consider 18 different possibilities.