1. Engineering
  2. Computer Science
  3. please solve the following and justify your answer...

Question: please solve the following and justify your answer...

Question details
Please solve the following and justify your answer
What you need to do: Answer the questions and/or solve the exercises described below. Exercise I (15 points) Consider two algorithms A, and A2 that have the running times Ti(n) and T2(n), respectively. T, (n) = 100 nig(n) and T2(n) = n. a) (12 points) Use the definition of O() to show that T(n) O(T2(n)) b) (3 points) Which algorithm should you use? Ay or A? Justify
Exercise 2 (15 points) Consider two algorithms A, and A, that have the running times T,(n) and T,(n), respectively. T(n) n3n and T2(n) 50n2 a) (12 points) Use the definition of Ω() to show that Ti(n) € Ω(T,(n)) b) (3 points) Which algorithm should you use? A, or A? Justify Exercise 3 (25 points) Consider the polynomial P(n) of degree k: P(n) an+ain. + an ao. with all a>0 Using the definition of Θ(n), prove that k-I P(n) O(n).
Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution