0% found this document useful (0 votes)
9 views139 pages

Module3 Elementary Graph Theory Dr.E.prasad

Module-3 covers Elementary Graph Theory, including definitions of graphs, types of graphs (such as directed, undirected, simple, complete, and bipartite), and key concepts like degrees of vertices and Euler's formula. It provides examples and theorems related to graph properties, including in-degree and out-degree calculations, as well as the conditions for planarity and bipartiteness. The module is designed for students to understand fundamental graph concepts and their applications in mathematics.

Uploaded by

samarth soni
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views139 pages

Module3 Elementary Graph Theory Dr.E.prasad

Module-3 covers Elementary Graph Theory, including definitions of graphs, types of graphs (such as directed, undirected, simple, complete, and bipartite), and key concepts like degrees of vertices and Euler's formula. It provides examples and theorems related to graph properties, including in-degree and out-degree calculations, as well as the conditions for planarity and bipartiteness. The module is designed for students to understand fundamental graph concepts and their applications in mathematics.

Uploaded by

samarth soni
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 139

Module-3.

Elementary Graph Theory

Dr.E.Prasad
Asst Professor, Dept of Mathematics
VIT Bhopal

Module Title
Module-3. Elementary Graph Theory

Syllabus

Graphs – introduction – isomorphism – sub graphs – walks- paths -


circuits –connectedness – components – Euler graphs – Hamiltonian
paths and circuits.

Syllabus Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Definition
Graph
A graph G(V,E) is two sets of object
Vertices (or nodes) , set V
Edges, set E
A graph is represented with dots or circles (vertices) joined by lines (edges)

Vertices

Edges

Basic Graph Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Definition

Basic Graph Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Definition
When the edges in a graph have no direction, the graph is called
undirected graph

Cont..

Basic Graph Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Definition

When the edges in a graph have a direction, the graph is called directed
(or digraph)

