“Theorem 6: For any finite automaton (in particular, for a McCulloch-Pitts nerve net) started at a given time with internal state at that time, the event represented by a given state existing at time is regular”
—Stephen Cole Kleene
One of the most beautiful results in all of computability theory is the result commonly known as Kleene’s Theorem, though its modern formulation includes contributions by Scott and Rabin:
The following are equivalent:
We prove the equivalence of all three by showing that 1 and 2 are equivalent (that 1→2 and 2→1), and then showing that they both imply and are implied by 3 (specifically, that 3→2 and 1→3).
Since an NFA can do anything that a DFA can do and more, it is easy to see that if there is a DFA accepting the language , then there is a nearly identical NFA accepting the language . It’s just a boring NFA that doesn’t use any nondeterminism or -transitions.
The more interesting result is showing that every NFA can be “simulated” by a DFA, so DFAs are as powerful as NFAs. The proof is constructive, in that it explains exactly how to convert an NFA into a DFA. This conversion process is called the Subset Construction.
The formal definition of the subset construction is rather technical, but the intuition is straightforward. If we feed a string into an NFA there might be many possible routes through the NFA spelling out and hence we may not be able to predict which route will be taken or while state the NFA will end up in. However, there is a well-defined and deterministic set of states that the NFA could end up in. That is, the set of possible behaviors of the NFA is completely deterministic, and that can be simulated by a DFA.
Consider the following NFA:

We can observe the following properties:
b transition, then afterwards the NFA could choose to be
in state A, B, or D.a
transition, then afterwards it could be in state C or D.We can summarize all this information with the following DFA:

So for example, given a string like abba, we can run this through the
DFA, and immediately conclude that the NFA given baab could go
to state C and could go to state D; further, since going to the
accepting state C is a possibility, the NFA would accept baab.
On the other hand, the DFA tells us that aa can only send the NFA to
state D (which is not an accepting state), and so the NFA cannot accept
aa. Similarly, DFA tells us there is no state the NFA could end up in
after the input ab, i.e., the NFA cannot accept ab because there is
no path through the NFA corresponding to the input ab.
Just for completeness, we give the formal definition of the subset construction.
Given an NFA , the _ subset construction_ gives us a DFA with , defined as follows:
where the of a set is all states reachable by 0 or more transitions from state in the set.
If is regular, it can be described using a regular expression . We can convert into an NFA that accepts the same language by induction/reduction on the structure of , as shown here:

There are a couple of ways to convert a DFA into a regular expression; the ideas are clever, but doing the conversion (by hand) is admittedly tedious. Here’s we’ll show an “equation solving” approach.
Given a state machine, the language of its state is denoted , and is defined to be the strings that the machine would accept if we started from state (rather than automatically starting from the start state, as we normally would).
It follows from this definition, the language of a DFA is the same as the language of its start state.
The language of our states are officially sets of strings, but we can find a regular expressions for each set by solving a set of simulatenous equations.

What strings are accepted starting at state A? Any string accepted from
state A either starts with a and then the rest of the string is
accepted starting from state X, or it starts with b or c and
then the rest of the string is accepted starting from state Z. That
gives us the equation
What strings are accepted starting at state X? Any string accepted
starting at X either is the empty string (since X is an accepting
state!), or starts with a and then the rest of the string is accepted
starting from state Z, or starts with b and the rest of the
string is accepted starting from state X, or starts with c and then
the rest of the string is accepted starting from state B. That gives us
the equation
What strings are accepted starting at state B? Again we can read off
that any string accepted from state B starts with an a, b, or
c and then continues with a string accepted starting from state Z.
(On the other hand, B is not an accepting state, so its language does
not include . This yields the equation:
Finally, we can read off the equation
We can solve these equations using standard substitution techniques, plus the following lemma:
The (smallest) solution to a recursive equation
is

This automaton gave us the equations:
First, (4) can be solved via Arden’s Rule to conclude
Substituting that into (3) yields
Substituting both of these into (2) gives us
and rearranging and applying Arden’s Rule produces
Finally, we can substitute all these into (1) to find:
Since the language of the start state is the language of the DFA, we have found the language accepted by the DFA (as a regular expression).