subset construction
The subset construction is a technique of turning a non-deterministic automaton into a deterministic one, while keeping the accepting language
the same. This technique shows that an NDFA is no more powerful in terms of word acceptance than a DFA.
We begin by looking at a semiautomaton . The transition function is a function from to , which maps a pair to a subset of . Observe that can be extended to a function from to by setting
(1) |
for any subset of and . Note that . What we have just done is turning a semiautomaton into a deterministic semiautomaton , where , the powerset of .
It is easy to see, by induction on the length of , that .
Next, given an NDFA , we turn it into a DFA as follows:
- •
is derived from by the construction above,
- •
, and
- •
.
Since is an element of , and , is a well-defined DFA.
Proposition 1.
.
Proof.
iff (where ) iff iff .∎
What happens if the NDFA in question contains -transitions (http://planetmath.org/EpsilonTransition)? Suppose is an -transition, and . Then , which is not allowed in a DFA.
To get around this difficulty, we make a small modification on . First, define, for any , the -closure of as the set
(2) |
For any , . If the automaton does not contain any -transitions, then .
Now, let NDFA be an -automaton (http://planetmath.org/EpsilonAutomaton), define as follows:
- •
,
- •
, where is defined in (1) above,
- •
, and
- •
.
By definition, is a DFA, and it can be shown that . The proof is very similar to the one given here (http://planetmath.org/EveryEpsilonAutomatonIsEquivalentToAnAutomaton).