This preview shows pages 1–8. Sign up to view the full content.
1
ENGG1007
Foundations of Computer Science
Graphs
Graphs
Hamiltonian Graphs
Hamiltonian Graphs
Professor Francis Chin, Dr SM Yiu
November 11/12, 2010
Chapter 9.5
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document 2
ENGG1007
FCS
Word Puzzle
Word Puzzle
Given these words:
CAR, CUB, DIM, HEN, HUT, MOB, RED, SAW, SON, WIT.
The task is to arrange these words in a closed
chain such that any two adjacent words
must share a common letter.
The right list is correct except RED and SON.
This can be reduced to a graph problem.
V = set of words
Two words are connected by an edge
if they share a common letter.
This results the Patersen Graph.
The problem is to find a circuit which visits
every vertex exactly once.
(Hamiltonian Circuit)
3
ENGG1007
FCS
Patersen Graph
Patersen Graph
The Petersen graph (10 vertices and 15 edges)
does not have Hamiltonian circuits.
Why?
Split the edges into three groups:
external (12, 23, 34, 45, 51),
middle (16, 27, 38, 49, 510),
internal (68, 810, 107, 79, 96).
A Hamiltonian circuit, comprising 10 edges,
contain at least 4 edges in one of the groups.
External group
:
not possible to have 5 HC edges
not possible to have 4 HC edges,
as a HC cannot exist (see the figure).
1
2
3
4
5
6
7
8
9
10
1
2
3
4
5
6
7
8
9
10
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document 4
ENGG1007
FCS
Patersen Graph (continue)
Patersen Graph (continue)
Middle group
:
not possible to have 5 HC edges
not possible to have 4 HC edges,
as a HC cannot exist (see the figure).
Internal group:
not possible to have 5 edges
not possible to have 4 HC edges,
as a HC cannot exist (see the figure).
1
2
3
4
5
6
7
8
9
10
1
2
3
4
5
6
7
8
9
10
5
ENGG1007
FCS
Word Puzzle
Word Puzzle
Let this list of words
HEN, HUT, WIT, SAW, CAR,
CUB, MOB, DIM, RED, SON.
be replaced HUT and SON
by HOT and SUN.
Then we can arrange the words
in a closed chain, i.e, there
exists a Hamiltonian circuit for
the graph on the right.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document 6
ENGG1007
FCS
Hamiltonian Paths and Circuits
Hamiltonian Paths and Circuits
A
Hamiltonian path
Hamiltonian path
is a path containing every
vertex
once
and only once.
A
Hamiltonian circuit
Hamiltonian circuit
is a circuit containing every vertex
once and only once.
Example:
(roundtheworld puzzle)
7
ENGG1007
FCS
Existence of Hamiltonian Paths
Existence of Hamiltonian Paths
Unlike Euler paths/circuits, there is no simple condition to
check whether a graph has a Hamiltonian path/circuit.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview. Sign up
to
access the rest of the document.
This note was uploaded on 02/10/2011 for the course ENGG 1007 taught by Professor Unknown during the Spring '11 term at HKU.
 Spring '11
 Unknown
 Computer Science

Click to edit the document details