Loading [MathJax]/jax/output/HTML-CSS/jax.js

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,qQ,pq}δ({p,q},l)={q0if δ(p,l)=δ(q,l),{δ(p,l),δ(q,l)}otherwise.

See also:

Examples

In [1]:
import vcsn
In [2]:
%%automaton a daut
0 -> 0 a
0 -> 1 b
1 -> 0 a
1 -> 1 b
2 -> 0 b
2 -> 1 a
%3 0 0 0->0 a 1 1 0->1 b 1->0 a 1->1 b 2 2 2->0 b 2->1 a
In [3]:
a = a.strip()
a.pair()
Out[3]:
%3 0 0 0->0 a, b 1 0, 1 1->0 a, b 2 0, 2 2->1 a, b 3 1, 2 3->1 a, b

You also can keep the initial singleton states instead of merging them in a q0 state:

In [4]:
a.pair(True)
Out[4]:
%3 0 0 0->0 a 1 1 0->1 b 1->0 a 1->1 b 2 2 2->0 b 2->1 a 3 0, 1 3->0 a 3->1 b 4 0, 2 4->3 a, b 5 1, 2 5->3 a, b