Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download
Views: 45903
Kernel: Python 3

automaton.pair(keep_initials = False)

The pair automaton, or 22-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.\begin{align} Q' &= \{q_0\} \cup \{\{p, q\} \mid p, q \in Q, p \neq q\} \\ \delta'(\{p, q\}, l) &= \begin{cases} q_0 & \text{if}~\delta(p, l) = \delta(q, l),\\ \{\delta(p, l), \delta(q, l)\} & \text{otherwise}. \end{cases} \end{align}

See also:

Examples

import vcsn
%%automaton a daut 0 -> 0 a 0 -> 1 b 1 -> 0 a 1 -> 1 b 2 -> 0 b 2 -> 1 a
Image in a Jupyter notebook
a = a.strip() a.pair()
Image in a Jupyter notebook

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

a.pair(True)
Image in a Jupyter notebook