Apply the Travelling Salesman Algorithm on the following Graph below. Find the shortest path that a salesman should take to traverse through a list of cities and return to the origin city. The list of cities and the distance between each pair are provided. Show All steps necessary to get the shortest path. Follow the example presented during class. Traveling Salesman Problem 3 2 3 4 2 2 3 2 1 1 4 5 3 5 4
Added by Kristine S.
Close
Step 1
The matrix will look like this: | 1 | 2 | 3 | ---------------- 1 | 0 | 3 | 2 | ---------------- 2 | 3 | 0 | 5 | ---------------- 3 | 2 | 5 | 0 | Show more…
Show all steps
Your feedback will help us improve your experience
Ivan Kochetkov and 91 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Given a list of cities and their pair wise distances, the task is to find a shortest possible tour that visits each city exactly once. A salesman has to visit five cities A, B, C, D and E. The distances (in hundred kilometers) between the five cities are shown in the following Table: If the salesman starts from city A and has to come back to city A. Use a new Alternate Method of an assignment problem to find out, which route should he selects so that the total distance traveled becomes minimum.
Donna D.
Apply Dijkstra's algorithm to find the shortest path (in mileage) between Boston and Los Angeles. (Show the progress and the result obtained by this algorithm at each step) [5 marks] Use part(a) to find the shortest path (in mileage) between Boston and San Francisco. [2 marks] Suppose that the mileage separating Boston and Atlanta is equal to 656. Write an adjacency matrix of the weighted graph showing the mileage between the four cities Boston Chicago New York and Atlanta. [3 marks] Construct a tree to find a route with the least total mileage for a traveling salesman departing from Boston and wishing to visit Chicago, New York and Atlanta before returning back to Boston. [5 marks]
Sri K.
Nick J.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Watch the video solution with this free unlock.
EMAIL
PASSWORD