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.

Slides:



Advertisements
Similar presentations
Chapter 2: Business Efficiency Lesson Plan
Advertisements

Great Theoretical Ideas in Computer Science
Great Theoretical Ideas in Computer Science for Some.
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. 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.
9.2 The Traveling Salesman Problem. Let us return to the question of finding a cheapest possible cycle through all the given towns: We have n towns (points)
Great Theoretical Ideas in Computer Science.
1 Discrete Structures & Algorithms Graphs and Trees: II EECE 320.
Approximation Algorithms: Combinatorial Approaches Lecture 13: March 2.
Great Theoretical Ideas in Computer Science.
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.
Approximation Algorithms Motivation and Definitions TSP Vertex Cover Scheduling.
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 2: Business Efficiency Lesson Plan Business Efficiency  Visiting Vertices-Graph Theory Problem Hamiltonian Circuits  Vacation Planning Problem.
Slide 14-1 Copyright © 2005 Pearson Education, Inc. SEVENTH EDITION and EXPANDED SEVENTH EDITION.
The Traveling Salesman Problem Approximation
SPANNING TREES Lecture 21 CS2110 – Spring
IT 60101: Lecture #201 Foundation of Computing Systems Lecture 20 Classic Optimization Problems.
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.
Spring 2015 Mathematics in Management Science Network Problems Networks & Trees Minimum Networks Spanning Trees Minimum Spanning Trees.
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.
Chapter 2: Business Efficiency Lesson Plan
Chapter 2: Business Efficiency Lesson Plan
CS 200 Algorithms and Data Structures
Copyright 2013, 2010, 2007, Pearson, Education, Inc. Section 14.3 Hamilton Paths, and Hamilton Circuits.
Chapter 2: Business Efficiency Lesson Plan Business Efficiency  Visiting Vertices-Graph Theory Problem Hamiltonian Circuits  Vacation Planning Problem.
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.
EXCURSIONS IN MODERN MATHEMATICS SIXTH EDITION Peter Tannenbaum 1.
Graphs A ‘Graph’ is a diagram that shows how things are connected together. It makes no attempt to draw actual paths or routes and scale is generally inconsequential.
Mathematics in Management Science
CIRCUITS, PATHS, AND SCHEDULES Euler and Königsberg.
SPANNING TREES Lecture 20 CS2110 – Fall Spanning Trees  Definitions  Minimum spanning trees  3 greedy algorithms (incl. Kruskal’s & Prim’s)
AND.
SPANNING TREES Lecture 21 CS2110 – Fall Nate Foster is out of town. NO 3-4pm office hours today!
Spanning Tree Algorithms William T. Trotter and Mitchel T. Keller Math 3012 – Applied Combinatorics Spring 2009.
By: Christophe Dufour Chrishon Adams Mischael Joseph.
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.
The Traveling Salesman Starring: Mr. Brute Force Co Starring: Mrs. Sorted Edge Lord Nearest Neighbor.
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.
Chapter 2: Business Efficiency Hamiltonian Circuit Visiting Vertices –In some graph theory problems, it is only necessary to visit specific locations (using.
Graphs 1 Neil Ghani University of Strathclyde. Where are we …. We studied lists: * Searching and sorting a list Then we studied trees: * Efficient search.
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
HAMILTONIAN CIRCUIT ALGORITHMS
Great Theoretical Ideas in Computer Science
Chapter 2: Business Efficiency Lesson Plan
Chapter 2: Business Efficiency Lesson Plan
Section 14.3 Hamilton Paths, and Hamilton Circuits
Discrete Mathematics for Computer Science
Graphs Chapter 11 Objectives Upon completion you will be able to:
Chapter 2: Business Efficiency Business Efficiency
Applied Combinatorics, 4th Ed. Alan Tucker
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.
Hamilton Paths and Hamilton Circuits
Spanning Trees Lecture 20 CS2110 – Spring 2015.
Traveling Salesman Problems Nearest Neighbor Method
Presentation transcript:

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 it started.

If possible, find a Hamiltonian Circuit

Minimum –Cost Circuit 1.Generate ALL possible tours 2.Add up distances 3.Choose “cheapest” tour

Complete Graphs - A graph where there is exactly one edge between every pair of vertices.

Fundamental Principle of Counting - How many Hamiltonian Circuits are there in a complete graph with 4 vertices? 5? n?

Fundamental Principle of Counting If you have 10 shirts and 4 pants, how many outfits? SPS S

Fundamental Principle of Counting In general, if there are a ways of choosing one thing, b ways of choosing a second after the first is chosen,…, z ways of choosing the last item after the earlier choices, then the total number of choice patterns is: a x b x c x … x z

License Plates _ _ _ - _ _ _ _ _ _ _ _ _ _

Nearest Neighbor Algorithm Starting from the home city, first visit the nearest city, then visit the nearest city that has no already been visited. We return to the start when no other choice is available. Pro: Quicker Con: Not always cheapest route

On your way home from the Homecoming dance, you agreed to take your friends Sally, Billy, Johnny, and Clyde to their respective houses. If their houses are represented by the map below, who should you take home first? Second? Third? Fourth? (Assume your house is next to the Dance Venue)

Literacy Practice Page 38 – Traveling Salesman Problem (TSP)

Sorted Edges Algorithm Start by sorting each edge of the complete graph in order of increasing cost. Then at each stage, select an edge that has not been previously chosen of least cost that (1)never requires that three used edges meet at a vertex and that (2) never closes up a circular tour that doesn’t include all the vertices.

Heuristic Algorithms “Quick and dirty” algorithms that come “close enough” to giving an optimal solution that they are deemed important for practical uses. Example: Sorted Edges Non-Example: Brute Force

Kruskal’s Algorithm Add links in order of cheapest cost so that (1)no circuits form and so that (2) every vertex belongs to some link added. ***THIS IS NOT A HAMILTONIAN CIRCUIT. DO NOT FORM A CIRCUIT!!!!!!!!!

Pictaphone Service *Numbers indicate cost (in millions) of implementing pictaphone lines between the cities (0.7 = $700,000).

Minimum Cost Spanning Tree A connected graph that is not a circuit and whose costs sum to a minimum value.

You are tasked with designing the roads in a subdivision. The following graph are the possible roads that could be added. The values associated with each road is not the distance, but the cost of building that road in thousands of dollars. Figure out which roads should be used by using Kruskal’s Algorithm.

Start with just the vertices and work from there. ***Note: The original graph was not a complete graph.

Order-Requirement Digraph Used to complete a job with multiple tasks as quickly as possible Made up of tasks (vertices) and arrows (edges). Some tasks (T7 and T8) are independent. This means they can be completed at any time. Tasks that follow an arrow cannot be started until all tasks before them have been completed.

Example: Turning a Plane Around Task AUnloading Passengers13 Minutes Task BUnload Cargo25 Minutes Task CClean Cabin15 Minutes Task DLoad New Cargo22 Minutes Task ELoad New Passengers27 Minutes

Critical-Path The shortest amount of time for which it is possible to complete a job. The critical path is counter-intuitive in the fact that it is the LONGEST path in the graph. The length of the path is determined by the sum of the costs of each task. *Go back and determine the critical path for the airplane example.

Thanksgiving!!!! You have volunteered to host Thanksgiving at your house this year. Let’s determine what tasks need to be completed and how long it will take to prepare for the feast. Get with a partner and determine what tasks need to be completed and approximate how long each will take.