automaton
.is_isomorphic
(aut
)¶Whether this automaton isomorphic to aut
, i.e., whether they are "the same graph."
Preconditions:
See also:
import vcsn
Automata are isomorphic if there is a bijection between their states.
b = vcsn.context('lal_char, b')
a1 = b.ratexp('a*+b*').standard(); a1
a2 = b.ratexp('b*+a*').standard(); a2
a1.is_isomorphic(a2)
Equivalent automata can be non isomorphic.
a1 = b.ratexp('a+a').standard()
a2 = b.ratexp('a').standard()
a1.is_isomorphic(a2)
z = vcsn.context('lal_char, z')
a1 = z.ratexp('<2>a+<3>b').standard()
a2 = z.ratexp('<3>b+<2>a').standard()
a1.is_isomorphic(a2)
a1 = z.ratexp('<2>a').standard()
a2 = z.ratexp('a+a') .standard()
a1.is_isomorphic(a2)