A succinct description of NFA to DFA conversion?

When you construct a DFA from an NFA you basically find those sets of states that the NFA can be in a time (like simulating the NFA). First you begin with the start state and then find all states that can be reached through epsilon transitions. This set of states form the start state of the resulting DFA. Then you follow the outgoing transitions from this state set. Those may lead to another NFA state, for that you find the states reachable through epsilon inputs again, and you will get another set of NFA states that will be a new DFA state. You do this process until you have finished.

The point is, that the resulting DFA states will become sets of the old NFA states, that are compatible (regarding to epsilon transitions). These sets may also overlap, that is no error. And now I can answer your questions:

1) The first column represents the new DFA states. It shows the NFA state sets that form the given DFA state.

2) Your assumption is correct, it means loopback to state {2,3} on 0 input.

3) The DFA table can be easily constructed from this table, just name your states with letters. Any DFA states that contain at least one NFA accept state will become accept states in the DFA, too.

I hope I was clear enough.


The core idea Is probably to understand that the DFA is a sort of machine that is superimposed over the NFA. While the NFA is simpler in terms of the number of nodes, or its relationship with the problem, it's rules are quite subtle and compled (it goes into the right state, whichever that might be). The dfa is much more complex in terms of the nodes it contains, but has really simple rules, since there is exactly one output state for any given input.

The transformation is pretty straitforward. each state in the DFA is a subset of the states in the NFA. The start state of the DFA is the set containing only the start state of the NFA, and the accept state for the DFA is all of its states which have the accept state of the NFA as elements.

The transitions in the DFA are the only tricky party. an NFA is non-deterministic because its output states for a given input is a set of states, but the DFA has sets of the corresponding NFA states as its own states, representing which of the NFA states the automaton could be in. So the output state of any DFA state for any given input is the union of output states of all of the NFA states of that DFA state.

In terms of actual implementations, the DFA has a state population that is essentially the powerset of the NFA's states. IE, 2^(n) for n NFA states. In practice it's usually much smaller, but there's no general way to predict it's size, so some practical NFA to DFA implementations generate the DFA states dynamically as they are reached and cache them. Once a certain number of states are created, the least recently used is discarded, limiting the size of the cache.