For a given regular language, there are multiple finite automata. How do we determine which one is best?
1 Answers
That's a very deep question, since you need to define what "best" means.
Let's assume, for starters, that by "best" you mean "with a minimal number of states". If you consider deterministic automata, then it is well-known that there is a unique minimal size DFA, and finding this automaton, given any DFA for the langauge, takes polynomial time.
If you consider nondeterministic automata, then there is no canonical minimal size NFA. That is, there may be two minimal size NFAs that are topologically inequivalent. The problem of determining the minimal size of an NFA for a language is PSPACE-complete (very easy reduction from NFA universality).
The above is just to get you "on track". There are many interesting algorithms regarding DFA/NFA minimization, and there are interesting complexity questions in this field.
However, there are other measures that can be used to define "best". It just so happens that I have a work on the subject, in which we define the quality of a regular language to be the expected number of "sensors" that are needed to recognize it. You can read about it here.
- 17,814
- 1
- 41
- 67