E(Graph2) = {(1,3) (3,1) (5,9) (9,11) (5,7)

Basic Graph Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Finite graph : an graph whose vertex set and edge set are finite

Basic Graph Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Definition

Basic Graph Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Definition

Basic Graph Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Definition

Simple graph : A graph has no loops or multiple edges

Multiple
edges loop

It is not simple. It is a simple graph.

Basic Graph Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Definition

Assume ei is an edge whose endpoints are (vj,vk)


The vertices vj and vk are said to be adjacent
The edge ei is said to be incident upon vj
Degree of a vertex vk is the number of edges
incident upon vk . It is denoted as d(vk)

ei
vj vk

Basic Graph Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Theorem: For simple graphs,  deg(v i )  2 | E |


vi V

Ex: deg(u)+deg(v)+deg(w)=2+2+2=6=2(number of Edges)=2(3)

Check your property to the second graph?

Basic Graph Dr.E.Prasad ,Asst Professor,VITCont…


Bhopal
Module-3. Elementary Graph Theory

Definition

In Degree of a Vertex: The In-degree of a vertex v written by deg−(v), is the number of


edges with v as the terminated vertex. To find the in-degree of a vertex, just count the
number of edges ends at the vertex.
Out Degree of a Vertex: The Out-degree of a vertex v written by deg+(v), is the number of
edges with v as the initial vertex. To find the on-degree of a vertex, just count the number
of edges starting from the vertex.
Therefore the degree of a vertex is equal to the sum of In-Degree of a vertex and the Out-
Degree of a vertex i.e.
Theorem : deg(v) = deg−(v) + deg+(v)

NOTE:If a vertex contains a loop counted as twice

Cont…

Basic Graph Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Example:Find the In -Degree, Out-degree, and degree of each vertex of a graph given
below.

The In-Degree and Out-Degree of each vertex in a graph is


In-Degree of a vertex 'v1' = deg(v1) = 1 and Out-Degree of a vertex 'v1' = deg(v1) = 2
In-Degree of a vertex 'v2' = deg(v2) = 1 and Out-Degree of a vertex 'v2' = deg(v2) = 3
In-Degree of a vertex 'v3' = deg(v3) = 1 and Out-Degree of a vertex 'v3' = deg(v3) = 2
In-Degree of a vertex 'v4' = deg(v4) = 5 and Out-Degree of a vertex 'v4' = deg(v4) = 0
In-Degree of a vertex 'v5' = deg(v5) = 1 and Out-Degree of a vertex 'v5' = deg(v5) = 2
In-Degree of a vertex 'v6' = deg(v6) = 0 and Out-Degree of a vertex 'v6' = deg(v6) = 0

Basic Graph Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

2 A: deg-(1) = ?
deg-(2) = ?
1 3
deg-(3) = ?
deg+(1) = ?
deg+(2) = ?
deg+(3) = ?

Basic Graph Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

2 A: deg-(1) = 0
deg-(2) = 3
1 3
deg-(3) = 4
deg+(1) = 2
deg+(2) = 3
deg+(3) = 2

Basic Graph Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Definition

Basic Graph Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Basic Graph Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Corollary : In a non directed graph, the total number of odd degree


vertices is even.

Basic Graph Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Example. Determine the number of edges in a graph with 6 vertices, 2 of degree


4 and 4 of degree 2.
e = 8.
Example . How many vertices are needed to construct a graph with 6 edges in
which each vertex is of degree 2.
V = 6.
V-vertex

Basic Graph Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Definition

Basic Graph Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Few Important Graph

1. Complete Graph(𝐊 𝐧 )
2. Regular Graph(K-Regular Graph)
3. Planer Graph
4. Bipartite Graph
5. Complete Bipartite Graph-(𝐊 𝐦𝐧 )
6. Cycle Graph(𝐂𝐧 )
7. Wheel Graph(𝐖𝐧 )

Complete Graph Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Definition

Complete Graph Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

**Verify: For a complete Graph K n


1. Every pair of vertices are connected only ones
2. Degree of each vertex is n-1
3. Number of edges are n(n-1)/2
4. The Sum of all degrees n(n-1)

Complete Graph Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Identify the Complete Graph

Complete Graph Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Identify the Complete Graph

Ans.None

Complete Graph Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Regular graphs

Regular Graphs Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Definition

Regular graph: Each vertex has the same degree

Regular Graphs Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

**Verify: For a Regular Graph with n vertices


1. Every regular graph of odd degree has even number of vertices
2. Every k-regular graph with n vertices has (n.k)/2 edges

Regular Graphs Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Example: Is it possible to have a 4-regular graph with 10 edges?


2|E|=4|V|=20, |V|=5 ->possible in (K5)

with 15 edges?

2|E|=4|V|=30 -> not possible

by

Cont..

Regular Graphs Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Theorem : If G has n vertices and is regular of degree r then G has (r.n)/2 edges

Example : In the above Regular graph n= 4 vertices and regular of order r=3
Therefore the number of edges are (n.r)/2=(4.3)/2=6

Regular Graphs Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Identify the Regular Graphs

Regular Graphs Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Identify the Regular Graphs

Regular Graphs are (a) and (d)

Regular Graphs Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Planer Graphs

Planer Graphs Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Definition

Planer Graphs Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Planer Graphs Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

**Verify: For a Planer Graph with n vertices

1. If a connected planar graph G has e edges and r regions, then r ≤(2/3)e.


2. Euler’s Formula:*If a connected planar graph G has e edges, v vertices, and r
regions, then v-e+r=2.
3. If a connected planar graph G has e edges and v vertices, then e ≤ 3n-6 or 3v-e≥6
4. A complete graph Kn is a planar if and only if n<5.
5. A complete bipartite graph Kmn is planar if and only if m<3 or n>3.(next topic)

Planer Graphs Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Examples

1. How many edges must a planar graph have if it has 7 regions and 5 vertices.
Draw one such graph
2. Suppose G is a graph with 1000 vertices and 3000 edges. Is G planar ?
3. A connected plane graph has 10 vertices each of degree 3. Into how many regions,
does a representation of this planar graph split the plane ?.
4. Show that Kn is a planar graph for n ≤ 4 and non-planar for n > 5.
Sol: We know that for a connected planar graph 3v-e≥6.Hence for K4,
we have 3x4- 6=6 which satisfies the property (3).
Thus K4 is a planar graph. Hence Proved.

Planer Graphs Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Bipartite Graphs

Bipartite Graphs Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Definition

Bipartite Graphs Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Example

Bipartite Graphs Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

**Verify: For a Bipartite with n vertices

A graph with at least two vertices is bipartite if and only if it contains no odd cycles.

Bipartite Graphs Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Complete Bipartite Graphs

Complete Bipartite Graphs Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Definition

Complete Bipartite Graphs Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Example
Determine whether or not each of the graphs is bipartite. In each case, give the
bipartition sets or explain why the graph is not bipartite.

Complete Bipartite Graphs Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Complete Bipartite Graphs

Complete Bipartite Graphs Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Definition

Cycle Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Definition

Wheel Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Example

Noticed Example Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Degree Sequence

Degree Sequence Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Definition

Degree sequence of a graph is the list of degree of all the vertices of the
graph. Usually we list the degrees in non increasing order, that is from
largest degree to smallest degree

Degree Sequence Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Find degree sequence

(c)

(d) (e) (e)

Degree Sequence Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Answers

(c)

{4,3,3,3,2,1} {3,3,2,1,1} {3,3,3,3,2,2,2,2,1,1,1,1}

(e)
(d) (e)

(4, 4, 2, 2, 2).
{ 3,3,3,3,2,2,2,2} { 3,3,3,3,2,2,2,2}

Degree Sequence Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Degree Sequence Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Example

Degree Sequence Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Example

Degree Sequence Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Exercise

Reference:
1. https://www.mathstat.dal.ca/~ghandeh/MATH3330/Math3330-1-sol.pdf
2. https://supremus.sk/math/is_a_degree_sequence_graphic/index_en.php

Degree Sequence Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Exercise-Prove /Solve the following

1. In a graph G, the sum of the degrees of the vertices is equal to twice the number of edges
2. For any graph G, the number of odd degree vertices is always even.
3. For n ≥ 1, prove that Kn has n(n − 1)/2 edges, if the edges are 15 then find number of
vertices, What is the smallest integer n such that the complete Kn has at least 500 edges?
4. Show that if G is bipartite then |E| ≤ [n2/4]
5. A graph is bipartite if and only if it has no cycles of odd length
6. A connected graph G is bipartite if and only if G has no odd cycles.
7. If a connected planar graph G has e edges, v vertices, and r regions, then v-e + r=2.
8. If G has n vertices and is regular of degree r then G has (r.n)/2 edges
9. If G is a k-regular bipartite graph with k > 0 and the bipartition of G is X and Y , then the
number of elements in X is equal to the number of elements in Y
10. Let G be a simple regular graph with n vertices and 24 edges. Find all possible values of n
and give examples of G in each case
11. A complete graph Kn is a planar if and only if n<5.
12. Show that a complete bipartite graph Km, n has mn vertices.
13. The complete graph Kn can be expressed as the union of k bipartite graphs if and only n≤2k
14. A complete bipartite graph Km,n is planar if and only if m<3 or n>3
15. Does the given degree sequence (6,6,5,5,4,4,3,3) represents the graph, justify your answer

Isomorphism Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

*Isomorphism

Isomorphism Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Definition

Isomorphism Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Definition

Isomorphism Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Definition

Isomorphism Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Definition

(Or) The minimum circuit length of both graphs must be same

Isomorphism Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Examples

a)Out of three which of the following graphs are


