Skip to content
All posts

How many socks must you take in the dark to be sure of a pair? The pigeonhole principle for 9-to-12-year-olds

An open wooden drawer full of rolled socks in blue and red, mixed together, with a hand reaching down from above; on the right, three socks already taken out: blue, red and blue.

It's early, the room is dark, and the sock drawer is a jumble of blue and red socks. You don't want to wake anyone by switching on the light. How many socks do you need to take out to be sure you have two of the same color?

Many children answer "two", and some say "half the drawer". The real answer is smaller than most people expect, and the reasoning behind it is one of the neatest ideas in mathematics. It suits children aged roughly 9 to 12, and all you need is a bag and some socks.

The puzzle

Here is the version to read to your child:

A drawer holds lots of blue socks and lots of red socks, all mixed up. It is dark, so you can't see the colors. How many socks must you take out to be certain that two of them are the same color?

Let them guess before you say anything. Write the guess down. Then test it.

Try it with a bag

Put about ten socks of two colors into a cloth bag, or use two colors of building blocks if your socks are all the same. Then play two rounds.

  1. The lucky round: your child takes out two socks without looking. Sometimes they match, sometimes not. Two socks can give a pair, but they don't have to.
  2. The unlucky round: now your child is allowed to look, and their job is to avoid a pair for as long as possible. They take one blue, then one red. What happens with the third sock?

Whatever color it is, it matches one of the two already out. That's the answer: three socks are always enough. Not because you were lucky, but because you can't be unlucky three times in a row with only two colors.

This is worth saying aloud with your child:

Socks taken A pair is…
1 impossible
2 possible, but not certain
3 certain

"Possible" and "certain" sound alike in everyday talk, but in math they are very different. A lot of puzzles only become clear once children notice which one the question is asking for.

The idea behind it: think about the worst case

The trick is to imagine the unluckiest thing that could happen, and then add one more.

With two colors, the worst luck is one sock of each color. One more sock must repeat a color. Mathematicians call this the pigeonhole principle: if you put more things into boxes than there are boxes, at least one box gets two things. Here the colors are the boxes, and the socks are the things.

You can also show it with cups. Put two cups on the table, one per color, and drop socks in one at a time. With three socks and two cups, one cup must hold two.

Six more puzzles

Use the same question each time: what is the unluckiest thing that could happen?

Puzzle Question
1 The drawer has blue, red and green socks. How many must you take to be sure of a pair?
2 The drawer has exactly 10 red and 10 blue socks. How many must you take to be sure of two blue ones?
3 Same drawer. How many must you take to be sure of at least one sock of each color?
4 In a group of 13 people, is it certain that two were born in the same month? What about 12 people?
5 A bag holds 5 red, 5 blue and 5 green marbles. How many must you take to be sure of three of the same color?
6 Bonus: how many people do you need to be sure that two share a birthday (the same day and month)?

Answers

  1. 4 socks. The worst luck is one of each color: blue, red, green. The fourth sock must match one of them.
  2. 12 socks. The worst luck is taking all 10 red socks first. After that, every sock is blue, so two more give two blue ones.
  3. 11 socks. The worst luck is taking all 10 socks of one color first. The eleventh must be the other color.
  4. 13 people: yes, certain. There are only 12 months, so at most 12 people can all have different months. The thirteenth person must share a month with someone. 12 people: possible, but not certain, because each person might be born in a different month.
  5. 7 marbles. The worst luck is two of each color, which is 6 marbles. The seventh makes three of one color.
  6. 367 people. A year has at most 366 different birthdays, counting 29 February. With 367 people, two must share one.

Puzzles 2 and 3 often surprise children: the same drawer gives very different answers depending on exactly what you want to be sure of. Ask them to explain each answer in one sentence that starts with "The worst that can happen is…".

Make up your own

Once the idea clicks, let your child invent puzzles for you. Good ones change one thing at a time: more colors, a different number of each color, or a bigger target ("three the same", "one of each"). Ask them to check their own answer with the bag before they give it to you.

In Dologi's Logic topic, the "How many weighings?" puzzles use the same kind of thinking: children find the heavier ball and keep weighing until they are sure, however the scale tips. Planning for the unluckiest result is exactly what makes an answer certain.

In short

  • With two colors of socks, three socks are always enough for a pair; two are possible, not certain.
  • Imagine the unluckiest case, then add one: that's the pigeonhole principle.
  • Small changes to the question ("two blue", "one of each") can change the answer a lot.
  • Encourage your child to explain with "The worst that can happen is…".

Read more: Classic logic puzzles for 10-to-12-year-olds with step-by-step solutions: mislabeled boxes, three switches and one bulb