The Secretary Problem and the 1/e Rule: Optimal Stopping in Interviews

You are interviewing candidates for a job. There are n candidates total. You interview them one at a time, in random order. After each interview, you must immediately decide whether to hire the candidate or reject them. Once you reject, you cannot go back. You can only see the relative ranking of candidates you have interviewed so far. Your goal is to maximize the probability of hiring the absolute best candidate. What is the optimal strategy?

This is the secretary problem, also known as the marriage problem, the sultan’s dowry problem, or the best-choice problem. The optimal strategy is one of the most beautiful results in optimal stopping theory: reject the first n/e candidates, then hire the next candidate who is better than everyone seen so far. This strategy maximizes your probability of hiring the best, and that probability is also 1/e ≈ 0.368. Quant firms have asked the secretary problem for decades, and it remains a regular feature of probability-heavy interviews in 2026.

The strategy: look-then-leap

Pick a threshold r. Interview the first r candidates and reject all of them, but track the best score seen. Starting with candidate r+1, hire the first candidate who is better than everyone in the first r. If no such candidate appears, hire the last candidate (or accept that you lose).

The optimal r for large n is n/e, where e ≈ 2.718. So you reject the first 37% of candidates and accept the next one who beats everyone in the rejected pool. The probability that this strategy hires the absolute best candidate is also approximately 1/e ≈ 36.8%.

Why the look phase is essential

Without a look phase, you have no information about how good “good” is. The first candidate you see could be average, terrible, or excellent — but to you they are just “the best so far” because you have no comparison points. If you hire too early, you risk hiring a mediocre candidate and missing better ones later. If you wait too long, you risk passing the actual best candidate and being stuck with worse ones.

The look phase calibrates the bar. After seeing r candidates, you know roughly what good looks like. Anyone strictly better than the best of those r is a strong signal that they could be the overall best, and your accept rule fires.

The optimization: why 1/e?

The probability that this strategy hires the best, as a function of the threshold r, is:

P(r) = (r/n) × Σ from i=r+1 to n of (1/(i-1))

For large n, the sum becomes (r/n) × ln(n/r). Maximizing this over r with x = r/n: maximize x × ln(1/x) = -x ln x. Take the derivative: -ln x - 1 = 0, giving x = 1/e. The maximum value is x ln(1/x) = (1/e) × 1 = 1/e.

So the optimal proportion is 1/e and the probability of success at this proportion is also 1/e. Both numbers being the same is one of the cute coincidences of the problem.

The proof sketch

Why does P(r) = (r/n) × Σ from i=r+1 to n of (1/(i-1)) work?

The strategy succeeds iff the best candidate is in some position i > r AND the best of the first i-1 candidates is in the first r positions (so we have not already accepted someone before position i).

For each fixed position i > r:

  • Probability the best candidate is in position i: 1/n.
  • Conditional on this, probability that the best of the first i-1 is in the first r positions: r/(i-1). (Because the first i-1 positions are uniformly random among the n-1 non-best candidates plus the best is at position i; we need the maximum of the i-1 to fall in the first r.)

So the contribution of position i is (1/n) × (r/(i-1)). Summing over i from r+1 to n gives (r/n) × Σ (1/(i-1)). As n grows, the sum approaches the integral ∫ from r/n to 1 of dx/x = ln(n/r), giving the asymptotic formula.

Variations

  • Win the best or get the second best. The threshold drops because the success criterion is easier. The 1/e rule is no longer optimal.
  • Maximize expected rank. If your goal is to hire someone with high expected rank rather than the best with high probability, the strategy changes substantially. The optimal stopping point is later.
  • Known distribution. If you know the score distribution of candidates (not just relative rankings), you can do better than 1/e using threshold strategies based on absolute scores.
  • Recall allowed. If you can go back and hire a previously-rejected candidate, the problem becomes trivial — wait until you have seen all candidates and pick the best.
  • Multiple acceptances. Hiring k candidates from n, maximizing the probability that one of them is the best.
  • Online matching variants. “Online bipartite matching” generalizes the secretary problem to networks of secretaries and tasks. Used in modern ad-auction and ride-hailing matching algorithms.

What quant interviewers test

The secretary problem is a staple at trading firms because the underlying skill — reasoning about optimal stopping under uncertainty — is exactly the skill traders use to decide when to enter or exit positions. The look-then-leap structure is also analogous to “calibration phase, then act” decision rules in algorithmic trading.

Signal layers in a strong answer:

  1. Recognize the structure. The candidate identifies the problem as optimal stopping rather than a simple combinatorial puzzle.
  2. Articulate look-then-leap. The candidate proposes the strategy and intuits why a calibration phase is necessary.
  3. Derive the probability formula. The candidate sets up the conditional probability sum without errors.
  4. Solve for the optimum. The candidate maximizes x ln(1/x) by taking the derivative and finding x = 1/e.
  5. State the 1/e cute fact. A polished candidate notes that the optimal threshold and the probability of success are both 1/e.

Real-world applications

The secretary problem is the prototype for a class of problems where decisions must be made sequentially and irrevocably under uncertainty. Real applications:

  • House-hunting. Look at houses, calibrate, then accept the first house better than your calibration set.
  • Online auctions. Set a reserve price after observing some bids.
  • Online ad matching. Match ad slots to advertisers as they arrive, with no recall.
  • Marriage / dating. The original “marriage problem” framing — date a calibration set, then propose to the next person who exceeds it. Cited semi-seriously in self-help literature.

The applicability is broader than the strict mathematical setup because the underlying principle — calibrate before committing — generalizes even when the optimal threshold is not exactly 1/e.

Is it asked in 2026?

Yes, regularly at quant interviews. Jane Street, Citadel, HRT, Two Sigma, Optiver, and SIG ask versions of the secretary problem at most levels. Tech interviews rarely ask the pure problem, but ML system design interviews sometimes ask online-matching variants when discussing real-time ad ranking or recommendation systems.

Frequently Asked Questions

Why is the answer 1/e?

Because x ln(1/x) is maximized at x = 1/e, and the probability of success under the look-then-leap strategy with proportion x approaches x ln(1/x) for large n. The fact that both the threshold and the probability are 1/e is a coincidence of the asymptotic.

Does the strategy work for small n?

Yes, but the optimal threshold is computed exactly, not as 1/e. For small n the discrete optimization gives slightly different thresholds. For n = 10, the optimal r is about 3 (close to 10/e ≈ 3.68 rounded down).

What if I want to maximize average quality instead of probability of best?

Different objective gives different strategy. The threshold for “maximize expected rank” is much higher (closer to n/2 than n/e), because you are less aggressive about waiting for the best.

Is the secretary problem related to multi-armed bandits?

Conceptually yes — both are sequential decision problems under uncertainty. Bandits typically allow revisiting (you can pull an arm multiple times), while the secretary problem does not. The mathematical machinery is related; the strategies are different.

Why is this question still asked in 2026?

Because the underlying skill — reasoning about look-then-leap strategies under irrevocable decisions — is genuinely useful in trading. The 1/e answer is well-known, but the variations and the proof are where the real signal happens.

Scroll to Top