1

Of course, converting NFA to DFA is not a problem. But what about the other direction?

My motivation is the notion of minimization regular expressions using the DFA minimization algorithm.

Raphael
  • 72,336
  • 29
  • 179
  • 389
Jendas
  • 223
  • 2
  • 6
  • 3
    Are you sure you have the directions right? What you ask is trivial. A DFA is in particular an NFA. The converse, however, requires the determinization process called the "subset-construction". – Shaull Jun 11 '13 at 09:05
  • 2
    The answers to your question are in wikipedia. You should do a tiny bit of research before asking. The people who answer have only 24 hours each day. – babou Jun 11 '13 at 09:38
  • True, but that was not what I meant. DFA is also an NFA. But can be from DFA somehow restored the original regular expression? Or at least some good guess can be provided? – Jendas Jun 11 '13 at 09:58
  • Many regular expressions (or many FA) can define the same regular language and be transformed into each-other. So there is no knowing which you started from. What remains unique, if I may say, is the language defined. Now the minimal DFA is also unique (up to notations) for a given language, as it can be directly characterized from properties of the language - see Myhill-Nerode theorem. – babou Jun 11 '13 at 10:28
  • fyi the problem of finding the smallest NFA for a DFA is a nontrivial semi-open research question, theres another question here on that. – vzn Jun 11 '13 at 15:00
  • @vzn Can you please link it? – Raphael Jun 11 '13 at 17:00
  • 1

1 Answers1

1

You should have asked first what you wanted : your second line. Why assume that you have to reverse the determinization procedure to get back to a regular expression. You confused your readers. You might add it as a possible way you imagined to go about it, after you stated what you want, not before.

To find out how to get a RE from a FA, just search the web for : "convert finite automata to regular expressions". It is an interesting topic.

If you want a "minimal regular expression", just search for that. But I am not sure what minimal would mean (number of operators used ?).

If you want to find a "minimal NFA" search for that, but I gather it is a rather difficult problem, still under research.

If you want a "minimal DFA", search for that. It is a well explored problem.

babou
  • 19,445
  • 40
  • 76