Download presentation
Presentation is loading. Please wait.
Published byIrene Elliott Modified over 8 years ago
1
Copyright © 2008 Pearson Education, Inc. Slide 13-1 Unit 13B The Traveling Salesman Problem
2
Copyright © 2008 Pearson Education, Inc. Slide 13-2 Hamiltonian Circuits A Hamiltonian circuit is a path that passes through every vertex of a network exactly once and returns to the starting vertex. The paths indicated by arrows in (a) and (b) are Hamiltonian circuits, while (c) has no Hamiltonian circuits. 13-B
3
Copyright © 2008 Pearson Education, Inc. Slide 13-3 The Traveling Salesman Problem 13-B Which path is a Hamilton circuit? a) b) c) d) A B C D
4
Copyright © 2008 Pearson Education, Inc. Slide 13-4 The Traveling Salesman Problem 13-B Which path is a Hamilton circuit? a) b) c) d) A B C D
5
Copyright © 2008 Pearson Education, Inc. Slide 13-5 Hamiltonian Circuits in Complete Networks The number of Hamiltonian Circuits in a complete network of order n is. 13-B The twelve Hamiltonian circuits for a complete network of order 5.
6
Calculating the Number of Hamiltonian Circuits Network of order 3: Network of order 4: Network of order 5: Network of order 6: Network of order 7: Copyright © 2008 Pearson Education, Inc. Slide 13-6
7
Copyright © 2008 Pearson Education, Inc. Slide 13-7 The Traveling Salesman Problem 13-B How many Hamilton circuits are possible in a complete network of order 8? a) 7!/2 b) 8!/2 c) 8! d) 9!/2
8
Copyright © 2008 Pearson Education, Inc. Slide 13-8 The Traveling Salesman Problem 13-B How many Hamilton circuits are possible in a complete network of order 8? a) 7!/2 b) 8!/2 c) 8! d) 9!/2
9
Copyright © 2008 Pearson Education, Inc. Slide 13-9 Solving Traveling Salesman Problems The solution to a traveling salesman problem is the shortest path (smallest total of the lengths) that starts and ends in the same place and visits each city once. 13-B
10
Copyright © 2008 Pearson Education, Inc. Slide 13-10 Five National Parks – Planning a Vacation 13-B
11
Copyright © 2008 Pearson Education, Inc. Slide 13-11 Hamiltonian Circuits and Five National Parks 13-B Map of the five national parks and a complete network representing the parks.
12
Copyright © 2008 Pearson Education, Inc. Slide 13-12 The circuit in (a) has a total length of 664 miles, while (b) has a total length of 499 miles. Hamiltonian Circuits and Five National Parks
13
Copyright © 2008 Pearson Education, Inc. Slide 13-13 The Nearest Neighbor Method 13-B Beginning at any vertex, travel to the nearest vertex that has not yet been visited. Continue this process of visiting “nearest neighbors” until the circuit is complete. The solution to the national park network using the nearest neighbor method starting at Bryce has a total length of 515 miles.
14
Copyright © 2008 Pearson Education, Inc. Slide 13-14 The Traveling Salesman Problem 13-B Starting at vertex A, which vertex would be the next one visited using the nearest neighbor algorithm? a) It doesn’t matter b) B c) C d) D AB CD 4 3 5 6 4 1
15
Copyright © 2008 Pearson Education, Inc. Slide 13-15 The Traveling Salesman Problem 13-B Starting at vertex A, which vertex would be the next one visited using the nearest neighbor algorithm? a) It doesn’t matter b) B c) C d)D Continue with the nearest Neighbor Algorithm AB CD 4 3 5 6 4 1
16
Copyright © 2008 Pearson Education, Inc. Slide 13-16 The Nearest Neighbor Method and the Traveling Salesman Problem 13-B Courtesy of Bill Cook, David Applegate and Robert Bixby, Rice University and Vasek Chvatal, Rutgers University. The near-optimal solution to finding the shortest path among 13,509 cities with populations over 500.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.