Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download
Views: 45895
Kernel: Python 3

automaton.is_empty

Whether the automaton is empty, i.e., it has no states.

See also:

Examples

import vcsn
%%automaton a daut context = "lal_char, b" 0
Image in a Jupyter notebook

This automaton is useless (it accepts the empty language), yet it is not empty.

a.is_empty()
False

If we trim it, then it is empty (which is why it seems that there is no result):

a.trim()
Image in a Jupyter notebook
a.trim().is_empty()
True