Counting trees with condition

192 Views Asked by At

Hey guys I'm try to count the number of trees with number of vertices = n,

such that all vertices except for two have degree 2.

I would like to get some hint for that question , thank you!

1

There are 1 best solutions below

0
On

Since the total number of edges in a trees with $n$ vertices is $n\!-\!1$, and the sum of vertex degrees is twice the number of edges, we can see that the two vertices with degree $\ne 2$ both have degree $1$. There is therefore only one such tree for each value of $n$ - a path.