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

automaton.conjugate

Create the conjugate of an automaton. The conjugate of A\mathcal{A} is defined as the automaton recognizing the language {vuu,vΣ and uv recognized by A}\{vu \mid u, v \in \Sigma^*\text{ and }uv\text{ recognized by }\mathcal{A}\}.

Preconditions:

  • labelset is nullable

Postconditions:

  • None

Examples

import vcsn
ctx = vcsn.context('lan_char, b') a = ctx.expression('ab*').automaton() a
Image in a Jupyter notebook
a.shortest(10)

aababbabbbabbbbabbbbbabbbbbbabbbbbbbabbbbbbbbabbbbbbbbb\mathit{a} \oplus \mathit{ab} \oplus \mathit{abb} \oplus \mathit{abbb} \oplus \mathit{abbbb} \oplus \mathit{abbbbb} \oplus \mathit{abbbbbb} \oplus \mathit{abbbbbbb} \oplus \mathit{abbbbbbbb} \oplus \mathit{abbbbbbbbb}

conj = a.conjugate() conj
Image in a Jupyter notebook
conj.shortest(10)

aabbaabbbabbbaabbbbabbbbabbbba\mathit{a} \oplus \mathit{ab} \oplus \mathit{ba} \oplus \mathit{abb} \oplus \mathit{bab} \oplus \mathit{bba} \oplus \mathit{abbb} \oplus \mathit{babb} \oplus \mathit{bbab} \oplus \mathit{bbba}