homework 3 for Theory Of Computation