# Syllabus for CS141 (Winter 2003) FINAL

Topics and Sample Questions for Final: (Chapters 1,5,6,7 of the Textbook, and slides posted on the class homepage)

• Concept of worst-case time-complexity
• Asymptotic notations: big-Oh, big-Theta, big-Omega
• prove or disprove that the following function is big-Oh, big-Theta, big-Omega of ...
• Properties of big-Oh, big-Theta, big-Omega
• prove or disprove that the following property hold ...
• Discrete math
• prove the following statement by induction ...
• Deriving recurrence relations
• derive a recurrence relation from the following pseudo-code ...
• Solving recurrence relations
• 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 ...
• Greedy method (scheduling, change machine - AKA knapsack, Huffman, general compression)
• questions on the algorithms mentioned in parenthesis...
• devise a greedy algorithm for the following problem ...
• show why greedy is a bad choice for the following problem ...
• prove that the greedy choice for the following problem always leads to the optimal solution ...
• Divide and Conquer method (mergesort, matrix multiplication/Strassen)
• questions on the algorithms mentioned in parenthesis...
• devise a divide and conquer algorithm for the following problem ...
• Dynamic Programming method (Fibonacci, Pascal's Triangle, Stage-Coach problem, Probability Maximization, Project Planning)
• questions on the algorithms mentioned in parenthesis...
• devise a dynamic programming algorithm for the following problem ...
• given the final table for a dynamic programming algorithm, find all optimal solutions...
• Undirected Graphs (DFS, BFS, connected components, biconnected components)
• questions on definitions
• questions on the graph data structures
• questions on the algorithms mentioned in parenthesis
• questions on the properties of DFS and BFS
• run the O(n+m) time biconnected components on the following graph ...
• Directed Graphs (DFS, BFS, strong connectivity, Floyd-Warshall, topological sorting)
• questions on definitions
• questions on the algorithms mentioned in parenthesis
• run the Floyd-Warshall algorithm on the following graph ...
• run the topological sorting algorithm on the following graph ...
• String Matching (Brute force)
• questions on Brute force's time complexity
• Weighted Graphs (Dijkstra, Bellman-Ford, all pairs shortest path, Kruskal, Prim)
• questions on the algorithms mentioned in parenthesis
• run Dijkstra algorithm on the following graph ...
• run Bellman-Ford algorithm on the following graph ...
• run Kruskal algorithm on the following graph ...
• run Prim algorithm on the following graph ...
• 2-4 trees (insertion, deletion)
• properties of 2-4 trees (e.g., min max height)
• build a 2-4 tree on the following set ot keys

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