
28 Dec
2010
28 Dec
'10
6:09 a.m.
Maxime Henrion wrote:
I've been playing with some code to work with DFAs, but I'm now faced with an implementation problem. In order to have states that can transition to themselves, it seems I would need self-referential data; otherwise I would need to separate those transitions from the rest and handle them specially in the code.
Perhaps an old article http://okmij.org/ftp/misc.html#ccard-transform might be of some help. The article describes not only running a finite automaton (represented as a cyclic graph) on given input but also printing the automaton out and determinizing it: converting NFA to an equivalent DFA. The latter operation converts one cyclic graph to another.