Is there any polynomial procedure to decide if 2 deterministic finite automatas decide the same language?
Asked
Active
Viewed 1,055 times
-1
-
1Yes, of course. This is covered in standard textbooks on automata theory. What research have you done? We expect you to do a significant amount of research before asking here, and to show us in the question what you've done (e.g., what textbooks you have consulted). You might also want to tell us what you know about automata theory (do you know the product construction? how to test whether a DFA generates the empty language?). – D.W. Jul 02 '14 at 22:32
-
1See, e.g., http://cs.stackexchange.com/q/9130/755 (two subset tests are enough to test equivalence), or http://cs.stackexchange.com/q/20042/755 plus http://cs.stackexchange.com/q/18616/755 (computing the difference plus testing for emptyness is sufficient). See also http://cs.stackexchange.com/q/21897/755 and http://cs.stackexchange.com/q/5010/755 for more related questions. – D.W. Jul 02 '14 at 22:37
-
1Hints: (1) Regular languages are closed under union, intersection, and complement, so are closed under symmetric difference. (2) Two sets are equal iff their symmetric difference is empty. (3) You can effectively determine whether the language of a finite automaton is empty. Now just fill in the details using the earlier comments' suggestions. – Rick Decker Jul 03 '14 at 01:02
-
I agree that is duplicated question, because the other is equivalent, but how could I see that? I was looking for "the same" language... I cannot serach for all possible equivalent way of writing the question... Anyway sorry! – Jody Jul 03 '14 at 07:23
2 Answers
1
By Myhill-Nerode, the minimal DFA for a regular language is unique. You can minimize both and check that they are equal.

mrk
- 3,688
- 22
- 35
1
Let $D_1,D_2$ be the automata in question, and let $L_1,L_2$ be the corresponding languages. Using standard construction one can construct an automaton $D$ for $L_1 \triangle L_2$ (the symmetric difference of $L_1$ and $L_2$), and then one checks whether this automaton accepts any words.

Yuval Filmus
- 276,994
- 27
- 311
- 503
-
Ok, thank you, but anyway should I check all the possible words one by one? Because in this way I am not sure it will be polynomial.. – Jody Jul 03 '14 at 07:20
-
@Jody No, there is a different way of determining whether a DFA (or even an NFA) accepts any words. – Yuval Filmus Jul 03 '14 at 15:27