0% found this document useful (0 votes)
285 views

Hamiltonian Graphs

Hamiltonian graphs are named after mathematician William Rowan Hamilton. A Hamiltonian graph contains a Hamiltonian cycle, which is a cycle that visits each vertex exactly once. There are several conditions for a graph to be Hamiltonian: it must be connected, have no cut vertices, and have a minimum degree of 2. Complete graphs with 3 or more vertices and some bipartite graphs satisfy the conditions to be Hamiltonian.

Uploaded by

Rahul Maurya
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)
285 views

Hamiltonian Graphs

Hamiltonian graphs are named after mathematician William Rowan Hamilton. A Hamiltonian graph contains a Hamiltonian cycle, which is a cycle that visits each vertex exactly once. There are several conditions for a graph to be Hamiltonian: it must be connected, have no cut vertices, and have a minimum degree of 2. Complete graphs with 3 or more vertices and some bipartite graphs satisfy the conditions to be Hamiltonian.

Uploaded by

Rahul Maurya
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/ 22

To go everywhere, but only

once

Hamiltonian
graphs

A MAT-2002 GROUP ACTIVITY


1
PRESENTATION
2

Group 10
Members
Smriti Dwivedi (21BCY10189)
K Lokesh Pavan Kumar (21BCY10187)
Rahul Shashikant Maurya (21BCY10192)
S Yohid Althaf (21BCY10242)
Sarthak Nalamwar (21BCY10252)
Sourav Dutta (21BHI10002)
Introduction

What IS a
Hamiltonian Graph
History

Hamiltonian paths and cycles are named after


William Rowan Hamilton who invented the icosian
game, now also known as Hamilton's puzzle, which
involves finding a Hamiltonian cycle in the edge
graph of the dodecahedron. Hamilton solved this
problem using the icosian calculus, an algebraic
structure based on roots of unity with many
similarities to the quaternions (also invented by
Hamilton). This solution does not generalize to
arbitrary graphs.

INTRODUCTION & HISTORY 3


What IS a Hamiltonian Graph
Hamiltonian graph - A connected graph G is called
Hamiltonian graph if there is a cycle which
includes every vertex of G and the cycle is called
Hamiltonian cycle. Hamiltonian walk in graph G is a
walk that passes through each vertex exactly
once.

Dirac's Theorem - If G is a simple graph with n


vertices, where n ≥ 3 If deg(v) ≥ {n}/{2} for each
vertex v, then the graph G is Hamiltonian graph.

Ore's Theorem - If G is a simple graph with n


vertices, where n ≥ 2 if deg(x) + deg(y) ≥ n for each
pair of non-adjacent vertices x and y, then the
graph G is Hamiltonian graph.

INTRODUCTION & HISTORY 4


Definitions
Definition of a Hamiltonian Path
a Hamiltonian path (or traceable path) is a path in an undirected or directed
graph that visits each vertex exactly once.
All hamiltonian cycles are hamiltonian paths but not all hamiltonian paths are
hamiltonian cycles.

Definition of a Hamiltonian Cycle


A Hamiltonian cycle or a Hamiltonian circuit, is a cycle that visits
each vertex exactly once.

Definition of a Hamiltonian Graph


A graph that contains a Hamiltonian cycle is called a Hamiltonian graph.

DEFINITIONS AND CONDITIONS 5


Conditions
Strict conditions- Hamiltonian Graphs:
1. Must be a connected graph
2. Must not have any cut vertex
3. Every vertex must have atleast degree 2
4. All complete graphs with atleast 3 verticies are hamiltonian
5. For a bipartite graph K(m,n) m=n and m>=2

Sufficient conditions- Hamiltonian Graphs


1. Ores theorem: Summation of the degrees of any two
non adjacent verticies must be greater than or equal to
the degree of the graph.
2. Dirac's theorem: if a graph's degree is greater than or equal to 3 and every vertex has a
degree greater than
or equal to half the degree of the graph then the graph is Hamiltonian.

DEFINITIONS AND CONDITIONS 6


Special Cases of
Hamiltonian Graphs

By now we must have


understood the
differences of
Hamiltonian Paths,
Circuits and Graphs
All Hamitonian Circuits have a Hamiltonian Path
but not all Hamiltonian Paths have a Hamiltonian
Circuit.

And a Hamiltonian Graphs will always contain


both, a Hamiltonian Circuit and a Hamiltonian Path

CASES OF HAMILTONIAN GRAPH, PATHS


7
AND CIRCUITS
CASES OF HAMILTONIAN GRAPHS,
8
PATHS AND CIRCUITS

When a graph has a


