Quant Memo
Core

Breaking a Stick Into a Triangle

Break a stick at two random points into three pieces — what's the chance they form a triangle? The puzzle rewards translating a geometry question into a picture of the sample space itself.

Prerequisites: Choosing Coordinates That Kill the Problem

Take a stick of length 1. Pick two points on it uniformly at random and break the stick at both — you now have three pieces. What's the probability that those three pieces can be arranged into a triangle?

Try it before reading on. The instinct is to guess something close to a half, or to reach for calculus. Neither is needed — the whole problem collapses once you stop thinking about "pieces of a stick" and start thinking about a single point on a two-dimensional map.

Setting up the picture

Call the two break points xx and yy, both drawn uniformly from [0,1][0,1]. Every possible pair (x,y)(x, y) is a point inside the unit square, and because xx and yy are independent and uniform, that square is the sample space — every point in it is equally likely, so a probability is just an area.

Assume for a moment x<yx < y (you'll double back for the symmetric case). Then the three pieces have lengths xx, yxy - x, and 1y1 - y. Three segments form a triangle exactly when no one piece is longer than the sum of the other two — equivalently, no piece exceeds half the total length. With total length 1, that means all three pieces must be shorter than 12\tfrac{1}{2}.

Turning "can these three lengths form a triangle" into "is this point inside a region of the square" is the whole trick. Once the condition on xx and yy is written down, the probability is just (area of the good region) ÷ (area of the square).

Working the three inequalities

Write out the three no-piece-too-long conditions for x<yx < y:

x<12,yx<12,1y<12x < \frac{1}{2}, \qquad y - x < \frac{1}{2}, \qquad 1 - y < \frac{1}{2}

The first says the left piece is short. The third rearranges to y>12y > \tfrac{1}{2}: the right piece is short. The middle one, y<x+12y < x + \tfrac{1}{2}, says the middle piece is short.

Plot these three lines inside the triangle 0<x<y<10 < x < y < 1 (half the unit square, since we assumed x<yx<y). Shading the region where all three hold carves out a smaller triangle in the middle of that half-square. Working the vertices out — the lines x=12x=\tfrac12, y=12y=\tfrac12, and y=x+12y = x+\tfrac12 meet the boundary x<y<1x<y<1 at (0,12)(0,\tfrac12), (12,12)(\tfrac12,\tfrac12), and (12,1)(\tfrac12,1) — that inner triangle has area exactly 14\tfrac{1}{4} of the area of the x<yx<y half-triangle (which itself has area 12\tfrac12), so its area relative to the full unit square is 18\tfrac18.

Doubling for the symmetric case y<xy < x gives another region of area 18\tfrac{1}{8}, for a total good area of 14\tfrac{1}{4} out of the full square's area of 1.

P(triangle)=14P(\text{triangle}) = \frac{1}{4}

Only one time in four does a randomly broken stick make a triangle — most breaks produce one piece that's simply too long relative to the other two, because a uniform break point has a real chance of landing very close to one end.

0 1 0 1 y x x = y
The shaded diamond — one quarter of the unit square's area — is exactly the set of break points that form a triangle.

The transferable technique

Whenever a puzzle involves several independent uniform random quantities and a geometric condition on them (triangle formation, whether points fall within a distance, whether a sum stays under a bound), the move is the same: let the variables be coordinates, draw the region satisfying the condition, and read off a probability as a ratio of areas or volumes. This turns algebra-heavy conditional reasoning into a single picture, and it's the standard opening move for the whole family of stick-breaking, meeting-time, and random-point puzzles that show up in quant interviews.

When a puzzle gives you two or more independent uniform variables, sketch the square (or cube) immediately — most of these problems are solved the moment the picture is right, well before any integral is needed.

Related concepts

Practice in interviews

Further reading

  • Mosteller, Fifty Challenging Problems in Probability
ShareTwitterLinkedIn