Question: 1. An algorithm takes 1 ms for input size 100. How long will it take for input size 500 (assuming that low-order terms are negligible)

 1. An algorithm takes 1 ms for input size 100. How

1. An algorithm takes 1 ms for input size 100. How long will it take for input size 500 (assuming that low-order terms are negligible) if the running time is: (a) linear (b) quadratic (c)cubic 2. Use the definition of O,2. 9, to (a) show that 3n +6 O(n) (b) show that 3n + 6 ?(n) (c) show that 3n + 6 en) (d) is 2+1 O(2")? Explain the reason 3. Use the definition of O to prove: If f(n) and g -O(n), then f +g-O(n) 4. Rank the following functions: 100, log n, log(n2), log log n, and logn. Explain reasons for your ranking

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!