# In how many ways can two different colored balls be chosen?

I have a statement that says:

In how many ways, can I choose $2$ different colored balls, if I have $3$ red, $4$ blue and $7$ yellow balls?

So, the order does not matter, because choose a red ball and a blue ball is the same thing that choose a blue ball and red ball, and I need a subgroup of $2$ elements of $14$ elements in total, also the balls must be of different colors.

According to this, I will use a combination $\frac{n!}{(n - k)!k !}$, then I will replace:

$$= \frac{14!}{12! \cdot 2!} = \frac{14 \cdot 13}{2} = 91$$

But my problem, is that the correct result must be $61$, and I would like to know, where my logic failed and how should it be done.

• Hint: $\frac{7\cdot7+4\cdot10+3\cdot11}2=61$ ($7$ ways to choose a yellow ball and $7$ ways to choose the second ball, $4$ to choose a blue ball and $10$ ways to choose the second ball. $3$ ways to choose a red ball and $11$ ways to choose the second ball. This counts every choice twice.)
– robjohn
May 4 '18 at 3:14
• The keywords are "different coloured". May 4 '18 at 3:18
• I have $14$ white balls in a box. In how many different ways can I choose two balls from the box if the order of the chosen balls does not matter, but picking the first and third balls is different from picking the first and second balls? If your answer to that question is not $\frac{14!}{12!2!} = 91,$ you need a serious refresher in combinatorics. Now consider how it can be possible that there are still $91$ different ways when we repaint the balls as in your question and forbid some of the combinations (such as first and second ball, which now are both red)? Hint: it isn't. May 4 '18 at 4:29

With your formula you are calculating the number of pairs of balls that you can obtain, but you are also counting pairs with balls of the same color.

You just simply have to discard them:

In how many ways you can pick 2 red balls? With your formula you can see that the number is 3.

In how many ways you can pick 2 blue balls? With your formula you can see that the number is 6.

In how many ways you can pick 2 yellow balls? With your formula you can see that the number is 21.

So, 91-3-6-21 is 61.

• Why am I choosing balls of the same color? If it is assumed that this formula is used for non-repeated elements? I knew that the formula: $\frac{(n + k - 1)!} {(n - 1 )! * k!}$ was for repeated elements. May 4 '18 at 3:31
• Let me explain the numbers in your first formula: 14*13 is the number of ways you can pick a first and a second ball. We write this as 14!/12!. But we have to identify (i.e. to say that is the same) the election {A,B} with the election {B,A} because we are not caring about the order. To do this identification is equivalent to divide by 2!. That is the meaning of the formula in this case. So you are saying that {Red1, Red2}={Red2,Red1}, but you are counting the pair of red balls. @Mattiu May 4 '18 at 3:58
• Very good explanation, thanks ! May 4 '18 at 5:40

Alternatively, the cases are: $$\underbrace{{3\choose 1}{4\choose 1}}_{1R1B}+\underbrace{{3\choose 1}{7\choose 1}}_{1R1Y}+\underbrace{{4\choose 1}{7\choose 1}}_{1B1Y}=61.$$

• Yes, using principles of addition and multiplication May 4 '18 at 5:41

Another approach from my comment:

There are $7$ ways to choose a yellow ball and $7$ ways to choose the second ball, $4$ ways to choose a blue ball and $10$ ways to choose the second ball. $3$ ways to choose a red ball and $11$ ways to choose the second ball. This counts every choice twice.

Thus, we get $$\frac{7\cdot7+4\cdot10+3\cdot11}2=61$$

think in this way.here i have total 14 balls in my box.so if i take any two of them then there will be 14C2 combinations.but it also includes the pair of same color.so,we must have to subtract them from them.the identical pair from red color is 3C2 ,from Blue is 4C2 , from yellow is 7C2. so the possible combination will 14C2-3C2-4C2-7C2=61.

• Yes, same than Jimenez's answer May 4 '18 at 5:43