Given a regular expression, generate the corresponding NFA, DFA and minimized DFA.