Chapter 14 Section 3 - Slide 1 Copyright © 2009 Pearson Education, Inc. AND.

Slides:



Advertisements
Similar presentations
Copyright © 2005 Pearson Education, Inc. Slide 13-1.
Advertisements

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?
Lecture 21 Paths and Circuits CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley. All rights reserved.
1 Chapter 15.3 Hamilton Paths and Hamilton Circuits Objectives 1.Understand the definitions of Hamilton paths & Hamilton circuits. 2.Find the number of.
Chapter 4 sec. 2.  A famous and difficult problem to solve in graph theory.
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.
The Travelling Salesman Algorithm A Salesman has to visit lots of different stores and return to the starting base On a graph this means visiting every.
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley.
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley. All rights reserved.
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley.
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.
Graph Theory Topics to be covered:
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.
Ch. 15: Graph Theory Some practical uses Degree of separation- Hollywood, acquaintance, collaboration Travel between cities Konigsberg bridge Shortest.
Spring 2015 Mathematics in Management Science Network Problems Networks & Trees Minimum Networks Spanning Trees Minimum Spanning Trees.
Structures 7 Decision Maths: Graph Theory, Networks and Algorithms.
1 Excursions in Modern Mathematics Sixth Edition Peter Tannenbaum.
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.
Euler and Hamilton Paths. Euler Paths and Circuits The Seven bridges of Königsberg a b c d A B C D.
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.
Mathematics in Management Science
CIRCUITS, PATHS, AND SCHEDULES Euler and Königsberg.
Graph Theory Hamilton Paths Hamilton Circuits and.
AND.
Associated Matrices of Vertex Edge Graphs Euler Paths and Circuits Block Days April 30, May 1 and May
Euler Paths and Circuits. The original problem A resident of Konigsberg wrote to Leonard Euler saying that a popular pastime for couples was to try.
© 2010 Pearson Prentice Hall. All rights reserved. CHAPTER 15 Graph Theory.
Lecture 52 Section 11.2 Wed, Apr 26, 2006
Copyright 2013, 2010, 2007, Pearson, Education, Inc. Section 14.2 Euler Paths, and Euler Circuits.
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 5 The Mathematics of Getting Around 5.1Euler Circuit Problems 5.2What.
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.
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 6 The Mathematics of Touring 6.1Hamilton Paths and Hamilton Circuits.
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.
MAT 110 Workshop Created by Michael Brown, Haden McDonald & Myra Bentley for use by the Center for Academic Support.
Hamilton Paths and Hamilton Circuits
Excursions in Modern Mathematics Sixth Edition
Weighted Graphs and traveling Salesperson problem
Traveling Salesman Problems
Redraw these graphs so that none of the line intersect except at the vertices B C D E F G H.
Discrete Structures – CNS2300
HAMILTONIAN CIRCUIT ALGORITHMS
Chapter 2: Business Efficiency Lesson Plan
Chapter 2: Business Efficiency Lesson Plan
Section 14.3 Hamilton Paths, and Hamilton Circuits
Introduction to Graph Theory Euler and Hamilton Paths and Circuits
Graph Theory.
4-4 Graph Theory Trees.
A path that uses every vertex of the graph exactly once.
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
Euler circuit Theorem 1 If a graph G has an Eulerian path, then it must have exactly two odd vertices. Theorem 2 If a graph G has an Eulerian circuit,
Section 13.4 Trees.
Traveling Salesman Problems Nearest Neighbor Method
A Survey of Mathematics with Applications
Presentation transcript:

Chapter 14 Section 3 - Slide 1 Copyright © 2009 Pearson Education, Inc. AND

Copyright © 2009 Pearson Education, Inc. Chapter 14 Section 3 - Slide 2 Chapter 14 Graph Theory

Chapter 14 Section 3 - Slide 3 Copyright © 2009 Pearson Education, Inc. WHAT YOU WILL LEARN Graphs, paths and circuits The Königsberg bridge problem Euler paths and Euler circuits Hamilton paths and Hamilton circuits Traveling salesman problem Brute force method

Copyright © 2009 Pearson Education, Inc. Chapter 14 Section 3 - Slide 4 Section 3 Hamilton Paths and Hamilton Circuits

Chapter 14 Section 3 - Slide 5 Copyright © 2009 Pearson Education, Inc. Definitions A Hamilton path is a path that contains each vertex of a graph exactly once. A Hamilton circuit is a path that begins and ends at the same vertex and passes through all other vertices of the graph exactly one time.

Chapter 14 Section 3 - Slide 6 Copyright © 2009 Pearson Education, Inc. Example: Hamilton Path Graph (a) shown has Hamilton path A, B, C, E, D. The graph also has Hamilton path C, B, A, D, E. Can you find some others? Graph (b) shown has Hamilton path A, B, C, F, H, E, G, D. The graph also has Hamilton path G, D, E, H, F, C, B, A. Can you find some others?

