Matching Socks

 
Matching Socks

Problem statement:

You are about to leave for holiday, but you forgot socks! You race back to your room, but all the lights are off, so you can’t see the color of the socks.
 
Never mind, because you remember that in your drawer there are ten pairs of white socks, ten pairs of black socks, and eleven pairs of blue socks, but they are all mixed up.
 
How many of your socks do you need to take before you can be sure to have at least one matching pair?

Done thinking? Click here to view the solution.

The answer is four. 
 
Although there are many socks in the drawer, there are only three colors, so if you take four socks then you are guaranteed to have at least one matching pair.