Module 10 Assignment - Problems
G180 Module 10 Assignment
Use the following graph for problems 1 and 2.
For the weighted graph given above, use the Brute Force Algorithm to find an optimal Hamilton Circuit stating at vertex D. Make sure to list all of your steps!
Using the nearest-neighbor algorithm on the weighted graph above, provide the resulting Hamilton circuit depending on the starting vertex given below.
Using a starting vertex of A.
Using a starting vertex of B.
Which algorithm will always result in an optimal solution? Why? What are the benefits of the other algorithm?
Suppose you are planning a trip around the world. Below is a table of the distances (in miles) between the cities you want to visit. Assume that you will start and end your trip in New York City.
New York | London | Shanghai | Istanbul | Moscow | CancĂșn | |
New York | 3459 | 7364 | 5030 | 4700 | 3391 | |
London | 3459 | 5715 | 1555 | 1560 | 4944 | |
Shanghai | 7364 | 5715 | 4960 | 4235 | 8354 | |
Istanbul | 5030 | 1555 | 4960 | 1090 | 6491 | |
Moscow | 4700 | 1560 | 4235 | 1090 | 6209 | |
CancĂșn | 3391 | 4944 | 8354 | 6491 | 6209 |
Find the nearest-neighbor tour with New York as the starting city.
Find the nearest-neighbor tour with Moscow as the starting city.
Find the total weight of both tours.