4. Practice with the iteration method. We have already had a recurrence relation of an algorithm, which is T(n) = 4T(n/2) + n log n. We know T(1) ≤ c. (a) Solve this recurrence relation, i.e., express it as T(n) = O(f(n)), by using the iteration method. Answer:
4. Practice with the iteration method. We have already had a recurrence relation of
an
(a) Solve this recurrence relation, i.e., express it as T(n) = O(f(n)), by using the iteration method.
Answer:
(b) Prove, by using mathematical induction, that the iteration rule you have observed in 4(a) is correct and you have solved the recurrence relation correctly. [Hint: You can write out the general form of T(n) at the iteration step t, and prove that this form is correct for any iteration step t by using mathematical induction.
Then by finding out the eventual number of t and substituting it into your general
form of T(n), you get the O(·) notation of T(n).]

Trending now
This is a popular solution!
Step by step
Solved in 2 steps









