340 views
0 votes
0 votes
Max no. of node in k-array tree when height 'h' is given

The number of internal nodes in 3-ary tree of height 4 is: ___

40 or 121 which one is right?

2 Answers

1 votes
1 votes
total nodes =121

L+I=121-------(1)

L=I(n-1)+1 for n-ary tree

so L=I(3-1)+!

L=2I+1----------(2)

substitute 2 in 1

3I+1=121

I=40
0 votes
0 votes
with 4 height total no of nodes=121=n

with x internal nodes total no of nodes=x*3+1=121

                                                               x*3=120

                                                               x=40 =no of internal nodes

No related questions found