Prove that $b_n = [x^n]\frac{1-x^2+x^3}{1-2x+x^2-x^3}$

151 Views Asked by At

A block of a $\{0,1\}$ -string is a maximal nonempty substring consisting only of $0$s or only of $1$s. Let $b_n$ be the number of $\{0, 1\}$ strings of length $n$ in which no block has length exactly two. Use the fact that $\{0,1\}^* = \{1\}^* (\{0\}\{0\}^*\{1\}\{1\}^*)^*\{0\}^*$ to prove that $b_n = [x^n]\frac{1-x^2+x^3}{1-2x+x^2-x^3}$.

Here is what I have done so far.

Let $S$ be the set of strings in $\{0,1\}$ of length $n$ where no block has length exactly two. We know that

\begin{align} \{0,1\}^* &= \{1\}^* (\{0\}\{0\}^*\{1\}\{1\}^*)^*\{0\}^* \\ &= \{\epsilon, 1, 111, \dots\}(\{0\}\{\epsilon,0,000,\dots\}\{1\}\{\epsilon,1,111,\dots\})^*\{\epsilon,0,000,\dots\} \end{align}

We see that \begin{align} \Psi(S) &= \Psi(\{\epsilon, 1, 111, \dots\})\Psi(\{0\}\{\epsilon, 0,000,\dots\}\{1\}\{\epsilon,1,111,\dots\})^*)\Psi(\{\epsilon,0,000,\dots\}) \\ &= \Psi(1+x+x^3+\dots)\Psi(1-x^2(1+x+x^3+\dots)^2)^{-1}\Psi(1+x+x^3+\dots), \end{align} and now I'm stuck. Probably this doesn't make any sense, but I tried to show my method and maybe someone could see where I went wrong or how I could continue.

Any help is much appreciated.

1

There are 1 best solutions below

1
On BEST ANSWER

\begin{eqnarray*} \{0,1\}^* &= \underbrace{\{1\}^*}_{1+x+\frac{x^3}{1-x}} \underbrace{(\{0\}\{0\}^*\{1\}\{1\}^*)^*}_{\frac{1}{1-\left(x^2+\frac{2x^4}{1-x}+\frac{x^6}{(1-x)^2} \right)}} \underbrace{\{0\}^* }_{1+x+\frac{x^3}{1-x}}\\ \end{eqnarray*} After a bit of algebra & note $1-2x+2x^3-3x^4+2x^5-x^6=(1-2x+x^2-x^3)(1-x^2+x^3)$ ... the result follows.