Problem: Consider language L equal to the set of strings on the alphabet {a, b} such that the final symbol in the string has not appeared earlier in the string. Some strings in L include e, a, ab, aab, b, ba, and bba(there are infinitely many others of course).
(a) Draw a DFA that recognizes language L. (You may wish to draw an NFA recognizing L and then convert this to an equivalent DFA, but this approach is not required.)
(b) Write a regular expression that generates L.Make the regular expression as simple as possible.