Hamiltonian Circuit
In a Graph G(V,E) having Hamiltonian Path v0, v1.......vn
when VnV0 ∈ E, the graph has a Hamiltonian Circuit.
The given graph is also said to be Hamiltonian.
Examples
1. A Complete Graph Kn with n > 2 is always a Hamiltonian
Circuit (see Fig.)
This is from the definition of a complete graph: an
undirected, simple graph such that every pair of nodes

is connected by a unique edge.


It also abides The Ore's Theorem which we will discuss
Fig. A Complete Graph

later.

CASES OF HAMILTONIAN GRAPHS,


9
PATHS AND CIRCUITS

When a graph has a


Hamiltonian Circuit

2. In this Figure we can see that a Hamiltonian path abcde


exists.
But this path does not lead to a Hamiltonian Circuit.
But if the start from a vertex like e or b, we can get a
Hamiltonian Circuit.
Taking
the path ecdbae , We now have a Hamiltonian
Fig.
Circuit.

Fig. Another Example. of a


Hamiltonian Graph
CASES OF HAMILTONIAN GRAPHS, 10
PATHS AND CIRCUITS

When a graph has a


Hamiltonian Path Only
We also have Cases where solely a Hamiltonian Path
exists. This happens when in a Graph G(V,E) in the
Hamiltonian Path V0, V1....... Vn, VnV0 ∉ E. In these
Cases the Graph is not Hamiltonian because there is no
Hamiltonian Circuit
A graph "may" also not be Hamiltonian when the graph
does not follow Dirac or Ore's Theorem.
Example
1. The given Fig. does not have a Hamilton Cycle.
There is only Hamiltonian path which cannot be
completed into a Hamiltonian Circuit because for that c
needs to be traversed twice which must not happen.
SEPARATING FACT FROM FICTION 11

When There is a
Hamiltonian Path Only
1. Graph containing a vertex of degree 1.
When there exists a Graph with a vertex of Degree 1,
there can exist a Hamiltonian path but there cannot be
a Hamiltonian circuit because the vertex is not
connected to a unique vertex not in the Hamiltonian
path.
In the given Figures, there cannot be a Hamiltonian
Circuit Due to there being a vertex of Degree 1.
These Graphs also do not obey Ore's/ Dirac's Theorem.
Fig. Graphs with vertex of Degree 1.
When a graph doesnt
have a Hamiltonian path

There exist a lot of graphs that do not even


have a Hamilltonian path simply because
there are some vertices that are not
accessible due to lack of edges to traverse
while obeying the law of the Hamiltonian Path.
Examples
1. In this given Figure no Hamiltonian Path exists.
This is because not all points in this Graph are
accessible. If A and D were connected, a path
would haaave been possible, but that isnt the
case

CASES OF HAMILTONIAN GRAPHS,


PATHS AND CIRCUITS 12
When a graph doesnt
have a Hamiltonian path

1. Graphs with multiple vertices of Degree 1.


In graphs were there are multiple vertices of
Degree 1, no Hamiltonian path can exist
because there will always be a vartex that
cannot be traversed without coming accross
a vertex twice.
In the given figures, we can see that there is a
point that cannot be accessed without
travelling a vertex twice which disobeys the
law of Hamiltonian Path.

Fig. Grapha with multiple vertices of of Degree 1

CASES OF HAMILTONIAN GRAPHS,


PATHS AND CIRCUITS 13
Ore's
Theorem

Ore's Theorem :
statement : if G is a simple graph with 'n' vertices
(n>=3) such that for every pair of non adjacent
vertices u and v, deg(u) + deg(v) >= n .
where n is the number of vertices in graph G .

The proposition here is "if G doesn't contain a


Hamiltonian path then it is possible to add more
edges to G without creating a Hamilton cycle."

ORE'S THROEREM 14
Proof of Ore's Theorem

I got started by separating two cases where G doesn't contain a Hamiltonian


path; (1)G contains a path which omits at least one vertex. (2)G contains a walk
which goes through every vertex but at least one vertex is repeated.

By construction G is the graph with the most possible edges that does not
contain a Hamiltonian cycle. This means that adding another edge anywhere
will create a Hamiltonian cycle. Recall that a path is just one edge from a cycle
- in a path the beginning and ending nodes are distinct but otherwise. So a
Hamiltonian path is just one edge from a Hamiltonian cycle.

ORE'S THROEREM 15
Proof of Ore's Theorem

If G did not contain a Hamiltonian path, then you could keep adding edges until you created a
Hamiltonian path (or multiple Hamiltonian paths), so G would not be the graph with the most
possible edges.

Don't think about walks. There are an infinite number of possibilities for walks - they will just
confuse you.

