Whether the automaton is deterministic:
Precondition:
See also:
import vcsn
b = vcsn.context("lal_char(ab), b")
The empty automaton is deterministic.
%%automaton -s a
context = "lal_char(ab), b"
a.is_deterministic()
Having more than one initial state makes the automaton not deterministic.
%%automaton -s a
$ -> 0
0 -> 1 a
1 -> $
$ -> 2
2 -> 1 b
a.is_deterministic()
Having a state, even unreachable, with two transitions with the same label makes the automaton not deterministic.
%%automaton -s a
0 -> 1 a
0 -> 2 a
a.is_deterministic()