Kernel: Python 3
automaton
.has_lightening_cycle
Whether an automaton has lightening cycles (i.e. contains at least one cycle that would decrease the weight of a path).
Uses the Bellman-Ford algorithm.
In [1]:
Examples
In tropical weightsets
Negative loops can appear when the weight of the path from a state to itself is negative.
In [2]:
False
In [3]:
True
In [4]:
False
In regular weightsets
Negative loops can appear when the weight of the path from a state to itself is between 0 and 1.
In [5]:
True
In [6]:
False