Number of ways to compute a product

56 Views Asked by At

Say there are two ways to compute the product $xyz$. Namely $(xy)z$ and $x(yz)$. Likewise, there are 5 ways to compute the product $wxyz$: $w(x(yz))$, $w((xy)z)$, $(wx)(yz)$, $(w(xy))z$, and $((wx)y)z$.

Now let $a_n$ be the number of ways to compute a product of $n$ numbers, where the numbers stay in a fixed order (as above). We've already shown that $a_3 = 2$ and $a_4 = 5$. It is also obvious that $a_1 = 1$. The recurrence relation for this series is: $$a_n = \sum_{k = 1}^{n - 1}a_ka_{n - k},$$ where $a_1 = 1$.

I need to find a formula for $a_n$. I've tried doing this using Ordinary Generating Functions by letting

$$\begin{align*}A(x) &= \sum_{n \geqslant 1}a_nx^n\\ &= \sum_{n \geqslant 1}\sum_{k = 1}^{n - 1}a_ka_{n - k} x^n\end{align*}.$$

However I really don't know where to go from here. I've never worked with series that are defined by a summation.

1

There are 1 best solutions below

0
On

A hint:

Using $A(x)=\sum_{n\geq1} a_n x^n$ compute the power series of $A^2(x)$.