Question

What is the range of input sizes for the following time complexities to compute an answer...

What is the range of input sizes for the following time complexities to compute an answer in no more than 1 second?

1 to ____ for each:

Solving for max possible value of n to produce an answer in 1 second

O(lgn)

O(square-root(n))

O(n)

O(n2)

O(n3)

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

Since it is known that atmost 10^7 lines are compiled in 1 second it is clear that

1 . n= very very large as log(n) is highly optimsed

logn=10^7 which means n=10^(10^7) which is extremely large.

2 . n=10^14 nearly for sqrt(n)

as n^1/2 =10^7 which is extreme case and hence n=(10^7)^2 which is nearly equal to 10^14.

3. n=10^7 nearly for n

as n^1 =10^7 which is extreme case and hence n=(10^7)^1 which is nearly equal to 10^7.

4. n= 10^3 for n^2

as n^2 =10^7 which is extreme case and hence n=(10^7)^1/2 which is nearly equal to 1000.

5. n=10^2 nearly for n^3

as n^3 =10^7 which is extreme case and hence n=(10^7)^1/3 which is nearly equal to 100.

If u feel any doubt feel free to ask

Add a comment
Know the answer?
Add Answer to:
What is the range of input sizes for the following time complexities to compute an answer...
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