Re: NFA to DFA question

Clint Olsen <>
17 Jan 2003 19:40:42 -0500

          From comp.compilers

Related articles
NFA to DFA question (Unmesh joshi) (2003-01-12)
Re: NFA to DFA question (Clint Olsen) (2003-01-17)
Re: NFA to DFA question (2003-01-17)
Re: NFA to DFA question (Michael N. Christoff) (2003-01-17)
Re: NFA to DFA question (2003-01-21)
Re: NFA to DFA question (Joachim Durchholz) (2003-01-25)
Re: NFA to DFA question (Ralph Becket) (2003-01-30)
| List of all articles for this month |

From: Clint Olsen <>
Newsgroups: comp.compilers
Date: 17 Jan 2003 19:40:42 -0500
Organization: AT&T Broadband
References: 03-01-051
Keywords: lex, DFA
Posted-Date: 17 Jan 2003 19:40:42 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? Does anybody has a
> source code sample for NFA-DFA? May be if I implement the DFA algorithm I
> will understand what that means.

Since an NFA can have multiple state transitions per character of input,
and a DFA cannot, it follows that a state in the DFA corresponds to a set
of NFA states (possibly multiple states). The best analogy is given at the
end of that paragraph you quoted where they discuss simultating an NFA and
DFA for the same input string.

The source code from 'flex' should give you an implementation of converting
an NFA to a DFA.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.