How many trees, not necessarily spanning, are there with exactly m edges and n vertices?

78 Views Asked by At

I've been struggling with this combinatorical question and got very confused:

Given $n$ vertices: $\{v_1,v_2,\ldots,v_n\}$, in how many ways can a tree be assembled upon them, not necessarily spanning, so that it will have exactly m edges?

so, my first thought was that $m=n-1$ necessarily, because we are dealing with a tree here and it has to have $n-1$ edges. Second, how come Cayley theorem doesn't provide a direct solution to that question, and it's simply $n^{n-2}$?

EDIT: The question is how many forests with n vertices are there with m edges