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

automaton.costandard

Turns an automaton into a costandard automaton. This is equivalent to calling _aut_.transpose().standard().transpose().

Preconditions:

  • None

Postconditions:

  • result.is_costandard()

See also:

Examples

There is a single final state.

import vcsn ctx = vcsn.context('lal_char(abc), z') std = lambda e: ctx.expression(e).standard() a = std('a').add(std('b'), 'general') a
Image in a Jupyter notebook
a = a.costandard() a
Image in a Jupyter notebook

The final state has 1 as (final) weight.

a = a.costandard() * 2 a
Image in a Jupyter notebook
a.costandard()
Image in a Jupyter notebook

There is no outgoing transition from the final state.

%%automaton -s a context = "lal_char(abc), z" $ -> 0 <2> 0 -> $ <2> 0 -> 1 a 1 -> 0 b
Image in a Jupyter notebook
a.costandard()
Image in a Jupyter notebook