Dynamical Systems, Graphs, and Algorithms