automaton.standard

Turn an automaton into a standard automaton.

Preconditions:

  • None

Postconditions:

  • result.is_standard()

See also:

Examples

There is a single initial state.

In [1]:
import vcsn
b = vcsn.context('lal_char, z')
a = b.expression('a').standard() | b.expression('b').standard()
a
Out[1]:
%3 I0 0 0 I0->0 I2 2 2 I2->2 F1 F3 1 1 0->1 a 1->F1 3 3 2->3 b 3->F3
In [2]:
a = a.standard()
a
Out[2]:
%3 I4 4 4 I4->4 F1 F3 1 1 1->F1 3 3 3->F3 4->1 a 4->3 b

The initial state has 1 as (initial) weight.

In [3]:
%%automaton -s a
context = "lal_char, z"
$ -> 0 <2>
0 -> 1 a
0 -> 2 b
1 -> $
2 -> $
%3 I0 0 0 I0->0 ⟨2⟩ F1 F2 1 1 0->1 a 2 2 0->2 b 1->F1 2->F2
In [4]:
a.standard()
Out[4]:
%3 I3 3 3 I3->3 F1 F2 1 1 1->F1 2 2 2->F2 3->1 ⟨2⟩a 3->2 ⟨2⟩b

There is no incoming transition on the initial state.

In [5]:
%%automaton -s a
context = "lal_char, z"
$ -> 0 <2>
0 -> $ <2>
0 -> 1 a
1 -> 0 b
%3 I0 0 0 I0->0 ⟨2⟩ F0 0->F0 ⟨2⟩ 1 1 0->1 a 1->0 b
In [6]:
a.standard()
Out[6]:
%3 I2 2 2 I2->2 F0 F2 0 0 0->F0 ⟨2⟩ 1 1 0->1 a 1->0 b 2->F2 ⟨4⟩ 2->1 ⟨2⟩a