(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.
(a) This is a stars and bars question, you can look up the why on stars and bars but I will apply it here. a + b + c + d + e = 20. The variables are nonnegative. Total ways is (20 + 5 - 1) choose (5 - 1) = 24 choose 4 = 10626 ways.
(b) This is a stars and bars question again. However, the formula is not (n + k - 1) choose (k - 1), it is (n - 1) choose (k - 1) where k is the # of variables and the second formula is for positive constraint. Thus the second problem is (20 - 1) choose (5 - 1) = 19 choose 4 = 3876 ways.