Unit 13B The Traveling Salesman Problem Copyright © 2008 Pearson Education, Inc. Slide 13-1 13-B 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. Copyright © 2008 Pearson Education, Inc. Slide 13-2 13-B The Traveling Salesman Problem Which path is a Hamilton circuit? A a) A B C D b) A B C D A D C B c) A B C A D d) A B C A Copyright © 2008 Pearson Education, Inc. Slide 13-3 13-B The Traveling Salesman Problem Which path is a Hamilton circuit? A a) A B C D b) A B C D A D C B c) A B C A D d) A B C A Copyright © 2008 Pearson Education, Inc. Slide 13-4 13-B Hamiltonian Circuits in Complete Networks The number of Hamiltonian Circuits in a complete network of order n is . The twelve Hamiltonian circuits for a complete network of order 5. Copyright © 2008 Pearson Education, Inc. Slide 13-5 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 13-B The Traveling Salesman Problem How many Hamilton circuits are possible in a complete network of order 8? a) 7!/2 b) 8!/2 c) 8! d) 9!/2 Copyright © 2008 Pearson Education, Inc. Slide 13-7 13-B The Traveling Salesman Problem How many Hamilton circuits are possible in a complete network of order 8? a) 7!/2 b) 8!/2 c) 8! d) 9!/2 Copyright © 2008 Pearson Education, Inc. Slide 13-8 Solving Traveling Salesman Problems 13-B 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. Copyright © 2008 Pearson Education, Inc. Slide 13-9 Five National Parks – Planning a Vacation Copyright © 2008 Pearson Education, Inc. 13-B Slide 13-10 Hamiltonian Circuits and Five National Parks 13-B Map of the five national parks and a complete network representing the parks. Copyright © 2008 Pearson Education, Inc. Slide 13-11 Hamiltonian Circuits and Five National Parks The circuit in (a) has a total length of 664 miles, while (b) has a total length of 499 miles. Copyright © 2008 Pearson Education, Inc. Slide 13-12 13-B The Nearest Neighbor Method 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. Copyright © 2008 Pearson Education, Inc. Slide 13-13 13-B The Traveling Salesman Problem Starting at vertex A, which vertex would be the next one visited using the nearest neighbor algorithm? a) It doesn’t matter 4 A B 3 b) B 5 c) C D d) D Copyright © 2008 Pearson Education, Inc. 6 1 4 C Slide 13-14 13-B The Traveling Salesman Problem Starting at vertex A, which vertex would be the next one visited using the nearest neighbor algorithm? a) It doesn’t matter 4 A B 3 b) B 5 c) C D d) D 6 1 4 C Continue with the nearest Neighbor Algorithm Copyright © 2008 Pearson Education, Inc. Slide 13-15 13-B The Nearest Neighbor Method and the Traveling Salesman Problem The near-optimal solution to finding the shortest path among 13,509 cities with populations over 500. Courtesy of Bill Cook, David Applegate and Robert Bixby, Rice University and Vasek Chvatal, Rutgers University. Copyright © 2008 Pearson Education, Inc. Slide 13-16
© Copyright 2026 Paperzz