$30
COMP 3270 Introduction to Algorithms
Homework 2
2. (30 pts) Use the Master Method to solve the following three recurrence relations and state the
complexity orders of the corresponding recursive algorithms.
(a) παΊπα» ΰ΅ 2παΊ99π/100α» ΰ΅
100π
(b) παΊπα» ΰ΅ 16παΊπ/2α» ΰ΅
πΰ¬·πππ
(c) παΊπα» ΰ΅ 16παΊπ/4α» ΰ΅
πΰ¬Ά
3. (50 pts) Use the Substitution Method to solve the following recurrence relation. Give an exact solution:
παΊπα» ΰ΅ παΊπΰ΅1α» ΰ΅
π/2
1.. (20pts) Compare the following pairs of functions in terms of order of magnitude. In each case, say
whether παΊπα» ΰ΅ Ξΰ΅«παΊπα»ΰ΅―, παΊπα» ΰ΅ Ξΰ΅«παΊπα»ΰ΅―, or παΊπα» ΰ΅ Ξ©ΰ΅«παΊπα»ΰ΅―.
παΊπα» παΊπα»
a. 100π ΰ΅
πππ π π ΰ΅
αΊπππ πα»ΰ¬Ά
b. πππ π πππαΊπΰ¬Άα»
c.
πΰ¬Ά
πππ π
παΊπππ πα»ΰ¬Ά
d. π
ଡ
ΰ¬Ά πππ πΰ¬Ή
e. π2ΰ―‘ 3ΰ―‘