Topics for the Midterm
CS 343: Analysis of Algorithms,
Spring 2008
Please review class notes and chapters 1-4 (plus part of 5). Review written and programming homework.
Chapter 1: Stable Matching
- What is an algorithm?
- How do you solve the Stable Matching (and its variations)?
- Proof of stability, perfection.
- Implementation issues.
- General Lessons: How does one approach solving problems? Can one beat brute force?
- What is a graph, bipartite graph? Note how many problems can be cast as a problem in graph theory.
- Types of problems (degrees of hardness - will study more later)
Chapter 2: Complexity
- Asymptotic notation. Know the definitions of big-theta (Θ, tight), big-Oh (&Omicron), big-Omega (Ω),
little-Omega (&omega), and little-Oh (&omicron). Note, this is really set notation!
- Know additivity and transitivity properties.
- When do you typically see
- O(n log n) - divide and conquer
- O(n2) - nested loops
- O(nk) - enumeration over subsets of size k
- O(2n) - enumerate over all subsets.
- What does it mean to be poly-time? What does it mean for an algorithm to be efficient?
- Know relative behavior of common functions such as
an, na, log(n), n!, etc
- How many ways are there of permuting n things?
- Know how to calculate the complexity of simple
algorithms (e.g. loops, nested loops)
- Know the simple series: arithmetic (sumk k),
geometric (sumk xk), harmonic
(sumk 1/k)
- Know basic exponential and log identities, i.e. expand log(ab), log(a/b),
log(ab)
- Know how to manipulate summations.
- How do you do a complexity proof starting from the definition?
- What do limits (f/g) tell you about complexity?
Chapter 3: Graphs
- What is a graph. Directed vs undirected. Where are they used?
- Representation:
- How are graphs represented: adjacency list and matrix.
- How does representation affect complexity of an algorithm?
- What are the pros and cons of each type of representation?
- Know graph terminology, e.g. path, simple, cycle, connected, tree, etc
- Traversal
- How does one traverse a graph: DFS and BFS
- What is complexity of each?
- What is implementation?
- How does one find the shortest path between nodes?
- How does one determine of two nodes are connected? How does one identify all the connected components?
- How does one test if a graph is bipartite?
- Finding cycles.
- Directed vs undirected graphs.
- Directed Acyclic Graph (DAG)
- What is topological sorting? What is the algorithm?
Chapter 4: Greedy Algorithms
- What is a greedy algorithm?
- Applications:
- Fractional knapsack problem (as opposed to 0-1 Knapsack problem)
- Interval scheduling
- Dijkstra's shortest path algorithm
- Minimum spanning tree: Prim, Kruskal, Reverse-Delete, and the Union-find implementation.
- Huffman coding
- How do you prove that a greedy algorithm gives an optimal solution:
- Staying ahead: after each step of the greedy algorithm, its solution is at least as good as any other algorithm's.
- Exchange Argument: Gradually transform any solution to the one found by the greedy algorithm without hurting its quality.
Chapter 5: Divide and Conquer (partial)
- Methods for evaluating complexity of recursive algorithms:
[top] [Exam]
[Home]