Set of words over the alphabet $\{a,b\}$

719 Views Asked by At

Let $\mathcal{L}$ denote the set of words over the alphabet $\{a,b\}$ that contain exactly $k$ occurrences of $b$. Obviously, the number of words in $\mathcal{L}$ which have exactly $n$ letters is $\binom{n}{k}$. Prove this by finding a specification of $\mathcal{L}$ as combinatorial construction and translating this specification into generating function.

Well, seems like the size of the words is not limited, therefore, I thought to do something like $\sum_{n \geq 0}\sum_{k=0}^n \binom{n}{k}x^k$, but this doesn't seem completely correct to me. Any ideas about the problem?

1

There are 1 best solutions below

3
On BEST ANSWER

You can take $E$ to be the species of sets and $E_k$ to be the species of sets of cardinality $k$, so that for any finite set $U$, $E[U]=\{U\}$ and

$$E_k[U]=\begin{cases} \{U\},&\text{if }|U|=k\\ \varnothing,&\text{otherwise}\;. \end{cases}$$

Thus, if $a_n=|E[n]|$ is the number of $E$-structures on $n$ elements, and $b_n=|E_k[n]|$ is the number of $E_k$-structures on $n$ elements, we have $a_n=1$ for all $n$, and

$$b_n=\begin{cases} 1,&\text{if }n=k\\ 0,&\text{otherwise}\;. \end{cases}$$

$\mathscr{L}[U]$ is the set of words of length $|U|$ over $\{a,b\}$ having exactly $k$ $b$s. Each $\mathscr{L}$ structure on a finite set $[U]$ is the disjoint union of an $E_k$-structure and an $E$-structure on complementary subsets of $U$, so $\mathscr{L}=E_k\cdot E$. Thus, if $\mathscr{L}(x)$, $E_k(x)$, and $E(x)$ are the exponential generating functions associated with the species $mathscr{L}$, $E_k$, and $E$, respectively, then

$$E_k(x)=\sum_{n\ge 0}b_n\left(\frac{x^n}{n!}\right)\;,$$

$$E(x)=\sum_{n\ge 0}a_n\left(\frac{x^n}{n!}\right)\;,$$

and

$$\mathscr{L}(x)=E_k(x)E(x)\;.$$

If you know how to take the product of two exponential generating functions, you can now write down the coefficient of $x^n$ in $\mathscr{L}(x)$ quite easily.