Lesson 5.2. The Traveling Salesperson Problem. Explore This

Similar documents
Unit 7 Day 6. Section 5.2 Traveling Salesman Problem & Section 5.3 Finding the Shortest Route

Mathematical Thinking

Warm -Up. 1. Draw a connected graph with 4 vertices and 7 edges. What is the sum of the degrees of all the vertices?

6.2 Initial Problem. Section 6.2 Network Problems. 6.2 Initial Problem, cont d. Weighted Graphs. Weighted Graphs, cont d. Weighted Graphs, cont d

1. trees does the network shown in figure (a) have? (b) How many different spanning. trees does the network shown in figure (b) have?

IE 102 Spring Routing Through Networks - 1

Honors ICM- Graph Theory Unit 7 Homework Packet Homework Day 1

Study Guide Mods: Date:

1. Read each problem carefully and follow the instructions.

Chapter 6: The Mathematics of Touring

A path that visits every vertex exactly once is a Hamiltonian path. A circuit that visits every vertex exactly once is a Hamiltonian circuit.

MATH 103: Contemporary Mathematics Study Guide for Chapter 6: Hamilton Circuits and the TSP

The Travelling Salesman Problem

Finite Math A Chapter 6 Notes Hamilton Circuits

Section Hamilton Paths, and Hamilton Circuits. Copyright 2013, 2010, 2007, Pearson, Education, Inc.

The Traveling Salesman Problem Nearest-Neighbor Algorithm

Chapter 6. The Traveling-Salesman Problem. Section 1. Hamilton circuits and Hamilton paths.

SHORT ANSWER. Write the word or phrase that best completes each statement or answers the question.

The Traveling Salesman Problem (TSP) is where a least cost Hamiltonian circuit is found. CHAPTER 1 URBAN SERVICES

OPTIMIZATION 6 NETWORK. Optimization is the. Lessons. 1 Optimum Spanning Networks. 2 Scheduling Projects Using Critical Paths

What Time Where Muddy City 10 min MSTLessonPlan.docx MSTWorksheets.pptx Discussion 5 min MSTLessonPlan.docx

The Traveling Salesman Problem Brute Force Method

Chapter 14 Section 3 - Slide 1

Topics Covered. Introduction to Graphs Euler s Theorem Hamiltonian Circuits The Traveling Salesman Problem Trees and Kruskal s Algorithm

Midterm 1 : Correction. Friday, Feb. 23.

Real-World Applications of Graph Theory

1. The Highway Inspector s Problem


Notes for Recitation 9

Precept 4: Traveling Salesman Problem, Hierarchical Clustering. Qian Zhu 2/23/2011

Topic 10 Part 2 [474 marks]

14 Graph Theory. Exercise Set 14-1

11-5 Networks. Königsberg Bridge Problem

Undirected Network Summary

Section Hamilton Paths, and Hamilton Circuits. Copyright 2013, 2010, 2007, Pearson, Education, Inc.

Circuits and Paths. April 13, 2014

Optimal tour along pubs in the UK

Computer Science 385 Design and Analysis of Algorithms Siena College Spring Topic Notes: Brute-Force Algorithms

Introduction to Networks

A region is each individual area or separate piece of the plane that is divided up by the network.

MEI Further Mathematics Support Programme

Chapter 5 Review. 1. Write a summary of what you think are the important points of this chapter.

SEVENTH EDITION and EXPANDED SEVENTH EDITION

Chapter 5: Euler Paths and Circuits The Mathematics of Getting Around

Graphs. Reading Assignment. Mandatory: Chapter 3 Sections 3.1 & 3.2. Peeking into Computer Science. Jalal Kawash 2010

GRAPH THEORY AND LOGISTICS

Chapter 5: Euler Paths and Circuits The Mathematics of Getting Around

Crossing bridges. Crossing bridges Great Ideas in Theoretical Computer Science. Lecture 12: Graphs I: The Basics. Königsberg (Prussia)

