NPTEL Theory of Computation Assignment 2 Answer