CSPP 570 Algorithms - Autumn 2001

Homework 3

Reading assignment

Please read chapters 8 (Quicksort) and 9 (sorting in linear time).

Written assignment (assigned October 9, due October 17)

This homework covers the material in chapter 7 of the textbook, as well as review exercises on recurrences.

Please note: your solutions should be readable, and justifications should be given for steps in the proofs. Elegance counts!

  1. Solve the following recurrences. Prove your answers by induction. You may assume that n has a convenient form (e.g., n is a power of 3) if this is helpful. (Each part is worth 5 points.)

  2. Do exercise 7.3-3 on page 147. (10 points)

  3. Do exercise 7.4-2 on page 149. (10 points)

  4. Do exercise 7.5-6 on page 151. (10 points)

  5. Do problem 7-1 on page 152. (Each part is worth 5 points.)

  6. Do problem 7-2 on page 152. (Each part is worth 2 points.)

  7. Consider the following two statements about a function f(n) > 1: The notation in the second statement means that f(n) = ng(n) for some function g(n) which satisfies the relation g(n) = O(lg n).

    Answer the following questions:

    1. Does f(n) = nO(lg n) follow from f(n) = O(nlg n)?
    2. Does f(n) = O(nlg n) follow from f(n) = nO(lg n)?

      (Each part is worth 5 points.)

    Gerry Brady
    Tue Oct 9 13:42:10 CDT 2001