A graph $G=(V , E)$ consists of $V$, a nonempty set of _vertices_ (or _nodes_ ) and $E$, a set of edges . Each edge has either one or two vertices associated with it, called its endpoints . An edge is said to connect its endpoints.