10.3: Random Triangles
Preliminaries
Statement of the Problem
Suppose that a stick is randomly broken in two places. What is the probability that the three pieces form a triangle?
Without looking below, make a guess.
Run the triangle experiment 50 times. Do not be concerned with all of the information displayed in the app, but just note whether the pieces form a triangle. Would you like to revise your guess?
Mathematical Formulation
As usual, the first step is to model the random experiment mathematically. We will take the length of the stick as our unit of length, so that we can identify the stick with the interval \([0, 1]\). To break the stick into three pieces, we just need to select two points in the interval. Thus, let \(X\) denote the first point chosen and \(Y\) the second point chosen. Note that \(X\) and \(Y\) are random variables and hence the sample space of our experiment is \( S = [0, 1]^2 \). Now, to model the statement that the points are chosen at random , let us assume, as in the previous sections, that \(X\) and \(Y\) are independent and each is uniformly distributed on \([0, 1]\).
The random point \((X, Y)\) is uniformly distributed on \(S = [0, 1]^2\).
Hence \[ \P\left[(X, Y) \in A\right] = \frac{\area(A)}{\area(S)} \]
Triangles
The Probability of a Triangle
The three pieces form a triangle if and only if the triangle inequalities hold: the sum of the lengths of any two pieces must be greater than the length of the third piece.
The event that the pieces form a triangle is \(T_1 \cup T_2\) where
- \(T_1 = \left\{ (x, y) \in S: y \gt \frac{1}{2}, \; x \lt \frac{1}{2}, \; y - x \lt \frac{1}{2} \right\}\)
- \(T_2 = \left\{ (x, y) \in S: x \gt \frac{1}{2}, \; y \lt \frac{1}{2}, \; x - y \lt \frac{1}{2} \right\}\)
A sketch of the event \(T\) is given below. Curiously, \(T\) is composed of triangles!
The probability that the pieces form a triangle is \(\P(T) = \frac{1}{4}\).
How close did you come with your initial guess? The relative low value of \( \P(T) \) is a bit surprising.
Run the triangle experiment 1000 times and compare the empirical probability of \(T^c\) to the true probability.
Triangles of Different Types
Now let us compute the probability that the pieces form a triangle of a given type. Recall that in an acute triangle all three angles are less than 90°, while an obtuse triangle has one angle (and only one) that is greater than 90°. A right triangle, of course, has one 90° angle.
Suppose that a triangle has side lengths \(a\), \(b\), and \(c\), where \(c\) is the largest of these. The triangle is
- acute if and only if \(c^2 \lt a^2 + b^2\).
- obtuse if and only if \(c^2 \gt a^2 + b^2\).
- right if and only if \(c^2 = a^2 + b^2\).
Part (c), of course, is the famous Pythagorean theorem, named for the ancient Greek mathematician Pythagoras.
The right triangle equations for the stick pieces are
- \((y - x)^2 = x^2 + (1 - y)^2\) in \(T_1\)
- \((1 - x)^2 = x^2 + (y - x)^2\) in \(T_1\)
- \(x^2 = (y - x)^2 + (1 - y)^2\) in \(T_1\)
- \((x - y)^2 = y^2 + (1 - x)^2\) in \(T_2\)
- \((1 - x)^2 = y^2 + (x - y)^2\) in \(T_2\)
- \(y^2 = (x - y)^2 + (1 - x)^2\) in \(T_2\)
Let \(R\) denote the event that the pieces form a right triangle. Then \(\P(R) = 0\).
The event that the pieces form an acute triangle is \(A = A_1 \cup A_2\) where
- \(A_1\) is the region inside curves (a), (b), and (c) of the right triangle equations .
- \(A_2\) is the region inside curves (d), (e), and (f) of the right triangle equations .
The event that the pieces form an obtuse triangle is \(B = B_1 \cup B_2 \cup B_3 \cup B_4 \cup B_5 \cup B_6\) where
- \(B_1\), \(B_2\), and \(B_3\) are the regions inside \(T_1\) and outside of curves (a), (b), and (c) of the right triangle equations , respectively.
- \(B_4\), \(B_5\), and \(B_6\) are the regions inside \(T_2\) and outside of curves (d), (e), and (f) of the right triangle equations , respectively.
The probability that the pieces form an obtuse triangle is \[ \P(B) = \frac{9}{4} - 3 \ln(2) \approx 0.1706 \]
Proof
Simple calculus shows that \(\P(B_i) = 3/8 - \ln(2) / 2\) for each \(i \in \{1, 2, 3, 4, 5, 6\}\). For example \begin{align} \P(B_1) & = \int_0^{1/2} \frac{x \, (1 - 2 \, x)}{2 - 2 \, x} \, dx \\ \P(B_3) & = \int_0^{1/2} \left(y + \frac{1}{2 \, y} - \frac{3}{2} \right) \, dy \end{align} From symmetry it also follows that \(\P(B_i)\) is the same for each \(i\).
The probability that the pieces form an acute triangle is \[ \P(A) = 3 \ln(2) - 2 \approx 0.07944 \]
Proof
Note that \(A \cup B \cup R = T\), and \(A\), \(B\), and \(R\) are disjoint.
Run the triangle experiment 1000 times and compare the empirical probabilities to the true probabilities.