In graph theory, a cycle in a graph is a non empty trail in which the only repeated vertices are the first and last vertices. A directed cycle in a directed graph is a non empty directed trail in which the only repeated vertices are the first and last vertices.