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!
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!
Copyright © 2021 JogjaFile Inc.
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.