# Syllabus for CS 141 - FINAL exam

Topics and Sample Questions for FINAL:

• 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
• 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 ...
• Divide and Conquer method (Karatsuba's integer multiplication, Strassen's matrix multiplication, closest pair, linear-time selection)
• questions (correctness, pseudocode, time complexity) on the algorithms mentioned in parenthesis (or about the corresponding problems)
• devise a divide and conquer algorithm for the following problem ...
• Greedy method (activity selection, fractional knapsack, Huffman)
• 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 ...
• argue why the following algorithm has the greedy-choice property ...
• argue 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...
• Weighted graphs (single-source shortest path: Dijkstra and Bellman-Ford, all-pairs shortest path: Floyd-Warshall, minimimum spanning tree: Kruskal and Prim)
• questions (correctness, pseudocode, time complexity) on the algorithms mentioned in parenthesis (or about the corresponding problems)
• run Dijkstra algorithm on the following graph ...
• run Kruskal algorithm on the following graph ...
• run Prim algorithm on the following graph ...
• run Bellman-Ford algorithm on the following (small) graph ...
• run Floyd-Warshall algorithm on the following (very small) graph ...
• devise an efficient algorithm for the following problem on weighted undirected graphs ...
• devise an efficient algorithm for the following problem on weighted directed graphs ...

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