You are on page 1of 2

3.

Growth of functions and asymptotic notations Computer Science Department, College of Computer and Information Sciences, King Saud University. CSC 311: Design and Analysis of Algorithms1 Dr. Waleed Alsalih

3.3

Using limits to compare orders of growth


0 implies that t(n) has a smaller order of growth than g (n). t(n) c > 0 implies that t(n) has the same order of growth than g (n). = n g (n) implies that t(n) has a larger order of growth than g (n). lim t (n) t(n) = lim n g (n) n g (n) lim

LHopitals rule:

Stirlings formula: n n! 2n e Example: Compare the orders of growth of


n

for large values of n.

1 n(n 1) and n2 . 2

Example: Compare the orders of growth of log2 n and n. Example: Compare the orders of growth of n! and 2n . See the textbook for solutions to these examples.
This is a summary of the material we cover from the textbook: Introduction to the Design & Analysis of Algorithms, A. Levitin, Second Edition, Pearson Addison-Wesley, 2006.
1

3. Growth of functions and asymptotic notations

Useful derivative rules


f (x) = xr f (x) = rxr1 . f (x) = ax f (x) = (ln a)ax . f (x) = ln x f (x) = 1 , x > 0. x 1 . x ln a

f (x) = loga x f (x) =

f (x) = h(g (x)) f (x) = h (g (x)) g (x). (f + g ) = f + g .

(f g ) = f g + f g . f g = f g f g , where g = 0. g2 logk x . logk a

loga x =

You might also like