Mathematics (JAN13MD0101) General Certificate of Education Advanced Subsidiary Examination January Unit Decision TOTAL

UTILIZATION OF GIS AND GRAPH THEORY FOR DETERMINATION OF OPTIMAL MAILING ROUTE *

10/30/2013. Chapter 7: The Mathematics of Networks. Network. Network. Network. Network. Optimal Network. 7.1 Networks and Trees

Traveling Salesman Problem. Algorithms and Networks 2014/2015 Hans L. Bodlaender Johan M. M. van Rooij

56:272 Integer Programming & Network Flows Final Exam -- December 16, 1997

Math for Liberal Arts MAT 110: Chapter 13 Notes

Exercise 1. D-ary Tree

MTH-129 Review for Test 4 Luczak

Lecture 1: An Introduction to Graph Theory

CPSC W2: Quiz 2 Sample Solutions

The Traveling Salesman Problem Outline/learning Objectives The Traveling Salesman Problem

Worksheet for the Final Exam - Part I. Graphs

Innovative Systems Design and Engineering ISSN (Paper) ISSN (Online) Vol.5, No.1, 2014

Travelling Salesman Problem. Algorithms and Networks 2015/2016 Hans L. Bodlaender Johan M. M. van Rooij

Math 3012 Combinatorial Optimization Worksheet

Unit graph theory UNIT 4

Introduction to Genetic Algorithms. Genetic Algorithms

Graphs And Algorithms

Week 12: Running Time and Performance

Spanning Tree. Lecture19: Graph III. Minimum Spanning Tree (MSP)

Lesson 4.2. Critical Paths

1 Euler Circuits. Many of the things we do in daily life involve networks, like the one shown below [Houston Street Map]. Figure 1: Houston City Map

Questions... How does one show the first problem is NP-complete? What goes on in a reduction? How hard are NP-complete problems?

CSC Design and Analysis of Algorithms. Lecture 4 Brute Force, Exhaustive Search, Graph Traversal Algorithms. Brute-Force Approach

New Versions of Adjacency The Traveling Salesman Problem Example V (5 Cities) Brute Force Algorithm & Permutations 48 State Capital Example Random

Lesson 18: There is Only One Line Passing Through a Given Point with a Given

When the boundaries or names of countries

val(y, I) α (9.0.2) α (9.0.3)

The Traveling Salesman Problem Outline/learning Objectives The Traveling Salesman Problem

The Traveling Salesman Problem

Electronically Filed - City of St. Louis - May 27, :02 PM

TSP! Find a tour (hamiltonian circuit) that visits! every city exactly once and is of minimal cost.!

PATH FINDING AND GRAPH TRAVERSAL

Street-Routing Problems

Chapter 1. Urban Services. Chapter Outline. Chapter Summary

CAP 4630 Artificial Intelligence

Section 3.4 Basic Results of Graph Theory

Approximation Algorithms

Chapter 4 Review. 1. Write a summary of what you think are the important points of this chapter. 2. Draw a graph for the following task table.

MAS 341: GRAPH THEORY 2016 EXAM SOLUTIONS

Undirected graphs and networks

Introduction to Computer Science

Design and Analysis of Algorithms

CSE 417 Branch & Bound (pt 4) Branch & Bound

Mathematics 504 CST. Mid-Year Examination January Question/Answer Booklet. Student's Name FOR TEACHER USE ONLY. Part A /24.

CS 440 Theory of Algorithms /

Module 6 NP-Complete Problems and Heuristics

11/22/2016. Chapter 9 Graph Algorithms. Introduction. Definitions. Definitions. Definitions. Definitions

Chapter 9 Graph Algorithms

Integer Programming. Xi Chen. Department of Management Science and Engineering International Business School Beijing Foreign Studies University

CHAPTER 10 GRAPHS AND TREES. Alessandro Artale UniBZ - artale/z

