# In how many ways can we distribute 2 types of gifts? The problem: In how many ways can we distribut

In how many ways can we distribute 2 types of gifts?
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 $\left(\genfrac{}{}{0}{}{m+k-1}{k-1}\right)$ ways. So in my case i can distribute m gifts to k kids in $\left(\genfrac{}{}{0}{}{m+k-1}{k-1}\right)$ ways, same for n gifts i can distribute them in $\left(\genfrac{}{}{0}{}{n+k-1}{k-1}\right)$ ways. So now if we have to distribute m and n gifts we can first distribute m gifts in $\left(\genfrac{}{}{0}{}{m+k-1}{k-1}\right)$ ways, then n gifts in $\left(\genfrac{}{}{0}{}{n+k-1}{k-1}\right)$ ways, so in total we have:
$\left(\genfrac{}{}{0}{}{m+k-1}{k-1}\right)\cdot \left(\genfrac{}{}{0}{}{n+k-1}{k-1}\right)\phantom{\rule{1em}{0ex}}\text{ways.}$.
Is my reasoning correct?
What about when we have to give at least 1 gift to each kid, can we do that in
$\left(\genfrac{}{}{0}{}{m-1}{k-1}\right)\cdot \left(\genfrac{}{}{0}{}{n+k-1}{k-1}\right)+\left(\genfrac{}{}{0}{}{n-1}{k-1}\right)\cdot \left(\genfrac{}{}{0}{}{m+k-1}{k-1}\right)\phantom{\rule{1em}{0ex}}\text{ways?}$
You can still ask an expert for help

## Want to know more about Discrete math?

• Live experts 24/7
• Questions are typically answered in as fast as 30 minutes
• Personalized clear answers

Solve your problem for the price of one coffee

• Math expert for every subject
• Pay only if we can solve it

Makai Blackwell
Explanation:
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}\left(-1{\right)}^{i}\left(\genfrac{}{}{0}{}{k}{i}\right)\left(\genfrac{}{}{0}{}{n+k-1-i}{n}\right)\left(\genfrac{}{}{0}{}{m+k-1-i}{m}\right).$