Theory of Computation: construct the dfa

Theory of Computation: construct the dfa