Sei sulla pagina 1di 4

KIMURA, Yumi R.

ChE – 1 / A13
2019102775

Module 6: Exercise 3.1

For each item, draw the corresponding graph and draw conclusions a required.

1. For each given graph, find two Hamiltonian cycles with different sums of weights.

Hamiltonian Cycle no.1: A → C → E → D → B → F → A

Hamiltonian Cycle no. 2: A → B → D → E → C → F → A

Hamiltonian Cycle no.1: A → F → C → B → D → G → E → A

Hamiltonian Cycle no.2: G → D → C → F → A → E → B → G


2. Use the Greedy and Edge-Picking algorithms to find the Hamiltonian cycle with the

least total weight in the complete graph shown below.

Hamiltonian cycle: EB, BC, ED, DF, CA, AF

(E → B → C → A → F → D → E)

Total weight is

= 21 + 25 + 28 + 45 + 72 + 89

= 280

The path AF is the heaviest, we can replace ED by EA to have a better graph or

circuit. By doing so, we obtain…

EB, BC, EA, CD, DA

(E → B → C → D → A → E)

Total weight is

= 21 + 25 + 29 + 50 + 57

= 182

3. A food delivery personnel is tasked to deliver orders to four nearby buildings: A, B, C


and D. The table below shows the time (in minutes) for the delivery personnel to travel

from one building to another. Help the personnel to plan out an efficient route to deliver

the order at the least possible time.Use both the Greedy and Edge-Picking algorithms.

S A B C D
t
o
r
e
S - 2 7 2 1
t - 5 5 7
o -
r
e
A 2 - 2 8 1
5 - 0 5
-
B 7 2 -- 2 1
0 - 3 4
C 2 8 2 -- 2
5 3 - 4
D 1 1 1 2 --
7 5 4 4 -

Graph:
The greedy and edge-picking algorithms will have the same cycle:

Store → B → D → A → C → Store

Total time in minutes:

= 7 + 8 + 14 + 15 + 25

= 69

Potrebbero piacerti anche