1 / 15

Aim: How does a Hamilton path and circuit differ from Euler’s path and circuit?

Aim: How does a Hamilton path and circuit differ from Euler’s path and circuit?. Do Now:. How does finding an efficient way to plow the streets of NY differ from finding an efficient way for UPS to deliver packages throughout the city?. Hamilton Paths & Circuits.

Download Presentation

Aim: How does a Hamilton path and circuit differ from Euler’s path and circuit?

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Aim: How does a Hamilton path and circuit differ from Euler’s path and circuit? Do Now: How does finding an efficient way to plow the streets of NY differ from finding an efficient way for UPS to deliver packages throughout the city?

  2. Hamilton Paths & Circuits Hamilton path – a path that passes through each vertex of a graph exactly once. Hamilton circuit – a path that passes through each vertex of a graph exactly once and begins and ends at the same vertex. Find a Hamilton path. A, B, C, D, E Find a Hamilton circuit A, B, C, D, E, A

  3. Complete/Incomplete Graphs Complete graph – a graph that has an edge between each pair of vertices. Every complete graph with three or more vertices has a Hamilton circuit. incomplete graph missing

  4. Model Problem Find a Hamilton path that begins at vertex E for the graph below. Find a Hamilton circuit that begins at vertex E for the graph below.

  5. Number of Hamilton Circuits Find as many Hamilton circuits as possible. A, B, C, D, A A, B, D, C, A four vertices – 6 circuits permutations A, C, B, D, A A, C, D, B, A A, D, B, C, A A, D, C, B, A

  6. Number of Hamilton Circuits The number of Hamilton circuits in a complete graph with n vertices is (n – 1)!. • How many Hamilton circuits in a complete • graph with • four vertices • b) five vertices • c) eight vertices n = 4 (4 – 1)! = 6 n = 5 (5 – 1)! = 24 n = 8 (8 – 1)! = 5040

  7. The Traveling Saleperson A sales director who lives in city A is required to travel to regional offices in cities B, C, and D. There are no restrictions on the order of the visits but cheaper is better and he/she must get back home. one-way fares weighted graph What is the cost if circuit A, B, D, C, A is traveled? 190 + 155 + 179 + 124 = $648

  8. Optimal Hamilton Circuit Optimal Hamilton Circuit – in a complete weighted graph, where the sum of the weight of the edges is a minimum. Option One – Brute Force Method • Model the problem with a complete, • weighted graph. • Make a list of all possible Hamilton circuits. • Determine the sum of the weights of the • edges for each of these circuits. • 4. The Hamilton circuit with the minimum • sum of weights is the optimal solution.

  9. Model Problem Find the optimal solutions for our salesperson. one-way fares weighted graph

  10. Model Problem Find the optimal solutions for the weighted graph below.

  11. Optimal Solution – Option Two When number of vertices (options) get large, brute force method is unmanageable. Option Two – Nearest Neighbor Method • Model the problem with a complete, weighted graph. • Identify the vertex that serves as the starting point. • From the starting point, choose the edge with the smallest weigh. Move along this edge to the 2nd vertex. • From the 2nd vertex, choose the edge with the smallest weight that does not lead to a vertex already visited. • Continue building the circuit, one vertex at the time. • From the last vertex, return to the starting point. This method approximates the lowest cost

  12. Model Problem A sales director who lives in city A is required to fly to regional offices in cities B, C, D, and E. The weighted graph showing the one-way airfares is given below. Approximate the lowest cost. A, C 114 C, E 115 E, D 194 D, B 145 B, A 180 A, C, E, D, B, A $748 • Model the problem with a complete, weighted graph. • Identify the vertex that serves as the starting point. • From the starting point, choose the edge with the smallest weigh. Move along this edge to the 2nd vertex. • From the 2nd vertex, choose the edge with the smallest weight that does not lead to a vertex already visited. • Continue building the circuit, one vertex at the time. • From the last vertex, return to the starting point.

  13. Model Problem Use the Nearest Neighbor Method to approximate the optimal solution for the complete, weighted graph below.

  14. The Product Rule

  15. The Product Rule

More Related