Whether the automaton is deterministic:
Precondition:
See also:
import vcsn
b = vcsn.context("lal_char(ab), b")
The empty automaton is deterministic.
a = vcsn.automaton(''' digraph { vcsn_context = "lal_char(ab), b" } ''')
a
a.is_deterministic()
Having more than one initial state makes the automaton not deterministic.
a = b.ratexp('a').standard() | b.ratexp('b').standard()
a
a.is_deterministic()
Having a state, even unreachable, with two transitions with the same label makes the automaton not deterministic.
a = vcsn.automaton(''' digraph {
vcsn_context = "lal_char(ab), b"
0 -> 1 [label="a"]
0 -> 2 [label="a"]
} ''')
a
a.is_deterministic()