# Syllabus for CS141 (Winter 2003) MIDTERM (Feb 18th, in class)

Topics and Sample Questions for Midterm: (Chapters 1 and 5 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...

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