26 October 2021

Tricky triangles

Let $\bigtriangleup ABC$ be an equilateral triangle, and let $O$ be a point somewhere in its interior. The three points $P,Q,R$ are selected randomly and uniformly along the three sides of $\bigtriangleup ABC$ respectively. What is the probability that $\bigtriangleup PQR$ contains $O$?

Without loss of generality assume $\bigtriangleup ABC$ has side-length 1. Now, every point $O$ in its interior can be specified, up to symmetry, by trilinear coordinates, which are $O$'s distances to the three sides $(h_1,h_2,h_3)$:

An interior point $O$ can be specified with the altitudes $(h_1,h_2,h_3)$.

Note the constraint that $h_1+h_2+h_3=\frac{\sqrt{3}}{2}$ as given by Viviani's theorem; this means $O$ only has two degrees of freedom, which makes sense.

Knowing this, the general solution for the problem, for an $O$ defined by $(h_1,h_2,h_3)$, is: $$\begin{align*}\mathbf{P}(\text{success})=\frac{4}{3}\Big[\;\;&h_1h_2\ln\Big(\frac{(h_1+h_3)(h_2+h_3)}{h_1h_2}\Big)\\+&h_1h_3\ln\Big(\frac{(h_1+h_2)(h_3+h_2)}{h_1h_3}\Big)\\+&h_2h_3\ln\Big(\frac{(h_2+h_1)(h_3+h_1)}{h_2h_3}\Big)\Big]\end{align*}$$

where a "success" occurs if the random $\bigtriangleup PQR$ contains $O$. Note that the expression is symmetric across $(h_1,h_2,h_3)$ as we expect.

Now, in the special case where $O$ is the centre of the triangle ($h_1=h_2=h_3=\frac{\sqrt{3}}{6}$), then the above equation reduces to $$\mathbf{P}(\text{success})=\frac{2\ln(2)}{3}\approx 0.4621$$

Below is an intensity map of $\mathbf{P}(\text{success})$ as a function of $O$'s location within the triangle $\bigtriangleup ABC$.

Probability heat map for success depending on $O$'s placement.


Before launching into the proof, we need to use the following result.


Consider the green triangle below, where two sides (lengths of $m$, $n$) lie on the main triangle $\bigtriangleup ABC$ while the third side passes through $O$. The lengths $m$ and $n$ are related by: $$\frac{\sqrt{3}}{2}mn=h_1m+h_2n$$Alternatively,$$m=\frac{h_2n}{n\sqrt{3}/2-h_1}$$

Lemma: the relationship between $m$ and $n$.

This is easily proven by constructing the line $CO$, which divides the green triangle into two. Calculating the areas of the green triangles will lead to the above result.

Main result

We extend $AO$ to intersect $BC$ at $D$, and extend $BO$ to intersct $AC$ at $E$. Now, we uniformly pick $P$ to lie on $BD$, and extend $PO$ to meet $AC$ at $X$. Let $p=\overline{BP}$.

Constructing additional lines and points required for the proof

It is time to select a $Q$ along $AC$. There are three possibilities for where to put $Q$: along $AX$, along $XE$, or along $EC$. We then need to consider where to place $R$ along $AB$ to complete the $\bigtriangleup PQR$ triangle.

Case 1: $Q$ along $AX$

In this case, no $R$ will result in a successful inclusion of $O$ within $\bigtriangleup PQR$.

Case 1: No $R$ will succeed.

Case 2: $Q$ along $XE$

In this case, every single $R$ will result in a successful triangle.

Case 2: Any $R$ will succeed.

Case 3: $Q$ along $EC$

In this case, we extend $QO$ to meet $AB$ at $Y$, and we recognise that only if $R$ lies on $AY$ can we have a successful triangle. If $q=\overline{AQ}$, then the Lemma tells us a successful triangle must have $\overline{AR}\in[0,\overline{AY}]$ where $\overline{AY}=\frac{h_2q}{q\sqrt{3}/2-h_3}$.

Case 3: A successful triangle (left) must have $R$ lie between $AY$.

Putting the three cases together, we have the expression $$\begin{align*}\mathbf{P}(\text{success}\;|\;p)&=\int_0^{\overline{AX}}0dq+\int_{\overline{AX}}^{\overline{AE}}1dq+\int_{\overline{AE}}^1 \overline{AY} dq\end{align*}$$

Applications of the lemma gives us $$\begin{align*}\overline{AX}&=1-\frac{h_1(1-p)}{(1-p)\sqrt{3}/2-h_2}\\\overline{AE}&=\frac{h_3}{h_1+h_3}\\\overline{AY}&=\frac{h_2q}{q\sqrt{3}/2-h_3}\end{align*}$$

Evaluating the integral with this information gives us $$\begin{align*}\mathbf{P}(\text{success}\;|\;p)&=\int_{\overline{AX}}^{\overline{AE}}dq+\int_{\overline{AE}}^1 \overline{AY} dq\\&=\frac{h_1(1-p)}{(1-p)\sqrt{3}/2-h_2}+\frac{4}{3}h_2h_3\ln\Big(\frac{(h_2+h_1)(h_3+h_1)}{h_2h_3}\Big)-\frac{2}{\sqrt{3}}h_1\end{align*}$$

To obtain the overall success, we must integrate $p$ over $[0, \overline{BD}]$ where $\overline{BD}=\frac{h_3}{h_2+h_3}$. This is not enough, however, as we must also account for $p\in[\overline{BD},1]$. Picking $p$ to be in this interval is basically like working with a triangle reflected across the vertical axis, where we consider $p\in[0,1-\overline{BD}]$, and with $h_2$ and $h_3$ swapped. Hence we will have the massive integral:


which, when evaluated fully, gives the aforementioned result of $$\begin{align*}\mathbf{P}(\text{success})=\frac{4}{3}\Big[\;\;&h_1h_2\ln\Big(\frac{(h_1+h_3)(h_2+h_3)}{h_1h_2}\Big)\\+&h_1h_3\ln\Big(\frac{(h_1+h_2)(h_3+h_2)}{h_1h_3}\Big)\\+&h_2h_3\ln\Big(\frac{(h_2+h_1)(h_3+h_1)}{h_2h_3}\Big)\Big]\end{align*}$$