# Coming up with a generating function

I have a homework assignment which is to write a Generating Function of the following problem:

"There are $n$ identical boxes , there are $3$ different rooms in which they can be put. Each room can hold a maximum of 24 boxes. how many ways are there to divide the $n$ boxes in the rooms (you do not have to use all the rooms)?"

I am kind of new to Generating Functions and I can't seem to figure this one out. Can someone please help me out? It would be greatly appreciated.

Thanks, Jason.

## 1 Answer

HINT:

We need only one variable (it can be tempting to have three, perhaps), and we pay attention to its exponent to represent how many boxes are in a room. That is to say, $x^4$ might represent 4 boxes.

I'm trying not to give it away - but suppose you get stuck. Then here is a spoiler (mouse over for more)

SPOILER

Suppose I had 2 rooms, each room could have up to 3 boxes, and I want to know how many ways I could place 3 boxes. Then I claim that $(1 + x + x^2 + x^3)(1 + x + x^2 + x^3)$ is the important equation. In each parenthesis, I have the possibilities in one room. The exponents refer to how many boxes are in that room. After the multiplication, I care about the coefficient of $x^3$, as that refers to how many ways 3 boxes can be stored.

• Thanks alot man :) – Jason Sep 5 '11 at 4:13