Unformatted text preview: (a) If I prove that an algorithm takes Θ( n 2 ) worstcase time, is it possible that it takes O ( n ) on some inputs? (b) If I prove that an algorithm takes Θ( n 2 ) worstcase time, is it possible that it takes O ( n ) on all inputs? (c) Consider the function: f ( n ) = 100 n 2 20 n 2 − n n even n odd Is f ( n ) = Θ( n 2 ) ? Give reasons. 3. 31 (page 5758) 4. 32 (page 58) 1...
View
Full Document
 Spring '08
 Chandra
 Analysis of algorithms, Computational complexity theory, worstcase time complexity

Click to edit the document details