Probability that a stick randomly broken in five places can form a tetrahedron

6.2k Views Asked by At

Edit (June. 2015) This question has been moved to MathOverflow, where a recent write-up finds a similar approximation as leonbloy's post below; see here.


Randomly break a stick in five places.

Question: What is the probability that the resulting six pieces can form a tetrahedron?

Clearly satisfying the triangle inequality on each face is a necessary but not sufficient condition; an example is provided below.

Furthermore, another commenter kindly points to a reference that may be of help in resolving this problem. In particular, it relates the question of when six numbers can be edges of a tetrahedron to a certain $5 \times 5$ determinant.

Finally, a third commenter points out that since one such construction is possible, there is an admissible neighborhood around this arrangement, so that the probability is in fact positive.

In any event, this problem is far harder than the classic $2D$ "form a triangle" one.

Several numerical attacks can be found below; I will be grateful if anyone can provide an exact solution.

8

There are 8 best solutions below

1
On

Not an answer, but it might help to progress further. [The derivation that follows provides a strict -but practically useless- bound. The second part of the answer has some results that might be of interest, but they are merely empirical]


Let's consider the (much more restricted) event that the six lengths form a tetrahedron in whatever order. In the linked pdf this set of lengths is called "completely tetrahedral", and a necessary-sufficient condition is given (Theorem 4.2) which is equivalent to the following: $ u \le \sqrt{2}v $, where $u,v$ are the maximum and minimum lengths. This, informally, would correspond to "almost regular" tetrahedra. Let's then compute the probability that the lengths are completely tetrahedral. Because the points are chosen at random, uniformly, the lengths are probabilistically equivalent to a set of iid exponential variables with arbitrary parameter, conditioned to a constant sum. Because we are only interested in ratios, we can even ignore this conditioning. Now, the joint probability of the maximum and minimum of a set of $n$ iid variables is given by

$$ f_{u,v}= n(n-1) f(u) f(v) [F(u) -F(v)]^{n-2}, \hskip{1cm} u\ge v$$

In our case: $n=6$, $f(u)=e^{-u}$, and the probability that $u<a \, v$ is a straightforward integral, which gives:

$$P(u<a \, v)= 5 (a -1)\left( \frac{1}{1+5\,a}-\frac{4}{2+4\,a}+\frac{6}{3+3\,a}-\frac{4}{4+2\,a}+\frac{1}{5+1\,a} \right)$$

And $P(u<\sqrt{2} v) \approx 7.46 \times 10^{-5}$ This should be a strict bound on the desired probability, but, surely, far from tight.

[Update: indeed, the bound is indeed practically useless, it corresponds to an irrelevant tail. The probability, as per my simulations, is around $p=0.06528$ ($N=10^9$ tries, $3 \, \sigma \approx 2.3 \times 10^{-5}$), which agrees with other results.]


The only empirical result that might be of interest: It's easy to see that, from the $6!$ possible permutations of the lenghts, we can restrict ourselves to $30$, from symmetry considerations; now, from my simulations, I've found that it's sufficient to consider 7 permutations, the first two being already enough for more than $90\%$ of the successes; and the (need to consider the) seventh one is extremely small. These permutations are:

$$p_1 = [0 , 1 , 4 , 5 , 3 , 2] \hskip{1 cm} (0.75837)\\ p_2 = [0 , 1 , 4 , 3 , 5 , 2] \hskip{1 cm} (0.15231)\\ p_3 = [0 , 2 , 4 , 1 , 5 , 3] \hskip{1 cm} (0.08165)\\ p_4 = [0 , 1 , 4 , 5 , 2 , 3] \hskip{1 cm} (0.00404)\\ p_5 = [0 , 1 , 4 , 2 , 5 , 3] \hskip{1 cm} (0.00245)\\ p_6 = [0 , 1 , 3 , 5 , 4 , 2] \hskip{1 cm} (0.00116)\\ p_7 = [0 , 1 , 3 , 4 , 5 , 2] \hskip{1 cm} (0.00002)\\ $$

