You have the following set of stamps:
- 2 three-cent stamps
- 3 five-cent stamps
- 2 seven-cent stamps
Use a generating function to:
a) Find all postage amounts that can be formed using a subset of these stamps.
b) Find the number of ways each amount can be formed.
I'm not quite sure where to begin.
I assume the problem can be set up like this:
$3x_1+5x_2+7x_3=n$
where n is the amount of money and $x_1$ is the number of three-cent stamps, and so on.
Then, we also have that $0 \le x_1 \le 2, 0 \le x_2 \le 3$, and $0 \le x_3 \le 2$.
I've learned the following method for similar problems, but I'm clearly not understanding something because it doesn't seem to work...
If $x_1$ were not limited to between 0 and 2, it would create the function $1+x^3+x^6+x^9...$
However, since it is limited, I don't see how this could work. The same applies for $x_2$ and $x_3$. Could someone please explain to me in the simplest possible terms what it is that I am not understanding?
As you said, if $x_1$ were not limited by $0\le x_1\le 2$, then you would use the function $1+x^3+x^6+x^9+\dots$ . In order to account for $0\le x_1\le 2$, simply only use the first three terms of this series, $1+x^3+x^6$. Same for the other two variables.
The generating function is then $$ (1+x^3+x^6)(1+x^5+x^{10}+x^{15})(1+x^7+x^{14}) $$
In general, if you are counting solutions to the equation $x_1+\dots+x_k=n$, and each variable $x_i$ is restricted to some set $S$, the generating function for that variable is $\sum_{s\in S}x^s$. In your case, you have $3x_1+5x_2+7x_3=n$, and $0\le x_1\le 2$, so that $3x_1$ must be in the set $\{0,3,6\}$, leading to $x^0+x^3+x^6$.