# Can NFAs determinization be efficient given that the statespace is exponential?

I have recently learned about using powerset construction for conversion of NFA to DFA - however this only seems to be feasible when the number of states we are working with are 3 or less, as $2^k$ seems to grow unmanageable very quickly.

I have a problem with 6 states, meaning that if I were to use powerset construction, I would have 64 states. What is a more efficient way?

• Please ask only one question per question. Sep 29, 2016 at 13:46
• Editing out question 2). You may ask it separately, but note that we don't do homework solving. What have you tried and where did you get stuck?
– Raphael
Sep 29, 2016 at 19:29

Let me mention a variant of the powerset construction. In this variant, we are going to construct only states reachable from the initial state. The way it works is as follows:

1. Create a list of states to-be-processed, and populate it initially with $\{q_0\}$, where $q_0$ is the initial state of the NFA.

2. While the to-be-processed list is non-empty, remove a state $S$, and compute all states reachable from $S$ by reading one character. Put any of these which hasn't been encountered yet in the to-be-processed list.

This variant (which I haven't quite specified in full) constructs the powerset automaton restricted to states reachable from the (new) initial state, and runs in time proportional to the resulting number of states (and the alphabet size).

The same construction, and indeed the vanilla powerset construction, also works for NFAs with several initial states. The only difference is that we start with the set $Q_0$ of initial states (which is also going to be the initial state of the resulting DFA) rather than with $\{q_0\}$.

In addition to the strategies pointed out in other answers , You can also adopt the method of directly constructing a DFA by determining the number of equivalence classes for your problem which is equal to the number of states in your minimized automaton. However this approach is suitable for problems having few partitions for the strings but produces the results quicker relative to other methods.