Posted by Terri on .
How many handfuls of 15 are possible with at least one piece of each flavor - 50 cherry, 50 strawberry, 40 orange, 70 lemon, and 40 pineapple by assuming the pieces of flavor are identical?
Discrete Math -
Handfuls mean that there is no order within the 15.
At least one of which means we start with 4, i.e. one flavour of each, and add 11 other combinations of flavours.
How many ways can we partition 11 into 4 buckets, each one having zero to 11, and which add up to 11?
This can be solved using algebra.
Consider the polynomial expression
The coefficient of x^11 is precisely the number of ways we can add up to 11 from 4 pots, each containing 0-11 items.
Try expanding the polynomial and you will find that the coefficient is 364.
If you gave up, read on!
You probably were not interested in doing the expansion by hand.
We can expand instead a generating function.
We know by McLaurin's series that
1/(1-x)=1+x+x^2+x^3..... ad infinitum
So we only have to consider the McLaurin's series
1/(1-x)^4 = (1-x)^(-4)
and find the coefficient of x^11.
This we can use the binomial theorem,
=1+4x+(4*5/2!)x^2+(4*5*6/3!)x^3...+((3+n)!/(3!n!))x^n + ....
For n=11, we have
coefficient = (3+11)!/(3!11!)