Condensed. Mathematics MD01. General Certificate of Education Advanced Subsidiary Examination June Unit Decision 1.

Transcription:

Lesson 5.2 The Traveling alesperson Problem In Lesson 4.5, you explored circuits that visited each vertex of your graph exactly once (Hamiltonian circuits). In this lesson, you will extend your thinking on this original problem and examine a type of problem known as a traveling salesperson problem (TP). These TPs involve finding a Hamiltonian circuit of minimum value such as time, distance, or cost. Optimization problems of this type are becoming increasingly important in the world of communications, warehousing, airlines networking, delivery truck routing, and building wiring. Explore This uppose you are a salesperson who lives in t. Louis. Once a week you have to travel to Minneapolis, hicago, and New Orleans and then return home to t. Louis. The graph in Figure 5.7 represents the trips that are available to you. The edges of the graph are labeled with the cost of each possible trip. For instance, the cost of making a trip from hicago to New Orleans is $910. When each edge of a graph is assigned a number (weight), the graph is called a weighted graph. The numbers associated with the edges often represent such things as distance, cost, or time. Minneapolis 400 hicago t. Louis 550 1,260 270 670 Figure 5.7. Graph of four cities with the costs of traveling between them. 910 New Orleans

242 hapter 5 More Graphs, ubgraphs, and Trees ince you own your own business, it is important that you minimize travel costs. To help save money, find the least expensive route that begins in t. Louis, visits each of the other cities exactly once, and returns to t. Louis. One way to solve the problem of finding the least expensive route in Figure 5.7 is to use the brute force method of listing every possible circuit, along with its cost. A tree diagram like the one in Figure 5.8 can help you list the possible routes. Inspection of the tree diagram shows that the optimal solution is the circuit, M,, N, or the circuit in reverse order, N,, M,. 400 1,260 550 270 400 910 670 M N N M N 1,260 910 M 910 910 1,260 1,260 400 400 N N M M 670 270 670 550 270 550 2,5 2,990 2,600 2,990 2,600 2,5 Figure 5.8. Tree diagram of every possible circuit from t. Louis to each of the other cities and back to t. Louis. olving the TP for four vertices is not too difficult or time-consuming because only six possibilities need to be considered. But as the number of vertices increases, so does the number of possible circuits. Hence, checking all possibilities soon becomes impractical, if not impossible. Even with the help of a computer that can do computations at the rate of 1 billion per second, it would take more than 19 million years for the computer to find the weights of every circuit for a graph with 25 vertices!

Lesson 5.2 The Traveling alesperson Problem 243 More Efficient Algorithms Is it possible that a faster, more efficient algorithm exists? You might try, for example, to begin at a vertex, look for the vertex nearest to your starting vertex, move to it, and continue until you complete the circuit. To explore this method for the graph in Figure 5.7 on page 241, begin at t. Louis, move to the nearest neighboring vertex (hicago), then to the nearest vertex not yet visited, and return to t. Louis when you have visited all of the other cities (270 + 400 + 1,260 + 670 = 2,600). This procedure is known as the nearest-neighbor algorithm. Although the solution was reached quickly, notice that in this case, it is not the best possible one. A method such as this, which produces a quick and reasonably close-to-optimal solution, is known as a heuristic method. The choice of method now becomes a trade-off. The brute force method of inspecting every possible path guarantees the best route but is prohibitively slow. The nearest-neighbor method is quick but does not necessarily produce the optimal solution. There is no known computationally efficient method of solving all traveling salesperson problems. But with the discovery of more and more efficient algorithms, hope has increased that better solutions will be forthcoming. These solutions to TPs are of great interest because they translate into savings of millions of dollars for certain areas of the economy. Point of Interest The current record-setting solution for a TP was set in 2006 when an optimal 85,900-city tour was found. In this problem, the cities represented locations on a customized computer chip, and finding the shortest possible movement of the laser equated to minimizing the cost production cost of the chip. The table below shows several TP milestones. TP MILETONE Year Number of ities 1954 49 1971 64 1975 80 1977 318 1987 2,392 1992 3,038 1998 13,509 2004 24,978 2006 85,900 According to William J. ook, the ultimate travel challenge is currently a 1,904,771-city problem that consists of every town, city, and village in the world.

