The secretary problem #
n candidates, totally ordered by quality, arrive in uniformly random order. On each arrival the
employer sees only the candidate's relative rank among those seen so far (relRank: how many
earlier candidates were better) and must hire or reject irrevocably, winning if the hired
candidate is the best overall. A permutation σ : Equiv.Perm (Fin n) gives the quality σ i of
the i-th arrival, and a rank-based rule (Rule) sees the list of relative ranks so far.
successProb rule n is the probability that the rule hires the best candidate when σ is
uniform.
The relative ranks of a uniform permutation are independent, the i-th uniform on {0, …, i}
(uniform_map_relRanks), so the problem is an instance of optimal stopping of independent
observations. The cutoff rule cutoffRule r rejects the first r - 1 candidates and then hires
the first candidate better than all before it. It wins with probability
(r - 1)/n · ∑_{i=r}^{n} 1/(i - 1) for r ≥ 2 and 1/n for r = 1 (successProb_cutoffRule,
successProb_cutoffRule_one). Backward induction shows that the cutoff optimalCutoff n, the
least r ≥ 1 with ∑_{i=r}^{n-1} 1/i ≤ 1, is optimal among all rank-based rules
(successProb_le_successProb_optimalCutoff). Quantitatively, no rule wins with probability more
than 1/e + 1/n, the cutoff ⌊n/e⌋ + 1 wins with probability at least 1/e - 1/n, and the
optimal success probability tends to 1/e.
Main definitions #
Cslib.Probability.OptimalStopping.Secretary.relRank: the relative rank of an arrival.Cslib.Probability.OptimalStopping.Secretary.Rule,.successProb: rank-based rules and their probability of hiring the best candidate.Cslib.Probability.OptimalStopping.Secretary.cutoffRule,.optimalCutoff: cutoff rules and the optimal cutoff.
Main results #
Cslib.Probability.OptimalStopping.Secretary.uniform_map_relRanks: the relative ranks of a uniform permutation are independent and uniform.Cslib.Probability.OptimalStopping.Secretary.successProb_cutoffRule: the success probability of a cutoff rule.Cslib.Probability.OptimalStopping.Secretary.successProb_le_successProb_optimalCutoff: the optimal cutoff rule is optimal among all rank-based rules.Cslib.Probability.OptimalStopping.Secretary.successProb_le_exp_neg_one_add,.exp_neg_one_sub_le_successProb_floor,.tendsto_successProb_optimalCutoff: the1/ebounds and limit.
References #
Relative ranks of a uniform permutation #
The relative rank of the i-th arrival when arrival j has quality σ j: the number of
earlier arrivals of higher quality. It is 0 exactly when the arrival is the best so far.
The relative ranks of all arrivals, in arrival order.
The uniform law on {0, …, i}, the law of the relative rank of arrival i (counting
from 0).
The relative ranks of a uniformly random arrival order are independent, the rank of arrival
i uniform on {0, …, i}.
Rank-based rules #
A rank-based stopping rule: it sees the relative ranks of the arrivals so far, most recent first, and decides whether to hire the current arrival.
The rule hires the best candidate of the arrival order σ.
The probability that the rule hires the best of n candidates arriving in uniformly random
order.
The reward for stopping, in terms of relative ranks: 1 if the current arrival is the best so
far and no later arrival is.
The success probability is the expected payoff of an optimal stopping problem whose observations are independent uniform ranks.
Cutoff rules #
The success probability of the cutoff rule cutoffRule (s + 1) with n candidates:
s/n · ∑_{i=s}^{n-1} 1/i for s ≥ 1, and 1/n for s = 0.
The backward recursion for cutoff values.
The cutoff rule: reject the first r - 1 arrivals, then hire the first arrival that is the
best so far.
The cutoff rule cutoffRule (s + 1) wins with probability cutoffValue n s.
The cutoff rule's success probability. Rejecting the first r - 1 ≥ 1 of n candidates
and then hiring the first best-so-far wins with probability (r - 1)/n · ∑_{i=r}^{n} 1/(i - 1).
Hiring the first candidate wins with probability 1/n.
Optimality #
The optimal cutoff: the least r ≥ 1 with ∑_{i=r}^{n-1} 1/i ≤ 1.
Optimality of the cutoff rule (Lindley; Dynkin): with n candidates, no rank-based rule
hires the best candidate with higher probability than the cutoff rule with the optimal cutoff.
The 1/e asymptotics #
No rank-based rule hires the best of n candidates with probability more than 1/e + 1/n.
Rejecting the first ⌊n/e⌋ candidates and then hiring the first best-so-far wins with
probability at least 1/e - 1/n.
The optimal probability of hiring the best of n candidates tends to 1/e.