.
Peter has many socks, all the same except that they are in nine different colours.
He is leaving to catch an early train to go on a business trip,
and he does not want to wake his wife, so he must pack in the dark.
He needs six pairs of socks, each sock in each pair the same colour.
How many socks must he take from his drawer to be sure of achieving this?
~~~~~~~~~~~~~~~~~~~~~
The problem's formulation in the post is correct and allows to get an accurate solution.
The term "many socks", used in the formulation, means
" many enough to make all necessary manipulations providing minimum guaranteed amount. "
Solution
In the worst case, Peter takes 9 socks of different colors (let say, of the colors 1,2,3,4,5,6,7,8,9),
from which he can not get a pair of the same color.
But when he takes any next sock (n. 10) from the great collection,
he inevitably will get one pair of the same color. Let this "same color" is "color 9".
Ok. So, after taking 10 socks, Peter has at least one pair; in the worst case, exactly
one pair. I will refer to it as "pair 1".
Next step Peter takes some sock n.11 from the great collection.
In the worst case it is a sock of the color 9 - then Peter just has the same "pair 1"
and 9 socks of different colors; but taking next sock n.12, he inevitably will have
the second matching pair.
Thus, after taking 12 socks from the great collection, in worst case Peter has 2 matching pairs
and (or plus) 8 non-matching socks.
You see this repeating cycle in my reasoning / (in the procedure):
- in the worst case, there are 8 non-matching socks in the selected collection;
- then adding two socks from the great collection makes/(adds) one additional
matching pair in/(to) the selected collection, in the worst case.
From it, easy logic allows us to conclude that the selected collection must have
8 + 2*6 = 8 + 12 = 20 socks (in the worst case) to provide 6 matching pairs.
ANSWER. Taking 20 soscks without looking at them guarantees 6 pairs of matching socks.
Solved.
----------------
15 taken socks, as stated in the post by @greenestamps, do not guarantee 6 matching socks.
20 taken socks, selected randomly without looking, do guarantee 6 matching socks.
So, having 20+8 = 28 socks of 9 different colors in great collection, as described in the problem,
is ENOUGH and does guarantee that the solution is possible.
////////////////////
To @greenestamps:
Some people have absolute ear for music: when music plays, they can recognize and name each note.
My daughter has such earing for music: when a piano plays, she sees the notes running in front of her eyes.
Similarly, I have absolute ear for Math, in that its part which I know.
It means that when I hear or see Math spoken or written, I 100% can say, where it is wrong
or how it should sound or how it should be written in a right way.
Sorry I misread and thought there were 6 colors, not 9. Here is the correction:
The worst case is that he picks his first 9 pairs all of different colors. Then
he keeps picking socks of the same color as the 10th sock, and the sock it
matched, until he has 12 of that same color and only 1 sock of each of the other
8 colors. So he must pick 20 socks to be absolutely sure that he has 6 pairs of
matching socks.
OK, I agree with Ikleyn, it's 20.
[The way I worded it, it sounds as though he had to pick those 20 socks in some
particular order, but he could possibly pick the same 20 socks in any order.]
Edwin