CSCE 235
Handout
20: Graphs
Assigned April 16, 2003
Basic
Definitions
Definition 1: A simple graph
consists of V, a nonempty set of vertices, and E,
a set of unordered pairs of distinct elements of V called edges.
Simple graphs do not have parallel edges. Two edges connecting the same 2 vertices are called multiple edges or parallel edges.
Definition 2: A multigraph
consists of a set V
of vertices, a set E of edges, and a function f from E
to
. The edges
and
are called multiple
or parallel edges if ![]()
Multigraphs do not have loops. An edge that connects the vertex to itself is called a loop.
Definition 3: A pseudograph
consists of a set V
of vertices, a set E of edges, and a function f from E
to
. An edge is a loop
if
for some
.
Some graphs are directed.
Definition 4: A directed graph
consists of a set V
of vertices and a set E of edges that are ordered pairs of
elements of V.
Definition 5: A directed multigraph
consists of a set V
of vertices, a set E of edges, and a function and a function f
from E to
. The edges
and
are called multiple
or parallel edges if ![]()
|
Type |
Edges |
Multiple Edges
Allowed? |
Loops Allowed? |
|
Simple graph |
Undirected |
No |
No |
|
Multigraph |
Undirected |
Yes |
No |
|
Pseudograph |
Undirected |
Yes |
Yes |
|
Directed graph |
Directed |
No |
Yes |
|
Directed multigraph |
Directed |
Yes |
Yes |
Definitions
of Special Graphs
For any positive
integer n, the complete graph on n vertices, denoted Kn,
is the graph with n vertices every two of which are adjacent.
A bipartite
graph is one whose vertices can be partitioned into 2 (disjoint) sets
and
, called bipartition sets, in such a way that every edge
joins a vertex in
and a vertex in
. In particular,
there are no edges within
nor within
.
A complete bipartite
graph is a bipartite graph in which every vertex in
is joined to every
vertex in
. The complete
bipartite graph on bipartition sets of m vertices and n vertices,
respectively, is denoted as
.
A graph is a subgraph of another graph G if and only if the vertex and edge sets of that graph are, respectively, subsets of the vertex and edge sets of G.
Definition 1. The simple graphs
and
are isomorphic
if there is a one-to-one and onto function f from
and
with the property
that a and b are adjacent in
iff
and
are adjacent in
, for all a and b in
. Such a function f
is called an isomorphism.
Theorems
THEOREM 1. The Handshaking Theorem. Let
be an undirected
graph with e edges. Then
.
THEOREM 2. An undirected graph has an even number of vertices of odd degree.
Proof: Let
and
be the set of
vertices of even degree and the set of vertices of odd degree, respectively, in
an undirected graph
. Then
. Since
is even for
, the first term in the right-hand side of the last equality
is even. Also, the sum of the two terms
on the right-hand side of the last equality is even, since this sum is 2e. Thus, the second term in the sum has to be
even. Since all the terms in this
sum are odd, there must be an even number of such terms. Thus, there are an even number of vertices
of odd degree.
THEOREM 3: Let
be a graph with directed
edges. Then
.