automaton
& aut
¶The (accessible part of the) "conjunction" of automata.
Also Known As:
Preconditions:
See also:
import vcsn
The synchronized product of Boolean automata computes the intersection of their languages. For instance, the conjunction of an automaton that accepts only words on $\{a, b\}$ with an odd number of $a$ with an automaton accepting with words with an odd number of $b$:
%%automaton odda
$ -> 0
0 -> 0 b
0 -> 1 a
1 -> 1 b
1 -> 0 a
1 -> $
%%automaton oddb
$ -> 0
0 -> 0 a
0 -> 1 b
1 -> 1 a
1 -> 0 b
1 -> $
is an automaton that accepts only words with odd numbers of $a$ and $b$:
odda & oddb
(odda & oddb).shortest(10)
import vcsn
c = vcsn.context('lal_char, seriesset<lal_char, z>')
std = lambda exp: c.expression(exp).standard()
x = std("<x>a*+<x>b*"); x
y = std("<y>a*+<y>c*"); y
x & y
This operator is associative, and it is actually implemented as a variadic operator; a & b & c
is not exactly the same as (a&b)&c
: they are the same automata, but the former is labeled with 3-uples, not 2-uples.
x = std('<x>a')
y = std('<y>a')
z = std('<z>a')
x & y & z
xy = (x & y).__value__(); xy & z
The __value__
call here is an internal detail used to force Vcsn into the binary call. You should forget about it