The Flashlight and Eight Batteries
The problem
You have 8 batteries. 4 work, 4 are dead — and they're indistinguishable. The flashlight needs two working batteries to turn on. Each attempt is one pair tested.
What is the minimum number of attempts that guarantees the flashlight will turn on?
Tempting (but wrong)
The two common wrong instincts:
-
"Just try pairs at random." With 4 working out of 8, the probability that a random pair both work is . You'll light it eventually, but the worst case is unbounded.
-
"Test every possible pair." There are pairs. Doable, but enormously wasteful — we're not asked for all working pairs, just one.
The right answer is much smaller than 28, and the strategy is structural, not random.