Typeset exercise for hw4.