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
- 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.
- 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
- Use the definition of () to show that T1(n) (T2(n)).
- Show that T1(n) (T2(n)) .
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
