The number of (non-equal) forests on the vertex set V = {1, 2, ...,n} that contains exactly 2 connected components is given by $\sum_{k=1}^{n-1} {n-1 \choose k-1} k^{k-2} (n-k)^{n-k-2}$.
I am unsure how to approach this question.
Could someone guide me through the proof?
If G is a spanning tree and it is disconnected then I know it is a spanning forest.
Also, I know by Cayley's thm that there are $n^{n-2}$ nonequal tree on a vertex set V = {1, 2, ...,n} which is where i'm assuming the $k^{k-2}$ comes from but I do not understand where the rest of it is coming from.
HINT: The forest must consist of exactly two trees. Partition $V$ into two disjoint non-empty subsets, $V_0$ and $V_1$, and let $V_0$ be the subset containing the vertex $1$. $V_0$ and $V_1$ will be the vertex sets for the two trees. Let $k=|V_0|$.
Then put the pieces together.