Chapter 14 Section 3 - Slide 7 Copyright © 2009 Pearson Education, Inc. Example: Hamilton Circuit Graph (a) shown has Hamilton circuit A, B, D, G, E, H, F, C, A. A Hamilton circuit starts and ends at the same vertex. Graph (b) shown has Hamilton circuit A, B, C, E, D, A. Can you find another?

Chapter 14 Section 3 - Slide 8 Copyright © 2009 Pearson Education, Inc. Definition A complete graph is a graph that has an edge between each pair of its vertices.

Chapter 14 Section 3 - Slide 9 Copyright © 2009 Pearson Education, Inc. Example: Finding Hamilton Circuits Determine a Hamilton circuit for the graph shown. One solution is A, G, F, E, C, D, B, A A B C E F G D

Chapter 14 Section 3 - Slide 10 Copyright © 2009 Pearson Education, Inc. Number of Unique Hamilton Circuits in a Complete Graph The number of unique Hamilton circuits in a complete graph with n vertices is (n  1)!, where (n  1)! = (n  1)(n  2)(n  3)…(3)(2)(1)

Chapter 14 Section 3 - Slide 11 Copyright © 2009 Pearson Education, Inc. Example: Number of Hamilton Circuits How many unique Hamilton circuits are there in a complete graph with the following number of vertices? a) 4b) 9 a) 4 = (4  1)! = 321 = 6 b) 9 = (9  1)! = = 40,320

Chapter 14 Section 3 - Slide 12 Copyright © 2009 Pearson Education, Inc. The Brute Force Method of Solving Traveling Salesman Problems To determine the optimal solution: 1.Represent the problem with a complete, weighted graph. 2.List all possible Hamilton circuits for this graph. 3.Determine the cost (or distance) associated with each of these Hamilton circuits. 4.The Hamilton circuit with the lowest cost (or shortest distance) is the optimal solution.

Chapter 14 Section 3 - Slide 13 Copyright © 2009 Pearson Education, Inc. Example: Brute Force Method Find a minimum Hamilton circuit for the complete, weighted graph shown. List all the Hamilton circuits. Since there are 4 vertices there are (4  1)! = 3! = 6 possible circuits. AB CD

Chapter 14 Section 3 - Slide 14 Copyright © 2009 Pearson Education, Inc. Example: Brute Force Method continued A, D, C, B, A A, D, B, C, A A, C, D, B, A Fourth Leg A, C, B, D, A A, B, D, C, A A, B, C, D, A Total Third Leg Second Leg First Leg Circuit The minimum amount for the graph would be 22. AB CD

Chapter 14 Section 3 - Slide 15 Copyright © 2009 Pearson Education, Inc. Nearest Neighbor Method of Determining an Approximate Solution to a Traveling Salesman Problem To approximate a optimal solution: 1. Represent the problem with a complete, weighted graph. 2.Identify the starting vertex. 3.Of all the edges attached to the starting vertex, choose the edge that has the smallest weight. This edge is generally either the shortest distance or the lowest cost. Travel along this edge to the second vertex.

Chapter 14 Section 3 - Slide 16 Copyright © 2009 Pearson Education, Inc. Nearest Neighbor Method of Determining an Approximate Solution to a Traveling Salesman Problem (continued) 4.At the second vertex, choose the edge that has the smallest weight that does not lead to a vertex already visited. Travel along this edge to the third vertex. 5.Continue this process, each time moving along the edge with the smallest weight until all vertices are visited. 6.Travel back to the original vertex.

Chapter 14 Section 3 - Slide 17 Copyright © 2009 Pearson Education, Inc. Example: Nearest Neighbor An appliance repair man must repair four appliances at the locations shown in the graph on the next slide. The estimated travel time (in minutes) is shown between the four locations. The repair man wants to visit the four locations in an order that takes the least amount of time. Use the nearest neighbor algorithm to find an approximate solution to the problem.

Chapter 14 Section 3 - Slide 18 Copyright © 2009 Pearson Education, Inc. Example: Nearest Neighbor (continued) Choose a starting vertex. Let’s choose vertex A. Choose the edge that has the smallest weight. Either AD or AB, lets choose AD (8). At D choose the edge that has the smallest weight DE (4). E start here 2 nd vertex C B A D

Chapter 14 Section 3 - Slide 19 Copyright © 2009 Pearson Education, Inc. Example: Nearest Neighbor (continued) Continue moving along the edge with the smallest weight. Circuit would be: A, D, E, B, C, A = 37 This route would take about 37 minutes. start here 2 nd vertex C B A E D

Chapter 14 Section 3 - Slide 20 Copyright © 2009 Pearson Education, Inc. Example: Nearest Neighbor (continued) Other circuits and weights = 47E, B, D, C, A, EE = 34 D, E, B, A, C, D D = 34 C, D, E, B, A, C C = 34B, E, D, C, A, BB Total WeightCircuitStarting Vertex