Weighted Graphs BruteForce Algorithm Traveling Salesperson ProblemUnit 10
Weighted Graphs Brute-Force Algorithm Traveling Salesperson Problem(Unit 10) SOL: DM. 2 Classwork Worksheet Homework (day 67) worksheet
The Traveling Salesperson Problem 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. https: //www. youtube. com/watch? v=SC 5 CX 8 dr. At. U 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.
When we assign numbers to the edges of a graph, it is called a weighted graph. A 6 5 7 C 12 11 9 B If every pair of vertices is joined by an edge, it is a complete graph. https: //www. youtube. com/watch? v=2 u 4 NQzdh. B 1 k
Sorted Edges https: //www. youtube. com/watch? v=j. RBQo. Q 3 j. Py. M
Traveling Sales Person Problem https: //www. youtube. com/watch? v=HWHZAt. Ql 1 v. I
Ex: Use the Weighted Graph to find the cost of the trip for the Hamilton circuit A, B, D, C A 190 A 124 B 155 157 126 D 179 A B C D A * $190 $124 $157 B $190 * $126 $155 C $124 $126 * $179 D $157 $155 $179 * C 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
Brute-Force Method (used for finding the Optimal Hamilton Circuit) https: //www. youtube. com/watch? v=SIGukyzn. LLw Steps: 1. Make a list of all the possible circuit of the graph. Each represents a tour of all the vertices of the graph. 2. Calculate the weight for each tour. 3. Choose the optimal tour (i. e. the one with the smallest measure). You can have more than one optimal tour to choose from.
Ex: Use the diagram to find the optimal Hamilton Circuit. The sales person starts & ends at vertex A. Hamilton Circuit 190 A 124 B 155 157 D Sum of the weights of the edges 126 179 = C Total cost
- Slides: 10