# Aim: Graph Theory – Hamilton Paths & Circuits Course: Math Literacy Do Now: Aim: How does a Hamilton path and circuit differ from Euler’s path and circuit?

## Presentation on theme: "Aim: Graph Theory – Hamilton Paths & Circuits Course: Math Literacy Do Now: Aim: How does a Hamilton path and circuit differ from Euler’s path and circuit?"— Presentation transcript:

Aim: Graph Theory – Hamilton Paths & Circuits Course: Math Literacy Do Now: Aim: How does a Hamilton path and circuit differ from Euler’s path and circuit? 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?

Aim: Graph Theory – Hamilton Paths & Circuits Course: Math Literacy 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

Aim: Graph Theory – Hamilton Paths & Circuits Course: Math Literacy 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

Aim: Graph Theory – Hamilton Paths & Circuits Course: Math Literacy 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.

Aim: Graph Theory – Hamilton Paths & Circuits Course: Math Literacy Number of Hamilton Circuits Find as many Hamilton circuits as possible. A, B, C, D, A A, B, D, C, A A, C, B, D, A A, C, D, B, A A, D, B, C, AA, D, C, B, A four vertices – 6 circuits permutations

Aim: Graph Theory – Hamilton Paths & Circuits Course: Math Literacy 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 a)four vertices b) five vertices c) eight vertices n = 4(4 – 1)! = 6 n = 5(5 – 1)! = 24 n = 8(8 – 1)! = 5040

Aim: Graph Theory – Hamilton Paths & Circuits Course: Math Literacy 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. ABCD A*190124157 B190*126155 C124126*179 D157155179* one-way fares weighted graph What is the cost if circuit A, B, D, C, A is traveled? 190 + 155 + 179 + 124 = \$648

Aim: Graph Theory – Hamilton Paths & Circuits Course: Math Literacy 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 1.Model the problem with a complete, weighted graph. 2.Make a list of all possible Hamilton circuits. 3.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.

Aim: Graph Theory – Hamilton Paths & Circuits Course: Math Literacy Model Problem Find the optimal solutions for our salesperson. ABCD A*190124157 B190*126155 C124126*179 D157155179* one-way fares weighted graph Hamilton circuitsum of weights of edges=total cost A,B,C,D,A190+126+179+157 = \$652 A,B,D,C,A190+155+179+124 = \$648 A,C,B,D,A124+126+155+157 = \$562 A,C,D,B,A124+179+155+190 = \$648 A.D.B.C.A157+155+126+124 = \$562 A,D,C,B,A157+179+126+190 = \$652

Aim: Graph Theory – Hamilton Paths & Circuits Course: Math Literacy Model Problem Find the optimal solutions for the weighted graph below.

Aim: Graph Theory – Hamilton Paths & Circuits Course: Math Literacy Optimal Solution – Option Two When number of vertices (options) get large, brute force method is unmanageable. Option Two – Nearest Neighbor Method 1.Model the problem with a complete, weighted graph. 2.Identify the vertex that serves as the starting point. 3.From the starting point, choose the edge with the smallest weigh. Move along this edge to the 2 nd vertex. 4.From the 2 nd vertex, choose the edge with the smallest weight that does not lead to a vertex already visited. 5.Continue building the circuit, one vertex at the time. 6.From the last vertex, return to the starting point. This method approximates the lowest cost

Aim: Graph Theory – Hamilton Paths & Circuits Course: Math Literacy 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. 114 115 194 145 180 1.Model the problem with a complete, weighted graph. 2.Identify the vertex that serves as the starting point. 3.From the starting point, choose the edge with the smallest weigh. Move along this edge to the 2 nd vertex. 4.From the 2 nd vertex, choose the edge with the smallest weight that does not lead to a vertex already visited. 5.Continue building the circuit, one vertex at the time. 6.From the last vertex, return to the starting point. A, C C, E E, D D, B B, A A, C, E, D, B, A \$748

Aim: Graph Theory – Hamilton Paths & Circuits Course: Math Literacy Model Problem Use the Nearest Neighbor Method to approximate the optimal solution for the complete, weighted graph below.

Aim: Graph Theory – Hamilton Paths & Circuits Course: Math Literacy The Product Rule

Aim: Graph Theory – Hamilton Paths & Circuits Course: Math Literacy The Product Rule

Download ppt "Aim: Graph Theory – Hamilton Paths & Circuits Course: Math Literacy Do Now: Aim: How does a Hamilton path and circuit differ from Euler’s path and circuit?"

Similar presentations