A Graph-Theoretic Approach to Network Dynamics