Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Alexandria University

Faculty of Engineering
Computer and Systems Engineering
Department

Data Structures 2
Assigned: Thursday, February 19, 2015
Due: Monday, February 23, 2015

Sheet 1
Asymptotic Notations - Recurrence Relations

Asymptotic Notations
1. Rank the following functions by order of growth. Partition them into equivalence classes
such that f (n) and g(n) are in the same class if and only if f (n) = (g(n)).
2n , n!,

lg n,, 4n , 22 , lg

n, nn , 2lg n , lg n!, 10 lg n

2. True or false:

(a) n lg n = O(n).
(b) lg n = O(n1/2 ).
(c) If f (n) = (g(n)), then g(n) = (f (n)).
3. Prove that 2n = O(n!).

Solving Recurrence Relations


1. Show that the solution of T (n) = T (n 1) + n is O(n2 ).
2. Give a tight asymptotic bounds for the following recurrences, consider T(1) = 1:
(a) T (n) = 4T (n/2) + (n)
(b) T (n) = 4T (n/2) + n
(c) T (n) = 4T (n/2) + n2
(d) T (n) = 4T (n/2) + n3
Good Luck

You might also like