90 likes | 222 Views
Weighted Graphs and traveling Salesperson problem. Unit 3. 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. Weighted Graphs.
E N D
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.
Weighted Graphs Is when we assign numbers to the edges of a graph .
Example Use the weighted Graph to find the cost of the trip for the Hamilton circuit A, B, D, C, A. 190 A B 124 155 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 157 126 D 179 C
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.
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.
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.
Example Use the diagram to find the optimal Hamilton Circuit. The sales person want to start from A and end at A. 190 A B 124 155 157 126 D 179 C