Theory of Computation HW4