5
$\begingroup$

Question: Suppose that points $P_1$, $P_2$, and $P_3$ are chosen uniformly at random on the sides of a square $T$. Compute the probability that $$\frac{[\triangle P_1 P_2 P_3]}{[T]}>\frac{1}{4}$$ where $[X]$ denotes the area of polygon $X$.

Without loss of generality, I assumed the side length of the square to be $1$. Because the question mentions $\frac{1}{4}$ of the square, I considered splitting the square into quadrants.

  • It is obvious that all three points cannot lie in the same quadrant of the square.
  • Similarly, there cannot be two points in the same quadrant because the area must be less than $\frac{1}{2} \cdot \frac{1}{2} \cdot 1=\frac{1}{4}$. [EDIT: This is wrong]

This means that all three vertices must lie in different quadrants in the square. From here, I considered cases:

Case 1: Two of the points are on the same side, which occurs with probability $\frac{9}{16}$.

Case 2: All three points are on different sides, which occurs with probability $\frac{3}{8}$.

From here, my efforts have consisted of just labeling lengths and finding the area in terms of said lengths. However, this has led me with some inequalities that I don't know how to find the probabilities of being true, namely:

  • $x-xz+yz<\frac{1}{2}$ for $0 \leq x,y,z \leq 1$
  • $(x-y)z<\frac{1}{2}$ fo $0 \leq y<x \leq 1$ and $0 \leq x \leq 1$

If anyone knows how to either find the probability of these inequalities being satisfied (which I think requires multivariable calculus) or a way that circumvents these inequalities, please let me know.


Here's my full attempt at the question, though I'm unsure about the accuracy of how I find the probabilities of the three-variable inequalities being satisfied. [NOTE: this method has a few errors in it, a correct version is in the answers below.]


Without loss of generality, consider the square with vertices $(0,0), (0,1), (1,0), (1,1)$.

We proceed using casework:

  1. All three vertices are on different sides of the square. This occurs with probability $\frac{9}{16}$.

Let the vertices be $(x_1,0)$, $(0,y_1)$, and $(x_2,1)$. Using the determinant form for the area of a triangle, the area is given by $$A=\frac{1}{2} \begin{vmatrix} x_1 & 0 & 1 \\ 0 & y_1 & 1 \\ x_2 & 1 & 1 \end{vmatrix}=\frac{1}{2}x_1-\frac{1}{2}y_1 (x_1-x_2)$$

Assume that $x_1>x_2$. Then, $$\frac{1}{2}x_1-\frac{1}{2}y_1 (x_1-x_2)>\frac{1}{4} \implies x_1-y_1 (x_1-x_2)>\frac{1}{2}$$

For convenience, replace $x_1$ with $y$, $x_2$ with $x$, and $y_1$ with $z$. We now have the system of inequalities $\begin{cases} y-yz+xz>\frac{1}{2} \\ y>x \\ 0 \leq x,y,z \leq 1 \end{cases}$.

We now consider graphing the inequality $y-yz+xz>\frac{1}{2}$ with $z$ as a constant. The $x$-intercept is $\frac{1}{2z}$ and the $y$-intercept is $\frac{1}{2(1-z)}$.

  • If $0<z \leq \frac{1}{2}$, then the area of the region is given by $\frac{4z-1}{8z-8}$. Therefore, the desired probability for this case is $\int^{\frac{1}{2}}_{0} \frac{4z-1}{8z-8} \, dz=\frac{1}{8}(2-\ln 2)$.
  • If $\frac{1}{2} \leq z<1$, then the area of the region is given by $\frac{1}{8z}$. Therefore, the desired probability for this case is $\int^{\frac{1}{2}}_{0} \frac{1}{8z}=\frac{1}{8} \ln 2$.

The overall probability for this case is $$\frac{9}{16} \cdot \frac{1}{2} \cdot \frac{1}{4}=\frac{9}{128}$$

  1. Two vertices lie on the same side of the square and the third vertex lies on the opposite side. This occurs with probability $\frac{1}{8}$.

Let the vertices be $(y,1)$, $(x,1)$, and $(z,0)$ where $y>x$. Then, the area is given by $\frac{1}{2}(y-x)$, meaning we need $y-x>\frac{1}{2}$. It is easy to find the probability for this case is $$\frac{1}{8} \cdot \frac{1}{8}=\frac{1}{64}$$

  1. Two vertices lie on the same side of the square and the third vertex lies on an adjacent side. This occurs with probability $\frac{1}{4}$.

