Lecture 2
We talked about the Divide-and-Conquer paradigm, drawing a general picture.
We discussed "problems" verses "instances."
We reviewed the Mergesort algorithm (sorting cards and then
writing the algorithm out in pseudocode) and then we wrote a recurrence
relation for it, being careful to include the floors and ceilings:
S(n)=S(floor(n/2))+S(ceiling(n/2))+n-1.
We tablulated the first several values for this. Then we solved
this recurrence relation. We proved an exact bound (not an asymptotic
one): S(n)<=2n lg 2n.
We reviewed big-O and Theta notaion.