1 Chapter 15.3 Hamilton Paths and Hamilton Circuits Objectives 1.Understand the definitions of Hamilton paths & Hamilton circuits. 2.Find the number of.

Slides:



Advertisements
Similar presentations
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?
Advertisements

Introduction to Graph Theory Instructor: Dr. Chaudhary Department of Computer Science Millersville University Reading Assignment Chapter 1.
Chapter 7 Graph Theory 7.1 Modeling with graphs and finding Euler circuits. Learning Objectives: Know how to use graphs as models and how to determine.
Graphs Chapter 20 Data Structures and Problem Solving with C++: Walls and Mirrors, Carrano and Henry, © 2013.
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley. All rights reserved.
Chapter 4 sec. 2.  A famous and difficult problem to solve in graph theory.
Excursions in Modern Mathematics(Tannenbaum) and Thinking Mathematically (Blitzer)
Homework collection Read Pages 175 – 184 Page 188: 21 – 26, 29 – 36, 41 – 44, 47 – 49, 51, 52, 59, 62, 63.
A traveling salesman has customers in 5 cities which we will call A, B, C, D, and E. The salesman needs to travel to all 5 cities with his trip starting.
Graphs Chapter 20 Data Structures and Problem Solving with C++: Walls and Mirrors, Frank Carrano, © 2012.
Chapter 2: Business Efficiency Lesson Plan Business Efficiency  Visiting Vertices-Graph Theory Problem Hamiltonian Circuits  Vacation Planning Problem.
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley.
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley. All rights reserved.
Slide 14-1 Copyright © 2005 Pearson Education, Inc. SEVENTH EDITION and EXPANDED SEVENTH EDITION.
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 6 The Mathematics of Touring 6.1Hamilton Paths and Hamilton Circuits.
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 6 The Mathematics of Touring 6.1Hamilton Paths and Hamilton Circuits.
1 Excursions in Modern Mathematics Sixth Edition Peter Tannenbaum.
Slide Copyright © 2009 Pearson Education, Inc. AND Active Learning Lecture Slides For use with Classroom Response Systems Chapter 14 Graph Theory.
Graph Theory Hamilton Paths and Hamilton Circuits.
UNIT 3 THINKING MATHEMATICALLY BY BLITZER Hamilton Paths and Hamilton Circuits.
Discrete Math Unit 6 Set Theory Number Theory Graph Theory.
1 Excursions in Modern Mathematics Sixth Edition Peter Tannenbaum.
7.1 and 7.2: Spanning Trees. A network is a graph that is connected –The network must be a sub-graph of the original graph (its edges must come from the.
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.
© 2010 Pearson Prentice Hall. All rights reserved. 1 §15.3, Hamilton Paths and Circuits.
Spring 2015 Mathematics in Management Science Traveling Salesman Problem Approximate solutions for TSP NNA, RNN, SEA Greedy Heuristic Algorithms.
Copyright © 2014, 2010, 2007 Pearson Education, Inc. Section 4.2, Slide 1 4 Graph Theory (Networks) The Mathematics of Relationships 4.
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 6 The Mathematics of Touring 6.1Hamilton Paths and Hamilton Circuits.
Copyright 2013, 2010, 2007, Pearson, Education, Inc. Section 14.3 Hamilton Paths, and Hamilton Circuits.
Chapter 14 Section 4 - Slide 1 Copyright © 2009 Pearson Education, Inc. AND.
1.5 Graph Theory. Graph Theory The Branch of mathematics in which graphs and networks are used to solve problems.
EXCURSIONS IN MODERN MATHEMATICS SIXTH EDITION Peter Tannenbaum 1.
6.1 Hamilton Circuits and Hamilton Path
Mathematics in Management Science
CIRCUITS, PATHS, AND SCHEDULES Euler and Königsberg.
Graph Theory Hamilton Paths Hamilton Circuits and.
AND.
© 2010 Pearson Prentice Hall. All rights reserved. CHAPTER 15 Graph Theory.
1) Find and label the degree of each vertex in the graph.
Graphs Definition: a graph is an abstract representation of a set of objects where some pairs of the objects are connected by links. The interconnected.
I can describe the differences between Hamilton and Euler circuits and find efficient Hamilton circuits in graphs. Hamilton Circuits I can compare and.
Chapter 14 Section 3 - Slide 1 Copyright © 2009 Pearson Education, Inc. AND.
Unit 2 Hamiltonian Circuits. Hamiltonian Circuit: A tour that starts at a vertex of a graph and visits each vertex once and only once, returning to where.
Copyright © 2008 Pearson Education, Inc. Slide 13-1 Unit 13B The Traveling Salesman Problem.
Grade 11 AP Mathematics Graph Theory Definition: A graph, G, is a set of vertices v(G) = {v 1, v 2, v 3, …, v n } and edges e(G) = {v i v j where 1 ≤ i,
Mathematical modeling To describe or represent a real-world situation quantitatively, in mathematical language.
Exhaustive search Exhaustive search is simply a brute- force approach to combinatorial problems. It suggests generating each and every element of the problem.
Excursions in Modern Mathematics Sixth Edition
Hamilton Paths and Hamilton Circuits
Excursions in Modern Mathematics Sixth Edition
6.4: The Brute-Force Algorithms
Weighted Graphs and traveling Salesperson problem
Shortest Path Problems
Traveling Salesman Problems
HAMILTONIAN CIRCUIT ALGORITHMS
Chapter 2: Business Efficiency Lesson Plan
Chapter 2: Business Efficiency Lesson Plan
Section 14.3 Hamilton Paths, and Hamilton Circuits
Graphs Chapter 11 Objectives Upon completion you will be able to:
Chapter 2: Business Efficiency Business Efficiency
6.1 Hamilton Circuits and Hamilton Path
A path that uses every vertex of the graph exactly once.
Nearest Neighbor Repetitive Nearest Neighbor (Unit 10) SOL: DM.2
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley.
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley.
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley.
Classwork Worksheet Homework (day 67) worksheet
Hamilton Paths and Hamilton Circuits
Hamilton Paths and Circuits
Traveling Salesman Problems Nearest Neighbor Method
Presentation transcript:

1 Chapter 15.3 Hamilton Paths and Hamilton Circuits Objectives 1.Understand the definitions of Hamilton paths & Hamilton circuits. 2.Find the number of Hamilton circuits in a complete graph. 3.Understand and use weighted graphs. 4.Use the Brute Force Method to solve traveling salesperson problems. 5.Use the Nearest Neighbor Method to approximate solutions to traveling salesperson problems.

2 Hamilton Paths & Hamilton Circuits A path that passes through each vertex of a graph exactly once is called a Hamilton path. If a Hamilton path begins and ends at the same vertex and passes through all other vertices exactly once, it is called a Hamilton circuit. Example: a.Find a Hamilton path for the graph. b.Find a Hamilton circuit for the graph.

3 Solution: a.A Hamilton path must pass through each vertex exactly once. The graph has many Hamilton paths. An example of such a path is A, B, C, D, E. b.A Hamilton circuit must pass through each vertex exactly once and begin and end at the same vertex. The graph has many Hamilton circuits. An example of such a path is A, B, C, D, E, A. Hamilton Paths & Hamilton Circuits

4 A complete graph is a graph that has an edge between each pair of its vertices. Hamilton Paths & Hamilton Circuits Not a complete graph because there are no edges for connecting the vertices A and D, and B and C. A complete graph because there are edges connecting the vertices A and D, and B and C.

5 The Number of Hamilton Circuits in a Complete Graph The number of Hamilton circuits in a complete graph with n vertices is (n – 1)! Example: In the graph, there are edges between each pair of vertices. Thus, the graph is complete and has a Hamilton circuit. One circuit is A, B, C, D, A. Any circuits that pass through the same vertices in the same order will be consid- ered be the same. For example,

6 In order to avoid duplication, in forming a Hamilton circuit, we can always assume that it begins at A. There are six different, or unique, Hamilton circuits for the graph because (n – 1)! = (4 – 1)! = 3! = 6. They are given as The Number of Hamilton Circuits in a Complete Graph Example Continued

7 Weighted Graphs A complete graph whose edges have numbers attached to them is called a weighted graph. The numbers shown along the edges if a weighted graph are called the weights of the edges. Example: The graph below is a model graph for one-way airfares for cities A, B, C, D. Use the weighted graph to find the cost of the trip for the Hamilton circuit A, B, D, C, A.

8 Solution: The trip described by the Hamilton circuit A, B, D, C, A involves the sum of the four costs: The cost of the trip is $648. Weighted Graphs Example Continued

9 Brute Force Method The Traveling Salesperson Problem The traveling salesperson problem 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. One method for finding an optimal Hamilton circuit is called the Brute Force Method.

10 The optimal solution is found using the following steps: 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 Hamilton circuits. The Hamilton circuit with the minimum sum of weights is the optimal solution. Brute Force Method

11 Example: Use the previous weighted graph to find the optimal solution. Solution: The graph has four vertices. Thus, there are (n – 1)! = (4 – 1)! = 3! = 6 possible Hamilton circuits. The six possible Hamilton circuits and their total costs are given below. Brute Force Method Using the Brute Force Method

12 Brute Force Method Example Continued This indicates that two Hamilton circuits have the minimum cost of $562. The optimal solution is either A, C, B, D, A or A, D, B, C, A.

13 Although these are different Hamilton circuits the cost is the same regardless of the direction flown. Brute Force Method Example Continued

14 Nearest Neighbor Method The Nearest Neighbor Method is a method to approximate solutions to the traveling salesperson problems. The optimal solution can be approximated using the following steps: 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 an edge with the smallest weight. Move along this edge to the second vertex. 4.From the 2 nd vertex, choose the edge with the smallest weight that does not lead to a vertex already visited. Move along this edge to the third vertex. 5.Continue building the circuit, one vertex at a time, by moving along the edge with the smallest weight until all vertices are visited. 6.From the last vertex, return to the starting point.

15 Example: 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 shown gives the one-way airfares. Use the Nearest Neighbor Method to find an approximate solution. What is the total cost. Solution: The Nearest Neighbor Method is carried out as follows. Start at A. Choose the edge with the smallest weight: 114. Move this edge along to C. Nearest Neighbor Method Using the Nearest Neighbor Method

16 From C choose the edge with the smallest weight that does not lead to A: 115. Move along this edge to E. From E, choose the edge with the smallest weight that does not lead to a city already visited: 194. Move along this edge to D. From D, there is little choice but to fly to B, the only city not visited yet. From B, close the circuit and return home to A. Nearest Neighbor Method Example Continued

17 An approximated solution is the Hamilton circuit A, C, E, D, B, A. The total cost is $114 + $115 + $194 + $145 + $180 = $748. Nearest Neighbor Method Example Continued