solve the recurrence eqn(time complexity) with detailed answer

a) T(n)=2T(n/2)+√n, n>=2
T(1)=1
b) T(n)= mT(n/2)+an^2

Replies

  • nareshkumar6539
    nareshkumar6539
    By using master slave method you can solve the recurrence relations easily
    T(n)=a T(n/b)+f(n) where a>1 b>0 f(n) is a function then
    here i am writing n to the power of log a base b as pow(n,log a base b)
    O is big o notation
    case 1:
    f(n) is O(pow(n,log a base b-E) where E>0 then T(n)=O(pow(n,log a base b))
    if you apply the above case to first recurrence relation time complexity is O(n)
    a=2,b=2 so log 2 base 2 value will be 1 .O(pow(n,1-E)) if we put E=1/3 then case 1 condition is satisfying.
    In master slave method 3 case are there check once,check it this answer is correct or not.

You are reading an archived discussion.

Related Posts

According to Eric Jackson, Google and Facebook might be gone completely in 5-8 years due to the reasons that the tech world is moving these days. In his article, he...
Anyone Using DipTrace for PCB Designing? Need to ask about some Libraries.
As engineers, we're used to log books for calculations. But Chennai based company Perspecte has named their product Logbook because it actually is a book for your operations management. The...
i am a student of b.tech computer science, i want to buy a laptop, main concern is low price,usefullness for whole course,speed and realiability of brand. so please suggest me...
hello everyone, i'm Davinder Kumar. I'm doing mechanical engg. nd now i'm in 3rd year.