Applications of Graph Theory to the Analysis of Chaotic Dynamical Systems and Complex Networks