- This will be in class, on Oct 10.
- Get a sample copy of a past midterm exam from NYU Classes, under resources.
- This is an open-book exam, but not open-computer or electronic devices (or calculators). Sorry, if you want the lecture notes, you must print a copy.
- In terms of topics, you are technically responsible for everything up to the lecture on Oct 8. That means the first 6 Lectures. But the first 3 Lectures will be emphasized, especially on topics in the lecture and in the homework.
- To ensure adequate coverage, we will have a section of short questions.
- Here are more remarks, based on your questions (click to expand):
- Does "double rotation" just mean "rotate^2(u)"?
- No, it is not the same thing. According to p.17 of Lect.III, it must be either zig-zag or zag-zig. But zig-zig or zag-zag do not count as 'double rotation'. Of course, all four cases comes under 'rotate^2(u)'.
- Bug in Non-Recursive DFS
- Line 9-10 should be changed to:
PREVISIT(v,u); If (v is unseen), then color v seen.
In short, you should ALWAYS do the PREVISIT.
This is clear, if you remember that PREVISIT amounts to processing the edge (u,v). Thanks to Huaisi for pointing this out.
- Homework 3, question 10 on height of AVL tree with 100 nodes
- This is a question about min-size AVL trees. :It is a typo NOT to have said this. My intent is clear from the model answer. But you should answer the question without making this assumption! That is, you should always read a question literally. We will grade you accordingly.
- In proofs, can I quote your theorems?
- YES, you can (probably SHOULD). Unless I specifically forbid it.
E.g., I might say, prove from first principles and do not quote the Master Theorem, etc.
Note that there is STILL some work to do, even if you quote theorems.
E.g., when quoting the Master Theorem, you still need to show that a particular case applies. That may require showing regularity, etc.
E.g., in estimating sums using our Rules for Polynomial-type or Exponential-type, you may need to justify why they are polynomial- or exponential-type.
- Hand Simulations
- Be sure you can do rotations and all the associated algorithms on actual trees.
For AVL Trees, be familiar with the insert/delete as well as the Merge/Split algorithms (Split is described in solution of hw3)
Since we disallow calculators, you are expected to do hand calculators (review your rules for logarithms and exponentiations).
This will be on Dec 19, in usual classroom 312, from 3:30-7:30 pm.