patternMinor
Complement of Non deterministic Finite Automata
Viewed 0 times
finitenonautomatadeterministiccomplement
Problem
It's known that the complement of a DFA can be easily formed. That is, given a machine $M$, we can construct $M'$ such that $L(M') = \Sigma^* \setminus L(M)$.
Is it possible to construct such a complement for a non-deterministic finite automation (NFA)? To my knowledge, it isn't.
Is it possible to construct such a complement for a non-deterministic finite automation (NFA)? To my knowledge, it isn't.
Solution
I'm going to assume that you know that there is an equivalence between DFAs and NFAs in the following sense: For every NFA $M$ there exists a DFA $M'$ such that $L(M') = L(M)$. I'm also going to assume that you know how to, given $M$, calculate $M'$. These are standard methods and they (and their proofs) can be found in any good textbook on automata such as: Hopcroft and Ullman
Given these facts the result is almost immediate: Given an NFA $N$ all you have to do is calculate the corresponding DFA $N'$ and use the complement algorithm which you've mentioned you already know. The resulting DFA is an NFA (since DFAs are just special cases of NFAs) which accepts the complement of the language accepted by the NFA you started with.
So to answer your question, yes it is possible to construct such an NFA, however, if you want to do it quickly you may have some problems
Given these facts the result is almost immediate: Given an NFA $N$ all you have to do is calculate the corresponding DFA $N'$ and use the complement algorithm which you've mentioned you already know. The resulting DFA is an NFA (since DFAs are just special cases of NFAs) which accepts the complement of the language accepted by the NFA you started with.
So to answer your question, yes it is possible to construct such an NFA, however, if you want to do it quickly you may have some problems
Context
StackExchange Computer Science Q#13282, answer score: 8
Revisions (0)
No revisions yet.