Finding A Pair of Socks in the Dark: Recreational Mathematics and Using the Pigeonhole Principle with Young Children

Matthew Oldridge
2 min readNov 3, 2021

A piece I wrote about recreational mathematics inspired by (of course) Martin Gardner, is far and away the most popular thing I have ever written on Medium. Every week, it just keeps going, with hundreds of people reading it. To this day, I do not know why that is. Lots of recreational math enthusiasts out there, maybe?

A problem I believe attributable to Gardner, which I will be trying with primary-aged children, concerns two different colours of socks in a drawer, and a “picker” trying to make a pair in the dark?

Here is the problem formulation:

There are 20 black socks, and 20 white socks in a drawer. If I get up and get dressed in the dark, to avoid waking my family, how many socks must I pick out of the drawer, to be sure I have a pair?

You may find it likely that the common misconception here is simply to say: 4. As in, we might be thinking of picking two pairs worth of socks, and therefore being sure we have one pair. This logic does not work.

The pigeonhole principle here is helpful, as, if we put one sock in each “pigeonhole” (imagine literal cubbyholes, like mailboxes in an office or school, for staff), then at some point we will place a sock in a cubbyhole, and the result will be that we have “forced” there to be a pair.

I don’t see the pigeonhole principle articulated in curriculum documents for children, but it sure is powerful.

Consider this solution:

The first pick is either a black or white sock. After this pick you have a black, or a white sock.

The second pick is either a black or white sock. After this pick you have a black or a white, and a black or a white. Possibilities: WW, BB, WB, BW. Aha- we see that 2/4 possibilities have not given us a pair. Let’s keep going.

On the third pick, we will pick black or white, obviously. Now consider our possibilities from the last pick: WW, BB, WB, BW. Regardless of whether the third pick is black or white, we have had at least one black or white already in the WB and BW combinations. Therefore, regardless of which we get on the third pic, we complete a pair.

The answer, while intuitive after you see it, is non-obvious from the start. This could be a powerful general problem to try with kids- there is a low barrier to entry (everyone wears socks), and no complicated math knowledge is involved, just learning to keep our thinking simple, and perhaps to make tree diagrams for a more fulsome proof.

@MatthewOldridge teaches math to young children.

Matthew Oldridge

Writing about creativity, books, productivity, education, particularly mathematics, music, and whatever else “catches my mind”. ~Thinking about things~