View
231
Download
0
Category
Preview:
Citation preview
7/23/2019 Hamiltonian Circuits
1/89
Hamilton CircuitTopics in Contemporary MathematicsMA 103
Summer II, 2013
1
7/23/2019 Hamiltonian Circuits
2/89
In Euler paths and Euler circuits, thegame was to find paths or circuitsthat include every edge of the graph once (andonly once).
In Hamilton paths and Hamilton circuits, the game is to find pathsand circuits that include every vertex of the graph once and only once.
Hamilton Paths and Hamilton Circuits2
7/23/2019 Hamiltonian Circuits
3/89
! A Hamilton pathin a graph is a path
that includes each vertex of the graph
once and only once.! A Hamilton circuit is a circuit that
includes each vertex of the graph
onceand only once. (At the end, ofcourse, the circuit must return to the
startingvertex.)
HAMILTON PATHS & CIRCUITS
3
7/23/2019 Hamiltonian Circuits
4/89
The figure shows a graph that
(1)has Euler circuits (the vertices are
all even) and
(2)
has Hamilton circuits.
Example 1 Hamilton versus Euler
One suchHamilton circuit is A,
F, B, C, G, D, E, A there are
plenty more.
4
7/23/2019 Hamiltonian Circuits
5/89
Note that if a graph has aHamilton circuit, then it
automatically has a Hamilton path(the Hamilton circuitcan always be truncated into a Hamilton path bydropping the last vertex of the circuit.)
For example, the Hamilton circuit A, F, B, C, G, D, E, Acan be truncated into the Hamilton path A, F, B, C, G, D, E.
Contrast this with the mutually exclusive relationship
between Euler circuits and paths:If a graph has anEuler circuit it cannot have an Euler path and vice versa.
Example 1 Hamilton versus Euler5
7/23/2019 Hamiltonian Circuits
6/89
This figure shows a graph that
(1)has no Euler circuits but does have Euler paths (for
example C, D, E, B, A, D) and
(2)has no Hamilton circuits (sooner or later you have to go to
C, and then you are stuck) but does have Hamilton paths (forexample, A, B, E, D, C).
Example 1 Hamilton versus Euler
This illustrates that a graph can
have aHamilton path but no
Hamilton circuit!
6
7/23/2019 Hamiltonian Circuits
7/89
This figure shows a graph that
(1)has neither Euler circuits nor paths (it has four odd
vertices) and
(2) has Hamilton circuits (for example A, B, C, D, E, A
there are plenty more)
Example 1 Hamilton versus Euler
and consequently has
Hamilton paths (for example, A,
B, C, D, E).
7
7/23/2019 Hamiltonian Circuits
8/89
This figure shows a graph that(1) has no Euler circuits but hasEuler paths (F and G are the twoodd vertices) and
(2) has neither Hamilton circuitsnor Hamilton paths.
Example 1 Hamilton versus Euler8
7/23/2019 Hamiltonian Circuits
9/89
This figure shows a graphthat
(1) has neither Euler circuits nor
Euler paths (too many oddvertices) and
(2) has neither Hamilton circuits
nor Hamilton paths.
Example 1 Hamilton versus Euler9
7/23/2019 Hamiltonian Circuits
10/89
The lesson of Example 1 is that the existence of anEuler path or circuit in a graph tells us nothing aboutthe existence of a Hamilton path or circuit in thatgraph.
Euler versus Hamilton10
7/23/2019 Hamiltonian Circuits
11/89
Unlike Euler circuit and path, there exist noHamiltoncircuit and path theoremsfor determining if a graph has
a Hamilton circuit, a Hamilton path, or neither.
Determining when a given graph does or does nothave a Hamilton circuit or path can be very easy, butit also can be very hardit all depends on the graph.
Euler versus Hamilton11
7/23/2019 Hamiltonian Circuits
12/89
Sometimes the question,Does the graph have a
Hamilton circuit? has an obviousyesanswer, and the
more relevant question turns out to be,How many
different Hamilton circuits does it have?
In this section we will answer this question for an
important family of graphs called complete graphs.
How Many Hamilton Circuits?12
7/23/2019 Hamiltonian Circuits
13/89
Complete Graph
A graph with Nvertices in which every pair of
distinct vertices is joined by an edge is called
a complete graph on N vertices and is denoted by
the symbolKN
.
13
7/23/2019 Hamiltonian Circuits
14/89
One of the key properties of KNis that every vertex has
degree N 1.
This implies that the sum of the degrees of all the
vertices isN(N 1), and it follows from Eulers sum
of degrees theorem that the number of edges inKNis
N(N 1)/2.
For a graph withNvertices and no multiple edges orloops,N(N 1)/2 is the maximum number of edges
possible, and this maximum can only occur when the
graph isKN.
How Many Hamilton Circuits?14
7/23/2019 Hamiltonian Circuits
15/89
! KNhas N(N 1)/2edges.
! Of all graphs with Nvertices and no
multiple edges or loops, KNhas the
most edges.
NUMBER OF EDGES IN KN
Because KNhas a complete set of edges (every
vertex is connected to everyother vertex), italso has a complete set of Hamilton circuits
you can travel thevertices in any sequence you
choose and you will not get stuck.
15
7/23/2019 Hamiltonian Circuits
16/89
!" $% &'()%* &+% ",-' )%'./%0 ," !123 (3 ('42&'('5 ,'6%'7
$% 8%& ( 9(:2*&,3 ;(&+< "#$ &'()*+&, -, ., /, 0 12 (3()1+4#5 *(46 7"189 :(;
7/23/2019 Hamiltonian Circuits
17/89
=(/+ ," &+%0% 9(:2*&,3 ;(&+0 /(3 4% /*,0%6 23&, (
9(:2*&,3 /2'/-2&>46& *(46 -, ., /, 0 >&8&42 46& @1$@A14 -,., /, 0, - 7"189 :@;&8&42 46& @1$@A14/, -, ., 0, / 7"189 :?;
7/23/2019 Hamiltonian Circuits
18/89
!& *,,?0 *2?% $% +()% (3 (4-36(3/% ," 9(:2*&,3/2'/-2&07 4-& 2& 20 2:;,'&(3& &, '%:%:4%' &+(& &+%0(:% 9(:2*&,3 /2'/-2& /(3 4% $'2@%3 23 :(35$(509 "#$ &'()*+&, -, ., /, 0, - 12 46& 2()& @1$@A14
(2 ., /, 0, -, .>&+% A8-'% 6%0/'24%0 %2&+%' ,3%>46& #5+B ?1C&$&5@& 12 46(4 15
Example 2 Hamilton Circuits in K4
46& D$24 @(2& E& A2&? - (246& $&F&$&5@& *#154= 15 46&
2&@#5? @(2& E& A2&? . (246& $&F&$&5@& *#1549
18
19
7/23/2019 Hamiltonian Circuits
19/89
There are two additional sequences that describe this
same Hamilton circuit: D, B, C, A, D (with reference pointD) and B, C, A, D, B (with reference point B). Taking allthis into account, there are six different Hamilton
Example 2 Hamilton Circuits in K4
circuits inK4, as shown in theTable on the next slide (thetable also shows the fourdifferent ways each circuit can
be written).
19
20
7/23/2019 Hamiltonian Circuits
20/89
Example 2 Hamilton Circuits in K420
21
7/23/2019 Hamiltonian Circuits
21/89
Lets try to list all the Hamilton circuits in K5.
For simplicity, we will write eachcircuit just once, using a commonreference point say A. (As long as we are consistent, it doesnt reallymatter which reference point wepick.)
Each of the Hamilton circuits will be described bya sequence that startsand ends with A, with the letters B,C, D, and E sandwiched in between
in some order.
Thereare 4 !3 !2 !1 = 24 different ways to shuffle the letters B, C,D, and E, each producing a different Hamiltoncircuit.
Example 2 Hamilton Circuits in K521
22
7/23/2019 Hamiltonian Circuits
22/89
B+% /,:;*%&% *20& ," &+% C1 9(:2*&,3 /2'/-2&0 23 !D20
0+,$3 23 &+% &(4*% ,3 &+% 3%E& 0*26%< B+% &(4*% 20 *(26 ,-&0, &+(& %(/+ ," &+% /2'/-2&0 23 &+% &(4*% 20 62'%/&*5
,;;,02&% 2&0 :2'','F2:(8% /2'/-2& G&+% /2'/-2& $2&+
)%'./%0 *20&%6 23 '%)%'0% ,'6%'H&$ (22#@1(4&? E146 &(@6&?8& :@(++&? 46& E&1864 #F 46& &?8&;#$ (+8#$146) 12 (5 &c@1&54(+8#$146)#$ (+8#$146)
12 46(4 14 12 5#4 (5 #*M)(+ (+8#$146)< !3 =E(:;*% D7 &+%1%+"%2$&1%.-/!("&,-' +(6 ( /,0& ," deeP7 $+%'%(0 &+%#*M)(+ 4#A$+(6 ( /,0& ," dfef&9
Cheapest-Link Algorithm
Cheapest Link Algorithm
7/23/2019 Hamiltonian Circuits
68/89
\,3& $,''5 2" &+(& %68% 20 3,& (6k(/%3& &, &+% A'0& %68%&+% )%'./%0.7 -7 (36 T$,-*6 ",':
( 0:(** /2'/-2&7 :(?238 2&
Example 7 A Tour of Five Cities: Part 4
2:;,0024*% &, ",': (
9(:2*&,3 /2'/-2& (& &+%%36< R, $% ;-& ( 6,3,& -0%:('? ,3.T#$ (+8#$146) 12 46&21)*+&24 #F (++ 46& (+8#$146)2 E& +&($5&?9 W4($M58 F$#)
. E& 8# 4# X, 46&5 4# G, 46&5 4# 3, 46&5 4# h, 46&5 4# i,46&5 4# H, (5? D5(++B >(@[ 4# .9
B+% 3%('%0&F3%28+4,' &,-' G.7 X7 G7 37 h7 i7 H7.$2&+ (&,&(* *%38&+ ," CL7`LL :2*%0H 20 0+,$3 ,3 &+% 3%E& &$,0*26%0< GQ% ?3,$ &+(& $% /(3 '%;%(& &+20 :%&+,6 -0238
62N%'%3& 0&('.38 ;,23&07 4-& $% $,3l& 4,&+%' $2&+ &+(&(& &+20 .:%
7/23/2019 Hamiltonian Circuits
86/89
6%+"%2$ 1%.-/!("7.7 X7 G7 37 h7 i7 H7.$2&+ ( &,&(**%38&+ ," CL7`LL :2*%0( 32/% &-'3 ," %)%3&0< N## >(? E& @(54
@#A54 #5 4612 6(**&5158 #5 ( )#$& @#52124&54 >(212S
p
Recommended