Two Random Cuts on a Rope: Chance of Forming a Triangle
Statistics & ExperimentsModel answerLast updated
Cut a unit-length rope at two independent uniform points and find the probability the three segments can be the sides of a triangle, with a clear derivation.
A rope of length 1 is cut at two locations. Each cut location is drawn independently from a uniform distribution on the interval from 0 to 1, and both cuts are made on the original rope at the same time. Ordering the two locations from left to right gives three segments.
Question: What is the probability that the three segments can be used as the side lengths of a (non-degenerate) triangle?
What is expected:
- State your modelling assumptions explicitly.
- Derive the probability rather than just quoting it.
- Verify your result with an independent second method or a sanity check.
- Briefly mention how the answer would change if the cutting process were different (for example, if the rope were cut once and then one of the resulting pieces were cut again).
Hints
Hint 1
Write the three segment lengths in terms of the two sorted cut points. Because they add up to 1, the triangle inequality for one side can be rewritten as a bound on that single side alone.
Hint 2
Show that all three triangle inequalities collapse to one condition: every segment must be shorter than 1/2. Then draw the unit square of cut pairs (x, y) and focus on the half where x < y.
Hint 3
To double-check, compute the probability of failure instead. A failure means one particular segment is at least 1/2, and these three events cannot overlap (apart from probability-zero boundaries). Compute each and subtract their sum from 1.
Model answer
Medium Try it yourself first — then compare your approach, complexity and edge cases.
Answer: 1/4
Assumptions
- The two cut points X and Y are independent, each Uniform(0, 1).
- Both cuts are made on the intact rope, not sequentially on a leftover piece.
- Equality cases (a segment of length exactly 1/2) have probability zero, so strict versus non-strict inequalities do not change the answer.
Step 1: Define the segments
Let U = min(X, Y) and V = max(X, Y). The segments are:
- a = U
- b = V - U
- c = 1 - V
with a + b + c = 1.
Step 2: Simplify the triangle condition
Three lengths form a triangle when each is smaller than the sum of the other two. Since the total is 1, "a < b + c" is the same as "a < 1 - a", i.e. a < 1/2. The same holds for b and c.
The segments form a triangle if and only if every segment is shorter than 1/2.
This reduction is the key step, and it is worth stating explicitly.
Step 3: Direct area computation
The pair (X, Y) is uniform on the unit square, so probability equals area. Consider the half where X < Y, so U = X and V = Y. The conditions become:
- a < 1/2 gives X < 1/2
- c < 1/2 gives Y > 1/2
- b < 1/2 gives Y - X < 1/2
These define a right triangle with vertices (0, 1/2), (1/2, 1/2), (1/2, 1). Both legs have length 1/2, so its area is 1/8.
The half where Y < X is symmetric and contributes another 1/8. Therefore:
P(triangle) = 1/8 + 1/8 = 1/4.
Equivalently, conditioned on X < Y (probability 1/2), the chance is (1/8)/(1/2) = 1/4.
Step 4: Check via the complement
Failure means some segment is at least 1/2. At most one segment can be that long (except on a probability-zero set), so the three failure events are disjoint:
- Left segment >= 1/2: both cuts fall in [1/2, 1]. Probability (1/2)^2 = 1/4.
- Right segment >= 1/2: both cuts fall in [0, 1/2]. Probability 1/4.
- Middle segment >= 1/2: requires |X - Y| >= 1/2, which is two corner triangles of the square, each of area 1/8, total 1/4.
Failure probability = 3/4, so success = 1 - 3/4 = 1/4. This agrees with Step 3.
Step 5: Elegant view with the simplex
The vector (a, b, c) is uniformly distributed on the triangle {a + b + c = 1, all >= 0}, which is the Dirichlet(1, 1, 1) distribution. The condition "all three below 1/2" carves out the medial triangle (joining the edge midpoints), which has exactly 1/4 of the area. The three removed corner triangles correspond to the three equal failure events of 1/4 each. That also explains why those events share the same probability: the three segments are exchangeable.
Optional simulation check
import random
def estimate(trials=1_000_000, seed=0):
rng = random.Random(seed)
hits = 0
for _ in range(trials):
u, v = sorted((rng.random(), rng.random()))
if max(u, v - u, 1 - v) < 0.5:
hits += 1
return hits / trials
print(estimate()) # about 0.25
The standard error with 10^6 trials is about sqrt(0.25 * 0.75 / 10^6) ≈ 0.0004, so the estimate should land within roughly 0.001 of 0.25.
Complexity
The analytical derivation is O(1). The simulation is O(N) time and O(1) memory for N trials.
Variants that change the answer
The cutting procedure matters, so confirm which one is intended:
- Cut once uniformly, then cut the longer piece uniformly: probability 2 ln 2 - 1 ≈ 0.386.
- Cut once uniformly, then cut a randomly chosen piece uniformly: probability ln 2 - 1/2 ≈ 0.193.
- Two simultaneous uniform cuts (this problem): 1/4.
Common mistakes
- Solving a different variant because the cutting process was not clarified.
- Checking only one inequality, such as only the middle piece, instead of all three.
- Forgetting the ordering factor. The 1/8 area is for X < Y only. You must double it (or divide by 1/2).
- Misdrawing the middle-segment failure region. |X - Y| >= 1/2 is two corner triangles, not one.
- Over-worrying about boundaries. Exactly-1/2 segments have probability zero.
What a strong answer sounds like
"Assume two independent uniform cuts. Because the pieces sum to 1, the triangle inequalities reduce to each piece being less than 1/2. In the unit square with x < y that is a right triangle of area 1/8; doubling for symmetry gives 1/4. As a check, each of the three ways to fail has probability 1/4, so 1 - 3/4 = 1/4. Geometrically it is the medial triangle of the simplex, which is a quarter of the area."