Check this short but sweet non-deterministic Finite State Machine Function that simply accepts a FSM and returns a string if it is not ambiguous!

The idea is as follows:

  • Take an edge if it has not already been visited, otherwise go to the next edge.
  • If current state is final then you are done.

Any questions or comments please leave them below!

~rs



Comments

comments powered by Disqus