666 views

2 Answers

1 1 vote
Since

For calculating number of total min/max heaps of some n elements

T(n) =(n-1)Ck*T(k)*T(n-k)

Where n is number of elements given and k is number of child in right subtree

By bottom up approach we can see the structure of heap with 8 elements

                    1

            2              3

   4           5       6         7    

8

We can see that right subtree will have 3 nodes

So

k= 3   and n= 8

Putting these values in above formula

T(8)=7C3*T(3)*T(4)

By same method we calcute T(3) and T(4)

we get

T(8) = 35*2*3= 210
Position:
Show:

Related questions

0 0 votes
1 1 answer
561
561 views
iamdeepakji asked Jan 27, 2019
561 views
If there is negative edge cycle then dijkstra algorithm will give correct path or not same thing about bellman ford also?Bellman ford always halts or not?
0 0 votes
1 1 answer
941
941 views
iamdeepakji asked Dec 27, 2018
941 views
Please solve this by taking some exampleBack edgecross edgetree edgeThankyou.
0 0 votes
1 1 answer
699
699 views
vijju532 asked Jun 29, 2018
699 views
0 0 votes
1 1 answer
1.0k
1.0k views
air1ankit asked Jul 12, 2018
1,039 views
anyone please explain me how to find loc in lower triangular matrix , i am getting little bit confuse suppose matrix is ...