languages are the same. – For M. 1., M. 2., L(M. 1.) = L(M. 2.) • DFAs and NFAs: – For every NFA there is an equivalent DFA. (we’ll prove this) and vice-versa. Problem Statement. Let X = (Qx, ∑, δx, q0, Fx) be an NDFA which accepts the language L(X). We have to design an equivalent DFA Y = (Qy, ∑, δy, q0, Fy) such. To show this we must prove every DFA can Consider the NFA that accepts binary strings ending with The key idea for building an equivalent DFA is to.
|Published (Last):||19 July 2007|
|PDF File Size:||1.56 Mb|
|ePub File Size:||4.82 Mb|
|Price:||Free* [*Free Regsitration Required]|
Equivalence of DFA and NDFA
For an in-depth study on this topic, I highly recommend that you read An Introduction to Formal Language and Automata. A different, simpler approach is to complement and intersect the automata.
To compare languages accepted by both we have to figure out if L A is equal to L B or not. Now, we have to find out an efficient way of proving or disproving X is empty set.
X will be empty when there is no path leading from starting state to any of the final state of X. We can prove that set of regular languages is closed under intersection and union.
They are both deterministic or both nondeterministic. You should flag your homework with [homework]. That makes it easier for us to provide appropriate help. You should provide your best answer so we can comment on it.
Please don’t ask us to do your homework for you. What do you learn then? Lott Aug 1 ’11 at What do you mean “equivalent”? You say they generate the same language.
Do you mean the graphs are isomorphic? Two nondeterministic finite automota NFA’s are equivalent if they accept the same language.
I wouldn’t call this efficient, but you’d still need to test graph isomorphism on the output of Stargazer’s answer. Patrick87 determining the sufficient n might not be easy, or is there some algorithm for computing it? And what do you mean by need to test the graph isomorphism? I think determining the equivalence of two minimal DFA’s should be easy, simply do a BFS through both in the same order.
As the corresponding edges should be labeled by the same characters, simply sort the outgoing edges from each state by those. I removed that paragraph from the answer, as it was not necessary, nor does it even answer the original question.
Explain with example equivalence between NFA and DFA
Here is the algorithm for checking if L A is contained in L B: First, determinize B using the subset construction. Then, make every accepting state rejecting and every rejecting state accepting.
You get an automaton that recognizes the complement of L B. Dfs an automaton that recognizes the language that is the intersection of the complement of L B and L A. To intersect two automata U and V you construct an automaton with the states U x V.
The accepting states are states u,v where u is accepting in U and v is accepting in V. After constructing the automaton in step 2, all that is needed is to check emptiness.
That’s the easiest part — find a path in equivalencee automaton from the initial state to an accepting state using the BFS algorithm. Guy 5, 23 58 I am just rephrasing answer by Guy. Sign up or log in Sign up using Google. Sign dfw using Facebook. Sign up using Email and Password.