Question

Use the recursion tree method to find a closed form solution to T(n) = 4T(n/4) +...

Use the recursion tree method to find a closed form solution to T(n) = 4T(n/4) + n.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Solution for the problem is provided below, please comment if any doubts:

The recursion tree for the recursion “T(n) = 4T(n/4) + n”. is provided below,

From the recursion tree,

  • The depth of the tree will be the depth when T(1) become at leaves.
  • The n is divided by 4 each step, thus depth will be “log(n)”.
  • Total number of leaf nodes at the last level will be = 4 log4­(n)
  • The summation work needed to be done at each stage is,
    • n, 4*n/4, 16*n/16, …. = n, n, n….. log(n) times = n* log(n)
  • Now the total operation to be done = n* log(n) + 4 log4­(n)
  • In closed form = n* log(n) + 4 log4­(n)= Θ(n log(n))

Thus the closed form solution of the given recursion is Θ(n log(n)).

Add a comment
Know the answer?
Add Answer to:
Use the recursion tree method to find a closed form solution to T(n) = 4T(n/4) +...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT