Answer to Question #186746 in Calculus for goel

Question #186746

Solve the following recurrence relation using Recurrence Tree Method.

𝑇(𝑛) = ∫ 1 if n+1

∫T(n/2) + n if n >1


Show all the steps.


1
Expert's answer
2021-05-07T10:57:02-0400

The recursion tree for the given recurrence relation is-

"T(n)- d\\\\\n\\downarrow\n \n\\\\\nT(\\dfrac{n}{2})-d\n\\\\\\downarrow\\\\\n\n\n\nT(\\dfrac{n}{4})-d\n\n\\\\\\downarrow\\\\\n\n\nT(1)-d\n\\downarrow"


we go like "n,\\dfrac{n}{2},\\dfrac{n}{4},\\dfrac{n}{8}...1"


    or "2^k=n, k=log_2n"


So we sum d+d+d.. for "log_2n" terms complexity "=0 (log_2n)=0(log_2n)"


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS