Nib asked, and Nib — askNib's tutor — drew the answer live at a whiteboard. This is the spoken transcript; enable JavaScript to watch it drawn.
How can 20 guesses find one number in a million? (for a curious adult who has never programmed). Cover, in this order: How do you find a hidden number when you only hear higher or lower?; Why do twenty guesses cover a million?; What must be true of a list before you can search it by halving?; How do you search a sorted list by halving, step by step?; Why is binary search famously easy to get subtly wrong?; Where else does halving the problem show up? — page 6: Halving Beyond Searching
Set the numbers aside. We really had a pile of possibilities, and a test that rules out half of them.
A bug hides somewhere in a thousand changes. Test the middle one. If it's broken, the culprit is earlier; if fine, it's later. Half gone.
Halve it each time: 1000, then 500, 250, 125. About ten halvings find the one bad change out of a thousand.
In twenty questions, asking 'Is it alive?' splits the possibilities roughly in half. 'Is it a toaster?' eliminates almost nothing. So ask questions that halve.
The rule from page three still holds: every test must point to one side. For bugs, time order does that. For twenty questions, a question that halves the possibilities does it.
A million shrinks to one in twenty steps, whenever your question splits evenly and points to the right half. Hunt for that question.
So the next time you face a mountain of possibilities, don't march through it. Ask the question that cuts it in half, and let the doubling work for you.