Ordinary generating function counts unlabelled balls in unlabelled bucket. You may want to watch this . Thus in generating function we are not concerned about the value of the function. Rather we are concerned about the coefficients which represent the sequence of numbers.
The good example is rolling two six face dice and this can be done as and the coefficient will give us the sum of the two numbers on the dice. If you want the range of the sum for
dice then it becomes $(x+x^2+x^3+x^4+x^5+x^6)^m$.
Weights to get new weights: Suppose one has gms of weights present. What sort of weights can one obtain ? We have a choice whether to include a particular weight or not. So the total number of different weights are
is
. Which show that there are two ways to get the sum from
. For example
.
OGF also can model problems of selection and distribution
Selection with repetition: Consider the expression . The coefficient
when we multiply several polynomial factors together can be restated in terms of exponents. Selecting 5 objects from a collection of four types, with at most two objects of each type. It is also equivalent to the problem of distributing five identical objects into four distinct boxes with at most two objects in each box.
Another place where we see the use of OGF is in Integer partition. Suppose we have