Isomorphic?

b)Is this graph is Isomorphic? Justify with your answer

Isomorphism Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

c)Is this graph is Isomorphic? Justify with your answer

Isomorphism Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

And Graph sequence also accepted

Isomorphism Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

d)

Isomorphism Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Isomorphism Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

e)

Isomorphism Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Isomorphism Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Isomorphism Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

f)Is this graph is Isomorphic? Justify with your answer

g)Is this graph is Isomorphic? Justify with your answer

Isomorphism Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

h)Show that the following graphs are isomorphic

Isomorphism Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Exercise
1)

2)

Isomorphism Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

3) Verify the following graphs are isomorphic? Justify with your answer

4) Verify the following graphs are isomorphic? Justify with your answer

Isomorphism Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

5) Verify the following graphs are isomorphic? Justify with your answer

6) Verify the following graphs are isomorphic? Justify with your answer

https://documents.uow.edu.au/~bmaloney/wuct121/GraphsWeek10Lecture2.pdf

Isomorphism Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

7) Verify the following graphs are isomorphic? Justify with your answer

8) Verify the following graphs are isomorphic? Justify with your answer

Reference:
https://documents.uow.edu.au/~bmaloney/wuct121/GraphsWeek10Lecture2.pdf

Isomorphism Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Definition

Sub graphs Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Elementary Operations on Graphs

