Presentation is loading. Please wait.

Presentation is loading. Please wait.

6.1 Hamilton Circuits and Paths: Hamilton Circuits and Paths: Hamilton Path: Travels to each vertex once and only once… Hamilton Path: Travels to each.

Similar presentations


Presentation on theme: "6.1 Hamilton Circuits and Paths: Hamilton Circuits and Paths: Hamilton Path: Travels to each vertex once and only once… Hamilton Path: Travels to each."— Presentation transcript:

1 6.1 Hamilton Circuits and Paths: Hamilton Circuits and Paths: Hamilton Path: Travels to each vertex once and only once… Hamilton Path: Travels to each vertex once and only once… Hamilton Circuit: Travels to each vertex once and returns to the starting vertex. Hamilton Circuit: Travels to each vertex once and returns to the starting vertex. Weight: The cost of an edge Weight: The cost of an edge There is no correlation between having an Euler Path/ Circuit and a Hamilton path/circuit There is no correlation between having an Euler Path/ Circuit and a Hamilton path/circuit Discrete Math

2 6.2 Complete Graphs: Complete Graphs: Complete Graph: There exists an edge between every pair of vertices. Complete Graph: There exists an edge between every pair of vertices. N is the number of Vertices N is the number of Vertices Number of degrees for each vertex is N-1 Number of degrees for each vertex is N-1 Number of edges in a K N graph = N (N-1) / 2. Number of edges in a K N graph = N (N-1) / 2. Number of Hamilton Circuits: For N vertices (N - 1)! Number of Hamilton Circuits: For N vertices (N - 1)! Discrete Math

3 6.3 Travelling Salesman Problems (TSP): Travelling Salesman Problems (TSP): Find the shortest route for a salesman to travel from one point to the next, hitting all points once and returning to where he started. (Hamilton Circuit) Find the shortest route for a salesman to travel from one point to the next, hitting all points once and returning to where he started. (Hamilton Circuit) Weighted Graph: Each edge has a weight associated with it indicating length, time, or cost to travel that edge. Weighted Graph: Each edge has a weight associated with it indicating length, time, or cost to travel that edge. Discrete Math

4 6.4-5 Solving the TSP: Solving the TSP: Brute-Force method (Optimal but inefficient): List all possible Hamilton circuits and find the length of each. The smallest length will be the optimal solution. Brute-Force method (Optimal but inefficient): List all possible Hamilton circuits and find the length of each. The smallest length will be the optimal solution. Nearest Neighbor Algorithm (Not necessarily optimal, but efficient): Given a starting vertex, move to the next vertex using the cheapest length. Continue this gesture until you get back to where you started. Nearest Neighbor Algorithm (Not necessarily optimal, but efficient): Given a starting vertex, move to the next vertex using the cheapest length. Continue this gesture until you get back to where you started. Avoid visiting a vertex more than once. (No degrees > 2) Avoid visiting a vertex more than once. (No degrees > 2) Avoid mini-circuits. Avoid mini-circuits. Discrete Math

5 6.6-7 Repetitive Nearest Neighbor: Repetitive Nearest Neighbor: Approximate Algorithms: These are algorithms that produce solutions that are most of the time, reasonably close to the optimal solution. Approximate Algorithms: These are algorithms that produce solutions that are most of the time, reasonably close to the optimal solution. Repetitive Nearest Neighbor: Use the Nearest Neighbor Algorithm at each vertex, and choose the best out of those solutions. For N vertices, you will get N solutions. Repetitive Nearest Neighbor: Use the Nearest Neighbor Algorithm at each vertex, and choose the best out of those solutions. For N vertices, you will get N solutions. Discrete Math

6 6.8 The Cheapest Link Algorithm The Cheapest Link Algorithm Cheapest Link: Begin at the cheapest edge and continue to wiggle in these edges until you have completed the Hamilton Circuit. Cheapest Link: Begin at the cheapest edge and continue to wiggle in these edges until you have completed the Hamilton Circuit. Avoid the same mistakes as Nearest Neighbor Avoid the same mistakes as Nearest Neighbor Discrete Math

7 It has been decreed that all things previous need not make sense to the average Joe. However, if there is a Joe amongst you which is above average, I expect great things from sed Joe...


Download ppt "6.1 Hamilton Circuits and Paths: Hamilton Circuits and Paths: Hamilton Path: Travels to each vertex once and only once… Hamilton Path: Travels to each."

Similar presentations


Ads by Google