Starting from:

$30

Introduction to Algorithms  Homework 2

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ΰ―‘

More products