Kernel: Python 3
automaton
.is_valid
A careful analysis of automata with spontaneous transitions shows that in some case, spontaneous-cycles may result in automata with an undefined behavior. They are called invalid.
Preconditions:
None
See also:
References:
Examples
In [1]:
The following examples are taken from lombardy.2013.ijac.
Automaton (Fig. 2) (in )
The following automaton is invalid.
In [2]:
In [3]:
False
Automaton (Fig. 3) (in )
The following one, however, is valid. Spontaneous transitions can be eliminated.
In [4]:
In [5]:
An Invalid Thompson Automaton (Fig. 5)
Sadly enough, the (weighted) Thompson construction may build invalid automata from valid expressions.
In [6]:
True
In [7]:
In [8]:
False