Operations on Graphs Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Operations on Graphs Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Definition

Operations on Graphs Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Definition

Operations on Graphs Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Definition

Operations on Graphs Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Definition

Operations on Graphs Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Definition

Operations on Graphs Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

*Definition

Operations on Graphs Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Definition

Operations on Graphs Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Dr.E.Prasad,VIT BPL
Operations on Graphs Dr.E.Prasad ,Asst Professor,VIT Bhopal
Module-3. Elementary Graph Theory

Operations on Graphs Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Components of a Graph

Components of a Graphs Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Definitions

A component of an undirected graph is a connected subgraph that


is not part of any larger connected subgraph. The components of
any graph partition its vertices into disjoint sets, and are
the induced subgraphs of those sets

A graph that is itself connected has exactly one component,


consisting of the whole graph. Components are sometimes
called connected components.

Components of a Graphs Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Example: Consider the following graph

Explanation: There are 2 different connected components. They are {0, 1, 2} and {3, 4}.

Components of a Graphs Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Example: Consider the following graph

Explanation: There are 3 different connected components. They are {1, 2} , {3, 4,5} and {6,7}

Example: Consider the following graph

Explanation: Unique Counts of connected components: 4

Components of a Graphs Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Example: Consider the following graph, Find the number of connected components

Ans: 4 different connected components

Components of a Graphs Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Example: Consider the following graph, Find the number of connected components

Components of a Graphs Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Dr.E.Prasad,VIT BPL
Components of a Graphs Dr.E.Prasad ,Asst Professor,VIT Bhopal
Module-3. Elementary Graph Theory

More Important Graph

• Euler Path
• Euler Circuit
• Hamilton Path
• Hamilton Circuits

Euler and Hamilton Graphs Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Basic Definitions
 Walk/Path
 Open Walk,
 Closed Walks
 Trail
 Simple Path
 Simple Circuit

Basics of Euler and Hamilton Graphs Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory
Definitions
Walk/Path : It is sequence of adjacent vertices (or edges) in a graph. The number of edges in
the walk is called as the length of the walk
Note:
1. We can't just list vertices (or edges) randomly and call it a walk. A subsequent vertex
must be adjacent to the previous one
2. A walk can contain vertices and edges multiple times.

Example

Basics of Euler and Hamilton Graphs Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Open walk: A walk is said to be open if the first and the last
vertices are different i.e. the terminal vertices are different.

Closed walk: A walk is said to be closed if the first and last


vertices are the same. That means you start walking at a
vertex and end up at the same.

Trail: Trail is an open walk where vertices can repeat, but


not edges

.
Basics of Euler and Hamilton Graphs Dr.E.Prasad ,Asst Professor,VIT Bhopal
Module-3. Elementary Graph Theory

Simple path: Simple path is an open walk with


no repetition of vertices and edges

Simple Circuit/ Cycle : It is a simple path where


starting and ending must be same.

Basics of Euler and Hamilton Graphs Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Example: From the following graph describe the following types of walks

Basics of Euler and Hamilton Graphs Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Answer:

Basics of Euler and Hamilton Graphs Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Example: From the following graph describe the nature of walk

Basics of Euler and Hamilton Graphs Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Answer:

