CHAPTER FIVE
ELEMENTS OF GRAPH
THEORY
Graph theory is a branch of mathematics that deals with
arrangements of certain objects and relationships between
these objects.
Is it possible to walk along a route that cross each
bridge exactly once?
Definition and examples
Definition: A graph G = (V, E) consists of a nonempty set V of
vertices (or nodes) and a set E of edges. Each edge has either
one or two vertices associated with it, called its endpoints. An
edge is said to connect its endpoints.
Example:-
A B G is a graph with G(V,E) where
G i) V={A,B,C,D}
ii) E={AC,AD,BC,BD}
C D
Note:- An edge should not pass through more than two
vertices.
Terminology
In a simple graph each edge connects two different
vertices and no two edges connect the same pair of
vertices.
Multi graphs may have multiple edges connecting
the same two vertices. Whendifferent edges
connect the vertices and , we say that is an edge of
multiplicity .
An edge that connects a vertex to itself is called a
loop.
A pseudo graph may include loops, as well as
multiple edges connecting the same pair of vertices.
Example:-
Cont.
Definition:- The degree of a vertex in a undirected
graph is the number of edges incident with it, except
that a loop at a vertex contributes two to the degree
of that vertex. The degree of the vertex v is denoted
by deg(v).
Example:-
Cont.
Definition: -
i) A vertex is said to be even if its degree is even
number and odd if its degree is odd number.
ii) A vertex of degree zero is called isolated vertex.
iii) A vertex of degree one is called pendant vertex.
Theorem (Handshaking Theorem)
If is an undirected graph with edges, then
Proof: Each edge contributes twice to the degree
count of all vertices. Hence, both the left-hand and
right-hand sides of this equation equal twice the
number of edges.
4.2 matrix representation of graph
Adjacency matrix
Definition:- suppose G is a graph with m vertices
and suppose the vertices have been ordered, say
Then the adjacency matrix of the graph G is the
matrix define by
Example :-
Cont.
Incidence matrix
Definition:-Suppose G is a graph with vertices . The
incidence matrix of the graph G is given by:
Example:-
1 1 0 0 1 0
1 0 1 0 0 0
M
0 0 0 1 1 1
0 1 1 1 0 0
4.3 isomorphic of graphs
Definition :- The simple graphs G1 = (V1,E1) and G2
= (V2,E2) are isomorphic if there is an injective (one-
to-one) and surjective (onto) function f from V1 to V2
with the property that a and b are adjacent in G1 if
and only if f (a) and f (b) are adjacent in G2, for all a
and b in V1. Such a function f is called an
isomorphism.
Example :-
Cont.
4.4 path and connectivity
Definition :-
A walk in a graph G is a sequence of edges of the
form
The number of edges is called the length of the walk .
A walk in which all the edges are distinct is called a
trial. A trail in which all vertices are distinct (except
possibly ) is called a path.
A path with is called a cycle.
Example :-
f-d-e-c-b is path and a-b-g-f-c-b is trial
Cont.
Definition :- a graph is connected if for each pair
of vertices, there is a path from to . A graph which
is not connected is made up of a number of
connected pieces, called components.
Example :- is G connected?
Remark:
1. A disconnected graph is made up of two or more disjoint
connected subgraphs.
2. A graph is connected iff it has only one component.
3. The component of a graph is denoted by C(G).
Cont.
Special classes of graphs
Cycle graph:
A cycle graph of order n is a connected graph whose
edges form a cycle of length n. Cycle graphs are denoted
by .
Path graph:
A path graph of length n is a graph obtained by removing
an edge from a cycle graph . Path graph of order n is
denoted by .
Wheel Graph:
A wheel of order n is a graph obtained by joining a single
vertex (the 'hub') to each vertex of a cycle graph. Wheel
graph is denoted by .
Null Graph:
A null graph of order n is a graph with n vertices and no
edges and is denoted by.
Cont.
Complete graph: A graph G is said to be complete if
every vertex in G is connected to every other vertex in
G. Thus a complete graph G must be connected.
Notation: The complete graph with n-vertices is
denoted by .
Example :-
Remark: In a complete graph;
There are edges.
All vertices are mutually adjacent
Cont.
Definition:-
A simple graph G is bipartite if V can be partitioned
into two disjoint subsets V1 and V2 such that every
edge connects a vertex in V1 and a vertex in V2. In
other words, there are no edges which connect two
vertices in V1 or in V2.
Note: An equivalent definition of a bipartite graph is a
graph where it is possible to color the vertices red or
blue so that no two adjacent vertices are the same
color.
Example :- show that is bipartite graph
Cont.
Complete bipartite graphs
Definition: A complete bipartite graph is a graph that
has its vertex set partitioned into two subsets V1of
size m and V2 of size n such that there is an edge from
every vertex in V1 to every vertex in V2.
Example :-
K3,2 K3,4
Theorem: In a complete bipartite graph ; the number
of edges is given by .
Cont.
Regular graph: A graph G is said to be regular of
degree k or K-regular if every vertex has degree k. In
other words, a graph is regular if every vertex has the
same degree.
Example: Here are some examples of regular graphs.
1-regular 2-regular
3-regular
Theorem: A complete graph with n-vertices is a
regular graph of degree n-1.
Euler and Hamilton Graphs
Eulerian Path:
Definition: An Eulerian path in a graph G(V,E) is a
path which uses each edge in E exactly once.
An Euler path that begins and ends at the same vertex
is called Eulerian trial.
A graph that contains an Eulerian (closed) trial is
called an Eulerian graph.
Theorem: A connected graph is Eulerian if and only if
all of its vertices have even degree.
Example :-
Cont.
Hamilton Paths:
Definition :- a path that visits every vertex in a graph G
exactly once is called a Hamilton path.
A closed Hamilton path is called a Hamilton cycle.
G is called a Hamiltonian graph if it admits a Hamiltonian cycle.
Example:-
Theorem: If G is a simple graph with vertices and if for all
pairs of non-adjacent vertices u and v, then G is Hamiltonian.
(The converse is not always true)
Trees and forest
Trees
Definition:
A tree is a connected undirected graph with no simple
circuits.
•Since a tree cannot have a circuit, a tree cannot
contain
Discrete Mathematics, Spring 2009
•Since a tree cannot have a circuit, a tree cannot
contain multiple edges or loops.
•Therefore, any tree must be a simple graph.
Theorem: An undirected graph is a tree if and only if
there is a unique simple path between any two of its
vertices.
In general, we use trees to represent hierarchical
Cont.
Example :-
Rooted tree
binary tree
Theorem: Let G be a graph with vertices. Then the
following are equivalent.
i) G is a tree
ii) G is cycle-free and has n-1 edges
iii) G is connected and has n-1 edges.
Planar graph
A planar graph is one that can be embedded in the
plane, i.e.,
it can be drawn on the plane in such a way that its
edges do
not intersect except only at their endpoints.
Example :-
planar
Cont.
Faces and planar graphs
Definition: If G is a planar graph, then the plane
representation of G splits the plane into regions called
faces of G. The unbounded region outside the graph is
called the infinite face. If f is any face of a graph, then
the degree of f , denoted by deg(f), is the number of
edges encountered in a walk(or path)that begins and
ends at the same vertex around the boundaries of the
face f. If all faces have the same degree r, then G is a
face-regular graph of degree r.
Example :- f4
f2 f1 f
ddddss f3
Cont.
Remark: A connected planar graph has exactly one
infinite face.
Theorem (Euler's Formula)
For any connected planar graph G,
Where /V/ denotes the number of vertices, /E/ the
number of edges and /F/ the number of faces in G.
Example :- Verify Euler's formula for the planar graph
K4.
Solution:-
Graph Coloring
Definition: Consider a graph G. a vertex coloring or
simply a coloring of G is an assignment of colors to the
vertices of G such that adjacent vertices have different
colors.
Example :-
Definition :- the minimum number of color needed to
produce a proper coloring of G is called chromatic
number of G. it is denoted by
Example :-
Cont.
Theorem
The following are equivalent for a graph G
i. G is two colourable
ii. G is bipartite
iii. Every cycle of G has even length
Theorem (five colorable theorem)
Any planar graph G is 5 colorable.
Proof :- Exercise
Definition :- the number of ways to properly color G
with x colors is denoted by is called chromatic
polynomial of G.
Example :- the chromatic polynomial of
Solution:-
Cont.
Coloring application problem
Scheduling Final Exams How can the final exams at
a university be scheduled so that no student has two
exams at the same time?
Solution:-
This scheduling problem can be solved using a graph
model, with vertices representing courses and with an
edge between two vertices if there is a common
student in the courses they represent. Each time slot
for a final exam is represented by a different color. A
scheduling of the exams corresponds to a coloring of
the associated graph.