In how many ways can we pick 7 balls out of a bag which contains several red , blue and green balls?

485 Views Asked by At

If I approach by assuming I have two sticks and I need to divide 7 balls as several combinations of red , blue and green such that overall I have 7 balls , I am not getting where to put the stick so as to divide it .

I mean I will have to pick some balls from the bag and then put a stick somewhere so as to divide it into 3 partitions but I am not what no of balls to be chosen to select 7 balls .

enter image description here

1

There are 1 best solutions below

3
On

Let $x_r$ be the number of red balls, $x_g$ and $x_b$ be the number of green and blue balls, respectively. So you want the number of non-negative integer solutions (assuming we are allowed to have no balls of a color) to the following: $$x_r+x_g+x_b=7.$$ This is given by $\binom{7+3-1}{3-1}=\binom{9}{2}=36.$

The idea is to have two $1'$s separate $7$ zeros (where $0'$s represent the balls). Note that the separators will automatically convey the colors chosen so we can treat all $0'$s as being the same. So this becomes a problem of number of binary strings of length $9$ with $2$ ones.