Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Unexpected result for is_equivalent in class automaton.

Using the class Automaton, we are finding unexpected results for the method is_equivalent(), which is supposed to test whether two finite automata recognize the same language.

Test:

J = Automaton ([('0','2','a'),('1','1','a'), ('2','1','b'),('3','4','a')], initial_states=['0'], final_states=['1'])
J.is_equivalent(J)

Expected Out : True

Actual Out : False

The documentation for the method can be found in the doc sagemath website at page "Finite state machines, automata, transducers" (no karma to post a link).

Is this a bug or am I misunderstanding the method? How do you suggest I test automata equivalence?