CS4102, Algorithms
Info About Final Exam, Spring 2010
Thursday, May 6. 2-4pm. Usual classroom.
- The final exam is worth 22% of your overall grade.
- The exam will cover material since Exam 2 and also have a
comprehensive section of questions on topics from Exams 1 and 2.
- The questions on new material will be worth 50% of the Exam 3
score.
- The comprehensive section (worth 50% of Exam 3) will not focus on
low-level detail (say, exactly how a partition algorithm works) but on
higher-level important topics (example: what partition leads to
quicksort's worst case.). But they might include questions on
order-classes for algorithms' complexity. (So the paritition algorithms
we saw are Theta(n).)
- The time allowed for the exam will be 2 hours.
- If you need to take the exam at an alternative time, please email
me by Tuesday 2pm, May 4, and explain.
- If you are an LNEC student needing extra time, contact me and let
me know if you want to do it all in one go on the exam day, or if you
need to split it into two parts.
- Note: the previous info here about
additional questions wasn't right.
Topics list for "new" material since Exam 2.
Dynamic Programming:
- General principles of dynamic programming
- Optimal substructure property
- Memoization
- Fibonacci numbers
- LCS
- You might be asked to complete the table for given inputs
- You won't be asked to reproduce the code. But know the
complexity.
- 0/1 Knapsack -- see handout
- Why greedy doesn't work
- Understand how cells in the table get updated
P, NP and NP-C:
- Text: Read Chap 10 but use the slides to guide your
understanding. Material or sections that are in the book but not in the
slides won't be on the exam. Email me if you have questions. Topics
listed below.
- Decsion problems vs. optimal values vs. optimal solutions
- Definitions of class P, NP, NP-hard, and NP-c
- NP-c problems: SAT, CNF-SAT, 3-CNF-SAT, k-COL, VertexCover,
k-Clique, SubsetSum, 0/1-Knapsack, HamPath, HamCycle, TSP
- Definition of an non-deterministic algorithm and definition of
class NP
- How to prove that a problem is in NP
- Size of input
- What is a polynomial reduction? What's it mean if problem A
reduces to problem B?
- The Cook-LevinTheorem: what it is, what it means, why it's
significant
- The relationship between P, NP and NP-complete
- The big question: does P = NP?
- Reductions: You won't be asked to come up with a "new" reduction
on your own. You need to know what a reduction is, and how it's
described. You might be asked questions about these example reductions:
- 3-Col to CNF-SAT (handout)
- Directed ham. cycle reduces to undirected ham. cycle (same
handout as above and slides)
- Hamiltonian cycle to the TSP (slides)
- 3-CNF to k-Clique (slides)
- SubsetSub to 0/1 knapsack (HW6)
- Coping with complexity. What's an approximation algorithm? If you
don't remember, go back and think about the greedy approaches to TSP
problem on Exam 2, and the greedy question on HW4 on graph coloring and
vertex cover -- see posted solutions
Personalities:
- There will be two straightforward questions (worth 4% total) on
the famous figures from algorithms "Wall of Fame" on the class Web
page. Be sure to memorize their names.
Previous Material (High-level list of topics):
Exam 1: (Click here for
previous review-guide for Exam 1.)
- Basics
- Order classes, worst-case, average-case, lower-bounds, optimal
algorithms, etc.
- Divide and conquer
- recurrence relations (No Main or Master theorem!)
- Examples: mergesort, quicksort, trominos, max and min, etc.
- Sorting
- insertion sort, quicksort, mergesort
- lower bound for sorting using key-comparisons
- linear sorting
Exam 2: (Click here for
previous review-guide for Exam 2.)
- Priority Queues, Heaps, and Heapsort
- Searching in Graphs, BFS, DFS, Topological Sort, Backtrack Search
- Greedy Algorithms