# Exercise2 - n ) = T( α n ) + T((1-α ) n ) + n , Where α...

This preview shows page 1. Sign up to view the full content.

Exercise Set 2 CSE 5311 Design and Analysis of Algorithms SPRING 2007 1. Solve the following recurrence relation T( n ) = T( n -1) + n /2 , T(1) = 1 2. Give asymptotic upper and lower bounds for T(n) in each of the following recurrences. Assume that T(n) is constant for n 2. Make your bounds as tight as possible, and justify your answers. a. T ( n ) = 2T( n /2) + n 3 b. T( n ) = T(9 n /10) + n c. T( n ) = 16T( n /4) + n 2 d. T( n ) = 3T( n /2) + n lg n e. T( n ) = T( n -1) + lg n 3. Argue that the solution to the recurrence T( n ) = T( n /3) + T(2 n /3) + n is ( n lg n ) by appealing to a recursion tree. 4. Use a recursion tree to solve the recurrence T(
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: n ) = T( α n ) + T((1-α ) n ) + n , Where α is a constant in the range 0< α < 1. 5. Prove that T( n ), which is defined by the recurrence relation T( n ) = 2T n /2 . + 2 n log 2 n , T(2) = 4, Satisfies T( n ) = O( n log 2 n ) 6. Compare the following pairs of functions in terms of order of magnitude. In each case, say whether f( n ) = O(g( n ), f( n ) = Ω (g( n )), and/or f( n ) = Θ (g( n )) f( n ) g( n ) a. 100 n +log n n + (log n ) 2 b. log n log( n 2 ) c . n 2 /log n n (log n ) 2 d. (log n ) log n n /log n e . √ n (log n ) 5 f. n 2 n 3 n...
View Full Document

## This document was uploaded on 11/18/2009.

Ask a homework question - tutors are online