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

automaton.ambiguous_word

Return an ambiguous word, or raise if the automaton is unambiguous.

Preconditions:

  • the labelset is free

Postconditions:

  • the Result is accepted

See also:

Examples

import sys import vcsn a = vcsn.B.expression('abc').standard() a
Image in a Jupyter notebook
a.is_ambiguous()
False
try: a.ambiguous_word() except RuntimeError as err: print("error:", err, file=sys.stderr)
error: ambiguous_word: automaton is unambiguous
a = vcsn.B.expression('in (xxyy + xx + yy)* out').automaton() a
Image in a Jupyter notebook
a.ambiguous_word()

inxxyyout\mathit{inxxyyout}