Produce an automaton that accepts the complement of the language of the input automaton.
Precondition:
Postcondition:
See also:
In [1]:
import vcsn
b = vcsn.context('lal_char(abc), b')
In [2]:
a = b.expression('a+b').standard().determinize().complete()
a
Out[2]:
The prefix operator ~
invokes complement()
.
In [3]:
~a
Out[3]:
In [4]:
c = a.complement()
c
Out[4]:
In [5]:
a.shortest(2)
Out[5]:
In [6]:
c.shortest(10)
Out[6]: