0

Let $X = \{Q,W,E,R\}$. Using exponential generating functions, obtain the number of $r$-permutations that can be formed such that there is an even number of $Q$'s and an odd number of $W$'s in each permutation.

After all my work, I obtain the following equation.

$$\frac{1}{4} \left(e^{4 x}-1\right)$$

As far as I can tell, it equals $$\frac{4^r-1}{4} $$

Am I wrong so far?

For $3$-permutation in given conditions, I expect $QQW,QWQ,WQQ$

When I substitute $r$ with $3$ in $\frac{4^r-1}{4} $, I don't get $3$.

What is my wrong? Can you help me?

Gary
  • 36,640

1 Answers1

1

You have the right EGF, but when extracting the coefficient of $x^r$, it's simply $$\frac{1}{4} \frac{1}{r!} 4^r$$ for $r \ge 1$. (Think of the $-1$ as $-1 \cdot x^0$.) When multiplyed by $r!$ and simplified, the answer is $$4^{r-1}$$ With regard to the case $r=3$, keep in mind that zero is an even number, so there are several acceptable permutations having no $Q$s that are not shown in your list.

awkward
  • 15,626
  • First, very thank you. But I'm not acquainted with this topic well. Would you mind showing extracting the coefficient of $x^r$? Why and how are they multiplied by $r!$ and simplified? I want to understand it instead of memorizing it. – Soner from The Ottoman Empire Dec 18 '23 at 18:14
  • The definition of the exponential generating function of a sequence ${a_r}$ is $$f(x) = \sum_{r=0}^{\infty} \frac{1}{r!} a_r x^r$$ So if you want to recover $a_r$ from the EGF, you need to find the coefficient of $x^r$ and multiply by $r!$. You also need to know the infinite series $e^x = \sum_{n=0}^{\infty} \frac{1}{n!} x^n$. For more information, I recommend reading the answers to this question: How can I learn about generating functions?. – awkward Dec 18 '23 at 19:01
  • I read almost what you write on your comment. Thank you. Actually, that's why I'm stuck on $-1$ part. I think it corresponds to $e^{0.x}$. – Soner from The Ottoman Empire Dec 18 '23 at 19:35
  • Thank you really for also keep in mind that zero is an even number advice. Yes, I understand well now. $QQW,QWQ,WQQ,WWW,WEE,WER,WRE,WRR,EWE,EWR,EEW,ERW,RWE,RWR,REW,RRW$ – Soner from The Ottoman Empire Dec 18 '23 at 19:42