# Inclusion exclusion in a combinatorics question

The question:- Suppose we have an infinite number of Red balls, Green balls, White balls, and Blue balls, and we need to select $$10$$ balls. We are required to find the probability that a selection contains balls of all the different colours.

(The essence of having an "infinite" no. of balls is that the composition remains the same after each draw, so the probabilities aren't affected).

Approach-1: Suppose the no. of Red,Green,White,Blue balls selected are $$r,g,w,b$$ . Then :

Favourable cases: No. of integer solutions of the equation $$r+g+w+b=10$$, such that $$r,g,w,b >0$$=$$9\choose 3$$=$$84$$.

Total cases: No. of integer solutions of the equation $$r+g+w+b=10$$, such that $$r,g,w,b \geq 0$$=$$13\choose3$$=$$286$$.

Which gives the (correct answer) as $$42/143$$.

Approach 2: Each selection has $$4$$ options: i.e select $$r,g,w$$ or $$b$$. Therefore, there are $$4^{10}$$ total options.

By the principle of inclusion-exclusion, the favorable cases must be: $$4^{10}$$-$$4\choose13^{10}$$+$$4\choose22^{10}$$-$$4\choose31^{10}$$.

However, this approach doesnt give the correct answer. Whats wrong in using the IEP here?

• In your 2nd approach, applying IEP is only ensuring that there are no repetitions of each combinations. For example, all 10 being w will be included but only once and repetitions will be removed. It is not ensuring that there are at least one ball of each color. Jul 15, 2020 at 21:04
• @MathLover The second approach does count all sequences of $10$ choices in which at least one ball of each color is selected. Moreover, it is the second approach that is correct, not the first one. Jul 15, 2020 at 21:41
• @N.F.Taussig I think I saw it in the middle of the night. I again saw what he has put and so I agree that the 2nd approach does count all sequence of 10 balls in which at least one ball of each color is selected. But I would still say the first approach is correct. Jul 16, 2020 at 6:41

Approach 2 should give the correct answer. What source claims that the answer in approach 1 is correct? Approach 1 treats all $$286$$ cases as equally likely, which is false. For example, picking $$5$$ red and $$5$$ green is much more likely than picking $$10$$ red balls.

In approach number one you are taking all of the balls at the same time, so you just appear to have $$10$$ balls and then you classify them in colors.

In approach number two, you have a sequence of selections. You take the ball one by one. Notice that, for example, $$W\color{red}{R}\color{blue}{B}\color{red}{R}\color{blue}{BBB}\color{green}{G}\color{red}{R}\color{green}{G}$$ is counted once and also $$\color{blue}{BBB}\color{green}{G}\color{red}{R}\color{green}{G}W\color{red}{R}\color{blue}{B}\color{red}{R}$$ is counted once but in approach one you are counting this only one time.

The stated answer is incorrect since the events counted in the first method are not equally likely to occur. We can only find the probability by dividing the number of favorable cases by the total number of cases when each case is equally likely to occur. Your second approach is correct.

The reason it is specified that there are an infinite number of balls of each color is that means each color is equally likely to be drawn with each selection. That would not be the case if there were only, say, $$10$$ balls of each color. In that case, if the first ball selected were red, then the probability of again picking a red ball with the second selection would be less than the probabilities of picking a blue ball, a green ball, or a white ball with the second selection.

Since there are four possible choices for the color of each of the ten balls which are selected, there are $$4^{10}$$ possible sequences of ball colors. Moreover, since each color is equally likely to be chosen with each selection, these $$4^{10}$$ sequences are equally likely to occur.

Notice that this is not the case with the first approach. The $$\binom{10 + 4 - 1}{4 - 1} = \binom{13}{3} = 286$$ solutions of the equation $$b + g + r + w = 10 \tag{1}$$ in the nonnegative integers are not equally likely to occur. A selection in which all ten of the balls are red can only occur in one way, while a selection with three green, three blue, two red, and two white balls can occur in $$\binom{10}{3}\binom{7}{3}\binom{4}{2}\binom{2}{2} = 25,200$$ ways.

Similarly, each of the $$4^{10} - \binom{4}{1}3^{10} + \binom{4}{2}2^{10} - \binom{4}{3}1^{10}$$ ways of selecting a sequence of $$10$$ ball colors in which at least one ball of each of the four colors is selected are equally likely to occur, while the $$\binom{10 - 1}{4 - 1} = \binom{9}{3}$$ solutions of equation 1 in the positive integers are not equally likely to occur. For instance, a selection with seven red balls, one blue ball, one green, and one white ball can occur in only $$\binom{10}{7}3! = \frac{10!}{7!3!} \cdot 3! = \frac{10!}{7!} = 720$$ ways, as opposed to the $$25,200$$ ways three blue, three green, two red, and two white balls may be selected.

Therefore, the probability that at least one ball of each color is selected when ten balls are selected from an infinite number of blue, an infinite number of green, an infinite number of red, and an infinite number of white balls is indeed $$\frac{4^{10} - \binom{4}{1}3^{10} + \binom{4}{2}2^{10} - \binom{4}{3}1^{10}}{4^{10}}$$

• Please see this as well - math.stackexchange.com/questions/1436598/… Jul 25, 2020 at 7:22
• I have already seen that problem. The basic flaw in your approach is that the events you are counting are not equally likely to occur. You can only divide the number of favorable outcomes by the total number of outcomes when each event is equally likely to occur. Jul 25, 2020 at 9:14
• So you do not agree with the solution to that problem? It is really a very similar problem. Jul 25, 2020 at 9:24
• I agree with the solution to that combinatorics problem. However, this is a probability problem. Again, the point you are missing is that the events you are counting in your solution are not equally likely to occur. Jul 25, 2020 at 9:31
• Sorry for getting to this late. I went through the problem again and a few other similar problems. I agree the events are not equally probable. It should not have been extended to finding probability. +1 from me. Aug 3, 2020 at 5:49