Exercises from Tom Stuart's book Understanding Computation