Question

please derive the binary recurrence equation ie t(n) = t(n/2) + 1, t(1)=1 given that n...

please derive the binary recurrence equation ie
t(n) = t(n/2) + 1,
t(1)=1
given that n is not restricted to be power of two by considering the case that n can either be an odd or even number.

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

Here we have to solve the given recurrence relation ,

Using substitution method

1. Putting n = n /2 .

2. Finding Relation of T(n), for n = n/2.

3. Generalising T(n) for k steps.

4. After constantly dividing by 2 at last we will get 1.

So , equate

5. As , , so T() = T(1) , which is equal to 1.

6. At last substitute all values in generalised equation of T(n).

Final answer will be , i.e. big O of .

It is valid for all n greater than 1.

Please upvote.

Add a comment
Know the answer?
Add Answer to:
please derive the binary recurrence equation ie t(n) = t(n/2) + 1, t(1)=1 given that n...
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
ADVERTISEMENT