University of Delaware Computer and Information Sciences CIS621 Algorithm Design and Analysis

Homework Set #2 Due Thursday, October 12, 1995

1. Exercise 10.3-6, page 192.

Remark: Percentiles, as used in ranking things like GRE scores, are an instance of quantiles, k = 100. McLellan

2. Exercise 10.3-8, page 192.

Remark: Merge sort of n items requires Θ(n) extra space, a second array in which to put the merged data. Think about how this problem could lead to a version of merge which uses (significantly) less extra space. Bhir

3. Exercise 10.3-9, page 192.

Remark: this is related to linear regression. Hall

4. (a) Exercise 13.3-3, page 254.

(b) Answer the same questions for red-black trees.

Explain your answers, of course. Chen

5. (a) Exercise 13.4-2, page 259.

(b) Show that for 3 key red-black trees the notions of “randomly chosen” and “randomly built” are not equivalent.

(c) Show that for 4 key red-black trees the notions of “randomly chosen” and “randomly built” are equivalent.

Ferry

6. Extra Credit: Problem 10-2, page 193. Extra credit means that the score on this problem (if greater) can replace your lowest problem score from any homework set. Alpesh

Remember to put your solutions to separate problems on separate pages and to put your name on each.