hw0(2) - CS 373: Combinatorial Algorithms, Spring 2001...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CS 373: Combinatorial Algorithms, Spring 2001 Homework 0, due January 23, 2001 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 dont give yourself an alias, well give you one that you wont like. This homework tests your familiarity with the prerequisite material from CS 173, CS 225, and CS 273many of these problems have appeared on homeworks or exams in those classesprimarily to help you identify gaps in your knowledge. You are responsible for filling those gaps on your own. Parberry and Chapters 16 of CLR should be sufficient review, but you may want to consult other texts as well. 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 homeworksstaple your solutions together in order, write your name and netID on every page, dont 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. Required Problems 1. (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 , 17 = 2 4 + 2 . [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 Fibonacci numbersif F n appears in the sum, then neither F n +1 nor F n 1 will. For example: 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 , 17 = 3 3 3 2 3 . CS 373 Homework 0 (due 1/23/00) Spring 2001 2. Sort the following 20 functions from asymptotically smallest to asymptotically largest, indi- cating ties if there are any. You do not need to turn in proofs (in fact, please dont turn in proofs), but you should do them anyway just for practice. 1 n n 2 lg n lg n 2 2 lg lg n +1 lg 2 n 2 lg n lg( n !) 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 1000 ) 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...
View Full Document

Page1 / 7

hw0(2) - CS 373: Combinatorial Algorithms, Spring 2001...

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