Determine the number of all rooted forests with a set of vertices $[n]$, where $n \geq 1$ (Cayley's formula?)

91 Views Asked by At

A rooted tree is an ordered pair ($T, v_T$), where $T$ is a tree and $v_T$ is a distinguished vertex of tree $T$. A rooted tree forest is a set consisting of one or more rooted trees with pairwise disjoint sets of vertices. The set of vertices of a rooted forest is the sum of the sets of vertices of all its trees. Determine the number of all rooted forests with a set of vertices $[n]$, where $n \geq 1$.

Now, the answer seems to be $(n+1)^{n-1}$ simply given by Cayleys formula. However, I wanted somebody to verify that I understand the problem correctly and tell me if that's the correct answer.