detailed notes from lecture 4 by mat stanley 2110386