Suppose that G does not contain a Hamilton path ⟨v1,…,vn⟩. Let P=⟨v1,…,vm⟩ be a maximal
Hamilton path in G, and let v be any vertex of G not in the path P. Add the edge {vm,v} to G,
and call the resulting graph G′. G′ has the same vertex set as G, and it still satisfies (1) of the
ProofWiki article. Moreover, G′ has no Hamilton circuit: such a circuit would necessarily contain
the new edge, and removing that edge would leave a Hamilton path in G, which we assumed
does not exist. Finally, G′ has one more edge than G, which contradicts the choice of G as a
counterexample with the maximum number of edges among all counterexamples on n
vertices.

ORE'S THROEREM 16
Dirac's Theorem
DIRAC’S THEOREM: Let G be a graph of order p ≥ 3. If deg v ≥ p/2 for every vertex v of G, then G is
hamiltonian.
Proof. If p = 3, then the condition on G implies that G ≅ k3 and hence G is hamiltonian. We may assume,
therefore, that p ≥ 4.
Let P : v1, v2, ....... vn be a longest path in G . Then every neighbour of v1 and every neighbour of vn is on P.

Otherwise, there would be a longer path than P.


Consequently, n ≥ 1 p/2 .
There must be some vertex vi where 2 ≤ i ≤ n, such that v1 is adjacent to vi and vn is adjacent to v-1. If this
were not the case, then whenever v1 is adjacent to a vertex vi, the vertex vn is not adjacent to vi –1.
Since atleast p/2 of p – 1 vertices different from vn are not adjacent to vn.
Hence, deg vn ≤ (P – 1) – p/2 < p/2 , which contradicts the fact that deg vn ≥ p/2 .
Therefore as we claimed, there must be a vertex vi adjacent to v1 and vi – 1 is adjacent to vn

DIRAC'S THEOREM 17
We now see that G has cycle C : v1, vi, vi 1, ...... vn – 1, vn, vi – 1, vi – 2, ......, v2, v1 that contains all the vertices of
P. If C contains all the vertices of G (if n = p) then C is a hamiltonian cycle, and the proof. Otherwise, there is
some vertex u of G that is not on C.
By hypothesis, deg u ≥ p/2. Since P contains at least 1 p/2 vertices, there are fewer than p/2 vertices not on
C ; so u must be adjacent to a vertex v that lies on C.
However, the edge uv plus the cycle C contain a path whose length is greater than that of P, which is
impossible. Thus C contains all vertices of G and G is hamiltonian. Hence the proof.
Let G be a graph with p-vertices. If deg v ≥ (p-1)/2 for every vertex v of G then G contains a hamiltonian
path.
Proof. If p = 1 then G ≅ k1 and G contains a (trivial) Hamiltonian path. Suppose then that p ≥ 2 and define
H=G k1.
Let v denote the vertex of H that is not in C. Since H has vertex p 1, it follows that deg v ≥ p. Moreover, for
every vertex u of G,

DIRAC'S THEOREM 18
By Dirac’s theorem, H contains a hamiltonian cycle C. By removing the vertex v from C, we obtain a
hamiltonian path in G.
Hence the proof.
Theorem: Let G be a simple graph with n vertices and let u and v be an edge. Then G is hamiltonian if and
only if G uv is hamiltonian.
Proof. Suppose G is hamiltonian. Then the super graph G uv must also be hamiltonian. Conversely, suppose
taht G uv is hamiltonian. Then if G is not hamiltonian. i.e., if G is a graph with p ≥ 3 vertices such that for all
non adjacent vertices u and v, deg u deg v ≥ p.
We obtain the inequality deg u deg v < n.
However by hypothesis, deg u deg v ≥ n.
Hence G must be hamiltonian.

DIRAC'S THEOREM 19
APPLICATION OF HAMILTONIAN 20
GRAPHS

Application of
Hamiltonian Graphs

It is used in various fields such as Computer Graphics, electronic circuit


design, mapping genomes, and operations research.
A very simple application is planning bus route to pick up students (node
-> student, road-> edges, bus path-> Hamiltonian path)
It is used in genome mapping to combine many tiny fragments of genetic
code.
This application involves stripification of triangle meshes in computer
graphics — a Hamiltonian path through the dual graph of the mesh (a graph
with a vertex per triangle and an edge when two triangles share an edge)
can be a helpful way to organize data and reduce communication costs.
APPLICATION OF HAMILTONIAN 21
GRAPHS

In a much less complex application of exactly the same math, school


districts use Hamiltonians to plan the best route to pick up students from
across the district. Here students may be considered nodes, the paths
between them edges, and the bus wishes to travel a route that will pass
each students house exactly once.
A traveling salesman is supposed to visit a number of cities (nodes in a
graph) and minimize the travel time so he can determine the route by using
hamiltion graph.

Fig. Travelling salesman Problem


HAMILTONIAN GRAPHS 21

Thank you.

You might also like