There are 100 black socks and 100 white socks mixed up in a drawer. If you have to pick socks blindly from the drawer, how many socks do you need to take out to be sure that you have a matching pair of socks?
Updated: Sept. 28, 2023 — Training Time: 1 Minute
Overseen by: Archangel Macsika
Topic: Data Science.
Difficulty: Easy.
Companies who previously asked this: -
Objective: There are 100 black socks and 100 white socks mixed up in a drawer. If you have to pick socks blindly from the drawer, how many socks do you need to take out to be sure that you have a matching pair of socks?
Short Answer: 3 picks.
Full Solution
The question here requires us to find a matching pair of socks of either white or black, not a specific color.
Let B represent black and W represent white.
If we pick 2 socks blindly from the drawer as the minimum, the possibility of getting a pair is 50%.
Since we may arrive at either one of the combination: BB, BW, WB, WW.
On the other, if we pick 3 socks blindly from the drawer as the minimum, the possibility of getting a pair is 100%.
The combinations that come out from 3 picks can be BWW, BBW, BBB, WBB, WWB, WWW.
Therefore, picking a minimum of 3 socks means we can always pick a pair of socks with matching color from the drawer if we pick blindly.