COP 4531: Lecture 6
Learning objectives
After this class, you should be able to:
- Prove the Master Theorem for recurrences, when
n = bi
.- Given a recurrence, either solve it using the Master theorem, or show why the Master theorem does not apply to it.
Reading assignment
- CLR: Sections 4.3 and 4.4 (until, and including, sec 4.4.1).
- Review amortized time complexity analysis of vector inserts from COP 4530.
Exercises and review questions
- Questions on current lecture's material
- Exercise 4.3-1.
- Exercise 4.3-4.
- Questions on next lecture's material
- Give the amortized time required for
n
push_back
operations on a vector, assuming that the size of the vector is increased by a factor of3
each time it needs to be resized. Assume that the starting size of the vector is1
, and that increasing the size of a vector fromm
top
takes timep
.