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

automaton.is_standard

Whether an automaton is standard, i.e.:

  • a single initial state

  • whose (initial) weight is 1

  • without incoming transitions

See also:

Examples

import vcsn ctx = vcsn.context('lal_char(abc), b') std = lambda e: ctx.expression(e).standard() a = std('a').add(std('b'), 'general') a
Image in a Jupyter notebook
assert(not a.is_standard()) assert(a.standard().is_standard())
%%automaton a context = "lal_char(abc), z" $ -> 0 <2> 0 -> 1 a 1 -> $
Image in a Jupyter notebook
assert(not a.is_standard()) assert(a.standard().is_standard())
%%automaton a context = "lal_char(abc), z" $ -> 0 <2> 0 -> $ <2> 0 -> 1 a 1 -> 0 b
Image in a Jupyter notebook
assert(not a.is_standard()) assert(a.standard().is_standard())