automaton
.pair
(keep_initials
= False
)¶The pair automaton, or 2-subset automaton, is an intermediate representation used by the heuristics. It is defined by:
Q′={q0}∪{{p,q}∣p,q∈Q,p≠q}δ′({p,q},l)={q0if δ(p,l)=δ(q,l),{δ(p,l),δ(q,l)}otherwise.
See also:
import vcsn
%%automaton a daut
0 -> 0 a
0 -> 1 b
1 -> 0 a
1 -> 1 b
2 -> 0 b
2 -> 1 a
a = a.strip()
a.pair()
You also can keep the initial singleton states instead of merging them in a q0 state:
a.pair(True)