Introduction To Graph Theory
Introduction To Graph Theory
Introduction To Graph Theory
Discussion
1. INTRODUCTION TO GRAPHS
v1
v2
v3
v4
179
Example 1.2.2. V = {a, b, c}, E = {{a, b}, {b, c}, {a, c}}
If e1 , e2 E are such that f (e1 ) = f (e2 ), then we say e1 and e2 are multiple or
parallel edges.
Example 1.3.1. V = {a, b, c, d}, E = {e1 , e2 , . . . , e6 }, f : E {{u, v} : u, v
V and u 6= v} is defined as follows.
e
e1
e2
e3
e4
e5
e6
1. INTRODUCTION TO GRAPHS
e3
e2
e1
180
e4
e6
e5
c
Discussion
In Example 1.3.1 e1 and e2 are parallel edges, but the edges e2 and e5 are not
called parallel edges.
Exercise 1.3.1. Find all the parallel edges Example 1.3.1.
Notice that a multigraph allows for multiple edges between a pair of vertices, but
does not allow for loops. In some applications it may be desirable to illustrate all
the connections between the vertices. Say for example, in a network there may be
multiple wires connecting the same units.
1.4. Pseudograph.
Definition 1.4.1. A pseudograph is a set of vertices, V , a set of edges, E, and
a function f : E {{u, v} : u, v V }. If e E is such that f (e) = {u, u} = {u},
then we say e is a loop.
Example 1.4.1. V = {a, b, c, d}, E = {e1 , e2 , . . . , e8 },
f : E {{u, v} : u, v V }
is defined as follows.
e1
e2
e3
e4
e5
e6
e7
e8
1. INTRODUCTION TO GRAPHS
181
e7
b
e3
a
e2
e1
e6
e5
e4
d
e8
Discussion
The pseudograph adds the possibility of loops. For example, a diagnostic line may
be used in a network, which is a line connecting a computer to itself.
1. INTRODUCTION TO GRAPHS
182
e7
b
e3
a
e2
e1
e6
e5
e4
d
e8
Discussion
A directed graph, or digraph, allows loops and allows two edges joining the same
vertex, but going in the opposite direction. More than one edge going in the same
direction between vertices, however, is not allowed. A directed edge is defined by
an ordered pair rather than an unordered pair. That is, the ordered pair (a, b) is
different from the ordered pair (b, a), while the unordered pair {a, b} = {b, a}. Be
careful of the notation you use when writing an edge.
Exercise 1.5.1. If a directed graph G has 5 vertices, what is the maximum number
of (directed) edges of G?
1.6. Directed Multigraph.
Definition 1.6.1. A directed multigraph (V, E) consists of vertices, V , and
edges, E, and a function
f : E V V = {(u, v)|u, v V }.
The edges e1 and e2 are multiple edges if f (e1 ) = f (e2 )
Example 1.6.1. V = {a, b, c, d}, E = {e1 , e2 , . . . , e10 },
f : E {(u, v) : u, v V }
is defined as follows.
e1
e2
e3
e4
e5
e6
e7
e8
e9
e10
f (e) (a, c) (c, a) (a, b) (c, b) (b, d) (d, b) (a, a) (d, d) (a, b) (b, d)
1. INTRODUCTION TO GRAPHS
e7
e9
a
e2
e1
183
e3
e5
e4
e6
e10
c
d
e8
Discussion
Notice the difference between a directed graph and a directed multigraph: a directed graph allows more than one edge to connect the same two vertices as long as
they have opposite directions; whereas, no such restriction is placed on the edges of
a directed multigraph.
Exercise 1.6.1. Give all the multiple edges in Example 1.6.1.
1.7. Graph Isomorphism.
Definition 1.7.1. Let G1 = (V, E) and G2 = (U, F ) be simple graphs. The graphs
G1 and G2 are isomorphic if there exists a bijection
f: V U
such that for all v1 , v2 V , v1 and v2 are adjacent in G1 if and only if f (v1 ) and
f (v2 ) are adjacent in G2 .
Definition 1.7.2. If f is a bijection as described above, then f is called an isomorphism between G1 and G2 , and we often write
f : G1 G2 .
Discussion
There are several notations that are used to represent an isomorphism. We will
use a common notation G1 ' G2 to mean that G1 is isomorphic to G2 .
Trying to construct an isomorphism between graphs can be a very difficult problem
in general. If simple graphs G1 and G2 are isomorphic, then, clearly, they must have
1. INTRODUCTION TO GRAPHS
184
the same number of vertices. As the next exercise shows, G1 and G2 must also have
the same number of edges. Having the same number of vertices and edges,
however, is in no way sufficient for graphs G1 and G2 to be isomorphic.
Often to prove existence of an isomorphism between two graphs one must actually
construct the isomorphism.
Exercise 1.7.1. Prove that if simple graphs G1 and G2 are isomorphic, then G1
and G2 have the same number of edges.
Example 1.7.1. The graphs G1 and G2 below are isomorphic. The bijection is
defined by f (vi ) = ui .
v1
v4
v2
G1
v3
u1
u2
u3
u4
G2
1. INTRODUCTION TO GRAPHS
185
two
two
two
two
multigraphs.
pseudographs.
directed graphs.
directed multigraphs.