[Math] P white balls, Q black balls, N boxes

combinatoricsdiscrete mathematicsproof-verification

First of all sorry if this has been asked before, I could find "similiar" questions which seem to be harder but not quite this specific question.

You are given P white balls and Q black balls, how many ways can you put them into N different boxes?

My idea was to put first the P white balls into the N different boxes which can be done in $\binom{P+N-1}{P}$ ways (right?) then for each of these you do the same with the black balls so overall the answer is $\binom{P+N-1}{P}\binom{Q+N-1}{Q}$

Is this correct? If so is there a way to do it so you get a nicer form?

Best Answer

Your answer is indeed correct, assuming that your bins are distiguishable and the balls of same color are identical. For those browsing, the OP arrived at his answer using Theorem 2 at the link below:

http://en.wikipedia.org/wiki/Stars_and_bars_(combinatorics)

Also, I'm fairly sure this is the nicest form you'll get. If you attempt to expand this into factorials and try to get a single $\binom{n}{k}$ expression, I think you'll simply end up with a mess of factorials.

Related Question