Implement minimize for DFA.