Total number of socks = 5+4+3 = 12 4 to be selected So number of ways of selecting = 12$C$4 = 495 ways
Is this correct?
Total number of socks = 5+4+3 = 12 4 to be selected So number of ways of selecting = 12$C$4 = 495 ways
Is this correct?
There are so few cases that we can just list artistically in the order blue-red-green in descending numbers
$\displaylines {400\\310\; 301\\220\; 211\; 202\\130\;121\;112\;103\\040\;031\;022\;013}$
You could have used $^{12}C_4$ if all items were different, now now.
Now, you can have the following cases.
Case I: All $4$ socks of the same color. $2$ ways. (either blue or red)
Case II: $3$ socks of the same color, $4$th of the different color. $^3C_1\times^2C_1=6$ ways.
Case III: $2$ socks of one color. Other $2$ of other color. i.e. we are picking $2$ colors from which $2$-$2$ socks each would be picked. $^3C_2=3$ ways.
Case IV: $2$ socks of one color. Other $2$ of two other colors. $^3C_1=3$ ways.
Total$=2+6+3+3=14$ ways.
This is a Stars and Bars problem, which is discussed here and here.
Let $x_1, x_2, x_3$ denote the number of blue, red, and green socks selected, respectively.
The number of non-negative integer solutions to
$x_1 + x_2 + x_3 = 4$
is $~\displaystyle \binom{4 + 2}{2} = \binom{6}{2} = 15.$
The only possible violation to the constraint that
$x_1 \leq 5, ~x_2 \leq 4, ~x_3 \leq 3$
is $(x_1,x_2,x_3) = (0,0,4).$
Therefore, the overall enumeration is $15 - 1 = 14.$