hw0(3) - CS 373: Combinatorial Algorithms, Fall 2002...

This preview shows pages 1–3. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
CS 373 Homework 0 (due 9/5/02) Fall 2002 Required Problems 1. Sort the following functions from asymptotically smallest to asymptotically largest, indicating ties if there are any. Please don’t turn in proofs, but you should do them anyway to make sure you’re right (and for practice). 1 n n 2 lg n n lg n n lg n (lg n ) n (lg n ) lg n n lg lg n n 1 / lg n log 1000 n lg 1000 n lg (1000) n lg( n 1000 ) ( 1 + 1 1000 ) n To simplify notation, write f ( n ) ± g ( n ) to mean f ( n ) = o ( g ( n )) and f ( n ) g ( n ) to mean f ( n ) = Θ( g ( n )). For example, the functions n 2 , n , ( n 2 ) , n 3 could be sorted either as n ± n 2 ( n 2 ) ± n 3 or as n ± ( n 2 ) n 2 ± n 3 . 2. Solve these recurrences. State tight asymptotic bounds for each function in the form Θ( f ( n )) for some recognizable function f ( n ). Please don’t turn in proofs, but you should do them anyway just for practice. Assume reasonable but nontrivial base cases, and state them if they a±ect your solution. Extra credit will be given for more exact solutions. [Hint: Most of these are very easy.] A ( n ) = 2 A ( n/ 2) + n F ( n ) = 9 F ( b n/ 3 c + 9) + n 2 B ( n ) = 3 B ( n/ 2) + n G ( n ) = 3 G ( n - 1) / 5 G ( n - 2) C ( n ) = 2 C ( n/ 3) + n H ( n ) = 2 H ( n ) + 1 D ( n ) = 2 D ( n - 1) + 1 I ( n ) = min 1 k n/ 2 ( I ( k ) + I ( n - k ) + k ) E ( n ) = max 1 k n/ 2 ( E ( k ) + E ( n - k ) + n ) * J ( n ) = max 1 k n/ 2 ( J ( k ) + J ( n - k ) + k ) 3. Recall that a binary tree is
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/15/2009 for the course 942 cs taught by Professor A during the Spring '09 term at University of Illinois at Urbana–Champaign.

Page1 / 6

hw0(3) - CS 373: Combinatorial Algorithms, Fall 2002...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online