Basics of Euler and Hamilton Graphs Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Example: From the following graph describe the nature of walk

1. v1 e1 v2 e2 v3 e2 v2
2. v4 e7 v1 e1 v2 e2 v3 e3 v4 e4 v5
3. v1 e1 v2 e2 v3 e3 v4 e4 v5
4. v1 e1 v2 e2 v3 e3 v4 e7 v1
5. v6 e5 v5 e4 v4 e3 v3 e2 v2 e1 v1 e7 v4 e6 v6

Basics of Euler and Hamilton Graphs Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Example: From the following graph describe the nature of walk

1. v1 e1 v2 e2 v3 e2 v2
2. v4 e7 v1 e1 v2 e2 v3 e3 v4 e4 v5
3. v1 e1 v2 e2 v3 e3 v4 e4 v5
4. v1 e1 v2 e2 v3 e3 v4 e7 v1
5. v6 e5 v5 e4 v4 e3 v3 e2 v2 e1 v1 e7 v4 e6 v6
Answers
1. Open walk
2. Trail (Not a path because vertex v4 is repeated)
3. Path
4. Cycle
5. Circuit (Not a cycle because vertex v4 is repeated

Basics of Euler and Hamilton Graphs Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Euler Path and Euler Circuit

Euler Path and Circuit Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Definition

Euler Path and Circuit Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Example: Find Euler path(s) of the following

Euler Path and Circuit Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Sol1

An Euler path: BBADCDEBC

Euler Path and Circuit Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Sol2

Another Euler path :CDCBBADEB

Euler Path and Circuit Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Example: Find Euler Circuit(s) of the following

Euler Path and Circuit Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Sol1

An Euler circuit :CDCBBADEBC

Euler Path and Circuit Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Sol2

Another Euler circuit: CDEBBADC

Euler Path and Circuit Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Question)Are the following graph Euler Path or Euler circuit? Explain.

Euler Path and Circuit Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

**Verify: For a Eular Path


• A connected graph G has an Euler path/walk if and only if the number of vertices of
odd degree is two and other vertices are even degree
• If there are two vertices of odd degree then one is starting point other one is ending
point

**Verify: For a Eular Circuit


• All the vertices degree greater than zero are connected
• A graph has an Euler circuit if and only if the degree of every vertex is even.

Euler Path and Circuit Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Question)Is the following graph Euler Path or Euler circuit? Explain.

Euler Path and Circuit Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

**Konigsberg Bridge Problem


• The Konigsberg is the name of the German city, but this city is now in Russia.
• In the below image, we can see the inner city of Konigsberg with the river Pregel.
• There are a total of four land areas in which this river Pregel is divided, i.e., A, B, C and D.
• There are total 7 bridges to travel from one part of the city to another part of the city

Euler Path and Circuit Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

*Question: Is it possible for anyone to cross each of the seven bridges only a single time and
come back to the beginning point without swimming across the river if we begin this process
from any of the four land areas that are A, B, C, and D?.

Euler Path and Circuit Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

*Ans:
No, because
It fails to prove that when there are exactly only two nodes of odd degree
When all the nodes are of even degree

Euler Path and Circuit Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Qn)For which n does the graph Kn contain an Euler circuit? Explain.

Euler Path and Circuit Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Hamiltonian Path and Hamiltonian Circuit

Hamilton Path and Circuit Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory
Definitions
Hamiltonian Path – A simple path in a graph that passes through every vertex exactly once is
called a Hamiltonian path.

Hamiltonian Circuit – A simple circuit in a graph that passes through every vertex exactly once
is called a Hamiltonian circuit.

**Note: There is a certain criteria which rule out the existence of a Hamiltonian circuit in a
graph, such as- if there is a vertex of degree one in a graph then it is impossible for it to have
a Hamiltonian circuit.

**Number of Hamilton Circuits


How many Hamilton circuits does a graph with five vertices have?
A complete graph with N vertices is (N-1)!

Theorem: Kn is Hamiltonian circuit for n≥3

Reference: https://www.javatpoint.com/hamiltonian-graph-in-discrete-mathematics

