Question: Q2 (10 points) There are two algorithms A and B for solving the same problem. Algorithm A has a worst-case time complexity TA(n) that satisfies
Q2 (10 points) There are two algorithms A and B for solving the same problem. Algorithm A has a worst-case time complexity TA(n) that satisfies the recurrence relation TA(n) = 7.TA(n/2) + n logn, where n is the input size. Algorithm B has a worst-case time complexity To(n) that satisfies the recurrence relation Ta(n) = 8 TB(n/2) +, where n is the input size. Suppose that you want to use the Master method to find the asymptotic notations for TA(n) and To(n), and to decide which algorithm is faster. (a) On the answer sheet, decide which case of the Master method TA(n) falls into, by checking the corresponding box. (b) On the answer sheet, decide the asymptotic notation of TA(n) by checking the corre- sponding box (c) On the answer sheet, decide which case of the Master method To(n) falls into, by checking the corresponding box. (d) On the answer sheet, decide the asymptotic notation of To(n) by checking the corre- sponding box (e) On the answer sheet, decide which algorithm is faster by checking the corresponding box
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
