I used a simplified version of some of the methods posted above. I thought about dividing up the 10 cookies as “making cuts.” For instance, you have 10 cookies, so there are 9 possible cuts that can be made in the spaces between those 10 cookies. If you make 0 cuts, then 1 person will be given all the cookies. If you make 1 cut, then 2 people will receive cookies. If you make 2 cuts, then 3 people will receive cookies…..If you make 4 cuts, then all 5 students will receive cookies. Or more generally, if you make n cuts, then n+1 people will receive cookies.
So the problem is just summing up all the ways that the cookies can be distributed when 0,1,2,3, and 4 cuts are made. This is a simple summation.
For 0 cuts, we want to know how many ways we can choose 0 cuts from 9 possible cuts and then how many ways we can distribute the resulting section of cookies to the 5 people. The product is the number of ways that all 10 cookies can be distributed to one of the people. So we calculate 9 CHOOSE 0 * 5 CHOOSE 1 and this will give us the total number of ways that all 10 cookies can be given to one person.
For 1 cut (remember that with 1 cut, 2 people will receive cookies), we calculate 9 CHOOSE 1 * 5 CHOOSE 2.
For 2 cuts (3 people receive cookies), we calculate 9 CHOOSE 2 * 5 CHOOSE 3.
You’ve probably already noticed a pattern. In order to distribute cookies to n people we need to make (n – 1) cuts. So to figure out the number of ways that cookies can be distributed to n people, we just calculate 9 CHOOSE (n – 1) * 5 CHOOSE n.
And now we are ready for our summation:
5
Σn = 1 ( 9 CHOOSE (n – 1) * 5 CHOOSE n )
Sorry about the weird looking notation.