As you know, the final will be Wednesday, Dec. 17 from 4:00 to 6:00 pm
in ELAB 303. Class on Thursday, Dec. 11 will be a summary and wrap up
of the semester's material. At the discussion section Thursday
afternoon, Creidieki and I will hand out the model solutions to
homework 11 and do a general review session.
The final is closed book and closed notes, with no
calculators, computers, cell phones, etc. allowed. This is because
I want you to understand the material beforehand.
I try hard to make my exams like my problem sets only much easier
because they are closed book and there is a rather short limit on time.
The final will be a cummulative look at the whole course, but with
some emphasis on the material that we've done since the last test, i.e.,
linear programming and NP completeness.
Even though you will have two hours, the final will be about the same
length as the second test.
To study for the final, I urge you to do the following:
- Go over the homeworks 1 through 11, and their model solutions, making sure that you now
understand all of these! I will hand out model solutions to
homework 11 at the discussion section on Thursday, Dec. 11, and no
late homework will be accepted after that.
- Go over your notes from all the lectures and the
corresponding readings. I will not cover new material the last week
of classes, but instead concentrate on review and consolidation.
In
particular, we studied a bunch of topics and algorithms that I expect you to be
comfortable and familiar with. Below is a list of the topics and algorithms that I
have in mind.
- Next Tuesday evening, relax and get a good night's sleep.
Main Topics Covered
- Asymptotic analysis: mostly big-oh, but also big-omega and
big-theta.
- Number Theoretic Algorithms, and a little bit of number theory
concerning modular arithmetic and Fermat's Little Theorem.
- Divide and Conquer Algorithms: how this works; how to come up with the relevant
recurrence equation; how to solve the recurrence equation using the
master theorem. (As I did on the first test, I will put a
statement of the master theorem on the top of the last page of the
final just in case you need it.)
- Sorting algorithms and the Omega(nlog n) lower bound for comparison sorts.
- Graphs and their data structures and algorithms.
- Union/Find
- Greedy Algorithms.
- Dynamic Programming.
- Linear Programming: how to model a problem via linear
programming; the dual of a linear program.
- Network Flow, and Bipartite Matching.
- P and NP, NP Complete problems, what it means for a problem to be NP complete,
and how to prove that it is.
- How to handle optimization
problems whose decision problems are NP complete, e.g., SAT, TSP, Knapsack.
Main Algorithms Studied
- Number theoretic algorithms: Euclid's algorithm, Modular
exponentiation, Fast Primality testing using Fermat's Little
Theorem, and RSA.
- Merge sort, Bucket Sort, and Radix Sort.
- Strassen's Fast Matrix Multiplication Algorithm and Fast Extended
Precision Integer Multiplication
- Sorting algorithms and the Omega(nlog n) lower bound for comparison sorts.
- We didn't cover universal hashing, but I will assume that your general
knowledge about dictionaries from 187 includes the following two facts:
- There are good classes of hash functions that allow
constant-time maps of about n items from a large key space to O(n) buckets so
that with high probability the expected length of each bucket is
bounded by a constant, although the worst case length is n. This
allows us to have a dictionary that has average case time O(1) per
operation, but worst case time O(n) per operation.
- We can also build balanced tree dictionaries with O(log n) worst
case time per operation.
- Breadth First Search and its applications.
- Depth First Search and its many applications.
- Dijkstra's Algorithm: note we gave O(n2) and O((n+m)log n) implementations.
- Prim's MST Algorithm: note we gave O(n2) and O((n+m)log n) implementations.
- Kruskal's MST Algorithm and the Union-Find data structure.
- Huffman Greedy Coding Algorithm.
- Dynamic Programming Algorithms including:
- Longest Increasing Subsequence
- Edit Distance
- Knapsack
- Warshall (transitive closure) and Floyd (all pairs min weight
path) Algorithms.
- Ford Fulkerson Network Flow algorithm and its applications.
- Simplex algorithm: we didn't go into full detail but I expect you
to understand the general idea of what it does and why it works.
- Backtracking
- Branch and Bound
Reminder: when I ask you on the test to come up with an algorithm, I
will want you to use things we have learned to build an algorithm to
solve the problem. If it makes sense to use a data structure and/or
algorithm that we have studied, then you can just quote it by name and
state its running time -- you do not have to write its pseudo-code.
The most important thing is that you do the following:
- Clearly describe a correct algorithm;
- Explain why your algorithm is correct;
- Analyze your algorithm, i.e., compute its asymptotic running time
Even if you can't get the absolute fastest possible algorithm, I will
be generous with partial credit if you successfully complete the above
steps.