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

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

View Full Document Right Arrow Icon
CS 373: Combinatorial Algorithms, Fall 2002 Homework 0, due September 5, 2002 at the beginning of class Name: Net ID: Alias: U G Neatly print your name (frst name frst, with no comma), your network ID, and an alias oF your choice into the boxes above. Circle U iF you are an undergraduate, and G iF you are a graduate student. Do not sign your name. Do not write your Social Security number. Staple this sheet oF paper to the top oF your homework. Grades will be listed on the course web site by alias give us, so your alias should not resemble your name or your Net ID. IF you don’t give yourselF an alias, we’ll give you one that you won’t like. BeFore you do anything else, please read the Homework Instructions and ±AQ on the CS 373 course web page (http://www-courses.cs.uiuc.edu/˜cs373/hwx/Faq.html) and then check the box below. There are 300 students in CS 373 this semester; we are quite serious about giving zeros to homeworks that don’t Follow the instructions. I have read the CS 373 Homework Instructions and FAQ. Every CS 373 homework has the same basic structure. There are six required problems, some with several subproblems. Each problem is worth 10 points. Only graduate students are required to answer problem 6; undergraduates can turn in a solution For extra credit. There are several practice problems at the end. Stars indicate problems we think are hard. This homework tests your Familiarity with the prerequisite material From CS 173, CS 225, and CS 273, primarily to help you identiFy gaps in your knowledge. You are responsible for Flling those gaps on your own. Rosen (the 173/273 textbook), CLRS (especially Chapters 1–7, 10, 12, and A–C), and the lecture notes on recurrences should be su²cient review, but you may want to consult other texts as well.
Background image of page 1

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

View Full DocumentRight Arrow Icon
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
Background image of page 2
Image of page 3
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 Right Arrow Icon
Ask a homework question - tutors are online