https://rpruim.github.io/m252/S19/from-class/models-of-computation/finite-state-automata.html#graph-representation