merging equivalent states on the raw DFA