HW3 for Course "Theory of Computation"