SU-CS161 Review

Key Questions

  • Does it work?
  • Is it fast?
  • Can I do better?

General Structure

  • worst-case analysis: what’s the performance on the worst input
  • Big-oh notation

Syllabus

Divide and Conquer

We typically proof these’s correctness via induction, and we proof runtime by substitution method or master theorem.

Randomized Algorithm

quicksort: worst-case input, we use randomness after input is chosen

sorting with a model of computation

data structures

DFS/BFS

Shortest Paths

DP

dynamic programming has a recipe: identify optimal substructure, write down the recursive formulation, fill in table to figure out full answer.

Greedy

greedy algorithm: make a series of choices and immediately commit. Proof: induction by “greedy choices don’t limit future success.”

Cuts and Flows

minimum cut and maximum flow and the Folk-Fulkerson Algorithm

Ethics

Methods