UMBC CMSC441, Design & Analysis of Algorithms, Fall 2014

Homework 5

Due Thursday, October 2, 2014

Important instructions: Please do not use pseudocode (or actual code) to present your algorithm. Give a high-level description using complete English sentences in paragraph form. Resort to pseudocode only if implementation details are needed to justify the correctness or the running time of your algorithm. Finally, pseudocode, if included, must be commented, just like regular code.

  1. Pipeline.
    Exercise 9.3-9, pages 223-224.
    Additional instructions: argue that the answer produced by your algorithm is actually the minimum.

  2. Largest i numbers in sorted order.
    Problem 9-1, parts a, b & c, page 224.

  3. Selection in Two Sorted Arrays.
    Let A[] and B[] be two sorted arrays with m and n items, respectively. Describe an algorithm that finds the i-th smallest item in the union of the two arrays. For full credit, your algorithm should run in O(log m + log n) time.

Last Modified: 24 Sep 2014 13:47:45 EDT by Richard Chang
to Fall 2014 CMSC 441 Section 2 Homepage