Let the vertices of the triangle be $(x,1)$, $(y,1)$, and $(1,1-z)$ where $y>x$. Then, the area is given by $\frac{1}{2}(y-x)(z)$, meaning we need $(y-x)z>\frac{1}{2}$.

It is easy to see that this is only possible for $\frac{1}{2} \leq z <1$, in which case the probability is $\frac{2z-1}{8z^2}$. The probability for this case is thus $$\frac{1}{4} \cdot \int^{1}_{\frac{1}{2}} \frac{2z-1}{8z^2} \, dz=\frac{1}{64} \ln 4-\frac{1}{64}$$

Therefore, the final answer is $$\frac{1}{64} \ln 4-\frac{1}{64}+\frac{1}{64}+\frac{9}{128}=\boxed{\frac{9+4 \ln 2}{128}}$$

$\endgroup$
10
  • 5
    $\begingroup$ I think two points can be in the same quadrant $\endgroup$
    – Soham Saha
    Commented Mar 9 at 16:15
  • 1
    $\begingroup$ May I ask how you concluded that two points can't be in the same quadrant? $\endgroup$
    – user469053
    Commented Mar 9 at 16:24
  • 1
    $\begingroup$ Have you considered using determinants? $\endgroup$
    – user469053
    Commented Mar 9 at 16:25
  • 1
    $\begingroup$ @SohamSaha I figured out the error in my thinking: I assume that the two points also had to lie on the same side of the square. $\endgroup$
    – Indecisive
    Commented Mar 9 at 18:20
  • 1
    $\begingroup$ Do you want to consider the degenerate triangles whose vertices are all on one side? (Happens with probability $1/16$, as you probably figured.) Or are you conditioning on that not happening? $\endgroup$
    – Brian Tung
    Commented Mar 9 at 19:28

4 Answers 4

4
$\begingroup$

If I have a triangle in $\mathbb{R}^2$ with vertices at $(x_1,y_1)$, $(x_2,y_2)$, and $(x_3,y_3)$, the area of the triangle is $$\frac{1}{2}\Biggl|\begin{array}{lll}x_1 & y_1 & 1 \\ x_2 & y_2 & 1 \\ x_3 & y_3 & 1\end{array}\Biggr|,$$ where for a square matrix $A$, $|A|$ denotes the absolute value of the determinant of $A$. To avoid having to deal with the annoying $1/2$, we will look at situations where $$\Biggl|\begin{array}{lll}x_1 & y_1 & 1 \\ x_2 & y_2 & 1 \\ x_3 & y_3 & 1\end{array}\Biggr|\geqslant 1/2.$$

