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

automaton.subword

An automaton that accepts all the suffixes of the subwords accepted by the previous automaton. This is the "Magnus transform".

Algorithm: Every proper transition yields a spontaneous transition with equal source, destination and weight.

Preconditions:

  • None

Postconditions:

  • the labelset is nullable (even if the input one was not).

See also:

Examples

import vcsn
%%automaton -s a context = "lan_char, q" $ -> 0 <2> 0 -> 1 <3>a 1 -> 1 <4>b 1 -> 2 <5>\e 2 -> 3 <6>c 3 -> 4 <7>d 3 -> 5 <8>e 4 -> $ <9> 6 -> 0 <10>A
Image in a Jupyter notebook
a.subword()
Image in a Jupyter notebook