A graph consists of two finite sets:

  • a nonempty set of vertices
  • a set of edges,

where each edge is associated with a set consisting of either one or two vertices called its endpoints.

Diagram of a Graph