NPTEL Theory of Computation Assignment 8 Answer