CSC 510 Some Notes on Complexity Categories
1. To show g(n) e O(f(n)
Find yvalues ofc > O and N 2 0 such that g(n) S c X f(n) for all n 2 N.
Example: Show n2 e 0(n2); let C = 1 and N = 1; then n2 S 1
Some problems to devise algorithms for:
1. DesignerGenes, Inc., a biotech company, is studying replication rates of various
types of bacteria. Of particular interest is
J V \ / A
26. What is the time complexity T(n) of the nested loops below? For simplicity,
you may assume that n is a power of 2. That is, n ? 2 for some positive
integer k.
for (i = 1; i<= 1),; i+)cfw