refactoring of minimization algorithm
refactoring of hopcroft minimization