Lecture Notes for CS246 W2014