Home » Technical Topics » Data Science

Fun Mathematical Problem in Stochastic Geometry: Random Triangles

9765013085

This article is part of a series about fun problems, offered with solutions. The previous one can be found here. This new problem falls in a category called stochastic geometry. We define a random triangle as a triangle inscribed in a circle of radius ρ, with its three vertices uniformly distributed on the circle. Without loss of generality, we can assume that the circle is centered at the origin, its radius is ρ = 1, and one vertex is located at (1, 0). The metric of interest here, does not depend on the scaling factor ρ.

The general question is to find the distribution of the random variable R = SQRT(S) / L, where S is the area of the triangle, and L its perimeter. The first step is to show that R does not depend on ρ, and then find the maximum potential value for R, the minimum being 0. The probability distribution of R can be approximated using Monte-Carlo simulations. Note that R is also independent of the unit used for the measurements, thanks to using SQRT(S) rather than S

1. The problem, and solution

Let us assume that the three vertices of the triangle are (ρ cos θ0, ρ sin θ0), (ρ cos θ1, ρ sin θ1), (ρ cos θ2, ρ sin θ2), with θ0 = 0, and (θ1, θ2) uniformly distributed on [0, 2π] x [0, 2π]. The following results are easy to obtain:

9762575486

Here χ is the indicator function, see here. Note that R = R(θ1, θ2) does not depend on ρ. The maximum area S is achieved for the equilateral triangle, that is, when θ1 = 2π/3 and θ2 = 4π/3. However this also corresponds to the maximum perimeter L. So it is not sure that the equilateral triangle achieves the maximum value for R. One way to confirm this is to find the maximum of R(θ1, θ2) by differentiating its expression with respect to θ1 and θ2. But there is a much easier solution: consider a triangle of fixed perimeter: its area is maximum if the triangle is equilateral. See the detailed solution here

The picture below represents the probability distribution for R, with R considered as a random variable. The X-axis represents r, and the Y-axis represents P(R  <  r). It was produced using 100,000 simulated random triangles.

9764913276

Note that the maximum value for R is about 0.219.

2. Generalizations, and related problems

For the equilateral triangle, square, circle and deltoid curve, R is respectively equal to (approximately) 0.219, 0.250, 0.282, and 0.257. The exact value is easy to obtain in each case, see table below. It does not depend on the scale. Note that the deltoid (see here and in the picture below) is non-convex, thus you would expect a lower R. Nothing can beat the circle!

9764989864

The exact values are as follows:

9765567088

An interesting MIT article about random triangles, focusing on the theory of shapes, can be found here. The picture below features 1,000 random triangles from that article, generated using a Gaussian distribution. The problem can be generalized to random polygons, random polyhedrons (that is, in 3 dimensions, see here) or to random convex sets. Other interesting problems in stochastic geometry include Buffon’s needle (see here) and partial covering of the plane by infinitely many random circles (see here).

9765449064

Applications of stochastic geometry (including stereology and spatial statistics) are described in this book, published in 2013. A modern book (2019) can be found here

To receive a weekly digest of our new articles, subscribe to our newsletter, here.

About the author:  Vincent Granville is a data science pioneer, mathematician, book author (Wiley), patent owner, former post-doc at Cambridge University, former VC-funded executive, with 20+ years of corporate experience including CNET, NBC, Visa, Wells Fargo, Microsoft, eBay. Vincent is also a self-publisher at DataShaping.com, and founded and co-founded a few start-ups, including one with a successful exit (Data Science Central acquired by Tech Target). You can access Vincent’s articles and books, here. A selection of the most recent ones can be found on vgranville.com