Solved and documented MIT OCW 6.0 Problem Set 1, Problem 1