This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: CS 473 HeadBanging Session 0 (January 2021, 2009) Spring 2009 CS 473: Undergraduate Algorithms, Spring 2009 Head Banging Session 0 January 20 and 21, 2009 1. Solve the following recurrences. If base cases are provided, find an exact closedform solution. Otherwise, find a solution of the form ( f ( n )) for some function f . Warmup: You should be able to solve these almost as fast as you can write down the answers. (a) A ( n ) = A ( n 1 ) + 1, where A ( ) = 0. (b) B ( n ) = B ( n 5 ) + 2, where B ( ) = 17. (c) C ( n ) = C ( n 1 ) + n 2 (d) D ( n ) = 3 D ( n / 2 ) + n 2 (e) E ( n ) = 4 E ( n / 2 ) + n 2 (f) F ( n ) = 5 F ( n / 2 ) + n 2 Real practice: (a) A ( n ) = A ( n / 3 ) + 3 A ( n / 5 ) + A ( n / 15 ) + n (b) B ( n ) = min < k < n ( B ( k ) + B ( n k ) + n ) (c) C ( n ) = max n / 4 < k < 3 n / 4 ( C ( k ) + C ( n k ) + n ) (d) D ( n ) = max < k < n D ( k ) + D ( n k ) + k ( n k ) , where D ( 1 ) = (e) E ( n ) = 2 E ( n 1 ) + E ( n 2 ) , where E ( ) = 1 and E...
View
Full
Document
 Fall '08
 Chekuri,C
 Algorithms

Click to edit the document details