Mean perimeter for random triangle inscribed in the unit circle

692 Views Asked by At

I calculated an approximate value of 2.2 by using a Monte-Carlo-Simulation (random points on circumference). Can anybody confirm that or offer an analytical solution?

1

There are 1 best solutions below

0
On BEST ANSWER

Nice question!

An inscribed triangle in the unit circle can be represented by three points representing the vertices of the triangle. Let's call them $P_0$, $P_1$ and $P_2$. WLOG, we can fix one point in $P_0 = (1,0)$, and work with two angles $\theta_1$ and $\theta_2$ such that $P_1 = (\cos(\theta_1), \sin(\theta_1))$ and $P_2 = (\cos(\theta_2), \sin(\theta_2))$. Both angles are random variables uniformly distributed in the set $[0, 2\pi]$.

The perimeter of the triangle is:

$$P(\theta_1, \theta_2) = L_{0,1} + L_{0,2} + L_{1,2}, $$

where $L_{i,j}$ is the length of the side connecting vertices $i$ and $j$. Therefore:

$$\begin{cases} L_{0,1} = \sqrt{(1-\cos(\theta_1))^2 + \sin^2 (\theta_1)} = \sqrt{2 - 2 \cos(\theta_1)}\\ L_{0,2} = \sqrt{(1-\cos(\theta_2))^2 + \sin^2 (\theta_2)} = \sqrt{2 - 2 \cos(\theta_2)}\\ L_{1,2} = \sqrt{(\cos(\theta_2)-\cos(\theta_1))^2 + (\sin(\theta_2)-\cos(\theta_1))^2} = \sqrt{2 - 2 \cos(\theta_1 - \theta_2)}\\ \end{cases}.$$

The average perimeter is:

$$\begin{align*}\mathbb{E}[P] & = \int_{\mathbb{R}}\int_{\mathbb{R}}P(\theta_1, \theta_2) f_{\theta_1}(\theta_1)f_{\theta_2}(\theta_2) d\theta_1 d\theta_2\\ & = \int_0^{2\pi}\int_0^{2\pi}(L_{0,1} + L_{0,2} + L_{1,2})\frac{1}{2\pi}\frac{1}{2\pi}d\theta_1 d\theta_2 = \frac{12}{\pi} \simeq 3.82,\end{align*}$$

where $f_{\theta_1}(\theta_1)$ and $f_{\theta_2}(\theta_2)$ are the pdf of the angles, and they are equal to $\frac{1}{2\pi}$ in the set $[0, 2\pi]$, $0$ outside.

I have used Wolfram to calculate the integral, even though I'm quite sure there is a closed form to solve it.

The result is quite different from yours. I've also tried using Matlab, which confirm my thoughts. I post the code.

%% Trials
N = 10000; 

%% Angles
t0 = zeros(N, 1); % t0 = 2*pi*rand(N,1);
t1 = 2*pi*rand(N,1);
t2 = 2*pi*rand(N,1);

%% Perimeter of each trial
P = zeros(N,1);

%% Montecarlo loop
for i=1:N
    L01 = sqrt((cos(t0(i))-cos(t1(i)))^2 + (sin(t0(i))-sin(t1(i)))^2);
    L12 = sqrt((cos(t1(i))-cos(t2(i)))^2 + (sin(t1(i))-sin(t2(i)))^2);
    L20 = sqrt((cos(t2(i))-cos(t0(i)))^2 + (sin(t2(i))-sin(t0(i)))^2);
    P(i) = L01+L12+L20;
end

%% Results
fprintf('MonteCarlo result: %f\n', mean(P))
fprintf('Theoretical result: %f\n', 12/pi)

As a final remark, notice that degenerate triangles (i.e., $\theta_1 = \theta_2$, or $\theta_1= 0$ or $\theta_2 = 0$) represent a "zero-measure" subset, and thus they do not contribute to the calculation of the expected value of the perimeter.


Bonus

As a consequence, the average length of one side of these triangles is $\frac{4}{\pi} \simeq 1.27.$