Hamilton Path and Circuit Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory
Dirac’s Theorem- “If is a simple graph with vertices n≥3 with such that the degree of every
vertex in is at least n/2 , then has a Hamiltonian circuit.”
Example

By the theorem we have n = 6 and deg(v) = 3 for each vertex, so this graph is Hamiltonian by
Dirac's theorem.

Hamilton Path and Circuit Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Ore’s Theorem- “If is a simple graph with n vertices with such that deg(u)+ deg(v)≥n for every
pair of non-adjacent vertices and in , then has a Hamiltonian circuit.”

n = 5 but deg(u) = 2, so Dirac's theorem does not apply. However, deg(v) + deg(w) ≥ 5 for all
pairs of vertices v and w (infact, for all pairs of vertices v and w), so this graph is Hamiltonian by
Ore's theorem.

Hamilton Path and Circuit Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Example: Verify the following graph is then G is a Hamiltonian graph. (Dirac theorem)

Hamilton Path and Circuit Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Example 1- Does the following graph have a Hamiltonian Circuit?

Hamilton Path and Circuit Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Example 1- Does the following graph have a Hamiltonian Circuit?

Solution- Yes, the above graph has a Hamiltonian circuit. The solution is –

Hamilton Path and Circuit Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Example 2- Does the following graph have a Hamiltonian Circuit?

Hamilton Path and Circuit Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Example 2- Does the following graph have a Hamiltonian Circuit?

Solution- No the above graph does not have a Hamiltonian circuit as there are two
vertices with degree one in the graph.

Hamilton Path and Circuit Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Example 3: Does the following graph have a Hamiltonian Circuit?

Hamilton Path and Circuit Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Example 3- Does the following graphs have a Hamiltonian Path or Hamilton Circuit?

Hamilton Path and Circuit Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Example 3-Answers

A) It is not a Hamiltonian Graph.


B) It is not a Hamiltonian Graph
C) The graph contains both a Hamiltonian path (ABCDHGFE) and a Hamiltonian circuit (ABCDHGFEA)
D) It is both a Hamiltonian path (ABCDEFG) and a Hamiltonian circuit (ABCDEFGA).
since graph contains a Hamiltonian circuit, therefore It is a Hamiltonian Graph.
E) The graph neither contains a Hamiltonian path nor it contains a Hamiltonian circuit.
since graph does not contain a Hamiltonian circuit, therefore It is not a Hamiltonian Graph.
F) The graph contains both a Hamiltonian path (ABCDEFGHI) and a Hamiltonian circuit (ABCDEFGHIA)
Since graph contains a Hamiltonian circuit, therefore It is a Hamiltonian Graph.

Hamilton Path and Circuit Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Reminder;
An Euler path is a path that passes through every edge exactly once. If it ends at the initial
vertex then it is an Euler cycle(circuit).
A Hamiltonian path is a path that passes through every vertex exactly once (NOT every edge).
If it ends at the initial vertex then it is a Hamiltonian cycle(circuit).

Hamilton Path and Circuit Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

** Example: Give an example of the following for each and every case
a) Euler path but not Euler Circuit
b) Hamilton path but not Hamilton Circuit
c) Draw the graph which is both Eulerian and Hamiltonian
d) Draw the graph which is Eulerian but not Hamiltonian
e) Draw the graph which is not Eulerian but Hamiltonian
f) Draw the graph which is neither Eulerian not Hamiltonian

Note:
Eulerian is same as Euler Circuit
Hamiltonian same as Hamilton Circuit

Hamilton Path and Circuit Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Eulerian path and Not Circuit


Eulerian path and Circuit

Hamilton path and Circuit Hamilton path not Circuit

Hamilton Path and Circuit Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Exercise

Reference: https://lidicky.name/oldteaching/20.569X/l11%20-%20Eulerian.pdf

Hamilton Path and Circuit Dr.E.Prasad ,Asst Professor,VIT Bhopal


Module-3. Elementary Graph Theory

Dr.E.Prasad ,Asst Professor,VIT Bhopal

You might also like