244 hapter 5 More Graphs, ubgraphs, and Trees Exercises In Exercises 1 through 4, a. onstruct a tree diagram showing all possible circuits that begin at, visit each vertex of the graph exactly once, and end at. b. Find the total weight of each route. c. Identify the shortest circuit. d. Use the nearest-neighbor algorithm to find the shortest circuit. e. Does the nearest-neighbor algorithm produce the optimal solution? 1. 2. 10 D 20 20 B 61 B 10 3. 4. 10 52 133 D 75 68 10 5 10 B 5 D B 20 5 6 5 58 D 6 11 E 5. In a graph with 10 vertices, 9!, or 9 8 7 6 5 4 3 2 1, possible Hamiltonian circuits exist if the beginning vertex is known. a. Assume that a computer can perform calculations at the rate of 1 million per second. About how long will it take the computer to check 9! possibilities? What if the graph had 15 vertices (14! possible circuits)? b. According to a eptember 29, 2004 news report, the IBM BlueGene/L computer system can sustain speeds of 36 teraflops 36 trillion computations per second! How long will it take this new system to check a graph with 9! possible circuits? With 14! possible circuits? With 20! possible circuits?

Lesson 5.2 The Traveling alesperson Problem 245 6. Give two examples of a situation in which a solution to the traveling salesperson problem would be beneficial. 7. The following figure shows a circuit board and the distances in millimeters between holes that must be drilled by a drilling machine. ince it is advantageous in terms of time to minimize the distance traveled, find the shortest possible circuit for the machine to travel and the total distance for that circuit. (Assume the machine has to begin and end at point.) 3.75 5.25 4.75 4.5 4.25 B 8.0 A Point of Interest Mathematicians in IBM s Tokyo Research Laboratory have developed a drill route optimization system that has a TP approximation algorithm as its core. The new system reduces the drill route length on a circuit board by an average of 80% and the operation time by 15% on the average. 8. A delivery person must visit each of his warehouses daily. His delivery route begins and ends at his garage (G). The table below shows the approximate travel time (in minutes) between stops. G A B D G 25.0 16.5 18.0 43.0 A 25.0 21.0 17.5 15.0 B 16.5 21.0 23.5 19.5 18.0 17.5 23.5 21.0 D 43.0 15.0 19.5 21.0 a. Draw a weighted complete graph with 5 vertices to represent the information in the table. b. Use the nearest-neighbor algorithm to find the quickest route starting at G, visiting each of the vertices of the graph exactly once, and ending at G. c. What is the travel time of the route in part b?

246 hapter 5 More Graphs, ubgraphs, and Trees Projects 9. An algorithm, known by such names as the sorted-edges algorithm and the cheapest-link algorithm, provides another quick and simple way to find an approximate solution to the TP. Investigate this algorithm. Write a brief report on the algorithm and give an example to show how it works. 10. reate a TP poster that illustrates the use of the nearest-neighbor algorithm. At a minimum, your poster should include the following elements. A map of your neighborhood, town, or state with five or six selected locations highlighted. A table that shows the distances between each pair of selected locations. A weighted graph that models the situation. An explanation of how the algorithm is used to find the minimum distance from one selected starting location to each of the others and to return to the original starting point. 11. elect five colleges or universities that you might be interested in attending. After researching the schools of choice, write a paper that incorporates the following. A short paragraph on each school explaining your interest. A weighted, complete graph that shows the five schools and your home. An optimal route based on the shortest path that starts at your home, visits each of the five schools, and returns to your home.