1 votes 1 votes A complete $n$-ary tree is a tree in which each node has $n$ children or no children. Let $I$ be the number of internal nodes and $L$ be the number of leaves in a complete $n$-ary tree. If $L=41$, and $I=10$, what is the value of $n$? $3$ $4$ $5$ $6$ DS ugcnetcse-oct2020-paper2 data-structures binary-tree + – go_editor asked Nov 20, 2020 recategorized Nov 27, 2020 by Krithiga2101 go_editor 3.7k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
3 votes 3 votes Let N be the total number of nodes. N= n*I + 1, Also N= I+ L = 41+10 = 51 51=n*10+1 n=5 Ashwani Kumar 2 answered Nov 23, 2020 Ashwani Kumar 2 comment Share Follow See 1 comment See all 1 1 comment reply Udhay Brahmi commented Feb 8, 2022 reply Follow Share CORRECT 👍 0 votes 0 votes Please log in or register to add a comment.
1 votes 1 votes For strict n-ary trees the relationship between external(leaf) nodes and internal nodes is: $$L = (n-1)i + 1$$ Using this formula, L = $41$ , i = $10$ $$41 = (n-1)*10 + 1$$ $$n = 5$$ Aditya8923 answered Jan 24, 2022 Aditya8923 comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes Answer-B http://courses.cs.vt.edu/~cs3114/Fall09/wmcquain/Notes/T03a.BinaryTreeTheorems.pdf Àbhíjèét Míshrà answered Dec 24, 2020 Àbhíjèét Míshrà comment Share Follow See all 0 reply Please log in or register to add a comment.