===== Recurrences ===== Methods for solving recurrences: {{:aa:lab:recurrences.pdf|}} ==== Lab exercises ==== * $math[T(n) = 4T(n/4) + 1] (the substitution method is interesting) * $math[T(n) = 8T(n/2) + \Theta(n^2)] (the substitution method is interesting) * $math[T(n) = 2T(n-1) + 1] * $math[T(n) = T(n-1) + 1] * $math[T(n) = 2T(n/2) + \log(n)] (the iteration method is interesting) ==== Practice exercises ==== Use each possible method, to solve: * $math[T(n) = T(n/9) + T(8n/9) + n] * $math[T(n) = T(2n/3) + 1] * $math[T(n) = T(\sqrt{n}) + 1] (hint: substitute $math[n] by $math[2^k]) * $math[T(n) = 2T(\sqrt{n}) + n] (hint: substitute $math[n] by $math[2^k]) * $math[T(n) = \sqrt{n}T(\sqrt{n}) + n] (harder exercise. hint: substitute $math[n] by $math[2^k])