Theorem - All NFAs have an equivalent DFA

Statement

Every Nondeterministic Finite Automaton has an equivalent Deterministic Finite Automaton.

Proof

To show every NFA has an equivalent DFA, it would be sufficient to prove the existence of a general algorithm to covert any NFA to an equivalent DFA.

We begin by reviewing each component of the definition of a DFA to see what needs to be “adjusted.”

Step 1: States

The first thing to consider is the finite set of states . In an NFA, the computation can be in a combination of states at the same time. In a DFA it can only be in one state at any time. IDEA: let sets of states in an NFA each be a single state in the corresponding DFA.

Example: suppose an NFA transitions to states and . In our corresponding DFA we can define an “amalgamated” or “unified” state. How many such states do we need? If our NFA has states, our DFA has .

This is the complete set of states that our DFA could possibly use. Of course as we fill in the transition table we may find some (or even most) states go unused.

Step 2: Alphabet

The alphabet stays the same:

Step 3: Starting State

Let be the starting state of our NFA. The starting state of the corresponding DFA is , i.e., combination of and any other states reachable from by an -transition.

Step 4: Final States

Let be the set of final states of our NFA. Recall the NFA accepts if any of the computational paths accepts. Taking this over to the DFA means designating any of the “amalgamated” states as accept if they contain some . Example: if then

Human: essentially, if any “amalgamated” state contains any previously accepted state, then this new state is also accepted.

Step 5: Transition Function

Filling in the transition function proceeds in two parts.

Part 1 we write a table with single states for rows and letters for columns. We use the NFA’s transition function to fill in this table converting sets of states to “amalgamated” states. But we still have to account for -transitions (Epsilon Transitions). The way we do this is as follows: if we transition from a state to a state , and contains an -transitions to state , then in effect transitions to . This continues recursively until there are no new -transitions to follow.

Step 2 Now that we have the transitions for the single states written, we add new rows to the table corresponding to the amalgamated states i.e., (, etc.). We fill in these cells by taking the union of the cells of the corresponding single states. E.g. to fill in the cell we take .

Example

States and Alphabet

  1. States.
    will end up being some subset of the powerset of , i.e.,

  2. Alphabet.

  3. Start state.
    The NFA’s start state is , but there’s an -transition to .
    The DFA’s start state, therefore, is the amalgamated state .

  4. Final states.


Transition function (single states)

In part 1 of the conversion we start out by writing out the transitions for the single states, taking into account the -transitions:


Transition function (amalgamated states)

Now we fill in the rest of the amalgamated states by taking the unions of the single states:


Minimization

We’re using more states than we need. We can eliminate any state where there is no combination that leads us to them, and is not a starting state.

In the example above, the states and fit this definition. So we can eliminate them.


Result