In the mathematical study of graph theory, a pancyclic graph is a directed graph or undirected graph that contains cycles of all possible lengths from three up to the number of vertices in the graph.[1] Pancyclic graphs are a generalization of Hamiltonian graphs, graphs which have a cycle of the maximum possible length.