Question: Consider two algorithms A 1 and A 2 that have the running times T 1 (n) and T 2 (n), respectively. T 1 (n) =

Consider two algorithms A1 and A2 that have the running times T1(n) and T2(n), respectively.

T1(n) = T1(n) = 1,000n2+10n and T2(n) = 0.01n2+0.01n

  1. Use the definition of O() to show that T1(n) O(T2(n)). Hint: See Slide 28 or Textbook Pages 44-49. You will have to find/exhibit the numbers c and n0.
  2. Which algorithm should you use? A1 or A2?

Consider two algorithms A1 and A2 that have the running times T1(n) and T2(n), respectively.

T1(n) = T1(n) = 1,000n2+10n and T2(n) = 0.01n2+0.01n

  1. Use the definition of () to show that T1(n) (T2(n)).
  2. Show that T1(n) (T2(n)) .

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!