# Expected area of a random triangle with fixed perimeter

I'm trying to calculate the expected area of a random triangle with a fixed perimeter of 1.

My initial plan was to create an ellipse where one point on the ellipse is moved around and the triangle that is formed with the foci as the two other vertices (which would have a fixed perimeter) would have all the varying areas. But then I realized that I wouldn't account for ALL triangles using that method. For example, an equilateral triangle with side lengths one third would not be included.

Can anyone suggest how to solve this problem? Thanks.

• How is the triangle randomly selected? Perhaps you could choose the length of each side uniformly on the remaining perimeter – John Fernley Jul 25 '14 at 13:11
• I think there is a close relationship with a frequently asked question here and at sci.math, about the probability that a "broken stick" will result in three pieces that form a triangle. – hardmath Jul 25 '14 at 13:12
• Searching here at Math.SE for "broken stick triangle" will discover several related posts, posing various ways (or emphasizing the importance of varying ways) to choose the lengths. – hardmath Jul 25 '14 at 13:25
• Use the broken stick triangle as mentioned + the Heron formula – Matt B. Jul 25 '14 at 13:29
• @MattB. It is not so straightforward, since the broken stick problem just gives the expected values of the lenghts of the shortest, middle and longest side, but you cannot compute the expected value of the area by just applying the Heron's formula to these three expected values. – Jack D'Aurizio Jul 25 '14 at 13:34

Since the Heron's formula gives: $$A=\frac{1}{4}\sqrt{(a^2+b^2+c^2)^2-2(a^4+b^4+c^4)},$$ assuming that the random choice is made accordingly to the broken stick model (notice that not every choice for the side lengths satisfies the triangle inequality, hence for such cases we set the area as zero): $$\begin{eqnarray*}\mathbb{E}[A]&=&\frac{1}{2}\int_{0}^{1}\int_{x}^{1}\sqrt{\max\left[0,(x^2+(y-x)^2+(1-y)^2)^2-2(x^4+(y-x)^4+(1-y)^4)\right]}\,dy\,dx\\&=&0.00747998\ldots\end{eqnarray*}$$ A random model that makes more sense is to choice a random point (with respect to the uniform measure) on the set $T=\{(u,v,w):u,v,w\geq 0, u+v+w=\frac{1}{2}\}$, then pick the side lengths as $a=v+w,b=u+w,c=u+v$. In such a way the triangle inequality is always fullfilled and the Heron's formula gives simply: $$A = \sqrt{\frac{uvw}{2}},$$ so: $$\mathbb{E}[A]=\frac{8}{\sqrt{6}}\int_{T}\sqrt{uvw}\,d\mu=\frac{1}{\sqrt{3}}\int_{0}^{\pi/2}\int_{0}^{\pi/2}\sin^5\theta \cos^2\theta\sin^4\phi\, d\theta \,d\phi=\frac{\pi}{70\sqrt{3}}.$$

• I have a different solution, not sure why we don't have the same numbers. – Matt B. Jul 25 '14 at 15:04
• I believed this depends on the fact that you manually imposed that the sum of two lengths must be greater than the third one, but not imposed that their difference must be smaller than the third side. Anyway, this is just accounted by the Heron's formula. Three positive sides satisfy the triangle inequality if and only if the contribute they give under the square root is positive. This is the reason why I considered $\sqrt{\max{[0,\ldots]}}$. – Jack D'Aurizio Jul 25 '14 at 15:09
• And you did not take into account cases like $u=1/5,v=2/5$. – Jack D'Aurizio Jul 25 '14 at 15:11
• I did, by multiplying by 2, as $u,v$ play a symmetric role. It is not directly obvious to me that the Heron's formula will have a positive contribution simply from sides satisfying the triangle inequality (would need to think about it). – Matt B. Jul 25 '14 at 16:07
• One interpretation of the problem excludes outcomes where the side lengths fail the triangle inequality, since the statement asks about "a random triangle with a fixed perimeter of 1". Including the failed triangles as having zero area will bias the expected area downward, but by a factor corresponding to the known likelihood of a broken stick forming a triangle. – hardmath Jul 25 '14 at 16:46

My solution:

Let $U,V \sim \mathcal{U}[0,1]$ be 2 sides of your triangle, and $1-u-v$ being the other one (as by definition they add up to 1).

Not every pair $(u,v)$ is acceptable, as they need to form a triangle. The condition for that is that the biggest vertex is smaller than the sum of the two other sides, that is:

$$\max(u,v,1-u-v) > 1 - \max(u,v,1-u-v) \Leftrightarrow \max(u,v,1-u-v) < \frac{1}{2}$$

The quantity you're after here is the area, so using Heron's formula, you're looking at:

$\int\int_{(u,v)\in[0,1]^2} \sqrt{0.5(0.5-u)(0.5-v)(u+v-0.5)}\chi(\max(u,v,1-u-v) < \frac{1}{2}) dudv \ = \int_{u=0}^1\int_{v=0}^u 2\sqrt{0.5(0.5-u)(0.5-v)(u+v-0.5)}\chi(\max(u,1-u-v) < \frac{1}{2}) dudv \\ = \int_{u=0}^\frac{1}{2}\int_{v=0}^u 2\sqrt{0.5(0.5-u)(0.5-v)(u+v-0.5)}\chi(1-u-v < \frac{1}{2})\chi(v < u)\chi(u < \frac{1}{2}) dudv \\ = \int_{u=\frac{1}{4}}^\frac{1}{2}\int_{v=\frac{1}{2}-u}^u 2\sqrt{0.5(0.5-u)(0.5-v)(u+v-0.5)} dudv \\ =0.00586765$

Using the feedback given in the comments, I've got a proposal for a solution. I must say that I am not very certain of whether it is correct or not.

Let $0<x<y<1$ be the points at which the "stick is broken", and so $x, y-x, 1-y$ are the lengths of the three segments. For a triangle to be formed, the sum of any two sides must be greater than the third side. Therefore we get the following inequalities: $$x+(y-x)>1-y \\ (y-x)+(1-y)>x \\ (1-y)+x>y-x$$ Plotting these on a coordinate system gives a triangular region with vertices $(0, 1/2), (1/2, 1/2), (1/2, 1)$. So any pair $(x, y)$ contained within that region results in a triangle of perimeter 1. I parameterize these pairs: $$\left(\frac{a_1}{2}, \frac{1+a_2}{2}\right),$$ for $0<a_2<a_1<1$. Now these can be plugged in Heron's formula (and simplified): $$A(a_1, a_2)=\frac{1}{4}\sqrt{(1-a_1)(a_1-a_2)(a_2)}$$ Taking the integral for the average value: $$E(A)=\frac{1}{A(R)}\int_0^1\!\!\!\int_0^{a_1}A(a_1, a_2)\,da_2da_1=0.0299199$$ I'm uncertain about whether the distribution is unbiased and uniform. Anyone who can verify this?