[Math] Two bags of colored marbles, different colors is each bag, how many combinations of complete pairings

combinatoricsstatistics

I've reduced a different problem I have to something that can be explained as below, but I'm not sure how to solve this last part.

Assume there are two bags of colored marbles. Any color in the first bag will not be in the second bag. For example, the first bag has two blue marble and three green marbles, while the second bag has one red marble, one white marble, and three black marbles. Each marble in the first bag has to be paired up with a marble in the second bag. How many different complete pair sets (where every marble is paired with another) are there?

A general solution would be amazing, else a pointer in the right direction would be great.

Thanks for any help!

Best Answer

Hint: Start by imagining that the marbles are numbered, so are all distinguishable. If there are $n$ marbles in each bag, you can line the ones in the first bag up and there are $n!$ ways to match up the marbles from the second bag. Then if you have four blue marbles that are indistinguishable in the first bag, there are $24$ ways that get collapsed to $1$

Related Question