#3
For parts a-d use limits, as we did in class, to determine whether f(n) e o(g(n)), g(n) e o(f(n)),
or if f(n) 2 0 (g(n)). (Hint: Use L'Hopital's Rule when appropriate and helpful)
(a) f(n) = ln n, g(n) = 6lgn
(b) f(n) = 2<sup>n</sup>, g(n) = e<sup>n</sup>
(c) f(n) = nlnn, g(n) = ln<sup>2</sup>n
(d) f(n) = ?n, g(n) = ?n [Hint, remember ?n = n<sup>1/2</sup> and ?n = n<sup>1/3</sup>]
CS 502 - Analysis of Algorithms
Homework #4
#4 Given the recurrence T(n) = T(n/2) + T(n/2) + n
(a) How much actual work is being done in level 0?
(b) How much actual work is being done in level 1?
(c) Below the recursion tree showing levels 0, 1 and 2 and the total work for each of these
levels (similar to the recursion tree in the lec2.pdf slides from class.
(d) If we assume the tree has an infinite number of levels, calculate the sum of the total work in
the entire recursion tree (like the lec2.pdf slides from class)
Total = n + 2(n/2) + 4(n/4) + ...
[Hint: There is a geometric series similar to the lecture example)