Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley.

Slides:



Advertisements
Similar presentations
1. Find the cost of each of the following using the Nearest Neighbor Algorithm. a)Start at Vertex M.
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?
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.
Excursions in Modern Mathematics(Tannenbaum) and Thinking Mathematically (Blitzer)
What is the first line of the proof? a). Assume G has an Eulerian circuit. b). Assume every vertex has even degree. c). Let v be any vertex in G. d). Let.
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.
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.
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.
Module 5 – Networks and Decision Mathematics Chapter 23 – Undirected Graphs.
© 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.
TSP – Upper Bounds and Lower Bounds Initial problem : Upper Bound A salesman based in Stockton needs to visit shops based in Darlington, Billingham, Middlesbrough,
Chapter 14 Section 4 - Slide 1 Copyright © 2009 Pearson Education, Inc. AND.
© 2010 Pearson Prentice Hall. All rights reserved. CHAPTER 15 Graph Theory.
Graph Theory Hamilton Paths Hamilton Circuits and.
AND.
1) Find and label the degree of each vertex in the graph.
By: Christophe Dufour Chrishon Adams Mischael Joseph.
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 6 The Mathematics of Touring 6.1Hamilton Paths and Hamilton Circuits.
Chapter 14 Section 3 - Slide 1 Copyright © 2009 Pearson Education, Inc. AND.
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
Minimum Spanning Tree Chapter 13.6.
HAMILTONIAN CIRCUIT ALGORITHMS
Chapter 17 Linked Lists.
Chapter 4 Inheritance.
Chapter 14 Graphs and Paths.
Section 14.3 Hamilton Paths, and Hamilton Circuits
Euler Paths & Euler Circuits
Chapter 10 Datapath Subsystems.
4-4 Graph Theory Trees.
Chapter 20 Hash Tables.
A path that uses every vertex of the graph exactly once.
Chapter 14 Graphs © 2006 Pearson Addison-Wesley. All rights reserved.
Chapter 5 Algorithm Analysis.
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.
The Facts to Be Explained
Classwork Worksheet Homework (day 67) worksheet
Hamilton Paths and Hamilton Circuits
Introduction: Some Representative Problems
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,
Chapter 14 Graphs © 2011 Pearson Addison-Wesley. All rights reserved.
Hamilton Paths and Circuits
Traveling Salesman Problems Nearest Neighbor Method
Circuit Characterization and Performance Estimation
A Survey of Mathematics with Applications
Chapter 6 Dynamic Programming.
Chapter 2 Reference Types.
Chapter 14 Graphs © 2011 Pearson Addison-Wesley. All rights reserved.
Chapter 4 Greedy Algorithms.
Presentation transcript:

Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley. All rights reserved

Section 7-3 Chapter 1 Hamilton Circuits and Algorithms © 2008 Pearson Addison-Wesley. All rights reserved

Hamilton Circuits and Algorithms Minimum Hamilton Circuits Brute Force Algorithm Nearest Neighbor Algorithm © 2008 Pearson Addison-Wesley. All rights reserved

© 2008 Pearson Addison-Wesley. All rights reserved Hamilton Circuit A Hamilton circuit in a graph is a circuit that visits each vertex exactly once (returning to the starting vertex to complete the circuit). © 2008 Pearson Addison-Wesley. All rights reserved

Example: Identifying Hamilton Circuits Refer to the graph below. Which of the following are Hamilton circuits? C B D A F E © 2008 Pearson Addison-Wesley. All rights reserved

Example: Identifying Hamilton Circuits Solution a) It is a Hamilton circuit for the graph. b) It is not a Hamilton circuit since it visits B more than once. c) It is not a Hamilton circuit since it does not visit all the vertices. © 2008 Pearson Addison-Wesley. All rights reserved

Hamilton Circuits for Complete Graphs Any complete graph with three of more vertices has a Hamilton circuit. © 2008 Pearson Addison-Wesley. All rights reserved

When Hamilton Circuits Are the Same Hamilton circuits that differ only in their starting points will be considered to be the same circuit. © 2008 Pearson Addison-Wesley. All rights reserved

Number of Hamilton Circuits in a Complete Graph A complete graph with n vertices has (n – 1)! Hamilton circuits. © 2008 Pearson Addison-Wesley. All rights reserved

Example: Number of Circuits How many Hamilton circuits are in a complete graph with 5 vertices? Solution Here n = 5, so there are (5 – 1)! = 4! = 24 Hamilton circuits. © 2008 Pearson Addison-Wesley. All rights reserved

Minimum Hamilton Circuits In a weighted graph, a minimum Hamilton circuit is a Hamilton circuit with the smallest possible weight. © 2008 Pearson Addison-Wesley. All rights reserved

© 2008 Pearson Addison-Wesley. All rights reserved Brute Force Algorithm Step 1: Choose a starting point. Step 2: List all the Hamilton circuits with that starting point. Step 3: Find the total weight of each circuit. Step 4: Choose a Hamilton circuit with the smallest total weight. © 2008 Pearson Addison-Wesley. All rights reserved

Example: Brute Force Algorithm Find a minimum Hamilton circuit for the complete, weighted graph below 3 A B 1 5 1 7 D 3 C © 2008 Pearson Addison-Wesley. All rights reserved

Example: Brute Force Algorithm 3 A B Solution 1 5 1 7 D 3 C Weight of circuit 14 12 Min. 14 12 (opposite of 2) 14 (opposite of 3) 14 (opposite of 1) © 2008 Pearson Addison-Wesley. All rights reserved

Nearest Neighbor Algorithm Step 1: Choose a starting point. Call this vertex A. Step 2: Check all the edges joined to A, and choose one that has the smallest weight. Proceed along this edge to the next vertex. Step 3: At each vertex you reach, check the edges from there to vertices not yet visited. Choose the smallest weight. Proceed along this edge to the next vertex. © 2008 Pearson Addison-Wesley. All rights reserved

Nearest Neighbor Algorithm Step 4: Repeat Step 3 until you have visited all the vertices. Step 5: Return to the starting vertex. © 2008 Pearson Addison-Wesley. All rights reserved

Example: Nearest Neighbor The time it takes to travel between points (in minutes) is shown on the graph below. Use the nearest neighbor algorithm to approximate the least time to visit each location. A 9 20 13 9 E B 3 8 8 10 5 C 7 D © 2008 Pearson Addison-Wesley. All rights reserved

Example: Nearest Neighbor Algorithm Solution Start Circuit Weight A 40 B 37 C D E 51 © 2008 Pearson Addison-Wesley. All rights reserved

Example: Nearest Neighbor Algorithm Solution (continued) From the information on the previous slide we would say that a route of 37 minutes should be about the least amount of time. Note that has a total weight of 36 minutes. All we can expect from the nearest neighbor algorithm is a reasonably good solution. © 2008 Pearson Addison-Wesley. All rights reserved