Question: The running time of algorithm A is described by the recurrence TA(n) = 7 * TA(n/2) + n2. The running time of algorithm B is
The running time of algorithm A is described by the recurrence TA(n) = 7 * TA(n/2) + n2. The running time of algorithm B is given by TB(n) = a * TB(n/4) + n2. What is the largest value of a for which algorithm B is asymptotically faster than algorithm A, and what does this tell us about how algorithm B should be designed? Hint: Consider the Master Theorem/Method.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
