Module 6 Exercise 3.1
Module 6 Exercise 3.1
: 307
GED102-B11
MODULE 6 EXERCISE 3.1
For each item, draw the corresponding graph and draw conclusions as required.
1. For each given graph, find two Hamiltonian cycles with different sums of
weights.
Solution
C-E-D-B-A-F-C = 22 + 12 + 20 + 18 + 14 + 9 = 95
C-A-F-B-D-E-C = 7 + 14 + 15 + 20 + 12 + 22 = 90
Solution
F-E-G-D-C-B-A-F = 28 + 27 + 38 + 45 + 36 + 54 + 36 = 264
F-D-G-E-A-B-C-F = 32 + 38 + 27 + 42 + 54 + 36 + 41 = 270
2. Use the Greedy and Edge-Picking algorithms to find the Hamiltonian cycle
with the least total weight in the complete graph shown below.
Solution
Using the Greedy Algorithm:
B-E-D-F-C-A-B
Sum of weights: 21 + 26 + 45 + 60 + 72 + 33 = 257
Using the Edge-Picking Algorithm:
Order of Edge Edge Weight
1st B-E 21
2nd E-D 26
3rd D-F 45
4th F-C 60
5th C-A 72
6th A-B 33
Total weight 257
Solution
Using the Greedy Algorithm:
Store-B-D-A-C-Store
Sum of Weights: 7 + 14 + 15 + 8 + 25 = 69
Using the Edge-Picking Algorithm:
Order of Edge Edge Weight
1st Store-B 7
2nd B-D 14
3rd D-A 15
4th A-C 8
5th C-Store 25
Total time 69