On this page
In the broken stick problem, a stick is broken into three pieces by choosing two points uniformly at random. What is the probability that you can take those three pieces and form a triangle?
How do you prove the probability is 1/4?
To form a triangle, three segments must satisfy the triangle inequality: the sum of any two side lengths must be strictly greater than the third side's length. For a broken stick, this means no single piece can be longer than half of the original stick (as noted by mathematicians Eugen J. Ionascu and Gabriel Prajitura, arXiv:1009.0890).
If we represent the stick as a line from 0 to 1, and the two breaks as points x and y, the sample space of all possible breaks forms a 1×1 square. The rule that "no piece is longer than 0.5" translates to three inequalities:
x < 0.5 (the left piece is shorter than half)
y - x < 0.5 (the middle piece is shorter than half)
1 - y < 0.5 (the right piece is shorter than half)
If you graph these conditions, the successful combinations cut out two small triangles inside the 1×1 square. Their combined area is 0.25, which gives us the 1/4 probability.
If you are stuck on a probability concept or unsure how to set up the inequalities, Fermi's AI tutor teaches rather than answers. It holds a line of reasoning across a session, notices where a student is stuck, and decides whether to explain, ask, or show.
How do you simulate the broken stick problem?
Reading a geometric proof is passive. Writing a short program to test the math turns it into an active exercise. In 2011, physicist Carl Wieman and his colleagues published a landmark study in *Science* showing that active engagement—like predicting outcomes and testing them with simulations—drastically improves learning compared to passive lectures (10.1126/science.1201783).
If you want to see how probability or geometry works in real time, the Simulation Lab has interactive simulations for the ideas that are easier to see than to read. You can also build your own.
Writing a script to verify abstract math is a powerful learning tool (read Write your own physics simulation in Python: a projectile in 30 lines). Here is how you can simulate the standard broken stick problem in Python:
```python import random
def simulate_standard(): trials = 100000 success = 0
for _ in range(trials): x, y = sorted([random.random(), random.random()])
if x < 0.5 and (y - x) < 0.5 and (1 - y) < 0.5: success += 1
print(f"Standard probability: {success / trials}")
simulate_standard() ```
Run this script, and the output will always settle close to 0.250.
What if you break the longer piece?
The 1/4 result assumes you pick the two break points at exactly the same time. If you change the protocol, the odds change entirely. Instead of relying on abstract math to find the new probabilities, we can modify our simulation to find out.
1. Break the longer piece: What if you break the stick once, find the longer of the two halves, and break *that* piece? This protocol forces a more even distribution of lengths.
```python def simulate_longer(): trials = 100000 success = 0
for _ in range(trials): break1 = random.random() longer = max(break1, 1 - break1) shorter = min(break1, 1 - break1)
break2 = random.random() * longer piece1 = break2 piece2 = longer - break2
pieces = [shorter, piece1, piece2] if max(pieces) < 0.5: success += 1
print(f"Longer piece probability: {success / trials}")
simulate_longer() ```
2. Break a random piece: What if you snap the stick once, pick one of the two pieces by flipping a coin, and break it again? Half the time, you accidentally pick the shorter piece. If the shorter piece is broken, the remaining untouched piece is guaranteed to be longer than 0.5, making a triangle impossible.
```python def simulate_random(): trials = 100000 success = 0
for _ in range(trials): break1 = random.random() piece_a = break1 piece_b = 1 - break1
if random.random() < 0.5: break2 = random.random() * piece_a pieces = [break2, piece_a - break2, piece_b] else: break2 = random.random() * piece_b pieces = [piece_a, break2, piece_b - break2]
if max(pieces) < 0.5: success += 1
print(f"Random piece probability: {success / trials}")
simulate_random() ```



