generating function and binomial distribution - counting

122 Views Asked by At

I am trying to understand generating function. I have the following problem:

There are 50 students in the International Mathematical Olympiad (IMO) training programme. 6 of them are to be selected to represent Hong Kong in the IMO. How many ways are there to select 6 students?

The answer:

Generating function is $G(x)=(1+x)^{50}$

But this could just as easily be done with the binomial distribution no?

$$ \binom {50} 6 = 15890700$$

However, unless i am not understanding something correctly, if we plug in $G(6)=(1+6)^{50} $that is $1.79\times10^{42}$ but why am i getting 15890700

2

There are 2 best solutions below

5
On

If you expand the generating function, the coefficient of $x^6$ will give the answer you want.

As you say, it is ${50 \choose 6}$.

One way to find the coefficient of $x^6$ is to take the sixth derivative of $G(x)/6!$ evaluated at $x=0$.

0
On

Generating functions are useful for asymptotic estimates. For actual small numbers, they are often more work than directly coming up with the count.

The answer is $\binom{50}{6}$, which you got directly, and is also what the generating-function approach gives, via the binomial theorem. The binomial theorem states that $$(1 + x)^n = \sum_{r \ge 0} \binom{n}{r} x^r $$

This means that the coefficient of $x^r$ in $(1+x)^n$ is $\binom{n}{r}$. In this particular case, with $n = 50$ and $r = 6$, you get $\binom{50}{6}$. Note that

$$(1+x)^{50} = \binom{50}{0} + \binom{50}{1}x + \binom{50}2x^2 + \dots + \binom{50}{6}x^6 + \dots + \binom{50}{50}x^{50}.$$