This logic puzzle says a girl has 10 socks: 5 black and 5 white. In the dark, how many socks must she take to guarantee a matching pair?
The answer is: 3 socks.
With only two colors available, the worst-case situation is that the first sock is black and the second sock is white. At that point, she still does not have a matching pair.
But the third sock must be either black or white. Whichever color it is, it will match one of the first two socks.
That means taking three socks guarantees at least one matching pair, no matter which socks are chosen first. This is a simple example of the pigeonhole principle: with only two possible colors, three selections force a duplicate color.


