Question

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

Solution:| Consider an example for calculate the efficiency of function. To evaluate an expression of function findEfficiencyThen calculate the comparison of inverse function is nl findEfficiency (n)-n *From the above result n that is not bounded the

Solution:

Consider an example for calculate the efficiency of function.

To evaluate an expression of function findEfficiency (n) means findEfficiency function with parameter is size of the list input.

  • Perform one comparison on each content in the list
  • Then it will be the findEfficiency (n) is equal to n .

findEfficiency (n) /n will return 1 that can be expressed as findEfficiency (n)/n = 1

That means the expression gives result as findEfficiency (n) grows no faster than n.

  • From the big – O notation findEfficiency (n) = O(n).

Then calculate the comparison of inverse function is n/ findEfficiency (n) = 1

  • It remains the results as bounded.
  • From the function findEfficiency (n) it is grows faster than n.

From above both the cases grows with same speed.

That result in the form of findEfficiency(n) is Θ(n)

In the case of findEfficiency (n) /n2 is also in the form of bounded.

  • Then it will be the findEfficiency (n) is equal to n2 .

That means the expression gives result as findEfficiency (n) grows no faster than n.

  • From the big – O notation findEfficiency (n) = O(n2).

From the concept of upper bound on the complexity of big – O notation is is O(n2), O(n3), O(n4) and so on...

Then calculate the comparison of inverse function is n2/ findEfficiency (n) = n

  • From the above result n that is not bounded then it means findEfficiency (n) ≠Θ(n2)

From the concept of lower bound and upper bound on the complexity of the findEfficiency function , the result will be Θ(n)+O(n2) ≠O(n2)

Add a comment
Know the answer?
Add Answer to:
Prove that Theta(n) +O (n^2) notequalto O(n^2)
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