Presentation is loading. Please wait.

Presentation is loading. Please wait.

Weighted Graphs and traveling Salesperson problem

Similar presentations


Presentation on theme: "Weighted Graphs and traveling Salesperson problem"— Presentation transcript:

1 Weighted Graphs and traveling Salesperson problem
Unit 3

2 Sales directors for large companies are often required to visit in a number of different cities. What you want to do is find out how to these visits can be scheduled in the cheapest way.

3 Weighted Graphs Is when we assign numbers to the edges of a graph .

4 Example A B C D * $190 $124 $157 $126 $155 $179 A C B D 155 124 179
Use the weighted Graph to find the cost of the trip for the Hamilton circuit A, B, D, C, A. Answer: From A to B = $190 From B to D = $155 From D to C = $179 From C to A = $124 $190 + $155 + $179 + $124 = $ 648

5 The Traveling Salesperson Problem
Is the problem of finding a Hamilton circuit in a complete, weighted graph for which the sum of the weights of the edges is a minimum. Such a Hamilton circuit is called the Optimal Hamilton Circuit or the optimal solution.

6 Tree Diagrams Give all the possible routes you can take on a vertex drawing. The purpose is to find the shortest route using the tree diagram and the weighted edges.

7

8 Sorted Edges (Brute Force Method)
Is used for finding the optimal Hamilton circuit. Steps: Make a list of all the possible circuit of the graph. Each represents a tour of all the vertices of the graph. Calculate the weight for each tour. Choose the optimal tour(i.e. the one with the smallest measure). You can have more than one optimal tour to choose from.

9 Sum of the weights of the edges
Example Use the diagram to find the optimal Hamilton Circuit. The sales person want to start from A and end at A. A C B D 155 124 179 126 190 157 Hamilton Circuit Sum of the weights of the edges = Total cost


Download ppt "Weighted Graphs and traveling Salesperson problem"

Similar presentations


Ads by Google