13Hamiltonian_10_v2

13Hamiltonian_10_v2 - ENGG1007 Foundations of Computer...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
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
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
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)
Background image of page 2
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 (1-2, 2-3, 3-4, 4-5, 5-1), middle (1-6, 2-7, 3-8, 4-9, 5-10), internal (6-8, 8-10, 10-7, 7-9, 9-6). 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
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
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
Background image of page 4
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.
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
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: (round-the-world puzzle)
Background image of page 6
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.
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 22

13Hamiltonian_10_v2 - ENGG1007 Foundations of Computer...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online