2076 4

CSC325 · 2076 · 5 marks

Solve the following recurrence relation using the master method. a. T(n) = 7 T(n/2) + n2 b. T(n) = 4 T(n/4) + kn

Solve the following recurrence relation using the master method.

a. $T(n) = 7 T(n/2) + n^2$

b. $T(n) = 4 T(n/4) + kn$

[5]

Design and Analysis of AlgorithmsChapter 1: Foundation of Algorithm AnalysisSolving RecurrencesNumerical: master method recurrence
  • Part a: $T(n) = 7T(n/2) + n^2$ - Part b: $T(n) = 4T(n/4) + kn$ (where $k$ is a positive constant) For a recurrence $T(n) = aT(n/b) + f(n)$ with $a \geq 1$, $b 1$, compare $f(n)$ with $n^{\logb a}$: Case Condition Result ------------------------- 1 $f(n) = O(n^{\logb a - \epsilon})$, some