Graph Theory - What are the possible combinations of grade 4 and grade 5 nodes to have 14 grade 1 nodes (leaves)?

55 Views Asked by At

So i have a graph that must contain 14 one degree nodes. I can use grade 4 or grade 5 nodes to construct the tree. How many possible pairs do exists so that the requirement of 14 one degree nodes are justified?

My solution:

If i start from the root of the tree with only 4 grade nodes, i would be able to fit in overall 6 four degree nodes to meet the requirement of 14 grade 1 nodes. So a possible pair would be (6,0)

If i start with just 5 degree nodes, i would fit in overall 4 five degree nodes, so (0, 4) is another possible pair in my solution / approach.

And then finally, if i combine them, i would be able to add three 4 degree nodes and two 5 degree nodes, so (3, 2) would be another possible pair.

Overall, all possible pairs so that the tree ends up with 14 one degree nodes are:

{(6,0), (0,4), (3,2)}. Any thoughts? Suggestions?

Is there some kind of formula i could use or describe it in a more mathematical way?

1

There are 1 best solutions below

4
On

Suppose there are $x$ vertices of degree $4$ and $y$ vertices of degree $5$. We know that the number of edge in a tree is one less than the number of vertices, and that twice the number of edges is the sum of the vertex degrees. This gives $$14+4x+5y=2(x+y+13)\\ 2x+3y=12$$ Obviously $y$ must be even so the only possible values of $y$ are $0,2,4$. One still has to construct the trees to show that they exist, but you've already done that.