SUNY Geneseo Department of Computer Science
CSci 240, Spring 2007
Prof. Doug Baldwin
Find asymptotic closed forms for each of the following recurrence relations.
Use the Master Theorem, noting that a = 8, b = 2, and g(n) = n. log28 = 3, so g(n) = O( nlogba - ε ) for ε = 2. Therefore the closed form is T(n) = Θ( nlogba ) = Θ( nlog28 ) = Θ( n3 ).
Use the Master Theorem, noting that a = 9, b = 3, and g(n) = n2. log39 = 2, so g(n) = Θ( nlogba ). Therefore the closed form is T(n) = Θ( nlog39 logn ) = Θ( n2 logn )
Use the Master Theorem, noting that a = 3, b = 2, and g(n) = n2. log23 ≈ 1.58, so g(n) = Ω( nlogba + ε ) for ε ≈ 0.42. Furthermore, a g(n/b) = 3 (n/2)2 = 3/4 n2 ≤ c g(n) = c n2 for any c ≥ 3/4. Therefore the closed form is T(n) = Θ( g(n) ) = Θ( n2 ).
Use the Master Theorem, with a = 2, b = 4, and g(n) = 2. log42 = 0.5, so g(n) = O( nlogba - ε ) = O( n0.5 - ε ) for ε = 0.5. Therefore the closed form is T(n) = Θ( nlogba ) = Θ( nlog42 ) = Θ( n0.5 ) = Θ( √n ).