{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

f00-hwex - CS 373 Combinatorial Algorithms Fall 2000...

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

View Full Document Right Arrow Icon
CS 373: Combinatorial Algorithms, Fall 2000 Homework 0, due August 31, 2000 at the beginning of class Name: Net ID: Alias: Neatly print your name (first name first, with no comma), your network ID, and a short alias into the boxes above. 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, read the Homework Instructions and FAQ on the CS 373 course web page (http://www-courses.cs.uiuc.edu/ cs373/hw/faq.html), and then check the box below. This web page gives instructions on how to write and submit homeworks—staple your solutions together in order, write your name and netID on every page, don’t turn in source code, analyze everything, use good English and good logic, and so forth. I have read the CS 373 Homework Instructions and FAQ. This homework tests your familiarity with the prerequisite material from CS 173, CS 225, and CS 273—many of these problems have appeared on homeworks or exams in those classes—primarily to help you identify gaps in your knowledge. You are responsible for filling those gaps on your own. Parberry and Chapters 1–6 of CLR should be sufficient review, but you may want to consult other texts as well. Required Problems 1. Sort the following 25 functions from asymptotically smallest to asymptotically largest, indi- cating ties if there are any: 1 n n 2 lg n lg( n lg n ) lg n lg 2 n 2 lg n lg lg n lg lg n n lg n (lg n ) n (lg n ) lg n n 1 / lg n n lg lg n log 1000 n lg 1000 n lg (1000) n ( 1 + 1 n ) n n 1 / 1000 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 .
Image of page 1

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

View Full Document Right Arrow Icon
CS 373 Homework 0 (due 8/31/00) Fall 2000 2. (a) Prove that any positive integer can be written as the sum of distinct powers of 2 . For example: 42 = 2 5 + 2 3 + 2 1 , 25 = 2 4 + 2 3 + 2 0 , 17 = 2 4 + 2 0 . [Hint: “Write the number in binary” is not a proof; it just restates the problem.] (b) Prove that any positive integer can be written as the sum of distinct nonconsecutive Fi- bonacci numbers—if F n appears in the sum, then neither F n +1 nor F n 1 will. For exam- ple: 42 = F 9 + F 6 , 25 = F 8 + F 4 + F 2 , 17 = F 7 + F 4 + F 2 . (c) Prove that any integer (positive, negative, or zero) can be written in the form i ± 3 i , where the exponents i are distinct non-negative integers. For example: 42 = 3 4 3 3 3 2 3 1 , 25 = 3 3 3 1 + 3 0 , 17 = 3 3 3 2 3 0 . 3. Solve the following recurrences. State tight asymptotic bounds for each function in the form Θ( f ( n )) for some recognizable function f ( n ) . You do not need to turn in proofs (in fact, please don’t turn in proofs), but you should do them anyway just for practice. If no base cases are given, assume something reasonable but nontrivial. Extra credit will be given for more exact solutions.
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern