An NFA can always be simulated by a DFA, with potentially many more but still a finite number of states.

<aside> 💡 We can use the idea that an NFA’s state information can be captured precisely by subsets of its set of states to build our DFA.

</aside>

This is known as subset construction.

Example

So we write out a new node in our DFA, each corresponding to the set of states that we could end up in in our NFA at any given time. It is then rather trivial to draw our transitions between these states.

Screenshot 2023-01-25 at 12.25.45.png

The empty set corresponds to when the NFA ‘breaks’, ie. when there is no transition from the state we are in for the given letter. We make this state a dead state (all letters transition back into it).

<aside> âž– Since the states labelled $\{q_0\}$ and $\emptyset$ are unreachable from the other states, from where we start, we can simply remove them from our DFA.

</aside>

Formalised 👔

A general description can be given for deriving a DFA from a given NFA.

Let $N = (Q, \sum, q_0, F, \delta)$ be the NFA

and $M=(Q_1, \sum, q_1, F_1, \delta_1)$ the DFA.

Screenshot 2023-01-27 at 15.48.55.png