Write expression B(x), the generating function of the number of ways to choose a bouquet of flowers n

99 Views Asked by At

-At most one red

-Odd number of blue

-at least 2 yellow

I'm having a really hard time understanding generating functions, I've split up the three demands and I've gotten this:

red: 0x^0+1x^1+0x^3.... closed form is (1-x^2)/(1-x)

blue: x+x^3+x^5... closed form is (x+1)/((x-1)^2)

yellow: x^2+x^3+x^4... not sure how to write this one

So I take it B(X)= closed form for red * closed form for blue * closed form for yellow

Would like some help with creating the closed forms cause I'm not really sure if it's right

1

There are 1 best solutions below

1
On

Letting $r(x)$, $b(x)$, and $y(x)$ be the polynomial for your red, blue, and yellow flowers we have

\begin{align*} r(x)&=1+x\\ b(x)&=x+x^3+x^5+\cdots=\frac{x}{1-x^2}\\ y(x)&=x^2+x^3+x^4+\cdots=\frac{x^2}{1-x} \end{align*}

Here is some detail: $$ b(x)=x+x^3+x^5+\cdots=x(1+x^2+x^4+\cdots)=x\left(\frac{1}{1-x^2}\right)=\frac{x}{1-x^2}. $$