Probability that a triangle can be formed from a permutation of three edges of random length

What is the probability that a particular set of integer edge lengths selected from an interval $[1, N]$, can form a triangle? How might this extend to the case where one selects real number edge lengths from the unit interval?

I'd also be very interested in any comments on what the probability distribution would look like for the distances between the triangles vertices.


To form a triangle you need each of the three sides to be less than the sum of the other two.

So for the unit interval case you might consider a unit cube and exclude three corner pyramids each with volume $1/6$ making the probability $1/2$.

For the discrete case you have $N^3$ points and again have to exclude three pyramids, each with $(N^3-N)/6$ points, which will give a probability of $\frac{1}{2}+\frac{1}{2N^2}$.


This answers a slightly different question. The original question seeks, instead, to determine $$ \mathbb{P}\left( \left[ \begin{array}{c} X_1+X_2 > X_3 \\ X_1+X_3 > X_2 \\ X_2+X_3 > X_1 \end{array}\right] \right). $$


Let $X_1$, $X_2$, $X_3$ be uniform discrete random variables over interval $[1,n]$. We are seeking to determine: $$ \begin{eqnarray} p = \mathbb{P}\left( \left[ \begin{array}{c} X_1+X_2 \geqslant X_3 \\ X_1+X_3 \geqslant X_2 \\ X_2+X_3 \geqslant X_1 \end{array}\right] \right) &=& \sum_{k_3=1}^n \sum_{k_2=1}^{n} \sum_{k_1=1}^{n} \frac{1}{n^3} \left[ \begin{array}{c} k_1+k_2 \geqslant k_3 \\ k_1+k_3 \geqslant k_2 \\ k_2+k_3 \geqslant k_1 \end{array}\right] \\ &=& \sum_{k_3=1}^n \sum_{k_2=1}^{n} \sum_{k_1=\max(1,|k_3-k_2|)}^{\min(n, k_2+k_3)} \frac{1}{n^3} \\ &=& \sum_{k_3=1}^n \sum_{k_2=1}^{n} \frac{ \min(n,k_2+k_3) - \max(1,|k_3-k_2|) + 1}{n^3} \\ \end{eqnarray} $$ Evaluating the above sum requires careful consideration of three cases, $k_2=k_3$, $k_2< k_3$ and $k_2 > k_3$, each of which needs to be further split to resolve $\min(n,k_2+k_3)$. The end result is bound to be rational function of $n$, so can as well "guess" it: $$ p = \frac{1}{2} + \frac{3n-2}{2 n^2} $$

In[33]:= Table[
  Sum[1/n^3, {k3, 1, n}, {k2, 1, n}, {k1, Max[1, Abs[k3 - k2]], 
    Min[n, k2 + k3]}], {n, 1, 12}] // FindSequenceFunction[#, n] &

Out[33]= (-2 + 3 n + n^2)/(2 n^2)