A chain in a graph is a sequence of vertices from one vertex to another using the edges. The length of a chain is the number of edges used, or the number of vertices used minus one. A simple chain cannot visit the same vertex twice. A closed chain is one where the first and last vertex are the same. Here is an example of a simple chain: More formally, a chain is a sequence of vertices of the form x0, x1, ..., xn such that xi and xi+1 are adjacent for i=0,...,n-1. In a simple chain all the xi are distinct. In a closed chain, x0 = xn.