There's a famous sock problem that sounds like a lot of work, and then turns out to take just a few socks.
Here's the puzzle:
The power is out, so it's pitch dark. Your sock drawer is full of black socks and white socks, all jumbled together, with plenty of each colour. You can't see anything.
You reach in and grab some socks. What is the smallest number you must grab to be completely certain you have a matching pair?
Note the word certain. We don't want "probably" or "if I'm lucky". We want a guarantee, even if the universe is being as unhelpful as possible.
Have a guess before you read on.
Stop and Think
Hint 1: Can you be certain with just 2 socks? What could go wrong?
Hint 2: Imagine the universe is out to get you. You pick one sock and it's black. What colour would the unluckiest second sock be?
Hint 3: After that unlucky pair, what happens to your next sock, whatever colour it is?
Think Like a Grumpy Universe
With 2 socks you might get one black and one white. That's the unlucky case. So 2 isn't enough.
Now grab a third sock. Whatever colour it is, it has to be either black or white. And you already hold one black and one white. So the new sock must match one of them!
2 socks: black + white → no match (bad luck!)
3 socks: whatever the third is, it matches one of the first two → match guaranteed
So the answer is 3 socks, not 10, not a whole drawerful.
The Pigeonhole Principle
This idea has a grand name: the pigeonhole principle.
Imagine some pigeons flying into pigeonholes. If there are more pigeons than holes, at least one hole must hold two pigeons. There's no way around it.
Socks are the pigeons. Colours are the holes.
With 2 colours (holes), the 3rd sock (pigeon) has to share a hole with an earlier one. That's why it's guaranteed.
Notice it doesn't matter which sock is picked, or how many socks are in the drawer (as long as there are enough of each colour). It's a promise that can't be broken.
More Colours, More Socks
What if the drawer has three colours: black, white and blue?
The unluckiest start is one sock of each colour: black, white, blue. That's 3 socks and still no match. But sock number 4 must repeat a colour.
2 colours → grab 3 socks
3 colours → grab 4 socks
4 colours → grab 5 socks
any number of colours → grab one more sock than the number of colours
The rule is "number of colours + 1". We checked it with a computer by trying every possible handful for small drawers, and it never failed.
Pigeonholes Are Everywhere
The same idea shows up in surprising places:
There are 12 months in a year, so if 13 people are in a room, two of them must have a birthday in the same month. No exceptions!
There are 366 possible birthdays (counting 29 February), so with 367 people, two of them are certain to share a birthday.
Notice the shape: more things than boxes means some box gets two.
Try It Yourself
Four colours. Your drawer has red, green, blue and yellow socks. How many do you grab to be certain of a matching pair?
A real pair-up. You have 10 black socks and 10 blue socks in the dark, and you want a matching pair of blue socks. How many must you take to be sure? (Careful, this one is tricky!)
Birthday months. What's the smallest group of people where two must share a birthday month?
Check your answers: with four colours you need 5 socks. For a blue pair, the unluckiest thing that can happen is that you pull out all 10 black socks first, then a blue one, so you need 12 socks to be sure of two blue ones. And you need 13 people to be sure two share a birthday month.
The OddMaths Takeaway
You can be completely certain of something without knowing anything about what you'll pick. You only need to think about the worst luck imaginable, and then see what's forced to happen after it.
The pigeonhole principle is one of the simplest ideas in maths, but mathematicians use it to prove things that sound impossible. And it all starts with a messy sock drawer.