Turn in HW and Classwork sheet from last class. You have 10 minutes to complete the warm- up. After the warm-up, we will finish our notes on algorithms.

Slides:



Advertisements
Similar presentations
Chapter 2: Business Efficiency Lesson Plan
Advertisements

1. Find the cost of each of the following using the Nearest Neighbor Algorithm. a)Start at Vertex M.
Minimum Spanning Tree Sarah Brubaker Tuesday 4/22/8.
6.8 The Cheapest-Link Algorithm. The Cheapest-Link Algorithm Pick the edge with the smallest weight and mark it Pick the next edge with the smallest weight.
10.4 Spanning Trees. Def Def: Let G be a simple graph. A spanning tree of G is a subgraph of G that is a tree containing every vertex of G See handout.
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.
MINIMAL CONNECTOR PROBLEMS Problem: A cable TV company is installing a system of cables to connect all the towns in a region. The numbers in the network.
Excursions in Modern Mathematics(Tannenbaum) and Thinking Mathematically (Blitzer)
Graph Algorithms: Minimum Spanning Tree We are given a weighted, undirected graph G = (V, E), with weight function w:
§ Algorithms, Algorithms, Algorithms Recall that an algorithm is a set of procedures or rules that, when followed, lead to a ‘solution’ to.
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.
Traveling Salesman Problems Repetitive Nearest-Neighbor and Cheapest-Link Algorithms Chapter: 6.
Chapter 9: Graphs Basic Concepts
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley.
Minimum Spanning Trees. Subgraph A graph G is a subgraph of graph H if –The vertices of G are a subset of the vertices of H, and –The edges of G are a.
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley. All rights reserved.
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 7 The Mathematics of Networks 7.1Trees 7.2Spanning Trees 7.3 Kruskal’s.
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 Hamilton Paths and Hamilton Circuits.
COSC 2007 Data Structures II Chapter 14 Graphs III.
Chapter 4 sections 1 and 2.  Fig. 1  Not connected  All vertices are even.  Fig. 2  Connected  All vertices are even.
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.
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.
6.4: The Brute-Force Algorithms
Chapter 2: Business Efficiency Lesson Plan Business Efficiency  Visiting Vertices-Graph Theory Problem Hamiltonian Circuits  Vacation Planning Problem.
© 2010 Pearson Prentice Hall. All rights reserved. CHAPTER 15 Graph Theory.
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.
Union-Find  Application in Kruskal’s Algorithm  Optimizing Union and Find Methods.
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.
Spanning Trees Dijkstra (Unit 10) SOL: DM.2 Classwork worksheet Homework (day 70) Worksheet Quiz next block.
Graph Theory and Algorithms 1 DM Notes1CMrsLenox.
Chapter 2: Business Efficiency Hamiltonian Circuit Visiting Vertices –In some graph theory problems, it is only necessary to visit specific locations (using.
Data Structures & Algorithms Graphs Richard Newman based on book by R. Sedgewick and slides by S. Sahni.
Hamiltonian Circuits and Paths
Hamilton Paths and Hamilton Circuits
Excursions in Modern Mathematics Sixth Edition
6.4: The Brute-Force Algorithms
Weighted Graphs and traveling Salesperson problem
HAMILTONIAN CIRCUIT ALGORITHMS
Chapter 2: Business Efficiency Lesson Plan
Data Structures & Algorithms Graphs
Chapter 2: Business Efficiency Lesson Plan
Minimum Spanning Tree.
* Hamiltonian Circuits introduction
Kruskal’s Algorithm for finding a minimum spanning tree
A path that uses every vertex of the graph exactly once.
Cheapest-Link Algorithm/Sorted Edges (Unit 10) SOL: DM.2
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
Homework #6: Local Access Design
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,
Kruskal’s Algorithm AQR.
Warm Up – 3/19 - Wednesday Give the vertex set. Give the edge set.
Warm Up – 3/14 - Friday 100 seats are to be apportioned.
Traveling Salesman Problems Nearest Neighbor Method
Presentation transcript:

Turn in HW and Classwork sheet from last class. You have 10 minutes to complete the warm- up. After the warm-up, we will finish our notes on algorithms for Hamilton Circuits Finally, you will take a group quiz with notes due at the end of class. CH 6 Test next class!

2 Repetitive Nearest Neighbor Pick a vertex and apply the Nearest Neighbor procedure (Algorithm) Continue this process until you have applied the Nearest Neighbor Algorithm to each vertex Select the circuit that gives the cheapest result

3 Repetitive Nearest Neighbor A D C B AB = 10 DC = 20 BC = 30 BD = 40 AC = 50 AD =70 n Vertex AABCDA = = 130 n Vertex BBACDB = = 120 n Vertex C CDBAC = = 120 n Vertex DDCBAD = = 130

Try example !!l 4

5 CHEAPEST LINK ALGORITHM (sorted edges ) A D C B A D C B AB = 10 DC = 20 BC = 30 BD = 40 AC = 50 AD =70 1. List the edges in order from lowest weight to highest weight 2. Begin the subgraph by choosing the edge of lowest weight. (at any point, if there is more than one edge of a given wt., you may choose which one to use, and may use both, as long as no rules are broken!) RULES: DO NOT… >add any edge that will create a subcircuit (doesn’t contain ALL of the original vertices) >add an edge that will make a vertex have degree greater than 2

6 CHEAPEST LINK ALGORITHM (sorted edges ) A D C B A D C B AB = 10 DC = 20 BC = 30 BD = 40 AC = 50 AD =70 3. Continue choosing edges in order of increasing weight (without breaking any rules) until you have a h.c. subgraph. BD would create a subcircuit!

7 CHEAPEST LINK ALGORITHM (sorted edges ) A D C B A D C B AB = 10 DC = 20 BC = 30 BD = 40 AC = 50 AD =70 AC would create a subcircuit!

8 CHEAPEST LINK ALGORITHM (sorted edges ) A D C B A D C B AB = 10 DC = 20 BC = 30 BD = 40 AC = 50 AD =70 Now you have a h.c. subgraph! Notice that the weight of this circuit is 130 miles. (Compare that with the previous circuit’s weight!) Step N. Connect the last two vertices to close the circuit.

Try example !!l 9

10 What’s the difference? \ The CHEAPEST LINK algorithm : *The edges are chosen by increasing weight. *No starting vertex is chosen, so optimal path is unique

11 What’s the difference? \ The NEAREST NEIGHBOR algorithm : The weight of the h.c. is dependent on the starting point chosen. There are many solutions, depending on the vertex you choose to start at.

12 REMEMBER!!! n These algorithms do not guarantee THE OPTIMAL SOLUTION. n They produce a solution QUICKLY,and are especially useful for LARGE APPLICATIONS. n The same algorithm may produce a number of different solutions depending on the starting point chosen. n Different algorithms do not necessarily produce the same solutions.