Question

ALGORITHM ENGINEERING HOMEWORK Let g(n) = n. Is it true that g(n) 2 O(n2)? Why or...

ALGORITHM ENGINEERING HOMEWORK

Let g(n) = n. Is it true that g(n) 2 O(n2)? Why or why not?

0 0
Add a comment Improve this question Transcribed image text
Answer #1
f(n) = O(g(n)) means there are positive constants c and n0, such that 0 ≤ f(n) ≤ cg(n) for all n ≥ n0

g(n) = O(n^2)
n    = O(n^2)

=>  n <= c*n^2

Let's assume c = 1

=>  n <= c*n^2
=>  n <= n^2
=>  0 <= n

so, g(n) = O(n^2) given c = 1 and n0 = 0 

Please let me know if you need me to make any changes.

Add a comment
Know the answer?
Add Answer to:
ALGORITHM ENGINEERING HOMEWORK Let g(n) = n. Is it true that g(n) 2 O(n2)? Why or...
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