recategorized
2,153 views
3 votes
3 votes
The path length of a node is defined as the number of edges from root to that node. For a given full binary tree, the sum of path length of all leaf nodes is equal to $16$. The total number of internal nodes present is equal to $5$. What is the sum of path length of all internal nodes?

(Note: A full binary tree is a tree in which every node other than the leaves has 2 children)
recategorized

2 Answers

2 votes
2 votes
The answer is 5 as there are 3 Internal nodes according to this question out of which 2 internal node has path length 2 and 1 internal node has path length 1

Therefore, sum of path length = 2*2 +1 = 5.
0 votes
0 votes

In the question it isn't mentioned  if the tree is binary or complete. You can't draw a tree with internal path length 6 and 8 internal nodes. The internal path length should be at least 7(1 root node and 7 non-leaf, non-root node). Internal path length = 6 means there can be maximum 6 internal nodes with path length 1 from root, but internal nodes are mentioned 8. So, there has to be at least 7 nodes with path length 1 from root. Making internal path length 7!

Please verify!

Answer:

Related questions

8 votes
8 votes
2 answers
1
Ruturaj Mohanty asked Dec 27, 2018
1,271 views
For a given $m$-ary tree, the relationship between leaf nodes and internal nodes is represented by the graph given below. What is the value of $'m'$? Take necessary appro...