Discrete Math — The Basics of Lexical Analysis: From NFA to DFA

Helene
Artificial Intelligence in Plain English
6 min readApr 2, 2021

--

In the former two articles, we have been introduced to both Regular Expressions and Finite Automata’s. In this article, we will try to understand how we can convert an NFA to a DFA. This will be used in the next article, where will see how we can express Regular Expressions through a DFA — but we will need to know how to convert from an NFA to a DFA. So, let us start.

The Idea Behind

It is possible to say that every DFA is an NFA, but not every NFA is a DFA. However, every NFA has a DFA…

--

--