In the pastry shop they make 4 types of cakes: chocolate muffins, brownies, cheesecake and coffee cake. How many ways there are to buy 7 cakes?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Let us buy : a choco-muffin cakes, b brownies, c cheese cakes, d coffee cakes.
Then a + b + c + d = 7 Note that a, b, c & d have to be non-negative integers.
This is equivalent to distributing 7 chocolates to 4 children, such that one or more of them get 0 chocolates.
Total number of ways of doing this is [ 7 + 4 - 1 ] C [ 4 - 1 ]