CS 361: Algorithms and Data Structures
Homework 4
Due date: 9/30 in class


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, your answer should include the following:

  1. Description: A written description of how your algorithm works.
  2. Pseudocode: Pseudocode for your algorithm. The pseudocode should give sufficient detail to make an analysis straightforward (e.g. don't hide a for-loop in an English phrase) while still being high-level enough that it can be easily read.
  3. Running Time: A statement of the worst-case running time of your algorithm in Big-O notation. Please justify your running time using your pseudocode.

Homework Questions

  1. [Algorithmic Design Question] Algorithm Design 3.2
    Feel free to use the fact that DFS and BFS can be used to detect cycles when designing your algorithm.

  2. [Optimal Proof Question] Prove that the greedy solution posted for the Hiking Problem is optimal using exchange argument.

  3. [Optimal Proof Question] Algorithm Design 4.3

  4. [Algorithmic Design Question] Algorithm Design 4.5


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