# Composition problem help

1. Oct 8, 2009

### beddytear

1. The problem statement, all variables and given/known data

An astronaut crew is preparing for a space mission. As part of their preparation,
they must spend a block of consecutive days training in a ﬂight simulator. Each day,
the crew is required to spend either 1, 2, or 3 hours in the simulator. The training
ends once they attain n hours of simulator time.
How many ways can the crew achieve the required n hours of training? Express your
answer as a coeﬃcient of a generating function.

2. Relevant equations
Generating functions. sum lemma. product lemma.

3. The attempt at a solution

Let Sk be the set Sk={1,2,3}^k
and let S= U(union) Sk
k>=0

By the sum and product lemmas
Is(x) (the generating function)= sigma Isk(x)
k>= 0
= sigma (I (x))^k
k>=0 {1,2,3}
= sigma (x+x^2+x^3)^k
k>=0

= 1/ (1- (x+x^2+x^3))

therefore the number of ways the crew can achieve the required n hours of training is
[x^n](coefficient)(1/(1-(x+x^2+x^3)).

have i made any mistakes. am i completely off? any help would be greatly appreciated.