Theory of Computation, hw3