Changed graph to being directed, useful for DFAs and NFAs