Professional Documents
Culture Documents
TH 1 - 202057019 - Arif Ardiyansah
TH 1 - 202057019 - Arif Ardiyansah
Nim : 202057019
Take Home
The network in Figure 1 gives the distances in miles between pairs of cities 1, 2, …, and 8. Use
Dijkstra’s algorithm to find the shortest route between the following cities:
a. Cities 1 and 7.
b. Cities 1 and 6.
c. Cities 4 and 8.
d. Cities 2 and 7.
Jawab :
JAWABAN A DAN B
Iterasi 1
Iterasi 3
Iterasi 5
Iterasi 7
Iterasi 1
Iterasi 2
Iterasi 4
Iterasi 1
Iterasi 2
Iterasi 4
Iterasi 6
Jadi, rute terpendek dari kota 2 ke kota 7 adalah 2-5-7 atau 2-3-5-7 dengan total
jarak sejauh 9 mil
2. Dibandingkan dengan metode Djikstra, apa keunggulan dan kelemahan metode Floyd?
Jawab :
1.
2.