The Art of Knowing When to Stop
Imagine you're hiring a secretary from a pool of N candidates. You interview them one at a time, and after each interview you must immediately accept or reject — no going back. How do you maximize your chances of hiring the very best? This deceptively simple question, known as the secretary problem, has one of the most elegant solutions in all of mathematics: reject the first 37% of candidates, then hire the next one who is the best you've seen so far.
The 1/e Rule
The magic number is 1/e ≈ 0.3679, where e is Euler's number. You use the first ⌊N/e⌋ candidates as a calibration sample — observing their quality but never hiring them. Then you enter the selection phase: hire the first candidate who exceeds the maximum quality seen during calibration. This strategy selects the absolute best candidate approximately 1/e ≈ 36.8% of the time, regardless of N.
Visualizing the Strategy
The simulation shows candidates as bars of varying height representing their quality. The gray exploration phase (first 37%) establishes a benchmark. In the cyan exploitation phase, the algorithm selects the first candidate who surpasses this benchmark. The highlighted candidate is the one selected. Below, the success rate curve shows how performance varies with the stopping fraction — peaking sharply at 1/e.
Beyond Hiring
The secretary problem is the foundation of optimal stopping theory, which applies whenever you must make irreversible decisions with incomplete information. Should you accept this apartment or keep looking? When should you sell your stocks? The 37% rule provides a mathematically optimal framework for these everyday decisions. Variants of the problem relax assumptions about recall, information, and objectives.