(a) Find the number of ways that Magnus can give out 20 identical stickers to 5 of his friends. (Not everyone has to get a sticker.)
(b) Find the number of ways that Magnus can give out 20 identical stickers to 5 of his friends, if every friend gets at least one sticker.
This is a pretty classic problem.
First, we can set variables for how many stickers each of his friends get. Suppose the first friend is x1, his second friend is x2, and so on, all the way to the fifth friend.
Problem A) We can now use stars and bars, the number of non-negative solutions to this equation is (20+5-1) choose (5-1) which is 24 choose 4 which is 10626
Problem B) We can use stars and bars again, the number of positive integer solutions to the equation, x1+x2+x3+x4+x5=20 is (20-1) choose (5-1) which is 3876 :)
If you want to learn more about stars and boxes, google is a good place.