This exercise sketches a proof of Theorem 3.22. Define $M\left(d_1, d_2, \ldots, d_n\right)$ by the right-hand side of Equation (3.21). It suffices to prove that if $n \geq 2$ and all $d_i$ are nonnegative and $\sum_{i=1}^n d_i=n-2$, then
$$
N\left(d_1, d_2, \ldots, d_n\right)=M\left(d_1, d_2, \ldots, d_n\right) .
$$
(a) Under the given assumptions, verify (3.22) for $n=2$.
(b) Under the given assumptions, show that $d_i=0$, for some $i$.
(c) Suppose that $i$ in part (b) is $n$. Show that
$$
\begin{aligned}
& N\left(d_1, d_2, \ldots, d_{n-1}, 0\right)=N\left(d_1-1, d_2, d_3, \ldots, d_{n-1}\right)+ \\
& \quad N\left(d_1, d_2-1, d_3, \ldots, d_{n-1}\right)+\cdots+N\left(d_1, d_2, d_3, \ldots, d_{n-2}, d_{n-1}-1\right)
\end{aligned}
$$
where a $\operatorname{term} N\left(d_1, d_2, \ldots, d_{k-1}, d_k-1, d_{k+1}, \ldots, d_{n-1}\right)$ appears on the righthand side of (3.23) if and only if $d_k>0$.
(d) Show that $M$ also satisfies (3.23).
(e) Verify (3.22) by induction on $n$. (In the language of Chapter 6, the argument essentially amounts to showing that if $M$ and $N$ satisfy the same recurrence and the same initial condition, then $M=N$.)