The length indexes correspond to a sorted array (say, ascending), and following the convention of the linked paper: the first three sides have a common vertex, the following three are the corresponding opposite sides (so, for example, in the first permutation, and by far the most favorable one, the longest and shortest sides are opposite). The numbers on the right are the probability that this permutation (when one tries in the above order) is the successful one (given that they form a tetrahedron). I cannot be totally sure if there is some rare case that requires other permutation (very improbable, I'd say), but I'm quite sure (unless I've made some mistake) that the set cannot be further reduced.

2
On

This is not an answer but a long comment to other person's request of details.

Following is some details of my simulation. I hope this will be useful for those who are interested in numerics.

On a tetrahedron, I will use 6 variables $a,b,c,A,B,C$ to represent the lengths of 6 edges. $a,b,c$ corresponds to the edges connected to an arbitrary vertex and $A,B,C$ are lengths of corresponding opposite edges.

Step 1 Pre-generate the set of 120 permutations of 5 symbols and filter away equivalent ones down to 30. $$\begin{align} &S\; = \operatorname{Perm}(\{\,1,2,3,4,5\,\})\\ \xrightarrow{\text{filter}} & S' = \{\, \pi \in S : \pi(1) = \min(\pi(1),\pi(2),\pi(4),\pi(5))\, \} \end{align}$$

The filtering condition corresponds to the fact once a pair of opposite edge $(a,A)$ is chosen, there is a 4-fold symmetry in assigning the remaining 2 pairs of opposite edges. Following 4 assignments of lengths leads to equivalent tetrahedra.

$$(a,b,c,A,B,C) \equiv (a,c,b,A,C,B) \equiv (a,B,C,A,b,c) \equiv (a,C,B,A,c,b)$$

Step 2 Draw 5 uniform random numbers from $[0,1]$, sort them and turn them into 6 lengths:
$$\begin{align}& X_i = \operatorname{Rand}(0,1), i = 1,\ldots 5\\ \xrightarrow{\text{sort} X_i} & 0 \le X_1 \le \ldots \le X_5 \le 1\\ \xrightarrow{Y_i = X_{i+1}-X_i} &Y_0 = X_1,\,Y_1 = X_2-X_1,\, \ldots,\, Y_5 = 1-X_5 \end{align}$$

Step 3 Loop through the list of permuation in $S'$, for each permutation $\pi$, assign the 6 lengths to the 6 edges:

$$(Y_0, Y_{\pi(1)}, Y_{\pi(2)}, \ldots, Y_{\pi(5)}) \longrightarrow (a, b, c, A, B, C )$$

Verify whether this assignment generate a valid teterhedron by checking:

  • All faces satisfies the triangular inequality. This can be compactly represented as: $$\min(a+b+c,a+B+C,A+b+C,A+B+c) > \max(a+A,b+B,c+C)$$
  • The corresponding Cayler-Menger determinant is positive. Up to a scaling factor, this is:

$$\left|\begin{matrix}0 & 1 & 1 & 1 & 1\cr 1 & 0 & {a}^{2} & {b}^{2} & {c}^{2}\cr 1 & {a}^{2} & 0 & {C}^{2} & {B}^{2}\cr 1 & {b}^{2} & {C}^{2} & 0 & {A}^{2}\cr 1 & {c}^{2} & {B}^{2} & {A}^{2} & 0\end{matrix}\right| > 0$$

If this configuration is admissible, record it and goes to Step 2. If not, try other permutations from $S'$.

Some comment about whether this is useful for exact answer.

A $N = 10^9$ simulation is definitely not enough. The probability of forming a tetrahedron is about $p = 0.065$. Such a simulation will give us a number accurate to about $\sqrt{\frac{p(1-p)}{N}} \sim 1.5 \times 10^{-5}$. i.e. a 5 digit accuracy.

Up to what I heard, we need about 7 digit of accuracy before we have a chance to feed this into existing Pluoffe's Inverter and find whether this number look like a combination of simple mathematical constants.

Until one can speed up the algorithm to have a $N > 10^{13}$ simulation or have a better control of the error terms. Simulation remains only useful for cross checking purposes.

1
On

Let the stick be of unit length. We generate five random numbers uniformly distributed between 0 and 1, and after we sort them in ascending order we have some r1, r2, r3, r4, r5. Let a=r1, b=r2-r1, c=r3-r2, d=r4-r3, e=r5-r4, f=1-r5 be the edges of a possible tetrahedron. The edges should satisfy the triangle inequalities for the four faces of tetrahedron. A program based on this reasoning for 1000000 trials yields an approximate probability p = 0.0185 .

Best regards

Emmanuel.

7
On

Disclaimer: This is another long comment reporting on the attempt to attack the problem numerically.


Instead of parametrizing the 6 segments of the unit stick as $$(u_1,u_2-u_1,u_3-u_2,u_4-u_3,u_5-u_4,1-u_5)$$ where $(u_1,u_2,u_3,u_4,u_5)$ are order statistics of the uniform distribution with pdf $$ f_U(u_1,u_2,u_3,u_4,u_5) = 5! \cdot \left[0<u_1<u_2<u_3<u_4<u_5<1 \right] $$ I am using a different parametrization: $$ (1-w_1, w_1 (1-w_2), w_1 w_2 (1-w_3), w_1 w_2 w_3 (1-w_4), w_1 w_2 w_3 w_4 (1-w_5), w_1 w_2 w_3 w_4 w_5 ) $$ It is easy to solve for $\{w_k\}$ in terms of $\{u_k\}$: $$ w_1 = 1-u_1, w_2 = \frac{1-u_2}{1-u_1}, w_3 = \frac{1-u_3}{1-u_2}, w_4 = \frac{1-u_4}{1-u_3}, w_5 = \frac{1-u_5}{1-u_4} $$ which allows to find their induced measure: $$ f_W(w_1,w_2,w_3,w_4,w_5) = (5 w_1^4 [0<w_1<1]) \cdot (4 w_2^3 [0<w_2<1]) \cdot (3 w_3^2 [0<w_3<1] ) \cdot (2 w_4 [0<w_4<1]) \cdot ( [0<w_5<1] ) $$ meaning that $w_k$ are independent random variable with different power distributions on the unit interval.

This parametrization is friendlier to numerical integration routines.

We then proceed much like @achille-hui . Here is Mathematica code I ran:

TriangleInequalities[{a_, b_, c_}] := 
 a < b + c && b < a + c && c < a + b

FacialTetrahedron[{x_, y_, z_, xb_, yb_, zb_}] := 
 TriangleInequalities[{x, y, zb}] && 
  TriangleInequalities[{x, yb, z}] && 
  TriangleInequalities[{xb, y, z}] && 
  TriangleInequalities[{xb, yb, zb}]

TetrahedraSextupleQ[{x_, y_, z_, xb_, yb_, zb_}] := 
 FacialTetrahedron[{x, y, z, xb, yb, zb}] && 
  Det[{{0, x^2, y^2, z^2, 1}, {x^2, 0, zb^2, yb^2, 1}, {y^2, zb^2, 0, 
      xb^2, 1}, {z^2, yb^2, xb^2, 0, 1}, {1, 1, 1, 1, 0}}] > 0

We now build the event that one can form a tetrahedron out of 6 pieces the unit stick is divided into. The following takes a while to compute.

event2 = Assuming[
   0 < w1 < 1 && 0 < w2 < 1 && 0 < w3 < 1 && 0 < w4 < 1 && 0 < w5 < 1,
    Simplify[
    Apply[Or, 
     Simplify[TetrahedraSextupleQ[#]] & /@ 
      Permutations[{(1 - w1), 
        w1 (1 - w2), w1 w2 (1 - w3), w1 w2 w3 (1 - w4), 
           w1 w2 w3 w4 (1 - w5), w1 w2 w3 w4 w5 }]]]];

Therefore I saved the resulting predicate in paste-bin. Here is how to import it:

event2 = ToExpression[
   Import["http://pastebin.com/raw.php?i=399MDkGQ", "Text"], 
   InputForm];

We now define a compiled filter function to decide if a random vector fires the event.

cfFunc2 = With[{ee = event2},                                                   
           Compile[{{arg, _Real, 1}}, Block[{w1, w2, w3, w4, w5},               
             {w1, w2, w3, w4, w5} = arg;                                        
             If[ee, 1, 0]], RuntimeAttributes -> Listable]];

The function above allows to efficiently run the Monte-Carlo simulation. Here is the simulation that takes some 4.7hours:

In[3]:= Block[{sample, tot = 0, suc = 0},                                       
          While[suc <= 10^9,                                                    
           sample =                                                             
            RandomVariate[                                                      
             ProductDistribution[PowerDistribution[1, 5],                       
              PowerDistribution[1, 4], PowerDistribution[1, 3],                 
              PowerDistribution[1, 2], UniformDistribution[]], 3*10^8];         
           tot += Length[sample];                                               
           suc += Total[cfFunc2[sample]];                                       
           ];                                                                   
          {suc, tot}                                                            
          ] // AbsoluteTiming                                                   

Out[3]= {16994.098510, {1018403735, 15600000000}}

Entailing the following $(1-10^{-8})/2$-level confidence interval:

In[38]:= Block[{suc = 1018403735, tot = 15600000000}, 
 PlusMinus[N[suc/tot], 
  Sqrt[2.] InverseErfc[10^-8] Sqrt[
    With[{p = suc/tot}, p (1 - p)/tot]]]]

Out[38]= 0.0652823 \[PlusMinus] 0.0000113341

The advantage of the $w$-parametrization is that Cartesian quadrature rules can be applied. Using the fact that $w_k = 2^{-1/k}$ for $1 \leqslant k \leqslant 5$ furnishes a tetrahedral splitting:

In[160]:= event2 /. {w1 -> (1/2)^(1/5), w2 -> (1/2)^(1/4), 
  w3 -> (1/2)^(1/3), w4 -> (1/2)^(1/2), w5 -> 1/2`}

Out[160]= True

we can help numerical quadrature algorithm to find a sample point inside the region of interest. So with enough time at hand it should be possible to get a more precise quadrature answer:

AbsoluteTiming[
 prob = NIntegrate[
   f[w1, w2, w3, w4, w5], {w1, 0, (1/2)^(1/5), 1}, {w2, 
    0, (1/2)^(1/4), 1}, {w3, 0, (1/2)^(1/3), 1}, {w4, 0, (1/2)^(1/2), 
    1}, {w5, 0, 1/2, 1}, 
   Method -> {"CartesianRule", "SymbolicProcessing" -> 0}, 
   MaxRecursion -> 14]]

However, after some 20 hours, this integration command is still running... I will post the answer once the evaluation is complete.

1
On

if stick pieces are s1 (longest) to s6 shortest.

Picture the tetrahedron with longest side s1 out of view. Then s2 is the spine and any combination of pairs from {s3,s4,s5,s6} can make the two side triangles Hence s3+s6 needs to be longer than s2 (P=0.25) And s4+s5 needs to be longer than s2. (P=0.25) so P(can form)=0.25*0.25=0.0625

0
On

This is not an answer, but just another long(ish) comment.

I tried to simplify the original problem in order to see if there's any chance of solving the problem with computer algebra systems such as Mathematica.

I thus ignored the non-linear constraint coming from the Cayley-Menger determinant, and computed the probability that six uniformly random, independent edge lengths satisfy four triangle inequalities. To make things even simpler I also assumed the edge lengths to be in decreasing order, but that is of course not a big restriction.

Even with these assumption Mathematica is struggling, but eventually gives the result $19/72$, which is confirmed by the following MC simulation:

nn = 10^7;
cnt = 0;
e = RandomReal[{0, 1}, {nn, 6}];
For[n = 1, n <= nn, n = n + 1,
   etemp = Sort[e[[n, All]]];
   If[And @@ (Abs[#[[2]] - #[[3]]] < #[[1]] < #[[2]] + #[[3]] &@
   Part[etemp, #] & /@ {{1, 2, 3}, {1, 4, 5}, {2, 4, 6}, {3, 5, 6}}), cnt = cnt+1];
];
p = cnt/nn // N
Sqrt[(p (1 - p))/nn]

I'm not optimistic about Mathematica being able to handle the original problem.

0
On

Too long for a comment: The necessary and sufficient conditions that describe your tetrahedron are:

  1. The sum of all six segments is constant: $$(a+b+c)+(x+y+z)=L$$

  2. And three of these segments form the sides of a triangle: $$\begin{cases}a+b>c\\b+c>a\\c+a>b\end{cases}$$

  3. And two more segments form a triangle with at least one of the former three sides: $$\begin{cases}a+x>y\\a+y>x\\x+y>a\end{cases}\qquad\text{ or}\qquad\begin{cases}b+x>y\\b+y>x\\x+y>b\end{cases}\qquad\text{or}\qquad\begin{cases}c+x>y\\c+y>x\\x+y>c\end{cases}$$

  4. And the sixth and final side z has to be smaller than the length of the “other” diagonal of the quadrilateral formed by these previous five sides when the (incomplete) figure is stretched onto a plane or flat surface. (One of the first three sides [a, b, c] is of course the “first” diagonal of the geometric figure formed by the other four).

Is this approach helpful ? Does it help clear things up, or make them easier ?

0
On

EDIT Turns out 25%, 50%, and 68.75% is actually a trend in itself. This is a little convoluted but for n=2, 1-3/4 is 25%; n=3, 1-4/8 is 50%; and n=4, 1-5/16 is 68.75%. Under careful inspection, n can be subbed into the problems giving this elegant solution: Success % = 1-(n+1)/2^n . That means for the case of n=5 cuts, there is a 26/32 odds of success or 81.25%. Hope this helps!

I can say that I have been working on the series from 2 cuts to make a triangle with 25% odds to 3 cuts to make a quadrilateral with 50% odds and just recently came up with a 4 cut solution to make a pentagonal/pentagon at 68.75%. Based on the trend, my gut tells me it would be around 80%.

My method for solution is using grid refinement. I start by constraining the number of possible cut locations choosing only even numbers so there are odd numbers of segments and avoid the possibility of making a straight line. The locations are equally spaces and a simple example can be with the 2 cuts and a constraint of 4 possible cut locations. This means each segment in-between cut locations is 1/5 the total length.

Simple geometry theory states that to form a closed object with straight edges, no one edge can be larger than 1/2 the total perimeter. More simply for the specific case of a triangle, a,b,c < L/2 where a, b, and c are the 3 stick lengths resulting from the 2 cuts and L is the total length of the original stick.

With setting L = 5, each segment with 4 equal cut options is now 1. The total number of options can be seen by listing (1,1,3 / 1,3,1 / 3,1,1 / 1,2,2 / 2,1,2 / 2,2,1) or by looking at the unique combinations of stick lengths and how many permutations are with each set (1,1,3 * 3 and 1,2,2 * 3 for this case).

It is easy to see that 3 of the 6 have a stick length that is >2, so 50% of the time would be the solution. By changing the possible cut locations from 4 cuts to 6, then 8, then 10, etc. and tracking the options, trends can be analyzed for both the number of possible successful combinations and the total combinations. In this example, the sum of total options is just a sum from 1 to (n # of cuts)-1. The sum of successful options is very similar as a sum from 1 to (n# of cuts)/2. This can be rewritten and simplified in a fraction to the % chance being (n+2)/(4n-4). By taking the limit as n goes to infinity, it is clear that the odds converge to 25%.

This method gets exponentially more difficult as the number of cuts goes up, but I managed to find trends and calculate the odds with 3 cuts and 4 cuts. It is possible by just investigating n = 6, 8, and 10 for 5 cuts that there may be enough to find a numerical series.

EDIT Turns out 25%, 50%, and 68.75% is actually a trend in itself. This is a little convoluted but for n=2, 1-3/4 is 25%; n=3, 1-4/8 is 50%; and n=4, 1-5/16 is 68.75%. Under careful inspection, n can be subbed into the problems giving this elegant solution: Success % = 1-(n+1)/2^n . That means for the case of n=5 cuts, there is a 26/32 odds of success or 81.25%. Hope this helps!