Presentation is loading. Please wait.

Presentation is loading. Please wait.

Classwork Worksheet Homework (day 67) worksheet

Similar presentations


Presentation on theme: "Classwork Worksheet Homework (day 67) worksheet"— Presentation transcript:

1 Classwork Worksheet Homework (day 67) worksheet
Weighted Graphs Brute-Force Algorithm Traveling Salesperson Problem(Unit 10) SOL: DM.2 Classwork Worksheet Homework (day 67) worksheet

2 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. 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.

3 When we assign numbers to the edges of a graph, it is called a weighted graph.
6 12 5 7 11 9 If every pair of vertices is joined by an edge, it is a complete graph.

4 Sorted Edges

5 Traveling Sales Person Problem https://www. youtube. com/watch

6 A C B D 155 124 179 126 190 157 Ex: Use the Weighted Graph to find the cost of the trip for the Hamilton circuit A, B, D, C A A B C D * $190 $124 $157 $126 $155 $179 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

7 Brute-Force Method (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.

8 Sum of the weights of the edges
A C B D 155 124 179 126 190 157 Ex: Use the diagram to find the optimal Hamilton Circuit. The sales person starts & ends at vertex A. Hamilton Circuit Sum of the weights of the edges = Total cost

9

10


Download ppt "Classwork Worksheet Homework (day 67) worksheet"

Similar presentations


Ads by Google