CS 361: Algorithms and Data Structures
Homework 6


Assignments will be collected at the beginning of the class period. Please bring a hardcopy to turn in. Your assignment can be hand-written or typed.

For the questions on the homework that ask you to "design an algorithm" or "give an algorithm", please review the "Homework Guide" so you know what your answer must include.


Homework Questions

  1. Algorithm Design 5.1
    (Since you can only use O(log n) queries, what must be true about your algorithm? What other algorithms do you know that have O(log n) running time?)

  2. Algorithm Design 5.3

  3. For the following recurrence relations, use a recurrence tree to determine an upper-bound on the running time (i.e. your final answer should be a statement in Big-O notation):
    • T(n) = 1T(n/2) + d (This is the recurrence relation for Binary search)
    • T(n) = 16T(n/4) + n^2
    • T(n) = T(n-2) + n^2
    • T(n) = 2T(n-1) + d (This is a simplified recurrence relation for a recursive Fibonacci implementation)


Last modified: Fri Jan 24 10:58:47 PST 2014