|NFA to DFA question email@example.com (Unmesh joshi) (2003-01-12)|
|Re: NFA to DFA question firstname.lastname@example.org (Clint Olsen) (2003-01-17)|
|Re: NFA to DFA question email@example.com (2003-01-17)|
|Re: NFA to DFA question firstname.lastname@example.org (Michael N. Christoff) (2003-01-17)|
|Re: NFA to DFA question email@example.com (2003-01-21)|
|Re: NFA to DFA question firstname.lastname@example.org (Joachim Durchholz) (2003-01-25)|
|Re: NFA to DFA question email@example.com (Ralph Becket) (2003-01-30)|
|From:||Ralph Becket <firstname.lastname@example.org>|
|Date:||30 Jan 2003 00:04:05 -0500|
|Organization:||http://www.TeraNews.com - FREE NNTP Access|
|Posted-Date:||30 Jan 2003 00:04:05 EST|
Unmesh joshi wrote:
> I am reading the compilers book by Aho ullman, and I have one doubt about
> NFA to DFA conversion.
> "Every state of DFA corresponds to 'set of states' in NFA". Can anybody
> explain to me this?
I like to think of a state machine as a box of lights. In a DFA, only
one light, the one representing the current state, is on at any given
time. Which light comes on after the next symbol is read depends upon
the symbol itself and which light is currently on.
In an NFA, several lights may be on simultaneously, one for each state
that is reachable from the starting state given the symbols input so
far. Whether a particular light comes on after the next symbol is
read depends upon whether that state is reachable from one of the
currently lit states via that symbol.
Now, one can write down all the possible combinations of lights being
on or off in an NFA box and assign each combination a number. One can
then say for each combination and for each possible symbol what the
next combination must be. But this is exactly what a DFA is. Hence
each possible set of states (combination of lights) in an NFA is
represented by a single state in the corresponding DFA.
Hope this helps,
Return to the
Search the comp.compilers archives again.