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

automaton.is_accessible

Whether all its states are accessible, i.e., all its states can be reached from an initial state.

Preconditions:

  • None

See also:

Examples

import vcsn

The following automaton has states that cannot be reached from the initial(s) states:

%%automaton a context = "lal_char(abc), b" $ -> 0 0 -> 1 a 1 -> $ 2 -> 0 a 1 -> 3 a
Image in a Jupyter notebook
a.is_accessible()
False

Calling accessible returns a copy of the automaton without non-accessible states:

a.accessible()
Image in a Jupyter notebook
a.accessible().is_accessible()
True