Triangles on the Unit Circle
Introduction
We consider the following three problems: For any random triangles on the unit circle,
- which triangle has the largest perimeter?
- which triangle has the largest area?
- what’s the average area of the triangles?
Solution to the problem 1
Denote a triangle by
Thus,
Solution to problems 2 and 3
It’s kind of difficult to have analytic solutions to problems 2 and 3. So we resort to Monte Carlo simulation.
-
We can think that coordinates of
, and are , , and , respectively, where -
The lengths of the three edges are
- The area is
R code:
d <- function(x, y) sqrt((cos(x) - cos(y))^2 + (sin(x) - sin(y))^2)
a_simu <- function()
{rand_nbrs <- runif(3, min = 0, max = 2 * pi)
a <- d(rand_nbrs[2], rand_nbrs[3])
b <- d(rand_nbrs[1], rand_nbrs[3])
c <- d(rand_nbrs[1], rand_nbrs[2])
s <- (a + b + c) / 2
A <- sqrt(s * (s-a) * (s-b) * (s-c))
}
set.seed(12345)
N <- 1e4
simu_res <- replicate(n = N, a_simu(), simplify = TRUE)
(summary(simu_res))
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 0.0000005 0.1348081 0.3928584 0.4770273 0.7711802 1.2989897
the_means <- cumsum(simu_res) / (1:N)
(the_means[N])
## [1] 0.4770273
plot(1:N, the_means, type = 'l')
abline(a = the_means[N], b = 0, lty = 2, col = 'red')

Note that 1.2989897 is very close to
Also note that 0.4770273 is close to