To begin, what's a graph? A graph
is a pair of countable sets
, where
A graph is drawn by simply connecting points representing vertices together by a line segment if they belong to the same edge.
A digraph, or directed graph,
is a pair of countable sets
, where
A digraph is drawn by simply connecting points representing
vertices together by an arrow if they belong to the same edge
, the arrow originating at
and arrowhead pointing to
.
If
belongs to
then we say that
is an ``edge from
to
'' (or from
to
). If
and
are vertices, a path from
to
is
a finite sequence of edges beginning at
and ending at
:
If there is a path from
then we may visualize
Each vertex has valence 2.
By convention, if
In the above example, the diameter is 1.