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

automaton.synchronize

Create a new transducer, equivalent to the first one, but where the transitions advance along all the tapes at the same rate, for as long as possible. The transitions before the final states may have the empty word on one of the tapes, to allow for words of different lengths on the input and output.

Preconditions:

  • The input automaton is a transducer.

  • Input.has_bounded_lag

Postconditions:

  • Result.is_synchronized

See also:

Examples

import vcsn ctx = vcsn.context("lat<law_char, law_char>, b") ctx

{}×{}B\{\ldots\}^* \times \{\ldots\}^*\to\mathbb{B}

The following automaton is not synchronized (the first transition is already not synchronized):

a = ctx.expression(r"(abc|\e)(d|v)*(\e|wxyz)").standard() a
Image in a Jupyter notebook

The lag is bounded, because every cycle (here, the loop) has a lag of 0.

a.has_bounded_lag()
True

Apart from pure spontaneous transitions, the only transitions with ε\varepsilon in them are right before the final state.

s = a.synchronize() s
Image in a Jupyter notebook
s.is_synchronized()
True

This is a (for the most part) letter-to-letter transducer equivalent to the input.

s.proper().letterize().minimize().strip()
Image in a Jupyter notebook