13Hamiltonian_10_v2

# 13Hamiltonian_10_v2 - ENGG1007 oundations of Computer...

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

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

View Full Document

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

View Full Document

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

View Full Document

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.

Unformatted text preview: ENGG1007 oundations of Computer Science Foundations of Computer Science Graphs Graphs Hamiltonian Graphs Hamiltonian Graphs Professor Francis Chin, Dr SM Yiu November 11/12, 2010 Chapter 9.5 1 ENGG1007 FCS ord Puzzle ord Puzzle Word Puzzle Word Puzzle Given these words: AR CUB DIM HEN HUT MOB RED SAW SON WIT 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 ust share a common letter 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 2 every vertex exactly once. (Hamiltonian Circuit) ENGG1007 FCS atersen Graph atersen Graph Patersen Graph Patersen Graph The Petersen graph (10 vertices and 15 edges) oes not have Hamiltonian circuits Why? 1 does not have Hamiltonian circuits. Why? Split the edges into three groups: external (1-2, 2-3, 3-4, 4-5, 5-1), 2 5 6 7 10 middle (1-6, 2-7, 3-8, 4-9, 5-10), internal (6-8, 8-10, 10-7, 7-9, 9-6). Hamiltonian circuit comprising 10 edges 3 4 8 9 A Hamiltonian circuit, comprising 10 edges, contain at least 4 edges in one of the groups. 1 External group : not possible to have 5 HC edges 2 5 6 7 8 9 10 3 not possible to have 4 HC edges, as a HC cannot exist (see the figure). 3 4 ENGG1007 FCS atersen Graph (continue) atersen Graph (continue) Patersen Graph (continue) Patersen Graph (continue) iddle group 1 Middle group : not possible to have 5 HC edges not possible to have 4 HC edges, 2 5 6 7 10 as a HC cannot exist (see the figure). 3 4 8 9 Internal group: ot possible to have 5 edges 1 6 not possible to have 5 edges not possible to have 4 HC edges, as a HC cannot exist (see the figure). 2 5 7 8 9 10 4 3 4 ENGG1007 FCS ord Puzzle ord Puzzle 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. 5 ENGG1007 FCS amiltonian Paths and Circuits amiltonian Paths and Circuits 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) 6 ENGG1007 FCS xistence of Hamiltonian Paths xistence of Hamiltonian Paths 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....
View Full Document

{[ snackBarMessage ]}

### Page1 / 22

13Hamiltonian_10_v2 - ENGG1007 oundations of Computer...

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

View Full Document
Ask a homework question - tutors are online