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

automaton.infiltrate

Create the (accessible part of the) infiltration product of two automata. In a way the infiltration product combines the conjunction (synchronized) and the shuffle product.

Preconditions:

  • all the labelsets are letterized

See also:

Examples

import vcsn c = vcsn.context('lal_char, seriesset<lal_char, z>') std = lambda exp: c.expression(exp).standard() c

{}Series[{}Z]\{\ldots\}\to\mathsf{Series}[\{\ldots\}\to\mathbb{Z}]

The following simple example aims at emphasizing that the transitions of the infiltration combine those of the shuffle and the conjunction products.

x = std("<x>a"); x
Image in a Jupyter notebook
y = std("<y>a"); y
Image in a Jupyter notebook
x & y
Image in a Jupyter notebook
x.shuffle(y)
Image in a Jupyter notebook
x.infiltrate(y)
Image in a Jupyter notebook

Don't be mistaken though: if in this example the sum of the shuffle and conjunction products indeed match the infiltration product, this no longer applies to larger automata. In the following example (which nicely highlights the features of these three types of product) the transition from (1,0)(1, 0) to (2,1)(2, 1) would be missing.

xx = x * x xx
Image in a Jupyter notebook
yy = y * y xx & yy
Image in a Jupyter notebook
xx.shuffle(yy)
Image in a Jupyter notebook
xx.infiltrate(yy)
Image in a Jupyter notebook

Associativity

This operator is associative.

x = std('<x>a') y = std('<y>a') z = std('<z>a')
a = x.infiltrate(y).infiltrate(z); a
Image in a Jupyter notebook
b = x.infiltrate(y.infiltrate(z)); b
Image in a Jupyter notebook
a.strip().is_isomorphic(b.strip())
True

Variadicity

As a convenience, infiltrate is variadic: it may accept more than two arguments. However, it's (currently) only a wrapper around repeated calls to the binary operation (as can be seen by the parentheses in the state names below).

c = x.infiltrate(y, z); c
Image in a Jupyter notebook
c.strip().is_isomorphic(a.strip())
True