Question

Recurrence time complexity and solution (Analysis of Algorithms- Haskell Language)

Recurrence time complexity and solution (Analysis of Algorithms- Haskell Language)
media%2F8a4%2F8a4be800-7d4e-4f88-a072-81
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Solution:

The recurrence relation will be:

T(n)= T(n/2) + c

As per the master theorem,

here,

a = 1 and b = 2, f(n) = c

n^(logb a) = n^(log2 1) = n^0 = c

comparing k^(logb a) and f(k), we can see that this is case 2 of master theorem

which means

T(n) = \Theta (log2 n)


I hope this helps if you find any problem. Please comment below. Don't forget to give a thumbs up if you liked it. :)

Add a comment
Know the answer?
Add Answer to:
Recurrence time complexity and solution (Analysis of Algorithms- Haskell Language)
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