Research on minimal state NFA and DFA and the relation between them