Homework 2
By doing this assignment you should
- Strengthen your understanding of the basics of algorithm analysis
Please do the following problems from the book. Remember your homework needs to be typed.
- (9 points) Page 50 number 1 parts a,b,f.
- Please provide an algorithm for each part.
- (5 points) Page 51 number 4 either a or b, your choice
- But carefully state all assumptions. These questions have some ambiguities.
- (9 points) Page 51 number 8 parts a,b and d
- (3 points) Page 58 number 1 all parts
- (4 points) Page 59 number 2 all parts.
- (2 points) Page 60 number 5, note ln2(n) = (lg(n))2
- Page 60 number 9 part a.
- (2 points) Please write an algorithm to accomplish this.
- (2 points) Please argue informally your algorithm is correct.
- (1 point) Please identify what you will use to measure the size of the input.
- (1 point) Please identify the critical operation.
- (1 point) Please state a function T(n) which describes the worst case performance of your algorithm.
- (1 point) Answer the question from the book.