Kernel: Python 3
automaton
.shuffle(
a1
, ...)
The (accessible part of the) shuffle product of automata.
Preconditions:
all the labelsets are letterized
See also:
Examples
In [1]:
Boolean Automata
The shuffle product of automata computes the shuffling of their languages: all the possible interleavings.
In [2]:
In [3]:
Weighted automata
In the case of weighted automata, weights are "kept" with the letters.
In [4]:
In [5]:
Associativity
This operator is associative, and it is actually implemented as a variadic operator; a.shuffle(b, c)
is not exactly the same as a.shuffle(b).shuffle(c)
: they are the same automata, but the former is labeled with 3-uples, not 2-tuples.
In [6]:
In [7]:
In [8]: