Syllabus for CS141 - Midterm 2

- Greedy method (activity selection, fractional knapsack, Huffman coding)
- questions (correctness, pseudocode, time complexity) on the algorithms mentioned in parenthesis (or about the corresponding problems)
- build the optimal huffman tree for the following string ...
- devise a greedy algorithm for the following problem ...
- prove why the following algorithm has the greedy-choice property ...
- prove why the following problem has the optimal substructure property ...
- show why greedy is a bad choice for the following problem ...

- Dynamic Programming method (counting combinations, 01-knapsack, LCS)
- questions (correctness, pseudocode, time complexity) on the algorithms mentioned in parenthesis (or about the corresponding problems)
- devise a dynamic programming algorithm for the following problem ...
- compute the maximum profit for the following 01-knapsack assignment ...
- compute the longest common subsequence for the following two strings ...
- given the final table for a dynamic programming algorithm, trace back all the optimal solutions...

**NOTE:** The list above is representative of the problems that could be on the
exam, but not necessarly exhaustive