A graph is a pair (V, E), where V is a set of nodes, called vertices, and £ is a collection of pairs of vertices, called edges.
• Vertices and edges are positions and store elements
-
ordered pair of vertices (u, v)
-
first vertex u is the origin
-
second vertex v is the destination
-
Example: one-way road traffic
-
unordered pair of vertices (u, v)
-
Example: railway lines
-
all the edges are directed
-
Example: route network
-
all the edges are undirected
-
Example: flight network