In how many ways can we distribute $2$ types of gifts

combinationscombinatoricsdiscrete mathematics

The problem: In how many ways can we distribute $2$ types of gifts, $m$ of the first kind and $n$ of the second to $k$ kids, if there can be kids with no gifts?

From the stars and bars method i know that you can distribute m objects to k boxes in $\binom{m+k-1}{k-1}$ ways.
So in my case i can distribute m gifts to k kids in $\binom{m+k-1}{k-1}$ ways, same for n gifts i can distribute them in $\binom{n+k-1}{k-1}$ ways.
So now if we have to distribute m and n gifts we can first distribute m gifts in $\binom{m+k-1}{k-1}$ ways, then n gifts in $\binom{n+k-1}{k-1}$ ways, so in total we have: $$\binom{m+k-1}{k-1} \cdot \binom{n+k-1}{k-1} \quad \textrm{ways.}$$
Is my reasoning correct?
What about when we have to give at least 1 gift to each kid, can we do that in $$\binom{m-1}{k-1} \cdot \binom{n+k-1}{k-1}+\binom{n-1}{k-1} \cdot \binom{m+k-1}{k-1} \quad \textrm{ways?}$$
Any help would be appreciated.

Best Answer

Your reasoning for the problem where kids with no gifts are allowed is correct. To solve the main problem you need to apply the PIE to exclude cases where one or more kids get no gift. You will obtain:

$$ \sum_{i=0}^{k} (-1)^i\binom ki\binom{n+k-1-i}{n}\binom{m+k-1-i}{m}. $$