Combinatorics problem involving placing balls into bags

138 Views Asked by At

There are $r$ red balls and $w$ white balls, and $n$ bags. Each bag has to have at least one white and red ball in. In how many ways can we place these balls into the bags?

My solution: Place one white and one red ball into the $n$ bags. We then have $w-n$ and $r-n$ white and red balls respectibely. There are $n \choose w-n$ ways of placing the white balls, and $n\choose r-n$ ways of placing the red balls, so there are ${n \choose r-n}{n \choose w-n}$ ways.

1

There are 1 best solutions below

1
On

Nope, sorry, not totally right. Your idea is good, just the numbers in the end are wrong. Assume for example $n = 2$ bags and $w=r= 20$ balls of each color. Then you would have ${2 \choose 18}{2 \choose 18} = 0$ possibilities, and I don't think you want that. :)

So if you find the right formula for putting the remaining balls in the bags then this should work.