The College of New Jersey
Computer Science Department
CMSC 410: Advanced Algorithms
Fall 2001


Computational Complexity Measures for Algorithms





HOMEWORK #2 :

Find Q measures (function f(n) such that T(n) = Q(f(n))) for the following time complexity functions (related to different sorting algorithms)

(a)    T(n) = n2, f = ?.
(b)    T(n) = n2 + 1000*n, f = ?.
(c)    T(n) = n for odd n's
         T(n) = n3 for even n's, f = ?.

(Hint : take a look into the examples given in class).