Question

Could you please help me to solve the problem. Also, could you please answer questions in...

Could you please help me to solve the problem. Also, could you please answer questions in clear hand-writing and show me the full process, thank you (Sometimes I get the answer which was difficult to read).Thanks a lot

Suppose we are comparing implementations of two algorithms on the same machine. For input size of n, Algorithm A runs in 8n^2 steps, while Algorithm B runs in 64nlog2(n) steps. For what value n>2, where n is an integer, does Algorithm A run in fewer steps than Algorithm B? (give your answer in whole number(s)).

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

GRAPH:

We can also manually check the validity of this interval by taking a value of n out of this range. For example :

Let n=44, then:

A: 8n2 = 8 x 44^2 = 15488 steps

B: 64nlog2(n) = 64 x 44 x log2(44) = 15374 steps

Thus at this point, A>B and hence our interval holds true.

NOTE: Writing the interval 3<=n<=43 is same as 2<n<=43 as n as supposed to be an integer greater than 2, as mentioned in the question

Add a comment
Know the answer?
Add Answer to:
Could you please help me to solve the problem. Also, could you please answer questions in...
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