Theory of Computation hw4