308 views
1 votes
1 votes

The running time of MAX_HEAPIFY on a subtree of size n rooted at a given node i is the Thete(1) time to fix up the relationships among the element A[i] , A[LEFT(i)] and A[RIGHT(i)] , plus the time to run the MAX_HEAPIFY on subtree rooted at one of the children of node i  .


The children's subtree each have size at most (2n/3) - the worst case occurs when the level of the tree is exactly half full and therefore we can describe the running time of MAX_HEAPIFY by the recurrence -

T(n) <= T(2n/3) + theta(1)

Could anyone explain the bold lines in detail ?

Please log in or register to answer this question.

Related questions

2 votes
2 votes
0 answers
1
dragonball asked Nov 10, 2017
207 views
Show that the worst case time complexity of MAX_HEAPIFY is Ω(logn ) .
2 votes
2 votes
1 answer
2
dragonball asked Oct 21, 2017
1,150 views
Wha is the relationship between the running time of insertion sort and the number of inversions in the input array ?Is the circled text should be greater instead of less ...
0 votes
0 votes
0 answers
3
0 votes
0 votes
1 answer
4
dragonball asked Jun 22, 2017
381 views
While solving this recurrence T(n) = 2T(n/2 + 17) + n what is the need of 17 and how to go forward to solve this question using the method of master theorem ?