Syllabus for CS218 - Midterm exam

- Concept of worst-case time-complexity
- Asymptotic notations: big-Oh, big-Theta, big-Omega and their properties
- prove or disprove that the following function is big-Oh, big-Theta, big-Omega of ...

- Worst-case analysis of (purely) iterative code
- Lower bound on comparison-based sorting
- Deriving and solving recurrence relations
- derive a recurrence relation from the following pseudo-code ...
- solve the following recurrence relation by iterative substitution ...
- solve the following recurrence relation by Master Theorem ...
- prove by induction the correctness of the solution of the following recurrence relation ...

- Amortized analysis
- Derive a upper bound for the total work required for the following sequence of n operations ...
- Greedy method (activity selection, fractional knapsack, Huffman coding, Dijkstra, Prim, Kruskal)
- questions on the algorithms mentioned in parenthesis (or about the corresponding problems)
- build the optimal huffman tree for the following string ...
- run Dijkstra algorithm on the following graph ...
- run Kruskal algorithm on the following graph ...
- run Prim algorithm on the following graph ...
- devise a greedy algorithm for the following problem ...
- prove that the following algorithm has the greedy-choice property ...
- prove that the following problem has the optimal substructure property ...
- show why greedy is a bad choice for the following problem ...

- Union-Find
- run the following set of operations (Make-Set, Find-Set, Union) using both union by rank and path compression. Show the final trees ...
- prove the following property about Union-Find ...

- Divide and Conquer method (linear time selection, Karatsuba's integer multiplication, Strassen's matrix multiplication, polynomial multiplication and FFT, FFT-based integer multiplication)
- questions on the algorithms mentioned in parenthesis (or about the corresponding problems)
- questions on the complex roots of unity and their properties
- devise a divide and conquer algorithm for the following problem ...

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