Combinatorics – Counting the Number of Ways to Distribute Gifts

combinatorics

I am reading a book on Discrete Math, which has a question related to counting, it has two parts.

We have 20 different presents that we want to distribute to 12
children. It is not required that every child gets something; it could
even happen that we give all the presents to the same child. In how
many ways can we distribute the presents?

My answer $12^{20}$, as we can give the first gift to 12 children, second to 12, and so on and so forth.

We have 20 kinds of presents; this time, we have a large supply from
each. We want to give presents to 12 children. Again, it is not
required that every child gets something; but no child can get two
copies of the same present. In how many ways can we give presents?

My answer, $(12!)^{20}$, because in the first iteration we can give the first kind of gift to 12 children, the second kind of gift to 12 children and so on. After giving everybody a gift from 1-20, we enter into the second iteration, as 1 child has the first kind of gift, we can give the first kind of gift to 11 children, similarly, the second gift can be given to 11 children and so on. And it goes on.

After checking the answer, the second answer came out to be wrong, it's $(2^{20})^{12}$.

Best Answer

See we have infinite supply for each present . Now let us take a child A then take one present we can either give it or not give it. So for each present we have two ways . There are such 20 presents so for a single child so you have $2×2×\cdots (\text {20 times}) =2^{20} $ ways. This is for one child we have 12 such children thus the answer is $(2^{20})^{12} $