How many trees with $n$ vertices correspond to the vector $(g_1,g_2,g_3,g_4)$, where the $g_i$ are the number of vertices of degree $i$?

129 Views Asked by At

Let there be a tree with $n$ vertices. How to count the number of trees corresponding to the set $(g_1,g_2,g_3,g_4)$, where $g_i$ is the number of vertices of degree $i$? For example, with $n=8$ we have the sequences $(2,6,0,0)$, $(3,4,1,0)$, etc. Is there a general way to count trees corresponding to the set $(g_1,g_2,g_3,g_4)$?