Question: Suppose that you have to choose between three algorithms A_1, A_2 and A_3 for a given problem. The worst-case running time for each algorithm is

Suppose that you have to choose between three algorithms A_1, A_2 and A_3 for a given problem. The worst-case running time for each algorithm is given by W_1(n) = 100n: W_2(n) = 2n log_10 n: W_3(n) = 0.1n^2. Answer the following questions, explaining your assumptions and possible limitations of your analysis. (a) Order the algorithms from fastest to slowest in the sense of asymptotic worst-case running time. (b) Suppose that we run each algorithm on a large problem instance of size n. Then we feed in an input of size 100m and re-run the algorithms on the new input. What would you expect to happen to the running times, and why? (c) Suppose that hardware limitations mean that your algorithm can only accept input of size at most 10^6. Which algorithm would you prefer, and why? Answer the same question with 10^6 replaced by 10^3. (d) For which problem sizes is A_1 the best algorithm to use? Answer the same question for A_2 and then for A_3. (e) Suppose that we have 10^9 time units available. What is the maximum input size that can be processed by each of the algorithms in that time
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
