We divide a group of people into subgroups A, B, and C, and ask each subgroup to form a line. We also require that A have an odd number of people, and that B have an even number of people. How many ways are there to do this?
Here is my attempt using generating functions
Odd number of people
- $ A(x) = \sum n! (x^n/n!) = x + x^3 + x^5 + ... = \dfrac{x}{1-x^2}$
Even number of people
- $ B(x) = \sum n! (x^n/n!) = 1 + x^2 + x^4 + ... = \dfrac{1}{1-x^2}$
No constraints on group C
$ C(x) = \sum n! (x^n/n!) = 1 + x + x^2 + ... = \dfrac{1}{1-x}$
It then follows by product rule
$G(x) = {{\dfrac{1}{1-x} * \dfrac{1}{1-x^2} * \dfrac{x}{1-x^2}}} $
Does this look correct?