I have a solution to another problem and I would greatly appreciate any assistance to help me verify the solution to it.
The recurrence T(n) = 7T(n/2) + n2 describes the running time of algorithm A. There is another competing algorithm A' = T(n) = aT(n/4) + n2. What is the largest integer value of "a" so that A' is asymptotically faster than A?
My initial intuition for the solution was to first determine the running time of A. Then find the value of variable "a" in A' so that the running time of A' is exactly same as A. The answer will then be a-1.
From the master theorem, nlog27 = 2.81. therefore f(n) = TEHTA(n2) = BIGOH(n2.81-e) where e = 0.81. Therefore T(n) = THETA(n2.81).
Now for A' to be THETA(n^2.81), a has to be 49 as log449 = 2.81. The largest int value of a so that A' is faster is therefore 48. since then A' = THETA(n2.79) approx.

New Topic/Question
Reply
MultiQuote

|