◍ Hidden Spheres · exhibit nº 39

The Best of the Lot

when to stop looking, if you can never go back

A hundred candidates will come past you, one at a time, in no particular order. You may take one. But you must decide about each one on the spot: take them and the search is over, or let them go and they are gone for good. You know nothing about them in advance. All you can ever tell is how the one in front of you compares with those you have already seen. You want the very best of the hundred. How should you choose?

let 37 go, then take the first who beats them

For the curious kid.

If you take the first candidate, you get the best one time in a hundred, by pure luck. If you wait for the last, the same. In between there is a trap on each side. Choose too early and you have nothing to compare with: the one you take may look good only because you have seen so few. Choose too late and the best has probably already gone past, and you let them go.

The way through is to split the search in two. First, only look. Let a number of candidates go by, however good they seem, and remember the best of them. Then, start choosing: take the very first candidate who is better than everyone you let go. Press Search once to watch it happen. The shaded bars are the ones let go, the dashed line is the best of them, and the gold bar is the one taken.

How many should you let go? Slide the number and press A thousand searches each time, or press Try every number. The answer is 37 out of a hundred. Let 37 go, and you end up with the very best of all hundred 37% of the time. That does not sound like much, until you remember that you never saw the future and could never go back. No rule of any kind does better.

Look at the tally to see what it costs. Another 37% of the time the best candidate was among the 37 you let go. Then nobody later can beat them, you never choose, and you are left with whoever comes last. The rule is the best there is, and more than a third of the time it leaves you with pot luck.

Deeper.

Call the number let go k, out of n. The rule ends with the best exactly when the best is at some place j after k, and the best of the first j − 1 candidates is among the first k, so that nobody tempts you before j. The best is at place j with chance 1/n, and the second condition has chance k/(j − 1). Add those up from j = k + 1 to n and the chance of success is (k/n)(1/k + 1/(k + 1) + … + 1/(n − 1)). That is the dashed curve. For a large crowd the sum is close to a logarithm, the chance becomes (k/n) ln(n/k), and its highest point is at k/n = 1/e, where its value is also 1/e: 36.79%. The share to let go and the chance of success are the same number.

The curve is flat on top. Letting go anything from 30 to 45 still gives better than 36%, so the rule forgives a poor count. It is steep on the left: let only 10 go and the chance is 23.5%. Impatience costs more than patience. With 37 let go, you get one of the best three 57% of the time. But the average candidate you end with is beaten by 19 of the hundred, dragged down by the third of searches that end with the last one.

The puzzle went round American mathematics departments in the 1950s. Martin Gardner printed it in 1960, and Dennis Lindley published the solution in 1961. Astronomers like to add that Johannes Kepler met eleven candidates for a second wife between 1611 and 1613, and married the fifth. The real world is kinder than the puzzle. You can often go back, you usually know something about candidates in general before you start, and second best is not a failure.

That middle point changes everything. If a candidate comes with a number that means something by itself, and you know how such numbers are spread, you need not waste a third of the search learning what good looks like. Type the six-letter word for the numbers a judge holds up, and the room will play that game.

First find out what good looks like. Then take the first one better.