Combinatorics: How many ways to wear these socks.

Four socks in a drawer: two whites and two blacks. How many sock combinations can I wear?

It is obvious to me that the answer is four:

1. Two white socks
2. Two black socks
3. White on the left foot, black on the right foot
4. Black on the left foot, white on the right foot

However, I am having trouble devising the proof of this. If I start with the left foot, then I have four socks to choose from, but two are identical to others so I don't take them into account:

$$\frac4{1+1} = 2$$

Then I take the right foot, which has three to choose from but one is identical:

$$\frac31 = 3$$

Then $2+3=5$, which is not the right answer! What am I doing wrong here?

My goal is to know how to generalise. Next time I may have 20 different colours, and arbitrary numbers of each colour sock.

Thanks.

-
I don't get why the downvotes... – user38268 Feb 25 '12 at 13:51
@dotancohen Can't you also wear no socks? – Pedro Tamaroff Feb 25 '12 at 14:26
@Peter: 9 Possibilities! Why not two socks on each foot? Why not all four on one foot? I think that you've just made the problem much more interesting! – dotancohen Feb 25 '12 at 15:21
@dotancohen Yes! Just because we are supposed to wear socks in one way doesn't mean we can't wear them as we please, or wear no socks at all! – Pedro Tamaroff Feb 25 '12 at 15:26
My daughter went out the house today with one blue sock and one Dora sock. Did she somehow know about this thread? I blame you, Peter! – dotancohen Feb 26 '12 at 8:32

Trying to correct your second answer, you might have written $\dfrac{2}{2}+\dfrac{2}{2}=2$ distinct colour choices for the left foot and either $\dfrac{1}{1}+\dfrac{2}{2}=2$ or $\dfrac{2}{2}+\dfrac{1}{1}=2$ for the right foot (depending on which colour you had chosen for the left foot, though it makes little difference here).

Then, instead of adding, you should have multiplied $2 \times 2 =4$ to give the final result.

-
Thank you! When I read your explanation I see it clear as day. This answer addresses exactly the issue that I had trouble with: I was dividing after adding the different colours, whereas I should have been divided for each colour. Thanks! – dotancohen Feb 26 '12 at 8:41

You have $2$ choices of colour for the first foot then there will still be socks of each colour left no matter what you pick, so there will be $2$ choices of colour for the second foot.

Hence $2\times 2 = 4$ possibilities in all!

-
Thanks, but looking at the first foot, how do I get to the fact that there are two choices from the four socks? I would start with four possible socks. Then what do I divide that 4 by to get to two possibilities? Intuitively know that the answer is to divide by 2, but how do I get to that 2? In other words, I would like to know how to generalise. Next time I may have 20 different colours, and arbitrary numbers of each colour sock. – dotancohen Feb 25 '12 at 13:44
Ah but you didn't ask that! Then it becomes a different problem. Say you have n colours of sock and that exactly r of these you have 2 or more socks. For the first foot you may choose one of the r colours and be able to choose any of the remaining n colours of sock for the second foot giving rn possibilities. Alternatively you may have chosen one of the n-r colours for which you only have one sock. Here you would then be forced to choose from the n-1 remaining colours. This gives a further (n-1)(n-r) possibilities. This in total you have rn + (n-1)(n-r) = n^2 - n + r possibilities. – fretty Feb 25 '12 at 13:53
Thank you. So I see that no matter how many socks of each colour exist, there remain only the amount of colours to be chosen from. Once we consider how many socks of each colour exist, we get into the realm of statistics. – dotancohen Feb 25 '12 at 15:26
This has nothing to do with statistics...all that matters is how many colours there are and whether for each colour you have one sock or more than two socks. That is all the info you need to know (you don't even need to know the numbers of each colour, just need to know which case you are in). – fretty Feb 25 '12 at 15:32

I will put the important point at the beginning. You gave a careful, well-written, and detailed proof. Here it is, copied verbatim:

It is obvious to me that the answer is four:

1. Two white socks
2. Two black socks
3. White on the left foot, black on the right foot
4. Black on the left foot, white on the right foot

Perhaps one could omit the personal "to me," it introduces a note of hesitation. The rest is very good, absolutely clear. The "obvious" identifies you as someone with mathematical training.

Then came an attempt, unsuccessful, to manipulate numbers. Such a thing is not a proof, even if one gets the right numerical answer. The idea is primary.

In the analysis that you are (implicitly) making during your calculations, there is no justification for the division $\frac{3}{1}$. Nor is there a justification for addition. You should have written that for every choice of what you put on the left foot, there are $2$ choices of what to put on the right.

Now let us look at a generalization, say to four colours. Suppose that we have $a$ (where $a>0$) identical pairs of red socks (so $2a$ red), $b$ pairs of yellow, $c$ pairs of green, $d$ pairs of blue. There are "obviously" $4$ choices of colour for the left foot. For every such choice, there are $4$ choices of colour for the right foot, for a total of $(4)(4)$ outfits.

The analysis needs to change if your washing machine eats socks, so that the mates of some socks have vanished. Suppose we have positive numbers $s$, $t$, $u$, $v$, $w$ of red, yellow, green, red, black. If each of $s$, $t$, $u$, $v$, and $w$ is $\ge 2$, there are $5$ choices for the left, and for each such choice there are $5$ choices for the right, total $(5)(5)$.

But if (say) $s$, $t$, and $u$ are $\ge 2$, but $v=w=1$, we need to be careful. True, there are $5$ choices for the left. But it is no longer true that for every such choice, there are $5$ choices for the right. If you put a black sock on the left, there are only $4$ choices for the right.

The general idea still works, but we have to break things up into cases: (i) on the left foot we put a colour that has at least one mate of that colour, and (ii) on the left foot we put a lonely sock.

For case (i), there are $3$ choices for the left, and for each such choice, there are $5$ choices for the right, a total of $(3)(5)$. For case (ii), there are $2$ choices for the left, and for each such choice there are $4$ choices for the right, a total of $(2)(4)$. Finally, add. The total number of choices is $(3)(5)+(2)(4)$.

There are other ways to handle the problem. For example, suppose that we have $m$ colours which each have at least $2$ socks of that colour, and $n$ colours for which we only have a single sock. There are $m$ ways to choose a boring monochromatic pair. For the bicoloured outfits, there are $m+n$ choices of what goes on the left, and for each such choice there are $m+m-1$ choices for the right, a total of $(m+n)(m+n-1)$ bicoloured outfits. The total number of outfits is $m+(m+n)(m+n-1)$. Or else one can count the bicoloured outfits by saying there are $\binom{m+n}{2}$ ways to choose a pair of colours, and for each choice of colours, there $2$ ways to wear them.

-
Thank you André! You analysis is as entertaining to read as it is informative. In fact, I do have some unmatched socks that I wear with similar-enough pairs and I think that I will work through your example with my actual sock drawer. Have a great week! – dotancohen Feb 26 '12 at 8:39