Use a generating function to find the number of ways to distribute $r$ jelly beans among $8$ children if each child gets at least one jelly bean.

904 Views Asked by At

Use a generating function to find the number of ways to distribute $r$ jelly beans among $8$ children if each child gets at least one jelly bean.

Solution I have worked out below: I am wondering if it is correct or is there is another way to complete this problem

$$G(x) = (x^1+x^2+...)^8$$ $$ =(x(1+x+x^2+...))^8$$

Then using infinite geometric series, $$ = x^8 \left(\frac{1}{(1-x)}\right)^8$$

Then using negative binomial series:

$$= x^8 \sum_{n=0}^{\infty} C(8+n-1,n)x^n$$ $$ = \sum_{n=0}^{\infty}C(7+n,n)x^{n+8}$$ $$ = \sum_{n=0}^{\infty} C(7+r-8,r-8)x^r$$ $$ = \sum_{r=8}^{\infty} C(r-1,r-8)x^r$$

So $[x^r] = 0$ if $r = 0,1,2,...7$ and $[x^r] = C(r-1,r-8)$ if $r>7$