automaton.minimize(algo="auto")
Minimize an automaton.
The algorithm can be:
"auto"
: same as"signature"
for Boolean automata on free labelsets, otherwise"weighted"
."brzozowski"
: run determinization and codeterminization."hopcroft"
: requires free labelset and Boolean automaton."moore"
: requires a deterministic automaton."signature"
"weighted"
: same as"signature"
but accept non Boolean weightsets.
Preconditions:
the automaton is trim
"brzozowski"
the labelset is free
the weightset is
"hopcroft"
the labelset is free
the weightset is
"moore"
the automaton is deterministic
the weightset is
"signature"
the weightset is
Postconditions:
the result is equivalent to the input automaton
Caveat:
the resulting automaton might not be minimal if the input automaton is not deterministic.
See also:
Examples
Weighted
Using minimize
or minimize("weighted")
.
The following example is taken from lombardy.2005.tcs, Fig. 4.
Signature
Moore
Brzozowski
Hopcroft
Minimization of transposed automaton
For minimization and cominimization to produce automata of the same implementation types, the minimization of a transposed automaton produces a transposed partition automaton, instead of the converse.
Repeated Minimization/Cominimization
The minimizations algorithms other than Brzozowski build decorated automata (whose type is partition_automaton
). Repeated minimizarion and/or cominization does not stack these decorations, they are collapsed into a single layer.
For instance:
Note that the initial and final states are labeled 0,4
and 3,7
, not {0}, {4}
and {3,7}
as would have been the case if the two levels of decorations had been kept. Indeed, the type of m
is simple:
We obtain the exact same result (including decorations) even with repeated invocations, even in a different order: