G=(V,E) is a graph, with V[G] as its vertices (or nodes), and E[G] as its edges (or links).
By convention, n = |V| and m= |E|. Note that
.
Often, we also have
(connected, undirected graph).
For
, we write
to be the set of
vertices to which u is directly connected (i.e.,
if and only if
(adjacency list).
Note: Matrices also useful for representing edges:
if
and 0 otherwise (adjacency matrix). If A is
an adjacency matrix representing a graph G, which does
represent?