[https://www.cuemath.com/geometry/area-of-triangle-in-determinant-form/][1]

Everything is scale and translation invariant, so we can assume the square is in the plane with vertices at $(0,0)$, $(1,0)$, $(0,1)$, and $(1,1)$.

We let $b,t,l,r$ denote the bottom, top, left, and right edges of the square. We let $pqr$ ($p,q,r\in \{b,t,l,r\}$) denote a particular way for the vertices to land on the sides of the square. So $bbb$ means all vertices are on the bottom, $btl$ means the first vertex is on the bottom, the second is on the top, and the third is on the left. There are $1/64$ equally likely values of $pqr$. We will calculate the probability that the area $|T|$ of the triangle $T$ is at least $1/4$ given a particular $pqr$. We denote this by $\mathbb{P}(|T|\geqslant 1/4|prq)$. In other words, $\mathbb{P}(|T|\geqslant 1/4|ttb)$ denotes the probability that the area of the triangle is at least one quarter given that the first vertex is on the top edge, the second vertex is on the top edge, and the third vertex is on the bottom.

By symmetry, there are only four types of configurations we need to consider: All three points land on the same edge (which happens with probability $4/64=1/16$), two land on the same edge and one is on the opposite edge (which happens with probability $12/64=3/16$), two land on the same edge and one is on an adjacent edge (which happens with probability $24/64=3/8$), or all three land on different edges (which happens with probability $24/64=3/8$). All of the last cases are equivalent, since in that case, we have a side/adjacent side/opposite side triple.

If all three land on the same edge, the triangle has area zero, and $$\mathbb{P}(|T|\geqslant 1/4|ppp)=0$$ for $p\in \{t,b,l,r\}$.

Suppose that two land on a common edge and the third lands on the opposite edge. Without loss of generality, we can assume the first two land on the bottom and the third lands on the top. Then we have three random vectors $$\begin{pmatrix} X \\ 0 \end{pmatrix},\begin{pmatrix}Y\\0\end{pmatrix},\begin{pmatrix}Z\\1\end{pmatrix}.$$ We want to know what is the probability that $$1/2\leqslant \Biggl|\begin{array}{lll}X & 0 & 1 \\ Y & 0 & 1 \\ Z & 1 & 1\end{array}\Biggr|=|X-Y|.$$ We consider the probability that $X-Y\geqslant 1/2$ (which can happen only if $X\geqslant 1/2$) and note that, by symmetry, the probaiblity that $X-Y\leqslant -1/2$ is the same. We calculate $$\mathbb{P}(X-Y\geqslant 1/2) = \int_{1/2}^1\int_0^{x-1/2}dydx = 1/8.$$ So $\mathbb{P}(X-Y\leqslant -1/2)=1/8$, and the probability that the triangle has area at least $1/4$ in this case is $1/4$.

Assume that two vertices land on the same side and the third lands on an adjacent side. Without loss of generality, we can assume the first two vertices land on the bottom and the third lands on the left. Then we want to know the probability that $$1/2\leqslant \Biggl|\begin{array}{lll}X & 0 & 1 \\ Y & 0 & 1 \\ 0 & Z & 1\end{array}\Biggr|=Z|X-Y|.$$ Again, we check the probability that $Z(X-Y)\geqslant 1/2$ and then double this. The inequality can only be satisfied if $X-Y>1/2$, which can only happen if $X>1/2$. So $x$ will range over $(1/2,1)$, for a given $x$, $y$ will range over $(0,x-1/2)$, and for a given $x,y$, $z$ will range over $(\frac{1}{2(x-y)},1)$. Therefore we get \begin{align*}\mathbb{P}(|T|\geqslant 1/4|bbl) & = \int_{1/2}^1 \int_0^{x-1/2}\int_{\frac{1}{2(x-y)}}^1 dzdydx \\ & = \int_{1/2}^1 \int_0^{x-1/2} 1-\frac{1}{2(x-y)} dy dx \\ & = \int_{1/2}^1 x-1/2 - \frac{\log(x)-\log(1/2)}{2} dx \\ & = \frac{1}{2}\int_{1/2}^1 2x-1-\log(x)-\log(2)dx \\ & = \frac{1}{2}\Bigl[\frac{1}{4} -\frac{\log(2)}{2}+\frac{1}{2}-\frac{\log(2)}{2}\Bigr] \\ & = \frac{\frac{3}{4}-\log(2)}{2}.\end{align*} Doubling this yields that $$\mathbb{P}(|T|\geqslant 1/4|bbl)=\frac{3}{4}-\log(2).$$

Last, assume the three vertices land on three different edges. Without loss of generality, we can assume these are bottom, top, and left. We want to know the probability that $$1/2\leqslant \Biggl|\begin{array}{lll}X & 0 & 1 \\ Y & 1 & 1 \\ 0 & Z & 1\end{array}\Biggr|=|(1-Z)X+ZY|.$$ This can only ever be positive, so we need to calculate the probability that $(1-Z)X+ZY\geqslant 1/2$. Let $G=(1-Z)X+ZY$. Note that $$1-G=1-[(1-Z)X+ZY]=(1-Z)(1-X)+Z(1-Y),$$ which has the same distribution as $G=1-(1-Z)X+ZY.$ This is because $1-X,1-Y,Z$ are iid $\text{Uniform}(0,1)$ just as $X,Y,Z$ are. Since $G,1-G$ have the same distribution, $$\mathbb{P}(G\leqslant 1/2)=\mathbb{P}(1-G\leqslant 1/2).$$ But $1-G\leqslant 1/2$ iff $G\geqslant 1/2$, so $$\mathbb{P}(G\leqslant 1/2)=\mathbb{P}(G\geqslant 1/2).$$ Since $G$ is a continuous random variable, $\mathbb{P}(G=1/2)=0$, so $$\mathbb{P}((1-Z)X+ZY\geqslant 1/2)=1/2.$$

So the overall probability is $$\frac{3}{16}\Bigl(\frac{1}{4}\Bigr)+\frac{3}{8}\Bigl(\frac{3}{4}-\log(2)\Bigr)+\frac{3}{8}\Bigl(\frac{1}{2}\Bigr)=\frac{33-24\log(2)}{64}\approx 0.2556948.$$

Here's python code to simulate. It took me about 30 seconds to run. The result was $0.25581$.

import numpy as np
from numpy.linalg import det

sample_size = 10**6
result = np.empty(sample_size)

np.random.seed(123)

def put_vec(edge,position_along_edge):
    if edge == 'b':
        return([position_along_edge,0,1])
    elif edge == 't':
        return([position_along_edge,1,1])
    elif edge == 'l':
        return([0,position_along_edge,1])
    else:
        return([1,position_along_edge,1])
    
for trial in range(sample_size):
    p,q,r = np.random.choice(['b','t','l','r'],size=3,replace=True)
    X,Y,Z = np.random.uniform(size=3)
    result[trial] = 1*(abs(det(np.array([put_vec(p,X),put_vec(q,Y),put_vec(r,Z)]))) >= .5)
    
print(result.mean())
$\endgroup$
1
$\begingroup$

Here's a fully correct version of my solution that I tried to make in the original post (thanks to user469053 for providing the correct values for me to check against)

Without loss of generality, consider the square with vertices $(0,0), (0,1), (1,0), (1,1)$.

We proceed using casework:

  1. All three vertices are on different sides of the square. This occurs with probability $\frac{3}{8}$.

Let the vertices be $(x_1,0)$, $(0,y_1)$, and $(x_2,1)$. Using the determinant form for the area of a triangle, the area is given by $$A=\frac{1}{2} \begin{vmatrix} x_1 & 0 & 1 \\ 0 & y_1 & 1 \\ x_2 & 1 & 1 \end{vmatrix}=\frac{1}{2}x_1-\frac{1}{2}y_1 (x_1-x_2)$$

Assume that $x_1>x_2$. Then, $$\frac{1}{2}x_1-\frac{1}{2}y_1 (x_1-x_2)>\frac{1}{4} \implies x_1-y_1 (x_1-x_2)>\frac{1}{2}$$

For convenience, replace $x_1$ with $y$, $x_2$ with $x$, and $y_1$ with $z$. We now have the system of inequalities $\begin{cases} y-yz+xz>\frac{1}{2} \\ y>x \\ 0 \leq x,y,z \leq 1 \end{cases}$.

We now consider graphing the inequality $y-yz+xz>\frac{1}{2}$ with $z$ as a constant. The $x$-intercept is $\frac{1}{2z}$ and the $y$-intercept is $\frac{1}{2(1-z)}$.

  • If $0<z \leq \frac{1}{2}$, then the area of the region is given by $\frac{4z-1}{8z-8}$. Therefore, the desired probability for this case is $\int^{\frac{1}{2}}_{0} \frac{4z-1}{8z-8} \, dz=\frac{1}{8}(2-\ln 2)$.
  • If $\frac{1}{2} \leq z<1$, then the area of the region is given by $\frac{1}{8z}$. Therefore, the desired probability for this case is $\int^{\frac{1}{2}}_{0} \frac{1}{8z}=\frac{1}{8} \ln 2$.

The overall probability for this case is $$\frac{3}{8} \cdot 2 \cdot \left(\frac{1}{8}(2-\ln 2)+\frac{1}{8} \ln 2 \right)=\frac{3}{16}$$

  1. Two vertices lie on the same side of the square and the third vertex lies on the opposite side. This occurs with probability $\frac{3}{16}$.

Let the vertices be $(y,1)$, $(x,1)$, and $(z,0)$ where $y>x$. Then, the area is given by $\frac{1}{2}(y-x)$, meaning we need $y-x>\frac{1}{2}$. It is easy to find the probability for this case is $$\frac{3}{16} \cdot 2 \cdot \frac{1}{8}=\frac{3}{64}$$

  1. Two vertices lie on the same side of the square and the third vertex lies on an adjacent side. This occurs with probability $\frac{3}{8}$.

Let the vertices of the triangle be $(x,1)$, $(y,1)$, and $(1,1-z)$ where $y>x$. Then, the area is given by $\frac{1}{2}(y-x)(z)$, meaning we need $(y-x)z>\frac{1}{2}$.

It is easy to see that this is only possible for $\frac{1}{2} \leq z <1$, in which case the probability is $\frac{(2z-1)^2}{8z^2}$. The probability for this case is thus $$\frac{3}{8} \cdot 2 \cdot \int^{1}_{\frac{1}{2}} \frac{(2z-1)^2}{8z^2} \, dz=\frac{9}{32}-\frac{3}{8} \ln 2$$

Therefore, the final answer is $$\frac{3}{16}+\frac{3}{64}+\frac{9}{32}-\frac{3}{8} \ln 2=\boxed{\frac{33-24 \ln 2}{64}}$$

$\endgroup$
2
  • 1
    $\begingroup$ Nice! I'll just add a few more nifty facts about determinants: If $x_1,\ldots, x_n$ are vectors in $\mathbb{R}^n$, then if $A$ is the matrix with columns $x_1,\ldots, x_n$, the parallelepiped generated by $x_1,\ldots, x_n$ has $n$-dimensional volume $|\det(A)|$. If $x_1,\ldots, x_p$ are vectors in $\mathbb{R}^n$ with $p\leqslant n$, then $\sqrt{A^TA)}$ is the $p$-dimensional volume of the parallelepiped generated by $x_1,\ldots, x_p$. $\endgroup$
    – user469053
    Commented Mar 10 at 2:45
  • 1
    $\begingroup$ If $(x_1,y_1)$, $(x_2,y_2)$, $(x_3,y_3)$ are points in $\mathbb{R}^2$, then the vectors $(x_2-x_1,y_2-y_1)$ and $(x_3-x_1,y_3-y_1)$ generated a parallelepiped whose area is twice the area of the triangle with these three points as the vertices. This gives an alternative form $$\frac{1}{2}\Biggl |\det\begin{pmatrix} x_2-x_1 & y_2-y_1 \\ x_3-x_1 & y_3-y_1\end{pmatrix}\Biggr|,$$ equivalent to the $3\times 3$ formula with all $1$s in the right column that we used. $\endgroup$
    – user469053
    Commented Mar 10 at 2:47
1
$\begingroup$

Here is an outline of how you can use some known results to relatively quickly solve this in the general case. I will regroup the cases differently according to their simplicity.

  1. Two vertices on the same side, one on the opposite side ($p = 3/16$). This is just equivalent to the problem of finding the distance between two random points, which has a probability density $\rho_1(S) = 4(1-2S)$.

  2. Two vertices on the same side, one on the adjacent side ($p = 3/8$). This is a product distribution of a uniform distribution and the distribution in the previous case. Using the formula for the product distribution density we have $\rho_2(S) = 4(2S - \ln (2S) - 1)$.

  3. All three vertices are on different sides ($p=3/8$). This is a more complicated but known problem. The probability density in this case is given by $\rho_3(S) = 4((2S-1)\ln (1-2S) - 2S\ln (2S))$.

Combining the cases above we have $$\rho(S) = \frac{3}{16} \rho_1(S) + \frac{3}{8} \rho_2(S) + \frac{3}{8} \rho_3 (S) = 3\left( \left( S - \frac12 \right)\left( \frac12 + \ln \frac{1-2S}{2S}\right) - \ln (2S)\right), \quad S>0$$

Now we can do all sorts of things with this distribution. The probability that the area is greater than $x > 0$ is $$\int_x^{1/2} \rho(S) dS = \frac{15}{16} - \frac{3}{8} ((1 - 2x)^2 \ln(1 - 2 x) + 2 x (2 + x - 2 (1 + x) \ln(2x)))$$ Putting $x = 1/4$ we get $$\frac{15}{16} - \frac{3}{64} (9 + 8\ln 2) = \boxed{\frac{33-24\ln 2}{64}}$$ It is also possible to find the $n$-th moment of the distribution $$\int_0^{1/2} S^n \rho(S) dS = \frac{3 (5 + n + 2 (1 + n) H_n)}{2^{n+3} (1 + n)^2 (2 + n)},\quad n>0$$ where $H_n = 1 + \frac12 + \frac13 + \cdots + \frac1n$. For $n=1$ we get that the average area of inscribed triangle is $5/32$.

$\endgroup$
0
$\begingroup$

I would try to estimate this statistically in Excel. A square with each side 1 unit can have its lower left corner at the origin. Randomly select 3 x and y coordinate pairs where one coordinate in the pair is 0 or 1 and the other can be determined with =rand(), use the distance formula for each pair to find the sides of the triangle they form, then use Heron's Area Formula to find the area of the triangle. Do this 10,000 times and count up the number of times the triangle's area is $\geq$ .25. The first part of this video is helpful: https://www.youtube.com/watch?v=i4VqXRRXi68

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .