I am looking for verification for my attempt at the solution. I have found that my answer disagrees with an answer I found here: Extract Coefficients From A Function
Problem at hand: For a plane planted tree $T$, let $h(T)$ denote the number of nodes of T which have an even number of children. For each $n ∈ \mathbb{N}$, determine the average value of $h(T)$ among all the PPTs with $n$ nodes. (This question can be found in Chapter 8 of David Wagner's Combinatorial Enumeration notes from CO 330 in University of Waterloo).
Attempt at Solution: Let $\Omega$ be the set of all plane planted trees. Let $n(T)$ denote the number of nodes in a tree $T$. Define the bivariate generating function $U(x,y)$ by $$U(x,y) = \sum_{T\in \Omega}x^{n(T)}y^{h(T)}.$$
We may decompose $\Omega$ as follows: if the root vertex of $T$ were removed, then $T$ would correspond to a $k-$tuple of trees $(T_1,T_2,\ldots,T_k)$ for some $k\geq 0$ (where we take the convention that $T_0 = \{\}$). So, $$T \leftrightarrow (T_1,\ldots,T_k)$$ if $T$ is not the tree with one vertex.
Moreover, our weights extend as follows: \begin{align*} n(T) &= 1+n(T_1)+\dotsb+n(T_m)\\\ h(T) &= \begin{cases} h(T_1) +\dotsb + h(T_{m}) & \text{$m$ odd}\\ 1+h(T_1)\dotsb +h(T_m) & \text{$m$ even} \end{cases} \end{align*}
and so \begin{align*} W(x,y) &= \sum_{k\geq 0} x\left[\sum_{(T_1,\ldots,T_{2k})}x^{n(T_1)+\dotsb+n(T_{2k})}y^{1+h(T_1)+\dotsb+h(T_{2k})}+\sum_{(T_1,\ldots,T_{2k+1})}x^{n(T_1)+\dotsb+n(T_{2k+1})}y^{h(T_1)+\dotsb+h(T_{2k+1})} \right]\\ &= \sum_{k\geq 0}x\left[ yW^{2k}(x,y)+W^{2k+1}(x,y) \right]\\ &= x\frac{y+W(x,y)}{1-W(x,y)^2} \end{align*} We would like to find $T_n = \{T\in\Omega: h(T) = n\}$. So we look for $$T_n =[x^n]\left.\frac{\partial}{\partial y}W(x,y)\right |_{y=1}$$ Hence, if we let $G(u) = \frac{y+u}{1-u^2}\in \mathbb{Q}(y)$ and hence $$W(x,y) = xG(W(x,y))$$ so by the Lagrange Implicit Function Theorem, \begin{align*} [x^n]\left.\frac{\partial}{\partial y}W(x,y)\right |_{y=1} &= \left.\frac{\partial}{\partial y}[x^n]W(x,y)\right |_{y=1}\\ &= \left.\frac{\partial}{\partial y}\frac{1}{n}[u^{n-1}]G(u)^n\right|_{y=1}\\ &= \frac{1}{n}[u^{n-1}]\left.\frac{\partial}{\partial y}G(u)^n\right|_{y=1}\\ &= \frac{1}{n}[u^{n-1}]\frac{n}{1-u^2}\left[\frac{1+u}{1-u^2}\right]^{n-1}\\ &= [u^{n-1}]\frac{1}{1-u^2}\left[\frac{1}{1-u}\right]^{n-1}\\ &= \sum_{k= 0}^{n-1}\binom{n+k-1}{k}(-1)^{n-k} \end{align*}
I realize I have to divide it by the number of PPT's with $n$ nodes to find the average, which is not too much of a concern. My main concerns are: 1) Is my attempt correct? 2)Is there a closed form for the final binomial summation?
Regardless, thank you for the time you took to help me.
– Pavelshu Jun 06 '14 at 22:09